commit 9eb0947d122edf3e915d594271afa51170effe41 Author: haroon amjad Date: Tue Jul 1 11:41:21 2025 +0300 Initial Commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..55ad4693 --- /dev/null +++ b/.gitignore @@ -0,0 +1,47 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +pubspec.lock +/ios/Podfile.lock +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ +/ios/Frameworks/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Exceptions to above rules. +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +health_calculators.dart diff --git a/Application.kt b/Application.kt new file mode 100644 index 00000000..0708653a --- /dev/null +++ b/Application.kt @@ -0,0 +1,35 @@ +//package com.cloud.diplomaticquarterapp +package com.ejada.hmg + +import io.flutter.app.FlutterApplication +import io.flutter.plugin.common.PluginRegistry +import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback +import io.flutter.plugins.GeneratedPluginRegistrant +import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService + +class Application : FlutterApplication(), PluginRegistrantCallback { + override fun onCreate() { + super.onCreate() + FlutterFirebaseMessagingService.setPluginRegistrant(this) + } + + override fun registerWith(registry: PluginRegistry) { + io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin")); + } +} + +//import io.flutter.app.FlutterApplication +//import io.flutter.plugin.common.PluginRegistry +//import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback +//import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService +// +//class Application : FlutterApplication(), PluginRegistrantCallback { +// override fun onCreate() { +// super.onCreate() +// FlutterFirebaseMessagingService.setPluginRegistrant(this) +// } +// +// override fun registerWith(registry: PluginRegistry?) { +// FirebaseCloudMessagingPluginRegistrant.registerWith(registry) +// } +//} \ No newline at end of file diff --git a/Certs/APNSProdCert.certSigningRequest b/Certs/APNSProdCert.certSigningRequest new file mode 100644 index 00000000..3f13a387 --- /dev/null +++ b/Certs/APNSProdCert.certSigningRequest @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIICkDCCAXgCAQAwSzEjMCEGCSqGSIb3DQEJARYUaGFyb29uNjEzOEBnbWFpbC5j +b20xFzAVBgNVBAMMDk1vaGFtZWQgTWVrYXd5MQswCQYDVQQGEwJBRTCCASIwDQYJ +KoZIhvcNAQEBBQADggEPADCCAQoCggEBALcPrk09MmhQhRNe8LYdaeN4mYtoKJg3 +SndMLgpxnaRqP7a6f4sp118wCFZsTXnwhPVP4DzmXWc2AzZtsusmhdw1tzNFtme0 +PtEjDXIPI2lHU3Zhi2zukZdAVxF+uNi3pcp0axina60ZQciIfb/7Fx6hNbqpk90E +O8a2Ob17Wq/ZTYIP4H7ZGydUe2ra9QyDtjmGj9vpEv+xXYWX685sgEylTG14DSOP +ozGsQmaf+QCMbCT3osq7idWc1IQ+3Oed0kUTx1jmRtZwPzQkJJ1Bx3vYSXN/EOlb +u+ei1Nqtc14aVCYvmcuvGDtMyRtw6w+syCw2CpJCPGNkxNz+EH9h+EUCAwEAAaAA +MA0GCSqGSIb3DQEBCwUAA4IBAQBYdu2AaZY6kReuT1Xp8ktlyPfjBRKhPPChuaeR +tFnYMsJtG0aIA/xOu4/RYDgmL92seimULXd9DIPvkJ2DuaB+bdfGTw0qXUlihkm8 +ui5O0L2F9OZbQxJogvTmrMsKnkoR27O5vyfCn9VMOLk3x1nyEzAXIj/5GHWw9T6t +r65jPUOfm6ikiZtICBzSaTPBtyfZB8mrbwG2dpOvVNSa1dj3xip4L8CL6TxH+qM3 ++N90QFYjvjphJkpn2Kt0ow9IyIyeqJbIYJmsWoV9pXddOHCjKdTWUjq7D2Jn3eUA +DAKjKgVqF4/dU10k7EtSfrw01aHLXjj5FxsD5YhVrgTA5xSq +-----END CERTIFICATE REQUEST----- diff --git a/Certs/Apple Pay UAT/Apple Pay UAT.zip b/Certs/Apple Pay UAT/Apple Pay UAT.zip new file mode 100644 index 00000000..fa08b99a Binary files /dev/null and b/Certs/Apple Pay UAT/Apple Pay UAT.zip differ diff --git a/Certs/Apple Pay UAT/ApplePayMerchantIdentityCertProd.certSigningRequest b/Certs/Apple Pay UAT/ApplePayMerchantIdentityCertProd.certSigningRequest new file mode 100644 index 00000000..ce03b2e3 --- /dev/null +++ b/Certs/Apple Pay UAT/ApplePayMerchantIdentityCertProd.certSigningRequest @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIICajCCAVICAQAwJTEjMCEGCSqGSIb3DQEJARYUSGFyb29uNjEzOEBnbWFpbC5j +b20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC4E8y9zluekbsXX6+i +HLa0GrZE+r8rJsmcNyhiONDkpCTQuuidRb4PH+DWPpxwtndKpgzPemCXavaAPY8I +vSf5/aLTzClLvuX4OqNsb9Y8v8jlt7uYud6hPYK+VKZmIyynqeHldur0+RQScVY7 +Z4MbgxWYAXd0K49o1Vj8KcYP1G37XIaUwOf+Ib3az4abnrsou7w9PSHnKREPU1A8 +syBR56/Zcm3I9e+4nLyk2kjhkp6zR8KKW3s0teqHkW+V2nqd6eU+ZwOOmP3FVuwl +X+kfVabTc42Nb7toDaIvxEI+LlrNCUTCptE5uvY+vId0bwjcL88Ti9zshPETgLd8 +F7mHAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAQEAMTsBtXA79BL7aJoe87iHwCaR +lyOoeG5vUVJhQxhkb7pXD6TT00H3DEn43MCD+Nu9KNq3ZAARTsbnoB1MzYQ+Qs0w +uIx3K+sKKqzo3tKY78cjpKYW68qSY8QHPH8z0PJ/a18Mz1VGjhV9sanRc57fkf8Y +SfzG+jKB+y9AeC4R5PAVkv/EScZKVyb8+hFNZRMBOfnME7QRWm51MlnzfgavB/Sr +SSb9KrKzA65UKM9fv0JhNftiFVwsMDA42RuwSE7rVqzoejb47sFNnEBprt4Jel+5 +FJt/C//NKspMlW2cdRbPek7adaBuZCvEO+b0TDnvMQXnJTO5K0LCzGb5MRuGUg== +-----END CERTIFICATE REQUEST----- diff --git a/Certs/Apple Pay UAT/ApplePayPaymentProcessingCertProd.certSigningRequest b/Certs/Apple Pay UAT/ApplePayPaymentProcessingCertProd.certSigningRequest new file mode 100644 index 00000000..168f3bc9 --- /dev/null +++ b/Certs/Apple Pay UAT/ApplePayPaymentProcessingCertProd.certSigningRequest @@ -0,0 +1,8 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIH6MIGfAgEAMD0xIzAhBgkqhkiG9w0BCQEWFEhhcm9vbjYxMzhAZ21haWwuY29t +MQkwBwYDVQQDDAAxCzAJBgNVBAYTAkFFMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD +QgAEiHGgNfm6LyD0k41YUNxGibQT5t2T9+QTVb6v5YrfCYslJIurcpeia8pzl/HJ +p1f4qxCR04cEYE3tcunyzkJd26AAMAwGCCqGSM49BAMCBQADSAAwRQIhAJWZqbmD +e9jyqPHW578V6xsf5Axgf64GBBFMpZ8+ZukDAiAYu0BbgeiU4RwCrezA71iH95yZ +ge9MoPuNHejpDKGeQQ== +-----END CERTIFICATE REQUEST----- diff --git a/Certs/Apple Pay UAT/Password.rtf b/Certs/Apple Pay UAT/Password.rtf new file mode 100644 index 00000000..aec586f3 --- /dev/null +++ b/Certs/Apple Pay UAT/Password.rtf @@ -0,0 +1,8 @@ +{\rtf1\ansi\ansicpg1252\cocoartf2758 +\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +{\*\expandedcolortbl;;} +\paperw11900\paperh16840\margl1440\margr1440\vieww11520\viewh8400\viewkind0 +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 + +\f0\fs24 \cf0 HMG@54321} \ No newline at end of file diff --git a/Certs/Apple Pay UAT/apple-developer-merchantid-domain-association.txt b/Certs/Apple Pay UAT/apple-developer-merchantid-domain-association.txt new file mode 100644 index 00000000..da84c377 --- /dev/null +++ b/Certs/Apple Pay UAT/apple-developer-merchantid-domain-association.txt @@ -0,0 +1,74 @@ +MIIQaQYJKoZIhvcNAQcCoIIQWjCCEFYCAQExCzAJBgUrDgMCGgUAMHgGCSqGSIb3DQEHAaBrBGl7 +InRlYW1JZCI6IjNBMzU5RTg2WkYiLCJkb21haW4iOiJ1YXQuaG1nd2Vic2VydmljZXMuY29tIiwi +ZGF0ZUNyZWF0ZWQiOiIyMDI1LTA0LTA5LDA4OjUzOjAzIiwidmVyc2lvbiI6MX2ggg0_MIIENDCC +AxygAwIBAgIIPVn4N-rR2J8wDQYJKoZIhvcNAQELBQAwczEtMCsGA1UEAwwkQXBwbGUgaVBob25l +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MSAwHgYDVQQLDBdDZXJ0aWZpY2F0aW9uIEF1dGhvcml0 +eTETMBEGA1UECgwKQXBwbGUgSW5jLjELMAkGA1UEBhMCVVMwHhcNMjQxMjE2MTkyMTAxWhcNMjkx +MjExMTgxMzU5WjBZMTUwMwYDVQQDDCxBcHBsZSBpUGhvbmUgT1MgUHJvdmlzaW9uaW5nIFByb2Zp +bGUgU2lnbmluZzETMBEGA1UECgwKQXBwbGUgSW5jLjELMAkGA1UEBhMCVVMwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQDQkzGr-FMe360eL2T3yU3Xlr5fSz15ZFxD7inDQNL6LxygtrwR +c-_wIrDf3vn5zlXj9UIBtSNlQRI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MCVVMCCD1Z-Dfq0difMAkGBSsOAwIa +BQCggdwwGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMjUwNDA5MDg1 +MzAzWjAjBgkqhkiG9w0BCQQxFgQUAFaGI1aIk0pvFl6XU5VvRpeio9QwKQYJKoZIhvcNAQk0MRww +GjAJBgUrDgMCGgUAoQ0GCSqGSIb3DQEBAQUAMFIGCSqGSIb3DQEJDzFFMEMwCgYIKoZIhvcNAwcw +DgYIKoZIhvcNAwICAgCAMA0GCCqGSIb3DQMCAgFAMAcGBSsOAwIHMA0GCCqGSIb3DQMCAgEoMA0G +CSqGSIb3DQEBAQUABIIBAHdhBvowTL1e7Q-KFo3GAoa_c3I5iQH79ks6sZ9U4zu3xhpjrReRlA5d +ORAcMvUnUT0sjDj2ISsLKzUnDXNlcPE8fqfkMI_7LYlWvnNalVtrJmL6CUheBuTKMQ_Z_lZLLI4o +J46YUzCU9M4vpcgO6EpOQTNrqLx2sOs-V_my1p-Hig7UqdHNviX4gL4xjg7yUXNoevZ9ixPLXI4C +aPmg5q2NCECPxS7g36hJ_gHtRC6awR8qvK3-mSZPPfMzh0sHih76h2RWcv13UHSNygn3SF0MLhsS +5m9tf6r1sJOCAr2_ri-65d2GN1vhGXfoXQ0KFy9N2Cao3IsRs5unBb6pk5c diff --git a/Certs/Apple Pay UAT/apple_pay.cer b/Certs/Apple Pay UAT/apple_pay.cer new file mode 100644 index 00000000..e7103ace Binary files /dev/null and b/Certs/Apple Pay UAT/apple_pay.cer differ diff --git a/Certs/Apple Pay UAT/merchant_id.cer b/Certs/Apple Pay UAT/merchant_id.cer new file mode 100644 index 00000000..66bcbab8 Binary files /dev/null and b/Certs/Apple Pay UAT/merchant_id.cer differ diff --git a/Certs/ApplePushServices.certSigningRequest b/Certs/ApplePushServices.certSigningRequest new file mode 100644 index 00000000..7d509a0a --- /dev/null +++ b/Certs/ApplePushServices.certSigningRequest @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIICkDCCAXgCAQAwSzEjMCEGCSqGSIb3DQEJARYUaGFyb29uNjEzOEBnbWFpbC5j +b20xFzAVBgNVBAMMDk1vaGFtZWQgTWVrYXd5MQswCQYDVQQGEwJBRTCCASIwDQYJ +KoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnHqsyE7WfiVcE1Lpa4t4OVO6qlll2q +1djs0XG06R/dlDtIqv4940/XLj+hU93mzAcVvFW4DSIEdD3InM3+T6oMTjPu6meU +69h9ryaVkluQRrT/tdGI1EKO4MWGMe4MDIt7DqMhMfAcxTwekwdxdKaCEhaw3qnA +l/64AelY6URW1pHHJMA0VV7j+pE3jVNai+muMXPrhQ1VrOrV8FftpY3bEeRJR2Cl +T0tv0LhEMu4SfLnVWCzGQQC82hilDw3rH3ZDs8DFxF9agNVdwKlYamarh1dQXwRq +Yx2+sjY1/51r9L4VS+GAh9ECxz0e+43NpzfZ/N+mTeDYKDepaBwPQ6kCAwEAAaAA +MA0GCSqGSIb3DQEBCwUAA4IBAQB89OyLfywKT7ftmpEqCmgsmaJexb580q9w8wOk +1JhJkNV5ec+p1dnge2NZeJ4LGII/5wmPj1vANNW0GZdmJDgnC+2gg9toq1QLCAsF +rW7/LMpgAoEH+P5bhrHV9RRv6BQi0ZmN0apBHjp/pqZfm2Cl5jQPEWjUEf2tIF4l +LSKdok6IPO9n4Fgyk0XdUNSEhgVhsLtZkGiXnkI1YovKDnupTFYPXMLp103bc9zP +xDxwscvOysNDijlzZAkJPg2z8NrJIRDrKvLRHzxQwZ/1LHVB/51bp/1iyks3vOjh +qw5XVsrtGAjCjU9md7q3XkPSyKzhK9UqPdOxdvl1OY0KKIIY +-----END CERTIFICATE REQUEST----- diff --git a/Certs/ApplePushServicesSandbox.certSigningRequest b/Certs/ApplePushServicesSandbox.certSigningRequest new file mode 100644 index 00000000..7d509a0a --- /dev/null +++ b/Certs/ApplePushServicesSandbox.certSigningRequest @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIICkDCCAXgCAQAwSzEjMCEGCSqGSIb3DQEJARYUaGFyb29uNjEzOEBnbWFpbC5j +b20xFzAVBgNVBAMMDk1vaGFtZWQgTWVrYXd5MQswCQYDVQQGEwJBRTCCASIwDQYJ +KoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnHqsyE7WfiVcE1Lpa4t4OVO6qlll2q +1djs0XG06R/dlDtIqv4940/XLj+hU93mzAcVvFW4DSIEdD3InM3+T6oMTjPu6meU +69h9ryaVkluQRrT/tdGI1EKO4MWGMe4MDIt7DqMhMfAcxTwekwdxdKaCEhaw3qnA +l/64AelY6URW1pHHJMA0VV7j+pE3jVNai+muMXPrhQ1VrOrV8FftpY3bEeRJR2Cl +T0tv0LhEMu4SfLnVWCzGQQC82hilDw3rH3ZDs8DFxF9agNVdwKlYamarh1dQXwRq +Yx2+sjY1/51r9L4VS+GAh9ECxz0e+43NpzfZ/N+mTeDYKDepaBwPQ6kCAwEAAaAA +MA0GCSqGSIb3DQEBCwUAA4IBAQB89OyLfywKT7ftmpEqCmgsmaJexb580q9w8wOk +1JhJkNV5ec+p1dnge2NZeJ4LGII/5wmPj1vANNW0GZdmJDgnC+2gg9toq1QLCAsF +rW7/LMpgAoEH+P5bhrHV9RRv6BQi0ZmN0apBHjp/pqZfm2Cl5jQPEWjUEf2tIF4l +LSKdok6IPO9n4Fgyk0XdUNSEhgVhsLtZkGiXnkI1YovKDnupTFYPXMLp103bc9zP +xDxwscvOysNDijlzZAkJPg2z8NrJIRDrKvLRHzxQwZ/1LHVB/51bp/1iyks3vOjh +qw5XVsrtGAjCjU9md7q3XkPSyKzhK9UqPdOxdvl1OY0KKIIY +-----END CERTIFICATE REQUEST----- diff --git a/Certs/Pass.rtf b/Certs/Pass.rtf new file mode 100644 index 00000000..2fe18706 --- /dev/null +++ b/Certs/Pass.rtf @@ -0,0 +1,8 @@ +{\rtf1\ansi\ansicpg1252\cocoartf2513 +\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +{\*\expandedcolortbl;;} +\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0 +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 + +\f0\fs24 \cf0 Hmg54321} \ No newline at end of file diff --git a/Certs/aps.cer b/Certs/aps.cer new file mode 100644 index 00000000..d95bac40 Binary files /dev/null and b/Certs/aps.cer differ diff --git a/Certs/aps_development.cer b/Certs/aps_development.cer new file mode 100644 index 00000000..9a9934bb Binary files /dev/null and b/Certs/aps_development.cer differ diff --git a/CustomFlutterFirebaseMessagingService.java b/CustomFlutterFirebaseMessagingService.java new file mode 100644 index 00000000..0a4d83be --- /dev/null +++ b/CustomFlutterFirebaseMessagingService.java @@ -0,0 +1,17 @@ +package io.flutter.plugins.firebasemessaging; + +import android.content.Intent; + +import com.google.firebase.messaging.RemoteMessage; + +public class CustomFlutterFirebaseMessagingService extends FlutterFirebaseMessagingService { + @Override + public void onMessageReceived(RemoteMessage remoteMessage) { + if (remoteMessage.getData().containsKey("is_call")) { + Intent intent = getPackageManager().getLaunchIntentForPackage(getPackageName()); + startActivity(intent); + super.onMessageReceived(remoteMessage); + } else + super.onMessageReceived(remoteMessage); + } +} \ No newline at end of file diff --git a/FirebaseCloudMessagingPluginRegistrant.kt b/FirebaseCloudMessagingPluginRegistrant.kt new file mode 100644 index 00000000..9ac064cb --- /dev/null +++ b/FirebaseCloudMessagingPluginRegistrant.kt @@ -0,0 +1,23 @@ +//package com.cloud.diplomaticquarterapp +package com.ejada.hmg + +import io.flutter.plugin.common.PluginRegistry +import io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin + +object FirebaseCloudMessagingPluginRegistrant { + fun registerWith(registry: PluginRegistry?) { + if (alreadyRegisteredWith(registry)) { + return + } + FirebaseMessagingPlugin.registerWith(registry?.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin")) + } + + private fun alreadyRegisteredWith(registry: PluginRegistry?): Boolean { + val key: String? = FirebaseCloudMessagingPluginRegistrant::class.java.canonicalName + if (registry?.hasPlugin(key)!!) { + return true + } + registry.registrarFor(key) + return false + } +} \ No newline at end of file diff --git a/Google Play Signing Certs/deployment_cert.der b/Google Play Signing Certs/deployment_cert.der new file mode 100644 index 00000000..46c10c23 Binary files /dev/null and b/Google Play Signing Certs/deployment_cert.der differ diff --git a/Google Play Signing Certs/upload_cert.der b/Google Play Signing Certs/upload_cert.der new file mode 100644 index 00000000..46c10c23 Binary files /dev/null and b/Google Play Signing Certs/upload_cert.der differ diff --git a/PatientAppAPNSAuthKey.p8 b/PatientAppAPNSAuthKey.p8 new file mode 100755 index 00000000..0515964e --- /dev/null +++ b/PatientAppAPNSAuthKey.p8 @@ -0,0 +1,6 @@ +-----BEGIN PRIVATE KEY----- +MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgJ5XRSnefd1apSG/z +YJTQ55ffLMlPgKlGM9edg88mUZagCgYIKoZIzj0DAQehRANCAATSA2MbS+J0cQsc +uBU0xaoxOUgGvnHCQSEK4t22i8eeKPPhH6RHJhK1ugPvj+Eyadf7j6pn3QRonEJu +mIL+qvqC +-----END PRIVATE KEY----- \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..8a284cae --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# diplomaticquarterapp + +A new Flutter application. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/agconnect-services_DQ.json b/agconnect-services_DQ.json new file mode 100644 index 00000000..563c412f --- /dev/null +++ b/agconnect-services_DQ.json @@ -0,0 +1,14 @@ +{ + "client":{ + "appType":"1", + "cp_id":"2640966000002322881", + "product_id":"736430079244816576", + "client_id":"563737844552565952", + "client_secret":"9C9A2C272576B8AE6E886C78AF944E8354B91F0AF3381129BB8369FB35E41C47", + "project_id":"736430079244816576", + "app_id":"103856487", + "api_key":"CgB6e3x90XxBrOCMun809w+DOzcFEettcBDUF3fqaLry1ViqTeJqoPwpfaOq/uGw//x0oYwucu9aWazs+Rdj0GUF", + "package_name":"com.cloud.diplomaticquarterapp" + }, + "configuration_version":"1.0" +} \ No newline at end of file diff --git a/agconnect-services_HMG.json b/agconnect-services_HMG.json new file mode 100644 index 00000000..cfdaf83b --- /dev/null +++ b/agconnect-services_HMG.json @@ -0,0 +1,14 @@ +{ + "client":{ + "appType":"1", + "cp_id":"2640966000002322881", + "product_id":"736430079244816567", + "client_id":"563735388191982656", + "client_secret":"650C7C799812AFFD53A10C7756CF05FB9F215A7E49032ABA8EBF3E14B77535CF", + "project_id":"736430079244816567", + "app_id":"102857389", + "api_key":"CgB6e3x9DJzMgRCmnT6dyUEkp6UsIfddb6l3w0ZEXzeiRMHEFi3400Z5fJ5qaHneU0OrAI/JRpk+DMGVs3QpUxlI", + "package_name":"com.ejada.hmg" + }, + "configuration_version":"1.0" +} \ No newline at end of file diff --git a/applepay.json b/applepay.json new file mode 100644 index 00000000..5b00d6d5 --- /dev/null +++ b/applepay.json @@ -0,0 +1,22 @@ +{ + "provider": "apple_pay", + "data": { + "merchantIdentifier": "merchant.com.hmgwebservices", + "displayName": "Sulaiman Al Habib", + "merchantCapabilities": [ + "3DS", + "debit", + "credit" + ], + "supportedNetworks": [ + "amex", + "visa", + "discover", + "masterCard" + ], + "countryCode": "SA", + "currencyCode": "SAR", + "requiredBillingContactFields": null, + "requiredShippingContactFields": null + } +} \ No newline at end of file diff --git a/assets/app_icons/config.json b/assets/app_icons/config.json new file mode 100644 index 00000000..7c2dda56 --- /dev/null +++ b/assets/app_icons/config.json @@ -0,0 +1,455 @@ + +{ + "name": "DQIcons", + "css_prefix_text": "", + "css_use_suffix": false, + "hinting": true, + "units_per_em": 1000, + "ascent": 850, + "glyphs": [ + { + "uid": "ff411ee29329279e60e33c8fe13b69cf", + "css": "blood-pressure", + "code": 59392, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M479.2 354.2V423.1A41.1 41.1 0 0 0 458.3 458.4 41.8 41.8 0 0 0 541.7 458.4 41.1 41.1 0 0 0 520.9 423.1V354.2A20.8 20.8 0 1 0 479.1 354.2ZM854.2 0C772.4 0 708.3 73.2 708.3 166.7 708.3 233.8 758.9 352.6 833.3 372V770.9A187.1 187.1 0 0 1 459.5 782.2C524.8 773.9 583.4 758.4 583.4 729.2V649A207.9 207.9 0 0 0 583.4 267.6V145.8C583.4 86.3 340.4 83.3 291.7 83.3S0 86.3 0 145.8V729.3C0 788.8 243 791.8 291.7 791.8 311.4 791.8 363.1 791.2 417.4 786.7A229 229 0 0 0 875 771V372C949.4 352.7 1000 233.8 1000 166.7 1000 73.2 935.9 0 854.2 0ZM666.7 458.3A166.7 166.7 0 1 1 500 291.7 166.8 166.8 0 0 1 666.7 458.3ZM291.7 125A1092.4 1092.4 0 0 1 519.3 145.8 1092.6 1092.6 0 0 1 291.7 166.7 1092.4 1092.4 0 0 1 64 145.8 1092.7 1092.7 0 0 1 291.7 125ZM125 739.8A343.8 343.8 0 0 1 41.8 721.9V181.6A427 427 0 0 0 125 199.2ZM291.7 750C246.4 750 203.7 747.8 166.7 744.4V203.3C220.8 207.8 272.1 208.4 291.7 208.4 327.7 208.4 470.1 206.7 541.7 181.6V254.2A208.3 208.3 0 1 0 541.7 662.5V721.9A850.6 850.6 0 0 1 291.7 750ZM854.2 333.3C801.5 333.3 750 227.9 750 166.7 750 96.5 795.8 41.6 854.2 41.6S958.3 96.5 958.3 166.7C958.4 227.9 906.9 333.3 854.2 333.3Z", + "width": 1000 + }, + "search": [ + "blood-pressure" + ] + }, + { + "uid": "f06e0a60c298fe46fcd558db3c9103e6", + "css": "blood", + "code": 59393, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M902.3 687.5A19.5 19.5 0 1 0 921.9 707 19.6 19.6 0 0 0 902.3 687.5ZM902.3 687.5M332 429.6A19.5 19.5 0 1 0 312.5 410.1 19.6 19.6 0 0 0 332 429.6ZM332 429.6M214.9 625A214.7 214.7 0 0 0 401.1 303.2L231.8 9.8A19.5 19.5 0 0 0 197.9 9.8L28.6 303.1A214.7 214.7 0 0 0 214.9 625ZM62.4 322.7L214.9 58.6 367.3 322.7A175.8 175.8 0 1 1 62.4 322.7ZM62.4 322.7M214.8 546.9A136.2 136.2 0 0 0 321.1 496.1 19.5 19.5 0 0 0 290.7 471.5 97.4 97.4 0 0 1 214.8 507.8 19.5 19.5 0 1 0 214.8 546.9ZM214.8 546.9M1000 726.4A272.4 272.4 0 0 0 954.8 575.6L723.8 189A19.6 19.6 0 0 0 689.6 190.3L487.1 594.3A273.5 273.5 0 1 0 999.9 726.4ZM726.6 960.7A234.4 234.4 0 0 1 521.5 612.9L521.8 612.1 708.6 239.5 921.5 596 921.9 596.7A234.4 234.4 0 0 1 726.4 960.6ZM726.6 960.7M898.9 766.2A19.5 19.5 0 0 0 874 778.2 156.5 156.5 0 0 1 726.4 882.9 19.5 19.5 0 0 0 726.4 922 195.5 195.5 0 0 0 910.9 791.1 19.5 19.5 0 0 0 898.9 766.2ZM898.9 766.2", + "width": 1000 + }, + "search": [ + "blood" + ] + }, + { + "uid": "8bc572f19109474e3c88db0439fd2dcc", + "css": "bmi", + "code": 59394, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M937.8 231.3H846.3V80.5A80.6 80.6 0 0 0 765.8 0H80.3A80.5 80.5 0 0 0 0 80.5V686.2A80.5 80.5 0 0 0 80.3 766.6H456V948.3A51.7 51.7 0 0 0 507.7 1000H937.8A51.7 51.7 0 0 0 989.3 948.3V283A51.7 51.7 0 0 0 937.8 231.3ZM80.3 733.3A47.1 47.1 0 0 1 33.3 686.2V80.5A47.1 47.1 0 0 1 80.3 33.3H765.8A47.2 47.2 0 0 1 813 80.5V231.3H634A216.5 216.5 0 0 0 210.3 240 40.5 40.5 0 0 0 249.9 288.3H455.9V733.3ZM464.2 255H457.9L451.6 229.5A76.5 76.5 0 0 1 472.2 245.5 51.4 51.4 0 0 0 464.2 255ZM415.1 220.1L423.8 255H348.6A78.3 78.3 0 0 1 414.2 220L414.9 220ZM507.7 231.3C506.5 231.3 505.3 231.6 504.1 231.7A109.7 109.7 0 0 0 442 190.3L431.2 146.7 444.5 153.1A16.7 16.7 0 0 0 458.8 122.9L413.7 101.6H413.4A16.2 16.2 0 0 0 409 100.2C408.6 100.2 408.3 100.2 407.9 100.2A17.5 17.5 0 0 0 406 100.2 16.2 16.2 0 0 0 402.1 100.9 13.6 13.6 0 0 0 400.5 101.3 17.6 17.6 0 0 0 395.7 104.2L395.7 104.2A16.7 16.7 0 0 0 392.5 108.1L365.6 152.8A16.7 16.7 0 0 0 394.2 170L400.3 159.8 407.2 187.5A112.5 112.5 0 0 0 311.3 255H250A6.8 6.8 0 0 1 244.5 252.5 7.4 7.4 0 0 1 243 246.3 183.3 183.3 0 0 1 599.8 231.3ZM956 948.3A18.4 18.4 0 0 1 937.7 966.6H507.7A18.4 18.4 0 0 1 489.3 948.3V283A18.4 18.4 0 0 1 507.7 264.7H937.8A18.4 18.4 0 0 1 956.2 283ZM878.7 300H566.6A44 44 0 0 0 522.7 344V506.2A44 44 0 0 0 566.6 550.2H878.7A44 44 0 0 0 922.6 506.2V344A44 44 0 0 0 878.7 300ZM889.3 506A10.7 10.7 0 0 1 878.7 516.6H566.6A10.7 10.7 0 0 1 556 506V343.8A10.7 10.7 0 0 1 566.6 333.1H878.7A10.7 10.7 0 0 1 889.3 343.8V506ZM631 566.7H547.7A16.7 16.7 0 0 0 531 583.3V666.7A16.7 16.7 0 0 0 547.7 683.3H631A16.7 16.7 0 0 0 647.7 666.7V583.3A16.7 16.7 0 0 0 631 566.7ZM614.3 650H564.2V600H614.3ZM764.3 566.7H681A16.7 16.7 0 0 0 664.3 583.3V666.7A16.7 16.7 0 0 0 681 683.3H764.3A16.7 16.7 0 0 0 781 666.7V583.3A16.7 16.7 0 0 0 764.3 566.7ZM747.7 650H697.6V600H747.6ZM897.7 566.7H814.3A16.7 16.7 0 0 0 797.7 583.3V666.7A16.7 16.7 0 0 0 814.3 683.3H897.7A16.7 16.7 0 0 0 914.3 666.7V583.3A16.7 16.7 0 0 0 897.7 566.7ZM881 650H830.9V600H880.9ZM631 700H547.7A16.7 16.7 0 0 0 531 716.7V800A16.7 16.7 0 0 0 547.7 816.7H631A16.7 16.7 0 0 0 647.7 800V716.7A16.7 16.7 0 0 0 631 700ZM614.3 783.3H564.2V733.3H614.3ZM764.3 700H681A16.7 16.7 0 0 0 664.3 716.7V800A16.7 16.7 0 0 0 681 816.7H764.3A16.7 16.7 0 0 0 781 800V716.7A16.7 16.7 0 0 0 764.3 700ZM747.7 783.3H697.6V733.3H747.6ZM897.7 700H814.3A16.7 16.7 0 0 0 797.7 716.7V800A16.7 16.7 0 0 0 814.3 816.7H897.7A16.7 16.7 0 0 0 914.3 800V716.7A16.7 16.7 0 0 0 897.7 700ZM881 783.3H830.9V733.3H880.9ZM631 833.3H547.7A16.7 16.7 0 0 0 531 850V933.3A16.7 16.7 0 0 0 547.7 950H631A16.7 16.7 0 0 0 647.7 933.3V850A16.7 16.7 0 0 0 631 833.3ZM614.3 916.7H564.2V866.6H614.3ZM764.3 833.3H681A16.7 16.7 0 0 0 664.3 850V933.3A16.7 16.7 0 0 0 681 950H764.3A16.7 16.7 0 0 0 781 933.3V850A16.7 16.7 0 0 0 764.3 833.3ZM747.7 916.7H697.6V866.6H747.6ZM897.7 833.3H814.3A16.7 16.7 0 0 0 797.7 850V933.3A16.7 16.7 0 0 0 814.3 950H897.7A16.7 16.7 0 0 0 914.3 933.3V850A16.7 16.7 0 0 0 897.7 833.3ZM881 916.7H830.9V866.6H880.9ZM626.8 350H593.5A16.7 16.7 0 0 0 576.9 366.7V483.3A16.7 16.7 0 0 0 593.5 500H626.8A41.7 41.7 0 0 0 668.5 458.3V450A41.2 41.2 0 0 0 660 425 41.3 41.3 0 0 0 668.5 399.9V391.6A41.7 41.7 0 0 0 626.8 350ZM610.2 383.3H626.8A8.3 8.3 0 0 1 635.2 391.7V400A8.3 8.3 0 0 1 626.8 408.4H610.2ZM635.2 458.5A8.3 8.3 0 0 1 626.8 466.9H610.2V441.9H626.8A8.3 8.3 0 0 1 635.2 450.2ZM802.9 350.8A16.7 16.7 0 0 0 784.3 356.7L747.7 405.4 711 356.5A16.7 16.7 0 0 0 681 366.5V499.8H714.2V416.7L734.2 443.4A17.3 17.3 0 0 0 760.9 443.4L780.9 416.7V500H814.2V366.7A16.7 16.7 0 0 0 802.9 350.8ZM831 350H864.2V500H831Z", + "width": 989 + }, + "search": [ + "bmi" + ] + }, + { + "uid": "66a5ea0b6227f324a7bcce70c85374a9", + "css": "heart", + "code": 59395, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1308.4 475H1204.8A726.6 726.6 0 0 0 1225.9 394C1251.4 266.6 1234.4 162.5 1177.2 92.3A269.9 269.9 0 0 0 962.4 0.3 417.3 417.3 0 0 0 651.3 143.5 417.3 417.3 0 0 0 340.2 0.3 269.9 269.9 0 0 0 124.3 92.3C67 163 50.1 266.6 75.5 394A725.7 725.7 0 0 0 98.3 476.7H23.6A23.6 23.6 0 1 0 23.6 523.8H115.9C259.5 877 640.3 997.8 644.4 999A23.6 23.6 0 0 0 658.1 999C662.3 997.8 1044.3 877 1187.5 522.1H1308.3A23.6 23.6 0 0 0 1308.3 475.1ZM651.4 951.7H651.4C601.4 934.5 296 818.6 166.7 523.8H423.2L501.2 715.2A23.6 23.6 0 0 0 522.9 729.8H524.8A23.6 23.6 0 0 0 546 711.9L626 384.4 691.8 605.9A24.1 24.1 0 0 0 737.3 607L803.9 422.9 874.5 513.1A23.6 23.6 0 0 0 892.9 522H1136.9C1007.7 817.7 701 934.5 651.4 951.7ZM1179.8 384.8A673.4 673.4 0 0 1 1154.7 475.3H904.5L814.3 360.7A23.6 23.6 0 0 0 773.6 367.3L716.8 523.6 646.2 288.3A23.9 23.9 0 0 0 600.2 289.5L517.6 630.2 460.6 491.3A23.6 23.6 0 0 0 438.7 476.7H147.9A676.1 676.1 0 0 1 122.8 384.8H122.8C99.3 271.8 113.6 181.2 161.9 122.3A223.9 223.9 0 0 1 340.1 47.3 362.4 362.4 0 0 1 631.7 195.7 23.6 23.6 0 0 0 670.8 195.7 362.4 362.4 0 0 1 962.4 47.3 223.9 223.9 0 0 1 1140.7 122.2C1187.8 181.2 1202.4 271.8 1179.8 384.8Z", + "width": 1332 + }, + "search": [ + "heart" + ] + }, + { + "uid": "4131eb4c890febf6ff3d52e759eed4d4", + "css": "height", + "code": 59396, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M518 285.7H508.4A107.1 107.1 0 1 0 349.1 285.7H339.4A89.4 89.4 0 0 0 250.3 374.9V624.9A17.9 17.9 0 0 0 268.1 642.7H321.7V982.2A17.9 17.9 0 0 0 339.6 1000H446.7A89.4 89.4 0 0 0 535.9 910.9V643H589.5A17.9 17.9 0 0 0 607.4 625.1V375A89.4 89.4 0 0 0 518 285.7ZM428.8 142.9A71.4 71.4 0 1 1 357.4 214.3 71.5 71.5 0 0 1 428.6 142.9ZM439.8 321.4L428.8 354.2 417.9 321.4ZM571.7 607.1H536V375H500.3V910.8A53.6 53.6 0 0 1 446.7 964.3V642.9H411V964.3H357.1V375H321.4V607.1H285.7V375A53.6 53.6 0 0 1 339.3 321.4H380L411.7 416.3A17.8 17.8 0 0 0 445.5 416.3L477.2 321.4H518A53.6 53.6 0 0 1 571.6 375V607.1ZM196.4 0H17.9A17.9 17.9 0 0 0 0 17.9V982.2A17.9 17.9 0 0 0 17.9 1000H196.5A17.9 17.9 0 0 0 214.3 982.2V17.9A17.9 17.9 0 0 0 196.4 0ZM178.6 107.1H142.9V142.9H178.6V214.3H107.1V250H178.6V321.4H142.9V357.1H178.6V428.7H107.1V464.4H178.6V535.9H142.9V571.6H178.6V643H107.1V678.7H178.6V750.2H142.9V785.9H178.6V857.3H107.1V893H178.6V964.5H35.7V35.7H178.6Z", + "width": 804 + }, + "search": [ + "height" + ] + }, + { + "uid": "7da96eaf449227b65b25e28f024492a7", + "css": "outline", + "code": 59397, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M295.8 216.2L303.6 183.8C300.3 183 222.5 165.2 167.6 293.5L198.2 306.8C241.3 206 293.6 215.8 295.8 216.2ZM147.9 1000C279.8 1000 416.2 671.4 416.2 583.3A102.5 102.5 0 0 0 399.1 524L499.6 423.6 600 524A102.5 102.5 0 0 0 582.9 583.3C582.9 671.4 719.4 1000 851.2 1000A94.7 94.7 0 0 0 928.2 950.1C1001.6 841.4 1023 563 968.4 427.4A1298.8 1298.8 0 0 0 893.8 267C832.1 156.3 772.7 100.2 717.3 100.2 692.2 100.2 667.5 118.5 646.3 153.3A349.4 349.4 0 0 0 604 380.8L566.2 343.1V16.6A16.6 16.6 0 0 0 549.6 0H449.6A16.6 16.6 0 0 0 432.9 16.6V343L395.2 380.8A349.4 349.4 0 0 0 352.9 153.1C331.6 118.3 307 99.9 281.9 99.9 156.3 99.9 43.6 392.7 30.7 427.2-23.9 562.8-2.5 841.2 70.9 949.9A94.7 94.7 0 0 0 147.9 1000ZM674.5 170.6C688.9 147.3 704.9 133.3 717.3 133.3 804.4 133.3 905.6 354.1 937.3 439.1L937.3 439.5C987.9 564.8 968 831.4 900.5 931.4 884.7 954.6 868.1 966.6 851.1 966.6 749.5 966.6 616.1 669.5 616.1 583.3A77.3 77.3 0 0 1 640.4 526 140.2 140.2 0 0 0 657 503 213.7 213.7 0 0 0 688.8 530.9 126.6 126.6 0 0 0 649.4 633.3H682.6A97.1 97.1 0 0 1 709.2 557.1 373 373 0 0 1 732.6 700C732.6 746.1 753.5 833.3 832.6 833.3V800.1C767 800.1 765.9 704.1 765.9 700.1A433 433 0 0 0 745.5 559 185.9 185.9 0 0 0 783.7 565.9 302.4 302.4 0 0 0 870.8 745.2L894.4 721.6A272.8 272.8 0 0 1 817.6 568 93.1 93.1 0 0 1 899.7 636.6L932.4 629.9A128.5 128.5 0 0 0 799.5 533.2 153.6 153.6 0 0 1 722.1 512.6 152.4 152.4 0 0 0 731.5 493.5 117.5 117.5 0 0 0 773.1 501.2 122.7 122.7 0 0 0 861.2 461.7L837.7 438.1A84.3 84.3 0 0 1 740.6 461 100.7 100.7 0 0 0 711.3 371.5L687.7 395A78.9 78.9 0 0 1 694.7 493.1 172.2 172.2 0 0 1 665.3 460.3 155.7 155.7 0 0 0 648 409.1C616.1 345.9 636.4 232.6 674.5 170.6ZM630.5 454.6A42.4 42.4 0 0 1 620.8 497.8L573.1 450 599.7 423.4ZM576 400L549.4 426.6 516.2 393.4V366.8H542.7ZM466.2 33.2H532.9V66.5H466.2ZM466.2 99.9H532.9V133.1H466.2ZM466.2 166.6H532.9V199.8H466.2ZM466.2 233.2H532.9V266.5H466.2ZM466.2 299.9H532.9V333.1H466.2ZM456.5 366.6H483.1V393.2L449.8 426.4 423.2 399.8ZM399.6 423.6L426.2 450.1 378.3 497.7A42.4 42.4 0 0 1 368.5 454.5ZM61.7 439.6L61.7 439.1C93.4 354.1 194.6 133.4 281.7 133.4 294.1 133.4 310 147.3 324.4 170.7 362.6 232.7 382.8 345.9 351 409.2A155.7 155.7 0 0 0 333.7 460.5 172.4 172.4 0 0 1 304.2 493.3 78.7 78.7 0 0 1 311.3 395.2L287.7 371.6A100.7 100.7 0 0 0 258.4 461.3 84.3 84.3 0 0 1 161.3 438.5L137.8 462A122.8 122.8 0 0 0 225.9 501.6 117.5 117.5 0 0 0 267.6 493.8 152.3 152.3 0 0 0 277 512.9 153.6 153.6 0 0 1 199.6 533.5 128.6 128.6 0 0 0 66.6 630.2L99.3 636.9A91.8 91.8 0 0 1 181.2 567.9 273 273 0 0 1 104.4 721.5L128 745.1A302.4 302.4 0 0 0 215.1 565.9 185.9 185.9 0 0 0 253.3 558.9 432.9 432.9 0 0 0 232.9 700C232.9 704.1 231.8 800 166.2 800V833.2C245.3 833.2 266.2 746 266.2 699.9A373.6 373.6 0 0 1 289.5 557 97.4 97.4 0 0 1 316.1 633.1H349.3A126.7 126.7 0 0 0 309.9 530.8 213.8 213.8 0 0 0 341.6 502.9 140.2 140.2 0 0 0 358.3 525.8 77.3 77.3 0 0 1 382.6 583.1C382.6 669.3 249.1 966.4 147.6 966.4 130.6 966.4 114 954.6 98.2 931.2 31 831.5 11.1 565 61.7 439.6ZM800.9 306.6L831.5 293.3C776.5 165 698.8 182.9 695.5 183.6L703.3 216C705.5 215.8 757.9 206.1 800.9 306.6Z", + "width": 999 + }, + "search": [ + "outline" + ] + }, + { + "uid": "9ad94ca188c9245ce61a2023913176f8", + "css": "thermometer", + "code": 59398, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M183.4 0A116.7 116.7 0 0 0 66.7 116.6V675.1A183.3 183.3 0 1 0 366.6 816.3 181.6 181.6 0 0 0 300 675.1V116.6A116.7 116.7 0 0 0 183.4 0ZM333.3 816.3A150 150 0 1 1 93.4 696.6 16.7 16.7 0 0 0 100.1 683.2V633.1H133.3V599.9H100.1V549.8H133.3V516.6H100.1V466.5H133.3V433.3H100.1V383.2H133.3V350H100.1V299.9H133.3V266.6H100.1V216.6H133.3V183.3H100.1V116.6A83.3 83.3 0 0 1 266.7 116.6V683.3A16.6 16.6 0 0 0 273.3 696.6 148.8 148.8 0 0 1 333.3 816.3ZM333.3 816.3M200.1 734.7V150H166.9V734.7A83.3 83.3 0 1 0 200.1 734.7ZM183.4 866.3A50 50 0 1 1 233.4 816.3 50 50 0 0 1 183.4 866.3ZM183.4 866.3", + "width": 367 + }, + "search": [ + "thermometer" + ] + }, + { + "uid": "dc83d16b71561f6b582663f6b4d604ec", + "css": "weight-scale", + "code": 59399, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M912.1 0H87.9A88 88 0 0 0 0 87.9V912.1A88 88 0 0 0 87.9 1000H912.1A88 88 0 0 0 1000 912.1V87.9A88 88 0 0 0 912.1 0ZM941.4 912.1A29.3 29.3 0 0 1 912.1 941.4H87.9A29.3 29.3 0 0 1 58.6 912.1V87.9A29.3 29.3 0 0 1 87.9 58.6H912.1A29.3 29.3 0 0 1 941.4 87.9ZM941.4 912.1M837.9 233.7A563.3 563.3 0 0 0 162.2 233.7 29.3 29.3 0 0 0 156.4 274.9L311.1 480.7A29.3 29.3 0 0 0 352.2 486.5 246.9 246.9 0 0 1 648.4 486.5 29.3 29.3 0 0 0 689.5 480.7L844.2 274.9A29.3 29.3 0 0 0 838.4 233.7ZM659 422.9A302 302 0 0 0 529.3 379.8V290.6A29.3 29.3 0 0 0 470.7 290.6V379.8A302 302 0 0 0 341 422.9L221.2 263.6A504.8 504.8 0 0 1 778.8 263.6ZM659 422.9", + "width": 1000 + }, + "search": [ + "weight-scale" + ] + }, + { + "uid": "363eebd3ff1ac281c38b4ddbc6a2e9d3", + "css": "parking_icon", + "code": 59400, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M592.8 33.4C552.3 32.7 518.9 60.5 518.3 95.2S550.2 158.9 590.7 159.6 664.6 132.5 665.2 97.7 633.3 34.1 592.8 33.4ZM590.9 145C559.8 144.5 534.8 122.3 535.2 95.5S561.4 47.4 592.6 48 648.7 70.7 648.3 97.5 622.1 145.6 590.9 145ZM593.4 1.7C535.4 0.8 487.5 41.5 486.7 92.5 486.3 115.8 502.6 147.6 535.2 187.2A605.7 605.7 0 0 0 583.6 239.1L589.2 244.4 595.1 239.3A605.6 605.6 0 0 0 645.2 189.1C679.1 150.6 696.5 119.4 696.9 96.1 697.8 45.1 651.3 2.7 593.4 1.7ZM632.5 180.2A610.9 610.9 0 0 1 589.6 223.9 610.5 610.5 0 0 1 548.2 178.9C518.2 142.4 502.4 112.6 502.8 92.8 503.5 49.6 544 15.1 593.1 15.9S681.5 52.6 680.8 95.8C680.4 115.6 663.8 144.8 632.5 180.2ZM599.7 63.9L574.1 63.5 573.1 125.8 587.6 126 587.9 107.2 599 107.4A21.7 21.7 0 0 0 599.7 63.9ZM599.2 92.8L588.2 92.7 588.4 78.3 599.5 78.5A7.2 7.2 0 0 1 599.2 92.8ZM187.7 292.7H128.8A129 129 0 0 0 0 421.5V907.3A55.3 55.3 0 0 0 55.2 962.5H261.3A55.3 55.3 0 0 0 316.5 907.3V421.5A129 129 0 0 0 187.7 292.7ZM116.7 315.4A109.8 109.8 0 0 1 22.8 409.4 106.9 106.9 0 0 1 116.7 315.4ZM22.1 604A135.3 135.3 0 0 1 34.3 547.5L63.4 588.9A32.9 32.9 0 0 0 58.9 605.5V767.4A33 33 0 0 0 62 781.5L28.3 829.5A32.9 32.9 0 0 1 22.1 810.1ZM92 800.5H224.5A32.9 32.9 0 0 0 238.6 797.4L270 842A33 33 0 0 1 261.3 843.2H55.2A33 33 0 0 1 46.5 842L77.9 797.4A32.9 32.9 0 0 0 92 800.5ZM81 767.4V605.5A11.1 11.1 0 0 1 92 594.4H224.5A11.1 11.1 0 0 1 235.5 605.5V767.4A11.1 11.1 0 0 1 224.5 778.4H92A11.1 11.1 0 0 1 81 767.4ZM236.2 574.5A33 33 0 0 0 224.5 572.4H92A33 33 0 0 0 80.3 574.5L46.5 526.4A136 136 0 0 1 270.1 526.4ZM294.4 907.3A33.2 33.2 0 0 1 261.3 940.4H55.2A33.2 33.2 0 0 1 22.1 907.3V854.2A54.9 54.9 0 0 0 55.2 865.3H261.3A54.9 54.9 0 0 0 294.4 854.2ZM294.4 810.1A32.9 32.9 0 0 1 288.2 829.4L254.5 781.5A33 33 0 0 0 257.6 767.4V605.5A32.9 32.9 0 0 0 253.1 588.9L282.2 547.5A135.3 135.3 0 0 1 294.4 604ZM294.4 523.5A158.2 158.2 0 0 0 22.1 523.5V431.7A131.9 131.9 0 0 0 139.1 314.7H181.9A131.9 131.9 0 0 0 294.4 431.2ZM204.3 316A106.9 106.9 0 0 1 293.6 408.7 110.9 110.9 0 0 1 204.3 316ZM204.3 316M624.9 292.7H566A129 129 0 0 0 437.2 421.5V907.3A55.3 55.3 0 0 0 492.4 962.5H698.5A55.3 55.3 0 0 0 753.7 907.3V421.5A129 129 0 0 0 624.9 292.7ZM730.8 408.7A110.9 110.9 0 0 1 641.5 316 106.9 106.9 0 0 1 730.8 408.7ZM554 315.4A109.8 109.8 0 0 1 460 409.4 106.9 106.9 0 0 1 554 315.4ZM459.3 604A135.3 135.3 0 0 1 471.6 547.5L500.6 588.9A32.9 32.9 0 0 0 496.1 605.5V767.4A33 33 0 0 0 499.3 781.5L465.6 829.5A32.9 32.9 0 0 1 459.3 810.1ZM529.2 800.5H661.7A32.9 32.9 0 0 0 675.8 797.4L707.2 842A33 33 0 0 1 698.5 843.2H492.4A33 33 0 0 1 483.7 842L515.1 797.4A32.9 32.9 0 0 0 529.2 800.5ZM518.2 767.4V605.5A11.1 11.1 0 0 1 529.2 594.4H661.7A11.1 11.1 0 0 1 672.8 605.5V767.4A11.1 11.1 0 0 1 661.7 778.4H529.2A11.1 11.1 0 0 1 518.2 767.4ZM673.4 574.5A33 33 0 0 0 661.7 572.4H529.2A33 33 0 0 0 517.5 574.5L483.7 526.4A136 136 0 0 1 707.3 526.4ZM731.6 907.3A33.2 33.2 0 0 1 698.5 940.4H492.4A33.2 33.2 0 0 1 459.3 907.3V854.2A54.9 54.9 0 0 0 492.4 865.3H698.5A54.9 54.9 0 0 0 731.6 854.2ZM731.6 810.1A32.9 32.9 0 0 1 725.4 829.4L691.7 781.5A33 33 0 0 0 694.8 767.4V605.5A32.9 32.9 0 0 0 690.3 588.9L719.4 547.5A135.3 135.3 0 0 1 731.6 604ZM731.6 523.5A158.2 158.2 0 0 0 459.3 523.5V431.7A131.9 131.9 0 0 0 576.3 314.7H619.1A131.9 131.9 0 0 0 731.6 431.2ZM731.6 523.5M366.6 977.9H388.6V1000H366.6ZM366.6 977.9M366.6 290.4H388.6V955.8H366.6ZM366.6 290.4M366.6 246.3H388.6V268.4H366.6ZM366.6 246.3M43.4 896.2H65.5V918.3H43.4ZM43.4 896.2M251 896.2H273.1V918.3H251ZM251 896.2M483.6 896.2H505.7V918.3H483.6ZM483.6 896.2M691.2 896.2H713.2V918.3H691.2ZM691.2 896.2", + "width": 754 + }, + "search": [ + "parking_icon" + ] + }, + { + "uid": "3a1701f9a414e497ab81ae1bb58d3e7c", + "css": "blood_type_icon", + "code": 59401, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M567.7 248.5A2004.5 2004.5 0 0 0 452.6 80.5C395.1 5.9 378.7 0 363.3 0S331.4 5.9 273.8 80.5A2004.4 2004.4 0 0 0 158.8 248.6C99.6 344.8 0 523.3 0 636.7A363.3 363.3 0 0 0 726.5 636.7C726.5 523.3 627 344.8 567.7 248.5ZM510.7 696.3H392.6V814.4A29.3 29.3 0 1 1 334 814.4V696.3H215.8A29.3 29.3 0 0 1 215.8 637.7H334V519.5A29.3 29.3 0 1 1 392.6 519.5V637.7H510.7A29.3 29.3 0 0 1 510.7 696.3Z", + "width": 727 + }, + "search": [ + "blood_type_icon" + ] + }, + { + "uid": "2073f5ad66d9ab6e47cc1be6e6e20146", + "css": "height_icon", + "code": 59402, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M615.2 883H527.3V820.3H566.5A29.3 29.3 0 1 0 566.5 761.7H527.3V703.1H605.6A29.3 29.3 0 0 0 605.6 644.5H527.3V585.9H566.5A29.3 29.3 0 1 0 566.5 527.3H527.3V468.8H605.6A29.3 29.3 0 0 0 605.6 410.2H527.3V351.6H566.5A29.3 29.3 0 1 0 566.5 293H527.3V234.4H605.6A29.3 29.3 0 0 0 605.6 175.7H527.3V117.2H566.5A29.3 29.3 0 1 0 566.5 58.6H527.3V29.3A29.3 29.3 0 1 0 468.7 29.3V883H363L375.5 683.7H152.1L164.6 883H29.3A29.3 29.3 0 0 0 0 912.2V970.8A29.3 29.3 0 0 0 58.6 970.8V941.6H585.9V970.8A29.3 29.3 0 1 0 644.6 970.8V912.1A29.3 29.3 0 0 0 615.2 883ZM146.7 625H381A29.3 29.3 0 0 0 410.2 595.7V400.5A146 146 0 0 0 363.3 293.2 146.1 146.1 0 0 1 164.4 293.2 146 146 0 0 0 117.4 400.6V595.8A29.3 29.3 0 0 0 146.7 625Z", + "width": 645 + }, + "search": [ + "height_icon" + ] + }, + { + "uid": "0f1a73756e84a7173b6426ac45ca4a5a", + "css": "online_payment_icon", + "code": 59403, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1214.7 273.8L1213.8 274A29 29 0 0 1 1207.2 274.8C1202 274.8 1195.9 272.2 1195.9 259.6 1195.9 253.1 1197 244.7 1206.7 244.7H1206.7A29.1 29.1 0 0 1 1213.7 246L1214.5 246.2V273.8ZM1216.2 211.5L1214.7 211.8V234.9L1213.2 234.5 1212.8 234.4A32.6 32.6 0 0 0 1204.1 232.8C1184.8 232.8 1180.7 247.5 1180.7 259.8A23.9 23.9 0 0 0 1206.6 286.3 52.5 52.5 0 0 0 1224 283.8 7.6 7.6 0 0 0 1230.5 275.5V209.1C1225.9 209.9 1221.1 210.7 1216.5 211.5M1272.2 274.3L1271.4 274.5 1268.4 275.3A30.7 30.7 0 0 1 1261.3 276.4C1256.8 276.4 1254 274.2 1254 270.3 1254 267.8 1255.2 263.6 1262.6 263.6H1272.2ZM1265.4 232.5A65.2 65.2 0 0 0 1245.7 236L1240.8 237.4 1242.4 248.7 1247.3 247.1A56.9 56.9 0 0 1 1263.4 244.3C1265.5 244.3 1272.1 244.3 1272.1 251.4V254.4H1263C1246.6 254.4 1239 259.7 1239 271 1239 280.6 1246 286.3 1257.8 286.3A60.9 60.9 0 0 0 1270.8 284.6L1271.1 284.6 1271.3 284.6 1272.8 284.8C1277.4 285.7 1282.2 286.5 1286.8 287.4V250.5C1286.8 238.6 1279.6 232.5 1265.5 232.5M1157.5 274.3L1156.7 274.5 1153.8 275.3A30.3 30.3 0 0 1 1146.6 276.4C1142.1 276.4 1139.4 274.2 1139.4 270.3 1139.4 267.8 1140.5 263.6 1147.9 263.6H1157.5L1157.5 274.3ZM1150.8 232.5A65 65 0 0 0 1131.1 236L1126.2 237.4 1127.8 248.7 1132.7 247.1A56.9 56.9 0 0 1 1148.8 244.3C1150.9 244.3 1157.5 244.3 1157.5 251.4V254.4H1148.4C1132 254.4 1124.3 259.7 1124.3 271 1124.3 280.6 1131.3 286.3 1143.2 286.3A60.9 60.9 0 0 0 1156.2 284.6L1156.5 284.6 1156.7 284.6 1158.1 284.8C1162.8 285.7 1167.5 286.5 1172.2 287.4V250.6C1172.2 238.5 1165 232.5 1150.9 232.5M1095.4 232.6A39.8 39.8 0 0 0 1079.4 236.2L1078.8 236.5 1078.3 236A24.2 24.2 0 0 0 1063.9 232.6 58.7 58.7 0 0 0 1047 235.1C1042 236.7 1040 239.1 1040 243.6V285.7H1055.7V246.8L1056.5 246.5A20 20 0 0 1 1063.4 245.3 6.2 6.2 0 0 1 1070.3 252.4V285.7H1085.7V251.8A11.4 11.4 0 0 0 1085.2 248.4L1084.7 247.4 1085.8 246.9A18.6 18.6 0 0 1 1093.5 245.3 6.3 6.3 0 0 1 1100.3 252.4V285.7H1115.7V250.9C1115.7 238.6 1109.2 232.7 1095.4 232.7M1260.6 174A53.6 53.6 0 0 1 1251.5 173.1L1250.6 173V150.3A11 11 0 0 0 1250.2 147.1L1249.7 146 1250.7 145.6C1251 145.5 1251.2 145.4 1251.5 145.3L1251.7 145.2 1252.7 144.8A1.5 1.5 0 0 1 1253.1 144.7 36.7 36.7 0 0 1 1261.2 143.8H1261.2C1270.8 143.8 1272 152.4 1272 158.8 1272 171.3 1265.7 174 1260.6 174M1260.6 130.8H1260.2A27.8 27.8 0 0 0 1238.5 138.1 14.7 14.7 0 0 0 1235.7 146.8H1235.7V170.3A6.9 6.9 0 0 1 1235.2 173.3L1234.7 174.2H1206.2V158H1206.2A24.3 24.3 0 0 0 1181 131.3H1166.6C1166 135.5 1165.5 138.5 1165 142.7H1179.2C1186.7 142.7 1190.7 149 1190.7 158.8V175.3L1189.7 174.7A10.9 10.9 0 0 0 1186.3 174.2H1161.7C1161.2 177.4 1160.6 181.4 1159.9 185.5H1235.8C1238.3 185 1241.4 184.5 1244 184.1A42.7 42.7 0 0 0 1259.8 187 25.9 25.9 0 0 0 1287 159 26.1 26.1 0 0 0 1260.6 130.8M1127.6 192.4H1128.3C1144.8 192.4 1152.5 187 1152.5 173.6A17.2 17.2 0 0 0 1133.7 156.2H1118.4A6.5 6.5 0 0 1 1111.2 149.3C1111.2 146.3 1112.3 142.7 1119.7 142.7H1152.9C1153.6 138.4 1154 135.7 1154.6 131.4H1120.2C1104.1 131.4 1096 138.1 1096 149.3S1103.1 166.2 1114.9 166.2H1130.1A7.2 7.2 0 0 1 1137.3 173.6 7.4 7.4 0 0 1 1128.8 181.2H1126.3L1077.7 181.1H1068.9C1061.4 181.1 1056.2 176.7 1056.2 167V160.2C1056.2 150 1060.2 143.6 1068.9 143.6H1083.3C1083.9 139.2 1084.3 136.5 1084.9 132.3H1065.4A24.6 24.6 0 0 0 1040.1 159.3H1040.1V167A23.3 23.3 0 0 0 1065.3 192.3H1079.6L1105.9 192.3H1127.7ZM1266.9 488.1A134.9 134.9 0 1 1 997.1 488.1H997.1A134.9 134.9 0 1 1 1266.9 488.1ZM1132 353.2A135.3 135.3 0 0 1 1266.9 488.1H1266.9A134.9 134.9 0 1 1 997 488.1M1132 353.2A135.3 135.3 0 0 1 1266.9 488.1H1266.9A134.8 134.8 0 0 1 1132 623M950.7 353.2A134.9 134.9 0 0 0 952.1 623 136.5 136.5 0 0 0 1042.8 588H1042.8A128.3 128.3 0 0 0 1056.3 573.8H1028.5A164.7 164.7 0 0 1 1018.5 560.2H1066.3A91.4 91.4 0 0 0 1074.2 545.9H1010.7A85.1 85.1 0 0 1 1004.9 531.6H1079.2A141.7 141.7 0 0 0 1086.3 488.8 184.3 184.3 0 0 0 1083.5 460.2H1000.6A104.3 104.3 0 0 1 1004.2 446H1078.4A85.1 85.1 0 0 0 1072.7 431.7H1009.9A141.6 141.6 0 0 1 1017.8 417.4H1065.6A67.9 67.9 0 0 0 1054.9 403.1H1028.5A121.7 121.7 0 0 1 1042 389.5 131.7 131.7 0 0 0 951.4 354.6C951.4 353.2 951.4 353.2 950.7 353.2ZM817.2 488.1A134.8 134.8 0 0 0 952.1 623 136.5 136.5 0 0 0 1042.7 588H1042.7A128.3 128.3 0 0 0 1056.3 573.8H1028.5A164.7 164.7 0 0 1 1018.5 560.2H1066.3A91.5 91.5 0 0 0 1074.2 545.9H1010.7A85.1 85.1 0 0 1 1004.9 531.6H1079.2A141.8 141.8 0 0 0 1086.3 488.8 184.3 184.3 0 0 0 1083.5 460.2H1000.6A104.3 104.3 0 0 1 1004.1 445.9H1078.4A85.1 85.1 0 0 0 1072.7 431.6H1009.9A141.6 141.6 0 0 1 1017.8 417.3H1065.6A67.9 67.9 0 0 0 1054.9 403.1H1028.5A121.7 121.7 0 0 1 1042 389.5 131.7 131.7 0 0 0 951.4 354.5H950.7M952.1 623A136.5 136.5 0 0 0 1042.8 588H1042.8A128.3 128.3 0 0 0 1056.3 573.8H1028.5A164.7 164.7 0 0 1 1018.5 560.2H1066.3A91.4 91.4 0 0 0 1074.2 545.9H1010.6A85.1 85.1 0 0 1 1004.9 531.6H1079.1A141.7 141.7 0 0 0 1086.3 488.8 184.3 184.3 0 0 0 1083.4 460.2H1000.7A104.3 104.3 0 0 1 1004.2 446H1078.5A85.1 85.1 0 0 0 1072.8 431.7H1009.9A141.6 141.6 0 0 1 1017.8 417.4H1065.6A67.9 67.9 0 0 0 1054.9 403.1H1028.5A121.7 121.7 0 0 1 1042 389.5 131.7 131.7 0 0 0 951.4 354.6H950.7M999.9 522.4L1002.1 510.2A30.9 30.9 0 0 1 998.5 511C993.5 511 992.8 508.1 993.5 506.6L997.9 481.6H1005.7L1007.9 468.1H1000.8L1002.2 459.5H987.9S979.3 506.6 979.3 512.3A10.7 10.7 0 0 0 990.8 524.5 21.9 21.9 0 0 0 999.9 522.4ZM1004.9 499.5A22.7 22.7 0 0 0 1029.9 524.5 37 37 0 0 0 1044.9 522.3L1047.7 508.8A42.8 42.8 0 0 1 1032.7 512.3C1017 512.3 1019.9 500.9 1019.9 500.9H1049.2A92.5 92.5 0 0 0 1051.3 488.1 19.3 19.3 0 0 0 1030.6 467.4C1015.6 466 1004.9 481.7 1004.9 499.5ZM1029.9 478.8C1037.7 478.8 1036.4 488.1 1036.4 488.8H1020.7C1020.6 488.1 1022 478.8 1029.9 478.8ZM1120.6 522.3L1123.4 506.7A35.1 35.1 0 0 1 1111.3 510.2C1101.3 510.2 1097 502.4 1097 493.8 1097 476.7 1105.6 467.4 1115.6 467.4A23.9 23.9 0 0 1 1128.4 471.7L1130.6 456.7A50.2 50.2 0 0 0 1114.2 453.2C1097.8 453.2 1081.3 467.5 1081.3 494.5 1081.3 512.3 1089.9 524.5 1107 524.5A64.1 64.1 0 0 0 1120.6 522.3ZM921.4 466A50.6 50.6 0 0 0 904.3 468.8L902.1 480.9A42.2 42.2 0 0 1 917.8 478.1C922.8 478.1 927.1 478.8 927.1 483.1 927.1 485.9 926.3 486.7 926.3 486.7H919.8C907.7 486.7 894.1 491.7 894.1 508.1 894.1 520.9 902.7 523.8 907.7 523.8A21.5 21.5 0 0 0 922.7 517.2L922 523H934.8L940.5 483.7A16.9 16.9 0 0 0 921.4 466ZM924.2 498.1C924.2 500.3 922.8 511.7 914.2 511.7A5.6 5.6 0 0 1 908.5 505.9C908.5 502.4 910.7 497.4 921.4 497.4A11.3 11.3 0 0 0 924.2 498.1ZM954.2 523.8A18.3 18.3 0 0 0 975.6 505.2C975.6 487.4 958.5 490.9 958.5 483.8 958.5 480.2 961.3 478.8 966.3 478.8 968.5 478.8 976.3 479.5 976.3 479.5L978.5 466.7A54.2 54.2 0 0 0 965 465.2C954.2 465.2 943.5 469.6 943.5 483.8 943.5 500.2 961.4 498.8 961.4 505.2 961.4 509.6 956.4 510.2 952.8 510.2A46.7 46.7 0 0 1 940 508L937.8 520.9C938.5 522.3 942.2 523.8 954.2 523.8ZM1239.1 454.5L1236.2 473.8A19.8 19.8 0 0 0 1222.7 466.7C1209.8 466.7 1198.4 482.4 1198.4 501 1198.4 512.4 1204.1 524.5 1216.2 524.5A19.1 19.1 0 0 0 1229.8 518.8L1229.1 523.8H1243.4L1254.1 455.3ZM1232.5 492.4C1232.5 500.2 1229 510.2 1221.1 510.2 1216.1 510.2 1213.3 505.9 1213.3 498.8 1213.3 487.4 1218.3 480.2 1224.7 480.2 1229.8 480.2 1232.6 483.8 1232.6 492.4ZM843.6 523.1L852.2 471.7 853.6 523.1H863.6L882.2 471.7 874.3 523.1H889.3L900.7 454.5H877.1L862.8 496.7 862.1 454.5H841.4L830 523.1ZM1064.9 523.1C1069.2 499.5 1069.9 480.2 1079.9 483.8A56.1 56.1 0 0 1 1084.9 467.4H1082C1075.5 467.4 1070.6 476 1070.6 476L1072 468.1H1058.5L1049.2 523.8H1064.9ZM1153.4 466A50.6 50.6 0 0 0 1136.3 468.8L1134.1 480.9A42.2 42.2 0 0 1 1149.8 478.1C1154.8 478.1 1159.1 478.8 1159.1 483.1 1159.1 485.9 1158.4 486.7 1158.4 486.7H1151.8C1139.7 486.7 1126.2 491.7 1126.2 508.1 1126.2 520.9 1134.7 523.8 1139.7 523.8A21.5 21.5 0 0 0 1154.7 517.2L1154 523H1166.8L1172.6 483.7A16.7 16.7 0 0 0 1153.4 466ZM1157 498.1C1157 500.3 1155.5 511.7 1147 511.7A5.6 5.6 0 0 1 1141.3 505.9C1141.3 502.4 1143.4 497.4 1154.1 497.4 1156.3 498.1 1156.3 498.1 1157 498.1ZM1184.8 523.1C1189.2 499.5 1189.8 480.2 1199.8 483.8A56 56 0 0 1 1204.8 467.4H1202C1195.4 467.4 1190.5 476 1190.5 476L1192 468.1H1178.4L1169.1 523.8H1184.8ZM977.8 512.4A10.7 10.7 0 0 0 989.2 524.5 27.2 27.2 0 0 0 999.9 522.3L1002.1 510.2A30.9 30.9 0 0 1 998.5 510.9C993.5 510.9 992.8 508.1 993.5 506.6L997.9 481.6H1005.7L1007.9 468H1000.8L1002.2 459.5M1012.1 499.5C1012.1 519.5 1018.6 524.5 1029.9 524.5A37 37 0 0 0 1044.9 522.3L1047.8 508.8A42.8 42.8 0 0 1 1032.8 512.3C1017.1 512.3 1019.9 500.9 1019.9 500.9H1049.2A92.5 92.5 0 0 0 1051.3 488.1 19.3 19.3 0 0 0 1030.7 467.4C1015.6 466 1012.1 481.7 1012.1 499.5ZM1029.9 478.8C1037.8 478.8 1039.2 488.1 1039.2 488.8H1020.6C1020.6 488.1 1022.1 478.8 1029.9 478.8ZM1120.6 522.3L1123.4 506.7A35.1 35.1 0 0 1 1111.3 510.2C1101.3 510.2 1097 502.4 1097 493.8 1097 476.7 1105.6 467.4 1115.6 467.4A23.9 23.9 0 0 1 1128.4 471.7L1130.6 456.7A50.2 50.2 0 0 0 1114.2 453.2C1097.8 453.2 1088.5 467.5 1088.5 494.5 1088.5 512.3 1089.9 524.5 1107 524.5A64.1 64.1 0 0 0 1120.6 522.3ZM902.1 481.7A42.2 42.2 0 0 1 917.8 478.8C922.8 478.8 927.1 479.5 927.1 483.8 927.1 486.7 926.4 487.4 926.4 487.4H919.8C907.7 487.4 894.2 492.4 894.2 508.8 894.2 521.7 902.7 524.5 907.7 524.5A21.5 21.5 0 0 0 922.7 518L922 523.7H934.8L940.6 484.4C940.6 468 926.3 467.3 920.6 467.3M931.3 498A23.4 23.4 0 0 1 914.2 511.6 5.6 5.6 0 0 1 908.5 505.8C908.5 502.3 910.6 497.3 921.3 497.3A58.3 58.3 0 0 0 931.4 498.1ZM938.5 522.3A60.4 60.4 0 0 0 954.9 523.8 18.3 18.3 0 0 0 976.3 505.2C976.3 487.4 959.2 490.9 959.2 483.8 959.2 480.2 962.1 478.8 967.1 478.8 969.2 478.8 977.1 479.5 977.1 479.5L979.2 466.7A54.2 54.2 0 0 0 965.7 465.2C955 465.2 951.4 469.6 951.4 483.8 951.4 500.2 962.1 498.8 962.1 505.2 962.1 509.6 957.1 510.2 953.5 510.2M1236.2 473.8A19.8 19.8 0 0 0 1222.7 466.7C1209.8 466.7 1205.5 482.4 1205.5 501 1205.5 512.4 1204.1 524.5 1216.2 524.5A19.1 19.1 0 0 0 1229.8 518.8L1229.1 523.8H1243.4L1254.1 455.3M1235.5 492.4C1235.5 500.3 1229 510.3 1221.2 510.3 1216.2 510.3 1213.4 505.9 1213.4 498.8 1213.4 487.4 1218.4 480.3 1224.8 480.3A10.9 10.9 0 0 1 1235.5 492.4ZM843.6 523.1L852.2 471.7 853.6 523.1H863.6L882.2 471.7 874.3 523.1H889.3L900.7 454.5H882.8L862.9 496.7 862.2 454.5H854.3L830 523.1ZM1049.9 523.1H1064.9C1069.2 499.5 1069.9 480.2 1079.9 483.8A56 56 0 0 1 1084.9 467.4H1082C1075.5 467.4 1070.6 476 1070.6 476L1072.1 468.1M1134.1 481.7A42.2 42.2 0 0 1 1149.8 478.8C1154.8 478.8 1159.1 479.5 1159.1 483.8 1159.1 486.7 1158.4 487.4 1158.4 487.4H1151.9C1139.7 487.4 1126.2 492.4 1126.2 508.8 1126.2 521.7 1134.7 524.5 1139.7 524.5A21.5 21.5 0 0 0 1154.7 518L1154 523.7H1166.9L1172.6 484.4C1172.6 468 1158.3 467.3 1152.6 467.3M1163.3 498A23.4 23.4 0 0 1 1146.2 511.6 5.6 5.6 0 0 1 1140.5 505.8C1140.5 502.3 1142.7 497.3 1153.3 497.3A62.8 62.8 0 0 0 1163.4 498.1ZM1169.8 523.1H1184.8C1189.2 499.5 1189.8 480.2 1199.8 483.8A56.1 56.1 0 0 1 1204.8 467.4H1202C1195.5 467.4 1190.6 476 1190.6 476L1192 468.1M440.6 102.4C438.6 108.2 405 200.6 393.7 231.3H393.7A0.6 0.6 0 0 1 393.7 231.5 15.2 15.2 0 0 1 380.5 241H362.5C373.4 211.2 398.5 142.3 413 102.4ZM734.2 171.7L722.6 203.4A15.5 15.5 0 0 1 709.2 213.3H690A51.2 51.2 0 0 0 694.9 203.4L706.5 171.7H678.7L667.2 203.4A15.6 15.6 0 0 1 653.8 213.3H634.6A50 50 0 0 0 639.5 203.4L651 171.7H623.3L611.7 203.4A15.5 15.5 0 0 1 598.3 213.3H509.7A48.6 48.6 0 0 0 514.7 203.6L517.6 195.5A25.5 25.5 0 0 0 493.7 157.8H462.2L452.1 185.6H483.7A6.7 6.7 0 0 1 490 195.5L486.9 203.6A15.2 15.2 0 0 1 473.5 213.3H427.9L417.8 241H699.4A59 59 0 0 0 750.3 203.6L762 171.7ZM297.1 241H223.8L233.9 213.3H307.2A15.7 15.7 0 0 0 320.7 203.4L323.5 195.5A6.7 6.7 0 0 0 317.2 185.6H271.7L281.8 157.8H327.3A25.5 25.5 0 0 1 351.2 195.5L348.3 203.4A59.6 59.6 0 0 1 297 241M396 561.7L421.6 417.2H461.8L436.9 561.7ZM396 561.7L428.9 417.2H461.8L436.9 561.7ZM582.2 418.9A101.8 101.8 0 0 0 545.2 412.4C505.1 412.4 476.2 432.4 476.2 461.3 476.2 483.1 496.3 494.2 512.3 501.5S533.2 513.5 533.2 519.9C533.2 529.5 520.3 534.4 509.1 534.4A87.2 87.2 0 0 1 470.6 526.3L465 523.9 459.4 556.8A130.1 130.1 0 0 0 505 564.9C547.6 564.9 575.7 544.8 575.7 514.3 575.7 497.5 565.2 484.6 541.1 474.2 526.7 467 517.8 462.9 517.8 455.7 517.8 449.2 525.1 442.9 541.1 442.9A73.6 73.6 0 0 1 571.6 448.5L575.6 450.1 582.1 418.8ZM582.2 418.9A101.8 101.8 0 0 0 545.2 412.4C505.1 412.4 483.4 432.4 483.4 461.3A42 42 0 0 0 512.3 501.5C528.3 508.7 533.2 513.5 533.2 519.9 533.2 529.5 520.3 534.4 509.1 534.4A87.2 87.2 0 0 1 470.6 526.3L465 523.9 459.4 556.8A130.1 130.1 0 0 0 505 564.9C547.6 564.9 575.7 544.8 575.7 514.3 575.7 497.5 565.2 484.6 541.1 474.2 526.7 467 517.8 462.9 517.8 455.7 517.8 449.2 525.1 442.9 541.1 442.9A73.6 73.6 0 0 1 571.6 448.5L575.6 450.1 582.1 418.8ZM651.2 417.2C641.6 417.2 634.3 418 630.3 427.6L570.1 561.7H613.5L621.5 537.6H672.9L677.7 561.7H716.2L682.5 417.2ZM632.7 513.5C635.2 506.3 648.8 471 648.8 471S652 462.1 654.4 456.5L656.8 470.2S664.8 506.3 666.4 514.3H632.7ZM660.8 417.2C651.2 417.2 644 418 640 427.6L570.1 561.7H613.5L621.5 537.6H672.9L677.7 561.7H716.2L682.5 417.2ZM632.7 513.5C636 505.5 648.8 471 648.8 471S652 462.1 654.4 456.5L656.8 470.2S664.8 506.3 666.4 514.3H632.7ZM322.1 518.3L318.1 497.4A116.3 116.3 0 0 0 261.9 434L298 562.4H341.4L406.4 418H363.1ZM322.1 518.3L318.1 497.4A116.3 116.3 0 0 0 261.9 434L298 562.4H341.4L406.4 418H371.1ZM210.6 417.2L217.8 418.8A135.3 135.3 0 0 1 318.1 497.5L303.7 429.2C301.2 419.6 294 417.2 285.2 417.2ZM210.6 417.2H210.6C261.9 429.2 304.5 460.5 318.1 496.7L304.5 439.7A19.6 19.6 0 0 0 285.2 424.5ZM210.6 417.2H210.6C261.9 429.2 304.5 460.5 318.1 496.7L308.5 465.3A28.3 28.3 0 0 0 291.6 442.1ZM362.3 513.5L335 486.2 322.1 516.7 318.9 496.6A116.3 116.3 0 0 0 262.7 433.2L298.8 561.7H342.2ZM436.9 561.7L402.5 526.3 396 561.7ZM529.2 511.9H529.2C532.4 515.1 534 517.5 533.2 520.7 533.2 530.3 520.4 535.2 509.1 535.2A87.2 87.2 0 0 1 470.6 527.2L465 524.7 459.4 557.5A130.1 130.1 0 0 0 505 565.6 79.5 79.5 0 0 0 563.7 545.5ZM575.8 561.7H613.5L621.5 537.6H672.9L677.7 561.7H716.2L702.5 503 654.4 456.4 656.8 469.3S664.8 505.4 666.4 513.4H632.7C635.9 505.4 648.8 470.9 648.8 470.9S652 462 654.4 456.4M745.6 844.7A15.6 15.6 0 0 1 730 829.2V747.1A15.6 15.6 0 0 1 761.2 747.1V829.2A15.6 15.6 0 0 1 745.6 844.7ZM803.2 844.7A15.6 15.6 0 0 1 787.7 829.2V747.1A15.6 15.6 0 1 1 818.8 747.1V829.2A15.6 15.6 0 0 1 803.2 844.7ZM860.9 844.7A15.6 15.6 0 0 1 845.3 829.2V747.1A15.6 15.6 0 1 1 876.4 747.1V829.2A15.6 15.6 0 0 1 860.9 844.7ZM210.1 698.8A18 18 0 0 1 228.3 680.6 18.2 18.2 0 0 1 246.8 698.8 18.4 18.4 0 0 1 228.3 717.3 18.2 18.2 0 0 1 210.1 698.8ZM214.2 740.7A5.1 5.1 0 0 1 219.3 735.6H238A5.1 5.1 0 0 1 243.1 740.7V837.2A5.3 5.3 0 0 1 238 842.3H219.3A5.3 5.3 0 0 1 214.2 837.2ZM260 740.6A5.1 5.1 0 0 1 265.1 735.5H273.8A4.1 4.1 0 0 1 278.1 738.8L282.1 748.7A43.1 43.1 0 0 1 316.5 733.2C350.5 733.2 359.3 756.1 359.3 782V837.2A5.3 5.3 0 0 1 354.2 842.3H335.5A5.1 5.1 0 0 1 330.4 837.2V782C330.4 768.1 324.9 759.6 311.9 759.6A23.5 23.5 0 0 0 288.8 776.2V837.2C288.8 841.2 287.2 842.3 282.1 842.3H265A5.3 5.3 0 0 1 259.9 837.2ZM371.8 835.2A4.7 4.7 0 0 1 370.5 829.4L377.4 815.5A4 4 0 0 1 383.6 813.7 43.2 43.2 0 0 0 407.2 820.6C415.3 820.6 419 817.6 419 813S413 803.7 398.9 798.2C378.3 790.3 369.1 780.6 369.1 764.4S381.3 733.2 407.4 733.2A58.1 58.1 0 0 1 439.1 741.1 6 6 0 0 1 441.4 748.5L435.4 760.7A5.3 5.3 0 0 1 428.7 762.9 51.1 51.1 0 0 0 407.4 757.6C400.3 757.6 397.3 761 397.3 764.5 397.3 769.4 402.6 771.9 412.5 776.1 433 784.4 447.8 791.8 447.8 813 447.8 829.9 433.5 844.9 406.7 844.9A59.7 59.7 0 0 1 371.8 835.2ZM465 761.4H454.6A5.1 5.1 0 0 1 449.7 756.3V740.6A4.8 4.8 0 0 1 454.6 735.5H465V706A5.3 5.3 0 0 1 470.1 700.9H489A4.9 4.9 0 0 1 493.9 706V735.5H518.8A5 5 0 0 1 523.9 740.6V756.3A5.3 5.3 0 0 1 518.8 761.4H493.8V809.6C493.8 816.8 497.3 818.3 502.5 818.3A70.6 70.6 0 0 0 518.7 814.8 4.1 4.1 0 0 1 524.7 817.6L527.7 831.7A5.2 5.2 0 0 1 524.7 837.9 84.4 84.4 0 0 1 494.7 844.9C470.8 844.9 464.8 828.9 464.8 810.4ZM570.3 774.8A78.3 78.3 0 0 1 590.9 777.8C591.3 764.2 587.4 757.7 576.1 757.7A133.7 133.7 0 0 0 546.1 761.7C542.6 762.8 540.5 760.3 540.1 757L537.8 745A4.9 4.9 0 0 1 541.2 738.5 134.9 134.9 0 0 1 577.7 733.2C611 733.2 618 750.6 618 779.6V837.2A5.1 5.1 0 0 1 612.9 842.2H605C603.2 842.2 601.8 841.5 600.4 838.5L597.4 831.4A46.8 46.8 0 0 1 563.9 844.8 34 34 0 0 1 527.8 808.3C527.8 789.4 543.3 774.8 570.3 774.8ZM571 823.3A22.9 22.9 0 0 0 590.2 812V796.3A42.5 42.5 0 0 0 574.5 793.1C562.2 793.1 555.5 798.8 555.5 808.3A14.1 14.1 0 0 0 571 823.4ZM634.1 685.7A5.5 5.5 0 0 1 639.2 680.6H657.9A5.5 5.5 0 0 1 663 685.7V837.2A5.3 5.3 0 0 1 657.9 842.3H639.2A5.3 5.3 0 0 1 634.1 837.2ZM680.3 685.7A5.5 5.5 0 0 1 685.4 680.6H704.1A5.5 5.5 0 0 1 709.2 685.7V837.2A5.3 5.3 0 0 1 704.1 842.3H685.4A5.3 5.3 0 0 1 680.3 837.2ZM944.7 733.2A47.8 47.8 0 0 1 993.7 782.7C993.7 784.3 993.4 788 993.2 789.6A5.4 5.4 0 0 1 988.1 794.5H919.7A25.7 25.7 0 0 0 946.3 819.2 35.4 35.4 0 0 0 969.2 811.4C971.7 809.2 974.5 809.1 976.1 811.4L985.1 823.4A4.5 4.5 0 0 1 984.7 830.3 60.3 60.3 0 0 1 944.9 844.9 55.8 55.8 0 0 1 944.7 733.3ZM964.5 775.5A19.6 19.6 0 0 0 944 757 21.2 21.2 0 0 0 921.3 775.5ZM1002.7 740.6A5.1 5.1 0 0 1 1007.8 735.5H1016.5A4.1 4.1 0 0 1 1020.8 738.8L1024.7 748.7A43.1 43.1 0 0 1 1059.2 733.2C1093.2 733.2 1101.9 756.1 1101.9 782V837.2A5.3 5.3 0 0 1 1096.8 842.3H1078.1A5.1 5.1 0 0 1 1073 837.2V782C1073 768.1 1067.5 759.6 1054.6 759.6A23.5 23.5 0 0 0 1031.5 776.2V837.2C1031.5 841.2 1029.8 842.3 1024.8 842.3H1007.7A5.3 5.3 0 0 1 1002.6 837.2ZM1124 761.4H1113.6A5.1 5.1 0 0 1 1108.7 756.3V740.6A4.8 4.8 0 0 1 1113.6 735.5H1124V706A5.3 5.3 0 0 1 1129.1 700.9H1148A4.9 4.9 0 0 1 1152.9 706V735.5H1177.8A5 5 0 0 1 1182.9 740.6V756.3A5.3 5.3 0 0 1 1177.8 761.4H1152.9V809.6C1152.9 816.8 1156.3 818.3 1161.6 818.3A70.6 70.6 0 0 0 1177.7 814.8 4.1 4.1 0 0 1 1183.7 817.6L1186.7 831.7A5.2 5.2 0 0 1 1183.7 837.9 84.3 84.3 0 0 1 1153.7 844.9C1129.9 844.9 1123.9 828.9 1123.9 810.4ZM1191 835.2A4.7 4.7 0 0 1 1189.6 829.4L1196.5 815.5A4 4 0 0 1 1202.8 813.7 43.2 43.2 0 0 0 1226.3 820.6C1234.4 820.6 1238.1 817.6 1238.1 813S1232.1 803.7 1218 798.2C1197.5 790.3 1188.2 780.6 1188.2 764.4S1200.5 733.2 1226.6 733.2A58.1 58.1 0 0 1 1258.2 741.1 6 6 0 0 1 1260.5 748.5L1254.5 760.7A5.3 5.3 0 0 1 1247.8 762.9 51.1 51.1 0 0 0 1226.6 757.6C1219.4 757.6 1216.4 761 1216.4 764.5 1216.4 769.4 1221.7 771.9 1231.6 776.1 1252.2 784.4 1267 791.8 1267 813 1267 829.9 1252.7 844.9 1225.8 844.9A59.7 59.7 0 0 1 1191 835.2ZM892.2 863A0.8 0.8 0 0 1 893 862.2H901.7A8.9 8.9 0 1 1 901.7 879.9H895.2V889.3A0.8 0.8 0 0 1 894.4 890H892.9A0.8 0.8 0 0 1 892.2 889.3ZM901.6 877A5.9 5.9 0 0 0 907.6 870.9 5.7 5.7 0 0 0 901.6 865.2H895.3V877ZM922.3 871.3A9.6 9.6 0 1 1 913.1 880.8 9.5 9.5 0 0 1 922.3 871.3ZM922.3 887.8A7 7 0 1 0 916 880.8 6.5 6.5 0 0 0 922.3 887.8ZM947.1 876.2L941.7 890A0.7 0.7 0 0 1 940.9 890.5H940.7A0.8 0.8 0 0 1 939.9 890L934.8 872.6C934.6 872 934.8 871.5 935.5 871.5H936.8A0.8 0.8 0 0 1 937.7 872.1L941 884.5H941L946.2 871.5A0.8 0.8 0 0 1 947 871.1H947.2A0.8 0.8 0 0 1 948 871.5L953.1 884.5H953.1L956.5 872A0.7 0.7 0 0 1 957.3 871.5H958.8C959.5 871.5 959.7 871.9 959.5 872.5L954.5 889.9A0.8 0.8 0 0 1 953.7 890.4H953.5A0.9 0.9 0 0 1 952.7 889.9L947.1 876.2ZM971.7 871.3A8.1 8.1 0 0 1 980 879.6 10.1 10.1 0 0 1 980 880.7 0.8 0.8 0 0 1 979.2 881.5H965.8A6.5 6.5 0 0 0 971.8 887.8 8.5 8.5 0 0 0 976.8 886.3C977.5 885.8 977.7 885.7 978.2 886.4L978.7 887C979.1 887.6 979.2 887.8 978.5 888.3A11.3 11.3 0 0 1 971.8 890.5 9.6 9.6 0 0 1 971.8 871.3ZM977.1 879.2A5.4 5.4 0 0 0 971.7 873.9 6 6 0 0 0 965.8 879.2ZM984.7 872.5A0.9 0.9 0 0 1 985.6 871.7H986.2A0.8 0.8 0 0 1 987 872.3L987.3 873.6A7.3 7.3 0 0 1 993 871.3C994.4 871.3 996.6 871.5 996.2 872.7L995.7 874.2A0.7 0.7 0 0 1 994.6 874.6 4.6 4.6 0 0 0 992.6 874.1 5.8 5.8 0 0 0 987.7 876.4V889.2A0.9 0.9 0 0 1 986.8 890H985.6A0.9 0.9 0 0 1 984.7 889.2ZM1007.3 871.3A8.1 8.1 0 0 1 1015.6 879.6 9.8 9.8 0 0 1 1015.6 880.7 0.8 0.8 0 0 1 1014.8 881.5H1001.4A6.5 6.5 0 0 0 1007.4 887.8 8.5 8.5 0 0 0 1012.4 886.3C1013 885.8 1013.3 885.7 1013.8 886.4L1014.3 887C1014.6 887.6 1014.8 887.8 1014.1 888.3A11.3 11.3 0 0 1 1007.4 890.5 9.6 9.6 0 0 1 1007.4 871.3ZM1012.7 879.2A5.4 5.4 0 0 0 1007.3 873.9 6 6 0 0 0 1001.4 879.2ZM1028 871.3A11.3 11.3 0 0 1 1033.1 872.4V863.1A0.9 0.9 0 0 1 1033.9 862.2H1035A1 1 0 0 1 1036 863.1V889.2A0.9 0.9 0 0 1 1035 890H1034.3C1033.9 890 1033.7 889.7 1033.5 889.3L1033.3 888.1A8.8 8.8 0 0 1 1027.5 890.5 9 9 0 0 1 1019.3 880.8 8.7 8.7 0 0 1 1028 871.3ZM1027.9 887.8A6.8 6.8 0 0 0 1033.1 884.8V875A12.1 12.1 0 0 0 1028.4 873.9 6.3 6.3 0 0 0 1022.2 880.8 6.4 6.4 0 0 0 1027.9 887.8ZM1051.7 863.1A0.9 0.9 0 0 1 1052.6 862.2H1053.8A0.9 0.9 0 0 1 1054.6 863.1V872.4A11.1 11.1 0 0 1 1059.7 871.3 8.7 8.7 0 0 1 1068.4 880.8 9 9 0 0 1 1060.2 890.5 8 8 0 0 1 1054.4 888.1L1054.2 889.3A0.8 0.8 0 0 1 1053.3 890H1052.6A0.9 0.9 0 0 1 1051.8 889.2ZM1059.8 887.8A6.3 6.3 0 0 0 1065.4 880.8 6.3 6.3 0 0 0 1059.3 873.9 10.9 10.9 0 0 0 1054.6 875.1V884.8A6.8 6.8 0 0 0 1059.7 887.8ZM1071.1 872.7C1070.8 872.1 1071.1 871.7 1071.8 871.7H1073.5A0.8 0.8 0 0 1 1074.3 872.2L1079.5 886.8H1079.5L1085.7 872.2A0.8 0.8 0 0 1 1086.5 871.7H1088C1088.7 871.7 1089 872.1 1088.7 872.7L1077.2 898.9A1 1 0 0 1 1076.4 899.5H1075C1074.3 899.5 1073.9 899 1074.2 898.4L1077.8 890ZM1102.1 863A0.8 0.8 0 0 1 1102.8 862.2H1111.5A8.9 8.9 0 1 1 1111.5 879.9H1105V889.3A0.8 0.8 0 0 1 1104.3 890H1102.8A0.8 0.8 0 0 1 1102 889.3ZM1111.4 877A5.9 5.9 0 0 0 1117.5 870.9 5.7 5.7 0 0 0 1111.4 865.2H1105.1V877ZM1120.4 889L1132.5 862.2A0.7 0.7 0 0 1 1133.2 861.8H1133.6A0.7 0.7 0 0 1 1134.2 862.2L1146.2 889A0.7 0.7 0 0 1 1145.6 890H1144A0.7 0.7 0 0 1 1143.3 889.6L1140.4 883H1126.3L1123.4 889.6A0.7 0.7 0 0 1 1122.7 890H1121.1A0.7 0.7 0 0 1 1120.4 889ZM1139.3 880.6C1137.3 876.2 1135.4 871.9 1133.5 867.5H1133.2L1127.3 880.6ZM1154.2 876.7L1144.6 863.4A0.7 0.7 0 0 1 1145.2 862.3H1147.1A0.8 0.8 0 0 1 1147.7 862.6L1155.8 873.7 1163.8 862.6A0.8 0.8 0 0 1 1164.4 862.3H1166.3A0.7 0.7 0 0 1 1166.9 863.4L1157.2 876.7V889.3A0.8 0.8 0 0 1 1156.5 890.1H1154.9A0.8 0.8 0 0 1 1154.2 889.3ZM1171 863A0.8 0.8 0 0 1 1171.7 862.2H1187.4A0.8 0.8 0 0 1 1188.1 863V864.1A0.8 0.8 0 0 1 1187.4 864.9H1174V875.7H1185.4A0.8 0.8 0 0 1 1186.2 876.5V877.7A0.8 0.8 0 0 1 1185.4 878.4H1174V889.3A0.8 0.8 0 0 1 1173.3 890H1171.7A0.8 0.8 0 0 1 1171 889.3ZM1205.5 861.8A14.3 14.3 0 1 1 1191.2 876.2 14.3 14.3 0 0 1 1205.5 861.8ZM1205.5 887.6A11.5 11.5 0 1 0 1194 876.2 11.5 11.5 0 0 0 1205.5 887.6ZM1225.6 863A0.8 0.8 0 0 1 1226.4 862.2H1236.7A8.5 8.5 0 0 1 1245.3 870.7 8.9 8.9 0 0 1 1239.5 878.8L1244.9 888.8A0.8 0.8 0 0 1 1244.2 890H1242.3A0.8 0.8 0 0 1 1241.4 889.4L1236.3 879.1H1228.7V889.3A0.8 0.8 0 0 1 1227.9 890H1226.4A0.8 0.8 0 0 1 1225.6 889.3ZM1236.5 876.5A5.7 5.7 0 1 0 1236.5 865.1H1228.8V876.5ZM1256.1 864.9H1249.2A0.8 0.8 0 0 1 1248.4 864.1V863A0.8 0.8 0 0 1 1249.2 862.2H1266A0.8 0.8 0 0 1 1266.8 863V864.1A0.8 0.8 0 0 1 1266 864.9H1259.1V889.3A0.8 0.8 0 0 1 1258.3 890H1256.8A0.8 0.8 0 0 1 1256.1 889.3Z", + "width": 1478 + }, + "search": [ + "online_payment_icon" + ] + }, + { + "uid": "3238628d101e2f79eeaaf407332b3052", + "css": "vital_sign_icon", + "code": 59405, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1145 758.4A14.1 14.1 0 0 0 1130.9 772.5 51.9 51.9 0 0 1 1079 824.3H275.7A51.9 51.9 0 0 1 223.9 772.4V232.3A51.9 51.9 0 0 1 275.7 180.5H725.2A14.1 14.1 0 0 0 725.2 152.2H275.7A80.2 80.2 0 0 0 195.7 232.3V772.4A80.2 80.2 0 0 0 275.7 852.5H1079A80.2 80.2 0 0 0 1159.1 772.4 14.1 14.1 0 0 0 1145 758.4ZM1079 152.2H792.5A14.1 14.1 0 0 0 792.5 180.4H1079A51.9 51.9 0 0 1 1130.8 232.3V704.7A14.1 14.1 0 0 0 1159.1 704.7V232.3A80.2 80.2 0 0 0 1079 152.2ZM907.5 585V300.1A36.8 36.8 0 0 0 870.8 263.3H477A14.1 14.1 0 1 0 477 291.6H870.7A8.5 8.5 0 0 1 879.2 300.1V421.1H821.6L799.2 398.7A19.8 19.8 0 0 0 771.2 398.7L712 458 689.3 435.3A19.8 19.8 0 0 0 661.3 435.3L622.9 473.6 521.1 371.8A19.8 19.8 0 0 0 493.1 371.8L443.8 421.1H352.5V300.1A8.5 8.5 0 0 1 361 291.6H406.6A14.1 14.1 0 1 0 406.6 263.3H361A36.8 36.8 0 0 0 324.2 300.1V585A36.8 36.8 0 0 0 361 621.8H870.7A36.8 36.8 0 0 0 907.5 585ZM352.6 585V449.3H447.3A19.6 19.6 0 0 0 461.3 443.5L507.1 397.8 608.9 499.6A19.8 19.8 0 0 0 636.9 499.6L675.2 461.2 697.9 484A19.8 19.8 0 0 0 725.9 484L785.2 424.7 804 443.6A19.6 19.6 0 0 0 818 449.4H879.2V585.1A8.5 8.5 0 0 1 870.7 593.5H361.1A8.5 8.5 0 0 1 352.6 585.1ZM637.6 716.5A57.6 57.6 0 1 0 695.2 658.9 57.7 57.7 0 0 0 637.6 716.5ZM724.5 716.5A29.3 29.3 0 1 1 695.2 687.2 29.4 29.4 0 0 1 724.5 716.5ZM431.7 696.3A57.6 57.6 0 1 0 431.7 736.6 57.6 57.6 0 1 0 431.7 696.3ZM377.8 745.8A29.3 29.3 0 1 1 407.1 716.5 29.4 29.4 0 0 1 377.8 745.8ZM515 716.5A29.3 29.3 0 1 1 485.7 687.2 29.4 29.4 0 0 1 515 716.5Z", + "width": 1348 + }, + "search": [ + "vital_sign_icon" + ] + }, + { + "uid": "e714a92298dafff5fead849df18d449b", + "css": "weight_icon", + "code": 59406, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M491.7 0A263 263 0 0 1 716.9 127Q794.5 140.1 882.6 162A131.3 131.3 0 0 1 982.2 303.3L922.3 881.9A132 132 0 0 1 791.4 1000.1H191.9A131.6 131.6 0 0 1 61 881.9L1.1 303.2A118.4 118.4 0 0 1 100.7 162Q184.1 141.4 266.3 127A263 263 0 0 1 491.7 0ZM240.1 185.1Q151.9 203.4 113.1 212.9A79.2 79.2 0 0 0 53.5 297.7L113.4 876.5A79.8 79.8 0 0 0 191.9 947.3H791.7A80.5 80.5 0 0 0 870.2 876.5L929.9 297.7A78.8 78.8 0 0 0 870.1 212.9Q817.9 200.2 743.1 185.2A253.9 253.9 0 0 1 754.8 263.2 263.1 263.1 0 0 1 228.5 263.2 252.6 252.6 0 0 1 240.1 185.1ZM491.7 52.5A210.5 210.5 0 1 0 702.2 263.1 211.1 211.1 0 0 0 491.7 52.5ZM491.7 105.1A27 27 0 0 1 518 131.3V262.9A26.3 26.3 0 0 1 491.7 289.2 25.9 25.9 0 0 1 465.4 262.9V131.6A26.3 26.3 0 0 1 491.7 105.1Z", + "width": 983 + }, + "search": [ + "weight_icon" + ] + }, + { + "uid": "48c8955311a2a09660e070396941b78b", + "css": "search_medicine_icon", + "code": 59404, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M442.2 620.3A223.9 223.9 0 1 0 369.1 547.3L195.7 720.8 268.7 793.8ZM559.5 240.6A189.3 189.3 0 1 1 370.2 429.9 189.5 189.5 0 0 1 559.5 240.6ZM389.7 575.4A226.8 226.8 0 0 0 414 599.7L377.3 636.5 353 612.1ZM328.7 636.5L353 660.8 268.7 745.1 244.3 720.8ZM328.7 636.5M571.7 515.1L644.7 442.1A68.8 68.8 0 1 0 547.4 344.7L474.3 417.7A68.8 68.8 0 1 0 571.7 515.1ZM571.7 369.1A34.4 34.4 0 0 1 620.4 417.7L596 442.1 547.4 393.4ZM498.7 442.1L523 417.7 571.7 466.4 547.4 490.8A34.4 34.4 0 0 1 498.7 442.1ZM498.7 442.1", + "width": 1000 + }, + "search": [ + "search_medicine_icon" + ] + }, + { + "uid": "2cfd058dc6a521015f26957251d5f9dd", + "css": "my_medical_file", + "code": 59407, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M730.5 105.5H609.8A88.9 88.9 0 0 0 531.4 58.6H469.3A78.1 78.1 0 0 0 318.2 58.6H256.1A88.9 88.9 0 0 0 177.7 105.5H58.6A58.8 58.8 0 0 0 0 164.1V941.6A58.8 58.8 0 0 0 58.6 1000.1H730.6A58.8 58.8 0 0 0 789.1 941.6V164.1A58.8 58.8 0 0 0 730.5 105.5ZM206.1 147.4A49.8 49.8 0 0 1 256 97.6H335A19.6 19.6 0 0 0 354.6 78.1 39.1 39.1 0 1 1 432.7 78.1 19.6 19.6 0 0 0 452.2 97.6H531.3A50 50 0 0 1 578.2 130.6C578.2 130.8 578.4 131 578.4 131.4A49.6 49.6 0 0 1 581.3 147.7V178.3A21 21 0 0 1 560.2 199.4H227.3A21 21 0 0 1 206.3 178.3ZM656.1 238.3V869.7H133.4V238.3ZM750 941.6A19.6 19.6 0 0 1 730.5 961.1H58.4A19.6 19.6 0 0 1 38.9 941.6V164.1A19.6 19.6 0 0 1 58.4 144.5H167V178.1A58.6 58.6 0 0 0 171 199.2H113.7A19.6 19.6 0 0 0 94.2 218.7V889.1A19.6 19.6 0 0 0 113.7 908.6H675.7A19.6 19.6 0 0 0 695.2 889.1V218.7A19.6 19.6 0 0 0 675.7 199.4H616.4A58.6 58.6 0 0 0 620.3 178.3V144.7H730.5A19.6 19.6 0 0 1 750 164.2ZM407.3 111.1A19.3 19.3 0 0 0 393.4 105.5 20.5 20.5 0 0 0 379.5 111.1 19.3 19.3 0 0 0 373.9 125 20.5 20.5 0 0 0 379.5 138.9 19.3 19.3 0 0 0 393.4 144.5 20.5 20.5 0 0 0 407.3 138.9 19.8 19.8 0 0 0 407.3 111.1ZM500 753.9H209.6A19.5 19.5 0 1 0 209.6 793H500A19.5 19.5 0 1 0 500 753.9ZM593 759.6A19.3 19.3 0 0 0 579.1 753.9 20.2 20.2 0 0 0 565.2 759.6 19.3 19.3 0 0 0 559.6 773.4 20.2 20.2 0 0 0 565.2 787.3 19.3 19.3 0 0 0 579.1 793 20.2 20.2 0 0 0 593 787.3 19.8 19.8 0 0 0 593 759.6ZM579.5 675.8H209.6A19.5 19.5 0 0 0 209.6 714.8H579.5A19.5 19.5 0 0 0 579.5 675.8ZM511.9 616.4H275.6A40.3 40.3 0 0 1 235.4 576.2V339.8A40.3 40.3 0 0 1 275.6 299.6H511.9A40.3 40.3 0 0 1 552.2 339.8V576.2A40.6 40.6 0 0 1 511.9 616.4ZM300.6 564.7L359.7 564.9C367.1 564.9 372.6 557.2 373 546.4V497.1C373 486.2 377.9 478.3 385.1 477.7L403.2 477.5C410.4 477.9 415.5 486.1 415.5 496.9V546.5C415.9 557.2 420.9 564.5 427.9 564.5L507.6 564.6 507.7 503.5C507.7 492.8 502.6 484.7 495.4 484.3L463.5 484.2C456.1 484.2 450.8 476.5 450.6 465.8L450.4 449.1C450.8 438.5 456.3 430.7 463.5 430.7H495.7C502.6 430.3 507.8 421.9 507.8 411.1V335.3A32.2 32.2 0 0 1 483.3 350.6H429.1C421.7 350.6 416.2 358.6 415.8 369.1V418.2C415.4 428.9 410 436.6 402.9 436.6L386.6 436.4C379.2 436.4 373.9 428.8 373.4 418.3V368.9C373 358.2 367.7 350.8 360.4 350.8H281.8V411.7C281.8 422.8 286.9 430.7 294.2 431.1L326.4 430.9C333.4 431.3 338.9 439.8 338.9 450.4V464.5C338.9 475.3 333.7 483.4 326.6 483.8H294.4C287 484.4 282.1 492.3 282.1 503.2L281.7 564.6Z", + "width": 789 + }, + "search": [ + "my_medical_file" + ] + }, + { + "uid": "40c03b22028e1b34f230c522b40ca125", + "css": "family", + "code": 59408, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1255.3 571.5A27.7 27.7 0 0 0 1211.5 605.3 207.6 207.6 0 0 1 1255 733.1 27.7 27.7 0 1 0 1310.4 733.1 262.5 262.5 0 0 0 1255.3 571.5ZM1162.3 385.9A210.9 210.9 0 1 0 926.7 385.9 364.6 364.6 0 0 0 813.6 448.4 155.5 155.5 0 0 0 597.6 448.4 364.8 364.8 0 0 0 484.5 385.9 210.9 210.9 0 1 0 248.9 385.9 367.5 367.5 0 0 0 0 732.4C0 732.6 0 732.8 0 733.1 0 775.5 24.1 838.2 139.1 895.7A1060.2 1060.2 0 0 0 464.8 984.6 1904.1 1904.1 0 0 0 946.5 984.6 1059.9 1059.9 0 0 0 1272.3 895.7C1387.3 838.3 1411.4 775.6 1411.4 733.1A367.5 367.5 0 0 0 1162.3 385.9ZM889 211A155.5 155.5 0 1 1 1044.5 366.5 155.5 155.5 0 0 1 889.1 210.9ZM623 503.3A100.5 100.5 0 0 1 788.2 503.3H788.2A100.5 100.5 0 1 1 623 503.3ZM211.1 210.9A155.5 155.5 0 1 1 366.6 366.4 155.5 155.5 0 0 1 211.1 210.9ZM440.8 925.4A960.1 960.1 0 0 1 163.9 846.2C94.1 811.3 55.5 771.3 55.5 733.4 55.5 733.4 55.5 733.4 55.5 733.1A311.3 311.3 0 0 1 565.3 493.2 155.8 155.8 0 0 0 606.4 680.5 265.2 265.2 0 0 0 440.8 925.4ZM915.2 932.8A1857 1857 0 0 1 496.1 932.8V926A209.5 209.5 0 0 1 915.2 926ZM1247.4 846.2A959.9 959.9 0 0 1 970.5 925.4 265.3 265.3 0 0 0 805.1 680.3 155.7 155.7 0 0 0 846.2 493 311.3 311.3 0 0 1 1356 732.9C1356 771.1 1317.4 811.2 1247.4 846.2ZM1172.6 506.5A27.7 27.7 0 0 0 1172.6 561.8 27.7 27.7 0 0 0 1172.6 506.5Z", + "width": 1411 + }, + "search": [ + "family" + ] + }, + { + "uid": "28e30de5c20857758e187ef8e56eddc1", + "css": "calendar-(2)", + "code": 59409, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M544.9 710.9A78.2 78.2 0 0 0 623 789H714.9A78.2 78.2 0 0 0 793 710.9V619.1A78.2 78.2 0 0 0 714.8 541H623A78.2 78.2 0 0 0 544.9 619.1ZM623 619.1H714.9V710.9H623ZM961 687.5A39 39 0 0 0 1000 648.5V234.4A156.4 156.4 0 0 0 843.8 78.1H793V39A39 39 0 0 0 714.8 39V78.1H537.1V39A39 39 0 1 0 459 39V78.1H283.2V39A39 39 0 1 0 205 39V78.1H156.3A156.4 156.4 0 0 0 0 234.4V843.8A156.4 156.4 0 0 0 156.3 1000H843.8A156.4 156.4 0 0 0 1000 843.8 39 39 0 0 0 921.9 843.8 78.2 78.2 0 0 1 843.7 921.9H156.3A78.2 78.2 0 0 1 78.1 843.8V234.4A78.2 78.2 0 0 1 156.3 156.3H205.1V195.5A39 39 0 0 0 283.2 195.5V156.3H459.1V195.5A39 39 0 0 0 537.2 195.5V156.3H715V195.5A39 39 0 0 0 793.1 195.5V156.3H843.9A78.2 78.2 0 0 1 922 234.4V648.5A39 39 0 0 0 961 687.5Z", + "width": 1000 + }, + "search": [ + "calendar-(2)" + ] + }, + { + "uid": "ad42aa33b55d1a7b2edcf4ed976435d9", + "css": "roboticon", + "code": 59410, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M546.9 33.2C546.1 35.3 544.8 37.2 544.1 37.7 542.9 38.3 542.9 38.9 543.8 40.6 544.5 42.2 546.7 43.5 550.4 44.7L555.8 46.6 557.5 44.4C560.3 40.7 562.1 36.4 561.5 34.8 561.2 34 559.3 32.9 557.3 32.3 555.4 31.7 553.7 30.8 553.7 30.4 553.7 30 552.5 29.6 551 29.6 548.8 29.6 548.1 30.2 546.9 33.2ZM453.8 33.9C452.7 35.3 451.9 37.6 451.9 39 451.9 41 451.4 41.7 450 41.7 447.2 41.7 447.8 43.1 452 46.8 458.9 52.5 461.7 52.1 464.4 45 466.7 39.1 466 36.9 461.7 35.6 459.7 35.1 457.6 33.9 456.9 33.1 455.8 31.5 455.6 31.6 453.8 33.9ZM500.2 34.4C499.4 36 498 38.1 497.1 39 495.6 40.5 495.7 40.7 499 43.8 503.9 48.7 506.6 49 509.6 45.2 510.9 43.5 512.8 41.4 513.6 40.6 515 39 514.9 38.7 511.2 35.2 506.2 30.4 502.5 30.1 500.2 34.4ZM523.1 36L518.8 40.5 523.3 45.2C525.7 47.8 527.8 50.6 527.8 51.7 527.8 52.7 525.9 55.6 523.6 58.1L519.4 62.9 523 66.6C528 71.9 530.9 71.8 536.2 66 539.9 62 540 61.7 538.4 60.7 534.1 58.3 531.5 54.8 531.5 51.5 531.5 47.3 535.7 38.9 537.9 38.9 538.9 38.9 538.1 37.7 535.5 35.2 530.3 30.3 528.3 30.5 523.1 36ZM477.4 34.4C476.7 35.6 475.4 38.2 474.5 40.3 473 43.8 473.1 44 475 45.6 476.1 46.5 477.9 47.2 478.8 47.2 479.7 47.2 481 48.1 481.7 49.1 482.3 50.1 483.1 50.9 483.6 50.9 484.8 50.9 488 45 488 42.8 488 41.3 488.5 40.7 490 40.7 491.9 40.7 491.9 40.6 489.3 37.9 486.3 34.8 482.4 32.4 480.2 32.4 479.4 32.4 478.1 33.3 477.4 34.4ZM568.7 36.6L566.8 39.7 569.5 42C575.1 46.8 581.6 46.9 583.2 42.3 585.6 36 585.8 36.4 578.8 34.8 570.4 32.9 570.8 32.8 568.7 36.6ZM428.6 38C428 40.2 426.8 41.9 425.6 42.2 424.1 42.7 424.2 43.1 426.9 46 433.4 52.7 436.5 52.8 439.8 46.2 440.8 44.3 442.3 42.6 443.1 42.6 446.6 42.6 442.2 37.5 437.9 36.6 436.4 36.2 435 35.6 434.7 35.1 434.4 34.6 433.1 34.3 431.9 34.3 430.1 34.3 429.4 35 428.6 38ZM408.4 38.8C404 40.2 403.2 40.7 402.5 43.4 401.4 47.9 402 48.8 407.7 50.6 413.7 52.4 415.6 51.9 416.4 48.1 416.7 46.6 417.9 44.5 419.1 43.6L421.3 41.9 419.4 39.4C417.2 36.7 415.5 36.6 408.4 38.8ZM619.7 52C617 54.9 615.3 61.8 616.8 63.5 617.3 64.3 618.3 64.8 618.9 64.8 619.5 64.8 621.5 65.6 623.4 66.6 626.8 68.2 626.9 68.2 629.1 66.6 631.3 64.8 633.9 57.2 632.9 55.6 632.3 54.7 623.1 50 622 50 621.9 50 620.7 50.9 619.7 52ZM572.2 54.3C571.7 55.6 571.3 56.9 571.3 57.3 571.3 57.8 570.5 59.2 569.4 60.5 567.6 62.8 567.6 62.8 569.5 65.2 571.6 67.8 577 69.8 580.6 69.3 582.4 69.1 583.1 68.1 584.5 64 585.5 61.3 585.9 58.2 585.6 57.2 585 55.3 581.2 53.4 576.1 52.5 573.5 51.9 573 52.2 572.2 54.3ZM595.2 53.4C594.4 54.4 593.2 56.9 592.8 59.1 591.6 64.3 593.2 66.4 599.4 67.5 605.4 68.6 606.3 68.1 607 64.1 607.4 62.1 608.1 59.9 608.5 58.9 610.9 54.4 598.8 49.4 595.2 53.4ZM548.7 54.7C547.9 55.9 547.2 57.4 547.2 58 547.2 58.5 546.6 59.5 545.8 60.2 545.1 60.8 544.4 62.3 544.4 63.6 544.4 65.5 545.3 66.2 549.1 67.8 551.7 68.8 553.7 70.1 553.7 70.5 553.7 72 556.2 71.3 558.1 69.2 560.4 66.8 562.5 60 561.7 57.9 561.1 56.4 557.2 54.4 552.6 53.2 550.7 52.8 549.9 53.1 548.7 54.7ZM480 55.4C479.4 55.7 477.8 58.1 476.4 60.8 473.3 66.3 473.7 67.3 479.7 70.5 485.6 73.3 487.9 72.7 489.4 67.6 489.7 66.3 490.6 64.5 491.5 63.6 493.2 61.7 492.5 60.8 487.7 59.3 485.7 58.7 483.7 57.4 483.1 56.4 481.9 54.4 481.5 54.4 480 55.4ZM500.1 57C499 58.4 497.9 60.6 497.6 61.8 496.5 65.8 502.6 72 506.6 70.8 509 70 515.7 64.1 515.7 62.6 515.7 61.3 507.7 55.8 504.5 55.1 502.6 54.6 501.7 55 500.1 57ZM429.7 59.8C427.7 62.3 426.5 67.1 427 70 427.7 73.6 438.2 76.1 439.8 73.1 444.9 63.8 444.7 62 438.5 59.2 433.4 56.9 431.9 56.9 429.7 59.8ZM453.2 59.5C452.5 60.7 451.6 63.6 451.3 65.8 450.7 70 450.8 70.1 453.8 71.3 455.6 71.9 457.7 73.1 458.5 73.9 460.7 75.8 462.9 74.6 464.4 70.6 465.2 68.7 466.3 66.2 466.9 65.1 468.2 62.4 465.9 59.6 461.2 58.3 456.2 56.9 454.8 57.2 453.2 59.5ZM407.2 59.9C405 62.5 401.8 69.4 402.3 70.4 402.6 70.8 404.4 71.5 406.3 71.9 408.1 72.1 410.8 73.2 412.2 74.2L414.8 75.9 417.1 71.3C418.4 68.8 419.4 65.7 419.4 64.4 419.4 59.5 410.5 56.3 407.2 59.9ZM382.4 60.6C380.8 62.5 378.7 70.2 379.3 71.8 379.5 72.5 381.3 73.5 383.1 74.2 385.1 74.7 386.9 75.6 387.5 76 390.3 78.7 394.8 74.6 395.8 68.4 396.7 63.6 394.9 61.6 388.8 60.3 383.1 59.1 383.8 59 382.4 60.6ZM358.9 61.9C357.3 63.7 355.6 68.7 355.6 71.5 355.6 73.8 358 75.7 362.1 76.9 367.1 78.2 369 77.4 370.7 73.1 373.4 66.5 372.9 65.1 367 62.5 360.7 59.7 360.8 59.7 358.9 61.9ZM339.3 65.2C332 69 331 70.1 332 72.9 333.1 75.8 336 77.5 341.2 78 344.4 78.2 345 78 346 75.9 346.7 74.6 347.4 71.9 347.8 69.7 348.3 66.2 348.1 65.8 345.7 64.5 343.2 63.2 342.8 63.3 339.3 65.2ZM645.2 73.8C644.4 74.7 643 77.7 642 80.4 640.4 85.3 640.4 85.4 642.1 86.7 643.1 87.4 644.5 88 645.5 88 646.3 88 647.5 88.6 648.1 89.4 650.7 92.5 655.6 89 657 83.1 657.6 80.8 657 79.9 653.3 76.3 648.6 71.9 647.3 71.4 645.2 73.8ZM666.4 77.7C663.8 85 664.4 87 669.5 87 670.5 87 672.1 87.9 673.2 89 675.5 91.2 677.2 90.3 678.2 86.3 678.6 84.9 679.4 83.1 680.2 82.3 681.4 81 681 80.5 676.6 77.6 668.8 72.4 668.2 72.4 666.4 77.7ZM622.2 75C621.4 75.5 619.7 78 618.5 80.6L616.3 85.4 618.8 87.6C621.2 89.6 623.3 90.3 626.9 89.9 628.5 89.7 635.2 82.7 635.2 81.1 635.1 80 626.1 74.1 624.5 74.1 624.1 74.1 623 74.5 622.2 75ZM597.8 76.4C595.7 78.5 592.6 85.9 593.1 87.5 593.7 88.8 599.9 91.7 602.2 91.7 604.1 91.7 608.5 87.8 610.4 84.4L611.9 81.8 607 78.3C601.7 74.6 599.9 74.3 597.8 76.4ZM550.1 78.3C547.8 81.3 545.8 87.3 546.6 89.3 547.2 90.9 556.7 94 558.7 93.2 559.5 92.9 560.2 91.9 560.2 90.9 560.2 90 561.2 87.9 562.5 86.1 563.8 84.4 564.8 82.9 564.8 82.7 564.8 82.5 562.9 81.5 560.5 80.5 558 79.4 555.6 78 555.3 77.2 554.2 75.3 552.2 75.6 550.1 78.3ZM574.4 77C573 78.8 569.4 86.6 569.4 87.7 569.4 89.4 575.5 92.6 578.4 92.6 581.4 92.6 584.1 90.3 586.4 85.6L587.9 82.7 583.4 79.4C578.8 75.8 575.8 75.1 574.4 77ZM525.5 79.3C524.7 80 523.9 81.7 523.6 83 523.3 84.2 523 86.1 522.7 87.3 522.1 90.1 523.1 91.2 526.4 92 528 92.4 529.9 93.3 530.7 94.2 534.2 97.2 538.9 91.9 538.9 84.7 538.9 81.9 538.5 81.2 535.9 80.2 530.6 78.1 527 77.7 525.5 79.3ZM501.7 80.3C499.5 82.6 498.1 89.7 499.2 91.9 499.6 92.7 502.1 94.1 504.7 94.8 509.4 96.2 512 96 512 94.2 512 93.6 512.9 91.4 514 89.2 516.2 84.5 515.9 83.1 512.3 81.1 507.6 78.7 503.3 78.3 501.7 80.3ZM478.5 80.6C476.9 81.6 475 86.9 475 90.6 475 91.9 475.8 93 477.6 93.6 479 94.2 481.4 95.2 482.9 95.9 484.4 96.7 486.4 97 487.2 96.8 489.4 95.9 491.7 90.6 491.7 86.7 491.7 84 491.2 83.1 489.2 82.1 485.5 80.3 480.4 79.5 478.5 80.6ZM455.1 82.1C454.4 82.9 453.7 84.4 453.7 85.6 453.7 86.8 453.1 88.2 452.3 88.9 448.9 91.8 451.7 95.6 458.5 97.3 462.4 98.4 463.1 98.3 464.7 96.9 466.9 94.8 468.7 87.3 467.5 85.1 466.8 83.6 463.9 82.4 458.5 81.2 457.3 80.9 455.8 81.3 455.1 82.1ZM430.8 82.6C429.4 84.4 427.8 89.7 427.8 92.3 427.8 93.6 428.4 94.7 429.4 95.1 430.3 95.4 432.8 96.4 434.9 97.4 437 98.4 439.4 98.9 439.9 98.6 441.5 97.6 444.4 90.6 444.4 87.7 444.4 85.6 443.8 84.8 441.5 83.8 436.4 81.8 431.9 81.2 430.8 82.6ZM407.6 83.5C406.9 84.2 406.5 85.4 406.5 86.3 406.5 87.3 405.5 89.1 404.2 90.4 401.9 92.6 401.9 92.7 403.7 94.4 404.7 95.5 406.1 96.3 406.9 96.3 407.5 96.3 409.2 97.1 410.5 98.1 413.1 100.3 416 100.6 417.5 98.7 419 96.9 421.5 88.1 420.8 87 420.4 86.3 410.9 82.4 409.4 82.4 409 82.4 408.2 82.9 407.6 83.5ZM386.6 84.3C385.6 84.6 383.3 86.8 381.6 88.9L378.5 92.8 382.4 96.8C387.1 101.6 389.1 102.2 392 99.9 394.6 97.9 397.5 91.2 396.8 88.9 395.7 85.6 389.7 83 386.6 84.3ZM360.3 86.7C359.2 88.1 357.9 90.8 357.2 92.9 356.2 96.1 356.3 96.7 357.9 97.8 358.8 98.5 360.6 99.1 361.7 99.1 362.9 99.1 364.4 99.9 365.1 100.9 366.3 102.7 366.4 102.7 368.9 100.1 370.3 98.7 371.3 97.1 371.2 96.7 370.8 94.6 371.4 93.5 372.7 93.5 375.6 93.5 373 89.2 368.1 86.2 364.1 83.6 362.6 83.8 360.3 86.7ZM336.9 85.9C334.5 86.4 332.9 91.8 333.2 97.5 333.3 99.5 338.5 101.9 343 101.9 345.8 101.9 346.3 101.5 347.2 98.3 347.9 96.5 348.7 94.5 349.2 94 350.6 92.5 350.1 89.9 348 88.5 345.5 86.9 339.1 85.4 336.9 85.9ZM311.6 88.2C310.8 89.4 309.9 92.3 309.6 94.7 309 99.4 308.7 99.2 317 101.9 320.6 103 320.8 102.9 322.8 100.6 325.8 97.1 326.6 92.1 324.5 89.8 322.9 88.1 317.8 86.1 314.6 86.1 313.7 86.1 312.4 87 311.6 88.2ZM671.6 95.5C670.5 95.8 668.5 98.4 666.9 101.8L664.3 107.3 668.1 110.2C670.3 111.7 673.1 113 674.4 113 676.9 113 680.8 109 681.9 105.5 683.6 100.3 676.7 93.5 671.6 95.5ZM691.9 96.5C690.8 97.8 688.9 104.3 688.9 106.5 688.9 107.4 691.2 109 694.5 110.6 699.8 113 700.3 113.1 701.9 111.6 702.8 110.7 704.2 108.1 705 105.7L706.5 101.4 703 98.4C699.3 95.2 693.7 94.3 691.9 96.5ZM647.5 98.9C645.9 99.7 643.5 101.8 642.2 103.3L639.8 106.3 644.4 110.6C646.9 112.9 649.5 114.8 650.3 114.8 652.8 114.8 658.3 106.7 658.3 103.1 658.2 101.3 655.5 98.8 652.3 97.8 651.2 97.5 649.2 97.9 647.5 98.9ZM596.4 103.2C592.5 109.6 593.1 112 599 113.8 601.1 114.4 603.1 115.5 603.3 116.2 604.3 118.5 606.7 116.5 608.9 111.4 611.9 104.6 611.8 102.9 608.4 102.2 606.9 101.9 604.9 100.8 604.1 99.9 601.5 97 599.6 97.9 596.4 103.2ZM622.4 99.3C621.9 99.9 620.5 102.4 619.2 104.8 617 108.8 616.9 109.3 618.4 110.5 623.5 115 628.6 115.1 633 110.7 634.7 109 636.1 106.9 636.1 106.2 636.1 105.4 634.4 103.2 632.2 101.5 628.2 98.1 624.2 97.1 622.4 99.3ZM574.6 101.1C571.9 105.4 570.1 110.1 570.6 111.5 571 112.3 573.1 113.8 575.5 114.8 578.6 116.2 579.6 117.1 579.6 118.7 579.6 120.5 579.8 120.6 580.9 119.4 582.8 117.5 588 107.6 588 106 588 105.3 586.6 104.1 585 103.4 583.3 102.7 581.4 101.5 580.6 100.6 578.9 98.4 576.2 98.7 574.6 101.1ZM549.3 103C546.1 108.9 546.2 114.8 549.4 114.8 550 114.8 552 115.6 553.9 116.5 558.7 119 560.7 117.9 562.5 111.6 564.4 105.4 564 104.1 559.7 102.3 554.8 100.2 550.6 100.6 549.3 103ZM502.9 104.3C500.2 107.7 498.6 113.6 500.1 115.4 500.6 116.1 501.7 116.7 502.2 116.7 502.9 116.7 504.9 117.5 506.9 118.5L510.6 120.4 512.6 118.4C516.6 114.7 517.1 105.6 513.5 105.6 512.9 105.6 510.8 104.7 508.8 103.7 506.8 102.7 505.1 101.9 505 101.9 504.8 101.9 503.9 103 502.9 104.3ZM525.9 105.3C525.3 107.2 524.2 109.5 523.4 110.4 520.6 113.5 526.8 118.5 533.2 118.5 535.6 118.5 536.4 118 537.1 115.9 537.7 114.5 538.7 112.1 539.4 110.6 540.9 106.9 539.9 105.3 535 103.2 529.2 100.9 527.1 101.3 525.9 105.3ZM480.3 103.8C478.1 105.1 475.9 110.2 475.9 113.8 475.9 117.3 478.6 119.2 484.4 120L488.7 120.6 490.3 115.8C491.1 113.2 492.2 110.9 492.7 110.6 494 109.7 491.9 106.6 488.6 104.6 485.3 102.6 482.8 102.3 480.3 103.8ZM408.3 108.4C404.9 113.2 404.4 114.9 405.5 117.8 406.7 120.9 414 124.5 416.5 123.2 418.4 122.2 421.3 116.9 421.3 114.3 421.3 112.6 413.6 104.6 412 104.6 411.6 104.6 409.9 106.3 408.3 108.4ZM433.1 107.4C431.8 108.9 430.2 111.7 429.5 113.6 428.5 116.8 428.6 117.1 430.6 118.7 431.7 119.6 433.4 120.4 434.4 120.4 435.4 120.4 436.4 121 436.7 121.8 438 125.1 442.6 121.5 442.6 117.2 442.6 115.5 443.1 114.5 444.4 114.2 445.5 113.9 446.3 113.3 446.3 113 446.3 111.8 438.1 104.6 436.7 104.6 435.9 104.6 434.4 105.8 433.1 107.4ZM455.7 106.2C455.3 107.1 454.6 109 454.3 110.4 453.9 111.9 453 113 451.6 113.1L449.5 113.4 451.9 115.7C456.3 119.8 461.2 122.4 463.6 121.8 466.2 121.1 468.2 117 468.7 111.6L469 108.1 463.4 106.3C456.6 104.3 456.8 104.3 455.7 106.2ZM363.6 107.5C362.8 108.1 361 110.5 359.7 113 358.4 115.5 357 117.7 356.5 118.1 355.9 118.3 357.7 120.1 360.2 121.9 366.6 126.2 369.1 125.9 371.9 120.4 373.1 118.1 374.1 115.3 374.1 114.2 374.1 111.9 371.7 110.2 368.5 110.2 367.5 110.2 366.3 109.4 365.9 108.4 365.5 107 364.9 106.9 363.6 107.5ZM384.2 109.8C383.6 111.3 382.5 113.9 381.7 115.5 380.4 118.2 380.4 118.6 381.9 120.3 384.2 122.8 388.1 124.3 391.8 123.9 395.3 123.6 397 120.9 397.9 114.8 398.3 111.8 398.1 111.1 395.9 109.7 394.6 108.8 391.7 107.9 389.4 107.6 385.6 107.2 385.2 107.3 384.2 109.8ZM313.7 110.8C311.7 113.1 310.2 117.1 310.2 120.5 310.2 122.6 310.7 123.4 312.8 124.1 314.2 124.5 316.5 125.6 318.1 126.5 320.7 127.9 320.8 127.9 323.2 125.2 324.6 123.6 326 120.6 326.4 118.6 327.3 113.2 325.6 111.5 318 109.8 315.9 109.4 314.8 109.6 313.7 110.8ZM336.1 112.2C335.1 113.9 334.3 116.9 334.3 118.8 334.3 122 334.5 122.4 338.2 124.1 344.7 127 346 126.7 348.7 120.6 350.2 117.3 350.7 114.8 350.3 114 349.5 112.8 341.3 109.3 339.1 109.3 338.4 109.3 337.1 110.6 336.1 112.2ZM291 111.3C288.7 112.4 286.9 116.2 286.8 120.6 286.6 123.4 286.9 123.8 291.7 126 295.2 127.7 297.2 128.2 298.3 127.7 299.9 126.9 303.9 115.9 303.1 114.6 302.4 113.5 295.6 110.2 294.3 110.3 293.6 110.3 292.1 110.7 291 111.3ZM268 117.7L262.5 123.3 266.1 126.5C268.1 128.2 270.2 129.6 270.6 129.6 271.1 129.6 273.1 128 275.2 125.9 279.3 121.9 279.3 120.6 275.5 115.1L273.5 112.1 268 117.7ZM718.3 118.1C717.4 119.3 716.7 120.6 716.7 121 716.7 121.5 715.8 122.8 714.8 123.9 711.4 127.5 714.1 132.3 720.4 134.1 723.1 134.8 721.8 135 713.2 135.1L702.8 135.2 704.7 131.6C705.7 129.6 706.7 126.8 706.8 125.4 706.9 123.1 706.5 122.6 702.1 121 698 119.5 697 119.4 694.7 120.6 693.3 121.2 691.4 123.3 690.5 125.3 688.9 128.4 688.9 129 690.1 130.9 690.8 132 692.9 133.4 694.6 134 697.2 134.8 696.3 135 688.2 135.1L678.7 135.2 680.6 132.1C683.1 128.1 682.9 126.9 679.5 122.9 675.5 118 672.2 118.1 669.1 123.5 667.8 125.7 666 127.8 665.2 128.1 664.3 128.5 661.6 127.3 658.1 125 651.6 120.6 648 120.4 645.3 124.1 642.8 127.6 642.2 131.9 644 133.7 645.4 135.1 645 135.2 639.4 135.2 636.1 135.2 633.3 134.9 633.3 134.6 633.3 133.6 635.5 130.1 636.5 129.4 638.1 128.4 632.5 123.2 628.5 122 623.6 120.6 620.9 122.5 619.4 128.6 618.9 131.2 618.6 133.7 619 134.3 619.4 134.8 617.8 135.2 614.5 135.2L609.4 135.2 610.4 132C611.7 127.9 610.9 126.3 606.9 124.6 605.2 123.9 603.7 122.8 603.7 122.3 603.7 120.2 600.7 121.5 599.3 124.2 598.4 125.7 596.8 128.4 595.6 130.2 593.8 133.1 593.7 133.3 595.2 134.2 596.4 134.9 595.6 135.1 591.8 135.2 587.6 135.2 586.9 135 588 133.9 590 131.4 588.7 128.3 584.6 126.4 582.5 125.4 580.2 124 579.4 123.4 577.2 121.5 572.7 126.9 572.7 131.5L572.7 135.2 567.9 135.2C564 135.2 563.1 134.9 563.5 133.8 563.9 133.1 564.4 132.4 564.8 132.4 566.2 132.4 564.5 128.6 562.6 127.3 561.6 126.6 558.8 125.6 556.7 125.1 551.7 124 549.6 125.6 548.6 131.4L548 135.2 543.4 135.2C539.1 135.2 538.9 135.1 539.8 133.2 541.1 130.9 539.4 128.7 534.7 126.5 530.4 124.4 529.9 124.5 527.3 128.7 526 130.8 524.3 132.8 523.4 133.1 521.9 133.7 512.7 129.4 509.5 126.6 507.8 125 507.2 124.9 505.9 126 505.1 126.7 503.6 129.1 502.7 131.2 501 135.1 500.9 135.2 496.4 135.2 492.4 135.2 491.9 135 492.3 133.4 493 131 489.7 128.1 485.6 127.2 481.8 126.6 480.6 127.3 479.1 131.8 478.2 134.4 477.7 134.7 474.2 135 471.1 135.3 469.9 134.9 469 133.6 468.2 132.6 466 130.6 463.9 129.2L460.1 126.6 457.4 129.2C455.9 130.6 454.4 132.6 454.1 133.5 453.3 136 447.9 135.7 443.7 132.9 441.9 131.6 439.8 130.6 439.3 130.6 438.7 130.6 438 129.7 437.7 128.7 436.9 126 434.8 127.3 432.9 131.6 431.2 135.1 431.1 135.2 426.2 135.2 423.5 135.2 421.3 134.8 421.3 134.4 421.3 133.9 419.5 132.9 417.4 131.9 415.2 131.1 413.1 129.9 412.9 129.4 412.5 128.8 411 129.8 409.3 131.9 406.8 134.7 405.7 135.2 402.4 135.2 400.3 135.2 396.6 134.2 394 133 389.3 130.6 387.7 130.8 385.2 133.7 383.6 135.6 373 135.7 371.4 133.9 369.4 131.4 365.6 131.2 362.7 133.3 360.4 135.1 359.2 135.3 353.3 134.8 349.7 134.5 345.2 134.1 343.2 133.7 341 133.3 339.3 133.5 338.4 134.3 337.4 135.1 321.6 135.3 268.3 135.1L199.5 134.7 193.5 137.6C178.4 144.7 170.9 160.9 175.4 176.3 177.2 182.6 178.8 185.3 183.1 189.9L186.3 193.3 181.6 194.4C171.5 196.5 163 203.3 158.5 212.8 156.4 217.3 156 219.3 156 226.4 156 233.6 156.4 235.5 158.7 240.5 161.8 247.2 168.3 253.8 174.8 256.8 178.1 258.2 181.6 258.8 189 259.1L198.8 259.4 198.3 263.4C198 267.1 198.2 267.8 201.8 271.5L205.6 275.5 209.3 271.6C213.4 267.1 213.9 264.5 210.9 261.4L209 259.3 215.5 259.3 221.9 259.3 221.5 264.3C221.1 269.1 221.2 269.4 223.9 270.7 227.3 272.5 232.8 272.7 234 271 235.2 269.5 237.4 261.9 237.1 260.4 237 259.6 238.3 259.3 241.1 259.3L245.4 259.3 244.8 263.2C244.4 266.3 244.6 267.6 245.7 268.8 247.6 270.6 254.3 272.6 256.1 271.9 257.7 271.3 262.2 261.3 261.5 260.1 261.2 259.6 263.1 259.3 265.8 259.3L270.6 259.3 269 261.7C267.6 263.8 267.6 264.2 269 266.3 270.7 269 273.9 270.4 278.3 270.4 281.1 270.4 281.8 269.9 283 267.1 283.6 265.4 284.3 262.9 284.3 261.6 284.3 259.4 284.6 259.3 288.2 259.3 292.1 259.3 292.1 259.3 292.1 262.7 292.1 265.9 292.3 266.1 297.6 268.2 302.8 270.2 303.2 270.3 304.8 268.8 305.7 268 307 265.5 307.6 263.2 308.5 259.3 308.6 259.3 312.7 259.3 316.2 259.3 316.7 259.4 315.9 260.8 314.5 263.5 315.6 264.8 320.9 267.1 326.7 269.7 328.6 269.4 329.4 265.6 330.1 262 333 259.3 336.1 259.3 338.1 259.3 338.8 259.7 339.1 261.2 339.4 264 343.8 266.9 347.3 266.9 349.6 266.9 351.1 266.1 353.9 263.1 358.4 258.2 361.1 258.1 364.9 262.5 366.9 264.7 368.6 265.7 370.3 265.7 371.9 265.7 374.3 264.4 376.6 262.5 380.6 259.1 386.1 258 386.1 260.6 386.1 262.3 390.1 264.4 395.3 265.6 398.7 266.4 399.3 266.3 400.5 264.5 401.2 263.4 401.9 261.9 401.9 260.9 401.9 259.5 402.7 259.3 406.5 259.3 409.1 259.3 411.1 259.7 411.1 260.3 411.1 260.7 412.9 261.9 415.1 262.9 422.4 266.1 422.7 266.1 424 262.5 425.1 259.4 425.3 259.3 429.7 259.3 432.2 259.3 434.3 259.6 434.3 260.1 434.3 260.6 435.8 261.5 437.8 262 439.6 262.7 441.9 263.8 442.9 264.6 444.3 265.9 444.6 265.8 446.3 264.4 447.3 263.4 448.3 261.9 448.6 261 449.5 258.2 457.3 258.6 461.7 261.6 463.5 262.9 465.8 263.9 466.9 263.9 467.8 263.9 469.6 262.9 470.9 261.6 472.9 259.6 474.2 259.3 478.3 259.3 481.6 259.3 484.7 259.9 487 261.1 491.7 263.4 493.1 263.4 494.7 261 496 259.3 496.8 259.2 503.4 259.6 512 260.3 512.5 260.3 525.2 259.6 530.6 259.4 536.6 259.5 538.3 260.1 540.4 260.6 541.7 260.6 541.7 260.1 541.7 259.6 578.1 259.3 632.9 259.3L724.2 259.3 722.7 262C721.9 263.5 721.3 265.6 721.3 266.7 721.3 267.9 720.6 268.9 719.4 269.2 716.8 269.9 717.1 270.9 721.5 274.1 726.1 277.5 729.8 277.7 732.9 274.6 737.4 270.1 736.7 264.2 731.3 261.9 726.3 259.9 727.7 259.3 737.6 259.3 745.4 259.3 747.2 259.5 746.6 260.4 746 261 744.9 263.7 744 266.4 741.9 272.3 742.6 273.5 749.7 275.6 755.8 277.3 756.9 276.8 758.9 269.7 760.3 265 760.3 264.5 758.7 262.9 757.9 261.9 755.8 260.7 754.3 260.3 752 259.6 753.6 259.4 760.8 259.4L770.2 259.3 769.2 262.7C768.6 264.6 767.6 266.9 766.8 267.9 765.6 269.4 765.6 269.7 767.7 271.8 770.6 274.7 777 276.2 779.4 274.4 781.4 273.1 783.9 264.7 783 262.5 782.7 261.7 781.5 260.6 780.4 260.2 778.7 259.5 779.2 259.4 783.1 259.4 788.3 259.3 788.2 259.2 789.4 266.4 790.1 271.3 791 271.4 799.7 267.2 807.2 263.6 813.9 258 817.8 251.9 821.4 246.2 821.2 245.4 816.1 245.4 813.8 245.4 812 245.1 812.2 244.6 820.6 228.4 818.3 213.3 806 201.9 801.8 198.1 799.4 196.8 794 195.2L787.2 193.2 791.2 188.3C804.6 171.9 799.2 147.2 779.8 137.8L773.6 134.7 750.3 134.7C737.4 134.7 726.9 134.5 726.9 134.4 726.9 134.2 727.8 132.4 728.9 130.5L730.8 126.9 726.3 121.6C723.7 118.7 721.3 116.2 720.7 116 720.3 115.9 719.2 116.8 718.3 118.1ZM675.6 263.1C674.4 264.4 672.9 267.2 672.2 269.9 671.3 273.9 671.4 274.6 672.8 275.6 674.7 277 684.1 279.3 684.8 278.4 685.2 278.1 685.6 276.5 686 274.8 686.4 273 687.4 271.4 688.7 270.8 689.8 270.4 690.7 269.7 690.7 269.4 690.7 268.1 686.8 264.8 685.2 264.8 684.2 264.8 682.6 264 681.8 263 679.7 260.6 678.4 260.6 675.6 263.1ZM699.9 263.8C698.4 265.3 697.2 267.1 697.2 267.9 697.2 268.6 696.3 269.4 695.2 269.7L693.1 270.3 695.4 272.7C696.9 274.3 698.2 274.9 699.5 274.6 700.6 274.4 702.5 273.9 704 273.6 705.9 273.1 706.5 273.2 706.5 274.4 706.5 276.7 707.7 276.3 710.6 273.1 713.2 270.5 713.3 270.2 712 267.8 710.6 265.4 705.2 261.1 703.5 261.1 703.1 261.1 701.4 262.3 699.9 263.8ZM605.2 265.1C604.4 266.2 602.9 269.1 601.8 271.5 599.4 276.5 600 278.1 604.8 279.2 606.3 279.5 608.4 280.6 609.4 281.7 611.7 283.9 613.4 282.8 614.4 278.6 614.7 277.1 616 275.1 617.3 274.1L619.7 272.2 617.6 269.9C616.4 268.6 614.9 267.6 614.4 267.6 613.7 267.6 611.7 266.6 609.8 265.3L606.5 263.1 605.2 265.1ZM650.9 266.3C650.3 268.3 649.2 270.9 648.3 272.1 647 274.3 647.1 274.5 649.4 276.5 650.7 277.7 653.4 279.1 655.3 279.5 659.8 280.8 662.5 279.1 663.9 274 665.7 267.1 663.7 264.4 656.1 263.3 652 262.8 652 262.8 650.9 266.3ZM627.8 266.3C627.2 267.6 626.9 269.1 626.9 269.5 626.9 270 626 271.2 624.9 272.3 623.1 274.2 623.1 274.3 624.7 276.1 628.6 280.5 634.7 281.8 637.3 278.9 639.6 276.4 641.9 270.5 641.2 268.4 640.8 267.3 639 266.2 635.9 265.3 629.5 263.4 628.8 263.5 627.8 266.3ZM580.6 268.1C579.6 269.5 578.3 272.1 577.8 274 576.9 276.9 577 277.5 578.8 278.9 579.9 279.8 581.6 280.6 582.5 280.6 583.4 280.6 584.7 281.4 585.4 282.3 587 285 589.3 283.3 592.3 276.9L594.9 271.6 590.6 268.7C585.6 265.1 583.1 265 580.6 268.1ZM555.6 268.4C552.8 273.6 553 280.6 555.8 280.6 556.5 280.6 558.7 281.4 560.6 282.4L564.4 284.4 566.8 281.6C569.3 278.9 571.1 272.2 569.9 270.3 567.8 266.9 557.2 265.5 555.6 268.4ZM487.1 268.9C486.7 269.4 485.6 271.7 484.7 273.8 483.9 275.9 482.6 277.9 481.9 278.1 479.6 279 481.9 282.1 485.6 283.3 487.4 283.9 489.6 285.4 490.6 286.7 492.2 288.7 492.6 288.8 493.8 287.5 494.6 286.8 495.5 284.9 495.8 283.3 496.2 281.9 497.5 279.7 498.8 278.7 501.1 276.9 501.1 276.8 499.5 275 496.7 271.9 488.1 267.6 487.1 268.9ZM532.3 271.4C531.7 273.4 530.3 275.7 529.3 276.5 527.3 277.9 527.3 277.9 529.9 280.1 532.5 282.4 538.8 284.6 541.5 284.1 543.3 283.7 547.2 277.1 547.2 274.4 547.2 272.8 546.1 271.7 542.6 269.9 535.8 266.5 533.7 266.8 532.3 271.4ZM511.2 271.2C504 279 504.2 278.5 506.1 280.7 507.1 281.8 509.3 283.2 510.9 284 513.4 285 514.4 285 517 283.9 518.7 283.2 521 281.3 522.1 279.8L524.2 276.9 520.8 273.3C516.5 268.4 514.3 268 511.2 271.2ZM439.4 271.5C435.9 273.4 433.4 282.9 436.1 284.3 436.9 284.7 439.4 285.9 441.7 286.9L445.7 288.9 447.9 286.9C449.9 284.9 451.9 280 451.9 276.7 451.9 273.5 442.7 269.6 439.4 271.5ZM460.2 276.4C459.1 279.8 458.5 282.9 458.9 283.3 459.4 283.7 461.3 284.5 463.2 285.2 465.1 285.7 466.7 286.9 466.7 287.6 466.7 288.3 467.2 288.9 467.9 288.9 469.5 288.9 471.7 286.4 473.1 282.6 473.8 281 474.7 279.6 475.2 279.6 475.6 279.6 475.9 278.5 475.7 277.1 475.4 274 471.9 271.6 466.6 270.8L462.2 270.2 460.2 276.4ZM414.5 273.9C412.5 276.1 411 280.6 411.6 282.5 411.9 283.4 414.2 285.6 416.7 287.4L421.2 290.6 424.9 286.4C429.2 281.6 429.6 279 426.7 276.1 422.5 272.2 416.9 271.2 414.5 273.9ZM278.4 273.8C277.9 274.7 266.1 322.5 265.2 327.1 264.6 330.3 264.4 330.5 263.1 329.3 262.2 328.5 259.2 327.2 256.1 326.4 251.6 325.1 250.6 325 249.5 326 248.1 327.5 246.3 336.5 247.1 337.8 247.4 338.2 249.6 339.5 252.1 340.6 254.5 341.7 256.5 343.1 256.5 343.9 256.5 346.4 259 344.4 260.6 340.6 261.6 338.7 262.4 337.1 262.6 337.3 263.2 337.9 259.9 350.6 258.9 351.1 258.3 351.5 257.5 350.9 256.9 349.9 256 348.2 255.8 348.2 253.1 351.1 248.6 355.9 247.8 358.1 249.4 360.6 250.3 361.9 252.1 363.6 253.7 364.5 256.2 365.9 256.6 366.6 256.1 369 255.7 370.5 254.7 372.6 253.7 373.6 252.7 374.7 251.9 376 251.9 376.5 251.9 376.9 250.8 378.9 249.5 380.7L247.2 384.2 250 385.6C251.9 386.7 252.7 387.6 252.4 388.7 252.1 389.5 251.3 394.3 250.5 399.1 249.6 403.9 248.6 408.7 248.1 409.7 247.7 410.7 247 413.9 246.8 416.7 246.5 419.4 245.4 427.5 244.3 434.4L242.4 447.1 237.9 446.6C233.5 446.1 233.2 446.2 229.6 449.8 226.2 453.2 226 453.7 226.9 455.9 228.4 459.1 231.4 460.9 236 461.7 239.2 462.1 239.8 462.6 239.8 464.4 239.8 468.1 238.9 469.4 236.5 468.9 233.5 468.1 230 471.9 229.2 476.8 228.4 481.5 229.3 482.8 234.6 484.3 238.5 485.4 238.8 485.6 240.2 490.6 243.2 501.7 244.3 509.3 247.2 544 249.6 572.4 255.3 618.1 257.1 624.4 257.5 625.9 257.2 626.1 255 625.6 250.6 624.4 242.8 618.8 234.5 610.6 230.4 606.5 226.7 603.3 226.4 603.5 226.1 603.8 225.9 606.5 225.9 609.4 225.9 615.6 225.5 615.8 220 613 218 612 216.1 611.4 215.6 611.6 214.4 612.4 211.1 620 211.1 622.3 211.1 624.2 212 625.1 216.3 627.1 219.2 628.6 221.6 629.6 221.8 629.4 221.9 629.3 222.6 628.1 223.4 626.9 225 624.6 225 624.7 225 631.3 225 634.9 224.8 638 224.5 638 224.3 638 222.5 637.3 220.6 636.6 216.7 634.9 214.8 635.3 214.8 637.9 214.8 638.9 213.6 641.2 212 642.9L209.3 646 214.7 649.4C217.8 651.3 221 652.8 222.1 652.8 223.8 652.8 224.1 653.3 224.1 656.6 224.1 659.9 223.9 660.3 222.2 659.7 221.2 659.4 219.5 659.4 218.5 659.7 216.2 660.5 213 666.6 213 670.3 213 672.6 213.4 673.2 215.6 673.7 220.6 674.8 221.3 675.2 221.3 676.6 221.3 677.4 221.9 677.8 222.6 677.5 224 676.9 225 679.4 225 683.1 225 685.6 223.6 685.7 221.6 683.3 219.3 680.6 218.7 680.9 216.6 685.8 215.6 688.3 214 690.8 213.1 691.5 211.8 692.6 211.9 693.1 215.7 696.4 219.1 699.4 220.5 700 223 699.7 225.6 699.4 225.9 699.7 225.9 701.9 225.9 703.1 226.2 705.2 226.6 706.4 227 708.1 226.9 708.4 225.4 708.1 219.4 706.3 218.7 706.3 217.2 708.5 216.5 709.6 215.6 712.8 215.2 715.4L214.6 720.2 219.4 721.8C222 722.6 224.4 724 224.7 724.7 225.2 726 225.5 725.9 226.5 724.5 228 722.6 228.3 723.2 229 729.4 229.5 734 228.3 734.5 223.9 731.4 220.6 729 219.6 729.7 217.2 735.9 215.1 741.5 215.3 744.4 217.7 744.4 218.7 744.4 220.8 745.3 222.3 746.4 225.6 748.7 227.5 748.1 228.9 744.4 229.4 742.9 230 741.8 230.3 742 230.6 742.2 231.1 745.5 231.6 749.3 232 753 232.6 756.9 232.9 758.1 233.3 760.2 233.2 760.1 229.5 757.4 227.4 755.9 224.7 754.6 223.5 754.6 221.2 754.6 218.5 757.8 218.5 760.4 218.5 761.4 217.8 762 216.7 762 214.1 762 214.4 763 218.1 766.9 222.6 771.5 225.6 771.5 230 767.1 231.9 765.4 233.4 763.9 233.6 763.9 233.8 763.9 234.3 766.3 234.6 769.2 235 772 237.3 786.2 239.8 800.6 244 824.3 244.4 827.1 243.3 831.4 242.2 836.2 243.1 838.9 245.8 838.9 246.5 838.9 247.3 840.6 247.6 843.1 248.1 846.4 247.9 847.7 246.4 849.7 245.4 851.1 244.4 854.2 244.3 856.5 244 860.7 244.6 861.5 251 864.1 251.3 864.3 251.9 865.9 252.2 867.8 252.8 871.1 252.7 871.3 250.6 871.3 247.7 871.3 245.8 873.9 244.5 879.6 243.3 884.9 244.5 886.4 251.3 887.9 256.4 889 257.3 890.1 257.4 894.7 257.4 896.1 256.8 896.4 253.1 896.1 249.2 895.8 248.5 896.1 247.5 898.2 246.9 899.5 246.3 902.4 246.1 904.6 245.8 908.7 245.9 908.8 249.5 910 251.6 910.6 253.8 911.9 254.4 912.7 255.5 914.1 255.6 914.1 257.4 912.5 258.4 911.6 259.3 910.2 259.3 909.4 259.3 906.3 260.3 909.4 261.5 916L262.7 923 260.1 922C258.7 921.6 257 920.6 256.4 919.8 255.8 919.1 254.4 918.5 253.1 918.5 251.3 918.5 250.5 919.4 249.1 922.4 248.1 924.5 246.5 926.9 245.4 927.8 243.3 929.4 243.3 929.4 247.8 931.9 250.3 933.3 253.8 935.4 255.6 936.4 257.3 937.4 258.5 938 258.1 937.6 257.8 937.1 258.1 936.2 258.8 935.5 259.5 934.8 260.6 932.5 261.1 930.6 261.7 928.5 262.5 926.9 262.9 926.9 263.3 926.9 264.3 930.4 264.8 934.5L266 942.3 272.8 945.6C276.6 947.5 279.5 948.6 279.4 948.1 279.3 947.7 281.5 945.8 284.3 944.2 288.7 941.5 293 936.4 319.3 902.8 335.6 881.7 349.7 863.8 350.5 863.1 351.5 862 352 861.9 353.1 862.9 353.9 863.5 354.6 863.6 354.9 863.2 355.8 861.9 360.2 833.9 361.4 822.5L362.5 811.3 372.7 818.6C400.6 838.7 426.3 851 452 856.7 463 859.1 504.3 860.1 518.2 858.3 549.7 854.4 579.4 840.8 614.2 814.6 621.4 809.3 627.6 805.1 627.9 805.4 628.1 805.7 628.9 809.7 629.5 814.4 631.9 832.5 636.4 854.7 637.6 854.3 638.2 854 649.4 870.2 666.2 895.6 681.3 918.5 693.9 937.8 694.1 938.3 694.4 938.9 698.7 941.6 703.8 944.4 711 948.3 713 949.8 712.7 951 712 953.3 727.6 945.6 728.3 943.2 728.7 942 729.5 941.6 731 941.9 732.8 942.2 733.5 941.6 735 938.5 738 932.5 738.3 930.2 736.4 928.5 735.5 927.7 733.9 926.9 732.9 926.7 731.3 926.4 731.1 925.7 731.3 922.2 731.5 920 732.4 917.1 733.4 915.9 734.4 914.6 735.2 912.9 735.2 912 735.2 911.1 735.8 909.9 736.6 909.3 738.5 907.7 738.3 905.8 736.1 905.1 733.8 904.4 733.8 902.9 736 887.5 737 880.8 738.1 872.7 738.4 869.2 738.8 865.7 739.4 863 739.7 863 740 863 742.1 864.4 744.4 866.2 751.6 871.9 754.3 871.6 756.9 864.4 759.3 858.3 758.6 856.3 753.8 854.5 751.5 853.7 749.4 852.3 749.1 851.4 748.5 849.9 748.4 849.9 746.9 851.3 746.1 852.1 745 854.5 744.4 856.6 743.5 859.9 741.4 862 740.2 860.8 739.7 860.5 741.4 845.2 742.1 842.9 742.3 842.2 743.6 842.8 745.5 844.5 747 846 748.6 847.2 749 847.2 749.4 847.2 751.4 845.7 753.5 843.9 759.3 839 758.9 835.3 752 830 747.9 826.9 747.9 826.9 745.9 828.6L744 830.5 744.3 825.8C744.6 821.2 745.2 820.6 746.9 822.3 749.2 824.5 752.8 822.4 754.7 817.8 755.7 815.5 757 813.1 757.6 812.8 759.3 811.9 756.9 809.4 751.7 806.9 747.7 804.8 747.2 804.3 747.2 801.5 747.2 798.9 747.5 798.4 749 798.8 751.2 799.4 754.4 796 755.6 791.8 756.9 786.6 756.7 785.4 753.8 783.8L751.1 782.4 752.9 777.8C754.5 773.2 756.6 753.6 756.4 742.6L756.3 738.4 755.1 741.7 753.9 744.9 753.8 742.1C753.7 740.6 754.2 733.3 754.7 725.9 755.2 718.6 755.9 704.4 756.4 694.3 756.8 684.2 757.3 675.7 757.6 675.5 758.1 674.8 764.9 677.6 766.7 679.3 767.9 680.3 768.6 679.9 771.6 676.2 776.1 670.6 775.9 668 770.8 665.1 765.4 661.9 762.2 662.2 760.7 665.9 758 673 757.9 672.9 757.4 662.5 757.1 656.9 756.9 652.2 757 652 757 651.9 759.7 652.7 763 653.8 766.1 654.8 769.3 655.5 769.9 655.2 770.6 655 771.4 653.2 771.7 651.4 772.1 649.1 773 647.8 774.2 647.5 777.8 646.6 775.5 643.1 769.7 640.8 768.1 640.2 766.6 639.1 766.3 638.4 765.7 636.9 762.7 637.6 760.7 639.7 759.9 640.6 758.7 643 758 645 756.7 648.5 756.6 648.4 756.5 638.4 756.3 627.5 755.4 612.2 753.8 593.5 753.2 587.1 751.9 571.3 750.8 558.3 749.8 545.4 748.6 533.5 748.2 532L747.6 529.4 743.7 534.4C741.6 537.2 738.4 542.6 736.7 546.4L733.4 553.2 734 542.6C734.3 536.5 735 530.8 735.7 529.3 736.5 527.7 737.7 520.6 738.4 513.5 739.3 506.3 740.6 497.5 741.4 494 742.2 490.4 743 484 743.1 479.7 743.1 475.3 743.6 471.8 744.1 471.6 745 471.3 744.8 421.6 744 418.7 743.7 418.1 742.7 417.6 741.6 417.6 740.2 417.6 739.8 417.2 740.2 416.1 742.8 409.3 741.9 405.9 737 404.6 735 404.1 732.9 403.9 732.4 404.2 731.9 404.4 731.5 403.9 731.5 402.9 731.5 397 718.8 337.1 709.6 299.8L703.5 275 701.1 275.6C699.7 275.8 698.1 276.2 697.6 276.4 696.9 276.6 697 278.6 698.3 283.1 701.4 293.8 702.6 301.6 704.6 323.1 706.8 345.6 707.7 350.9 714.2 376 718 390.6 722.2 411.6 722.2 415.6 722.2 417.1 718.1 417.2 667.4 416.9 637.2 416.8 603 416.9 591.2 417.5 572.3 418.2 569.1 418.6 562.3 420.7 553.1 423.7 544.4 429.4 540 435.3L536.7 439.7 520.9 439.3C506.9 438.8 494.4 439.4 475.5 441.3L469.9 441.9 467.2 436.7C462.1 426.7 449.6 418.2 435.5 415.3 423.2 412.8 381.6 411 323.1 410.5 292.3 410.2 266.9 409.8 266.8 409.6 266 408.9 287.1 285.8 289 280.2 290.4 275.8 290.5 274.4 289.5 273.9 288.1 273 279 273 278.4 273.8ZM360.2 425.9C395.7 427 421.9 428.5 429.6 429.7 441.2 431.6 449.9 436.9 454.3 444.6 456.9 449.4 456.9 449.8 456.9 463 456.8 474.8 456.4 477.7 453.9 487 445.2 520.2 433 538.3 411.2 550.6 398.9 557.6 386.2 561 369 561.8 326.8 563.7 291.5 544.1 280.5 512.4 276.1 499.8 274.4 469.8 277.2 456.4 278.7 449.4 282.1 442.1 285.4 439.2 292.4 432.7 305.6 427.2 317.9 425.9 327.5 424.9 329.1 424.9 360.2 425.9ZM679.9 434.5C694 438.6 702.2 445.2 705.4 454.7 711.5 473.2 709.9 504.4 702.2 520.2 685.6 554.4 631.8 569.7 594 550.9 575 541.6 562.6 525.9 554.4 500.8 549.4 485.7 547.8 476.9 547.7 464.4 547.7 454.2 547.9 452.8 550.1 448.6 553 443 559.3 438 566.5 435.6 574 433.2 589.4 432.6 635.2 432.9 668.9 433 675.3 433.2 679.9 434.5ZM528.4 455.2L531.2 455.7 531.8 466C533.4 498.9 548.1 534.4 566.9 551.5 590.3 572.4 623.7 579.7 657.5 571.2 692.3 562.4 716.9 538.3 722.7 507.3 723.4 503 724.3 493.4 724.4 486.3 724.5 475.7 724.8 473.1 725.8 473.1 726.9 473.1 727 477.2 726.5 499.7L725.9 526.4 717.7 543.1C698.8 581.8 680.4 608.8 657 631.9 639.3 649.6 622.8 660.6 604 667.6L596.9 670.2 589.4 663.9C550.6 631.5 501.6 619.6 455 631.5 432 637.4 408.7 649.5 391.8 664.4 384.7 670.6 384.4 670.6 371.6 665 333.1 648.4 296.2 605.8 264.9 541.7L256.9 525.5 256.6 516.2C256.2 506.3 258.1 471.9 259.2 467.8 259.6 466.3 260.1 470.8 260.5 479.6 261.9 514.2 268.7 532.1 286.9 549.2 294.7 556.7 299.2 559.7 309 564.7 344.5 582.5 390.5 581.4 422.2 561.9 431.2 556.4 444.8 543.3 450.4 534.9 462 517 470.9 489.4 472.8 465.1L473.4 456.7 481.9 455.7C491.5 454.8 524.4 454.4 528.4 455.2ZM740.5 604.6L744.4 614.4 740.6 618C736.8 621.3 730.6 625 726.3 626.3 724.4 626.9 724.4 626.9 725.5 620.2 726.1 616.5 727.3 607.8 728.2 600.9 730.6 582.2 730.2 582.8 733.6 589.4 735.2 592.4 738.2 599.3 740.5 604.6ZM555.6 685.7C555.6 686 554 689.3 552.1 693 545.4 705.9 532.8 715.7 517.5 720.1 508.8 722.5 476.4 722.5 467.1 720.1 456.7 717.3 444.8 711.1 438 704.8 432.7 700 425 689.2 425 686.6 425 685.9 446.6 685.6 490.3 685.4 526.2 685.2 555.6 685.4 555.6 685.7ZM602.7 692.1C612.2 694.4 620.8 699.5 629.3 707.9 637.6 716.1 639.8 720.2 642 730.9 644.6 743.6 643.7 749.6 638.1 755.7 630.7 764 619.2 768.1 605.6 767.4 598.7 767.1 596.6 766.6 590.4 763.6 571.3 754.5 559.9 739.1 559.9 722.2 559.9 699.6 578.6 686.5 602.7 692.1ZM363 462.2C355.6 465.9 351.6 471 349.9 478.2 347.7 488.3 352.1 498.3 361.5 504.2 365 506.3 367.3 506.9 372.2 507.2 380.1 507.7 383.9 506.5 389.2 501.8 399.1 493.1 400.8 479.2 393.2 469.3 388.6 463.1 382.8 460 375.3 459.5 369.5 459.2 368.4 459.4 363 462.2ZM389.3 466.8C394.2 470.6 391.4 478.1 385 478.1 379.1 478.1 376.5 470.4 381.1 466.8 382.5 465.6 384.3 464.8 385.2 464.8 386.1 464.8 387.9 465.6 389.3 466.8ZM602.5 460.6C594.4 463.6 587.8 471.9 586.6 480.6 584.6 494.4 596.3 507.4 610.6 507.4 620.3 507.3 627.8 502.4 632 493.1 637.4 481.7 632.4 467.8 620.8 461.9 616.2 459.4 607.2 458.8 602.5 460.6ZM626.3 466.8C631.2 470.6 628.4 478.1 622 478.1 616.3 478.1 613.8 471.3 618.1 467.1 620.8 464.4 623.1 464.3 626.3 466.8ZM390.1 274.3C389.4 275 388.5 277.5 388 279.9 386.8 285.6 387.8 287.6 392.4 288.8 399.4 290.6 399.4 290.6 402.1 285 403.6 282 404.6 279.1 404.4 278.3 403 274.6 392.2 271.7 390.1 274.3ZM366.2 276.3C365.3 277.6 364.4 280.6 364.2 282.8L363.7 286.9 368.4 288.4C371 289.3 373.3 290.4 373.6 290.8 374.5 292.2 377.6 290.1 379.2 287 379.9 285.6 380.6 282.9 380.6 281.1 380.6 277.1 377.9 275 371.9 274.4 368.2 273.9 367.6 274.2 366.2 276.3ZM342.6 278.4C341.9 280.4 340.9 282.9 340.2 283.9 339.2 285.6 339.3 286.1 341.1 287.9 343.5 290.1 348.7 291.3 352.2 290.4 353.8 290 354.9 288.6 356 285.6 357.5 281.8 357.6 281.4 356.1 279.2 354.3 276.4 351.2 275 346.8 275 344 275 343.5 275.4 342.6 278.4ZM202.1 281.7C198.6 285.6 198 287.3 199.2 290.6 200.3 293.5 204.5 298.1 206.1 298.1 207.6 298.1 213 292.8 213.9 290.4 214.8 287.8 213 284.4 208.9 281.2 207.1 279.8 205.5 278.7 205.3 278.7 205.2 278.7 203.7 280.1 202.1 281.7ZM249.2 281.1C248.1 282.4 246.9 284.9 246.3 286.7 245 290.5 245.9 292 249.7 293.1 251.1 293.3 253.2 294.4 254.4 295.5L256.8 297.2 258.5 294.7C259.4 293.2 260.2 291.3 260.2 290.2 260.2 289.1 261 287.9 262 287.4 263.8 286.6 263.9 286.5 262.4 284.4 260.9 282.3 254.5 278.8 252.1 278.7 251.6 278.7 250.2 279.8 249.2 281.1ZM224.3 280.8C222.6 282.8 221.3 290 222.3 291.8 222.8 292.7 224.4 293.6 226.1 294 227.8 294.4 229.9 295.3 230.8 296.1 232.3 297.4 232.6 297.3 234.6 295.5 237.4 292.9 239.4 285.9 238 283.4 236.3 280.1 226.4 278.2 224.3 280.8ZM770 284C769.4 285.5 768.2 288.1 767.8 290.1 766.9 293.3 766.9 293.9 768.9 295.8 771.4 298.3 777.4 299.8 779.5 298.4 780.3 298 781.3 296.3 781.8 294.8 782.2 293.3 783.2 291.4 784.1 290.6 786.3 288 783.5 284.7 777.4 283 771.1 281.1 771.6 281 770 284ZM748.5 283.1C746.9 284.2 743.2 293.3 743.8 294.8 744.7 297.1 749.1 299.4 752.9 299.4 756.5 299.5 756.6 299.4 758.8 294.1 760.6 289.8 760.8 288.2 760 287.2 757.8 284.6 750.4 281.9 748.5 283.1ZM723.1 285.5C723.1 286.1 722.3 288.2 721.3 290.3 720.3 292.3 719.4 294.4 719.4 295 719.4 298.1 730.1 302.3 733.1 300.4 735.2 299.1 737.2 290.1 736 287.9 734.5 285 723.1 282.9 723.1 285.5ZM606.6 289.9C604.5 291.5 602.5 293.8 602.2 295.1 601.6 297.5 603.2 301.5 605.1 302.2 606.5 302.8 616.9 299.1 617.8 297.7 618.8 296.4 617.7 293.4 615.4 290.9 611.9 287 610.7 286.9 606.6 289.9ZM582.1 290.6C580.7 291.9 579.2 294.4 578.6 296.2 577.7 298.8 577.8 299.5 579.4 301.7 580.3 303 582.8 304.5 584.7 305.3 591 307.5 593.6 305 593.9 296.5 594 293.5 593.7 293.1 590.3 292 588.2 291.3 586.1 290.1 585.6 289.4 584.7 288.2 584.2 288.4 582.1 290.6ZM535 293.2C533.7 294.7 532.4 296.7 532.2 297.7 532 298.7 531.3 299.5 530.6 299.5 528.1 299.5 528.7 301.7 532.1 304.4 538.1 309.2 539.2 309.1 544.7 303.8L549.5 299.1 545.2 294.9C542.8 292.6 540.1 290.7 539.1 290.7 538.1 290.7 536.3 291.9 535 293.2ZM557.5 293.1C552.6 297.2 552.4 298.3 556.1 302.7 560.9 308.2 563.9 307.9 569.1 300.8 570.8 298.3 572 295.8 571.7 295.3 570.9 294 564 290.8 561.9 290.7 561 290.7 559.1 291.9 557.5 293.1ZM488.2 293.1C486.3 294.4 485 297.5 483.8 303.3 483.3 305.9 483.5 306.3 486.9 307.8 492.3 310.3 495.4 309.5 497.9 305.1 501 299.6 500.5 297 495.6 295.6 493.4 294.8 491.7 293.7 491.7 293 491.7 291.3 490.7 291.3 488.2 293.1ZM509.2 295.8C508.1 298.1 507.4 301.4 507.6 303.1 507.9 305.6 508.4 306.2 512.1 307.6 517.6 309.5 519.9 309 521.3 305.3 521.9 303.6 522.9 301.2 523.6 299.8 524.9 297.2 524.9 297.2 519.3 294.4 516.2 293 513.1 291.7 512.3 291.7 511.6 291.7 510.2 293.5 509.2 295.8ZM464.1 293.8C463.5 294.4 462.8 296.1 462.5 297.5 462.1 298.9 460.7 300.8 459.5 301.9 456.6 304.2 457.4 305.4 464.7 309.3L469.9 312.1 471.9 309.6C473.1 308.2 474.6 305.5 475.6 303.5 477.5 299.3 476.6 297.7 471.3 296.3 469.4 295.7 467.5 294.7 467.2 294 466.6 292.3 465.4 292.2 464.1 293.8ZM417.9 295.4C414.6 296.7 411.3 305.3 412.6 308.8 413 309.5 415.5 310.8 418.3 311.7 423.4 313.1 423.5 313.1 425.2 311.1 426.1 310 426.9 308.3 426.9 307.3 426.9 306.4 427.7 305.1 428.7 304.4 431.3 302.6 430.4 300.6 425.2 297.2 420.6 294.2 420.7 294.3 417.9 295.4ZM439.4 296.5C438.6 297.6 438 299.3 438 300.2 438 301 437.2 302.1 436.4 302.6 434.9 303.4 434.9 303.6 436.4 305.9 438.7 309.4 442.2 311.4 444.8 310.7 446.8 310.3 454.5 301.3 453.6 300.6 449.4 297.6 443.8 294.4 442.5 294.4 441.6 294.4 440.2 295.4 439.4 296.5ZM391.2 298.5C389.9 300.6 388 305.9 388 307.7 388 308.1 390.7 309.6 394.1 311.2 399.7 313.7 400.4 313.8 401.9 312.5 402.8 311.7 404 309.2 404.6 307 406.1 301.5 404.9 299.5 398.9 297.7 392.8 295.9 392.9 295.9 391.2 298.5ZM251.4 300.8C247.7 302.4 245.9 305.5 245.8 310.4L245.8 315.2 251.8 317.3C258.5 319.7 259.4 319.4 261 313.9 261.7 311.5 262.7 310.2 263.6 310.2 265.8 310.2 260.6 304.8 258 304.4 256.9 304.3 255.6 303.2 255.1 302 254.1 299.8 254.1 299.8 251.4 300.8ZM203.3 305.6C198.1 311.8 198.5 315.7 204.5 320.1L207.3 322.2 211.1 318.7C216 314 216 311.2 211.4 307.7 209.4 306.3 207.4 304.5 206.9 303.8 206.1 302.8 205.4 303.1 203.3 305.6ZM226 304.4C225 305.3 223.6 308 223 310.5 221.6 315.7 222.2 316.6 229.1 318.9 233.5 320.4 233.7 320.3 235.7 318.4 238.1 316.3 239.9 310.2 239.2 307.3 238.1 303.2 229.6 301.4 226 304.4ZM181.6 310.9C181 313.8 180.3 317.1 180 318.2 179.2 321.3 183.5 322.9 186.8 320.7 189.3 319.2 191.7 314.3 191.7 310.7 191.7 308.8 191 308.2 187.8 307.3 185.6 306.8 183.5 306.1 183.2 305.9 182.9 305.7 182.1 308 181.6 310.9ZM748.4 307C747.8 307.3 746.6 309.8 745.7 312.6 743.8 319.4 745.1 321.6 751.9 323.1 754.6 323.6 756.9 324 756.9 323.9 757 323.7 758.3 321.1 759.7 318.1 762.5 312.2 762.3 310.6 758.2 308.6 755.5 307.3 749.9 306.4 748.4 307ZM770.8 308.3C770 309.3 769 311.9 768.8 314.3L768.2 318.4 773.7 320.8C776.7 322.1 779.6 323 780.2 322.8 782.2 321.9 784.3 318.1 784.8 313.6 785.5 309.4 785.4 309.3 782.1 307.9 777.4 305.9 772.9 306.1 770.8 308.3ZM723.6 310.4C723.2 311.6 722.3 313.9 721.6 315.6 720.1 318.8 721 321.3 723.8 321.3 724.5 321.3 726.2 322.4 727.5 323.7 730.7 326.9 732.4 325.8 734.3 319.6 735 317 735.9 314.6 736.4 314.3 737.8 312.9 736.9 311.9 732.8 310.2 727.1 307.7 724.4 307.8 723.6 310.4ZM513 314.8C513 315.5 511.9 317.4 510.6 319.2 509.3 320.9 507.9 323.4 507.5 324.8L506.9 327.2 501.1 321.9C495.8 317.1 494.4 316 494.4 317 494.4 317.9 510.6 330.9 511.9 331.2 521.3 332.9 522.2 332.6 522.2 328 522.2 326.9 522.9 325.6 523.6 325.4 524.4 325 525 323.8 525 322.5 525 320.7 524.2 319.9 520.6 318.3 518.1 317.3 515.5 315.8 514.6 315 513.3 314 513 313.9 513 314.8ZM534.3 318.1C533.7 319.4 533.3 320.8 533.3 321.3 533.3 321.8 532.7 322.8 531.9 323.6 530.5 325 530.5 325.3 532.5 327.4 538.5 333.9 543.8 333.4 547.3 326.1 549.2 322.3 549.3 321.7 548.1 319.5 546.6 317 544.1 316 538.6 315.8 535.6 315.7 535 316.1 534.3 318.1ZM464.5 319C463.7 319.7 462.9 321.6 462.5 323.1 462.2 324.5 461.3 326.3 460.6 326.9 458.5 328.6 459 329.6 462.8 331.2 464.6 331.9 466.9 333.1 467.7 333.9 468.9 335 469.4 334.8 471.5 332.6 472.8 331.2 474.1 328.8 474.4 327.3 474.8 325.7 475.3 323.9 475.6 323.1 475.8 321.9 474.7 321 471.4 319.5 465.9 317.2 466.2 317.2 464.5 319ZM440.2 322.9C438.7 324.8 436.9 326.9 436.2 327.6 434.9 328.7 435.1 329.2 437.8 331.6 441.4 334.8 446.1 335.2 450.1 332.3 454.9 328.9 455.1 327.4 451.3 323.1 446.8 318.1 443.7 318.1 440.2 322.9ZM228.5 326.6C227.1 326.9 223.1 335.4 223.1 337.9 223.1 339 235 343.5 236.5 343 239.3 341.9 241.5 332.9 239.6 330.3 238.3 328.5 231 326 228.5 326.6ZM203.3 329.5C199.2 333.9 199.8 338.6 205.6 344L208.4 346.8 212.1 342.9C217 337.6 216.9 334.6 212 330.2 210 328.3 207.8 326.9 207.1 326.9 206.5 326.9 204.7 328.1 203.3 329.5ZM178.2 331.9C177.4 333.7 176.7 336.8 176.6 338.6 176.4 341.9 176.5 342 180.8 343.2 183.2 344 185.2 344.9 185.2 345.5 185.2 347 187.6 346.3 189.6 344.2 191.6 342 193.7 334.9 193 332.9 192.3 331.3 188.4 329.6 183.7 329 179.7 328.4 179.6 328.5 178.2 331.9ZM773.1 330.6C772.7 331.5 772.2 333 772.2 333.8 772.2 334.6 771.2 336.2 769.9 337.4L767.6 339.6 770.8 342.4C774 345.3 779.5 347 781.4 345.8 783.1 344.8 786.2 338 785.9 335.9 785.7 334.6 783.9 333.2 779.9 331.5 774.4 328.9 774.1 328.9 773.1 330.6ZM725 333.9C721.1 340.1 721.5 343.2 726.4 346 732.6 349.5 735.5 348.6 736.7 342.8 737.1 340.7 737.8 339.8 739 339.8 742.6 339.8 740.6 336.7 735.6 334.6 733.6 333.8 731 332.3 729.9 331.3L727.9 329.4 725 333.9ZM796.8 331.3C795.3 332.2 793.3 334.2 792.6 335.6 791.3 338.1 791.3 338.2 794.4 340.9 799.2 344.9 801.7 345.7 804.3 344 806.7 342.4 806.8 341.5 805.3 334.7 804.4 330.8 803.8 330.1 801.9 329.8 800.6 329.7 798.3 330.4 796.8 331.3ZM747.1 335.3L743.3 339.1 745.6 341.5C749.3 345.7 751.3 347.2 753.7 347.2 757.1 347.2 760.2 344.7 760.2 341.9 760.2 340.5 760.8 339.4 762 339.2 764.5 338.5 764.4 337.9 760.8 334.4 756.3 330 752.1 330.3 747.1 335.3ZM205.3 351.7C204.4 352.6 203.4 354.6 203.1 356.2 202.8 358.2 201.9 359.3 200.4 359.6 198.2 360.2 198.1 360.3 199.6 362.5 200.5 363.8 201.9 364.8 202.7 364.8 203.5 364.8 205.2 365.6 206.5 366.7 209.9 369.4 212.5 369.1 213.9 365.7 214.5 364.2 216.1 362 217.4 361 220.5 358.6 219.4 356.7 214.3 354.9 212.3 354.3 210 352.9 209.1 351.9 207.2 349.6 207.1 349.6 205.3 351.7ZM227.8 351.8C227.3 352.8 226.9 354.2 226.9 354.9 226.9 355.6 225.8 357.1 224.5 358.3L222.3 360.5 226.7 364.1C230.4 367.1 231.6 367.6 234.7 367.4 238.1 367.1 238.5 366.9 239.6 363.5 240.3 361.6 240.8 358.8 241 357.3 241.2 354.8 240.7 354.4 235.6 352.3 229 349.5 229 349.5 227.8 351.8ZM181.7 353.7C178.9 356.3 176.7 360.8 177 363.2 177.2 364.7 178.4 365.6 180.9 366.5 183 367.1 185 368.2 185.6 369.1 186.5 370.3 186.9 370.3 189.2 368.5 190.6 367.4 191.7 365.6 191.7 364.6 191.7 363.5 192.3 361.9 193.1 361.1 194.4 359.6 194.1 359.2 190.3 355.6 185.6 351.3 184.5 351.1 181.7 353.7ZM796.9 353.9C796.1 355.1 795.2 358.1 794.9 360.6L794.3 365.3 799.4 367.4C806.7 370.5 808.2 369.5 809.7 361 810.6 356 809.2 354.1 803.7 352.9 801.1 352.3 798.8 351.9 798.6 351.9 798.3 351.9 797.6 352.8 796.9 353.9ZM774.2 354C773.7 354.6 773 356.3 772.7 357.7 772.3 359.1 771.2 360.8 770.1 361.6 768.4 362.7 768.4 363.1 769.5 364.4 770.3 365.3 772.1 366.6 773.6 367.3 775.2 368 777.1 369.1 778.1 369.7 780.4 371.4 782.6 369.5 784 364.8 784.6 362.7 785.6 360.3 786.2 359.5 787.7 357.8 786.7 356.9 780.4 354.7 776.4 353.3 774.9 353.1 774.2 354ZM726 356.7C725.5 358.3 725.3 361.5 725.6 364.2 726.1 368.1 726.7 369 729.7 370.9 731.7 372.1 733.5 373.1 733.7 373.1 735 373.1 738.9 365.8 738.9 363.4 738.9 360 737.6 358.1 733.3 355.6 728.8 353 727.2 353.1 726 356.7ZM749.1 357.4C748 358.9 746.9 361.7 746.6 363.4 746 366.6 746.1 366.7 751.4 369 754.4 370.3 757.4 371.3 758.1 371.1 758.9 370.9 760.2 369.1 760.9 366.9 761.7 364.6 762.8 362.6 763.5 362.3 765.7 361.5 765 360.3 760.5 357.4 754.8 353.8 751.7 353.8 749.1 357.4ZM591.7 373.2C576.1 374.3 558.8 377.6 554.8 380.2 546.9 385.4 547.4 397.6 555.7 402.9 559.3 405 563.5 404.9 575 402.3 596 397.6 623.9 399.2 647 406.3 651.5 407.6 656.9 408.8 659.3 408.8 669.7 408.8 675.7 396.8 669.5 388.1 666.9 384.4 661.2 381.9 646.9 378.2 628.7 373.6 610 371.9 591.7 373.2ZM227.5 378.2C225.6 381.2 224.4 384.2 224.7 385.1 225.2 386.8 228.6 388.9 230.7 388.9 231.4 388.9 232.8 389.7 233.9 390.8L235.9 392.7 237.7 390.5C238.6 389.2 240 386.4 240.7 384.3 242.2 379.7 241.5 377.9 237.4 376.6 235.9 376.1 234.1 375.1 233.2 374.4 232.5 373.7 231.6 373.1 231.2 373.1 230.9 373.1 229.3 375.5 227.5 378.2ZM362 373.8C332.4 378.2 318.1 382.8 314.5 388.8 312.1 393 312.4 399.6 315.4 403.4 318.1 407 322 409.3 325.7 409.3 327.2 409.3 331.4 408.2 335.1 406.9 358 399.2 388.1 397.5 412 402.7 416.9 403.8 421.8 404.6 423 404.6 426.4 404.6 431.3 401.9 433.4 398.9 437.2 393.6 435.3 383.2 429.7 379.9 427.3 378.4 417.3 376.1 406 374.5 397.6 373.3 368.2 372.8 362 373.8ZM182.6 376.4C179.7 378.8 177.1 385.8 178.1 388.4 178.7 390.1 181.9 391.4 187 392.2 190.6 392.8 190.7 392.8 192.5 388.6 193.5 386.3 195 384 195.9 383.5 197.4 382.7 197.2 382.4 194.4 380.6 192.6 379.6 190.7 378.7 190.1 378.7 189.5 378.7 188.2 377.7 187.2 376.4L185.4 374.1 182.6 376.4ZM776.1 375.2C775.6 375.8 774.7 378.1 774.2 380.3 773.5 382.4 772.2 384.8 771.1 385.6 768.4 387.4 769.4 389.3 774 390.6 776 391.2 778.3 392.6 779.1 393.7 780.9 396.3 783 395.4 784.7 391 785.6 389.1 786.9 386.9 787.7 386.4 790 384.6 788 381 783.3 378.7 781.2 377.6 779.4 376.2 779 375.5 778.4 373.8 777.4 373.7 776.1 375.2ZM797.7 376.6C797.4 378.1 796.4 380.7 795.5 382.6 794 385.6 793.9 386.2 795 387.9 795.7 388.9 797.5 389.9 799 390.3 800.5 390.6 802.2 391.5 802.9 392.2 804.7 394.4 806.1 393.7 809.6 388.2 814.6 380.3 814.4 379.4 805.6 376 799 373.5 798.2 373.6 797.7 376.6ZM206 377.7C204.5 378.6 202.4 380.3 201.5 381.4 199.6 383.3 199.7 383.4 203.2 387 208.1 392 210.8 391.9 216.5 386.7L220.8 382.6 219 380.6C216.8 378.1 212.8 375.9 210.5 375.9 209.5 375.9 207.6 376.7 206 377.7ZM750.3 381.3C748.6 383.7 747.2 386.6 747.2 387.7 747.2 390.3 752.9 393.8 757.2 393.9 760.5 394 760.7 393.8 761.9 390 762.6 387.9 763.7 386.1 764.4 386.1 765.8 386.1 766.1 385.3 765 383.6 764.5 383 754 376.8 753.2 376.9 753.2 376.9 751.9 378.8 750.3 381.3ZM728.8 380.7C728.8 381.9 729.4 385.6 730 388.9 731.1 394.6 731.3 394.9 733.7 394.7 736.9 394.4 738.9 392.9 740.5 389.1 742.3 384.6 741.3 382.9 735.9 380.6 730 378.1 728.7 378.1 728.8 380.7ZM230.2 398.7C229.4 399.4 228.7 400.9 228.7 401.8 228.7 402.7 227.9 404.5 226.8 405.9 224.9 408.3 224.9 408.5 226.4 410.2 227.2 411.1 229.3 412.2 230.9 412.6 232.5 412.9 234.4 413.6 234.9 414.1 236.6 415.4 240.3 412.8 242.2 409.2 244.2 405.3 242.7 401.9 238.1 399.3 233.8 396.9 232.1 396.8 230.2 398.7ZM181.9 400.2C181.5 400.7 180.6 403.6 180 406.4 178.6 412.2 179.2 413.3 183.5 414.3 185.1 414.5 187.1 415.5 188 416.2 190.5 418.4 194 415.1 195.4 409.3 196.8 403.5 196 402.4 189.5 400.5 183.9 398.8 182.7 398.7 181.9 400.2ZM205.6 401.1C201.9 411.1 202 413 206 413 207.4 413 209.4 414 210.6 415.4 213.2 418.1 214.2 417.9 215.7 413.7 216.4 412 217.8 409.7 218.8 408.6 221.4 405.6 220.2 403.3 214.6 401 208.6 398.5 206.7 398.5 205.6 401.1ZM775.2 403.4C773.1 405.5 771.3 408.1 771.3 409.1 771.3 411 776.2 415.7 778.2 415.7 778.9 415.7 779.7 416.5 780 417.3 780.6 418.6 781.2 418.2 784.3 415.3 788.6 411 789 408.2 785.5 405.3 784.1 404.2 782.1 402.4 781.1 401.4L779.2 399.5 775.2 403.4ZM799.5 402.3C796.7 405 796.2 405.9 796.7 408.1 797.5 411.5 804 418.1 805.9 417.3 808.1 416.5 812.3 409.5 812.3 406.8 812.3 403.9 807.5 399.1 804.7 399.1 803.7 399.1 801.4 400.6 799.5 402.3ZM162.5 404C162.2 405.6 161.7 409 161.2 411.4 160.5 415.5 160.6 415.9 162.5 417.2 166 419.5 169 417.6 171.2 411.5 172.3 408.6 172.9 405.8 172.5 405.5 172.1 405.1 169.8 403.9 167.4 402.9L163.1 401 162.5 404ZM751.1 403.2C749.1 405.8 747.8 410.6 748.3 413.5 748.7 415.8 752.8 417.7 757.6 417.9 761.4 418.1 761.5 418 762.7 414 763.3 411.7 764.4 409.5 765 409.1 767.6 407.5 762 403 755.5 401.4 753.5 400.9 752.6 401.3 751.1 403.2ZM231.5 422.1C229.3 425.4 226.9 430.8 226.9 432.9 226.9 434.6 233.6 437.9 237.1 438 240.1 438 241.7 436.2 241.9 432.9 242 431.6 242.7 430.1 243.4 429.7 245.5 428.4 244.2 425.6 241 424.6 239.4 424.1 237.2 422.7 236.1 421.5 235.1 420.4 234 419.4 233.8 419.4 233.6 419.4 232.6 420.6 231.5 422.1ZM208.1 422.4C206.7 423.5 203.8 430.2 203.4 433.3 203.3 434.1 204.8 435.5 206.9 436.4 209 437.4 211.4 438.8 212.3 439.6 213.1 440.4 214 440.8 214.2 440.6 216.9 437 220.4 430.5 220.4 429 220.4 426.7 218.1 424.5 213.6 422.7 209.5 421 210 421 208.1 422.4ZM777.3 424.6C776.1 425.9 774.6 429 774.1 431.6 772.8 436.9 773.2 437.9 778.1 440.2 783.5 442.7 784.9 442.2 787.5 436.8 788.8 434 789.8 431.2 789.8 430.5 789.8 428.5 788 426.9 785.9 426.9 784.9 426.9 783.1 425.8 781.9 424.5L779.5 422.2 777.3 424.6ZM801.1 424.3C799.2 426.4 798 429 796.9 433.4 796.4 435.5 796.9 436 801.4 438.4L806.4 441.2 808.6 439.1C813.4 434.5 813.7 426.9 809.1 423.7 806.2 421.7 803.4 421.9 801.1 424.3ZM159.4 425.7C157.9 429.5 157.1 434.8 157.9 436.9 158.1 438 159.8 439.6 161.5 440.7 165.5 443.1 169.1 442 170 438.2 170.4 436.9 171.2 434.4 171.9 433 173.6 429.6 173 428.8 165.6 425.6L160.4 423.3 159.4 425.7ZM181.5 427C179.2 432.1 179.1 436 181.3 436.8 182.1 437 184.6 438.1 186.9 439.1 190.6 440.8 190.9 440.9 192.7 439.3 195.1 437.1 197.5 428.8 196.2 427.2 195.1 425.9 187.6 423.1 185 423.1 183.8 423.1 182.6 424.5 181.5 427ZM751.5 427.2C748.1 432.4 748.7 439.8 752.5 439.8 753.2 439.8 755.4 440.5 757.1 441.4 760.3 442.9 760.4 442.8 762.5 440.6 765.1 438.1 766.9 431.6 765.6 429.2 764.4 427.2 759.3 425 755.6 425 753.9 425 752.5 425.7 751.5 427.2ZM160.2 449.7C155.8 458.9 156 459.9 162.1 463.1 167.7 465.8 169.3 465.2 171.8 459.3 174.4 453.2 173.8 451.8 168.5 449.6 166.5 448.8 164.5 447.5 164.3 446.8 163.3 444.4 162.3 445.2 160.2 449.7ZM207.9 448.8C207.6 450.2 206.5 452.4 205.5 453.8 203.2 457 203.8 458.4 208.4 461 213.3 463.8 215.5 463.1 219.6 457.5L223 453 221 451.1C218.7 449 212.6 446.3 210.2 446.3 209.2 446.3 208.3 447.2 207.9 448.8ZM801.7 447.9C800.9 448.8 799.6 451.4 798.8 453.6 796.9 458.5 797.8 460.6 801.9 461.6 803.5 461.9 805.6 463 806.4 463.8 807.9 465.3 808.2 465 812.8 458.1 816.2 453.1 817.2 450.9 816.2 450.9 815.4 450.9 812.8 449.9 810.4 448.6 805.3 445.8 803.5 445.7 801.7 447.9ZM182.9 449.4C182 450.6 181.3 453.7 181.2 456L181 460.3 186.2 462.4C192.3 464.9 194 464.4 195.9 459.6 199 452.3 196.8 448.4 189.1 447.5 184.8 447 184.4 447.2 182.9 449.4ZM779.4 448.2C776.9 449.6 773.1 458.3 774.1 460.2 775.4 462.6 781.3 465.1 783.9 464.4 785.8 463.9 791.7 456.6 791.7 454.5 791.7 453.9 782.3 447.2 781.5 447.2 781.2 447.2 780.3 447.7 779.4 448.2ZM754.4 449.7C751.9 452.7 749.9 457.5 750.2 460 750.4 461.9 751.2 462.7 753.2 463.2 754.8 463.7 757.2 464.6 758.7 465.4 761.7 466.9 763.9 465.8 763.9 463 763.9 462 765 459.9 766.3 458.3 767.7 456.8 768.6 455.4 768.4 455.2 766 453.1 757.9 448.1 756.9 448.1 756.4 448.1 755.2 448.9 754.4 449.7ZM803 470.8C800.7 472.5 797.5 482.1 798.8 483.4 799.3 483.9 801.9 485 804.9 486 809.6 487.7 810.3 487.7 811.6 486.5 812.3 485.6 813 484.3 813 483.4 813 482.5 813.8 480.6 814.9 479.3 817.1 476.4 816.9 475.9 811.6 472.2 806.9 469.1 805.8 468.9 803 470.8ZM185.5 471.5C184.9 472.1 183.8 474.8 182.9 477.5 180.8 483.1 181.6 484.6 186.6 485.6 188.3 485.9 190.2 486.9 190.6 487.8 191.5 489.2 191.8 489.2 193.9 487.1 195.2 485.8 196.3 483.9 196.3 482.6 196.3 481.2 196.9 480.2 198.1 479.9 200.5 479.3 200.5 478.6 198.1 475.6 196.9 474.2 194.3 472.6 191.5 471.8 185.7 470.1 186.5 470.1 185.5 471.5ZM208.4 472C207.9 473.1 207.4 474.6 207.4 475.4 207.4 476.2 206.5 477.8 205.4 478.9 203.5 480.7 203.5 480.9 205.1 482.1 206.1 482.8 207.3 483.3 208 483.3 208.6 483.3 210.5 484.4 212 485.8 214.4 487.7 215.4 488.1 216.6 487.3 218.7 486 221 481.6 221.8 477.5 222.4 474.2 222.3 474 218.9 472.6 212.9 470.1 209.5 469.9 208.4 472ZM161.4 472.7C159.8 473.8 157.4 480.1 157.4 483.3 157.4 484.3 166.9 488.9 169 488.9 170.9 488.9 173 485.8 174.2 481.2 175.1 477.3 175 476.6 173.6 475 172.8 474.1 170.7 473 169.1 472.7 167.5 472.3 165.6 471.9 164.8 471.7 164 471.5 162.5 471.9 161.4 472.7ZM756.3 473.1C753.5 475.3 750.6 481.9 751.4 484.4 751.8 485.4 753.4 486.5 755.6 487 757.6 487.6 759.5 488.6 760 489.4 761.6 492.3 765.7 488 765.7 483.4 765.7 482.4 766.7 481.5 767.9 481.1 769.8 480.6 769.6 480.3 765.1 475.9 762.5 473.3 759.9 471.3 759.4 471.3 759 471.3 757.5 472.1 756.3 473.1ZM778.9 472.5C778.3 473.1 777.6 474.8 777.3 476.2 776.9 477.6 775.7 479.4 774.7 480.1 772.9 481.4 772.9 481.5 774.5 483.2 775.4 484.3 777 485.4 778.1 485.7 779.2 486 781 487.1 782.1 488.2 784.1 489.9 784.4 490 786.5 488.6 788.9 487 792.4 477.1 791 475.9 790.6 475.6 787.9 474.4 785 473.3 781 471.9 779.5 471.7 778.9 472.5ZM210.7 493.7C209.9 494.8 209.3 496.3 209.3 497 209.3 497.7 208.2 499.3 206.9 500.6 205.7 501.8 204.9 503.3 205.2 504 205.4 504.6 208.1 506.5 211.3 508.1 216.8 511 217.1 511 218.6 509.5 219.4 508.6 220.8 505.8 221.7 503.3 223.4 498 222.8 496.8 218 495.8 215.7 495.5 214.4 494.6 214.2 493.4 213.5 491.1 212.5 491.2 210.7 493.7ZM185.8 496.3C183.5 499 181.8 505.6 182.8 507.3 183.6 508.6 193.2 511.4 194.8 510.8 195.6 510.6 196.5 508.8 196.9 506.9 197.1 505.2 198.3 503.1 199.4 502.3 200.8 501.3 201 500.7 200.1 499.6 199.4 498.9 197.8 498 196.3 497.7 194.9 497.4 193 496.3 192 495.3 189.8 492.9 188.5 493.1 185.8 496.3ZM804 494.6C803.4 495.3 802.3 497.5 801.5 499.5 800.6 501.5 799.5 503.4 799 503.7 797 504.9 799.4 507.4 804.4 509.3 811.8 512 811.9 511.9 815.2 504.7 817.3 500.3 817.1 499.7 812.9 496.9 808.1 493.8 805.3 493.1 804 494.6ZM827 494.6C826.6 495.3 825.8 496.9 825.5 498.1 825.1 499.4 824.3 501.4 823.5 502.5 822.4 504.2 822.5 504.7 824.1 506.8 825.1 508.1 827 509.4 828.4 509.6 829.9 510 831.8 510.5 832.8 510.8 834.4 511.3 834.4 510.9 833.9 505 832.9 494.5 832.5 493.5 830.1 493.5 829 493.5 827.6 494.1 827 494.6ZM161.8 496C160.2 497.8 158 506.1 158.8 507.3 159 507.8 161.6 509.3 164.4 510.6L169.6 513.1 171.9 510.8C173.5 509.4 174.4 507.1 174.7 504.3 175.5 498.4 173.8 496.7 166.1 495 164.1 494.5 163 494.8 161.8 496ZM757.8 495.2C757.2 495.6 755.6 498.1 754.3 500.6 753 503.3 751.4 505.6 750.9 505.6 748.9 505.6 751.4 508.3 755.6 510.6 761.9 514.1 763.6 513.5 767 507.3 769.4 502.9 769.7 501.9 768.6 500.6 768 499.7 766.6 499.1 765.6 499.1 764.6 499.1 762.8 498.1 761.5 496.8 758.9 494.2 759.2 494.3 757.8 495.2ZM779.4 498.1C775.4 502.8 774.8 504.8 776.6 507.4 778.2 509.7 783.1 512 786.5 512 788.1 512 789 511.3 789.7 509.1 790.3 507.5 791.4 505.4 792.2 504.5 794.4 502.2 793.2 500.2 789.2 498.5 787.2 497.7 785 496.4 784.2 495.7 782.8 494.5 782.3 494.7 779.4 498.1ZM210.7 518.7C209.9 519.8 209.3 521.4 209.3 522.2 209.3 523 208.6 524.7 207.9 526.2 206.4 529 205.8 528.3 214.4 533.6L218.1 535.9 220.7 531.9C225.6 524 224.9 520.1 217.7 517.7 213.2 516.2 212.3 516.4 210.7 518.7ZM804.4 518.7C801.9 522.8 799.8 528.6 800.3 530 800.6 530.7 802.5 531.9 804.6 532.5 806.8 533.1 809 534.4 809.6 535.4 810.7 536.9 810.9 536.9 812.2 535.5 813.9 533.5 817.6 525.8 817.6 524.4 817.6 523.5 810.4 518.7 806.4 516.9 806.1 516.8 805.2 517.6 804.4 518.7ZM187.8 519.7C186.6 521 184.7 523.5 183.6 525.3L181.7 528.5 183.6 530.4C186 532.5 192 535.2 194.6 535.2 195.6 535.2 196.6 534.4 196.9 533.5 197.2 532.7 198.2 530.2 199.3 528 200.3 525.7 201 523.8 200.7 523.6 200.6 523.4 198.9 522.2 197 521 191.8 517.4 190.1 517.1 187.8 519.7ZM829.3 519.5C828 520.6 826 522.9 824.9 524.6L822.9 528.1 825.1 529.7C832.8 535.6 836.1 535.5 836.1 529.4 836.1 519.1 833.9 515.9 829.3 519.5ZM780.5 520.6C779.9 521.7 779.1 523.6 778.7 524.9 778.4 526.2 777.6 527.3 776.9 527.3 774.4 527.3 775.2 529.3 778.9 532.1 784.2 536.5 787.1 536.2 790.6 531.2 792 529.1 793.5 526.9 793.8 526.3 794.5 525 785.6 518.5 783.1 518.5 782.2 518.5 781 519.4 780.5 520.6ZM163.1 520.6C162.7 521.2 161.9 523.1 161.6 524.8 161.2 526.5 160.4 528.1 159.6 528.4 158.5 528.8 158.6 529.4 160.4 531.3 163.5 534.6 167.9 536.3 170.8 535.2 175.3 533.5 178.6 524.8 175.7 522.5 174.6 521.7 166.9 519.4 165 519.4 164.5 519.4 163.7 520 163.1 520.6ZM755.2 524.1C753.3 526.1 751.9 528.3 751.9 529.1 751.9 529.8 753.1 531.7 754.7 533.2 758.8 537.3 762.5 537.1 767.6 532.6 772.3 528.4 772.2 527.2 766.6 523.1 761.4 519.4 759.3 519.6 755.2 524.1ZM187 545.5C185.1 548.7 184.3 551.1 184.4 553.1 184.7 555.8 185.1 556.1 190.6 557.5 197 559.2 196.7 559.4 199.6 552.1 201.6 547.4 201.3 545.4 198.6 545.4 198.1 545.4 196.1 544.4 194.3 543.1 192.4 541.8 190.6 540.7 190.4 540.7 190.2 540.7 188.7 542.9 187 545.5ZM211.1 543.1C210.6 544.4 210.2 546 210.2 546.6 210.2 547.2 209.5 548.7 208.7 549.8 207.5 551.6 207.5 552.2 208.4 553.3 209.9 555.2 213.6 557 217.3 557.8 220.1 558.4 220.3 558.3 223 552.7L225.7 546.9 223.6 544.8C221.8 543 216.2 540.7 213.1 540.7 212.5 540.7 211.6 541.9 211.1 543.1ZM805.7 542.1C803.6 543.7 800.4 553 801.4 554.5 802.2 555.9 811.7 558.7 813.2 558.1 814.1 557.8 815.2 555.8 815.7 553.7 816.3 551.6 817.3 549.7 818.1 549.4 820 548.6 818.3 545.9 814.1 543.1 810.1 540.4 808.6 540.2 805.7 542.1ZM827.6 542.3C823.3 547.2 823.4 550 827.7 554.1 830.6 556.9 834.3 557.5 836.6 555.6 838.8 553.7 838.4 544.9 836.1 542.6 833.8 540.3 829.4 540.2 827.6 542.3ZM164.5 544.2C163.8 545.1 162.9 546.9 162.5 548.2 162.1 549.6 161.1 551.1 160.1 551.5 158.4 552.2 158.6 552.6 162.2 555.4 166.9 559 169.9 559.9 171.9 558.2 173.5 556.9 179.1 549.1 178.5 548.8 178.4 548.7 176.3 547.2 173.9 545.6 169.1 542.2 166.7 541.9 164.5 544.2ZM780.3 544.3C779.4 545.3 778.4 548.1 778.1 550.6 777.4 556.3 779.4 558.4 785.8 559L790.3 559.4 792.7 554.2C795 549.1 795 548.9 793.4 546.9 792.5 545.6 790.5 544.4 789 544.2 787.5 543.9 785.3 543.3 784.1 543.1 782.6 542.7 781.4 543.1 780.3 544.3ZM757.7 544.6C755.4 547.5 753.1 554.4 753.9 555.8 755.2 558.2 759.7 560.2 763.8 560.2 766.9 560.2 767.8 559.8 768.9 557.6 769.6 556.1 770.4 553.3 770.6 551.5 770.7 548.6 770.4 547.6 768.5 546.2 765.4 543.9 759.1 543 757.7 544.6ZM211.9 567.2C211.4 568.7 210.3 571.3 209.5 572.9 207.8 576.5 208.8 578.2 213.6 580.3 220.8 583.2 224.4 581.1 225.6 573 226.1 569.2 225.9 568.5 223.9 567.2 222.7 566.4 219.7 565.5 217.3 565.2 213.2 564.6 213 564.7 211.9 567.2ZM828.1 567.1C827.2 568.6 826.5 571.5 826.5 573.9 826.4 578 826.5 578.1 829.6 579 831.4 579.4 833.6 580.5 834.5 581.3 835.8 582.4 836.6 582.6 837.8 581.8 839.1 580.9 839.4 579.4 839.3 573.7 839.2 569.8 838.9 566.4 838.7 566.2 838.4 565.9 836.4 565.5 834.1 565.2 830.2 564.6 829.7 564.8 828.1 567.1ZM164.9 567.8C164.4 569 163.3 571.7 162.5 573.9 160.9 577.6 160.9 577.9 162.4 579.5 164.4 581.7 171.4 583.7 173.9 583 176.3 582.1 178.2 576.5 177.9 571 177.8 570 176.2 568.6 173.9 567.6 168.5 565.2 165.9 565.3 164.9 567.8ZM187.5 567.9C186.8 569.1 185.8 571.9 185.6 574.3L184.9 578.5 188.8 579.7C190.9 580.4 193.1 581.4 193.6 582.1 196.1 585 199.4 582.2 201.5 575.5 203.1 570 202.1 568.1 197.4 566.7 191.9 565.2 189.1 565.5 187.5 567.9ZM804.6 567.1C803 569.1 801.9 576 802.9 578 803.5 579.2 810.6 581.5 813.9 581.5 815.5 581.5 817.5 578.6 818.4 575.3 819.7 570.8 818 568.1 813.2 566.8 808.4 565.4 806 565.5 804.6 567.1ZM780.2 569.2C778.2 573.1 777.6 577.5 778.6 579.4 779.7 581.6 784.2 583.3 788.4 583.3 791.2 583.3 791.6 583 793.4 577.7 795.1 573.1 795.3 571.9 794.4 570.7 792.5 568.4 788.2 566.7 784.8 566.7 782.1 566.7 781.3 567.1 780.2 569.2ZM756.9 569.7C756.1 571 755.4 574.1 755.3 576.5L755.1 580.7 759.1 581.9C761.2 582.6 763.7 583.7 764.4 584.4 765.7 585.4 766.3 585.2 768.1 583.1 769.3 581.7 770.6 578.7 770.9 576.3 771.8 570.7 769.6 568.4 763.1 567.8 759 567.4 758.3 567.6 756.9 569.7ZM212.6 590C211.9 591.2 210.7 594 210.2 596.2 209.3 599.9 209.3 600.5 210.7 601.6 211.7 602.2 213.1 602.8 214 602.8 214.8 602.8 216.6 603.6 218 604.7L220.4 606.6 223.1 603.9C226 600.9 227.7 595.1 226.2 592.7 225.1 590.8 221.8 589.3 217.4 588.5 214.4 588 213.8 588.2 212.6 590ZM829 590.4C828.1 591.8 827.4 594.7 827.4 597 827.3 601.2 827.4 601.3 831.2 602.8 833.4 603.6 835.6 604.7 836.3 605.4 837.1 606.2 837.8 606.1 839.1 604.9 840.4 603.7 840.7 602 840.7 596.8L840.7 590 836.7 589C831 587.6 830.8 587.6 829 590.4ZM189.4 590.9C188.6 592 188 593.4 188 594 188 594.4 187.3 596.1 186.6 597.6 185.3 600.1 185.3 600.5 187.1 602.4 188.8 604.2 195 606.5 198.1 606.5 199.8 606.5 202.8 600.6 202.8 597 202.8 593.1 201.1 591.1 196.5 589.8 191.7 588.5 191 588.6 189.4 590.9ZM806.1 590.3C804.6 591.8 802.8 597.3 802.8 600.3 802.8 601.2 803.9 602.3 805.4 602.9 806.8 603.4 809.1 604.4 810.5 605.2 811.9 605.9 813.7 606.5 814.4 606.5 817.4 606.5 821.1 596.6 819.4 593.3 817.6 590.1 808.4 588 806.1 590.3ZM782.4 592.2C781.9 593.5 781.5 595.2 781.5 595.9 781.5 596.6 780.6 597.7 779.6 598.3 778.6 599 777.8 599.8 777.8 600.2 777.8 601.7 781.9 604.6 784.1 604.6 785.5 604.6 786.5 605.3 786.8 606.5 787.4 608.8 790 608.9 791.9 606.7 792.7 605.8 794.2 602.9 795.3 600.2L797.1 595.2 791.2 592.5C783.9 589.3 783.5 589.2 782.4 592.2ZM164.4 594.6C163.5 596.8 162.1 599 161.4 599.6 160 600.6 160.2 600.8 162.6 602.3 164.1 603.2 166.4 604.7 167.8 605.6 173.1 609.4 176.8 607.2 178.5 599.4 179.6 594.6 179.2 593.9 174.2 592.1 167.6 589.8 166.1 590.2 164.4 594.6ZM760 592.3C757.6 595.1 755.5 600 755.7 602.1 755.9 603.6 757.1 604.5 759.7 605.4 761.8 606 763.9 607.1 764.4 608 766.5 610.6 770.4 606.6 770.4 601.9 770.4 600.6 771 600 772.2 600 775.1 600 774.4 598.6 769.8 594.5 765.2 590.5 762.2 589.8 760 592.3ZM168.3 613.6C166.4 615.8 163 622.8 163 624.4 163 625.3 165.4 627.1 168.4 628.6 174.6 631.9 175.5 631.6 178.7 625.3 181 620.6 180.3 618.4 175.6 616.1 174 615.3 172 614 171.2 613.3 169.9 612.2 169.5 612.2 168.3 613.6ZM784.4 614.2C783.3 615.4 781.9 617.6 781.4 619.2 780.2 622.9 782.2 627.8 786.4 630.7L789.2 632.8 792.8 628.8C796.7 624.4 797.2 621.2 794.5 618.7 792.3 616.7 786.9 612 786.7 612 786.5 612 785.6 613 784.4 614.2ZM830 614.4C829.2 615.6 828.2 618.5 828 620.8 827.6 624.7 827.7 625 830.2 625.9 831.7 626.4 834.1 627.4 835.5 628.2 837.4 629.3 838.6 629.4 839.9 628.7 841.4 627.9 841.7 626.7 841.7 620.5 841.7 613.7 841.5 613.1 839.6 612.6 834.9 611.4 831.6 611.9 830 614.4ZM189.8 615.4C189.4 616.9 188.2 619.3 187.5 620.7 186.1 623.2 186.1 623.6 187.7 625.1 188.6 625.9 191.3 627.5 193.7 628.5L198.1 630.5 201.4 626.1C205.3 621.1 205.4 618.1 201.8 615.5 200.4 614.5 197.4 613.4 195 613.2 191 612.8 190.7 612.9 189.8 615.4ZM760.8 616.5C756.1 621.3 756.2 624.2 761.3 629.4 763.4 631.6 765.7 633.3 766.3 633.3 766.9 633.3 768.5 632 769.8 630.5 773.4 626.2 773.1 621.4 768.9 616.7 767 614.6 765.3 613 764.9 613 764.5 613 762.7 614.5 760.8 616.5ZM807.8 614.1C807.3 614.7 806 617.1 804.9 619.4L802.8 623.6 804.7 625.3C805.8 626.1 807.8 627.1 809.2 627.4 810.5 627.7 812.6 628.3 813.8 628.8 815.3 629.4 816.4 629.4 817.1 628.7 818.3 627.8 820.4 620.2 820.4 617.1 820.4 614 809.4 611.4 807.8 614.1ZM146.5 622.9C146.8 630.9 146.8 631 149.2 631.3 151.3 631.6 152 630.9 154.5 626.3 156.1 623.3 157.4 620.6 157.4 620.4 157.4 619.7 148.1 614.8 146.9 614.8 146.6 614.8 146.4 618.4 146.5 622.9ZM191.4 637.8C189.7 639.7 188 644.9 188 647.8 188 649.4 188.7 650.2 191.8 651.1 193.9 651.7 196 653 196.6 653.8 198.1 656.1 200 654.9 201.9 650.4 202.9 648.1 204.1 646.3 204.6 646.3 206.1 646.3 205.7 641.9 204.2 640.4 203.3 639.5 200.9 638.5 198.8 638 196.7 637.4 194.4 636.8 193.8 636.6 193.2 636.4 192.1 636.9 191.4 637.8ZM785.3 638.5C783.5 640.7 783.1 641.9 783.4 644.2 783.4 644.5 782.6 645.2 781.5 645.6 778.3 646.8 779.6 649.2 784.8 651.8 787.4 653.1 790.3 654.7 791.1 655.5 792.4 656.6 792.8 656.2 794.5 652.2 795.6 649.7 797 647.3 797.8 646.9 800.7 645.3 799.2 642.5 794 640.3 791.2 639 788.9 637.6 788.9 637 788.9 635.4 787.2 636 785.3 638.5ZM834.5 637.5C833.4 638.2 831.3 640.9 829.7 643.4L826.9 648.1 830.9 649.9C835.3 652 838.1 652.3 840.8 650.9 842.2 650.1 842.6 648.9 842.6 644.4 842.6 639.3 842.4 638.9 839.8 637.5 836.6 635.8 836.9 635.8 834.5 637.5ZM168.1 638.5C167.3 639.3 166.7 640.4 166.7 640.9 166.7 641.4 165.9 643.3 165.1 645.1 162.8 650 165.3 652.7 173.2 654.2 177.5 654.9 179.3 653.2 180.1 647.8 180.9 642.5 180.1 640.2 177 639.1 172 637.1 169.6 637 168.1 638.5ZM807.2 640.9C805.3 643.1 803.7 645 803.7 645.4 803.7 645.6 805.6 647.7 807.8 649.9 813.1 655.1 816.3 655 819 649.5 820 647.5 821.4 645.5 822 645.1 824.4 643.6 816.5 637 812.4 637 811.6 637 809.3 638.8 807.2 640.9ZM147 647.1L147.3 655.6 150.5 655.6C154.1 655.6 155.8 653.1 156.9 646.8 157.7 642.1 155.9 640.2 150.5 639.4L146.8 638.7 147 647.1ZM193.1 662.3C188.1 666.6 188.3 669.4 193.8 674.8 197.9 678.9 198.1 679 200.3 677.5 202.6 676 205.6 670.7 205.6 668 205.6 666.5 198.8 659.3 197.4 659.3 197 659.3 195.2 660.6 193.1 662.3ZM833.1 660.9C832.1 661.9 831.5 663.7 831.5 665 831.5 666.7 830.8 667.5 829.5 667.9 826.6 668.6 828.8 671.8 833.8 674 836.1 675 838 676.3 838 676.8 838 677.3 838.7 677.8 839.6 677.8 842 677.8 843.5 674 843.5 667.7L843.5 662.2 839.8 660.7C835.1 658.9 834.9 658.9 833.1 660.9ZM807.9 665.4C804.9 671.9 805 673 808.1 674.3 813.9 676.8 815.6 678.6 815.6 681.9 815.5 684.7 815.3 685 813.7 684.2 811.6 683.1 809.6 684.3 808.7 687.3 808.4 688.4 807.5 690.1 806.8 690.9 805.6 692.2 805.6 692.9 806.7 695 807.6 696.9 809.3 698.1 813.6 699.5L819.3 701.6 820.4 697.3C820.9 695 821.8 692.4 822.1 691.7 822.7 690.7 821.9 689.2 819.8 686.8 818 684.8 816.7 682.3 816.7 681 816.7 677.8 820.3 670 822.6 668.4 823.1 668.1 823.1 666.8 822.8 665.4 822.3 663.5 821.2 662.8 817.4 661.6 814.8 660.8 812 660.2 811.4 660.2 810.7 660.2 809.2 662.5 807.9 665.4ZM168.2 662.8C166.2 665 164.7 672.1 165.8 674.3 166.3 675.2 166.9 675.9 167 675.9 167.2 675.9 169.5 676.3 172.1 676.9 178 678 180 677.1 181.4 673.1 183.4 667.2 182.9 665.9 177.2 663.4 171 660.6 170.2 660.6 168.2 662.8ZM784.4 664.3C781.8 668.3 781.9 672.3 784.5 674.7 787.6 677.6 792.9 680.1 793.3 678.9 793.5 678.3 794.9 676.4 796.4 674.4 797.9 672.5 799.1 669.9 799.1 668.4 799.1 666.2 798.3 665.6 794.1 663.5 787.5 660.5 786.7 660.5 784.4 664.3ZM147.9 669.6C148.3 675 148.9 677.6 150.1 678.8 151.6 680.3 151.8 680.3 154 678 156.7 675.1 158.3 671.3 158.3 668 158.3 665.6 155.8 664.1 149.8 662.6L147.4 662 147.9 669.6ZM194.5 683.9C192 685.7 189.8 690.6 189.8 694.4 189.8 697.5 191.2 698.5 197 699.8 201.9 700.9 204.2 699.4 205 694.4 205.4 692.2 206.2 690.5 207.1 690.1 208.4 689.5 208.4 689.4 206.9 688.2 205.9 687.6 204.4 687 203.5 687 202.5 687 200.7 686 199.4 684.7 196.7 681.9 197.2 682 194.5 683.9ZM833.7 686.5C829.8 690.4 829.6 693.5 833 696.2 834.4 697.3 836 698.1 836.7 698.1 837.3 698.1 838.2 698.8 838.7 699.6 839.2 700.5 840.4 700.9 841.3 700.7 842.8 700.5 843.1 699.4 843.3 693.3L843.6 686.3 840.6 684.8C839 684 837.5 683.3 837.2 683.3 837 683.3 835.5 684.7 833.7 686.5ZM169.9 685.7C169.2 686.6 168.5 687.8 168.5 688.5 168.5 689.3 167.5 690.9 166.2 692.2 165 693.4 164.2 695 164.4 695.6 164.9 697 174.5 702.8 176.3 702.8 178.7 702.8 180.8 700.2 182 695.6 183.8 688.5 183.6 688.2 174.4 685.3 171.9 684.5 171 684.6 169.9 685.7ZM764.1 686.7C761.7 688.3 759.3 692.6 759.3 695.2 759.3 696.2 760.3 697.7 761.6 698.5 765.8 701.3 766.1 704 763 711.8 758.9 721.9 759.1 722.8 765.3 724.5 771.8 726.5 773.3 726.1 774.3 722.6 774.6 721 775.6 719.2 776.4 718.5 779.1 716.3 778 714.3 773.1 712.2 767.7 709.9 767.3 708.2 771.2 703.4 777 695.9 777.1 691.2 771.4 687.3 767.7 684.8 766.9 684.7 764.1 686.7ZM786.4 686.3C785.7 687.4 783.8 692.2 782.8 695.4 782.2 696.9 790.3 702.8 792.8 702.8 794.4 702.8 797.2 699.9 797.2 698.4 797.2 697.9 798.2 696 799.4 694.2 802 690.4 801.9 690.1 795.3 687.1 790.6 684.9 787.5 684.7 786.4 686.3ZM148.5 690.9C148.8 693.6 149.1 697.2 149.1 698.8 149.1 701.5 149.4 701.9 151.6 701.9 153.2 701.9 155.2 700.6 157.7 698L161.4 694.1 157.1 690.1C154.3 687.4 152 686.1 150.4 686.1 148 686.1 147.9 686.2 148.5 690.9ZM811.8 708.1C810.8 709.1 810.2 710.4 810.2 711.1 810.2 711.8 809.4 713.7 808.2 715.5 805.7 719.4 806.7 720.6 813.6 722.9 819.2 724.6 821.6 724 822 720.5 822.2 719.4 823.3 717.9 824.5 717 827.3 715.2 826.7 713.3 822.3 711.1 820.4 710.2 818.3 708.7 817.7 708 816 706 813.6 706.1 811.8 708.1ZM835.4 707.7C834.7 708.4 834 710.3 833.7 711.9 833.3 713.5 832.6 714.8 831.9 714.8 827.6 714.8 830.6 719.6 836 721.4 837.9 721.9 840.1 723.1 840.9 723.8 843.4 726 844.8 722.3 844.1 715.4 843.5 710.5 843.1 709.5 840.9 708.5 836.7 706.4 836.5 706.4 835.4 707.7ZM169.6 711.9C166.2 715.5 165.4 715.9 162.7 715.5 160.9 715.2 157.6 713.7 155.1 712.1 152.6 710.6 150.2 709.3 149.8 709.3 149.4 709.3 149.1 712.8 149.1 717 149.1 725.4 150 727.2 153.8 726.7 155.8 726.4 156.4 725.7 158.5 720.8 160 717.4 162.8 716.8 164.7 719.4 165.6 720.4 167.9 721.8 169.9 722.4 174.5 723.9 175 726.2 171.9 731.7 167.6 739.2 167.9 743.9 172.9 748.5 175.3 750.7 175.5 750.8 177.8 749.4 186.6 743.8 187.5 739.3 181 733.1 178.7 731 176.9 728.8 176.9 728.4 176.9 728 178.1 726.1 179.6 724.4 183.7 719.7 183.4 715.6 178.8 711 176.9 709 174.8 707.5 174.4 707.5 174 707.6 171.9 709.5 169.6 711.9ZM192.5 712.6C189.3 718.4 189.4 719.7 194 722.2 198.5 724.7 198.8 726.1 195.5 731.1 191.9 736.6 191.3 738.7 192.5 741.9 193.3 744.2 200.9 750 203 750 203.3 750 204.3 748.7 205.1 747.2 205.9 745.6 206.3 744.4 205.9 744.4 205.6 744.4 206.3 743.1 207.3 741.3 209.8 737.3 209.7 736.5 206.9 735.7 203.4 734.8 199.9 731 200.6 729 200.9 728.1 202.9 724.4 204.8 721 206.9 717.5 208.2 714.2 208.1 713.5 207.4 711.9 199.4 707.4 197.1 707.4 196.1 707.4 194.4 709.4 192.5 712.6ZM787.7 709C787.5 709.4 786.8 711.4 786.1 713.4 785.5 715.5 784.5 717.6 784.2 718.1 782.1 720.6 786.3 724 793.2 725.5 796 726 796.2 725.9 798.9 720.3L801.7 714.5 799.5 712.4C796.8 709.6 788.7 707.3 787.7 709ZM811.8 731.9C810.1 733.5 808.3 739 808.3 742.3 808.3 745 811.6 747 816.9 747.8 821 748.3 821.3 748.2 822.3 745.7 822.9 744.3 823.9 741.8 824.5 740.2 825.9 736.9 825.1 734.8 821.5 733 817 730.7 813.3 730.3 811.8 731.9ZM836.8 731.6C834.6 732.9 832.4 738 832.4 741.7 832.4 744.8 833.7 745.6 840.6 746.8L844.6 747.4 844 741.1C842.9 730.8 841.4 728.9 836.8 731.6ZM787.9 734.8C787.3 736.3 786.5 738.4 786 739.5 785.6 740.7 784.8 741.7 784.3 741.7 783.7 741.7 783.7 742.5 784.4 743.9 785.6 746.5 791.1 749.1 795.3 749.1 797.6 749.1 798.1 748.5 799.2 745.6 799.7 743.7 800.6 741.6 801.1 741 801.7 740.4 801.9 738.9 801.5 737.6 800.9 735.3 798.1 733.8 792.4 732.8 789.3 732.2 788.9 732.4 787.9 734.8ZM149.2 735.4C149.2 737.4 149.3 737.4 150 735.6 150.5 734.5 150.6 736.4 150.3 740.6 149.8 746.9 149.9 747.3 152.2 749.5L154.6 751.8 156.9 749.7C158.2 748.6 159.9 745.7 160.6 743.4 162.2 737.9 161 735.8 155.2 734.4 149.5 733 149.1 733.1 149.2 735.4ZM763.6 735C762.8 735.8 761.8 738.4 761.2 740.6 760.5 744.1 760.6 744.8 762.1 746.4 763.1 747.3 764.6 748.1 765.6 748.1 766.5 748.1 768.1 748.8 769.3 749.6 772.6 751.9 775.5 749.5 776.9 743.1 778.3 736.9 777.8 735.6 773.4 734.4 768.3 732.9 765.3 733.1 763.6 735ZM197.4 755.1C195.7 756.5 194 759.4 193.1 762.1 191.1 767.8 191.6 768.4 199 770.8 204 772.5 204.1 772.5 205.7 770.4 206.7 769.3 207.4 767.7 207.4 766.9 207.4 766 208.3 764.4 209.4 763.2 211.9 760.7 211.2 759.8 206 758.1 204 757.3 201.9 755.8 201.3 754.7L200.3 752.7 197.4 755.1ZM172.8 755.7C171.9 756.9 171.3 758.2 171.3 758.8 171.3 759.4 170.5 761.4 169.4 763.3 167.4 766.9 167.5 769.4 169.7 769.4 170.4 769.4 172.5 770.3 174.5 771.3 179.5 773.9 181.2 773.6 183.3 770.1 186.3 765.3 185.7 762.9 180.6 758.1 178.1 755.6 175.6 753.7 175.1 753.7 174.6 753.7 173.5 754.6 172.8 755.7ZM835.6 758.8C833.9 761.7 832.4 764.5 832.4 765.2 832.4 767.3 838.4 770.5 842.8 770.6L846.8 770.8 846.5 764.4C846.1 757.6 845.6 756.6 841.5 754.8 839 753.8 838.8 754 835.6 758.8ZM811.1 757.4C810.6 758.3 809.9 761 809.6 763.1 808.9 768.6 811.2 770.7 817.8 770.8 822.8 770.8 822.8 770.8 825.6 764.5 826.8 761.7 826.9 760.8 825.8 759.6 822.4 755.5 813 754 811.1 757.4ZM150.1 757.3C149.4 757.8 148.7 760.6 148.4 764.4 148 770.1 148.1 771 149.8 772.6 152.9 775.3 155.8 773.9 159.6 767.9L162.9 762.7 158.1 759.6C152.9 756.3 152 756.1 150.1 757.3ZM766.9 758.5C765.2 760.5 761.1 767.8 761.1 769 761.1 770.1 767.6 772.2 770.8 772.2 773.2 772.2 775 771.4 777.5 769.1L780.9 766 778.3 762.9C775.6 759.5 771.5 756.5 769.8 756.5 769.3 756.5 768 757.4 766.9 758.5ZM789.1 757.6C788.6 758.2 787.9 760.2 787.5 761.9 787.1 763.8 786.2 765.2 785.2 765.5 782.6 766.1 784 768.3 787.8 769.4 789.7 770.1 792.1 771.6 793.2 773L795.2 775.3 798 772.5C800.7 769.8 803.3 763 802.5 760.6 802 759.5 794 756.5 791.4 756.5 790.6 756.5 789.6 757 789.1 757.6ZM220.1 779.4C218.4 781.3 216.7 786.2 216.7 789.2 216.7 790.3 218.1 791.5 221.1 792.7 223.5 793.7 226.1 795.2 226.9 795.9 228.1 797 228.7 796.5 231.4 791.3 233.1 788 234.3 784.6 234.1 783.7 233.6 781.4 229.7 778.9 225.5 778.2 222.4 777.8 221.4 778.1 220.1 779.4ZM790.9 781C789.3 782.8 787.9 785 787.9 785.9 787.5 791 789.4 794.4 793.9 796.8 797.8 798.9 799.4 798 801 792.8 801.7 790.9 802.8 788.9 803.5 788.3 805.7 786.8 804.2 784.4 799.6 782.4 797.4 781.5 795.2 780 794.7 779.2 794 777.9 793.4 778.1 790.9 781ZM838.2 778.9C837.7 779.5 836.9 781.1 836.6 782.4 836.2 783.7 835.3 785.5 834.4 786.4 833.1 787.9 833.2 788.2 836.1 791.2 839.8 795 841.9 795.8 844.4 794.5 848.1 792.5 849.1 790.6 849.1 786.1 849.1 782.4 848.7 781.5 846.8 780.2 843.4 778 839.4 777.4 838.2 778.9ZM196.9 780.7C196 781.9 195.4 783.2 195.4 783.7 195.4 784.2 194.4 785.6 193.4 786.8 191.7 788.5 191.6 789.1 192.7 790.4 193.8 791.8 203 796.3 204.6 796.3 205.4 796.3 211.1 785.6 211.1 784.3 211.1 783.2 201.9 778.7 200 778.7 199 778.7 197.6 779.6 196.9 780.7ZM815.6 779.6C814.7 780.2 812.8 782.4 811.2 784.7L808.4 788.8 812.1 792C816.1 795.7 819.5 796.3 823 793.9 824.2 793.1 825 791.5 825 790.1 825 788.5 825.6 787.6 826.9 787.3 829.4 786.7 828.9 785.5 824.9 782.3 821.2 779.4 817.8 778.3 815.6 779.6ZM173.3 780.7C172.9 781.4 171.6 783.7 170.6 785.9L168.7 789.8 171.5 792.6C176.4 797.6 181.9 797.4 185.1 792.2 188.9 786.1 187.1 782.3 179.6 780.6 174.4 779.4 174.4 779.4 173.3 780.7ZM764.8 783.3C764.2 785 763.5 788.1 763.5 790.1 763.4 793.7 763.6 794 766.8 794.9 768.6 795.4 770.7 796.4 771.6 797 775 799.9 778.4 795.9 779.4 787.8 779.8 783.6 779.7 783.3 777.2 782.4 775.7 781.8 772.6 781.1 770.3 780.8 766.2 780.4 766 780.5 764.8 783.3ZM149.1 785.5C144.8 789.4 144.8 792.3 149 795.1 150.7 796.3 153 797.2 154.1 797.2 156.9 797.2 161.4 794.3 162.9 791.3 164.2 789 164.1 788.7 161.1 785.6 156.9 781.4 153.5 781.4 149.1 785.5ZM840.2 800.7C839.6 801.1 838.2 803.3 837.2 805.7 834.7 811.5 832.7 811.5 826.8 806 821.7 801.3 818 800.6 814.7 803.8 813.2 805.3 813 806.6 813.1 810.5 813.4 814.7 813.8 815.5 816.7 817.4 821 820.3 824.1 819.8 825.4 816 825.9 814.4 827.1 812.3 828 811.4 829.5 809.9 829.7 809.9 832.1 811.9 835.4 814.4 844.1 818.5 846.4 818.5 847.4 818.5 848.1 818 848.1 817.3 848.1 816.7 849 814.6 850 812.7 852.3 808.4 852.4 805.6 850.3 805 848.4 804.4 845.8 803.1 843.1 801.3 842 800.6 840.7 800.4 840.2 800.7ZM196.9 806.2C195 809.2 193.5 811.9 193.5 812.3 193.5 815 203.1 820.2 206 819.1 206.8 818.8 208.5 816.2 209.8 813.4 212.3 808 211.9 805.6 208.4 805.6 207.5 805.6 205.5 804.5 203.7 803.2 201.9 801.9 200.5 800.9 200.4 800.9 200.3 800.9 198.6 803.3 196.9 806.2ZM221.5 803.4C220.7 804.8 218.5 813.8 218.5 815.3 218.5 815.6 220.2 816 222.2 816.3 224.4 816.7 225.9 817.4 225.9 818.1 225.9 819.8 229.2 819.8 230.8 818.1 231.6 817.4 232.9 814.6 233.7 811.9 235.6 806.2 235.2 805.6 228.3 803.3 222.6 801.5 222.5 801.5 221.5 803.4ZM792.4 803.4C790.3 805.8 786.8 814.5 787.4 815.6 788.2 816.9 796.1 820.4 798.2 820.4 800.6 820.4 803 816.5 803.4 811.8 804 807.3 803 805.9 798.7 805.2 797.3 804.9 795.6 804.1 795 803.2 794 801.9 793.8 801.9 792.4 803.4ZM172.4 808.3C170.7 811.4 169.4 814.1 169.4 814.4 169.4 814.6 170.8 815.4 172.5 816 174.1 816.8 176.3 818.2 177.2 819.4 179 821.3 179 821.4 176.1 826.9 172.2 834.1 172.2 838.1 175.9 841.8 180 845.8 183.1 845.2 185.8 839.8 188.7 833.9 188.5 831.8 185 829.6 178.8 826 178.6 825.5 181.9 821.6 184.3 818.7 188.1 809.4 187.5 808.3 186.9 807.4 177.4 802.8 176.2 802.8 175.7 802.8 174 805.3 172.4 808.3ZM149.6 805.7C148 808.4 146 815.5 146.8 816.7 147 817 148.8 818 150.7 818.6 152.6 819.2 154.8 820.3 155.6 821 158.8 823.7 162.5 819.4 163.5 811.8 164.1 807.8 164.1 807.7 160.6 806.3 153.4 803.5 151.2 803.3 149.6 805.7ZM766.2 807.8C765.5 809.5 764.4 811.2 763.9 811.6 763.4 811.9 763 813.1 763 814.4 763 816.3 763.8 817.1 767.3 818.6 769.7 819.6 772 821 772.5 821.6 773.4 823.1 780.6 815 780.6 812.4 780.6 810.2 778.7 808.3 774.4 806.1 769.7 803.8 767.7 804.2 766.2 807.8ZM223.7 824.5C223 825.3 222.1 827.1 221.8 828.7 221.4 830.2 220.3 832.1 219.2 832.9 215.1 835.7 220.9 841.3 228.9 841.9 231.8 842.1 231.9 841.9 234 836.4 235.8 831.2 235.9 830.5 234.6 829.2 233.8 828.4 232.4 827.8 231.4 827.8 230.4 827.8 228.5 826.8 227.3 825.6 225.3 823.5 224.8 823.4 223.7 824.5ZM840 826.9C838.9 828 838 829.5 838 830.6 838 831.5 837.3 832.7 836.5 833.1 835.4 833.8 835.1 834.7 835.6 836.4 836 838.2 837 839.1 840.1 839.9 842.2 840.6 844.5 841.5 845.3 842 846.7 843.1 846.9 842.8 851.4 835.8 852.7 833.9 853.7 831.9 853.7 831.5 853.7 830.4 845.4 825 843.5 825 842.7 825 841.1 825.8 840 826.9ZM198.2 828.3C195.9 831.3 194.8 836.8 196 838.8 197.1 840.6 205 843.6 206.9 843 207.6 842.7 209 840.4 210 837.9 211.1 835.4 212.4 833.3 213 833.3 214.8 833.3 212.9 831.5 208.1 828.7 202.1 825.3 200.6 825.3 198.2 828.3ZM814.4 830.7C811.4 837.2 811.5 838.3 815.2 840.6 818.3 842.6 820.9 843.1 823.6 842 825.1 841.5 830.6 834.1 830.6 832.7 830.5 831.2 821.6 825.9 819.1 825.9 816.9 825.9 816.2 826.7 814.4 830.7ZM768.7 830.4C766.6 832.4 764.8 834.6 764.8 835.4 764.8 838.6 771.9 846.3 774.9 846.3 776.6 846.3 781.5 838.8 781.5 836.3 781.5 834.2 775.2 826.9 773.2 826.9 772.9 826.9 770.8 828.4 768.7 830.4ZM793.9 827.6C791.8 828.9 788.9 834.8 788.9 837.7 788.9 840.4 789.3 840.7 792.6 841.7 794.5 842.2 796.7 843.3 797.1 844.3 798 845.7 798.1 845.7 799.9 844 801.6 842.3 806.8 833.1 806.2 832.8 797.8 826.7 796.2 826 793.9 827.6ZM150.7 829.4C149.1 831.2 146.9 839.4 147.7 840.7 148 841.2 149.7 842 151.7 842.7 153.5 843.2 155.8 844.4 156.8 845.2 158.1 846.5 158.5 846.4 160.2 844.9 162.5 842.9 165.1 836.1 164.6 833.2 164.4 830.7 161.6 829.2 156 828.2 153.1 827.8 151.9 828.1 150.7 829.4ZM840.5 849.5C839.6 850.3 838.2 853.2 837.4 856.1 835.6 861.5 836.2 863.3 839.9 864.1 841.9 864.4 853.1 854 852.4 852.3 852.1 851.6 850.3 850.6 848.1 850 846 849.4 843.8 848.8 843.1 848.5 842.4 848.2 841.2 848.7 840.5 849.5ZM198.4 854.5C196.8 857.6 195.4 860.5 195.4 860.9 195.4 861.5 197.7 863.1 200.6 864.8 205 867.3 206.2 867.6 208 866.8 210.2 865.8 210.6 864.9 210.3 861.8 210.1 860.8 211 859.8 212.4 859.3 215.4 858.1 215.4 857.3 212.8 854.9 210.9 853.3 203 849.1 201.8 849.1 201.6 849.1 200 851.6 198.4 854.5ZM223.3 850.2C222.7 850.8 222.2 852.2 222.2 853.3 222.2 855.5 220.5 857.9 218.3 858.5 216.6 859.2 218.4 861.1 222.3 862.7 224.4 863.4 226.6 864.9 227.2 865.9 229.1 868.6 231.4 866.9 234.5 860.7 237.7 854.4 237.1 852.7 230.8 850.6 225.6 848.8 224.8 848.7 223.3 850.2ZM793 852.3C792.3 854.1 791.7 855.9 791.7 856.4 791.7 856.9 790.8 857.9 789.7 858.7 788.3 859.6 788 860.6 788.4 861.9 789.1 864.2 795.8 867.6 799.7 867.6 802.4 867.6 802.7 867.2 804.5 861.9 806.8 855.4 806.4 854.5 801 853 799.1 852.3 797.1 851.2 796.9 850.5 796 848.1 794.4 848.9 793 852.3ZM816.3 851.1C814.4 852.7 813.7 854.4 813.2 858.1L812.7 863 816.3 864.4C818.3 865.2 820.8 866.3 821.9 866.9 824.8 868.2 826.3 866.8 828.7 860.4 830.9 854.5 830.7 853.4 827.1 851.6 821.9 848.9 819 848.8 816.3 851.1ZM770.6 852C768 855.1 765.7 859.7 765.7 862.5 765.7 864.4 766.5 865.2 769.3 866.4 771.1 867.2 774.1 867.9 775.8 868 778.7 868.1 779.1 867.8 779.8 864.8 780.3 863.1 781.5 860.8 782.5 860 784.9 858 784.2 856.8 779.1 854.5 776.8 853.6 774.7 852.2 774.4 851.4 773.7 849.5 772.9 849.6 770.6 852ZM174.6 853C173.8 854.2 172.9 857 172.6 859.4L172 863.4 177.7 866C182.1 868.1 183.7 868.4 185.2 867.6 187.1 866.6 190.2 857.7 189.4 855.5 188.5 853.3 185.4 851.8 180.6 851.2 176.6 850.7 175.9 850.9 174.6 853ZM150.7 854.3C149.6 856.6 149.9 857 155.4 862.1 158.5 865.2 161.5 867.6 161.9 867.6 163.1 867.6 166 860.6 166 857.8 166 855.1 164.9 854.2 160.2 852.8 154.5 851.2 151.9 851.6 150.7 854.3ZM225.2 872.4C224.5 873.1 224.1 874.3 224.1 875.1 224.1 876 223.1 878 221.8 879.4 220.4 881.1 219.6 882.9 220 883.7 220.9 886 230.5 890.3 232.3 889.2 234.3 888 236.1 884.2 236.8 880 237.3 876.4 236.3 875 232.7 875 231.5 875 230.1 874.2 229.4 873.1 228.1 871 226.8 870.8 225.2 872.4ZM176.1 875.2C173.8 877.5 175.1 880.1 181 885 186.7 889.6 186.9 889.7 187.5 887.8 187.9 886.6 189.1 884.7 190.1 883.5L191.9 881.5 189.7 879.1C185.8 874.8 178.6 872.7 176.1 875.2ZM200.1 876.4C198.6 877.7 197 879.5 196.8 880.6 196 882.9 198.6 886.8 201.9 888.5 205 890.1 207.2 889.3 212.9 884.5 215.6 882.2 215.8 881.6 215 879.9 213.5 877.3 208.2 874.1 205.3 874.1 204 874.1 201.7 875.1 200.1 876.4ZM770.2 876.1C768.1 877.7 766.7 881.7 766.7 885.6 766.7 888.5 767 888.9 770.2 889.7 772 890.3 774.5 891.3 775.6 892.1 777.4 893.3 777.8 893.3 780 891.1 784.3 886.8 784.4 879 780.2 877 776.2 875.3 771.9 874.8 770.2 876.1ZM792.2 879.3C791.3 881.8 790.6 884.5 790.5 885.6 790.2 887.9 794.4 890.7 798.8 891.4 801.9 891.8 802.8 891.6 804.4 889.4 805.4 888.1 806.5 885.4 806.9 883.2 807.7 877.9 805.6 875.7 798.8 875.2L793.8 874.8 792.2 879.3ZM745.4 879.3C744.7 880.7 743.7 883.1 743 884.5 741.3 887.9 741.7 888.4 747.2 891.2 749.7 892.5 752 894 752.4 894.5 753.3 896.1 759.3 886.3 759.3 883.1 759.3 879.9 756.1 877.7 750.5 877 746.7 876.7 746.3 876.8 745.4 879.3ZM225.6 897.7C224.8 898.4 223.9 900.4 223.6 902 223.2 903.7 222.5 905.6 221.9 906.3 220.8 907.7 220.6 907.4 226.6 911.1 232 914.4 234.1 914.3 236.3 910.5 238.1 907.3 239.1 901.8 238.1 900.4 236.2 897.4 227.7 895.6 225.6 897.7ZM747.9 900.4C746.2 902.1 743.2 910 743.8 911.4 744.1 912 746.7 913.7 749.5 915.3L754.8 918.1 757 915.5C761.8 910 761.1 904.9 755.3 901.4 750.6 898.7 749.7 898.6 747.9 900.4ZM769.4 901.9C768.2 904.1 767.6 906.3 767.8 908.7 768.1 912 768.3 912.3 772.6 914L777.2 915.6 780.3 913.3C783.4 910.9 784.6 908.2 784.1 904.5 783.8 902 780.3 900 774.9 899.4 771.7 898.9 771.2 899.1 769.4 901.9Z", + "width": 1000 + }, + "search": [ + "roboticon" + ] + }, + { + "uid": "8ce732688587909ad0a9d8323eaca8ad", + "css": "marquee", + "code": 59590, + "src": "fontelico" + }, + { + "uid": "ec8496ef645f3be7b28147ec60cd9ab1", + "css": "crown-minus", + "code": 59589, + "src": "fontelico" + }, + { + "uid": "36ef9feb0754335302784521267a9ad4", + "css": "crown-plus", + "code": 59588, + "src": "fontelico" + }, + { + "uid": "186dec7a13156bbe2550790c158fb85d", + "css": "crown", + "code": 59587, + "src": "fontelico" + }, + { + "uid": "2a46f1d1c9bd036e17a74e46613c1636", + "css": "ie", + "code": 59586, + "src": "fontelico" + }, + { + "uid": "9c2b737b16ae2c8d66b7bfd29ba5ecd8", + "css": "chrome", + "code": 59584, + "src": "fontelico" + }, + { + "uid": "45861dd1e5ce4fde338bcccf01eeb808", + "css": "opera", + "code": 59585, + "src": "fontelico" + }, + { + "uid": "2bd5f98482d86649958312ea2ab5bb40", + "css": "emo-laugh", + "code": 59576, + "src": "fontelico" + }, + { + "uid": "fc92480dedc439d274d4e3e4b425edf4", + "css": "emo-squint", + "code": 59575, + "src": "fontelico" + }, + { + "uid": "4843d0d6050dd508d4c101a334f46db2", + "css": "emo-shoot", + "code": 59574, + "src": "fontelico" + }, + { + "uid": "04688d76a33ce7a7950e40fae79c08ac", + "css": "emo-cry", + "code": 59573, + "src": "fontelico" + }, + { + "uid": "e4b163acaaa08255819f2f78afe8f075", + "css": "cart_menu_icon", + "code": 59412, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M367.1 624.3H972.6A33.2 33.2 0 0 0 1004.7 601.7L1138.2 164.7A29.6 29.6 0 0 0 1132.9 137.3 34.3 34.3 0 0 0 1106.3 124.9H289.9L266.3 24.5A33 33 0 0 0 233.7 0H33.4A32.4 32.4 0 0 0 0 31.2 32.4 32.4 0 0 0 33.4 62.4H206.9L327.4 569.6A93.8 93.8 0 0 0 267.1 655.5 97.1 97.1 0 0 0 367.2 749.1H972.6A31.3 31.3 0 1 0 972.6 686.7H367.2A31.3 31.3 0 1 1 367.2 624.3ZM1061.9 187.3L947.4 561.9H394L305 187.3ZM1061.9 187.3M315.3 894.6A105.4 105.4 0 1 0 420.7 789.2 105.4 105.4 0 0 0 315.3 894.6ZM420.7 859.4A35.2 35.2 0 1 1 385.6 894.6 35.2 35.2 0 0 1 420.7 859.4ZM420.7 859.4M735.4 894.6A105.4 105.4 0 1 0 840.9 789.2 105.4 105.4 0 0 0 735.4 894.6ZM840.9 859.4A35.2 35.2 0 1 1 805.7 894.6 35.2 35.2 0 0 1 840.9 859.4ZM840.9 859.4", + "width": 1140 + }, + "search": [ + "cart_menu_icon" + ] + }, + { + "uid": "45f50872f02e050e19f0910ca3e0e8e6", + "css": "categories_menu_icon", + "code": 59413, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M332.7 458.9H126.3A126.3 126.3 0 0 1 0 332.7V126.3A126.3 126.3 0 0 1 126.3 0H332.7A126.3 126.3 0 0 1 459 126.3V332.7A126.3 126.3 0 0 1 332.7 458.9ZM126.3 61.2A65.1 65.1 0 0 0 61.2 126.3V332.7A65.1 65.1 0 0 0 126.3 397.8H332.7A65.1 65.1 0 0 0 397.8 332.7V126.3A65.1 65.1 0 0 0 332.7 61.2ZM873.8 458.9H667.3A126.3 126.3 0 0 1 541 332.6V126.3A126.3 126.3 0 0 1 667.3 0H873.9A126.3 126.3 0 0 1 1000.2 126.3V332.7A126.3 126.3 0 0 1 873.8 458.9ZM667.3 61.2A65.1 65.1 0 0 0 602.2 126.3V332.7A65.1 65.1 0 0 0 667.3 397.8H873.9A65.1 65.1 0 0 0 938.9 332.7V126.3A65.1 65.1 0 0 0 873.9 61.3ZM332.7 999.9H126.3A126.3 126.3 0 0 1 0 873.7V667.3A126.3 126.3 0 0 1 126.3 541H332.7A126.3 126.3 0 0 1 459 667.3V873.9A126.3 126.3 0 0 1 332.7 999.9ZM126.3 602.2A65.1 65.1 0 0 0 61.2 667.3V873.9A65.1 65.1 0 0 0 126.3 938.8H332.7A65.1 65.1 0 0 0 397.8 873.8V667.3A65.1 65.1 0 0 0 332.7 602.3ZM873.8 999.9H667.3A126.3 126.3 0 0 1 541 873.7V667.3A126.3 126.3 0 0 1 667.3 541H873.8A126.3 126.3 0 0 1 1000.1 667.3V873.9A126.3 126.3 0 0 1 873.8 999.9ZM667.3 602.2A65.1 65.1 0 0 0 602.2 667.3V873.9A65.1 65.1 0 0 0 667.3 938.8H873.8A65.1 65.1 0 0 0 938.8 873.8V667.3A65.1 65.1 0 0 0 873.8 602.3Z", + "width": 1000 + }, + "search": [ + "categories_menu_icon" + ] + }, + { + "uid": "de65d94899c08a719eb8f9b723f73fc4", + "css": "hmg_logo_icon", + "code": 59414, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M146 835.7S180.9 835.5 205.5 835.5L392.2 836.4C414.4 836.4 433 812.7 434 778.5L434 622.5C434 589.3 448.9 563.3 472 561.7L529.2 561.2C552.3 562.7 568.1 588.9 568.1 622L568.1 778.9C569.2 813.1 584.7 835.5 607.1 835.5L858.4 836.1 858.8 643.3C858.8 610.2 842.9 584.4 819.8 583L718.8 582.5C696.5 582.5 678.9 558.9 677.9 524.7L677.5 472.6C678.6 438.4 696.4 414.8 718.7 414.8L820.2 415.1C843.3 413.6 858.3 386.4 858.3 353.3L858.5 112.8A102.4 102.4 0 0 1 780.8 161.4L610.2 161.4C587.9 161.4 569.4 185.7 568.3 219.9V374.6C567.2 408.8 549.8 432.9 527.5 432.9L475.8 432C453.4 432 435.6 408.6 434.5 374.7L434.5 218.4C433.4 184.3 415.6 161.2 393.4 161.2L145.6 161.2 145.6 353.4C145.6 386.6 161.2 413.1 184.3 414.7L285.8 414.3C308.8 415.8 325.1 443.2 325.1 476.2L324.8 520.7C324.8 553.8 309.1 580.4 286 581.9L184.3 581.7C161.2 583.3 145.6 609.5 145.6 642.6ZM999.3 99.1V902.8A102.2 102.2 0 0 1 896 1000H102.8A101.9 101.9 0 0 1 0 902.8L0 97.6A102.3 102.3 0 0 1 103 0L895.4 0.3A104 104 0 0 1 999.3 99.1Z", + "width": 999 + }, + "search": [ + "hmg_logo_icon" + ] + }, + { + "uid": "baf8798b7336aad03b1d61cacc015142", + "css": "user_menu_icon", + "code": 59415, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M853.6 146.4A500 500 0 0 0 146.4 853.6 500 500 0 0 0 853.6 146.4ZM217 838.5A286.1 286.1 0 0 1 500 586.7 285 285 0 0 1 783 838.5 440.5 440.5 0 0 1 217 838.5ZM500 526.3A151.8 151.8 0 1 1 651.8 374.5 152.1 152.1 0 0 1 500 526.3ZM833.4 788.8A344.4 344.4 0 0 0 617.6 548.7 210.5 210.5 0 1 0 382.1 548.7 344.2 344.2 0 0 0 166.3 788.7 441.4 441.4 0 1 1 833.2 788.7ZM833.4 788.8", + "width": 1000 + }, + "search": [ + "user_menu_icon" + ] + }, + { + "uid": "d3f621623139837ff2fb5fe09cf16994", + "css": "cart_menu_icon-1", + "code": 59416, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M367.1 624.3H972.6A33.2 33.2 0 0 0 1004.7 601.7L1138.2 164.7A29.6 29.6 0 0 0 1132.9 137.3 34.3 34.3 0 0 0 1106.3 124.9H289.9L266.3 24.5A33 33 0 0 0 233.7 0H33.4A32.4 32.4 0 0 0 0 31.2 32.4 32.4 0 0 0 33.4 62.4H206.9L327.4 569.6A93.8 93.8 0 0 0 267.1 655.5 97.1 97.1 0 0 0 367.2 749.1H972.6A31.3 31.3 0 1 0 972.6 686.7H367.2A31.3 31.3 0 1 1 367.2 624.3ZM1061.9 187.3L947.4 561.9H394L305 187.3ZM1061.9 187.3M315.3 894.6A105.4 105.4 0 1 0 420.7 789.2 105.4 105.4 0 0 0 315.3 894.6ZM420.7 859.4A35.2 35.2 0 1 1 385.6 894.6 35.2 35.2 0 0 1 420.7 859.4ZM420.7 859.4M735.4 894.6A105.4 105.4 0 1 0 840.9 789.2 105.4 105.4 0 0 0 735.4 894.6ZM840.9 859.4A35.2 35.2 0 1 1 805.7 894.6 35.2 35.2 0 0 1 840.9 859.4ZM840.9 859.4", + "width": 1140 + }, + "search": [ + "cart_menu_icon" + ] + }, + { + "uid": "6aac6f399374da0b9c4811b6a7110627", + "css": "categories_menu_icon-1", + "code": 59417, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M332.7 458.9H126.3A126.3 126.3 0 0 1 0 332.7V126.3A126.3 126.3 0 0 1 126.3 0H332.7A126.3 126.3 0 0 1 459 126.3V332.7A126.3 126.3 0 0 1 332.7 458.9ZM126.3 61.2A65.1 65.1 0 0 0 61.2 126.3V332.7A65.1 65.1 0 0 0 126.3 397.8H332.7A65.1 65.1 0 0 0 397.8 332.7V126.3A65.1 65.1 0 0 0 332.7 61.2ZM873.8 458.9H667.3A126.3 126.3 0 0 1 541 332.6V126.3A126.3 126.3 0 0 1 667.3 0H873.9A126.3 126.3 0 0 1 1000.2 126.3V332.7A126.3 126.3 0 0 1 873.8 458.9ZM667.3 61.2A65.1 65.1 0 0 0 602.2 126.3V332.7A65.1 65.1 0 0 0 667.3 397.8H873.9A65.1 65.1 0 0 0 938.9 332.7V126.3A65.1 65.1 0 0 0 873.9 61.3ZM332.7 999.9H126.3A126.3 126.3 0 0 1 0 873.7V667.3A126.3 126.3 0 0 1 126.3 541H332.7A126.3 126.3 0 0 1 459 667.3V873.9A126.3 126.3 0 0 1 332.7 999.9ZM126.3 602.2A65.1 65.1 0 0 0 61.2 667.3V873.9A65.1 65.1 0 0 0 126.3 938.8H332.7A65.1 65.1 0 0 0 397.8 873.8V667.3A65.1 65.1 0 0 0 332.7 602.3ZM873.8 999.9H667.3A126.3 126.3 0 0 1 541 873.7V667.3A126.3 126.3 0 0 1 667.3 541H873.8A126.3 126.3 0 0 1 1000.1 667.3V873.9A126.3 126.3 0 0 1 873.8 999.9ZM667.3 602.2A65.1 65.1 0 0 0 602.2 667.3V873.9A65.1 65.1 0 0 0 667.3 938.8H873.8A65.1 65.1 0 0 0 938.8 873.8V667.3A65.1 65.1 0 0 0 873.8 602.3Z", + "width": 1000 + }, + "search": [ + "categories_menu_icon" + ] + }, + { + "uid": "0a4cf1ff2671b9ea852d635e27df1e69", + "css": "hmg_logo_icon-1", + "code": 59418, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M146 835.7S180.9 835.5 205.5 835.5L392.2 836.4C414.4 836.4 433 812.7 434 778.5L434 622.5C434 589.3 448.9 563.3 472 561.7L529.2 561.2C552.3 562.7 568.1 588.9 568.1 622L568.1 778.9C569.2 813.1 584.7 835.5 607.1 835.5L858.4 836.1 858.8 643.3C858.8 610.2 842.9 584.4 819.8 583L718.8 582.5C696.5 582.5 678.9 558.9 677.9 524.7L677.5 472.6C678.6 438.4 696.4 414.8 718.7 414.8L820.2 415.1C843.3 413.6 858.3 386.4 858.3 353.3L858.5 112.8A102.4 102.4 0 0 1 780.8 161.4L610.2 161.4C587.9 161.4 569.4 185.7 568.3 219.9V374.6C567.2 408.8 549.8 432.9 527.5 432.9L475.8 432C453.4 432 435.6 408.6 434.5 374.7L434.5 218.4C433.4 184.3 415.6 161.2 393.4 161.2L145.6 161.2 145.6 353.4C145.6 386.6 161.2 413.1 184.3 414.7L285.8 414.3C308.8 415.8 325.1 443.2 325.1 476.2L324.8 520.7C324.8 553.8 309.1 580.4 286 581.9L184.3 581.7C161.2 583.3 145.6 609.5 145.6 642.6ZM999.3 99.1V902.8A102.2 102.2 0 0 1 896 1000H102.8A101.9 101.9 0 0 1 0 902.8L0 97.6A102.3 102.3 0 0 1 103 0L895.4 0.3A104 104 0 0 1 999.3 99.1Z", + "width": 999 + }, + "search": [ + "hmg_logo_icon" + ] + }, + { + "uid": "d19eb878f1dee49848276b6d0faa6602", + "css": "wishlist_menu_icon", + "code": 59411, + "src": "custom_icons", + "selected": false, + "svg": { + "path": "M877.6 0A394.8 394.8 0 0 0 600.7 112.2 394.8 394.8 0 0 0 323.8 0 332.4 332.4 0 0 0 0 349 515.4 515.4 0 0 0 138.3 679.5 1351.1 1351.1 0 0 0 580.3 995.3 46.9 46.9 0 0 0 621.1 995.3 1351.1 1351.1 0 0 0 1063.1 679.5 515.4 515.4 0 0 0 1201.4 349 332.5 332.5 0 0 0 877.6 0ZM991.8 618.5A1233.8 1233.8 0 0 1 600.7 900.8 1233.7 1233.7 0 0 1 209.5 618.5 418.4 418.4 0 0 1 93.8 349 239.1 239.1 0 0 1 323.8 93.8 297.2 297.2 0 0 1 500.6 150.7 283.5 283.5 0 0 1 562 209.5 46.5 46.5 0 0 0 600.5 230H600.5A46.9 46.9 0 0 0 639.1 209.3 301.2 301.2 0 0 1 877.2 93.8 239.2 239.2 0 0 1 1107.1 349 418.4 418.4 0 0 1 991.8 618.5Z", + "width": 1201 + }, + "search": [ + "wishlist_menu_icon" + ] + } + ] +} \ No newline at end of file diff --git a/assets/app_icons/fonts/DQIcons.ttf b/assets/app_icons/fonts/DQIcons.ttf new file mode 100644 index 00000000..e0a15c88 Binary files /dev/null and b/assets/app_icons/fonts/DQIcons.ttf differ diff --git a/assets/applepay.json b/assets/applepay.json new file mode 100644 index 00000000..7817eb67 --- /dev/null +++ b/assets/applepay.json @@ -0,0 +1,21 @@ +{ + "provider": "apple_pay", + "data": { + "merchantIdentifier": "merchant.com.hmgwebservices", + "displayName": "Sulaiman Al Habib", + "merchantCapabilities": [ + "3DS", + "debit", + "credit" + ], + "supportedNetworks": [ + "visa", + "masterCard", + "mada" + ], + "countryCode": "SA", + "currencyCode": "SAR", + "requiredBillingContactFields": null, + "requiredShippingContactFields": null + } +} \ No newline at end of file diff --git a/assets/fonts/DoctorApp.ttf b/assets/fonts/DoctorApp.ttf new file mode 100644 index 00000000..718a3afc Binary files /dev/null and b/assets/fonts/DoctorApp.ttf differ diff --git a/assets/fonts/Work_Sans/OFL.txt b/assets/fonts/Work_Sans/OFL.txt new file mode 100644 index 00000000..5c0354eb --- /dev/null +++ b/assets/fonts/Work_Sans/OFL.txt @@ -0,0 +1,93 @@ +Copyright (c) 2014-2015 Wei Huang (wweeiihhuuaanngg@gmail.com) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/fonts/Work_Sans/WorkSans-Black.ttf b/assets/fonts/Work_Sans/WorkSans-Black.ttf new file mode 100644 index 00000000..fb744206 Binary files /dev/null and b/assets/fonts/Work_Sans/WorkSans-Black.ttf differ diff --git a/assets/fonts/Work_Sans/WorkSans-Bold.ttf b/assets/fonts/Work_Sans/WorkSans-Bold.ttf new file mode 100644 index 00000000..7caa3595 Binary files /dev/null and b/assets/fonts/Work_Sans/WorkSans-Bold.ttf differ diff --git a/assets/fonts/Work_Sans/WorkSans-ExtraBold.ttf b/assets/fonts/Work_Sans/WorkSans-ExtraBold.ttf new file mode 100644 index 00000000..fd4b9120 Binary files /dev/null and b/assets/fonts/Work_Sans/WorkSans-ExtraBold.ttf differ diff --git a/assets/fonts/Work_Sans/WorkSans-ExtraLight.ttf b/assets/fonts/Work_Sans/WorkSans-ExtraLight.ttf new file mode 100644 index 00000000..b97cf8cf Binary files /dev/null and b/assets/fonts/Work_Sans/WorkSans-ExtraLight.ttf differ diff --git a/assets/fonts/Work_Sans/WorkSans-Light.ttf b/assets/fonts/Work_Sans/WorkSans-Light.ttf new file mode 100644 index 00000000..3e981fb3 Binary files /dev/null and b/assets/fonts/Work_Sans/WorkSans-Light.ttf differ diff --git a/assets/fonts/Work_Sans/WorkSans-Medium.ttf b/assets/fonts/Work_Sans/WorkSans-Medium.ttf new file mode 100644 index 00000000..7a2645ba Binary files /dev/null and b/assets/fonts/Work_Sans/WorkSans-Medium.ttf differ diff --git a/assets/fonts/Work_Sans/WorkSans-Regular.ttf b/assets/fonts/Work_Sans/WorkSans-Regular.ttf new file mode 100644 index 00000000..0ac4520a Binary files /dev/null and b/assets/fonts/Work_Sans/WorkSans-Regular.ttf differ diff --git a/assets/fonts/Work_Sans/WorkSans-SemiBold.ttf b/assets/fonts/Work_Sans/WorkSans-SemiBold.ttf new file mode 100644 index 00000000..589a5f53 Binary files /dev/null and b/assets/fonts/Work_Sans/WorkSans-SemiBold.ttf differ diff --git a/assets/fonts/Work_Sans/WorkSans-Thin.ttf b/assets/fonts/Work_Sans/WorkSans-Thin.ttf new file mode 100644 index 00000000..011fcd38 Binary files /dev/null and b/assets/fonts/Work_Sans/WorkSans-Thin.ttf differ diff --git a/assets/fonts/ar.zip b/assets/fonts/ar.zip new file mode 100644 index 00000000..fea01b8e Binary files /dev/null and b/assets/fonts/ar.zip differ diff --git a/assets/fonts/ar/Cairo-Bold/Cairo-Bold.eot b/assets/fonts/ar/Cairo-Bold/Cairo-Bold.eot new file mode 100644 index 00000000..ed5f0c34 Binary files /dev/null and b/assets/fonts/ar/Cairo-Bold/Cairo-Bold.eot differ diff --git a/assets/fonts/ar/Cairo-Bold/Cairo-Bold.otf b/assets/fonts/ar/Cairo-Bold/Cairo-Bold.otf new file mode 100644 index 00000000..8bc25fbb Binary files /dev/null and b/assets/fonts/ar/Cairo-Bold/Cairo-Bold.otf differ diff --git a/assets/fonts/ar/Cairo-Bold/Cairo-Bold.ttf b/assets/fonts/ar/Cairo-Bold/Cairo-Bold.ttf new file mode 100644 index 00000000..4f026897 Binary files /dev/null and b/assets/fonts/ar/Cairo-Bold/Cairo-Bold.ttf differ diff --git a/assets/fonts/ar/Cairo-Bold/Cairo-Bold.woff b/assets/fonts/ar/Cairo-Bold/Cairo-Bold.woff new file mode 100644 index 00000000..91e3d063 Binary files /dev/null and b/assets/fonts/ar/Cairo-Bold/Cairo-Bold.woff differ diff --git a/assets/fonts/ar/Cairo-Light/Cairo-Light.eot b/assets/fonts/ar/Cairo-Light/Cairo-Light.eot new file mode 100644 index 00000000..d76c5391 Binary files /dev/null and b/assets/fonts/ar/Cairo-Light/Cairo-Light.eot differ diff --git a/assets/fonts/ar/Cairo-Light/Cairo-Light.otf b/assets/fonts/ar/Cairo-Light/Cairo-Light.otf new file mode 100644 index 00000000..f8812a9c Binary files /dev/null and b/assets/fonts/ar/Cairo-Light/Cairo-Light.otf differ diff --git a/assets/fonts/ar/Cairo-Light/Cairo-Light.ttf b/assets/fonts/ar/Cairo-Light/Cairo-Light.ttf new file mode 100644 index 00000000..840cbc3e Binary files /dev/null and b/assets/fonts/ar/Cairo-Light/Cairo-Light.ttf differ diff --git a/assets/fonts/ar/Cairo-Light/Cairo-Light.woff b/assets/fonts/ar/Cairo-Light/Cairo-Light.woff new file mode 100644 index 00000000..9534bb4b Binary files /dev/null and b/assets/fonts/ar/Cairo-Light/Cairo-Light.woff differ diff --git a/assets/fonts/ar/Cairo-Regular/Cairo-Regular.ttf b/assets/fonts/ar/Cairo-Regular/Cairo-Regular.ttf new file mode 100644 index 00000000..3eb09f86 Binary files /dev/null and b/assets/fonts/ar/Cairo-Regular/Cairo-Regular.ttf differ diff --git a/assets/fonts/en/WorkSans-Bold/WorkSans-Bold.eot b/assets/fonts/en/WorkSans-Bold/WorkSans-Bold.eot new file mode 100644 index 00000000..98bc2468 Binary files /dev/null and b/assets/fonts/en/WorkSans-Bold/WorkSans-Bold.eot differ diff --git a/assets/fonts/en/WorkSans-Bold/WorkSans-Bold.otf b/assets/fonts/en/WorkSans-Bold/WorkSans-Bold.otf new file mode 100644 index 00000000..73f8bf0a Binary files /dev/null and b/assets/fonts/en/WorkSans-Bold/WorkSans-Bold.otf differ diff --git a/assets/fonts/en/WorkSans-Bold/WorkSans-Bold.ttf b/assets/fonts/en/WorkSans-Bold/WorkSans-Bold.ttf new file mode 100644 index 00000000..177a3b67 Binary files /dev/null and b/assets/fonts/en/WorkSans-Bold/WorkSans-Bold.ttf differ diff --git a/assets/fonts/en/WorkSans-Bold/WorkSans-Bold.woff b/assets/fonts/en/WorkSans-Bold/WorkSans-Bold.woff new file mode 100644 index 00000000..8d7013cd Binary files /dev/null and b/assets/fonts/en/WorkSans-Bold/WorkSans-Bold.woff differ diff --git a/assets/fonts/en/WorkSans-Light/WorkSans-Light_0.eot b/assets/fonts/en/WorkSans-Light/WorkSans-Light_0.eot new file mode 100644 index 00000000..9541e418 Binary files /dev/null and b/assets/fonts/en/WorkSans-Light/WorkSans-Light_0.eot differ diff --git a/assets/fonts/en/WorkSans-Light/WorkSans-Light_0.otf b/assets/fonts/en/WorkSans-Light/WorkSans-Light_0.otf new file mode 100644 index 00000000..be5e0ac4 Binary files /dev/null and b/assets/fonts/en/WorkSans-Light/WorkSans-Light_0.otf differ diff --git a/assets/fonts/en/WorkSans-Light/WorkSans-Light_0.ttf b/assets/fonts/en/WorkSans-Light/WorkSans-Light_0.ttf new file mode 100644 index 00000000..0b010ade Binary files /dev/null and b/assets/fonts/en/WorkSans-Light/WorkSans-Light_0.ttf differ diff --git a/assets/fonts/en/WorkSans-Light/WorkSans-Light_0.woff b/assets/fonts/en/WorkSans-Light/WorkSans-Light_0.woff new file mode 100644 index 00000000..12226d75 Binary files /dev/null and b/assets/fonts/en/WorkSans-Light/WorkSans-Light_0.woff differ diff --git a/assets/fonts/en/WorkSans-Light/WorkSans-Regular.otf b/assets/fonts/en/WorkSans-Light/WorkSans-Regular.otf new file mode 100644 index 00000000..be88832e Binary files /dev/null and b/assets/fonts/en/WorkSans-Light/WorkSans-Regular.otf differ diff --git a/assets/fonts/en/WorkSans-Light/WorkSans-Regular.ttf b/assets/fonts/en/WorkSans-Light/WorkSans-Regular.ttf new file mode 100644 index 00000000..0ac4520a Binary files /dev/null and b/assets/fonts/en/WorkSans-Light/WorkSans-Regular.ttf differ diff --git a/assets/fonts/en/WorkSans-Light/WorkSans-Regular.woff b/assets/fonts/en/WorkSans-Light/WorkSans-Regular.woff new file mode 100644 index 00000000..89af38b8 Binary files /dev/null and b/assets/fonts/en/WorkSans-Light/WorkSans-Regular.woff differ diff --git a/assets/fonts/poppins/Poppins-Black.ttf b/assets/fonts/poppins/Poppins-Black.ttf new file mode 100644 index 00000000..a9520b78 Binary files /dev/null and b/assets/fonts/poppins/Poppins-Black.ttf differ diff --git a/assets/fonts/poppins/Poppins-Bold.ttf b/assets/fonts/poppins/Poppins-Bold.ttf new file mode 100644 index 00000000..b94d47f3 Binary files /dev/null and b/assets/fonts/poppins/Poppins-Bold.ttf differ diff --git a/assets/fonts/poppins/Poppins-ExtraBold.ttf b/assets/fonts/poppins/Poppins-ExtraBold.ttf new file mode 100644 index 00000000..8f008c36 Binary files /dev/null and b/assets/fonts/poppins/Poppins-ExtraBold.ttf differ diff --git a/assets/fonts/poppins/Poppins-ExtraLight.ttf b/assets/fonts/poppins/Poppins-ExtraLight.ttf new file mode 100644 index 00000000..ee623825 Binary files /dev/null and b/assets/fonts/poppins/Poppins-ExtraLight.ttf differ diff --git a/assets/fonts/poppins/Poppins-Light.ttf b/assets/fonts/poppins/Poppins-Light.ttf new file mode 100644 index 00000000..2ab02219 Binary files /dev/null and b/assets/fonts/poppins/Poppins-Light.ttf differ diff --git a/assets/fonts/poppins/Poppins-Medium.ttf b/assets/fonts/poppins/Poppins-Medium.ttf new file mode 100644 index 00000000..e90e87ed Binary files /dev/null and b/assets/fonts/poppins/Poppins-Medium.ttf differ diff --git a/assets/fonts/poppins/Poppins-Regular.ttf b/assets/fonts/poppins/Poppins-Regular.ttf new file mode 100644 index 00000000..be06e7fd Binary files /dev/null and b/assets/fonts/poppins/Poppins-Regular.ttf differ diff --git a/assets/fonts/poppins/Poppins-SemiBold.ttf b/assets/fonts/poppins/Poppins-SemiBold.ttf new file mode 100644 index 00000000..dabf7c24 Binary files /dev/null and b/assets/fonts/poppins/Poppins-SemiBold.ttf differ diff --git a/assets/fonts/poppins/Poppins-Thin.ttf b/assets/fonts/poppins/Poppins-Thin.ttf new file mode 100644 index 00000000..f5c0fdd5 Binary files /dev/null and b/assets/fonts/poppins/Poppins-Thin.ttf differ diff --git a/assets/fonts/sar-Regular.otf b/assets/fonts/sar-Regular.otf new file mode 100644 index 00000000..e906f654 Binary files /dev/null and b/assets/fonts/sar-Regular.otf differ diff --git a/assets/fonts/saudi_riyal.eot b/assets/fonts/saudi_riyal.eot new file mode 100644 index 00000000..f85e9aa1 Binary files /dev/null and b/assets/fonts/saudi_riyal.eot differ diff --git a/assets/fonts/saudi_riyal.ttf b/assets/fonts/saudi_riyal.ttf new file mode 100644 index 00000000..a0f1b762 Binary files /dev/null and b/assets/fonts/saudi_riyal.ttf differ diff --git a/assets/fonts/saudi_riyal.woff b/assets/fonts/saudi_riyal.woff new file mode 100644 index 00000000..7d733e98 Binary files /dev/null and b/assets/fonts/saudi_riyal.woff differ diff --git a/assets/fonts/saudi_riyal.woff2 b/assets/fonts/saudi_riyal.woff2 new file mode 100644 index 00000000..f8072477 Binary files /dev/null and b/assets/fonts/saudi_riyal.woff2 differ diff --git a/assets/images/AlHabibMedicalService/Wifi-AR.png b/assets/images/AlHabibMedicalService/Wifi-AR.png new file mode 100644 index 00000000..a8e2d9af Binary files /dev/null and b/assets/images/AlHabibMedicalService/Wifi-AR.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/BMI/default.png b/assets/images/BMI/default.png new file mode 100644 index 00000000..cef9f7d7 Binary files /dev/null and b/assets/images/BMI/default.png differ diff --git a/assets/images/BloodChrt_EN.png b/assets/images/BloodChrt_EN.png new file mode 100644 index 00000000..ac52957d Binary files /dev/null and b/assets/images/BloodChrt_EN.png differ diff --git a/assets/images/DQ/logo.png b/assets/images/DQ/logo.png new file mode 100644 index 00000000..29719b35 Binary files /dev/null and b/assets/images/DQ/logo.png differ diff --git a/assets/images/Icon-awesome-calendar.png b/assets/images/Icon-awesome-calendar.png new file mode 100644 index 00000000..f058ca77 Binary files /dev/null and b/assets/images/Icon-awesome-calendar.png differ diff --git a/assets/images/SmartWatches/Apple-Watch-6.png b/assets/images/SmartWatches/Apple-Watch-6.png new file mode 100644 index 00000000..1e670506 Binary files /dev/null and b/assets/images/SmartWatches/Apple-Watch-6.png differ diff --git a/assets/images/SmartWatches/apple-watch-1.jpeg b/assets/images/SmartWatches/apple-watch-1.jpeg new file mode 100644 index 00000000..7262e7eb Binary files /dev/null and b/assets/images/SmartWatches/apple-watch-1.jpeg differ diff --git a/assets/images/SmartWatches/apple-watch-2.jpg b/assets/images/SmartWatches/apple-watch-2.jpg new file mode 100644 index 00000000..f688f740 Binary files /dev/null and b/assets/images/SmartWatches/apple-watch-2.jpg differ diff --git a/assets/images/SmartWatches/apple-watch-3.jpg b/assets/images/SmartWatches/apple-watch-3.jpg new file mode 100644 index 00000000..b68c1ced Binary files /dev/null and b/assets/images/SmartWatches/apple-watch-3.jpg differ diff --git a/assets/images/SmartWatches/apple-watch-4.jpg b/assets/images/SmartWatches/apple-watch-4.jpg new file mode 100644 index 00000000..2fc19b67 Binary files /dev/null and b/assets/images/SmartWatches/apple-watch-4.jpg differ diff --git a/assets/images/SmartWatches/apple-watch-5.jpg b/assets/images/SmartWatches/apple-watch-5.jpg new file mode 100644 index 00000000..4c497eac Binary files /dev/null and b/assets/images/SmartWatches/apple-watch-5.jpg differ diff --git a/assets/images/SmartWatches/distance.png b/assets/images/SmartWatches/distance.png new file mode 100644 index 00000000..d07f3e8a Binary files /dev/null and b/assets/images/SmartWatches/distance.png differ diff --git a/assets/images/SmartWatches/heartrate_icon.png b/assets/images/SmartWatches/heartrate_icon.png new file mode 100644 index 00000000..e228bea4 Binary files /dev/null and b/assets/images/SmartWatches/heartrate_icon.png differ diff --git a/assets/images/SmartWatches/huawei-watch-2-classic.png b/assets/images/SmartWatches/huawei-watch-2-classic.png new file mode 100644 index 00000000..0dc44cb6 Binary files /dev/null and b/assets/images/SmartWatches/huawei-watch-2-classic.png differ diff --git a/assets/images/SmartWatches/huawei-watch-2.png b/assets/images/SmartWatches/huawei-watch-2.png new file mode 100644 index 00000000..61530239 Binary files /dev/null and b/assets/images/SmartWatches/huawei-watch-2.png differ diff --git a/assets/images/SmartWatches/lg-watch-sport.jpg b/assets/images/SmartWatches/lg-watch-sport.jpg new file mode 100644 index 00000000..bd2f25ed Binary files /dev/null and b/assets/images/SmartWatches/lg-watch-sport.jpg differ diff --git a/assets/images/SmartWatches/miBand3.jpg b/assets/images/SmartWatches/miBand3.jpg new file mode 100644 index 00000000..c58f85e5 Binary files /dev/null and b/assets/images/SmartWatches/miBand3.jpg differ diff --git a/assets/images/SmartWatches/miBand4.jpg b/assets/images/SmartWatches/miBand4.jpg new file mode 100644 index 00000000..519ef5fb Binary files /dev/null and b/assets/images/SmartWatches/miBand4.jpg differ diff --git a/assets/images/SmartWatches/misfit-vapor-2.jpg b/assets/images/SmartWatches/misfit-vapor-2.jpg new file mode 100644 index 00000000..fe487591 Binary files /dev/null and b/assets/images/SmartWatches/misfit-vapor-2.jpg differ diff --git a/assets/images/SmartWatches/sleep_data.png b/assets/images/SmartWatches/sleep_data.png new file mode 100644 index 00000000..dc6661d6 Binary files /dev/null and b/assets/images/SmartWatches/sleep_data.png differ diff --git a/assets/images/SmartWatches/steps.png b/assets/images/SmartWatches/steps.png new file mode 100644 index 00000000..974668ea Binary files /dev/null and b/assets/images/SmartWatches/steps.png differ diff --git a/assets/images/SmartWatches/ticwatche2.png b/assets/images/SmartWatches/ticwatche2.png new file mode 100644 index 00000000..5ad3d308 Binary files /dev/null and b/assets/images/SmartWatches/ticwatche2.png differ diff --git a/assets/images/Weather_ico.png b/assets/images/Weather_ico.png new file mode 100644 index 00000000..2e00ae8c Binary files /dev/null and b/assets/images/Weather_ico.png differ diff --git a/assets/images/Weather_img.png b/assets/images/Weather_img.png new file mode 100644 index 00000000..57901477 Binary files /dev/null and b/assets/images/Weather_img.png differ diff --git a/assets/images/Wifi-AR.png b/assets/images/Wifi-AR.png new file mode 100644 index 00000000..a8e2d9af Binary files /dev/null and b/assets/images/Wifi-AR.png differ diff --git a/assets/images/al-habib_online_payment_service_icon.png b/assets/images/al-habib_online_payment_service_icon.png new file mode 100644 index 00000000..4056bca6 Binary files /dev/null and b/assets/images/al-habib_online_payment_service_icon.png differ diff --git a/assets/images/appointment_booking_en.png b/assets/images/appointment_booking_en.png new file mode 100644 index 00000000..14db8d89 Binary files /dev/null and b/assets/images/appointment_booking_en.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/blood_icon.png b/assets/images/blood_icon.png new file mode 100644 index 00000000..9e1b4468 Binary files /dev/null and b/assets/images/blood_icon.png differ diff --git a/assets/images/book_appointment_ar.png b/assets/images/book_appointment_ar.png new file mode 100644 index 00000000..f0bc5aff Binary files /dev/null and b/assets/images/book_appointment_ar.png differ diff --git a/assets/images/cc_ar.png b/assets/images/cc_ar.png new file mode 100644 index 00000000..e4388ba2 Binary files /dev/null and b/assets/images/cc_ar.png differ diff --git a/assets/images/cc_en.png b/assets/images/cc_en.png new file mode 100644 index 00000000..c11cf5e6 Binary files /dev/null and b/assets/images/cc_en.png differ diff --git a/assets/images/check-in.png b/assets/images/check-in.png new file mode 100644 index 00000000..f6effbeb Binary files /dev/null and b/assets/images/check-in.png differ diff --git a/assets/images/comments.png b/assets/images/comments.png new file mode 100644 index 00000000..353edf4e Binary files /dev/null and b/assets/images/comments.png differ diff --git a/assets/images/comprehensive_medical_checkup_logo.png b/assets/images/comprehensive_medical_checkup_logo.png new file mode 100644 index 00000000..15e4ac04 Binary files /dev/null and b/assets/images/comprehensive_medical_checkup_logo.png differ diff --git a/assets/images/covid-car.png b/assets/images/covid-car.png new file mode 100644 index 00000000..01090b74 Binary files /dev/null and b/assets/images/covid-car.png differ diff --git a/assets/images/device_icon.png b/assets/images/device_icon.png new file mode 100644 index 00000000..8ad55c09 Binary files /dev/null and b/assets/images/device_icon.png differ diff --git a/assets/images/emergency_service_image.png b/assets/images/emergency_service_image.png new file mode 100644 index 00000000..4dbcb7d6 Binary files /dev/null and b/assets/images/emergency_service_image.png differ diff --git a/assets/images/ereferral_service_icon.png b/assets/images/ereferral_service_icon.png new file mode 100644 index 00000000..a47b7f36 Binary files /dev/null and b/assets/images/ereferral_service_icon.png differ diff --git a/assets/images/female_face.png b/assets/images/female_face.png new file mode 100644 index 00000000..be8ed225 Binary files /dev/null and b/assets/images/female_face.png differ diff --git a/assets/images/gif/robot-idle.gif b/assets/images/gif/robot-idle.gif new file mode 100644 index 00000000..89dee325 Binary files /dev/null and b/assets/images/gif/robot-idle.gif differ diff --git a/assets/images/gif/robot-speaking.gif b/assets/images/gif/robot-speaking.gif new file mode 100644 index 00000000..253d786b Binary files /dev/null and b/assets/images/gif/robot-speaking.gif differ diff --git a/assets/images/habib-logo.png b/assets/images/habib-logo.png new file mode 100644 index 00000000..bcb6a42b Binary files /dev/null and b/assets/images/habib-logo.png differ diff --git a/assets/images/icon.png b/assets/images/icon.png new file mode 100644 index 00000000..e802ae3e Binary files /dev/null and b/assets/images/icon.png differ diff --git a/assets/images/id_card_icon.png b/assets/images/id_card_icon.png new file mode 100644 index 00000000..96650604 Binary files /dev/null and b/assets/images/id_card_icon.png differ diff --git a/assets/images/inpatient_advance.png b/assets/images/inpatient_advance.png new file mode 100644 index 00000000..38f1b7f4 Binary files /dev/null and b/assets/images/inpatient_advance.png differ diff --git a/assets/images/lang.png b/assets/images/lang.png new file mode 100644 index 00000000..34af3d9a Binary files /dev/null and b/assets/images/lang.png differ diff --git a/assets/images/login/103.png b/assets/images/login/103.png new file mode 100644 index 00000000..3326814b Binary files /dev/null and b/assets/images/login/103.png differ diff --git a/assets/images/login/more_icon.png b/assets/images/login/more_icon.png new file mode 100644 index 00000000..b696d345 Binary files /dev/null and b/assets/images/login/more_icon.png differ diff --git a/assets/images/logo.png b/assets/images/logo.png new file mode 100644 index 00000000..0d9e4a56 Binary files /dev/null and b/assets/images/logo.png differ diff --git a/assets/images/male_face.png b/assets/images/male_face.png new file mode 100644 index 00000000..7adf335a Binary files /dev/null and b/assets/images/male_face.png differ diff --git a/assets/images/map_markers/destination_map_marker.png b/assets/images/map_markers/destination_map_marker.png new file mode 100644 index 00000000..4f4eca35 Binary files /dev/null and b/assets/images/map_markers/destination_map_marker.png differ diff --git a/assets/images/map_markers/source_map_marker.png b/assets/images/map_markers/source_map_marker.png new file mode 100644 index 00000000..4b493b09 Binary files /dev/null and b/assets/images/map_markers/source_map_marker.png differ diff --git a/assets/images/medical/BMR_calculator.png b/assets/images/medical/BMR_calculator.png new file mode 100644 index 00000000..2c32b80d Binary files /dev/null and b/assets/images/medical/BMR_calculator.png differ diff --git a/assets/images/medical/Invoice.png b/assets/images/medical/Invoice.png new file mode 100644 index 00000000..1e3b6f25 Binary files /dev/null and b/assets/images/medical/Invoice.png differ diff --git a/assets/images/medical/active_medications.png b/assets/images/medical/active_medications.png new file mode 100644 index 00000000..67122598 Binary files /dev/null and b/assets/images/medical/active_medications.png differ diff --git a/assets/images/medical/ask_doctor_icon.png b/assets/images/medical/ask_doctor_icon.png new file mode 100644 index 00000000..bcb1f279 Binary files /dev/null and b/assets/images/medical/ask_doctor_icon.png differ diff --git a/assets/images/medical/blood_cholesterol_icon.png b/assets/images/medical/blood_cholesterol_icon.png new file mode 100644 index 00000000..3f1ab216 Binary files /dev/null and b/assets/images/medical/blood_cholesterol_icon.png differ diff --git a/assets/images/medical/blood_sugar_icon.png b/assets/images/medical/blood_sugar_icon.png new file mode 100644 index 00000000..6c9e8133 Binary files /dev/null and b/assets/images/medical/blood_sugar_icon.png differ diff --git a/assets/images/medical/bmi_health_calculator.png b/assets/images/medical/bmi_health_calculator.png new file mode 100644 index 00000000..2eb49440 Binary files /dev/null and b/assets/images/medical/bmi_health_calculator.png differ diff --git a/assets/images/medical/body_fat.png b/assets/images/medical/body_fat.png new file mode 100644 index 00000000..3dd36150 Binary files /dev/null and b/assets/images/medical/body_fat.png differ diff --git a/assets/images/medical/body_weight.png b/assets/images/medical/body_weight.png new file mode 100644 index 00000000..d1f0b324 Binary files /dev/null and b/assets/images/medical/body_weight.png differ diff --git a/assets/images/medical/calories-calculator.png b/assets/images/medical/calories-calculator.png new file mode 100644 index 00000000..e9d72554 Binary files /dev/null and b/assets/images/medical/calories-calculator.png differ diff --git a/assets/images/medical/carb_protein.png b/assets/images/medical/carb_protein.png new file mode 100644 index 00000000..eb6c6640 Binary files /dev/null and b/assets/images/medical/carb_protein.png differ diff --git a/assets/images/medical/check-in.png b/assets/images/medical/check-in.png new file mode 100644 index 00000000..f6effbeb Binary files /dev/null and b/assets/images/medical/check-in.png differ diff --git a/assets/images/medical/delivery_date_icon.png b/assets/images/medical/delivery_date_icon.png new file mode 100644 index 00000000..d578be34 Binary files /dev/null and b/assets/images/medical/delivery_date_icon.png differ diff --git a/assets/images/medical/doctor_icon.png b/assets/images/medical/doctor_icon.png new file mode 100644 index 00000000..02b3b9fa Binary files /dev/null and b/assets/images/medical/doctor_icon.png differ diff --git a/assets/images/medical/eye_measurement_icon.png b/assets/images/medical/eye_measurement_icon.png new file mode 100644 index 00000000..ca0c5d4b Binary files /dev/null and b/assets/images/medical/eye_measurement_icon.png differ diff --git a/assets/images/medical/insurance_approvals_icon.png b/assets/images/medical/insurance_approvals_icon.png new file mode 100644 index 00000000..11a00256 Binary files /dev/null and b/assets/images/medical/insurance_approvals_icon.png differ diff --git a/assets/images/medical/insurance_card_icon.png b/assets/images/medical/insurance_card_icon.png new file mode 100644 index 00000000..6fa5b5bf Binary files /dev/null and b/assets/images/medical/insurance_card_icon.png differ diff --git a/assets/images/medical/insurance_update_icon_.png b/assets/images/medical/insurance_update_icon_.png new file mode 100644 index 00000000..0001bcd2 Binary files /dev/null and b/assets/images/medical/insurance_update_icon_.png differ diff --git a/assets/images/medical/lab_result_icon.png b/assets/images/medical/lab_result_icon.png new file mode 100644 index 00000000..c9425278 Binary files /dev/null and b/assets/images/medical/lab_result_icon.png differ diff --git a/assets/images/medical/medical_history_icon.png b/assets/images/medical/medical_history_icon.png new file mode 100644 index 00000000..9a820f12 Binary files /dev/null and b/assets/images/medical/medical_history_icon.png differ diff --git a/assets/images/medical/medical_reports_icon.png b/assets/images/medical/medical_reports_icon.png new file mode 100644 index 00000000..ad9c9f7b Binary files /dev/null and b/assets/images/medical/medical_reports_icon.png differ diff --git a/assets/images/medical/monthly_reports_icon.png b/assets/images/medical/monthly_reports_icon.png new file mode 100644 index 00000000..5d51e24c Binary files /dev/null and b/assets/images/medical/monthly_reports_icon.png differ diff --git a/assets/images/medical/my_allergies_icon.png b/assets/images/medical/my_allergies_icon.png new file mode 100644 index 00000000..689b5321 Binary files /dev/null and b/assets/images/medical/my_allergies_icon.png differ diff --git a/assets/images/medical/my_tracker_icon.png b/assets/images/medical/my_tracker_icon.png new file mode 100644 index 00000000..1d46b859 Binary files /dev/null and b/assets/images/medical/my_tracker_icon.png differ diff --git a/assets/images/medical/my_vaccines_icon.png b/assets/images/medical/my_vaccines_icon.png new file mode 100644 index 00000000..23a7352b Binary files /dev/null and b/assets/images/medical/my_vaccines_icon.png differ diff --git a/assets/images/medical/ovulation_period_icon.png b/assets/images/medical/ovulation_period_icon.png new file mode 100644 index 00000000..c9a075d3 Binary files /dev/null and b/assets/images/medical/ovulation_period_icon.png differ diff --git a/assets/images/medical/prescription_icon.png b/assets/images/medical/prescription_icon.png new file mode 100644 index 00000000..1d40e95d Binary files /dev/null and b/assets/images/medical/prescription_icon.png differ diff --git a/assets/images/medical/sick_leaves_icons.png b/assets/images/medical/sick_leaves_icons.png new file mode 100644 index 00000000..67a9c937 Binary files /dev/null and b/assets/images/medical/sick_leaves_icons.png differ diff --git a/assets/images/medical/smartwatch_icon.png b/assets/images/medical/smartwatch_icon.png new file mode 100644 index 00000000..c43fe468 Binary files /dev/null and b/assets/images/medical/smartwatch_icon.png differ diff --git a/assets/images/medical/triglycerides_blood_icon.png b/assets/images/medical/triglycerides_blood_icon.png new file mode 100644 index 00000000..b3bebf9e Binary files /dev/null and b/assets/images/medical/triglycerides_blood_icon.png differ diff --git a/assets/images/medical/vital_signs.png b/assets/images/medical/vital_signs.png new file mode 100644 index 00000000..7b642d6e Binary files /dev/null and b/assets/images/medical/vital_signs.png differ diff --git a/assets/images/my_file_white_icon.png b/assets/images/my_file_white_icon.png new file mode 100644 index 00000000..6bd9b935 Binary files /dev/null and b/assets/images/my_file_white_icon.png differ diff --git a/assets/images/new-design/AM.PNG b/assets/images/new-design/AM.PNG new file mode 100644 index 00000000..212ca0b1 Binary files /dev/null and b/assets/images/new-design/AM.PNG differ diff --git a/assets/images/new-design/BMR_calculator.png b/assets/images/new-design/BMR_calculator.png new file mode 100644 index 00000000..2c32b80d Binary files /dev/null and b/assets/images/new-design/BMR_calculator.png differ diff --git a/assets/images/new-design/Complaint_icon.png b/assets/images/new-design/Complaint_icon.png new file mode 100644 index 00000000..42af40c2 Binary files /dev/null and b/assets/images/new-design/Complaint_icon.png differ diff --git a/assets/images/new-design/Invoice.png b/assets/images/new-design/Invoice.png new file mode 100644 index 00000000..f109717e Binary files /dev/null and b/assets/images/new-design/Invoice.png differ diff --git a/assets/images/new-design/NFCIcon_option2.png b/assets/images/new-design/NFCIcon_option2.png new file mode 100644 index 00000000..938eec27 Binary files /dev/null and b/assets/images/new-design/NFCIcon_option2.png differ diff --git a/assets/images/new-design/ViewDetailsIco.png b/assets/images/new-design/ViewDetailsIco.png new file mode 100644 index 00000000..cd58bddb Binary files /dev/null and b/assets/images/new-design/ViewDetailsIco.png differ diff --git a/assets/images/new-design/active_medications.png b/assets/images/new-design/active_medications.png new file mode 100644 index 00000000..67122598 Binary files /dev/null and b/assets/images/new-design/active_medications.png differ diff --git a/assets/images/new-design/alert-triangle.png b/assets/images/new-design/alert-triangle.png new file mode 100644 index 00000000..5d8d7f25 Binary files /dev/null and b/assets/images/new-design/alert-triangle.png differ diff --git a/assets/images/new-design/allergiesDetails.png b/assets/images/new-design/allergiesDetails.png new file mode 100644 index 00000000..fc268c9c Binary files /dev/null and b/assets/images/new-design/allergiesDetails.png differ diff --git a/assets/images/new-design/arrow_menu_black-ar.png b/assets/images/new-design/arrow_menu_black-ar.png new file mode 100644 index 00000000..8774a535 Binary files /dev/null and b/assets/images/new-design/arrow_menu_black-ar.png differ diff --git a/assets/images/new-design/arrow_menu_black-en.png b/assets/images/new-design/arrow_menu_black-en.png new file mode 100644 index 00000000..0cd426dc Binary files /dev/null and b/assets/images/new-design/arrow_menu_black-en.png differ diff --git a/assets/images/new-design/ask_doctor_icon.png b/assets/images/new-design/ask_doctor_icon.png new file mode 100644 index 00000000..bcb1f279 Binary files /dev/null and b/assets/images/new-design/ask_doctor_icon.png differ diff --git a/assets/images/new-design/awesome-plus.png b/assets/images/new-design/awesome-plus.png new file mode 100644 index 00000000..78e432a5 Binary files /dev/null and b/assets/images/new-design/awesome-plus.png differ diff --git a/assets/images/new-design/blood_cholesterol_icon.png b/assets/images/new-design/blood_cholesterol_icon.png new file mode 100644 index 00000000..3f1ab216 Binary files /dev/null and b/assets/images/new-design/blood_cholesterol_icon.png differ diff --git a/assets/images/new-design/blood_icon.png b/assets/images/new-design/blood_icon.png new file mode 100644 index 00000000..6d1a0c10 Binary files /dev/null and b/assets/images/new-design/blood_icon.png differ diff --git a/assets/images/new-design/blood_sugar_icon.png b/assets/images/new-design/blood_sugar_icon.png new file mode 100644 index 00000000..6c9e8133 Binary files /dev/null and b/assets/images/new-design/blood_sugar_icon.png differ diff --git a/assets/images/new-design/bmi_health_calculator.png b/assets/images/new-design/bmi_health_calculator.png new file mode 100644 index 00000000..2eb49440 Binary files /dev/null and b/assets/images/new-design/bmi_health_calculator.png differ diff --git a/assets/images/new-design/body_fat.png b/assets/images/new-design/body_fat.png new file mode 100644 index 00000000..3dd36150 Binary files /dev/null and b/assets/images/new-design/body_fat.png differ diff --git a/assets/images/new-design/body_weight.png b/assets/images/new-design/body_weight.png new file mode 100644 index 00000000..d1f0b324 Binary files /dev/null and b/assets/images/new-design/body_weight.png differ diff --git a/assets/images/new-design/booking_icon_active.png b/assets/images/new-design/booking_icon_active.png new file mode 100644 index 00000000..0a829d81 Binary files /dev/null and b/assets/images/new-design/booking_icon_active.png differ diff --git a/assets/images/new-design/calendar.png b/assets/images/new-design/calendar.png new file mode 100644 index 00000000..ac72b030 Binary files /dev/null and b/assets/images/new-design/calendar.png differ diff --git a/assets/images/new-design/calender-secondary.png b/assets/images/new-design/calender-secondary.png new file mode 100644 index 00000000..a790849d Binary files /dev/null and b/assets/images/new-design/calender-secondary.png differ diff --git a/assets/images/new-design/calories-calculator.png b/assets/images/new-design/calories-calculator.png new file mode 100644 index 00000000..e9d72554 Binary files /dev/null and b/assets/images/new-design/calories-calculator.png differ diff --git a/assets/images/new-design/cancel_icon.png b/assets/images/new-design/cancel_icon.png new file mode 100644 index 00000000..499170c4 Binary files /dev/null and b/assets/images/new-design/cancel_icon.png differ diff --git a/assets/images/new-design/carb_protein.png b/assets/images/new-design/carb_protein.png new file mode 100644 index 00000000..eb6c6640 Binary files /dev/null and b/assets/images/new-design/carb_protein.png differ diff --git a/assets/images/new-design/check-in.png b/assets/images/new-design/check-in.png new file mode 100644 index 00000000..f6effbeb Binary files /dev/null and b/assets/images/new-design/check-in.png differ diff --git a/assets/images/new-design/check_icon.png b/assets/images/new-design/check_icon.png new file mode 100644 index 00000000..c098b175 Binary files /dev/null and b/assets/images/new-design/check_icon.png differ diff --git a/assets/images/new-design/children_vaccines_icon.png b/assets/images/new-design/children_vaccines_icon.png new file mode 100644 index 00000000..c52e3b8b Binary files /dev/null and b/assets/images/new-design/children_vaccines_icon.png differ diff --git a/assets/images/new-design/close_icon.png b/assets/images/new-design/close_icon.png new file mode 100644 index 00000000..58b10630 Binary files /dev/null and b/assets/images/new-design/close_icon.png differ diff --git a/assets/images/new-design/confirm_button.png b/assets/images/new-design/confirm_button.png new file mode 100644 index 00000000..fc4c8587 Binary files /dev/null and b/assets/images/new-design/confirm_button.png differ diff --git a/assets/images/new-design/confirm_icon.png b/assets/images/new-design/confirm_icon.png new file mode 100644 index 00000000..d4b72de3 Binary files /dev/null and b/assets/images/new-design/confirm_icon.png differ diff --git a/assets/images/new-design/covid-19-big-banner-bg.png b/assets/images/new-design/covid-19-big-banner-bg.png new file mode 100644 index 00000000..a66d6815 Binary files /dev/null and b/assets/images/new-design/covid-19-big-banner-bg.png differ diff --git a/assets/images/new-design/covid_bg_transparent.png b/assets/images/new-design/covid_bg_transparent.png new file mode 100644 index 00000000..cd5f12f1 Binary files /dev/null and b/assets/images/new-design/covid_bg_transparent.png differ diff --git a/assets/images/new-design/delivery_date_icon.png b/assets/images/new-design/delivery_date_icon.png new file mode 100644 index 00000000..d578be34 Binary files /dev/null and b/assets/images/new-design/delivery_date_icon.png differ diff --git a/assets/images/new-design/device_icon.png b/assets/images/new-design/device_icon.png new file mode 100644 index 00000000..8ad55c09 Binary files /dev/null and b/assets/images/new-design/device_icon.png differ diff --git a/assets/images/new-design/doctor_video.png b/assets/images/new-design/doctor_video.png new file mode 100644 index 00000000..0e63b22d Binary files /dev/null and b/assets/images/new-design/doctor_video.png differ diff --git a/assets/images/new-design/doctor_white.png b/assets/images/new-design/doctor_white.png new file mode 100644 index 00000000..bb5944cb Binary files /dev/null and b/assets/images/new-design/doctor_white.png differ diff --git a/assets/images/new-design/emergency_icon.png b/assets/images/new-design/emergency_icon.png new file mode 100644 index 00000000..8c5ccd85 Binary files /dev/null and b/assets/images/new-design/emergency_icon.png differ diff --git a/assets/images/new-design/empty_box.png b/assets/images/new-design/empty_box.png new file mode 100644 index 00000000..af3551fd Binary files /dev/null and b/assets/images/new-design/empty_box.png differ diff --git a/assets/images/new-design/facebook.png b/assets/images/new-design/facebook.png new file mode 100644 index 00000000..cb93d64a Binary files /dev/null and b/assets/images/new-design/facebook.png differ diff --git a/assets/images/new-design/family_icon_bottom_bar.png b/assets/images/new-design/family_icon_bottom_bar.png new file mode 100644 index 00000000..f6be8edf Binary files /dev/null and b/assets/images/new-design/family_icon_bottom_bar.png differ diff --git a/assets/images/new-design/feedback_icon.png b/assets/images/new-design/feedback_icon.png new file mode 100644 index 00000000..138ce41d Binary files /dev/null and b/assets/images/new-design/feedback_icon.png differ diff --git a/assets/images/new-design/female.png b/assets/images/new-design/female.png new file mode 100644 index 00000000..29cf8c98 Binary files /dev/null and b/assets/images/new-design/female.png differ diff --git a/assets/images/new-design/female_face.png b/assets/images/new-design/female_face.png new file mode 100644 index 00000000..be8ed225 Binary files /dev/null and b/assets/images/new-design/female_face.png differ diff --git a/assets/images/new-design/find_us_icon.png b/assets/images/new-design/find_us_icon.png new file mode 100644 index 00000000..d2666cd4 Binary files /dev/null and b/assets/images/new-design/find_us_icon.png differ diff --git a/assets/images/new-design/garbage.png b/assets/images/new-design/garbage.png new file mode 100644 index 00000000..b0d48797 Binary files /dev/null and b/assets/images/new-design/garbage.png differ diff --git a/assets/images/new-design/health_calculator_icon.png b/assets/images/new-design/health_calculator_icon.png new file mode 100644 index 00000000..f2a3fcfb Binary files /dev/null and b/assets/images/new-design/health_calculator_icon.png differ diff --git a/assets/images/new-design/health_convertor_icon.png b/assets/images/new-design/health_convertor_icon.png new file mode 100644 index 00000000..903a490c Binary files /dev/null and b/assets/images/new-design/health_convertor_icon.png differ diff --git a/assets/images/new-design/hmg_full_logo_hd_white.png b/assets/images/new-design/hmg_full_logo_hd_white.png new file mode 100644 index 00000000..e4d7ae60 Binary files /dev/null and b/assets/images/new-design/hmg_full_logo_hd_white.png differ diff --git a/assets/images/new-design/hospital_address_icon.png b/assets/images/new-design/hospital_address_icon.png new file mode 100644 index 00000000..8f151087 Binary files /dev/null and b/assets/images/new-design/hospital_address_icon.png differ diff --git a/assets/images/new-design/icon_hospital.png b/assets/images/new-design/icon_hospital.png new file mode 100644 index 00000000..413ad813 Binary files /dev/null and b/assets/images/new-design/icon_hospital.png differ diff --git a/assets/images/new-design/installment.png b/assets/images/new-design/installment.png new file mode 100644 index 00000000..034497ef Binary files /dev/null and b/assets/images/new-design/installment.png differ diff --git a/assets/images/new-design/insurance_approvals_icon.png b/assets/images/new-design/insurance_approvals_icon.png new file mode 100644 index 00000000..593dab33 Binary files /dev/null and b/assets/images/new-design/insurance_approvals_icon.png differ diff --git a/assets/images/new-design/insurance_card_icon.png b/assets/images/new-design/insurance_card_icon.png new file mode 100644 index 00000000..a7bacca5 Binary files /dev/null and b/assets/images/new-design/insurance_card_icon.png differ diff --git a/assets/images/new-design/lab_result_icon.png b/assets/images/new-design/lab_result_icon.png new file mode 100644 index 00000000..60b14ca8 Binary files /dev/null and b/assets/images/new-design/lab_result_icon.png differ diff --git a/assets/images/new-design/linkedin.png b/assets/images/new-design/linkedin.png new file mode 100644 index 00000000..1f35f836 Binary files /dev/null and b/assets/images/new-design/linkedin.png differ diff --git a/assets/images/new-design/liveCare_ar_bg.png b/assets/images/new-design/liveCare_ar_bg.png new file mode 100644 index 00000000..d29186ae Binary files /dev/null and b/assets/images/new-design/liveCare_ar_bg.png differ diff --git a/assets/images/new-design/liveCare_en_bg.png b/assets/images/new-design/liveCare_en_bg.png new file mode 100644 index 00000000..b0799af0 Binary files /dev/null and b/assets/images/new-design/liveCare_en_bg.png differ diff --git a/assets/images/new-design/live_chat_icon.png b/assets/images/new-design/live_chat_icon.png new file mode 100644 index 00000000..461a1e83 Binary files /dev/null and b/assets/images/new-design/live_chat_icon.png differ diff --git a/assets/images/new-design/loader.gif b/assets/images/new-design/loader.gif new file mode 100644 index 00000000..8fe79bf9 Binary files /dev/null and b/assets/images/new-design/loader.gif differ diff --git a/assets/images/new-design/location_icon.png b/assets/images/new-design/location_icon.png new file mode 100644 index 00000000..f4ccb0e2 Binary files /dev/null and b/assets/images/new-design/location_icon.png differ diff --git a/assets/images/new-design/mada.png b/assets/images/new-design/mada.png new file mode 100644 index 00000000..f65b970c Binary files /dev/null and b/assets/images/new-design/mada.png differ diff --git a/assets/images/new-design/male.png b/assets/images/new-design/male.png new file mode 100644 index 00000000..e957df70 Binary files /dev/null and b/assets/images/new-design/male.png differ diff --git a/assets/images/new-design/male_face.png b/assets/images/new-design/male_face.png new file mode 100644 index 00000000..7adf335a Binary files /dev/null and b/assets/images/new-design/male_face.png differ diff --git a/assets/images/new-design/mastercard.png b/assets/images/new-design/mastercard.png new file mode 100644 index 00000000..1d48b854 Binary files /dev/null and b/assets/images/new-design/mastercard.png differ diff --git a/assets/images/new-design/medical_reports_icon.png b/assets/images/new-design/medical_reports_icon.png new file mode 100644 index 00000000..ad9c9f7b Binary files /dev/null and b/assets/images/new-design/medical_reports_icon.png differ diff --git a/assets/images/new-design/medicine_prescriptions_icon.png b/assets/images/new-design/medicine_prescriptions_icon.png new file mode 100644 index 00000000..a4022770 Binary files /dev/null and b/assets/images/new-design/medicine_prescriptions_icon.png differ diff --git a/assets/images/new-design/monthly_reports_icon.png b/assets/images/new-design/monthly_reports_icon.png new file mode 100644 index 00000000..5d51e24c Binary files /dev/null and b/assets/images/new-design/monthly_reports_icon.png differ diff --git a/assets/images/new-design/more_icon.png b/assets/images/new-design/more_icon.png new file mode 100644 index 00000000..b696d345 Binary files /dev/null and b/assets/images/new-design/more_icon.png differ diff --git a/assets/images/new-design/my_allergies_icon.png b/assets/images/new-design/my_allergies_icon.png new file mode 100644 index 00000000..689b5321 Binary files /dev/null and b/assets/images/new-design/my_allergies_icon.png differ diff --git a/assets/images/new-design/my_file_bottom_bar.png b/assets/images/new-design/my_file_bottom_bar.png new file mode 100644 index 00000000..c89455c2 Binary files /dev/null and b/assets/images/new-design/my_file_bottom_bar.png differ diff --git a/assets/images/new-design/my_tracker_icon.png b/assets/images/new-design/my_tracker_icon.png new file mode 100644 index 00000000..1d46b859 Binary files /dev/null and b/assets/images/new-design/my_tracker_icon.png differ diff --git a/assets/images/new-design/my_vaccines_icon.png b/assets/images/new-design/my_vaccines_icon.png new file mode 100644 index 00000000..23a7352b Binary files /dev/null and b/assets/images/new-design/my_vaccines_icon.png differ diff --git a/assets/images/new-design/noAppointmentIcon.png b/assets/images/new-design/noAppointmentIcon.png new file mode 100644 index 00000000..a52b5011 Binary files /dev/null and b/assets/images/new-design/noAppointmentIcon.png differ diff --git a/assets/images/new-design/online_payment_icon.png b/assets/images/new-design/online_payment_icon.png new file mode 100644 index 00000000..6e167ace Binary files /dev/null and b/assets/images/new-design/online_payment_icon.png differ diff --git a/assets/images/new-design/ovulation_period_icon.png b/assets/images/new-design/ovulation_period_icon.png new file mode 100644 index 00000000..c9a075d3 Binary files /dev/null and b/assets/images/new-design/ovulation_period_icon.png differ diff --git a/assets/images/new-design/parking_system_icon.png b/assets/images/new-design/parking_system_icon.png new file mode 100644 index 00000000..d4f26181 Binary files /dev/null and b/assets/images/new-design/parking_system_icon.png differ diff --git a/assets/images/new-design/pay_online_button.png b/assets/images/new-design/pay_online_button.png new file mode 100644 index 00000000..988e1ace Binary files /dev/null and b/assets/images/new-design/pay_online_button.png differ diff --git a/assets/images/new-design/pay_online_button_arabic.png b/assets/images/new-design/pay_online_button_arabic.png new file mode 100644 index 00000000..1c49fc17 Binary files /dev/null and b/assets/images/new-design/pay_online_button_arabic.png differ diff --git a/assets/images/new-design/pay_online_button_arabic_disabled.png b/assets/images/new-design/pay_online_button_arabic_disabled.png new file mode 100644 index 00000000..0cb6dbf7 Binary files /dev/null and b/assets/images/new-design/pay_online_button_arabic_disabled.png differ diff --git a/assets/images/new-design/pay_online_button_disabled.png b/assets/images/new-design/pay_online_button_disabled.png new file mode 100644 index 00000000..b4d0c5a9 Binary files /dev/null and b/assets/images/new-design/pay_online_button_disabled.png differ diff --git a/assets/images/new-design/payment-method.png b/assets/images/new-design/payment-method.png new file mode 100644 index 00000000..a6b9f863 Binary files /dev/null and b/assets/images/new-design/payment-method.png differ diff --git a/assets/images/new-design/payment_options_invoice_confirmation.png b/assets/images/new-design/payment_options_invoice_confirmation.png new file mode 100644 index 00000000..4bb83fec Binary files /dev/null and b/assets/images/new-design/payment_options_invoice_confirmation.png differ diff --git a/assets/images/new-design/qr-code.png b/assets/images/new-design/qr-code.png new file mode 100644 index 00000000..1135f7fa Binary files /dev/null and b/assets/images/new-design/qr-code.png differ diff --git a/assets/images/new-design/qr_code_button.png b/assets/images/new-design/qr_code_button.png new file mode 100644 index 00000000..7cd41d4c Binary files /dev/null and b/assets/images/new-design/qr_code_button.png differ diff --git a/assets/images/new-design/radiology_service_icon.png b/assets/images/new-design/radiology_service_icon.png new file mode 100644 index 00000000..9ff23309 Binary files /dev/null and b/assets/images/new-design/radiology_service_icon.png differ diff --git a/assets/images/new-design/reminder_icon.png b/assets/images/new-design/reminder_icon.png new file mode 100644 index 00000000..c280d7d0 Binary files /dev/null and b/assets/images/new-design/reminder_icon.png differ diff --git a/assets/images/new-design/sadad.png b/assets/images/new-design/sadad.png new file mode 100644 index 00000000..35e0426c Binary files /dev/null and b/assets/images/new-design/sadad.png differ diff --git a/assets/images/new-design/search_by_clinic.png b/assets/images/new-design/search_by_clinic.png new file mode 100644 index 00000000..92964cb3 Binary files /dev/null and b/assets/images/new-design/search_by_clinic.png differ diff --git a/assets/images/new-design/search_by_doctor.png b/assets/images/new-design/search_by_doctor.png new file mode 100644 index 00000000..f261e6cf Binary files /dev/null and b/assets/images/new-design/search_by_doctor.png differ diff --git a/assets/images/new-design/setting_gear_icon.png b/assets/images/new-design/setting_gear_icon.png new file mode 100644 index 00000000..ac1f0bc4 Binary files /dev/null and b/assets/images/new-design/setting_gear_icon.png differ diff --git a/assets/images/new-design/sick_leaves_icons.png b/assets/images/new-design/sick_leaves_icons.png new file mode 100644 index 00000000..67a9c937 Binary files /dev/null and b/assets/images/new-design/sick_leaves_icons.png differ diff --git a/assets/images/new-design/smartwatch_icon.png b/assets/images/new-design/smartwatch_icon.png new file mode 100644 index 00000000..c43fe468 Binary files /dev/null and b/assets/images/new-design/smartwatch_icon.png differ diff --git a/assets/images/new-design/survey.png b/assets/images/new-design/survey.png new file mode 100644 index 00000000..e822c870 Binary files /dev/null and b/assets/images/new-design/survey.png differ diff --git a/assets/images/new-design/tamara.png b/assets/images/new-design/tamara.png new file mode 100644 index 00000000..ab58e3ac Binary files /dev/null and b/assets/images/new-design/tamara.png differ diff --git a/assets/images/new-design/time_icon.png b/assets/images/new-design/time_icon.png new file mode 100644 index 00000000..58ad960b Binary files /dev/null and b/assets/images/new-design/time_icon.png differ diff --git a/assets/images/new-design/triglycerides_blood_icon.png b/assets/images/new-design/triglycerides_blood_icon.png new file mode 100644 index 00000000..b3bebf9e Binary files /dev/null and b/assets/images/new-design/triglycerides_blood_icon.png differ diff --git a/assets/images/new-design/twitter.png b/assets/images/new-design/twitter.png new file mode 100644 index 00000000..823546e7 Binary files /dev/null and b/assets/images/new-design/twitter.png differ diff --git a/assets/images/new-design/twitter_dashboard_icon.png b/assets/images/new-design/twitter_dashboard_icon.png new file mode 100644 index 00000000..5d0a0646 Binary files /dev/null and b/assets/images/new-design/twitter_dashboard_icon.png differ diff --git a/assets/images/new-design/upcoming_icon_bottom_bar.png b/assets/images/new-design/upcoming_icon_bottom_bar.png new file mode 100644 index 00000000..ad0a4804 Binary files /dev/null and b/assets/images/new-design/upcoming_icon_bottom_bar.png differ diff --git a/assets/images/new-design/video.png b/assets/images/new-design/video.png new file mode 100644 index 00000000..2962aade Binary files /dev/null and b/assets/images/new-design/video.png differ diff --git a/assets/images/new-design/video_call_instruction.png b/assets/images/new-design/video_call_instruction.png new file mode 100644 index 00000000..eef9996c Binary files /dev/null and b/assets/images/new-design/video_call_instruction.png differ diff --git a/assets/images/new-design/view_more.png b/assets/images/new-design/view_more.png new file mode 100644 index 00000000..8b52a7e7 Binary files /dev/null and b/assets/images/new-design/view_more.png differ diff --git a/assets/images/new-design/virtual_tour_icon.png b/assets/images/new-design/virtual_tour_icon.png new file mode 100644 index 00000000..541603ea Binary files /dev/null and b/assets/images/new-design/virtual_tour_icon.png differ diff --git a/assets/images/new-design/visa.png b/assets/images/new-design/visa.png new file mode 100644 index 00000000..8d29703c Binary files /dev/null and b/assets/images/new-design/visa.png differ diff --git a/assets/images/new-design/vital_signs.png b/assets/images/new-design/vital_signs.png new file mode 100644 index 00000000..7b642d6e Binary files /dev/null and b/assets/images/new-design/vital_signs.png differ diff --git a/assets/images/new-design/waiting-room.png b/assets/images/new-design/waiting-room.png new file mode 100644 index 00000000..02a9650c Binary files /dev/null and b/assets/images/new-design/waiting-room.png differ diff --git a/assets/images/new-design/waiting_for_doctor.png b/assets/images/new-design/waiting_for_doctor.png new file mode 100644 index 00000000..c330c25a Binary files /dev/null and b/assets/images/new-design/waiting_for_doctor.png differ diff --git a/assets/images/new-design/walkin.png b/assets/images/new-design/walkin.png new file mode 100644 index 00000000..248c8788 Binary files /dev/null and b/assets/images/new-design/walkin.png differ diff --git a/assets/images/new-design/water_icon.png b/assets/images/new-design/water_icon.png new file mode 100644 index 00000000..9e9ccf5d Binary files /dev/null and b/assets/images/new-design/water_icon.png differ diff --git a/assets/images/new-design/youtube.png b/assets/images/new-design/youtube.png new file mode 100644 index 00000000..7c8c847b Binary files /dev/null and b/assets/images/new-design/youtube.png differ diff --git a/assets/images/new/CS/loader.gif b/assets/images/new/CS/loader.gif new file mode 100644 index 00000000..3e343727 Binary files /dev/null and b/assets/images/new/CS/loader.gif differ diff --git a/assets/images/new/NFCCheckIn_QR_gps_HMG.png b/assets/images/new/NFCCheckIn_QR_gps_HMG.png new file mode 100644 index 00000000..20fc0ef6 Binary files /dev/null and b/assets/images/new/NFCCheckIn_QR_gps_HMG.png differ diff --git a/assets/images/new/admission_notice.png b/assets/images/new/admission_notice.png new file mode 100644 index 00000000..50b5c1d5 Binary files /dev/null and b/assets/images/new/admission_notice.png differ diff --git a/assets/images/new/birth.png b/assets/images/new/birth.png new file mode 100644 index 00000000..39bd3f81 Binary files /dev/null and b/assets/images/new/birth.png differ diff --git a/assets/images/new/body_parts/female/abdomin.png b/assets/images/new/body_parts/female/abdomin.png new file mode 100644 index 00000000..f4918d71 Binary files /dev/null and b/assets/images/new/body_parts/female/abdomin.png differ diff --git a/assets/images/new/body_parts/female/anal.png b/assets/images/new/body_parts/female/anal.png new file mode 100644 index 00000000..d96ef288 Binary files /dev/null and b/assets/images/new/body_parts/female/anal.png differ diff --git a/assets/images/new/body_parts/female/axilla.png b/assets/images/new/body_parts/female/axilla.png new file mode 100644 index 00000000..f38be6b3 Binary files /dev/null and b/assets/images/new/body_parts/female/axilla.png differ diff --git a/assets/images/new/body_parts/female/back.png b/assets/images/new/body_parts/female/back.png new file mode 100644 index 00000000..65d9ef19 Binary files /dev/null and b/assets/images/new/body_parts/female/back.png differ diff --git a/assets/images/new/body_parts/female/bikini.png b/assets/images/new/body_parts/female/bikini.png new file mode 100644 index 00000000..a1a68423 Binary files /dev/null and b/assets/images/new/body_parts/female/bikini.png differ diff --git a/assets/images/new/body_parts/female/bikini_line.png b/assets/images/new/body_parts/female/bikini_line.png new file mode 100644 index 00000000..12fc0e6e Binary files /dev/null and b/assets/images/new/body_parts/female/bikini_line.png differ diff --git a/assets/images/new/body_parts/female/buttocks.png b/assets/images/new/body_parts/female/buttocks.png new file mode 100644 index 00000000..b83576f3 Binary files /dev/null and b/assets/images/new/body_parts/female/buttocks.png differ diff --git a/assets/images/new/body_parts/female/chest.png b/assets/images/new/body_parts/female/chest.png new file mode 100644 index 00000000..727ebe7a Binary files /dev/null and b/assets/images/new/body_parts/female/chest.png differ diff --git a/assets/images/new/body_parts/female/chest_line.png b/assets/images/new/body_parts/female/chest_line.png new file mode 100644 index 00000000..0b4fecb8 Binary files /dev/null and b/assets/images/new/body_parts/female/chest_line.png differ diff --git a/assets/images/new/body_parts/female/full_body_female.png b/assets/images/new/body_parts/female/full_body_female.png new file mode 100644 index 00000000..fb6a3756 Binary files /dev/null and b/assets/images/new/body_parts/female/full_body_female.png differ diff --git a/assets/images/new/body_parts/female/full_legs.png b/assets/images/new/body_parts/female/full_legs.png new file mode 100644 index 00000000..5a365a7e Binary files /dev/null and b/assets/images/new/body_parts/female/full_legs.png differ diff --git a/assets/images/new/body_parts/female/lower_arm.png b/assets/images/new/body_parts/female/lower_arm.png new file mode 100644 index 00000000..717b2cde Binary files /dev/null and b/assets/images/new/body_parts/female/lower_arm.png differ diff --git a/assets/images/new/body_parts/female/lower_leg.png b/assets/images/new/body_parts/female/lower_leg.png new file mode 100644 index 00000000..88ccacef Binary files /dev/null and b/assets/images/new/body_parts/female/lower_leg.png differ diff --git a/assets/images/new/body_parts/female/shoulders.png b/assets/images/new/body_parts/female/shoulders.png new file mode 100644 index 00000000..e1f253a8 Binary files /dev/null and b/assets/images/new/body_parts/female/shoulders.png differ diff --git a/assets/images/new/body_parts/female/upper_arm.png b/assets/images/new/body_parts/female/upper_arm.png new file mode 100644 index 00000000..1edb873c Binary files /dev/null and b/assets/images/new/body_parts/female/upper_arm.png differ diff --git a/assets/images/new/body_parts/female/upper_legs.png b/assets/images/new/body_parts/female/upper_legs.png new file mode 100644 index 00000000..a8aa2ec7 Binary files /dev/null and b/assets/images/new/body_parts/female/upper_legs.png differ diff --git a/assets/images/new/body_parts/male/abdomin.png b/assets/images/new/body_parts/male/abdomin.png new file mode 100644 index 00000000..1b180b42 Binary files /dev/null and b/assets/images/new/body_parts/male/abdomin.png differ diff --git a/assets/images/new/body_parts/male/axilla.png b/assets/images/new/body_parts/male/axilla.png new file mode 100644 index 00000000..61af9492 Binary files /dev/null and b/assets/images/new/body_parts/male/axilla.png differ diff --git a/assets/images/new/body_parts/male/back.png b/assets/images/new/body_parts/male/back.png new file mode 100644 index 00000000..224147ec Binary files /dev/null and b/assets/images/new/body_parts/male/back.png differ diff --git a/assets/images/new/body_parts/male/bikini.png b/assets/images/new/body_parts/male/bikini.png new file mode 100644 index 00000000..aa98ea74 Binary files /dev/null and b/assets/images/new/body_parts/male/bikini.png differ diff --git a/assets/images/new/body_parts/male/bikini_line.png b/assets/images/new/body_parts/male/bikini_line.png new file mode 100644 index 00000000..60ed64e2 Binary files /dev/null and b/assets/images/new/body_parts/male/bikini_line.png differ diff --git a/assets/images/new/body_parts/male/chest.png b/assets/images/new/body_parts/male/chest.png new file mode 100644 index 00000000..b7cec070 Binary files /dev/null and b/assets/images/new/body_parts/male/chest.png differ diff --git a/assets/images/new/body_parts/male/chest_line.png b/assets/images/new/body_parts/male/chest_line.png new file mode 100644 index 00000000..41e779f3 Binary files /dev/null and b/assets/images/new/body_parts/male/chest_line.png differ diff --git a/assets/images/new/body_parts/male/full_body_male.png b/assets/images/new/body_parts/male/full_body_male.png new file mode 100644 index 00000000..df304728 Binary files /dev/null and b/assets/images/new/body_parts/male/full_body_male.png differ diff --git a/assets/images/new/body_parts/male/full_legs.png b/assets/images/new/body_parts/male/full_legs.png new file mode 100644 index 00000000..eee2fa07 Binary files /dev/null and b/assets/images/new/body_parts/male/full_legs.png differ diff --git a/assets/images/new/body_parts/male/full_neck.png b/assets/images/new/body_parts/male/full_neck.png new file mode 100644 index 00000000..a75159f6 Binary files /dev/null and b/assets/images/new/body_parts/male/full_neck.png differ diff --git a/assets/images/new/body_parts/male/half_neck.png b/assets/images/new/body_parts/male/half_neck.png new file mode 100644 index 00000000..5ee0249c Binary files /dev/null and b/assets/images/new/body_parts/male/half_neck.png differ diff --git a/assets/images/new/body_parts/male/lower_arm.png b/assets/images/new/body_parts/male/lower_arm.png new file mode 100644 index 00000000..120242ed Binary files /dev/null and b/assets/images/new/body_parts/male/lower_arm.png differ diff --git a/assets/images/new/body_parts/male/lower_legs.png b/assets/images/new/body_parts/male/lower_legs.png new file mode 100644 index 00000000..8367aa8c Binary files /dev/null and b/assets/images/new/body_parts/male/lower_legs.png differ diff --git a/assets/images/new/body_parts/male/shoulders.png b/assets/images/new/body_parts/male/shoulders.png new file mode 100644 index 00000000..907f2dd7 Binary files /dev/null and b/assets/images/new/body_parts/male/shoulders.png differ diff --git a/assets/images/new/body_parts/male/upper_arm.png b/assets/images/new/body_parts/male/upper_arm.png new file mode 100644 index 00000000..f80a75da Binary files /dev/null and b/assets/images/new/body_parts/male/upper_arm.png differ diff --git a/assets/images/new/body_parts/male/upper_legs.png b/assets/images/new/body_parts/male/upper_legs.png new file mode 100644 index 00000000..e0c973b7 Binary files /dev/null and b/assets/images/new/body_parts/male/upper_legs.png differ diff --git a/assets/images/new/booth_image.png b/assets/images/new/booth_image.png new file mode 100644 index 00000000..0a3427e4 Binary files /dev/null and b/assets/images/new/booth_image.png differ diff --git a/assets/images/new/consent.jpg b/assets/images/new/consent.jpg new file mode 100644 index 00000000..0d0e7df8 Binary files /dev/null and b/assets/images/new/consent.jpg differ 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/new/hospital.png b/assets/images/new/hospital.png new file mode 100644 index 00000000..10c6a1f1 Binary files /dev/null and b/assets/images/new/hospital.png differ diff --git a/assets/images/new/icon.png b/assets/images/new/icon.png new file mode 100644 index 00000000..e802ae3e Binary files /dev/null and b/assets/images/new/icon.png differ diff --git a/assets/images/new/instructions.jpg b/assets/images/new/instructions.jpg new file mode 100644 index 00000000..0b6025f5 Binary files /dev/null and b/assets/images/new/instructions.jpg differ diff --git a/assets/images/new/logo.png b/assets/images/new/logo.png new file mode 100644 index 00000000..29719b35 Binary files /dev/null and b/assets/images/new/logo.png differ diff --git a/assets/images/new/meal_plan.png b/assets/images/new/meal_plan.png new file mode 100644 index 00000000..4368a1df Binary files /dev/null and b/assets/images/new/meal_plan.png differ diff --git a/assets/images/new/medical_instructions.png b/assets/images/new/medical_instructions.png new file mode 100644 index 00000000..a6d0e0e2 Binary files /dev/null and b/assets/images/new/medical_instructions.png differ diff --git a/assets/images/new/payment/Apple_Pay.png b/assets/images/new/payment/Apple_Pay.png new file mode 100644 index 00000000..1dc75042 Binary files /dev/null and b/assets/images/new/payment/Apple_Pay.png differ diff --git a/assets/images/new/payment/Mada.png b/assets/images/new/payment/Mada.png new file mode 100644 index 00000000..905a5ba8 Binary files /dev/null and b/assets/images/new/payment/Mada.png differ diff --git a/assets/images/new/payment/Mastercard.png b/assets/images/new/payment/Mastercard.png new file mode 100644 index 00000000..5d8b1fa5 Binary files /dev/null and b/assets/images/new/payment/Mastercard.png differ diff --git a/assets/images/new/payment/installments.png b/assets/images/new/payment/installments.png new file mode 100644 index 00000000..b2b231bf Binary files /dev/null and b/assets/images/new/payment/installments.png differ diff --git a/assets/images/new/payment/tamara_ar.png b/assets/images/new/payment/tamara_ar.png new file mode 100644 index 00000000..f1587ad6 Binary files /dev/null and b/assets/images/new/payment/tamara_ar.png differ diff --git a/assets/images/new/payment/tamara_en.png b/assets/images/new/payment/tamara_en.png new file mode 100644 index 00000000..84d85b2c Binary files /dev/null and b/assets/images/new/payment/tamara_en.png differ diff --git a/assets/images/new/payment/visa.png b/assets/images/new/payment/visa.png new file mode 100644 index 00000000..3a6d90dd Binary files /dev/null and b/assets/images/new/payment/visa.png differ diff --git a/assets/images/new/paymentMethods.png b/assets/images/new/paymentMethods.png new file mode 100644 index 00000000..a2836f13 Binary files /dev/null and b/assets/images/new/paymentMethods.png differ diff --git a/assets/images/new/zoom/chat-send@2x.png b/assets/images/new/zoom/chat-send@2x.png new file mode 100644 index 00000000..73e7cd31 Binary files /dev/null and b/assets/images/new/zoom/chat-send@2x.png differ diff --git a/assets/images/new/zoom/chat-send@3x.png b/assets/images/new/zoom/chat-send@3x.png new file mode 100644 index 00000000..2c18a6b9 Binary files /dev/null and b/assets/images/new/zoom/chat-send@3x.png differ diff --git a/assets/images/new/zoom/default-avatar.png b/assets/images/new/zoom/default-avatar.png new file mode 100644 index 00000000..c5fd1e71 Binary files /dev/null and b/assets/images/new/zoom/default-avatar.png differ diff --git a/assets/images/new/zoom/hamburger@2x.png b/assets/images/new/zoom/hamburger@2x.png new file mode 100644 index 00000000..9b490c25 Binary files /dev/null and b/assets/images/new/zoom/hamburger@2x.png differ diff --git a/assets/images/new/zoom/hamburger@3x.png b/assets/images/new/zoom/hamburger@3x.png new file mode 100644 index 00000000..434601f9 Binary files /dev/null and b/assets/images/new/zoom/hamburger@3x.png differ diff --git a/assets/images/new/zoom/index.ts b/assets/images/new/zoom/index.ts new file mode 100644 index 00000000..fce1d508 --- /dev/null +++ b/assets/images/new/zoom/index.ts @@ -0,0 +1,22 @@ +export const icons = { + chatSend: require('./chat-send.png'), + defaultAvatar: require('./default-avatar.png'), + locked: require('./locked.png'), + more: require('./more.png'), + mute: require('./mute.png'), + muted: require('./muted.png'), + shareOn: require('./share-on.png'), + shareOff: require('./share-off.png'), + speakerOn: require('./speaker-on.png'), + speakerOff: require('./speaker-off.png'), + switchCamera: require('./switch-camera.png'), + hamburger: require('./hamburger.png'), + questionBalloon: require('./question-ballon.png'), + talking: require('./talking.png'), + unmute: require('./unmute.png'), + unlocked: require('./unlocked.png'), + videoOn: require('./video-on.png'), + videoOff: require('./video-off.png'), +}; + +export type IconTypes = keyof typeof icons; diff --git a/assets/images/new/zoom/locked@2x.png b/assets/images/new/zoom/locked@2x.png new file mode 100644 index 00000000..c6d98060 Binary files /dev/null and b/assets/images/new/zoom/locked@2x.png differ diff --git a/assets/images/new/zoom/locked@3x.png b/assets/images/new/zoom/locked@3x.png new file mode 100644 index 00000000..170f6e22 Binary files /dev/null and b/assets/images/new/zoom/locked@3x.png differ diff --git a/assets/images/new/zoom/more@2x.png b/assets/images/new/zoom/more@2x.png new file mode 100644 index 00000000..e98bc18e Binary files /dev/null and b/assets/images/new/zoom/more@2x.png differ diff --git a/assets/images/new/zoom/more@3x.png b/assets/images/new/zoom/more@3x.png new file mode 100644 index 00000000..e69710c6 Binary files /dev/null and b/assets/images/new/zoom/more@3x.png differ diff --git a/assets/images/new/zoom/mute@2x.png b/assets/images/new/zoom/mute@2x.png new file mode 100644 index 00000000..65b555a6 Binary files /dev/null and b/assets/images/new/zoom/mute@2x.png differ diff --git a/assets/images/new/zoom/mute@3x.png b/assets/images/new/zoom/mute@3x.png new file mode 100644 index 00000000..da7b29c3 Binary files /dev/null and b/assets/images/new/zoom/mute@3x.png differ diff --git a/assets/images/new/zoom/muted@2x.png b/assets/images/new/zoom/muted@2x.png new file mode 100644 index 00000000..35043632 Binary files /dev/null and b/assets/images/new/zoom/muted@2x.png differ diff --git a/assets/images/new/zoom/muted@3x.png b/assets/images/new/zoom/muted@3x.png new file mode 100644 index 00000000..808ef3e9 Binary files /dev/null and b/assets/images/new/zoom/muted@3x.png differ diff --git a/assets/images/new/zoom/question-ballon@2x.png b/assets/images/new/zoom/question-ballon@2x.png new file mode 100644 index 00000000..ba79fd3f Binary files /dev/null and b/assets/images/new/zoom/question-ballon@2x.png differ diff --git a/assets/images/new/zoom/question-ballon@3x.png b/assets/images/new/zoom/question-ballon@3x.png new file mode 100644 index 00000000..019c69de Binary files /dev/null and b/assets/images/new/zoom/question-ballon@3x.png differ diff --git a/assets/images/new/zoom/share-off@2x.png b/assets/images/new/zoom/share-off@2x.png new file mode 100644 index 00000000..1dba94cb Binary files /dev/null and b/assets/images/new/zoom/share-off@2x.png differ diff --git a/assets/images/new/zoom/share-off@3x.png b/assets/images/new/zoom/share-off@3x.png new file mode 100644 index 00000000..46989fea Binary files /dev/null and b/assets/images/new/zoom/share-off@3x.png differ diff --git a/assets/images/new/zoom/share-on@2x.png b/assets/images/new/zoom/share-on@2x.png new file mode 100644 index 00000000..285118e0 Binary files /dev/null and b/assets/images/new/zoom/share-on@2x.png differ diff --git a/assets/images/new/zoom/share-on@3x.png b/assets/images/new/zoom/share-on@3x.png new file mode 100644 index 00000000..9ed57131 Binary files /dev/null and b/assets/images/new/zoom/share-on@3x.png differ diff --git a/assets/images/new/zoom/speaker-off.png b/assets/images/new/zoom/speaker-off.png new file mode 100644 index 00000000..9763a5a7 Binary files /dev/null and b/assets/images/new/zoom/speaker-off.png differ diff --git a/assets/images/new/zoom/speaker-on.png b/assets/images/new/zoom/speaker-on.png new file mode 100644 index 00000000..f3355ba0 Binary files /dev/null and b/assets/images/new/zoom/speaker-on.png differ diff --git a/assets/images/new/zoom/switch-camera.png b/assets/images/new/zoom/switch-camera.png new file mode 100644 index 00000000..5927b7b7 Binary files /dev/null and b/assets/images/new/zoom/switch-camera.png differ diff --git a/assets/images/new/zoom/talking@2x.png b/assets/images/new/zoom/talking@2x.png new file mode 100644 index 00000000..676d61dd Binary files /dev/null and b/assets/images/new/zoom/talking@2x.png differ diff --git a/assets/images/new/zoom/talking@3x.png b/assets/images/new/zoom/talking@3x.png new file mode 100644 index 00000000..7028a357 Binary files /dev/null and b/assets/images/new/zoom/talking@3x.png differ diff --git a/assets/images/new/zoom/unlocked@2x.png b/assets/images/new/zoom/unlocked@2x.png new file mode 100644 index 00000000..aa5403e2 Binary files /dev/null and b/assets/images/new/zoom/unlocked@2x.png differ diff --git a/assets/images/new/zoom/unlocked@3x.png b/assets/images/new/zoom/unlocked@3x.png new file mode 100644 index 00000000..25f9390f Binary files /dev/null and b/assets/images/new/zoom/unlocked@3x.png differ diff --git a/assets/images/new/zoom/unmute@2x.png b/assets/images/new/zoom/unmute@2x.png new file mode 100644 index 00000000..4c6d2393 Binary files /dev/null and b/assets/images/new/zoom/unmute@2x.png differ diff --git a/assets/images/new/zoom/unmute@3x.png b/assets/images/new/zoom/unmute@3x.png new file mode 100644 index 00000000..dad68fac Binary files /dev/null and b/assets/images/new/zoom/unmute@3x.png differ diff --git a/assets/images/new/zoom/video-off@2x.png b/assets/images/new/zoom/video-off@2x.png new file mode 100644 index 00000000..3e209dd7 Binary files /dev/null and b/assets/images/new/zoom/video-off@2x.png differ diff --git a/assets/images/new/zoom/video-off@3x.png b/assets/images/new/zoom/video-off@3x.png new file mode 100644 index 00000000..06674059 Binary files /dev/null and b/assets/images/new/zoom/video-off@3x.png differ diff --git a/assets/images/new/zoom/video-on@2x.png b/assets/images/new/zoom/video-on@2x.png new file mode 100644 index 00000000..cdd85446 Binary files /dev/null and b/assets/images/new/zoom/video-on@2x.png differ diff --git a/assets/images/new/zoom/video-on@3x.png b/assets/images/new/zoom/video-on@3x.png new file mode 100644 index 00000000..03e69760 Binary files /dev/null and b/assets/images/new/zoom/video-on@3x.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/no-data-found.png b/assets/images/no-data-found.png new file mode 100644 index 00000000..a4ced5d3 Binary files /dev/null and b/assets/images/no-data-found.png differ diff --git a/assets/images/no_image.png b/assets/images/no_image.png new file mode 100644 index 00000000..ebe05472 Binary files /dev/null and b/assets/images/no_image.png differ diff --git a/assets/images/notf.png b/assets/images/notf.png new file mode 100644 index 00000000..39eb3fb3 Binary files /dev/null and b/assets/images/notf.png differ diff --git a/assets/images/offer.png b/assets/images/offer.png new file mode 100644 index 00000000..b9977670 Binary files /dev/null and b/assets/images/offer.png differ diff --git a/assets/images/offer_icon.png b/assets/images/offer_icon.png new file mode 100644 index 00000000..527fd5a2 Binary files /dev/null and b/assets/images/offer_icon.png differ diff --git a/assets/images/online_payment_icon.png b/assets/images/online_payment_icon.png new file mode 100644 index 00000000..6e167ace Binary files /dev/null and b/assets/images/online_payment_icon.png differ diff --git a/assets/images/pharmacy/arrow-left.png b/assets/images/pharmacy/arrow-left.png new file mode 100644 index 00000000..18d58c87 Binary files /dev/null and b/assets/images/pharmacy/arrow-left.png differ diff --git a/assets/images/pharmacy/compare.png b/assets/images/pharmacy/compare.png new file mode 100644 index 00000000..11a49dfb Binary files /dev/null and b/assets/images/pharmacy/compare.png differ diff --git a/assets/images/pharmacy/empty_box.png b/assets/images/pharmacy/empty_box.png new file mode 100644 index 00000000..af3551fd Binary files /dev/null and b/assets/images/pharmacy/empty_box.png differ diff --git a/assets/images/pharmacy/instagram.png b/assets/images/pharmacy/instagram.png new file mode 100644 index 00000000..a03f47bd Binary files /dev/null and b/assets/images/pharmacy/instagram.png differ diff --git a/assets/images/pharmacy/offers_banner.png b/assets/images/pharmacy/offers_banner.png new file mode 100644 index 00000000..6eab63fb Binary files /dev/null and b/assets/images/pharmacy/offers_banner.png differ diff --git a/assets/images/pharmacy/offers_banner_ar.png b/assets/images/pharmacy/offers_banner_ar.png new file mode 100644 index 00000000..d987d3c6 Binary files /dev/null and b/assets/images/pharmacy/offers_banner_ar.png differ diff --git a/assets/images/pharmacy/shipping_image.png b/assets/images/pharmacy/shipping_image.png new file mode 100644 index 00000000..ba16e92c Binary files /dev/null and b/assets/images/pharmacy/shipping_image.png differ diff --git a/assets/images/pharmacy/shipping_image_ar.png b/assets/images/pharmacy/shipping_image_ar.png new file mode 100644 index 00000000..cb623a62 Binary files /dev/null and b/assets/images/pharmacy/shipping_image_ar.png differ diff --git a/assets/images/pharmacy/sort.png b/assets/images/pharmacy/sort.png new file mode 100644 index 00000000..0143d915 Binary files /dev/null and b/assets/images/pharmacy/sort.png differ diff --git a/assets/images/pharmacy/terms.png b/assets/images/pharmacy/terms.png new file mode 100644 index 00000000..76cfacab Binary files /dev/null and b/assets/images/pharmacy/terms.png differ diff --git a/assets/images/pharmacy_logo.png b/assets/images/pharmacy_logo.png new file mode 100644 index 00000000..bf82ed5c Binary files /dev/null and b/assets/images/pharmacy_logo.png differ diff --git a/assets/images/pharmacy_module/bg_1.png b/assets/images/pharmacy_module/bg_1.png new file mode 100644 index 00000000..0155a7b3 Binary files /dev/null and b/assets/images/pharmacy_module/bg_1.png differ diff --git a/assets/images/pharmacy_module/bg_2.png b/assets/images/pharmacy_module/bg_2.png new file mode 100644 index 00000000..0a1bc5cb Binary files /dev/null and b/assets/images/pharmacy_module/bg_2.png differ diff --git a/assets/images/pharmacy_module/bg_3.png b/assets/images/pharmacy_module/bg_3.png new file mode 100644 index 00000000..3a28d5f9 Binary files /dev/null and b/assets/images/pharmacy_module/bg_3.png differ diff --git a/assets/images/pharmacy_module/bg_4.png b/assets/images/pharmacy_module/bg_4.png new file mode 100644 index 00000000..234ebe7b Binary files /dev/null and b/assets/images/pharmacy_module/bg_4.png differ diff --git a/assets/images/pharmacy_module/ic_payment_option.png b/assets/images/pharmacy_module/ic_payment_option.png new file mode 100644 index 00000000..5f3fca8f Binary files /dev/null and b/assets/images/pharmacy_module/ic_payment_option.png differ diff --git a/assets/images/pharmacy_module/ic_shipping_address.png b/assets/images/pharmacy_module/ic_shipping_address.png new file mode 100644 index 00000000..9566fb30 Binary files /dev/null and b/assets/images/pharmacy_module/ic_shipping_address.png differ diff --git a/assets/images/pharmacy_module/ic_shipping_mark.png b/assets/images/pharmacy_module/ic_shipping_mark.png new file mode 100644 index 00000000..cc4b272d Binary files /dev/null and b/assets/images/pharmacy_module/ic_shipping_mark.png differ diff --git a/assets/images/pharmacy_module/ic_shipping_truck.png b/assets/images/pharmacy_module/ic_shipping_truck.png new file mode 100644 index 00000000..274ae1da Binary files /dev/null and b/assets/images/pharmacy_module/ic_shipping_truck.png differ diff --git a/assets/images/pharmacy_module/lakum/Account_activation_icon.png b/assets/images/pharmacy_module/lakum/Account_activation_icon.png new file mode 100644 index 00000000..dc93366c Binary files /dev/null and b/assets/images/pharmacy_module/lakum/Account_activation_icon.png differ diff --git a/assets/images/pharmacy_module/lakum/Lakum_transfer_icon.png b/assets/images/pharmacy_module/lakum/Lakum_transfer_icon.png new file mode 100644 index 00000000..b7d33dd6 Binary files /dev/null and b/assets/images/pharmacy_module/lakum/Lakum_transfer_icon.png differ diff --git a/assets/images/pharmacy_module/lakum/akum_transfer.png b/assets/images/pharmacy_module/lakum/akum_transfer.png new file mode 100644 index 00000000..30785b08 Binary files /dev/null and b/assets/images/pharmacy_module/lakum/akum_transfer.png differ diff --git a/assets/images/pharmacy_module/lakum/expired_icon.png b/assets/images/pharmacy_module/lakum/expired_icon.png new file mode 100644 index 00000000..9a980984 Binary files /dev/null and b/assets/images/pharmacy_module/lakum/expired_icon.png differ diff --git a/assets/images/pharmacy_module/lakum/inactive_cross.png b/assets/images/pharmacy_module/lakum/inactive_cross.png new file mode 100644 index 00000000..5a592b7a Binary files /dev/null and b/assets/images/pharmacy_module/lakum/inactive_cross.png differ diff --git a/assets/images/pharmacy_module/lakum/lakum_card_front_bg.png b/assets/images/pharmacy_module/lakum/lakum_card_front_bg.png new file mode 100644 index 00000000..73323a0e Binary files /dev/null and b/assets/images/pharmacy_module/lakum/lakum_card_front_bg.png differ diff --git a/assets/images/pharmacy_module/lakum/lakum_checkout.png b/assets/images/pharmacy_module/lakum/lakum_checkout.png new file mode 100644 index 00000000..e0230a00 Binary files /dev/null and b/assets/images/pharmacy_module/lakum/lakum_checkout.png differ diff --git a/assets/images/pharmacy_module/lakum/waiting_gained_icon.png b/assets/images/pharmacy_module/lakum/waiting_gained_icon.png new file mode 100644 index 00000000..37ff1ac9 Binary files /dev/null and b/assets/images/pharmacy_module/lakum/waiting_gained_icon.png differ diff --git a/assets/images/pharmacy_module/lakum/will_be_expired_icon.png b/assets/images/pharmacy_module/lakum/will_be_expired_icon.png new file mode 100644 index 00000000..7f31f622 Binary files /dev/null and b/assets/images/pharmacy_module/lakum/will_be_expired_icon.png differ diff --git a/assets/images/pharmacy_module/medication_icon.png b/assets/images/pharmacy_module/medication_icon.png new file mode 100644 index 00000000..95851e4e Binary files /dev/null and b/assets/images/pharmacy_module/medication_icon.png differ diff --git a/assets/images/pharmacy_module/offer_icon.png b/assets/images/pharmacy_module/offer_icon.png new file mode 100644 index 00000000..64db2b76 Binary files /dev/null and b/assets/images/pharmacy_module/offer_icon.png differ diff --git a/assets/images/pharmacy_module/offers_banner.png b/assets/images/pharmacy_module/offers_banner.png new file mode 100644 index 00000000..6eab63fb Binary files /dev/null and b/assets/images/pharmacy_module/offers_banner.png differ diff --git a/assets/images/pharmacy_module/offers_banner_ar.png b/assets/images/pharmacy_module/offers_banner_ar.png new file mode 100644 index 00000000..d987d3c6 Binary files /dev/null and b/assets/images/pharmacy_module/offers_banner_ar.png differ diff --git a/assets/images/pharmacy_module/payment.png b/assets/images/pharmacy_module/payment.png new file mode 100644 index 00000000..275aa40a Binary files /dev/null and b/assets/images/pharmacy_module/payment.png differ diff --git a/assets/images/pharmacy_module/payment/LogoParmacyGreen.png b/assets/images/pharmacy_module/payment/LogoParmacyGreen.png new file mode 100644 index 00000000..72862b33 Binary files /dev/null and b/assets/images/pharmacy_module/payment/LogoParmacyGreen.png differ diff --git a/assets/images/pharmacy_module/payment/applePay.png b/assets/images/pharmacy_module/payment/applePay.png new file mode 100644 index 00000000..fd167e1c Binary files /dev/null and b/assets/images/pharmacy_module/payment/applePay.png differ diff --git a/assets/images/pharmacy_module/payment/aramex_shipping_logo.png b/assets/images/pharmacy_module/payment/aramex_shipping_logo.png new file mode 100644 index 00000000..e7b45d9c Binary files /dev/null and b/assets/images/pharmacy_module/payment/aramex_shipping_logo.png differ diff --git a/assets/images/pharmacy_module/payment/hmg_shipping_logo.png b/assets/images/pharmacy_module/payment/hmg_shipping_logo.png new file mode 100644 index 00000000..725b2e5e Binary files /dev/null and b/assets/images/pharmacy_module/payment/hmg_shipping_logo.png differ diff --git a/assets/images/pharmacy_module/payment/installment.png b/assets/images/pharmacy_module/payment/installment.png new file mode 100644 index 00000000..034497ef Binary files /dev/null and b/assets/images/pharmacy_module/payment/installment.png differ diff --git a/assets/images/pharmacy_module/payment/mada.png b/assets/images/pharmacy_module/payment/mada.png new file mode 100644 index 00000000..f65b970c Binary files /dev/null and b/assets/images/pharmacy_module/payment/mada.png differ diff --git a/assets/images/pharmacy_module/payment/mastercard.png b/assets/images/pharmacy_module/payment/mastercard.png new file mode 100644 index 00000000..1d48b854 Binary files /dev/null and b/assets/images/pharmacy_module/payment/mastercard.png differ diff --git a/assets/images/pharmacy_module/payment/sadad.png b/assets/images/pharmacy_module/payment/sadad.png new file mode 100644 index 00000000..35e0426c Binary files /dev/null and b/assets/images/pharmacy_module/payment/sadad.png differ diff --git a/assets/images/pharmacy_module/payment/visa.png b/assets/images/pharmacy_module/payment/visa.png new file mode 100644 index 00000000..8d29703c Binary files /dev/null and b/assets/images/pharmacy_module/payment/visa.png differ diff --git a/assets/images/pharmacy_module/payment_image.png b/assets/images/pharmacy_module/payment_image.png new file mode 100644 index 00000000..ebf7a929 Binary files /dev/null and b/assets/images/pharmacy_module/payment_image.png differ diff --git a/assets/images/pharmacy_module/pharmacy_logo_green.png b/assets/images/pharmacy_module/pharmacy_logo_green.png new file mode 100644 index 00000000..13c076b0 Binary files /dev/null and b/assets/images/pharmacy_module/pharmacy_logo_green.png differ diff --git a/assets/images/pharmacy_module/prescription_icon.png b/assets/images/pharmacy_module/prescription_icon.png new file mode 100644 index 00000000..740004c7 Binary files /dev/null and b/assets/images/pharmacy_module/prescription_icon.png differ diff --git a/assets/images/pharmacy_module/search_scan_icon.png b/assets/images/pharmacy_module/search_scan_icon.png new file mode 100644 index 00000000..d168b0e6 Binary files /dev/null and b/assets/images/pharmacy_module/search_scan_icon.png differ diff --git a/assets/images/powerd-by.jpg b/assets/images/powerd-by.jpg new file mode 100644 index 00000000..eda1688c Binary files /dev/null and b/assets/images/powerd-by.jpg differ diff --git a/assets/images/progress-loading-red-crop-1.gif b/assets/images/progress-loading-red-crop-1.gif new file mode 100644 index 00000000..6dba7901 Binary files /dev/null and b/assets/images/progress-loading-red-crop-1.gif differ diff --git a/assets/images/progress-loading-red.gif b/assets/images/progress-loading-red.gif new file mode 100644 index 00000000..517c3dab Binary files /dev/null and b/assets/images/progress-loading-red.gif differ diff --git a/assets/images/progress-loading.gif b/assets/images/progress-loading.gif new file mode 100644 index 00000000..0d7769b7 Binary files /dev/null and b/assets/images/progress-loading.gif differ diff --git a/assets/images/report.jpg b/assets/images/report.jpg new file mode 100644 index 00000000..5846cd53 Binary files /dev/null and b/assets/images/report.jpg differ diff --git a/assets/images/soundWaveAnimation.gif b/assets/images/soundWaveAnimation.gif new file mode 100644 index 00000000..730e27eb Binary files /dev/null and b/assets/images/soundWaveAnimation.gif differ diff --git a/assets/images/timeline_bg.png b/assets/images/timeline_bg.png new file mode 100644 index 00000000..d7afc4b1 Binary files /dev/null and b/assets/images/timeline_bg.png differ diff --git a/assets/images/wifi-EN.png b/assets/images/wifi-EN.png new file mode 100644 index 00000000..5711925c Binary files /dev/null and b/assets/images/wifi-EN.png differ diff --git a/assets/json/bookedAllowCheckInButtons.json b/assets/json/bookedAllowCheckInButtons.json new file mode 100644 index 00000000..5b5c4c5c --- /dev/null +++ b/assets/json/bookedAllowCheckInButtons.json @@ -0,0 +1,44 @@ +[ + { + "title": "confirm", + "subtitle": "appointment", + "icon": "assets/images/new-design/confirm_icon.png", + "caller": "confirmAppointment" + }, + { + "title": "reschedule", + "subtitle": "appointment", + "icon": "assets/images/new-design/reschedule_icon.png", + "caller": "openReschedule" + }, + { + "title": "cancel", + "subtitle": "appointment", + "icon": "assets/images/new-design/cancel_icon.png", + "caller": "onCancelAppointment" + }, + { + "title": "raise", + "subtitle": "complaint", + "icon": "assets/images/new-design/Complaint_icon.png", + "caller": "insertComplaint" + }, + { + "title": "add", + "subtitle": "reminder", + "icon": "assets/images/new-design/reminder_icon.png", + "caller": "addReminder" + }, + { + "title": "hospital", + "subtitle": "locations", + "icon": "assets/images/new-design/location_icon.png", + "caller": "navigateToProject" + }, + { + "title": "online", + "subtitle": "payment", + "icon": "assets/images/new-design/check-in.png", + "caller": "goToTodoList" + } +] \ No newline at end of file diff --git a/assets/json/bookedButtons.json b/assets/json/bookedButtons.json new file mode 100644 index 00000000..e34718e2 --- /dev/null +++ b/assets/json/bookedButtons.json @@ -0,0 +1,38 @@ +[ + { + "title": "confirm", + "subtitle": "appointment", + "icon": "assets/images/new-design/confirm_icon.png", + "caller": "confirmAppointment" + }, + { + "title": "reschedule", + "subtitle": "appointment", + "icon": "assets/images/new-design/reschedule_icon.png", + "caller": "openReschedule" + }, + { + "title": "cancel", + "subtitle": "appointment", + "icon": "assets/images/new-design/cancel_icon.png", + "caller": "onCancelAppointment" + }, + { + "title": "raise", + "subtitle": "complaint", + "icon": "assets/images/new-design/Complaint_icon.png", + "caller": "insertComplaint" + }, + { + "title": "add", + "subtitle": "reminder", + "icon": "assets/images/new-design/reminder_icon.png", + "caller": "addReminder" + }, + { + "title": "hospital", + "subtitle": "locations", + "icon": "assets/images/new-design/location_icon.png", + "caller": "navigateToProject" + } +] \ No newline at end of file diff --git a/assets/json/covid-drive-thru-question.json b/assets/json/covid-drive-thru-question.json new file mode 100644 index 00000000..626d702a --- /dev/null +++ b/assets/json/covid-drive-thru-question.json @@ -0,0 +1,85 @@ +[ + { + "id": 1, + "questionEN": "Is the test intended for travel?", + "questionAR": "هل تجري التحليل بغرض السفر؟", + "ans": 2 + }, + { + "id": 2, + "questionEN": "Coming from outside KSA within last 2 weeks?", + "questionAR": "هل قدمت من خارج المملكة خلال الأسبوعين الماضيين؟", + "ans": 2 + }, + { + "id": 3, + "questionEN": "Do you currently have fever?", + "questionAR": "هل تعاني حاليا من حرارة؟", + "ans": 2 + }, + { + "id": 4, + "questionEN": "Did you have fever in last 2 weeks?", + "questionAR": "هل عانيت من حرارة في الأسبوعين الماضيين؟", + "ans": 2 + }, + { + "id": 5, + "questionEN": "Do you have a sore throat?", + "questionAR": "هل لديك التهاب في الحلق؟", + "ans": 2 + }, + { + "id": 6, + "questionEN": "Do you have a runny nose?", + "questionAR": "هل لديك سيلان بالأنف؟" + }, + { + "id": 7, + "questionEN": "Do you have a cough?", + "questionAR": "هل لديك سعال؟", + "ans": 2 + }, + { + "id": 8, + "questionEN": "Do you have shortness of breath?", + "questionAR": "هل تعانين من ضيق في التنفس؟", + "ans": 2 + }, + { + "id": 9, + "questionEN": "Do you have nausea?", + "questionAR": "هل تعانين من غثيان؟", + "ans": 2 + }, + { + "id": 10, + "questionEN": "Do you have vomiting?", + "questionAR": "هل تعاني من القيء؟", + "ans": 2 + }, + { + "id": 11, + "questionEN": "Do you have a headache?", + "questionAR": "هل تعاني من صداع في الرأس؟", + "ans": 2 + }, + { + "id": 12, + "questionEN": "Do you have muscle pain?", + "questionAR": "هل تعانين من آلام عضلية؟", + "ans": 2 + }, + { + "id": 13, + "questionEN": "Do you have joint pain?", + "questionAR": "هل تعانين من آلام المفاصل؟", + "ans": 2 + }, + { + "id": 14, + "questionEN": "Do you have diarrhea?", + "questionAR": "هل لديك اسهال؟", + "ans": 2 + } +] \ No newline at end of file diff --git a/assets/json/freeSlots.json b/assets/json/freeSlots.json new file mode 100644 index 00000000..c8f2fee1 --- /dev/null +++ b/assets/json/freeSlots.json @@ -0,0 +1,2182 @@ +{ + "FreeTimeSlots": [ + "\/Date(1595257200000+0300)\/", + "\/Date(1595258100000+0300)\/", + "\/Date(1595259900000+0300)\/", + "\/Date(1595260800000+0300)\/", + "\/Date(1595261700000+0300)\/", + "\/Date(1595263500000+0300)\/", + "\/Date(1595265300000+0300)\/", + "\/Date(1595266200000+0300)\/", + "\/Date(1595341800000+0300)\/", + "\/Date(1595342700000+0300)\/", + "\/Date(1595343600000+0300)\/", + "\/Date(1595344500000+0300)\/", + "\/Date(1595346300000+0300)\/", + "\/Date(1595348100000+0300)\/", + "\/Date(1595349000000+0300)\/", + "\/Date(1595349900000+0300)\/", + "\/Date(1595350800000+0300)\/", + "\/Date(1595351700000+0300)\/", + "\/Date(1595352600000+0300)\/", + "\/Date(1595353500000+0300)\/", + "\/Date(1595426400000+0300)\/", + "\/Date(1595427300000+0300)\/", + "\/Date(1595429100000+0300)\/", + "\/Date(1595430000000+0300)\/", + "\/Date(1595430900000+0300)\/", + "\/Date(1595431800000+0300)\/", + "\/Date(1595432700000+0300)\/", + "\/Date(1595433600000+0300)\/", + "\/Date(1595434500000+0300)\/", + "\/Date(1595435400000+0300)\/", + "\/Date(1595436300000+0300)\/", + "\/Date(1595437200000+0300)\/", + "\/Date(1595438100000+0300)\/", + "\/Date(1595439000000+0300)\/", + "\/Date(1595439900000+0300)\/", + "\/Date(1595509200000+0300)\/", + "\/Date(1595510100000+0300)\/", + "\/Date(1595511000000+0300)\/", + "\/Date(1595511900000+0300)\/", + "\/Date(1595512800000+0300)\/", + "\/Date(1595513700000+0300)\/", + "\/Date(1595514600000+0300)\/", + "\/Date(1595515500000+0300)\/", + "\/Date(1595516400000+0300)\/", + "\/Date(1595517300000+0300)\/", + "\/Date(1595518200000+0300)\/", + "\/Date(1595519100000+0300)\/", + "\/Date(1595520000000+0300)\/", + "\/Date(1595520900000+0300)\/", + "\/Date(1595521800000+0300)\/", + "\/Date(1595522700000+0300)\/", + "\/Date(1595661300000+0300)\/", + "\/Date(1595662200000+0300)\/", + "\/Date(1595663100000+0300)\/", + "\/Date(1595664000000+0300)\/", + "\/Date(1595664900000+0300)\/", + "\/Date(1595665800000+0300)\/", + "\/Date(1595666700000+0300)\/", + "\/Date(1595667600000+0300)\/", + "\/Date(1595668500000+0300)\/", + "\/Date(1595669400000+0300)\/", + "\/Date(1595670300000+0300)\/", + "\/Date(1595671200000+0300)\/", + "\/Date(1595672100000+0300)\/", + "\/Date(1595673000000+0300)\/", + "\/Date(1595673900000+0300)\/", + "\/Date(1595772000000+0300)\/", + "\/Date(1595772900000+0300)\/", + "\/Date(1595773800000+0300)\/", + "\/Date(1595774700000+0300)\/", + "\/Date(1595775600000+0300)\/", + "\/Date(1595776500000+0300)\/", + "\/Date(1595777400000+0300)\/", + "\/Date(1595778300000+0300)\/", + "\/Date(1595779200000+0300)\/", + "\/Date(1595780100000+0300)\/", + "\/Date(1595781000000+0300)\/", + "\/Date(1595781900000+0300)\/", + "\/Date(1595782800000+0300)\/", + "\/Date(1595783700000+0300)\/", + "\/Date(1595784600000+0300)\/", + "\/Date(1595785500000+0300)\/", + "\/Date(1595858400000+0300)\/", + "\/Date(1595859300000+0300)\/", + "\/Date(1595860200000+0300)\/", + "\/Date(1595861100000+0300)\/", + "\/Date(1595862000000+0300)\/", + "\/Date(1595862900000+0300)\/", + "\/Date(1595863800000+0300)\/", + "\/Date(1595864700000+0300)\/", + "\/Date(1595865600000+0300)\/", + "\/Date(1595866500000+0300)\/", + "\/Date(1595867400000+0300)\/", + "\/Date(1595868300000+0300)\/", + "\/Date(1595869200000+0300)\/", + "\/Date(1595870100000+0300)\/", + "\/Date(1595871000000+0300)\/", + "\/Date(1595871900000+0300)\/", + "\/Date(1595944800000+0300)\/", + "\/Date(1595945700000+0300)\/", + "\/Date(1595946600000+0300)\/", + "\/Date(1595947500000+0300)\/", + "\/Date(1595948400000+0300)\/", + "\/Date(1595949300000+0300)\/", + "\/Date(1595950200000+0300)\/", + "\/Date(1595951100000+0300)\/", + "\/Date(1595952000000+0300)\/", + "\/Date(1595952900000+0300)\/", + "\/Date(1595953800000+0300)\/", + "\/Date(1595954700000+0300)\/", + "\/Date(1595955600000+0300)\/", + "\/Date(1595956500000+0300)\/", + "\/Date(1595957400000+0300)\/", + "\/Date(1595958300000+0300)\/", + "\/Date(1596549600000+0300)\/", + "\/Date(1596550500000+0300)\/", + "\/Date(1596551400000+0300)\/", + "\/Date(1596552300000+0300)\/", + "\/Date(1596553200000+0300)\/", + "\/Date(1596554100000+0300)\/", + "\/Date(1596555000000+0300)\/", + "\/Date(1596555900000+0300)\/", + "\/Date(1596556800000+0300)\/", + "\/Date(1596557700000+0300)\/", + "\/Date(1596558600000+0300)\/", + "\/Date(1596559500000+0300)\/", + "\/Date(1596560400000+0300)\/", + "\/Date(1596561300000+0300)\/", + "\/Date(1596562200000+0300)\/", + "\/Date(1596563100000+0300)\/", + "\/Date(1596636000000+0300)\/", + "\/Date(1596636900000+0300)\/", + "\/Date(1596637800000+0300)\/", + "\/Date(1596638700000+0300)\/", + "\/Date(1596639600000+0300)\/", + "\/Date(1596640500000+0300)\/", + "\/Date(1596641400000+0300)\/", + "\/Date(1596642300000+0300)\/", + "\/Date(1596643200000+0300)\/", + "\/Date(1596644100000+0300)\/", + "\/Date(1596645000000+0300)\/", + "\/Date(1596645900000+0300)\/", + "\/Date(1596646800000+0300)\/", + "\/Date(1596647700000+0300)\/", + "\/Date(1596648600000+0300)\/", + "\/Date(1596649500000+0300)\/", + "\/Date(1596718800000+0300)\/", + "\/Date(1596719700000+0300)\/", + "\/Date(1596720600000+0300)\/", + "\/Date(1596721500000+0300)\/", + "\/Date(1596722400000+0300)\/", + "\/Date(1596723300000+0300)\/", + "\/Date(1596724200000+0300)\/", + "\/Date(1596725100000+0300)\/", + "\/Date(1596726000000+0300)\/", + "\/Date(1596726900000+0300)\/", + "\/Date(1596727800000+0300)\/", + "\/Date(1596728700000+0300)\/", + "\/Date(1596729600000+0300)\/", + "\/Date(1596730500000+0300)\/", + "\/Date(1596731400000+0300)\/", + "\/Date(1596732300000+0300)\/", + "\/Date(1596870000000+0300)\/", + "\/Date(1596870900000+0300)\/", + "\/Date(1596871800000+0300)\/", + "\/Date(1596872700000+0300)\/", + "\/Date(1596873600000+0300)\/", + "\/Date(1596874500000+0300)\/", + "\/Date(1596875400000+0300)\/", + "\/Date(1596876300000+0300)\/", + "\/Date(1596877200000+0300)\/", + "\/Date(1596878100000+0300)\/", + "\/Date(1596879000000+0300)\/", + "\/Date(1596879900000+0300)\/", + "\/Date(1596880800000+0300)\/", + "\/Date(1596881700000+0300)\/", + "\/Date(1596882600000+0300)\/", + "\/Date(1596883500000+0300)\/", + "\/Date(1596981600000+0300)\/", + "\/Date(1596982500000+0300)\/", + "\/Date(1596983400000+0300)\/", + "\/Date(1596984300000+0300)\/", + "\/Date(1596985200000+0300)\/", + "\/Date(1596986100000+0300)\/", + "\/Date(1596987000000+0300)\/", + "\/Date(1596987900000+0300)\/", + "\/Date(1596988800000+0300)\/", + "\/Date(1596989700000+0300)\/", + "\/Date(1596990600000+0300)\/", + "\/Date(1596991500000+0300)\/", + "\/Date(1596992400000+0300)\/", + "\/Date(1596993300000+0300)\/", + "\/Date(1596994200000+0300)\/", + "\/Date(1596995100000+0300)\/", + "\/Date(1597068000000+0300)\/", + "\/Date(1597068900000+0300)\/", + "\/Date(1597069800000+0300)\/", + "\/Date(1597070700000+0300)\/", + "\/Date(1597071600000+0300)\/", + "\/Date(1597072500000+0300)\/", + "\/Date(1597073400000+0300)\/", + "\/Date(1597074300000+0300)\/", + "\/Date(1597075200000+0300)\/", + "\/Date(1597076100000+0300)\/", + "\/Date(1597077000000+0300)\/", + "\/Date(1597077900000+0300)\/", + "\/Date(1597078800000+0300)\/", + "\/Date(1597079700000+0300)\/", + "\/Date(1597080600000+0300)\/", + "\/Date(1597081500000+0300)\/", + "\/Date(1597154400000+0300)\/", + "\/Date(1597155300000+0300)\/", + "\/Date(1597156200000+0300)\/", + "\/Date(1597157100000+0300)\/", + "\/Date(1597158000000+0300)\/", + "\/Date(1597158900000+0300)\/", + "\/Date(1597159800000+0300)\/", + "\/Date(1597160700000+0300)\/", + "\/Date(1597161600000+0300)\/", + "\/Date(1597162500000+0300)\/", + "\/Date(1597163400000+0300)\/", + "\/Date(1597164300000+0300)\/", + "\/Date(1597165200000+0300)\/", + "\/Date(1597166100000+0300)\/", + "\/Date(1597167000000+0300)\/", + "\/Date(1597167900000+0300)\/", + "\/Date(1597240800000+0300)\/", + "\/Date(1597241700000+0300)\/", + "\/Date(1597242600000+0300)\/", + "\/Date(1597243500000+0300)\/", + "\/Date(1597244400000+0300)\/", + "\/Date(1597245300000+0300)\/", + "\/Date(1597246200000+0300)\/", + "\/Date(1597247100000+0300)\/", + "\/Date(1597248000000+0300)\/", + "\/Date(1597248900000+0300)\/", + "\/Date(1597249800000+0300)\/", + "\/Date(1597250700000+0300)\/", + "\/Date(1597251600000+0300)\/", + "\/Date(1597252500000+0300)\/", + "\/Date(1597253400000+0300)\/", + "\/Date(1597254300000+0300)\/", + "\/Date(1597323600000+0300)\/", + "\/Date(1597324500000+0300)\/", + "\/Date(1597325400000+0300)\/", + "\/Date(1597326300000+0300)\/", + "\/Date(1597327200000+0300)\/", + "\/Date(1597328100000+0300)\/", + "\/Date(1597329000000+0300)\/", + "\/Date(1597329900000+0300)\/", + "\/Date(1597330800000+0300)\/", + "\/Date(1597331700000+0300)\/", + "\/Date(1597332600000+0300)\/", + "\/Date(1597333500000+0300)\/", + "\/Date(1597334400000+0300)\/", + "\/Date(1597335300000+0300)\/", + "\/Date(1597336200000+0300)\/", + "\/Date(1597337100000+0300)\/", + "\/Date(1597474800000+0300)\/", + "\/Date(1597475700000+0300)\/", + "\/Date(1597476600000+0300)\/", + "\/Date(1597477500000+0300)\/", + "\/Date(1597478400000+0300)\/", + "\/Date(1597479300000+0300)\/", + "\/Date(1597480200000+0300)\/", + "\/Date(1597481100000+0300)\/", + "\/Date(1597482000000+0300)\/", + "\/Date(1597482900000+0300)\/", + "\/Date(1597483800000+0300)\/", + "\/Date(1597484700000+0300)\/", + "\/Date(1597485600000+0300)\/", + "\/Date(1597486500000+0300)\/", + "\/Date(1597487400000+0300)\/", + "\/Date(1597488300000+0300)\/", + "\/Date(1597586400000+0300)\/", + "\/Date(1597587300000+0300)\/", + "\/Date(1597588200000+0300)\/", + "\/Date(1597589100000+0300)\/", + "\/Date(1597590000000+0300)\/", + "\/Date(1597590900000+0300)\/", + "\/Date(1597591800000+0300)\/", + "\/Date(1597592700000+0300)\/", + "\/Date(1597593600000+0300)\/", + "\/Date(1597594500000+0300)\/", + "\/Date(1597595400000+0300)\/", + "\/Date(1597596300000+0300)\/", + "\/Date(1597597200000+0300)\/", + "\/Date(1597598100000+0300)\/", + "\/Date(1597599000000+0300)\/", + "\/Date(1597599900000+0300)\/", + "\/Date(1597672800000+0300)\/", + "\/Date(1597673700000+0300)\/", + "\/Date(1597674600000+0300)\/", + "\/Date(1597675500000+0300)\/", + "\/Date(1597676400000+0300)\/", + "\/Date(1597677300000+0300)\/", + "\/Date(1597678200000+0300)\/", + "\/Date(1597679100000+0300)\/", + "\/Date(1597680000000+0300)\/", + "\/Date(1597680900000+0300)\/", + "\/Date(1597681800000+0300)\/", + "\/Date(1597682700000+0300)\/", + "\/Date(1597683600000+0300)\/", + "\/Date(1597684500000+0300)\/", + "\/Date(1597685400000+0300)\/", + "\/Date(1597686300000+0300)\/", + "\/Date(1597759200000+0300)\/", + "\/Date(1597760100000+0300)\/", + "\/Date(1597761000000+0300)\/", + "\/Date(1597761900000+0300)\/", + "\/Date(1597762800000+0300)\/", + "\/Date(1597763700000+0300)\/", + "\/Date(1597764600000+0300)\/", + "\/Date(1597765500000+0300)\/", + "\/Date(1597766400000+0300)\/", + "\/Date(1597767300000+0300)\/", + "\/Date(1597768200000+0300)\/", + "\/Date(1597769100000+0300)\/", + "\/Date(1597770000000+0300)\/", + "\/Date(1597770900000+0300)\/", + "\/Date(1597771800000+0300)\/", + "\/Date(1597772700000+0300)\/", + "\/Date(1597845600000+0300)\/", + "\/Date(1597846500000+0300)\/", + "\/Date(1597847400000+0300)\/", + "\/Date(1597848300000+0300)\/", + "\/Date(1597849200000+0300)\/", + "\/Date(1597850100000+0300)\/", + "\/Date(1597851000000+0300)\/", + "\/Date(1597851900000+0300)\/", + "\/Date(1597852800000+0300)\/", + "\/Date(1597853700000+0300)\/", + "\/Date(1597854600000+0300)\/", + "\/Date(1597855500000+0300)\/", + "\/Date(1597856400000+0300)\/", + "\/Date(1597857300000+0300)\/", + "\/Date(1597858200000+0300)\/", + "\/Date(1597859100000+0300)\/", + "\/Date(1597928400000+0300)\/", + "\/Date(1597929300000+0300)\/", + "\/Date(1597930200000+0300)\/", + "\/Date(1597931100000+0300)\/", + "\/Date(1597932000000+0300)\/", + "\/Date(1597932900000+0300)\/", + "\/Date(1597933800000+0300)\/", + "\/Date(1597934700000+0300)\/", + "\/Date(1597935600000+0300)\/", + "\/Date(1597936500000+0300)\/", + "\/Date(1597937400000+0300)\/", + "\/Date(1597938300000+0300)\/", + "\/Date(1597939200000+0300)\/", + "\/Date(1597940100000+0300)\/", + "\/Date(1597941000000+0300)\/", + "\/Date(1597941900000+0300)\/", + "\/Date(1598079600000+0300)\/", + "\/Date(1598080500000+0300)\/", + "\/Date(1598081400000+0300)\/", + "\/Date(1598082300000+0300)\/", + "\/Date(1598083200000+0300)\/", + "\/Date(1598084100000+0300)\/", + "\/Date(1598085000000+0300)\/", + "\/Date(1598085900000+0300)\/", + "\/Date(1598086800000+0300)\/", + "\/Date(1598087700000+0300)\/", + "\/Date(1598088600000+0300)\/", + "\/Date(1598089500000+0300)\/", + "\/Date(1598090400000+0300)\/", + "\/Date(1598091300000+0300)\/", + "\/Date(1598092200000+0300)\/", + "\/Date(1598093100000+0300)\/", + "\/Date(1598191200000+0300)\/", + "\/Date(1598192100000+0300)\/", + "\/Date(1598193000000+0300)\/", + "\/Date(1598193900000+0300)\/", + "\/Date(1598194800000+0300)\/", + "\/Date(1598195700000+0300)\/", + "\/Date(1598196600000+0300)\/", + "\/Date(1598197500000+0300)\/", + "\/Date(1598198400000+0300)\/", + "\/Date(1598199300000+0300)\/", + "\/Date(1598200200000+0300)\/", + "\/Date(1598201100000+0300)\/", + "\/Date(1598202000000+0300)\/", + "\/Date(1598202900000+0300)\/", + "\/Date(1598203800000+0300)\/", + "\/Date(1598204700000+0300)\/", + "\/Date(1598277600000+0300)\/", + "\/Date(1598278500000+0300)\/", + "\/Date(1598279400000+0300)\/", + "\/Date(1598280300000+0300)\/", + "\/Date(1598281200000+0300)\/", + "\/Date(1598282100000+0300)\/", + "\/Date(1598283000000+0300)\/", + "\/Date(1598283900000+0300)\/", + "\/Date(1598284800000+0300)\/", + "\/Date(1598285700000+0300)\/", + "\/Date(1598286600000+0300)\/", + "\/Date(1598287500000+0300)\/", + "\/Date(1598288400000+0300)\/", + "\/Date(1598289300000+0300)\/", + "\/Date(1598290200000+0300)\/", + "\/Date(1598291100000+0300)\/", + "\/Date(1598364000000+0300)\/", + "\/Date(1598364900000+0300)\/", + "\/Date(1598365800000+0300)\/", + "\/Date(1598366700000+0300)\/", + "\/Date(1598367600000+0300)\/", + "\/Date(1598368500000+0300)\/", + "\/Date(1598369400000+0300)\/", + "\/Date(1598370300000+0300)\/", + "\/Date(1598371200000+0300)\/", + "\/Date(1598372100000+0300)\/", + "\/Date(1598373000000+0300)\/", + "\/Date(1598373900000+0300)\/", + "\/Date(1598374800000+0300)\/", + "\/Date(1598375700000+0300)\/", + "\/Date(1598376600000+0300)\/", + "\/Date(1598377500000+0300)\/", + "\/Date(1598450400000+0300)\/", + "\/Date(1598451300000+0300)\/", + "\/Date(1598452200000+0300)\/", + "\/Date(1598453100000+0300)\/", + "\/Date(1598454000000+0300)\/", + "\/Date(1598454900000+0300)\/", + "\/Date(1598455800000+0300)\/", + "\/Date(1598456700000+0300)\/", + "\/Date(1598457600000+0300)\/", + "\/Date(1598458500000+0300)\/", + "\/Date(1598459400000+0300)\/", + "\/Date(1598460300000+0300)\/", + "\/Date(1598461200000+0300)\/", + "\/Date(1598462100000+0300)\/", + "\/Date(1598463000000+0300)\/", + "\/Date(1598463900000+0300)\/", + "\/Date(1598533200000+0300)\/", + "\/Date(1598534100000+0300)\/", + "\/Date(1598535000000+0300)\/", + "\/Date(1598535900000+0300)\/", + "\/Date(1598536800000+0300)\/", + "\/Date(1598537700000+0300)\/", + "\/Date(1598538600000+0300)\/", + "\/Date(1598539500000+0300)\/", + "\/Date(1598540400000+0300)\/", + "\/Date(1598541300000+0300)\/", + "\/Date(1598542200000+0300)\/", + "\/Date(1598543100000+0300)\/", + "\/Date(1598544000000+0300)\/", + "\/Date(1598544900000+0300)\/", + "\/Date(1598545800000+0300)\/", + "\/Date(1598546700000+0300)\/", + "\/Date(1598684400000+0300)\/", + "\/Date(1598685300000+0300)\/", + "\/Date(1598686200000+0300)\/", + "\/Date(1598687100000+0300)\/", + "\/Date(1598688000000+0300)\/", + "\/Date(1598688900000+0300)\/", + "\/Date(1598689800000+0300)\/", + "\/Date(1598690700000+0300)\/", + "\/Date(1598691600000+0300)\/", + "\/Date(1598692500000+0300)\/", + "\/Date(1598693400000+0300)\/", + "\/Date(1598694300000+0300)\/", + "\/Date(1598695200000+0300)\/", + "\/Date(1598696100000+0300)\/", + "\/Date(1598697000000+0300)\/", + "\/Date(1598697900000+0300)\/", + "\/Date(1598796000000+0300)\/", + "\/Date(1598796900000+0300)\/", + "\/Date(1598797800000+0300)\/", + "\/Date(1598798700000+0300)\/", + "\/Date(1598799600000+0300)\/", + "\/Date(1598800500000+0300)\/", + "\/Date(1598801400000+0300)\/", + "\/Date(1598802300000+0300)\/", + "\/Date(1598803200000+0300)\/", + "\/Date(1598804100000+0300)\/", + "\/Date(1598805000000+0300)\/", + "\/Date(1598805900000+0300)\/", + "\/Date(1598806800000+0300)\/", + "\/Date(1598807700000+0300)\/", + "\/Date(1598808600000+0300)\/", + "\/Date(1598809500000+0300)\/", + "\/Date(1598882400000+0300)\/", + "\/Date(1598883300000+0300)\/", + "\/Date(1598884200000+0300)\/", + "\/Date(1598885100000+0300)\/", + "\/Date(1598886000000+0300)\/", + "\/Date(1598886900000+0300)\/", + "\/Date(1598887800000+0300)\/", + "\/Date(1598888700000+0300)\/", + "\/Date(1598889600000+0300)\/", + "\/Date(1598890500000+0300)\/", + "\/Date(1598891400000+0300)\/", + "\/Date(1598892300000+0300)\/", + "\/Date(1598893200000+0300)\/", + "\/Date(1598894100000+0300)\/", + "\/Date(1598895000000+0300)\/", + "\/Date(1598895900000+0300)\/", + "\/Date(1598968800000+0300)\/", + "\/Date(1598969700000+0300)\/", + "\/Date(1598970600000+0300)\/", + "\/Date(1598971500000+0300)\/", + "\/Date(1598972400000+0300)\/", + "\/Date(1598973300000+0300)\/", + "\/Date(1598974200000+0300)\/", + "\/Date(1598975100000+0300)\/", + "\/Date(1598976000000+0300)\/", + "\/Date(1598976900000+0300)\/", + "\/Date(1598977800000+0300)\/", + "\/Date(1598978700000+0300)\/", + "\/Date(1598979600000+0300)\/", + "\/Date(1598980500000+0300)\/", + "\/Date(1598981400000+0300)\/", + "\/Date(1598982300000+0300)\/", + "\/Date(1599055200000+0300)\/", + "\/Date(1599056100000+0300)\/", + "\/Date(1599057000000+0300)\/", + "\/Date(1599057900000+0300)\/", + "\/Date(1599058800000+0300)\/", + "\/Date(1599059700000+0300)\/", + "\/Date(1599060600000+0300)\/", + "\/Date(1599061500000+0300)\/", + "\/Date(1599062400000+0300)\/", + "\/Date(1599063300000+0300)\/", + "\/Date(1599064200000+0300)\/", + "\/Date(1599065100000+0300)\/", + "\/Date(1599066000000+0300)\/", + "\/Date(1599066900000+0300)\/", + "\/Date(1599067800000+0300)\/", + "\/Date(1599068700000+0300)\/", + "\/Date(1599138000000+0300)\/", + "\/Date(1599138900000+0300)\/", + "\/Date(1599139800000+0300)\/", + "\/Date(1599140700000+0300)\/", + "\/Date(1599141600000+0300)\/", + "\/Date(1599142500000+0300)\/", + "\/Date(1599143400000+0300)\/", + "\/Date(1599144300000+0300)\/", + "\/Date(1599145200000+0300)\/", + "\/Date(1599146100000+0300)\/", + "\/Date(1599147000000+0300)\/", + "\/Date(1599147900000+0300)\/", + "\/Date(1599148800000+0300)\/", + "\/Date(1599149700000+0300)\/", + "\/Date(1599150600000+0300)\/", + "\/Date(1599151500000+0300)\/", + "\/Date(1599289200000+0300)\/", + "\/Date(1599290100000+0300)\/", + "\/Date(1599291000000+0300)\/", + "\/Date(1599291900000+0300)\/", + "\/Date(1599292800000+0300)\/", + "\/Date(1599293700000+0300)\/", + "\/Date(1599294600000+0300)\/", + "\/Date(1599295500000+0300)\/", + "\/Date(1599296400000+0300)\/", + "\/Date(1599297300000+0300)\/", + "\/Date(1599298200000+0300)\/", + "\/Date(1599299100000+0300)\/", + "\/Date(1599300000000+0300)\/", + "\/Date(1599300900000+0300)\/", + "\/Date(1599301800000+0300)\/", + "\/Date(1599302700000+0300)\/", + "\/Date(1599400800000+0300)\/", + "\/Date(1599401700000+0300)\/", + "\/Date(1599402600000+0300)\/", + "\/Date(1599403500000+0300)\/", + "\/Date(1599404400000+0300)\/", + "\/Date(1599405300000+0300)\/", + "\/Date(1599406200000+0300)\/", + "\/Date(1599407100000+0300)\/", + "\/Date(1599408000000+0300)\/", + "\/Date(1599408900000+0300)\/", + "\/Date(1599409800000+0300)\/", + "\/Date(1599410700000+0300)\/", + "\/Date(1599411600000+0300)\/", + "\/Date(1599412500000+0300)\/", + "\/Date(1599413400000+0300)\/", + "\/Date(1599414300000+0300)\/", + "\/Date(1599487200000+0300)\/", + "\/Date(1599488100000+0300)\/", + "\/Date(1599489000000+0300)\/", + "\/Date(1599489900000+0300)\/", + "\/Date(1599490800000+0300)\/", + "\/Date(1599491700000+0300)\/", + "\/Date(1599492600000+0300)\/", + "\/Date(1599493500000+0300)\/", + "\/Date(1599494400000+0300)\/", + "\/Date(1599495300000+0300)\/", + "\/Date(1599496200000+0300)\/", + "\/Date(1599497100000+0300)\/", + "\/Date(1599498000000+0300)\/", + "\/Date(1599498900000+0300)\/", + "\/Date(1599499800000+0300)\/", + "\/Date(1599500700000+0300)\/", + "\/Date(1599573600000+0300)\/", + "\/Date(1599574500000+0300)\/", + "\/Date(1599575400000+0300)\/", + "\/Date(1599576300000+0300)\/", + "\/Date(1599577200000+0300)\/", + "\/Date(1599578100000+0300)\/", + "\/Date(1599579000000+0300)\/", + "\/Date(1599579900000+0300)\/", + "\/Date(1599580800000+0300)\/", + "\/Date(1599581700000+0300)\/", + "\/Date(1599582600000+0300)\/", + "\/Date(1599583500000+0300)\/", + "\/Date(1599584400000+0300)\/", + "\/Date(1599585300000+0300)\/", + "\/Date(1599586200000+0300)\/", + "\/Date(1599587100000+0300)\/", + "\/Date(1599660000000+0300)\/", + "\/Date(1599660900000+0300)\/", + "\/Date(1599661800000+0300)\/", + "\/Date(1599662700000+0300)\/", + "\/Date(1599663600000+0300)\/", + "\/Date(1599664500000+0300)\/", + "\/Date(1599665400000+0300)\/", + "\/Date(1599666300000+0300)\/", + "\/Date(1599667200000+0300)\/", + "\/Date(1599668100000+0300)\/", + "\/Date(1599669000000+0300)\/", + "\/Date(1599669900000+0300)\/", + "\/Date(1599670800000+0300)\/", + "\/Date(1599671700000+0300)\/", + "\/Date(1599672600000+0300)\/", + "\/Date(1599673500000+0300)\/", + "\/Date(1599742800000+0300)\/", + "\/Date(1599743700000+0300)\/", + "\/Date(1599744600000+0300)\/", + "\/Date(1599745500000+0300)\/", + "\/Date(1599746400000+0300)\/", + "\/Date(1599747300000+0300)\/", + "\/Date(1599748200000+0300)\/", + "\/Date(1599749100000+0300)\/", + "\/Date(1599750000000+0300)\/", + "\/Date(1599750900000+0300)\/", + "\/Date(1599751800000+0300)\/", + "\/Date(1599752700000+0300)\/", + "\/Date(1599753600000+0300)\/", + "\/Date(1599754500000+0300)\/", + "\/Date(1599755400000+0300)\/", + "\/Date(1599756300000+0300)\/", + "\/Date(1599894000000+0300)\/", + "\/Date(1599894900000+0300)\/", + "\/Date(1599895800000+0300)\/", + "\/Date(1599896700000+0300)\/", + "\/Date(1599897600000+0300)\/", + "\/Date(1599898500000+0300)\/", + "\/Date(1599899400000+0300)\/", + "\/Date(1599900300000+0300)\/", + "\/Date(1599901200000+0300)\/", + "\/Date(1599902100000+0300)\/", + "\/Date(1599903000000+0300)\/", + "\/Date(1599903900000+0300)\/", + "\/Date(1599904800000+0300)\/", + "\/Date(1599905700000+0300)\/", + "\/Date(1599906600000+0300)\/", + "\/Date(1599907500000+0300)\/", + "\/Date(1600005600000+0300)\/", + "\/Date(1600006500000+0300)\/", + "\/Date(1600007400000+0300)\/", + "\/Date(1600008300000+0300)\/", + "\/Date(1600009200000+0300)\/", + "\/Date(1600010100000+0300)\/", + "\/Date(1600011000000+0300)\/", + "\/Date(1600011900000+0300)\/", + "\/Date(1600012800000+0300)\/", + "\/Date(1600013700000+0300)\/", + "\/Date(1600014600000+0300)\/", + "\/Date(1600015500000+0300)\/", + "\/Date(1600016400000+0300)\/", + "\/Date(1600017300000+0300)\/", + "\/Date(1600018200000+0300)\/", + "\/Date(1600019100000+0300)\/", + "\/Date(1600092000000+0300)\/", + "\/Date(1600092900000+0300)\/", + "\/Date(1600093800000+0300)\/", + "\/Date(1600094700000+0300)\/", + "\/Date(1600095600000+0300)\/", + "\/Date(1600096500000+0300)\/", + "\/Date(1600097400000+0300)\/", + "\/Date(1600098300000+0300)\/", + "\/Date(1600099200000+0300)\/", + "\/Date(1600100100000+0300)\/", + "\/Date(1600101000000+0300)\/", + "\/Date(1600101900000+0300)\/", + "\/Date(1600102800000+0300)\/", + "\/Date(1600103700000+0300)\/", + "\/Date(1600104600000+0300)\/", + "\/Date(1600105500000+0300)\/", + "\/Date(1600178400000+0300)\/", + "\/Date(1600179300000+0300)\/", + "\/Date(1600180200000+0300)\/", + "\/Date(1600181100000+0300)\/", + "\/Date(1600182000000+0300)\/", + "\/Date(1600182900000+0300)\/", + "\/Date(1600183800000+0300)\/", + "\/Date(1600184700000+0300)\/", + "\/Date(1600185600000+0300)\/", + "\/Date(1600186500000+0300)\/", + "\/Date(1600187400000+0300)\/", + "\/Date(1600188300000+0300)\/", + "\/Date(1600189200000+0300)\/", + "\/Date(1600190100000+0300)\/", + "\/Date(1600191000000+0300)\/", + "\/Date(1600191900000+0300)\/", + "\/Date(1600264800000+0300)\/", + "\/Date(1600265700000+0300)\/", + "\/Date(1600266600000+0300)\/", + "\/Date(1600267500000+0300)\/", + "\/Date(1600268400000+0300)\/", + "\/Date(1600269300000+0300)\/", + "\/Date(1600270200000+0300)\/", + "\/Date(1600271100000+0300)\/", + "\/Date(1600272000000+0300)\/", + "\/Date(1600272900000+0300)\/", + "\/Date(1600273800000+0300)\/", + "\/Date(1600274700000+0300)\/", + "\/Date(1600275600000+0300)\/", + "\/Date(1600276500000+0300)\/", + "\/Date(1600277400000+0300)\/", + "\/Date(1600278300000+0300)\/", + "\/Date(1600347600000+0300)\/", + "\/Date(1600348500000+0300)\/", + "\/Date(1600349400000+0300)\/", + "\/Date(1600350300000+0300)\/", + "\/Date(1600351200000+0300)\/", + "\/Date(1600352100000+0300)\/", + "\/Date(1600353000000+0300)\/", + "\/Date(1600353900000+0300)\/", + "\/Date(1600354800000+0300)\/", + "\/Date(1600355700000+0300)\/", + "\/Date(1600356600000+0300)\/", + "\/Date(1600357500000+0300)\/", + "\/Date(1600358400000+0300)\/", + "\/Date(1600359300000+0300)\/", + "\/Date(1600360200000+0300)\/", + "\/Date(1600361100000+0300)\/", + "\/Date(1600498800000+0300)\/", + "\/Date(1600499700000+0300)\/", + "\/Date(1600500600000+0300)\/", + "\/Date(1600501500000+0300)\/", + "\/Date(1600502400000+0300)\/", + "\/Date(1600503300000+0300)\/", + "\/Date(1600504200000+0300)\/", + "\/Date(1600505100000+0300)\/", + "\/Date(1600506000000+0300)\/", + "\/Date(1600506900000+0300)\/", + "\/Date(1600507800000+0300)\/", + "\/Date(1600508700000+0300)\/", + "\/Date(1600509600000+0300)\/", + "\/Date(1600510500000+0300)\/", + "\/Date(1600511400000+0300)\/", + "\/Date(1600512300000+0300)\/", + "\/Date(1600610400000+0300)\/", + "\/Date(1600611300000+0300)\/", + "\/Date(1600612200000+0300)\/", + "\/Date(1600613100000+0300)\/", + "\/Date(1600614000000+0300)\/", + "\/Date(1600614900000+0300)\/", + "\/Date(1600615800000+0300)\/", + "\/Date(1600616700000+0300)\/", + "\/Date(1600617600000+0300)\/", + "\/Date(1600618500000+0300)\/", + "\/Date(1600619400000+0300)\/", + "\/Date(1600620300000+0300)\/", + "\/Date(1600621200000+0300)\/", + "\/Date(1600622100000+0300)\/", + "\/Date(1600623000000+0300)\/", + "\/Date(1600623900000+0300)\/", + "\/Date(1600696800000+0300)\/", + "\/Date(1600697700000+0300)\/", + "\/Date(1600698600000+0300)\/", + "\/Date(1600699500000+0300)\/", + "\/Date(1600700400000+0300)\/", + "\/Date(1600701300000+0300)\/", + "\/Date(1600702200000+0300)\/", + "\/Date(1600703100000+0300)\/", + "\/Date(1600704000000+0300)\/", + "\/Date(1600704900000+0300)\/", + "\/Date(1600705800000+0300)\/", + "\/Date(1600706700000+0300)\/", + "\/Date(1600707600000+0300)\/", + "\/Date(1600708500000+0300)\/", + "\/Date(1600709400000+0300)\/", + "\/Date(1600710300000+0300)\/", + "\/Date(1600783200000+0300)\/", + "\/Date(1600784100000+0300)\/", + "\/Date(1600785000000+0300)\/", + "\/Date(1600785900000+0300)\/", + "\/Date(1600786800000+0300)\/", + "\/Date(1600787700000+0300)\/", + "\/Date(1600788600000+0300)\/", + "\/Date(1600789500000+0300)\/", + "\/Date(1600790400000+0300)\/", + "\/Date(1600791300000+0300)\/", + "\/Date(1600792200000+0300)\/", + "\/Date(1600793100000+0300)\/", + "\/Date(1600794000000+0300)\/", + "\/Date(1600794900000+0300)\/", + "\/Date(1600795800000+0300)\/", + "\/Date(1600796700000+0300)\/", + "\/Date(1600869600000+0300)\/", + "\/Date(1600870500000+0300)\/", + "\/Date(1600871400000+0300)\/", + "\/Date(1600872300000+0300)\/", + "\/Date(1600873200000+0300)\/", + "\/Date(1600874100000+0300)\/", + "\/Date(1600875000000+0300)\/", + "\/Date(1600875900000+0300)\/", + "\/Date(1600876800000+0300)\/", + "\/Date(1600877700000+0300)\/", + "\/Date(1600878600000+0300)\/", + "\/Date(1600879500000+0300)\/", + "\/Date(1600880400000+0300)\/", + "\/Date(1600881300000+0300)\/", + "\/Date(1600882200000+0300)\/", + "\/Date(1600883100000+0300)\/", + "\/Date(1600952400000+0300)\/", + "\/Date(1600953300000+0300)\/", + "\/Date(1600954200000+0300)\/", + "\/Date(1600955100000+0300)\/", + "\/Date(1600956000000+0300)\/", + "\/Date(1600956900000+0300)\/", + "\/Date(1600957800000+0300)\/", + "\/Date(1600958700000+0300)\/", + "\/Date(1600959600000+0300)\/", + "\/Date(1600960500000+0300)\/", + "\/Date(1600961400000+0300)\/", + "\/Date(1600962300000+0300)\/", + "\/Date(1600963200000+0300)\/", + "\/Date(1600964100000+0300)\/", + "\/Date(1600965000000+0300)\/", + "\/Date(1600965900000+0300)\/", + "\/Date(1601103600000+0300)\/", + "\/Date(1601104500000+0300)\/", + "\/Date(1601105400000+0300)\/", + "\/Date(1601106300000+0300)\/", + "\/Date(1601107200000+0300)\/", + "\/Date(1601108100000+0300)\/", + "\/Date(1601109000000+0300)\/", + "\/Date(1601109900000+0300)\/", + "\/Date(1601110800000+0300)\/", + "\/Date(1601111700000+0300)\/", + "\/Date(1601112600000+0300)\/", + "\/Date(1601113500000+0300)\/", + "\/Date(1601114400000+0300)\/", + "\/Date(1601115300000+0300)\/", + "\/Date(1601116200000+0300)\/", + "\/Date(1601117100000+0300)\/", + "\/Date(1601215200000+0300)\/", + "\/Date(1601216100000+0300)\/", + "\/Date(1601217000000+0300)\/", + "\/Date(1601217900000+0300)\/", + "\/Date(1601218800000+0300)\/", + "\/Date(1601219700000+0300)\/", + "\/Date(1601220600000+0300)\/", + "\/Date(1601221500000+0300)\/", + "\/Date(1601222400000+0300)\/", + "\/Date(1601223300000+0300)\/", + "\/Date(1601224200000+0300)\/", + "\/Date(1601225100000+0300)\/", + "\/Date(1601226000000+0300)\/", + "\/Date(1601226900000+0300)\/", + "\/Date(1601227800000+0300)\/", + "\/Date(1601228700000+0300)\/", + "\/Date(1601301600000+0300)\/", + "\/Date(1601302500000+0300)\/", + "\/Date(1601303400000+0300)\/", + "\/Date(1601304300000+0300)\/", + "\/Date(1601305200000+0300)\/", + "\/Date(1601306100000+0300)\/", + "\/Date(1601307000000+0300)\/", + "\/Date(1601307900000+0300)\/", + "\/Date(1601308800000+0300)\/", + "\/Date(1601309700000+0300)\/", + "\/Date(1601310600000+0300)\/", + "\/Date(1601311500000+0300)\/", + "\/Date(1601312400000+0300)\/", + "\/Date(1601313300000+0300)\/", + "\/Date(1601314200000+0300)\/", + "\/Date(1601315100000+0300)\/", + "\/Date(1601388000000+0300)\/", + "\/Date(1601388900000+0300)\/", + "\/Date(1601389800000+0300)\/", + "\/Date(1601390700000+0300)\/", + "\/Date(1601391600000+0300)\/", + "\/Date(1601392500000+0300)\/", + "\/Date(1601393400000+0300)\/", + "\/Date(1601394300000+0300)\/", + "\/Date(1601395200000+0300)\/", + "\/Date(1601396100000+0300)\/", + "\/Date(1601397000000+0300)\/", + "\/Date(1601397900000+0300)\/", + "\/Date(1601398800000+0300)\/", + "\/Date(1601399700000+0300)\/", + "\/Date(1601400600000+0300)\/", + "\/Date(1601401500000+0300)\/", + "\/Date(1601474400000+0300)\/", + "\/Date(1601475300000+0300)\/", + "\/Date(1601476200000+0300)\/", + "\/Date(1601477100000+0300)\/", + "\/Date(1601478000000+0300)\/", + "\/Date(1601478900000+0300)\/", + "\/Date(1601479800000+0300)\/", + "\/Date(1601480700000+0300)\/", + "\/Date(1601481600000+0300)\/", + "\/Date(1601482500000+0300)\/", + "\/Date(1601483400000+0300)\/", + "\/Date(1601484300000+0300)\/", + "\/Date(1601485200000+0300)\/", + "\/Date(1601486100000+0300)\/", + "\/Date(1601487000000+0300)\/", + "\/Date(1601487900000+0300)\/", + "\/Date(1601557200000+0300)\/", + "\/Date(1601558100000+0300)\/", + "\/Date(1601559000000+0300)\/", + "\/Date(1601559900000+0300)\/", + "\/Date(1601560800000+0300)\/", + "\/Date(1601561700000+0300)\/", + "\/Date(1601562600000+0300)\/", + "\/Date(1601563500000+0300)\/", + "\/Date(1601564400000+0300)\/", + "\/Date(1601565300000+0300)\/", + "\/Date(1601566200000+0300)\/", + "\/Date(1601567100000+0300)\/", + "\/Date(1601568000000+0300)\/", + "\/Date(1601568900000+0300)\/", + "\/Date(1601569800000+0300)\/", + "\/Date(1601570700000+0300)\/", + "\/Date(1601708400000+0300)\/", + "\/Date(1601709300000+0300)\/", + "\/Date(1601710200000+0300)\/", + "\/Date(1601711100000+0300)\/", + "\/Date(1601712000000+0300)\/", + "\/Date(1601712900000+0300)\/", + "\/Date(1601713800000+0300)\/", + "\/Date(1601714700000+0300)\/", + "\/Date(1601715600000+0300)\/", + "\/Date(1601716500000+0300)\/", + "\/Date(1601717400000+0300)\/", + "\/Date(1601718300000+0300)\/", + "\/Date(1601719200000+0300)\/", + "\/Date(1601720100000+0300)\/", + "\/Date(1601721000000+0300)\/", + "\/Date(1601721900000+0300)\/", + "\/Date(1601820000000+0300)\/", + "\/Date(1601820900000+0300)\/", + "\/Date(1601821800000+0300)\/", + "\/Date(1601822700000+0300)\/", + "\/Date(1601823600000+0300)\/", + "\/Date(1601824500000+0300)\/", + "\/Date(1601825400000+0300)\/", + "\/Date(1601826300000+0300)\/", + "\/Date(1601827200000+0300)\/", + "\/Date(1601828100000+0300)\/", + "\/Date(1601829000000+0300)\/", + "\/Date(1601829900000+0300)\/", + "\/Date(1601830800000+0300)\/", + "\/Date(1601831700000+0300)\/", + "\/Date(1601832600000+0300)\/", + "\/Date(1601833500000+0300)\/", + "\/Date(1601906400000+0300)\/", + "\/Date(1601907300000+0300)\/", + "\/Date(1601908200000+0300)\/", + "\/Date(1601909100000+0300)\/", + "\/Date(1601910000000+0300)\/", + "\/Date(1601910900000+0300)\/", + "\/Date(1601911800000+0300)\/", + "\/Date(1601912700000+0300)\/", + "\/Date(1601913600000+0300)\/", + "\/Date(1601914500000+0300)\/", + "\/Date(1601915400000+0300)\/", + "\/Date(1601916300000+0300)\/", + "\/Date(1601917200000+0300)\/", + "\/Date(1601918100000+0300)\/", + "\/Date(1601919000000+0300)\/", + "\/Date(1601919900000+0300)\/", + "\/Date(1601992800000+0300)\/", + "\/Date(1601993700000+0300)\/", + "\/Date(1601994600000+0300)\/", + "\/Date(1601995500000+0300)\/", + "\/Date(1601996400000+0300)\/", + "\/Date(1601997300000+0300)\/", + "\/Date(1601998200000+0300)\/", + "\/Date(1601999100000+0300)\/", + "\/Date(1602000000000+0300)\/", + "\/Date(1602000900000+0300)\/", + "\/Date(1602001800000+0300)\/", + "\/Date(1602002700000+0300)\/", + "\/Date(1602003600000+0300)\/", + "\/Date(1602004500000+0300)\/", + "\/Date(1602005400000+0300)\/", + "\/Date(1602006300000+0300)\/", + "\/Date(1602079200000+0300)\/", + "\/Date(1602080100000+0300)\/", + "\/Date(1602081000000+0300)\/", + "\/Date(1602081900000+0300)\/", + "\/Date(1602082800000+0300)\/", + "\/Date(1602083700000+0300)\/", + "\/Date(1602084600000+0300)\/", + "\/Date(1602085500000+0300)\/", + "\/Date(1602086400000+0300)\/", + "\/Date(1602087300000+0300)\/", + "\/Date(1602088200000+0300)\/", + "\/Date(1602089100000+0300)\/", + "\/Date(1602090000000+0300)\/", + "\/Date(1602090900000+0300)\/", + "\/Date(1602091800000+0300)\/", + "\/Date(1602092700000+0300)\/", + "\/Date(1602162000000+0300)\/", + "\/Date(1602162900000+0300)\/", + "\/Date(1602163800000+0300)\/", + "\/Date(1602164700000+0300)\/", + "\/Date(1602165600000+0300)\/", + "\/Date(1602166500000+0300)\/", + "\/Date(1602167400000+0300)\/", + "\/Date(1602168300000+0300)\/", + "\/Date(1602169200000+0300)\/", + "\/Date(1602170100000+0300)\/", + "\/Date(1602171000000+0300)\/", + "\/Date(1602171900000+0300)\/", + "\/Date(1602172800000+0300)\/", + "\/Date(1602173700000+0300)\/", + "\/Date(1602174600000+0300)\/", + "\/Date(1602175500000+0300)\/", + "\/Date(1602313200000+0300)\/", + "\/Date(1602314100000+0300)\/", + "\/Date(1602315000000+0300)\/", + "\/Date(1602315900000+0300)\/", + "\/Date(1602316800000+0300)\/", + "\/Date(1602317700000+0300)\/", + "\/Date(1602318600000+0300)\/", + "\/Date(1602319500000+0300)\/", + "\/Date(1602320400000+0300)\/", + "\/Date(1602321300000+0300)\/", + "\/Date(1602322200000+0300)\/", + "\/Date(1602323100000+0300)\/", + "\/Date(1602324000000+0300)\/", + "\/Date(1602324900000+0300)\/", + "\/Date(1602325800000+0300)\/", + "\/Date(1602326700000+0300)\/", + "\/Date(1602424800000+0300)\/", + "\/Date(1602425700000+0300)\/", + "\/Date(1602426600000+0300)\/", + "\/Date(1602427500000+0300)\/", + "\/Date(1602428400000+0300)\/", + "\/Date(1602429300000+0300)\/", + "\/Date(1602430200000+0300)\/", + "\/Date(1602431100000+0300)\/", + "\/Date(1602432000000+0300)\/", + "\/Date(1602432900000+0300)\/", + "\/Date(1602433800000+0300)\/", + "\/Date(1602434700000+0300)\/", + "\/Date(1602435600000+0300)\/", + "\/Date(1602436500000+0300)\/", + "\/Date(1602437400000+0300)\/", + "\/Date(1602438300000+0300)\/", + "\/Date(1602511200000+0300)\/", + "\/Date(1602512100000+0300)\/", + "\/Date(1602513000000+0300)\/", + "\/Date(1602513900000+0300)\/", + "\/Date(1602514800000+0300)\/", + "\/Date(1602515700000+0300)\/", + "\/Date(1602516600000+0300)\/", + "\/Date(1602517500000+0300)\/", + "\/Date(1602518400000+0300)\/", + "\/Date(1602519300000+0300)\/", + "\/Date(1602520200000+0300)\/", + "\/Date(1602521100000+0300)\/", + "\/Date(1602522000000+0300)\/", + "\/Date(1602522900000+0300)\/", + "\/Date(1602523800000+0300)\/", + "\/Date(1602524700000+0300)\/", + "\/Date(1602597600000+0300)\/", + "\/Date(1602598500000+0300)\/", + "\/Date(1602599400000+0300)\/", + "\/Date(1602600300000+0300)\/", + "\/Date(1602601200000+0300)\/", + "\/Date(1602602100000+0300)\/", + "\/Date(1602603000000+0300)\/", + "\/Date(1602603900000+0300)\/", + "\/Date(1602604800000+0300)\/", + "\/Date(1602605700000+0300)\/", + "\/Date(1602606600000+0300)\/", + "\/Date(1602607500000+0300)\/", + "\/Date(1602608400000+0300)\/", + "\/Date(1602609300000+0300)\/", + "\/Date(1602610200000+0300)\/", + "\/Date(1602611100000+0300)\/", + "\/Date(1602684000000+0300)\/", + "\/Date(1602684900000+0300)\/", + "\/Date(1602685800000+0300)\/", + "\/Date(1602686700000+0300)\/", + "\/Date(1602687600000+0300)\/", + "\/Date(1602688500000+0300)\/", + "\/Date(1602689400000+0300)\/", + "\/Date(1602690300000+0300)\/", + "\/Date(1602691200000+0300)\/", + "\/Date(1602692100000+0300)\/", + "\/Date(1602693000000+0300)\/", + "\/Date(1602693900000+0300)\/", + "\/Date(1602694800000+0300)\/", + "\/Date(1602695700000+0300)\/", + "\/Date(1602696600000+0300)\/", + "\/Date(1602697500000+0300)\/", + "\/Date(1602766800000+0300)\/", + "\/Date(1602767700000+0300)\/", + "\/Date(1602768600000+0300)\/", + "\/Date(1602769500000+0300)\/", + "\/Date(1602770400000+0300)\/", + "\/Date(1602771300000+0300)\/", + "\/Date(1602772200000+0300)\/", + "\/Date(1602773100000+0300)\/", + "\/Date(1602774000000+0300)\/", + "\/Date(1602774900000+0300)\/", + "\/Date(1602775800000+0300)\/", + "\/Date(1602776700000+0300)\/", + "\/Date(1602777600000+0300)\/", + "\/Date(1602778500000+0300)\/", + "\/Date(1602779400000+0300)\/", + "\/Date(1602780300000+0300)\/", + "\/Date(1602918000000+0300)\/", + "\/Date(1602918900000+0300)\/", + "\/Date(1602919800000+0300)\/", + "\/Date(1602920700000+0300)\/", + "\/Date(1602921600000+0300)\/", + "\/Date(1602922500000+0300)\/", + "\/Date(1602923400000+0300)\/", + "\/Date(1602924300000+0300)\/", + "\/Date(1602925200000+0300)\/", + "\/Date(1602926100000+0300)\/", + "\/Date(1602927000000+0300)\/", + "\/Date(1602927900000+0300)\/", + "\/Date(1602928800000+0300)\/", + "\/Date(1602929700000+0300)\/", + "\/Date(1602930600000+0300)\/", + "\/Date(1602931500000+0300)\/", + "\/Date(1603029600000+0300)\/", + "\/Date(1603030500000+0300)\/", + "\/Date(1603031400000+0300)\/", + "\/Date(1603032300000+0300)\/", + "\/Date(1603033200000+0300)\/", + "\/Date(1603034100000+0300)\/", + "\/Date(1603035000000+0300)\/", + "\/Date(1603035900000+0300)\/", + "\/Date(1603036800000+0300)\/", + "\/Date(1603037700000+0300)\/", + "\/Date(1603038600000+0300)\/", + "\/Date(1603039500000+0300)\/", + "\/Date(1603040400000+0300)\/", + "\/Date(1603041300000+0300)\/", + "\/Date(1603042200000+0300)\/", + "\/Date(1603043100000+0300)\/", + "\/Date(1603116000000+0300)\/", + "\/Date(1603116900000+0300)\/", + "\/Date(1603117800000+0300)\/", + "\/Date(1603118700000+0300)\/", + "\/Date(1603119600000+0300)\/", + "\/Date(1603120500000+0300)\/", + "\/Date(1603121400000+0300)\/", + "\/Date(1603122300000+0300)\/", + "\/Date(1603123200000+0300)\/", + "\/Date(1603124100000+0300)\/", + "\/Date(1603125000000+0300)\/", + "\/Date(1603125900000+0300)\/", + "\/Date(1603126800000+0300)\/", + "\/Date(1603127700000+0300)\/", + "\/Date(1603128600000+0300)\/", + "\/Date(1603129500000+0300)\/", + "\/Date(1603202400000+0300)\/", + "\/Date(1603203300000+0300)\/", + "\/Date(1603204200000+0300)\/", + "\/Date(1603205100000+0300)\/", + "\/Date(1603206000000+0300)\/", + "\/Date(1603206900000+0300)\/", + "\/Date(1603207800000+0300)\/", + "\/Date(1603208700000+0300)\/", + "\/Date(1603209600000+0300)\/", + "\/Date(1603210500000+0300)\/", + "\/Date(1603211400000+0300)\/", + "\/Date(1603212300000+0300)\/", + "\/Date(1603213200000+0300)\/", + "\/Date(1603214100000+0300)\/", + "\/Date(1603215000000+0300)\/", + "\/Date(1603215900000+0300)\/", + "\/Date(1603288800000+0300)\/", + "\/Date(1603289700000+0300)\/", + "\/Date(1603290600000+0300)\/", + "\/Date(1603291500000+0300)\/", + "\/Date(1603292400000+0300)\/", + "\/Date(1603293300000+0300)\/", + "\/Date(1603294200000+0300)\/", + "\/Date(1603295100000+0300)\/", + "\/Date(1603296000000+0300)\/", + "\/Date(1603296900000+0300)\/", + "\/Date(1603297800000+0300)\/", + "\/Date(1603298700000+0300)\/", + "\/Date(1603299600000+0300)\/", + "\/Date(1603300500000+0300)\/", + "\/Date(1603301400000+0300)\/", + "\/Date(1603302300000+0300)\/", + "\/Date(1603371600000+0300)\/", + "\/Date(1603372500000+0300)\/", + "\/Date(1603373400000+0300)\/", + "\/Date(1603374300000+0300)\/", + "\/Date(1603375200000+0300)\/", + "\/Date(1603376100000+0300)\/", + "\/Date(1603377000000+0300)\/", + "\/Date(1603377900000+0300)\/", + "\/Date(1603378800000+0300)\/", + "\/Date(1603379700000+0300)\/", + "\/Date(1603380600000+0300)\/", + "\/Date(1603381500000+0300)\/", + "\/Date(1603382400000+0300)\/", + "\/Date(1603383300000+0300)\/", + "\/Date(1603384200000+0300)\/", + "\/Date(1603385100000+0300)\/", + "\/Date(1603522800000+0300)\/", + "\/Date(1603523700000+0300)\/", + "\/Date(1603524600000+0300)\/", + "\/Date(1603525500000+0300)\/", + "\/Date(1603526400000+0300)\/", + "\/Date(1603527300000+0300)\/", + "\/Date(1603528200000+0300)\/", + "\/Date(1603529100000+0300)\/", + "\/Date(1603530000000+0300)\/", + "\/Date(1603530900000+0300)\/", + "\/Date(1603531800000+0300)\/", + "\/Date(1603532700000+0300)\/", + "\/Date(1603533600000+0300)\/", + "\/Date(1603534500000+0300)\/", + "\/Date(1603535400000+0300)\/", + "\/Date(1603536300000+0300)\/", + "\/Date(1603634400000+0300)\/", + "\/Date(1603635300000+0300)\/", + "\/Date(1603636200000+0300)\/", + "\/Date(1603637100000+0300)\/", + "\/Date(1603638000000+0300)\/", + "\/Date(1603638900000+0300)\/", + "\/Date(1603639800000+0300)\/", + "\/Date(1603640700000+0300)\/", + "\/Date(1603641600000+0300)\/", + "\/Date(1603642500000+0300)\/", + "\/Date(1603643400000+0300)\/", + "\/Date(1603644300000+0300)\/", + "\/Date(1603645200000+0300)\/", + "\/Date(1603646100000+0300)\/", + "\/Date(1603647000000+0300)\/", + "\/Date(1603647900000+0300)\/", + "\/Date(1603720800000+0300)\/", + "\/Date(1603721700000+0300)\/", + "\/Date(1603722600000+0300)\/", + "\/Date(1603723500000+0300)\/", + "\/Date(1603724400000+0300)\/", + "\/Date(1603725300000+0300)\/", + "\/Date(1603726200000+0300)\/", + "\/Date(1603727100000+0300)\/", + "\/Date(1603728000000+0300)\/", + "\/Date(1603728900000+0300)\/", + "\/Date(1603729800000+0300)\/", + "\/Date(1603730700000+0300)\/", + "\/Date(1603731600000+0300)\/", + "\/Date(1603732500000+0300)\/", + "\/Date(1603733400000+0300)\/", + "\/Date(1603734300000+0300)\/", + "\/Date(1603807200000+0300)\/", + "\/Date(1603808100000+0300)\/", + "\/Date(1603809000000+0300)\/", + "\/Date(1603809900000+0300)\/", + "\/Date(1603810800000+0300)\/", + "\/Date(1603811700000+0300)\/", + "\/Date(1603812600000+0300)\/", + "\/Date(1603813500000+0300)\/", + "\/Date(1603814400000+0300)\/", + "\/Date(1603815300000+0300)\/", + "\/Date(1603816200000+0300)\/", + "\/Date(1603817100000+0300)\/", + "\/Date(1603818000000+0300)\/", + "\/Date(1603818900000+0300)\/", + "\/Date(1603819800000+0300)\/", + "\/Date(1603820700000+0300)\/", + "\/Date(1603893600000+0300)\/", + "\/Date(1603894500000+0300)\/", + "\/Date(1603895400000+0300)\/", + "\/Date(1603896300000+0300)\/", + "\/Date(1603897200000+0300)\/", + "\/Date(1603898100000+0300)\/", + "\/Date(1603899000000+0300)\/", + "\/Date(1603899900000+0300)\/", + "\/Date(1603900800000+0300)\/", + "\/Date(1603901700000+0300)\/", + "\/Date(1603902600000+0300)\/", + "\/Date(1603903500000+0300)\/", + "\/Date(1603904400000+0300)\/", + "\/Date(1603905300000+0300)\/", + "\/Date(1603906200000+0300)\/", + "\/Date(1603907100000+0300)\/", + "\/Date(1603976400000+0300)\/", + "\/Date(1603977300000+0300)\/", + "\/Date(1603978200000+0300)\/", + "\/Date(1603979100000+0300)\/", + "\/Date(1603980000000+0300)\/", + "\/Date(1603980900000+0300)\/", + "\/Date(1603981800000+0300)\/", + "\/Date(1603982700000+0300)\/", + "\/Date(1603983600000+0300)\/", + "\/Date(1603984500000+0300)\/", + "\/Date(1603985400000+0300)\/", + "\/Date(1603986300000+0300)\/", + "\/Date(1603987200000+0300)\/", + "\/Date(1603988100000+0300)\/", + "\/Date(1603989000000+0300)\/", + "\/Date(1603989900000+0300)\/", + "\/Date(1604127600000+0300)\/", + "\/Date(1604128500000+0300)\/", + "\/Date(1604129400000+0300)\/", + "\/Date(1604130300000+0300)\/", + "\/Date(1604131200000+0300)\/", + "\/Date(1604132100000+0300)\/", + "\/Date(1604133000000+0300)\/", + "\/Date(1604133900000+0300)\/", + "\/Date(1604134800000+0300)\/", + "\/Date(1604135700000+0300)\/", + "\/Date(1604136600000+0300)\/", + "\/Date(1604137500000+0300)\/", + "\/Date(1604138400000+0300)\/", + "\/Date(1604139300000+0300)\/", + "\/Date(1604140200000+0300)\/", + "\/Date(1604141100000+0300)\/", + "\/Date(1604239200000+0300)\/", + "\/Date(1604240100000+0300)\/", + "\/Date(1604241000000+0300)\/", + "\/Date(1604241900000+0300)\/", + "\/Date(1604242800000+0300)\/", + "\/Date(1604243700000+0300)\/", + "\/Date(1604244600000+0300)\/", + "\/Date(1604245500000+0300)\/", + "\/Date(1604246400000+0300)\/", + "\/Date(1604247300000+0300)\/", + "\/Date(1604248200000+0300)\/", + "\/Date(1604249100000+0300)\/", + "\/Date(1604250000000+0300)\/", + "\/Date(1604250900000+0300)\/", + "\/Date(1604251800000+0300)\/", + "\/Date(1604252700000+0300)\/", + "\/Date(1604325600000+0300)\/", + "\/Date(1604326500000+0300)\/", + "\/Date(1604327400000+0300)\/", + "\/Date(1604328300000+0300)\/", + "\/Date(1604329200000+0300)\/", + "\/Date(1604330100000+0300)\/", + "\/Date(1604331000000+0300)\/", + "\/Date(1604331900000+0300)\/", + "\/Date(1604332800000+0300)\/", + "\/Date(1604333700000+0300)\/", + "\/Date(1604334600000+0300)\/", + "\/Date(1604335500000+0300)\/", + "\/Date(1604336400000+0300)\/", + "\/Date(1604337300000+0300)\/", + "\/Date(1604338200000+0300)\/", + "\/Date(1604339100000+0300)\/", + "\/Date(1604412000000+0300)\/", + "\/Date(1604412900000+0300)\/", + "\/Date(1604413800000+0300)\/", + "\/Date(1604414700000+0300)\/", + "\/Date(1604415600000+0300)\/", + "\/Date(1604416500000+0300)\/", + "\/Date(1604417400000+0300)\/", + "\/Date(1604418300000+0300)\/", + "\/Date(1604419200000+0300)\/", + "\/Date(1604420100000+0300)\/", + "\/Date(1604421000000+0300)\/", + "\/Date(1604421900000+0300)\/", + "\/Date(1604422800000+0300)\/", + "\/Date(1604423700000+0300)\/", + "\/Date(1604424600000+0300)\/", + "\/Date(1604425500000+0300)\/", + "\/Date(1604498400000+0300)\/", + "\/Date(1604499300000+0300)\/", + "\/Date(1604500200000+0300)\/", + "\/Date(1604501100000+0300)\/", + "\/Date(1604502000000+0300)\/", + "\/Date(1604502900000+0300)\/", + "\/Date(1604503800000+0300)\/", + "\/Date(1604504700000+0300)\/", + "\/Date(1604505600000+0300)\/", + "\/Date(1604506500000+0300)\/", + "\/Date(1604507400000+0300)\/", + "\/Date(1604508300000+0300)\/", + "\/Date(1604509200000+0300)\/", + "\/Date(1604510100000+0300)\/", + "\/Date(1604511000000+0300)\/", + "\/Date(1604511900000+0300)\/", + "\/Date(1604581200000+0300)\/", + "\/Date(1604582100000+0300)\/", + "\/Date(1604583000000+0300)\/", + "\/Date(1604583900000+0300)\/", + "\/Date(1604584800000+0300)\/", + "\/Date(1604585700000+0300)\/", + "\/Date(1604586600000+0300)\/", + "\/Date(1604587500000+0300)\/", + "\/Date(1604588400000+0300)\/", + "\/Date(1604589300000+0300)\/", + "\/Date(1604590200000+0300)\/", + "\/Date(1604591100000+0300)\/", + "\/Date(1604592000000+0300)\/", + "\/Date(1604592900000+0300)\/", + "\/Date(1604593800000+0300)\/", + "\/Date(1604594700000+0300)\/", + "\/Date(1604732400000+0300)\/", + "\/Date(1604733300000+0300)\/", + "\/Date(1604734200000+0300)\/", + "\/Date(1604735100000+0300)\/", + "\/Date(1604736000000+0300)\/", + "\/Date(1604736900000+0300)\/", + "\/Date(1604737800000+0300)\/", + "\/Date(1604738700000+0300)\/", + "\/Date(1604739600000+0300)\/", + "\/Date(1604740500000+0300)\/", + "\/Date(1604741400000+0300)\/", + "\/Date(1604742300000+0300)\/", + "\/Date(1604743200000+0300)\/", + "\/Date(1604744100000+0300)\/", + "\/Date(1604745000000+0300)\/", + "\/Date(1604745900000+0300)\/", + "\/Date(1604844000000+0300)\/", + "\/Date(1604844900000+0300)\/", + "\/Date(1604845800000+0300)\/", + "\/Date(1604846700000+0300)\/", + "\/Date(1604847600000+0300)\/", + "\/Date(1604848500000+0300)\/", + "\/Date(1604849400000+0300)\/", + "\/Date(1604850300000+0300)\/", + "\/Date(1604851200000+0300)\/", + "\/Date(1604852100000+0300)\/", + "\/Date(1604853000000+0300)\/", + "\/Date(1604853900000+0300)\/", + "\/Date(1604854800000+0300)\/", + "\/Date(1604855700000+0300)\/", + "\/Date(1604856600000+0300)\/", + "\/Date(1604857500000+0300)\/", + "\/Date(1604930400000+0300)\/", + "\/Date(1604931300000+0300)\/", + "\/Date(1604932200000+0300)\/", + "\/Date(1604933100000+0300)\/", + "\/Date(1604934000000+0300)\/", + "\/Date(1604934900000+0300)\/", + "\/Date(1604935800000+0300)\/", + "\/Date(1604936700000+0300)\/", + "\/Date(1604937600000+0300)\/", + "\/Date(1604938500000+0300)\/", + "\/Date(1604939400000+0300)\/", + "\/Date(1604940300000+0300)\/", + "\/Date(1604941200000+0300)\/", + "\/Date(1604942100000+0300)\/", + "\/Date(1604943000000+0300)\/", + "\/Date(1604943900000+0300)\/", + "\/Date(1605016800000+0300)\/", + "\/Date(1605017700000+0300)\/", + "\/Date(1605018600000+0300)\/", + "\/Date(1605019500000+0300)\/", + "\/Date(1605020400000+0300)\/", + "\/Date(1605021300000+0300)\/", + "\/Date(1605022200000+0300)\/", + "\/Date(1605023100000+0300)\/", + "\/Date(1605024000000+0300)\/", + "\/Date(1605024900000+0300)\/", + "\/Date(1605025800000+0300)\/", + "\/Date(1605026700000+0300)\/", + "\/Date(1605027600000+0300)\/", + "\/Date(1605028500000+0300)\/", + "\/Date(1605029400000+0300)\/", + "\/Date(1605030300000+0300)\/", + "\/Date(1605103200000+0300)\/", + "\/Date(1605104100000+0300)\/", + "\/Date(1605105000000+0300)\/", + "\/Date(1605105900000+0300)\/", + "\/Date(1605106800000+0300)\/", + "\/Date(1605107700000+0300)\/", + "\/Date(1605108600000+0300)\/", + "\/Date(1605109500000+0300)\/", + "\/Date(1605110400000+0300)\/", + "\/Date(1605111300000+0300)\/", + "\/Date(1605112200000+0300)\/", + "\/Date(1605113100000+0300)\/", + "\/Date(1605114000000+0300)\/", + "\/Date(1605114900000+0300)\/", + "\/Date(1605115800000+0300)\/", + "\/Date(1605116700000+0300)\/", + "\/Date(1605186000000+0300)\/", + "\/Date(1605186900000+0300)\/", + "\/Date(1605187800000+0300)\/", + "\/Date(1605188700000+0300)\/", + "\/Date(1605189600000+0300)\/", + "\/Date(1605190500000+0300)\/", + "\/Date(1605191400000+0300)\/", + "\/Date(1605192300000+0300)\/", + "\/Date(1605193200000+0300)\/", + "\/Date(1605194100000+0300)\/", + "\/Date(1605195000000+0300)\/", + "\/Date(1605195900000+0300)\/", + "\/Date(1605196800000+0300)\/", + "\/Date(1605197700000+0300)\/", + "\/Date(1605198600000+0300)\/", + "\/Date(1605199500000+0300)\/", + "\/Date(1605337200000+0300)\/", + "\/Date(1605338100000+0300)\/", + "\/Date(1605339000000+0300)\/", + "\/Date(1605339900000+0300)\/", + "\/Date(1605340800000+0300)\/", + "\/Date(1605341700000+0300)\/", + "\/Date(1605342600000+0300)\/", + "\/Date(1605343500000+0300)\/", + "\/Date(1605344400000+0300)\/", + "\/Date(1605345300000+0300)\/", + "\/Date(1605346200000+0300)\/", + "\/Date(1605347100000+0300)\/", + "\/Date(1605348000000+0300)\/", + "\/Date(1605348900000+0300)\/", + "\/Date(1605349800000+0300)\/", + "\/Date(1605350700000+0300)\/", + "\/Date(1605448800000+0300)\/", + "\/Date(1605449700000+0300)\/", + "\/Date(1605450600000+0300)\/", + "\/Date(1605451500000+0300)\/", + "\/Date(1605452400000+0300)\/", + "\/Date(1605453300000+0300)\/", + "\/Date(1605454200000+0300)\/", + "\/Date(1605455100000+0300)\/", + "\/Date(1605456000000+0300)\/", + "\/Date(1605456900000+0300)\/", + "\/Date(1605457800000+0300)\/", + "\/Date(1605458700000+0300)\/", + "\/Date(1605459600000+0300)\/", + "\/Date(1605460500000+0300)\/", + "\/Date(1605461400000+0300)\/", + "\/Date(1605462300000+0300)\/", + "\/Date(1605535200000+0300)\/", + "\/Date(1605536100000+0300)\/", + "\/Date(1605537000000+0300)\/", + "\/Date(1605537900000+0300)\/", + "\/Date(1605538800000+0300)\/", + "\/Date(1605539700000+0300)\/", + "\/Date(1605540600000+0300)\/", + "\/Date(1605541500000+0300)\/", + "\/Date(1605542400000+0300)\/", + "\/Date(1605543300000+0300)\/", + "\/Date(1605544200000+0300)\/", + "\/Date(1605545100000+0300)\/", + "\/Date(1605546000000+0300)\/", + "\/Date(1605546900000+0300)\/", + "\/Date(1605547800000+0300)\/", + "\/Date(1605548700000+0300)\/", + "\/Date(1605621600000+0300)\/", + "\/Date(1605622500000+0300)\/", + "\/Date(1605623400000+0300)\/", + "\/Date(1605624300000+0300)\/", + "\/Date(1605625200000+0300)\/", + "\/Date(1605626100000+0300)\/", + "\/Date(1605627000000+0300)\/", + "\/Date(1605627900000+0300)\/", + "\/Date(1605628800000+0300)\/", + "\/Date(1605629700000+0300)\/", + "\/Date(1605630600000+0300)\/", + "\/Date(1605631500000+0300)\/", + "\/Date(1605632400000+0300)\/", + "\/Date(1605633300000+0300)\/", + "\/Date(1605634200000+0300)\/", + "\/Date(1605635100000+0300)\/", + "\/Date(1605708000000+0300)\/", + "\/Date(1605708900000+0300)\/", + "\/Date(1605709800000+0300)\/", + "\/Date(1605710700000+0300)\/", + "\/Date(1605711600000+0300)\/", + "\/Date(1605712500000+0300)\/", + "\/Date(1605713400000+0300)\/", + "\/Date(1605714300000+0300)\/", + "\/Date(1605715200000+0300)\/", + "\/Date(1605716100000+0300)\/", + "\/Date(1605717000000+0300)\/", + "\/Date(1605717900000+0300)\/", + "\/Date(1605718800000+0300)\/", + "\/Date(1605719700000+0300)\/", + "\/Date(1605720600000+0300)\/", + "\/Date(1605721500000+0300)\/", + "\/Date(1605790800000+0300)\/", + "\/Date(1605791700000+0300)\/", + "\/Date(1605792600000+0300)\/", + "\/Date(1605793500000+0300)\/", + "\/Date(1605794400000+0300)\/", + "\/Date(1605795300000+0300)\/", + "\/Date(1605796200000+0300)\/", + "\/Date(1605797100000+0300)\/", + "\/Date(1605798000000+0300)\/", + "\/Date(1605798900000+0300)\/", + "\/Date(1605799800000+0300)\/", + "\/Date(1605800700000+0300)\/", + "\/Date(1605801600000+0300)\/", + "\/Date(1605802500000+0300)\/", + "\/Date(1605803400000+0300)\/", + "\/Date(1605804300000+0300)\/", + "\/Date(1605942000000+0300)\/", + "\/Date(1605942900000+0300)\/", + "\/Date(1605943800000+0300)\/", + "\/Date(1605944700000+0300)\/", + "\/Date(1605945600000+0300)\/", + "\/Date(1605946500000+0300)\/", + "\/Date(1605947400000+0300)\/", + "\/Date(1605948300000+0300)\/", + "\/Date(1605949200000+0300)\/", + "\/Date(1605950100000+0300)\/", + "\/Date(1605951000000+0300)\/", + "\/Date(1605951900000+0300)\/", + "\/Date(1605952800000+0300)\/", + "\/Date(1605953700000+0300)\/", + "\/Date(1605954600000+0300)\/", + "\/Date(1605955500000+0300)\/", + "\/Date(1606053600000+0300)\/", + "\/Date(1606054500000+0300)\/", + "\/Date(1606055400000+0300)\/", + "\/Date(1606056300000+0300)\/", + "\/Date(1606057200000+0300)\/", + "\/Date(1606058100000+0300)\/", + "\/Date(1606059000000+0300)\/", + "\/Date(1606059900000+0300)\/", + "\/Date(1606060800000+0300)\/", + "\/Date(1606061700000+0300)\/", + "\/Date(1606062600000+0300)\/", + "\/Date(1606063500000+0300)\/", + "\/Date(1606064400000+0300)\/", + "\/Date(1606065300000+0300)\/", + "\/Date(1606066200000+0300)\/", + "\/Date(1606067100000+0300)\/", + "\/Date(1606140000000+0300)\/", + "\/Date(1606140900000+0300)\/", + "\/Date(1606141800000+0300)\/", + "\/Date(1606142700000+0300)\/", + "\/Date(1606143600000+0300)\/", + "\/Date(1606144500000+0300)\/", + "\/Date(1606145400000+0300)\/", + "\/Date(1606146300000+0300)\/", + "\/Date(1606147200000+0300)\/", + "\/Date(1606148100000+0300)\/", + "\/Date(1606149000000+0300)\/", + "\/Date(1606149900000+0300)\/", + "\/Date(1606150800000+0300)\/", + "\/Date(1606151700000+0300)\/", + "\/Date(1606152600000+0300)\/", + "\/Date(1606153500000+0300)\/", + "\/Date(1606226400000+0300)\/", + "\/Date(1606227300000+0300)\/", + "\/Date(1606228200000+0300)\/", + "\/Date(1606229100000+0300)\/", + "\/Date(1606230000000+0300)\/", + "\/Date(1606230900000+0300)\/", + "\/Date(1606231800000+0300)\/", + "\/Date(1606232700000+0300)\/", + "\/Date(1606233600000+0300)\/", + "\/Date(1606234500000+0300)\/", + "\/Date(1606235400000+0300)\/", + "\/Date(1606236300000+0300)\/", + "\/Date(1606237200000+0300)\/", + "\/Date(1606238100000+0300)\/", + "\/Date(1606239000000+0300)\/", + "\/Date(1606239900000+0300)\/", + "\/Date(1606312800000+0300)\/", + "\/Date(1606313700000+0300)\/", + "\/Date(1606314600000+0300)\/", + "\/Date(1606315500000+0300)\/", + "\/Date(1606316400000+0300)\/", + "\/Date(1606317300000+0300)\/", + "\/Date(1606318200000+0300)\/", + "\/Date(1606319100000+0300)\/", + "\/Date(1606320000000+0300)\/", + "\/Date(1606320900000+0300)\/", + "\/Date(1606321800000+0300)\/", + "\/Date(1606322700000+0300)\/", + "\/Date(1606323600000+0300)\/", + "\/Date(1606324500000+0300)\/", + "\/Date(1606325400000+0300)\/", + "\/Date(1606326300000+0300)\/", + "\/Date(1606395600000+0300)\/", + "\/Date(1606396500000+0300)\/", + "\/Date(1606397400000+0300)\/", + "\/Date(1606398300000+0300)\/", + "\/Date(1606399200000+0300)\/", + "\/Date(1606400100000+0300)\/", + "\/Date(1606401000000+0300)\/", + "\/Date(1606401900000+0300)\/", + "\/Date(1606402800000+0300)\/", + "\/Date(1606403700000+0300)\/", + "\/Date(1606404600000+0300)\/", + "\/Date(1606405500000+0300)\/", + "\/Date(1606406400000+0300)\/", + "\/Date(1606407300000+0300)\/", + "\/Date(1606408200000+0300)\/", + "\/Date(1606409100000+0300)\/", + "\/Date(1606546800000+0300)\/", + "\/Date(1606547700000+0300)\/", + "\/Date(1606548600000+0300)\/", + "\/Date(1606549500000+0300)\/", + "\/Date(1606550400000+0300)\/", + "\/Date(1606551300000+0300)\/", + "\/Date(1606552200000+0300)\/", + "\/Date(1606553100000+0300)\/", + "\/Date(1606554000000+0300)\/", + "\/Date(1606554900000+0300)\/", + "\/Date(1606555800000+0300)\/", + "\/Date(1606556700000+0300)\/", + "\/Date(1606557600000+0300)\/", + "\/Date(1606558500000+0300)\/", + "\/Date(1606559400000+0300)\/", + "\/Date(1606560300000+0300)\/", + "\/Date(1606658400000+0300)\/", + "\/Date(1606659300000+0300)\/", + "\/Date(1606660200000+0300)\/", + "\/Date(1606661100000+0300)\/", + "\/Date(1606662000000+0300)\/", + "\/Date(1606662900000+0300)\/", + "\/Date(1606663800000+0300)\/", + "\/Date(1606664700000+0300)\/", + "\/Date(1606665600000+0300)\/", + "\/Date(1606666500000+0300)\/", + "\/Date(1606667400000+0300)\/", + "\/Date(1606668300000+0300)\/", + "\/Date(1606669200000+0300)\/", + "\/Date(1606670100000+0300)\/", + "\/Date(1606671000000+0300)\/", + "\/Date(1606671900000+0300)\/", + "\/Date(1606744800000+0300)\/", + "\/Date(1606745700000+0300)\/", + "\/Date(1606746600000+0300)\/", + "\/Date(1606747500000+0300)\/", + "\/Date(1606748400000+0300)\/", + "\/Date(1606749300000+0300)\/", + "\/Date(1606750200000+0300)\/", + "\/Date(1606751100000+0300)\/", + "\/Date(1606752000000+0300)\/", + "\/Date(1606752900000+0300)\/", + "\/Date(1606753800000+0300)\/", + "\/Date(1606754700000+0300)\/", + "\/Date(1606755600000+0300)\/", + "\/Date(1606756500000+0300)\/", + "\/Date(1606757400000+0300)\/", + "\/Date(1606758300000+0300)\/", + "\/Date(1606831200000+0300)\/", + "\/Date(1606832100000+0300)\/", + "\/Date(1606833000000+0300)\/", + "\/Date(1606833900000+0300)\/", + "\/Date(1606834800000+0300)\/", + "\/Date(1606835700000+0300)\/", + "\/Date(1606836600000+0300)\/", + "\/Date(1606837500000+0300)\/", + "\/Date(1606838400000+0300)\/", + "\/Date(1606839300000+0300)\/", + "\/Date(1606840200000+0300)\/", + "\/Date(1606841100000+0300)\/", + "\/Date(1606842000000+0300)\/", + "\/Date(1606842900000+0300)\/", + "\/Date(1606843800000+0300)\/", + "\/Date(1606844700000+0300)\/", + "\/Date(1606917600000+0300)\/", + "\/Date(1606918500000+0300)\/", + "\/Date(1606919400000+0300)\/", + "\/Date(1606920300000+0300)\/", + "\/Date(1606921200000+0300)\/", + "\/Date(1606922100000+0300)\/", + "\/Date(1606923000000+0300)\/", + "\/Date(1606923900000+0300)\/", + "\/Date(1606924800000+0300)\/", + "\/Date(1606925700000+0300)\/", + "\/Date(1606926600000+0300)\/", + "\/Date(1606927500000+0300)\/", + "\/Date(1606928400000+0300)\/", + "\/Date(1606929300000+0300)\/", + "\/Date(1606930200000+0300)\/", + "\/Date(1606931100000+0300)\/", + "\/Date(1607000400000+0300)\/", + "\/Date(1607001300000+0300)\/", + "\/Date(1607002200000+0300)\/", + "\/Date(1607003100000+0300)\/", + "\/Date(1607004000000+0300)\/", + "\/Date(1607004900000+0300)\/", + "\/Date(1607005800000+0300)\/", + "\/Date(1607006700000+0300)\/", + "\/Date(1607007600000+0300)\/", + "\/Date(1607008500000+0300)\/", + "\/Date(1607009400000+0300)\/", + "\/Date(1607010300000+0300)\/", + "\/Date(1607011200000+0300)\/", + "\/Date(1607012100000+0300)\/", + "\/Date(1607013000000+0300)\/", + "\/Date(1607013900000+0300)\/", + "\/Date(1607151600000+0300)\/", + "\/Date(1607152500000+0300)\/", + "\/Date(1607153400000+0300)\/", + "\/Date(1607154300000+0300)\/", + "\/Date(1607155200000+0300)\/", + "\/Date(1607156100000+0300)\/", + "\/Date(1607157000000+0300)\/", + "\/Date(1607157900000+0300)\/", + "\/Date(1607158800000+0300)\/", + "\/Date(1607159700000+0300)\/", + "\/Date(1607160600000+0300)\/", + "\/Date(1607161500000+0300)\/", + "\/Date(1607162400000+0300)\/", + "\/Date(1607163300000+0300)\/", + "\/Date(1607164200000+0300)\/", + "\/Date(1607165100000+0300)\/", + "\/Date(1607263200000+0300)\/", + "\/Date(1607264100000+0300)\/", + "\/Date(1607265000000+0300)\/", + "\/Date(1607265900000+0300)\/", + "\/Date(1607266800000+0300)\/", + "\/Date(1607267700000+0300)\/", + "\/Date(1607268600000+0300)\/", + "\/Date(1607269500000+0300)\/", + "\/Date(1607270400000+0300)\/", + "\/Date(1607271300000+0300)\/", + "\/Date(1607272200000+0300)\/", + "\/Date(1607273100000+0300)\/", + "\/Date(1607274000000+0300)\/", + "\/Date(1607274900000+0300)\/", + "\/Date(1607275800000+0300)\/", + "\/Date(1607276700000+0300)\/", + "\/Date(1607349600000+0300)\/", + "\/Date(1607350500000+0300)\/", + "\/Date(1607351400000+0300)\/", + "\/Date(1607352300000+0300)\/", + "\/Date(1607353200000+0300)\/", + "\/Date(1607354100000+0300)\/", + "\/Date(1607355000000+0300)\/", + "\/Date(1607355900000+0300)\/", + "\/Date(1607356800000+0300)\/", + "\/Date(1607357700000+0300)\/", + "\/Date(1607358600000+0300)\/", + "\/Date(1607359500000+0300)\/", + "\/Date(1607360400000+0300)\/", + "\/Date(1607361300000+0300)\/", + "\/Date(1607362200000+0300)\/", + "\/Date(1607363100000+0300)\/", + "\/Date(1607436000000+0300)\/", + "\/Date(1607436900000+0300)\/", + "\/Date(1607437800000+0300)\/", + "\/Date(1607438700000+0300)\/", + "\/Date(1607439600000+0300)\/", + "\/Date(1607440500000+0300)\/", + "\/Date(1607441400000+0300)\/", + "\/Date(1607442300000+0300)\/", + "\/Date(1607443200000+0300)\/", + "\/Date(1607444100000+0300)\/", + "\/Date(1607445000000+0300)\/", + "\/Date(1607445900000+0300)\/", + "\/Date(1607446800000+0300)\/", + "\/Date(1607447700000+0300)\/", + "\/Date(1607448600000+0300)\/", + "\/Date(1607449500000+0300)\/", + "\/Date(1607522400000+0300)\/", + "\/Date(1607523300000+0300)\/", + "\/Date(1607524200000+0300)\/", + "\/Date(1607525100000+0300)\/", + "\/Date(1607526000000+0300)\/", + "\/Date(1607526900000+0300)\/", + "\/Date(1607527800000+0300)\/", + "\/Date(1607528700000+0300)\/", + "\/Date(1607529600000+0300)\/", + "\/Date(1607530500000+0300)\/", + "\/Date(1607531400000+0300)\/", + "\/Date(1607532300000+0300)\/", + "\/Date(1607533200000+0300)\/", + "\/Date(1607534100000+0300)\/", + "\/Date(1607535000000+0300)\/", + "\/Date(1607535900000+0300)\/", + "\/Date(1607605200000+0300)\/", + "\/Date(1607606100000+0300)\/", + "\/Date(1607607000000+0300)\/", + "\/Date(1607607900000+0300)\/", + "\/Date(1607608800000+0300)\/", + "\/Date(1607609700000+0300)\/", + "\/Date(1607610600000+0300)\/", + "\/Date(1607611500000+0300)\/", + "\/Date(1607612400000+0300)\/", + "\/Date(1607613300000+0300)\/", + "\/Date(1607614200000+0300)\/", + "\/Date(1607615100000+0300)\/", + "\/Date(1607616000000+0300)\/", + "\/Date(1607616900000+0300)\/", + "\/Date(1607617800000+0300)\/", + "\/Date(1607618700000+0300)\/", + "\/Date(1607756400000+0300)\/", + "\/Date(1607757300000+0300)\/", + "\/Date(1607758200000+0300)\/", + "\/Date(1607759100000+0300)\/", + "\/Date(1607760000000+0300)\/", + "\/Date(1607760900000+0300)\/", + "\/Date(1607761800000+0300)\/", + "\/Date(1607762700000+0300)\/", + "\/Date(1607763600000+0300)\/", + "\/Date(1607764500000+0300)\/", + "\/Date(1607765400000+0300)\/", + "\/Date(1607766300000+0300)\/", + "\/Date(1607767200000+0300)\/", + "\/Date(1607768100000+0300)\/", + "\/Date(1607769000000+0300)\/", + "\/Date(1607769900000+0300)\/", + "\/Date(1607868000000+0300)\/", + "\/Date(1607868900000+0300)\/", + "\/Date(1607869800000+0300)\/", + "\/Date(1607870700000+0300)\/", + "\/Date(1607871600000+0300)\/", + "\/Date(1607872500000+0300)\/", + "\/Date(1607873400000+0300)\/", + "\/Date(1607874300000+0300)\/", + "\/Date(1607875200000+0300)\/", + "\/Date(1607876100000+0300)\/", + "\/Date(1607877000000+0300)\/", + "\/Date(1607877900000+0300)\/", + "\/Date(1607878800000+0300)\/", + "\/Date(1607879700000+0300)\/", + "\/Date(1607880600000+0300)\/", + "\/Date(1607881500000+0300)\/", + "\/Date(1607954400000+0300)\/", + "\/Date(1607955300000+0300)\/", + "\/Date(1607956200000+0300)\/", + "\/Date(1607957100000+0300)\/", + "\/Date(1607958000000+0300)\/", + "\/Date(1607958900000+0300)\/", + "\/Date(1607959800000+0300)\/", + "\/Date(1607960700000+0300)\/", + "\/Date(1607961600000+0300)\/", + "\/Date(1607962500000+0300)\/", + "\/Date(1607963400000+0300)\/", + "\/Date(1607964300000+0300)\/", + "\/Date(1607965200000+0300)\/", + "\/Date(1607966100000+0300)\/", + "\/Date(1607967000000+0300)\/", + "\/Date(1607967900000+0300)\/", + "\/Date(1608040800000+0300)\/", + "\/Date(1608041700000+0300)\/", + "\/Date(1608042600000+0300)\/", + "\/Date(1608043500000+0300)\/", + "\/Date(1608044400000+0300)\/", + "\/Date(1608045300000+0300)\/", + "\/Date(1608046200000+0300)\/", + "\/Date(1608047100000+0300)\/", + "\/Date(1608048000000+0300)\/", + "\/Date(1608048900000+0300)\/", + "\/Date(1608049800000+0300)\/", + "\/Date(1608050700000+0300)\/", + "\/Date(1608051600000+0300)\/", + "\/Date(1608052500000+0300)\/", + "\/Date(1608053400000+0300)\/", + "\/Date(1608054300000+0300)\/", + "\/Date(1608127200000+0300)\/", + "\/Date(1608128100000+0300)\/", + "\/Date(1608129000000+0300)\/", + "\/Date(1608129900000+0300)\/", + "\/Date(1608130800000+0300)\/", + "\/Date(1608131700000+0300)\/", + "\/Date(1608132600000+0300)\/", + "\/Date(1608133500000+0300)\/", + "\/Date(1608134400000+0300)\/", + "\/Date(1608135300000+0300)\/", + "\/Date(1608136200000+0300)\/", + "\/Date(1608137100000+0300)\/", + "\/Date(1608138000000+0300)\/", + "\/Date(1608138900000+0300)\/", + "\/Date(1608139800000+0300)\/", + "\/Date(1608140700000+0300)\/", + "\/Date(1608210000000+0300)\/", + "\/Date(1608210900000+0300)\/", + "\/Date(1608211800000+0300)\/", + "\/Date(1608212700000+0300)\/", + "\/Date(1608213600000+0300)\/", + "\/Date(1608214500000+0300)\/", + "\/Date(1608215400000+0300)\/", + "\/Date(1608216300000+0300)\/", + "\/Date(1608217200000+0300)\/", + "\/Date(1608218100000+0300)\/", + "\/Date(1608219000000+0300)\/", + "\/Date(1608219900000+0300)\/", + "\/Date(1608220800000+0300)\/", + "\/Date(1608221700000+0300)\/", + "\/Date(1608222600000+0300)\/", + "\/Date(1608223500000+0300)\/", + "\/Date(1608361200000+0300)\/", + "\/Date(1608362100000+0300)\/", + "\/Date(1608363000000+0300)\/", + "\/Date(1608363900000+0300)\/", + "\/Date(1608364800000+0300)\/", + "\/Date(1608365700000+0300)\/", + "\/Date(1608366600000+0300)\/", + "\/Date(1608367500000+0300)\/", + "\/Date(1608368400000+0300)\/", + "\/Date(1608369300000+0300)\/", + "\/Date(1608370200000+0300)\/", + "\/Date(1608371100000+0300)\/", + "\/Date(1608372000000+0300)\/", + "\/Date(1608372900000+0300)\/", + "\/Date(1608373800000+0300)\/", + "\/Date(1608374700000+0300)\/", + "\/Date(1608472800000+0300)\/", + "\/Date(1608473700000+0300)\/", + "\/Date(1608474600000+0300)\/", + "\/Date(1608475500000+0300)\/", + "\/Date(1608476400000+0300)\/", + "\/Date(1608477300000+0300)\/", + "\/Date(1608478200000+0300)\/", + "\/Date(1608479100000+0300)\/", + "\/Date(1608480000000+0300)\/", + "\/Date(1608480900000+0300)\/", + "\/Date(1608481800000+0300)\/", + "\/Date(1608482700000+0300)\/", + "\/Date(1608483600000+0300)\/", + "\/Date(1608484500000+0300)\/", + "\/Date(1608485400000+0300)\/", + "\/Date(1608486300000+0300)\/", + "\/Date(1608559200000+0300)\/", + "\/Date(1608560100000+0300)\/", + "\/Date(1608561000000+0300)\/", + "\/Date(1608561900000+0300)\/", + "\/Date(1608562800000+0300)\/", + "\/Date(1608563700000+0300)\/", + "\/Date(1608564600000+0300)\/", + "\/Date(1608565500000+0300)\/", + "\/Date(1608566400000+0300)\/", + "\/Date(1608567300000+0300)\/", + "\/Date(1608568200000+0300)\/", + "\/Date(1608569100000+0300)\/", + "\/Date(1608570000000+0300)\/", + "\/Date(1608570900000+0300)\/", + "\/Date(1608571800000+0300)\/", + "\/Date(1608572700000+0300)\/", + "\/Date(1608645600000+0300)\/", + "\/Date(1608646500000+0300)\/", + "\/Date(1608647400000+0300)\/", + "\/Date(1608648300000+0300)\/", + "\/Date(1608649200000+0300)\/", + "\/Date(1608650100000+0300)\/", + "\/Date(1608651000000+0300)\/", + "\/Date(1608651900000+0300)\/", + "\/Date(1608652800000+0300)\/", + "\/Date(1608653700000+0300)\/", + "\/Date(1608654600000+0300)\/", + "\/Date(1608655500000+0300)\/", + "\/Date(1608656400000+0300)\/", + "\/Date(1608657300000+0300)\/", + "\/Date(1608658200000+0300)\/", + "\/Date(1608659100000+0300)\/", + "\/Date(1608732000000+0300)\/", + "\/Date(1608732900000+0300)\/", + "\/Date(1608733800000+0300)\/", + "\/Date(1608734700000+0300)\/", + "\/Date(1608735600000+0300)\/", + "\/Date(1608736500000+0300)\/", + "\/Date(1608737400000+0300)\/", + "\/Date(1608738300000+0300)\/", + "\/Date(1608739200000+0300)\/", + "\/Date(1608740100000+0300)\/", + "\/Date(1608741000000+0300)\/", + "\/Date(1608741900000+0300)\/", + "\/Date(1608742800000+0300)\/", + "\/Date(1608743700000+0300)\/", + "\/Date(1608744600000+0300)\/", + "\/Date(1608745500000+0300)\/", + "\/Date(1608814800000+0300)\/", + "\/Date(1608815700000+0300)\/", + "\/Date(1608816600000+0300)\/", + "\/Date(1608817500000+0300)\/", + "\/Date(1608818400000+0300)\/", + "\/Date(1608819300000+0300)\/", + "\/Date(1608820200000+0300)\/", + "\/Date(1608821100000+0300)\/", + "\/Date(1608822000000+0300)\/", + "\/Date(1608822900000+0300)\/", + "\/Date(1608823800000+0300)\/", + "\/Date(1608824700000+0300)\/", + "\/Date(1608825600000+0300)\/", + "\/Date(1608826500000+0300)\/", + "\/Date(1608827400000+0300)\/", + "\/Date(1608828300000+0300)\/", + "\/Date(1608966000000+0300)\/", + "\/Date(1608966900000+0300)\/", + "\/Date(1608967800000+0300)\/", + "\/Date(1608968700000+0300)\/", + "\/Date(1608969600000+0300)\/", + "\/Date(1608970500000+0300)\/", + "\/Date(1608971400000+0300)\/", + "\/Date(1608972300000+0300)\/", + "\/Date(1608973200000+0300)\/", + "\/Date(1608974100000+0300)\/", + "\/Date(1608975000000+0300)\/", + "\/Date(1608975900000+0300)\/", + "\/Date(1608976800000+0300)\/", + "\/Date(1608977700000+0300)\/", + "\/Date(1608978600000+0300)\/", + "\/Date(1608979500000+0300)\/", + "\/Date(1609077600000+0300)\/", + "\/Date(1609078500000+0300)\/", + "\/Date(1609079400000+0300)\/", + "\/Date(1609080300000+0300)\/", + "\/Date(1609081200000+0300)\/", + "\/Date(1609082100000+0300)\/", + "\/Date(1609083000000+0300)\/", + "\/Date(1609083900000+0300)\/", + "\/Date(1609084800000+0300)\/", + "\/Date(1609085700000+0300)\/", + "\/Date(1609086600000+0300)\/", + "\/Date(1609087500000+0300)\/", + "\/Date(1609088400000+0300)\/", + "\/Date(1609089300000+0300)\/", + "\/Date(1609090200000+0300)\/", + "\/Date(1609091100000+0300)\/", + "\/Date(1609164000000+0300)\/", + "\/Date(1609164900000+0300)\/", + "\/Date(1609165800000+0300)\/", + "\/Date(1609166700000+0300)\/", + "\/Date(1609167600000+0300)\/", + "\/Date(1609168500000+0300)\/", + "\/Date(1609169400000+0300)\/", + "\/Date(1609170300000+0300)\/", + "\/Date(1609171200000+0300)\/", + "\/Date(1609172100000+0300)\/", + "\/Date(1609173000000+0300)\/", + "\/Date(1609173900000+0300)\/", + "\/Date(1609174800000+0300)\/", + "\/Date(1609175700000+0300)\/", + "\/Date(1609176600000+0300)\/", + "\/Date(1609177500000+0300)\/", + "\/Date(1609250400000+0300)\/", + "\/Date(1609251300000+0300)\/", + "\/Date(1609252200000+0300)\/", + "\/Date(1609253100000+0300)\/", + "\/Date(1609254000000+0300)\/", + "\/Date(1609254900000+0300)\/", + "\/Date(1609255800000+0300)\/", + "\/Date(1609256700000+0300)\/", + "\/Date(1609257600000+0300)\/", + "\/Date(1609258500000+0300)\/", + "\/Date(1609259400000+0300)\/", + "\/Date(1609260300000+0300)\/", + "\/Date(1609261200000+0300)\/", + "\/Date(1609262100000+0300)\/", + "\/Date(1609263000000+0300)\/", + "\/Date(1609263900000+0300)\/", + "\/Date(1609336800000+0300)\/", + "\/Date(1609337700000+0300)\/", + "\/Date(1609338600000+0300)\/", + "\/Date(1609339500000+0300)\/", + "\/Date(1609340400000+0300)\/", + "\/Date(1609341300000+0300)\/", + "\/Date(1609342200000+0300)\/", + "\/Date(1609343100000+0300)\/", + "\/Date(1609344000000+0300)\/", + "\/Date(1609344900000+0300)\/", + "\/Date(1609345800000+0300)\/", + "\/Date(1609346700000+0300)\/", + "\/Date(1609347600000+0300)\/", + "\/Date(1609348500000+0300)\/", + "\/Date(1609349400000+0300)\/", + "\/Date(1609350300000+0300)\/", + "\/Date(1609419600000+0300)\/", + "\/Date(1609420500000+0300)\/", + "\/Date(1609421400000+0300)\/", + "\/Date(1609422300000+0300)\/", + "\/Date(1609423200000+0300)\/", + "\/Date(1609424100000+0300)\/", + "\/Date(1609425000000+0300)\/", + "\/Date(1609425900000+0300)\/", + "\/Date(1609426800000+0300)\/", + "\/Date(1609427700000+0300)\/", + "\/Date(1609428600000+0300)\/", + "\/Date(1609429500000+0300)\/", + "\/Date(1609430400000+0300)\/", + "\/Date(1609431300000+0300)\/", + "\/Date(1609432200000+0300)\/", + "\/Date(1609433100000+0300)\/" + ] +} \ No newline at end of file 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/assets/sounds/ring_30Sec.caf b/assets/sounds/ring_30Sec.caf new file mode 100644 index 00000000..b5bb4b88 Binary files /dev/null and b/assets/sounds/ring_30Sec.caf differ diff --git a/assets/sounds/ring_30Sec.mp3 b/assets/sounds/ring_30Sec.mp3 new file mode 100644 index 00000000..f647cca8 Binary files /dev/null and b/assets/sounds/ring_30Sec.mp3 differ diff --git a/assets/sounds/ring_60Sec.mp3 b/assets/sounds/ring_60Sec.mp3 new file mode 100644 index 00000000..ac32394e Binary files /dev/null and b/assets/sounds/ring_60Sec.mp3 differ diff --git a/assets/tracker/blood-pressure.png b/assets/tracker/blood-pressure.png new file mode 100644 index 00000000..7aca3763 Binary files /dev/null and b/assets/tracker/blood-pressure.png differ diff --git a/assets/tracker/blood-suger.png b/assets/tracker/blood-suger.png new file mode 100644 index 00000000..76b1e448 Binary files /dev/null and b/assets/tracker/blood-suger.png differ diff --git a/assets/tracker/weight.png b/assets/tracker/weight.png new file mode 100644 index 00000000..385fcb81 Binary files /dev/null and b/assets/tracker/weight.png differ diff --git a/encrypted_private_key_path b/encrypted_private_key_path new file mode 100644 index 00000000..50e125b3 Binary files /dev/null and b/encrypted_private_key_path differ diff --git a/encryption_public_key.pem b/encryption_public_key.pem new file mode 100644 index 00000000..f250df1a --- /dev/null +++ b/encryption_public_key.pem @@ -0,0 +1,11 @@ +-----BEGIN PUBLIC KEY----- +MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEApKqued5RaqBjKntLoVhj +rflB5NpGELhAftnKrXO+0lCQGm0huxWeb/KtSgniJpPQ1LXfhGKqjaZwu3zd2xsU +9D6i7Ie1QJvIJlxHwi/zKdBX7nSHx5phK+yRJF+Fnt5wieZ8bzT4Eqn31J6Cdahl +0sZDTjixl/fhM2G+E8gYNsWMihcWnMXejHdKT2yHG+rJXt4FvYYAuwIW/S75vSOM +L4CE4JS5D9UcYpNxU4Cv6KxiAAK/oQmzrrSoU9lJ6mp5wrwJDsBUgwOrXxYPct9N +FoqYgh54fs9xuh5fvHozst8wFY8Kf4hPVmOdPtcUlWQSbtRf0CehJ9yuftHmFxWX +yjyoa9X3MK7yHoZIAFXvbh1n+QUWGMNrCNIdqDtPEtjVBtSAGL5x+lxqfFMMRKJA +OfOtzjG1QDPP3EPrw/vfU2hCXZ75wlOoqEy6vmrVaYWJ5Apx0ftujtUxslSJ15Zz +CghYLtu/JolJT1Hxg5uOFpLaX3VoAs+y9e7+oRgPPVtHAgMBAAE= +-----END PUBLIC KEY----- diff --git a/google-services_DQ.json b/google-services_DQ.json new file mode 100644 index 00000000..a4655794 --- /dev/null +++ b/google-services_DQ.json @@ -0,0 +1,40 @@ +{ + "project_info": { + "project_number": "864393916058", + "firebase_url": "https://diplomaticquarter-d2385.firebaseio.com", + "project_id": "diplomaticquarter-d2385", + "storage_bucket": "diplomaticquarter-d2385.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:864393916058:android:5b5a65cd6d8c18b4b97923", + "android_client_info": { + "package_name": "com.cloud.diplomaticquarterapp" + } + }, + "oauth_client": [ + { + "client_id": "864393916058-tphjrn8j39ntevt32ekcvmll8aue7qql.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyBdV3mos1BPhUzNKCj2KANJtiO3o2zh9IM" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "864393916058-tphjrn8j39ntevt32ekcvmll8aue7qql.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/google-services_HMG.json b/google-services_HMG.json new file mode 100644 index 00000000..5806fa5f --- /dev/null +++ b/google-services_HMG.json @@ -0,0 +1,47 @@ +{ + "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": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "815750722565-0cq9366orvsk5ipivq6lijcj56u03fr7.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "com.void.demo" + } + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/google-services_HMG_old.json b/google-services_HMG_old.json new file mode 100644 index 00000000..dd4038cf --- /dev/null +++ b/google-services_HMG_old.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/google-services_old.json b/google-services_old.json new file mode 100644 index 00000000..5806fa5f --- /dev/null +++ b/google-services_old.json @@ -0,0 +1,47 @@ +{ + "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": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "815750722565-3a0gc7neins0eoahdrimrfksk0sqice8.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "815750722565-0cq9366orvsk5ipivq6lijcj56u03fr7.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "com.void.demo" + } + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/key b/key new file mode 100644 index 00000000..15b9f5d1 Binary files /dev/null and b/key differ diff --git a/key.properties b/key.properties new file mode 100644 index 00000000..eec491b8 --- /dev/null +++ b/key.properties @@ -0,0 +1,4 @@ +storePassword=HmGsa123 +keyPassword=HmGsa123 +keyAlias=key +storeFile=DQKey.jks \ No newline at end of file diff --git a/lib/Constants.dart b/lib/Constants.dart new file mode 100644 index 00000000..3cb69afd --- /dev/null +++ b/lib/Constants.dart @@ -0,0 +1,5 @@ +import 'package:flutter/material.dart'; + +final Color? secondaryColor = Colors.red[800]; + +final Color? dividerColor = Colors.grey[600]; \ No newline at end of file diff --git a/lib/analytics/analytic-events.dart b/lib/analytics/analytic-events.dart new file mode 100644 index 00000000..8f524173 --- /dev/null +++ b/lib/analytics/analytic-events.dart @@ -0,0 +1,72 @@ +import 'package:diplomaticquarterapp/uitl/utils.dart'; + +class _Event { + String? name; + String? description; + bool? active; + _Event(dynamic map) { + if (map != null) { + 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/flows/advance_payments.dart b/lib/analytics/flows/advance_payments.dart new file mode 100644 index 00000000..5d946766 --- /dev/null +++ b/lib/analytics/flows/advance_payments.dart @@ -0,0 +1,92 @@ +import 'package:flutter/cupertino.dart'; + +import '../google-analytics.dart'; + +class AdvancePayments{ + + final GALogger logger; + AdvancePayments(this.logger); + + // R038 + payment_services({required String service_type}){ + logger('payment_services', parameters: { + 'service_type' : service_type + }); + } + + // R039 + wallet_recharge({required String service_type}){ + logger('wallet_recharge', parameters: { + 'service_type' : service_type + }); + } + + // R040 + wallet_payment_details(){ + logger('wallet_payment_details'); + } + + // R041 + payment_method({required String method,type}){ + logger('payment_method', parameters: { + 'payment_method' : method, + 'payment_type' : type + }); + } + + // R042 + payment_confirm({required String method,type}){ + logger('payment_confirm', parameters: { + 'payment_method' : method, + 'payment_type' : type + }); + } + + // R043 + payment_otp_confirmation({required String method,type}){ + logger('payment_otp_confirmation', parameters: { + 'payment_method' : method, + 'payment_type' : type + }); + } + + // R044 + payment_confirm_card_details({required String method,type}){ + logger('payment_confirm_card_details', parameters: { + 'payment_method' : method, + 'payment_type' : type + }); + } + + // R045 + payment_pay({required String method,type}){ + logger('payment_pay', parameters: { + 'payment_method' : method, + 'payment_type' : type + }); + } + + // R046 + payment_success({required String hospital, payment_method, payment_type, txn_number, txn_amount, txn_currency}){ + logger('payment_success', parameters: { + 'payment_method' : payment_method, + 'payment_type' : payment_type, + 'hospital_name' : hospital, + 'transaction_number' : txn_number, + 'transaction_amount' : txn_amount, + 'transaction_currency' : txn_currency + }); + } + + payment_fail({required String hospital, payment_method, payment_type, txn_amount, txn_currency, error_type}){ + logger('payment_fail', parameters: { + 'payment_method' : payment_method, + 'payment_type' : payment_type, + 'hospital_name' : hospital, + 'transaction_amount' : txn_amount, + 'transaction_currency' : txn_currency, + 'error_type' : error_type + }); + } + +} \ No newline at end of file diff --git a/lib/analytics/flows/app_nav.dart b/lib/analytics/flows/app_nav.dart new file mode 100644 index 00000000..cc1d8f98 --- /dev/null +++ b/lib/analytics/flows/app_nav.dart @@ -0,0 +1,30 @@ +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; + +class AppNav{ + final name = 'app_nav'; + final GALogger logger; + AppNav(this.logger); + + logNavName(String value){ + logger(name, parameters: { + 'nav_name' : value + }); + } + + log({int? tabIndex, bool? isLoggedIn}){ + var nav_name = ""; + if(tabIndex == 1) + nav_name = "medical file"; + if(tabIndex == 3) + nav_name = "my family"; + if(tabIndex == 4) + nav_name = "todo list"; + if(tabIndex == 5) + nav_name = "help"; + + if(nav_name.isNotEmpty) + logger(name, parameters: { + 'nav_name' : nav_name + }); + } +} \ No newline at end of file diff --git a/lib/analytics/flows/appointments.dart b/lib/analytics/flows/appointments.dart new file mode 100644 index 00000000..594c9179 --- /dev/null +++ b/lib/analytics/flows/appointments.dart @@ -0,0 +1,273 @@ +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; + +import '../google-analytics.dart'; + +class Appointment { + final GALogger logger; + + Appointment(this.logger); + + // R015 + book_appointment() { + logger('book_appointment'); + } + + // R016.1, R017.2 + book_appointment_by_clinic() { + logger('book_appointment_by_clinic'); + } + + // R016.2, R018.2 + book_appointment_by_doctor() { + logger('book_appointment_by_doctor'); + } + + // R017.1 + book_appointment_doctor_search({required String query}) { + // doctor_search_query : value + logger('book_appointment_doctor_search', parameters: {'doctor_search_query': query}); + } + + // R018.1 + book_appointment_select_clinic({required String appointment_type, clinic}) { + // appointment_type: regular | livecare + // clinic_type : $clinic_type + logger('book_appointment_select_clinic', parameters: {'appointment_type': appointment_type, 'clinic_type': clinic}); + } + + // R019.1 + book_appointment_livecare_accept() { + logger('book_appointment_livecare_accept'); + } + + // R019.2 + book_appointment_livecare_decline() { + logger('book_appointment_livecare_decline'); + } + + // R020 + book_appointment_chief_complaints({ + required String appointment_type, + ListClinicCentralized? clinic, + HospitalsModel? hospital, + ListDentalChiefComplain? treatment, + }) { + GAnalytics.TREATMENT_TYPE = treatment!.name; + logger('book_appointment_chief_complaints', parameters: { + 'appointment_type': appointment_type, + 'clinic_type': clinic!.clinicDescription, + 'hospital_name':hospital!=null ? hospital!.name :"", + 'treatment_type': treatment.name, + }); + } + + // R021 + book_appointment_select_doctor({required String appointment_type, required DoctorList doctor}) { + // appointment_type, clinic_type, hospital_name, treatment_type, doctor_name, doctor_nationality, doctor_gender + logger('book_appointment_select_doctor', parameters: { + 'appointment_type': appointment_type, + 'clinic_type': doctor.clinicName, + 'hospital_name': doctor.projectName, + 'treatment_type': GAnalytics.TREATMENT_TYPE ?? '', + 'doctor_name': doctor.name, + 'doctor_nationality': doctor.nationalityName, + 'doctor_gender': doctor.genderDescription, + }); + } + + // R022 + book_appointment_schedule({required String appointment_type, required DoctorList doctor}) { + // appointment_type, clinic_type, hospital_name, treatment_type, doctor_name, doctor_nationality, doctor_gender + logger('book_appointment_schedule', parameters: { + 'appointment_type': appointment_type, + 'clinic_type': doctor.clinicName, + 'hospital_name': doctor.projectName, + 'treatment_type': GAnalytics.TREATMENT_TYPE ?? '', + 'doctor_name': doctor.name, + 'doctor_nationality': doctor.nationalityName, + 'doctor_gender': doctor.genderDescription, + }); + } + + // R023 + book_appointment_date_selection({required String appointment_type, required day, required DoctorList doctor}) { + logger('book_appointment_date_selection', parameters: { + 'appointment_type': appointment_type, + 'clinic_type': doctor.clinicName, + 'hospital_name': doctor.projectName, + 'treatment_type': GAnalytics.TREATMENT_TYPE ?? '', + 'doctor_name': doctor.name, + 'doctor_nationality': doctor.nationalityName, + 'doctor_gender': doctor.genderDescription, + 'appointment_day': day + }); + } + + // R024.1 + book_appointment_time_selection({required String appointment_type, required DateTime? dateTime, required DoctorList doctor}) { + final day = DateUtil.getWeekDay(dateTime!.weekday); + final hour = DateFormat('HH').format(dateTime); + logger('book_appointment_time_selection', parameters: { + 'appointment_type': appointment_type, + 'clinic_type': doctor.clinicName, + 'hospital_name': doctor.projectName, + 'treatment_type': GAnalytics.TREATMENT_TYPE ?? '', + 'doctor_name': doctor.name, + 'doctor_nationality': doctor.nationalityName, + 'doctor_gender': doctor.genderDescription, + 'appointment_day': day, + 'appointment_hour': hour + }); + } + + // R024.2 + book_appointment_review({required String appointment_type, required DateTime dateTime, required DoctorList doctor}) { + final day = DateUtil.getWeekDay(dateTime.weekday); + final hour = DateFormat('HH').format(dateTime); + logger('book_appointment_review', parameters: { + 'appointment_type': appointment_type, + 'clinic_type': doctor.clinicName, + 'hospital_name': doctor.projectName, + 'treatment_type': GAnalytics.TREATMENT_TYPE ?? '', + 'doctor_name': doctor.name, + 'doctor_nationality': doctor.nationalityName, + 'doctor_gender': doctor.genderDescription, + 'appointment_day': day, + 'appointment_hour': hour + }); + } + + // R025 + book_appointment_click_confirm({required String appointment_type, required DateTime dateTime, required DoctorList doctor}) { + final day = DateUtil.getWeekDay(dateTime.weekday); + final hour = DateFormat('HH').format(dateTime); + logger('book_appointment_click_confirm', parameters: { + 'appointment_type': appointment_type, + 'clinic_type': doctor.clinicName, + 'hospital_name': doctor.projectName, + 'treatment_type': GAnalytics.TREATMENT_TYPE ?? '', + 'doctor_name': doctor.name, + 'doctor_nationality': doctor.nationalityName, + 'doctor_gender': doctor.genderDescription, + 'appointment_day': day, + 'appointment_hour': hour // '5-6' + }); + } + + // R026 + book_appointment_confirmation_success({required String appointment_type, required DateTime dateTime, required DoctorList doctor}) { + final day = DateUtil.getWeekDay(dateTime.weekday); + final hour = DateFormat('HH').format(dateTime); + logger('book_appointment_confirmation_success', parameters: { + 'appointment_type': appointment_type, + 'clinic_type': doctor.clinicName, + 'hospital_name': doctor.projectName, + 'treatment_type': GAnalytics.TREATMENT_TYPE ?? '', + 'doctor_name': doctor.name, + 'doctor_nationality': doctor.nationalityName, + 'doctor_gender': doctor.genderDescription, + 'appointment_day': day, + 'appointment_hour': hour + }); + } + + // R049.1 // should be for appointment flow + appointment_actions(AppoitmentAllHistoryResultList appointment, String action) { + logger('appointment_actions', parameters: { + 'action_type': action, + 'flow_type': GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE, + 'appointment_type': appointment.appointmentType, + 'clinic_type_online': appointment.clinicName, + 'hospital_name': appointment.projectName, + 'doctor_name': (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, + 'payment_type': 'appointment', + }); + } + + // R027 + appointment_reminder(bool value) { + logger('appointment_reminder', parameters: {'reminder': value ? 'yes' : 'no'}); + } + + // R028 + appointment_reminder_time({required String reminde_before}) { + logger('appointment_reminder_time', parameters: {'reminder_before': reminde_before}); + } + + // R053 + // Note : - Payment flow beyond this step are same as listed under ‘Advance Payment’ section of this document + pay_now_for_appointment({required String appointment_type, required DoctorList doctorDetail, bool payNow = true}) { + logger('pay_now_for_appointment', parameters: { + 'appointment_type': appointment_type, + 'clinic_type': doctorDetail.clinicName, + 'hospital_name': doctorDetail.projectName, + 'doctor_name': doctorDetail.name, + 'payment_type': 'appointment' + }); + } + + // R033 + payment_method({required String appointment_type, clinic, payment_method, payment_type}) { + logger('payment_method', parameters: {'appointment_type': appointment_type, 'clinic_type': clinic, 'payment_method': payment_method, 'payment_type': payment_type}); + } + + // R036 + payment_success({required String appointment_type, clinic, hospital, payment_method, payment_type, txn_number, txn_amount, txn_currency}) { + logger('payment_success', parameters: { + 'appointment_type': appointment_type, + 'payment_method': payment_method, + 'payment_type': payment_type, + 'hospital_name': hospital, + 'clinic_type_online': clinic, + 'transaction_number': txn_number, + 'transaction_amount': txn_amount, + 'transaction_currency': txn_currency, + }); + } + + payment_fail({required String appointment_type, clinic, hospital, payment_method, payment_type, txn_amount, txn_currency, error_type}) { + logger('payment_fail', parameters: { + 'appointment_type': appointment_type, + 'payment_method': payment_method, + 'payment_type': payment_type, + 'hospital_name': hospital, + 'clinic_type_online': clinic, + 'transaction_amount': txn_amount, + 'transaction_currency': txn_currency, + 'error_type': error_type + }); + } + + // Note : - Payment flow beyond this step are same as listed under ‘Advance Payment’ section of this document + appointment_detail_action({required AppoitmentAllHistoryResultList appointment, required String action}) { + logger('appointment_detail_action', parameters: { + 'action_type': action, + 'flow_type': GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE, + }); + } + + // Note : - Payment flow beyond this step are same as listed under ‘Advance Payment’ section of this document + appointment_details_confirm({required AppoitmentAllHistoryResultList appointment}) { + logger('appointment_details_confirm', parameters: {}); + } + + // R053 + // Note : - Payment flow beyond this step are same as listed under ‘Advance Payment’ section of this document + appointment_details_cancel({required AppoitmentAllHistoryResultList appointment, appointment_type}) { + logger('cancel_appointment', parameters: { + 'flow_type': GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE, + 'appointment_type': appointment_type, + 'clinic_type_online': appointment.clinicName, + 'hospital_name': appointment.projectName, + 'doctor_name': (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName + }); + } +} diff --git a/lib/analytics/flows/error_tracking.dart b/lib/analytics/flows/error_tracking.dart new file mode 100644 index 00000000..17258b39 --- /dev/null +++ b/lib/analytics/flows/error_tracking.dart @@ -0,0 +1,15 @@ +import '../google-analytics.dart'; + +class ErrorTracking{ + + final GALogger logger; + ErrorTracking(this.logger); + + log(String type, {String? error}){ + logger('errors', parameters: { + 'error_type' : type ?? 'unknown', + 'error' : error ?? 'unknown', + }); + } + +} \ No newline at end of file diff --git a/lib/analytics/flows/hamburger_menu.dart b/lib/analytics/flows/hamburger_menu.dart new file mode 100644 index 00000000..404cdbcf --- /dev/null +++ b/lib/analytics/flows/hamburger_menu.dart @@ -0,0 +1,15 @@ +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; + +class HamburgerMenu{ + final hamburger_menu = 'hamburger_menu'; + + final GALogger logger; + HamburgerMenu(this.logger); + + logMenuItemClick(String value){ + logger(hamburger_menu, parameters: { + 'menu_item' : value + }); + } + +} \ No newline at end of file diff --git a/lib/analytics/flows/hmg_services.dart b/lib/analytics/flows/hmg_services.dart new file mode 100644 index 00000000..cd771c1f --- /dev/null +++ b/lib/analytics/flows/hmg_services.dart @@ -0,0 +1,18 @@ +import '../google-analytics.dart'; + +class HMGServices{ + final hmg_services = 'hmg_services'; + + final GALogger logger; + HMGServices(this.logger); + logServiceName(String value){ + logger('hmg_services', parameters: { + 'services_name' : value + }); + } + viewAll(){ + logger('hmg_services', parameters: { + 'services_name' : 'view all services' + }); + } +} \ No newline at end of file diff --git a/lib/analytics/flows/live_care.dart b/lib/analytics/flows/live_care.dart new file mode 100644 index 00000000..ca496e53 --- /dev/null +++ b/lib/analytics/flows/live_care.dart @@ -0,0 +1,103 @@ +import 'package:flutter/cupertino.dart'; + +import '../google-analytics.dart'; + +class LiveCare{ + + final GALogger logger; + LiveCare(this.logger); + + // R030.1 + livecare_immediate_consultation(){ + logger('livecare_immediate_consultation'); + } + + // R030.2 + livecare_schedule_video_call(){ + logger('livecare_schedule_video_call'); + } + + // R031.1 + livecare_clinic_schedule({required String clinic}){ + logger('livecare_clinic_schedule', parameters: { + 'clinic_type_online' : clinic + }); + } + + // R031.2 + livecare_immediate_consultation_clinic({required String clinic}){ + logger('livecare_immediate_consultation_clinic', parameters: { + 'clinic_type_online' : clinic + }); + } + + // R031.2 + livecare_schedule_video_call_clinic({required String clinic}){ + logger('livecare_schedule_video_call_clinic', parameters: { + 'clinic_type_online' : clinic + }); + } + + // R032 + livecare_immediate_consultation_TnC({required String clinic}){ + logger('livecare_immediate_consultation_tandc', parameters: { + 'clinic_type_online' : clinic + }); + } + + // R033 + payment_method({required String appointment_type, clinic, payment_method, payment_type}){ + logger('payment_method', parameters: { + 'appointment_type' : appointment_type, + 'clinic_type_online' : clinic, + 'payment_method' : payment_method, + 'payment_type' : payment_type + }); + } + + // R034 + payment_confirm({required String appointment_type, clinic, payment_method, payment_type}){ + logger('payment_confirm', parameters: { + 'appointment_type' : appointment_type, + 'clinic_type_online' : clinic, + 'payment_method' : payment_method, + 'payment_type' : payment_type + }); + } + + // R035 + payment_pay({required String appointment_type, clinic, hospital, payment_method, payment_type}){ + // logger('payment_pay', parameters: { + // 'appointment_type' : appointment_type, + // 'clinic_type_online' : clinic, + // 'payment_method' : payment_method, + // 'payment_type' : payment_type, + // 'hospital_name' : hospital + // }); + } + + // R036 + payment_success({required String appointment_type, clinic, hospital, payment_method, payment_type, txn_number, txn_amount, txn_currency}){ + // appointment_type + // clinic_type_online + // payment_method + // payment_type + // hospital_name + // transaction_number + // transaction_amount + // transaction_currency + } + + // R037 + livecare_immediate_consultation_payment_failed({required String appointment_type, clinic, payment_method, payment_type, txn_amount, txn_currency, error_message}){ + logger('livecare_immediate_consult_payment_fail', parameters: { + 'payment_method' : payment_method, + 'appointment_type' : appointment_type, + 'payment_type' : payment_type, + 'clinic_type_online' : clinic, + 'transaction_amount' : txn_amount, + 'transaction_currency' : txn_currency, + 'error_type' : error_message + }); + } +} \ No newline at end of file diff --git a/lib/analytics/flows/login_registration.dart b/lib/analytics/flows/login_registration.dart new file mode 100644 index 00000000..eb02d253 --- /dev/null +++ b/lib/analytics/flows/login_registration.dart @@ -0,0 +1,157 @@ +import 'package:flutter/cupertino.dart'; + +import '../google-analytics.dart'; + +class LoginRegistration{ + static int loginMethod = 0; + static int verificationMethod = 0; + + final GALogger logger; + LoginRegistration(this.logger); + // R004.1 + login_register_initiate(){ + logger('login_register_initiate'); + } + + // R005.1 + visited_alhabib_group(bool value){ + // selection_type: yes/no + logger('visited_alhabib_group', parameters: { + 'selection_type' : value ? 'yes' : 'no' + }); + } + + // R006.1, R007.1, R008.1, R009.1 + registration_cancel({required String step}){ + // registration_step : enter details + // registration_step : personal info + // registration_step : patient info + // fourth (verification) + logger('registration_cancel', parameters: { + 'registration_step' : step + }); + } + + // R006.2 + registration_enter_details(){ + logger('registration_enter_details'); + } + + // R007.2 + registration_personal_info(){ + logger('registration_personal_info'); + } + + // R008.2 + registration_patient_info(){ + logger('registration_patient_info'); + } + + // R009.2 + registration_verification_option(){ + logger('registration_verification_option'); + } + + // R010:registration_confirmation + registration_confirmation(){ + // verification_method: by + logger('registration_confirmation'); + } + + registration_fail({required String errorType}){ + // verification_method: by + logger('registration_fail', parameters: { + 'error_type' : errorType + }); + } + + // R011.1 + login_start({required String method}){ + logger('login_start', parameters: { + 'login_method' : method + }); + } + + // R011:login_verify_otp | R009:registration_verification_option + verify_otp_method({bool forRegistration = false}){ + if(forRegistration == false) + logger("login_verify_otp", parameters: { + 'login_method' : _getLoginMethod(), + 'verification_method' : _getVerificationMethod(), + }); + else + logger("registration_verification_option", parameters: { + 'verification_method' : _getVerificationMethod() + }); + } + + // R011:login_verify_otp | R009:registration_verification_option + login_verfication({bool forRegistration = false}){ + if(forRegistration == false) + logger("login_verfication", parameters: { + 'login_method' : _getLoginMethod(), + 'verification_method' : _getVerificationMethod(), + }); + else + logger("login_varification_register", parameters: { + 'login_method' : _getLoginMethod(), + 'verification_method' : _getVerificationMethod(), + }); + } + + // R011.2 + forget_file_number(){ + logger('forget_file_number'); + } + + // R011.3 + register_now(){ + logger('register_now'); + } + + // R012.1, R014.1 + login_successful(){ + logger('login_successful', parameters: { + 'login_method' : _getVerificationMethod() + }); + } + + // R012.4 + login_unsuccessful({required String method, error}){ + logger('login_unsuccessful', parameters: { + 'login_method' : method + }); + } + + login_fail({error}){ + logger('login_unsuccessful', parameters: { + 'login_method' : loginMethod, + 'error': error + }); + } + + // R013 + recover_file_number(){ + logger('recover_file_number'); + } + + // R014.2 + login_with_other_account(){ + logger('login_with_other_account'); + } + + + _getLoginMethod(){ + if(loginMethod == 1) return 'national id'; + if(loginMethod == 2) return 'file number'; + return 'otp'; + } + + String _getVerificationMethod(){ + if(verificationMethod == 1) return 'sms'; + if(verificationMethod == 2) return 'fingerprint'; + if(verificationMethod == 3) return 'face id'; + if(verificationMethod == 4) return 'whatsapp'; + return "unknown"; + } +} \ No newline at end of file diff --git a/lib/analytics/flows/offers_promotions.dart b/lib/analytics/flows/offers_promotions.dart new file mode 100644 index 00000000..17a6232c --- /dev/null +++ b/lib/analytics/flows/offers_promotions.dart @@ -0,0 +1,16 @@ +import '../google-analytics.dart'; + +class OfferAndPromotion{ + + final GALogger logger; + OfferAndPromotion(this.logger); + + final offers_and_promotion = 'offers_&_promotion'; + + log(){ + logger('offers_and_promotion', parameters: { + 'promotion_name' : "offer" + }); + } + +} \ No newline at end of file diff --git a/lib/analytics/flows/todo_list.dart b/lib/analytics/flows/todo_list.dart new file mode 100644 index 00000000..a3ff21f2 --- /dev/null +++ b/lib/analytics/flows/todo_list.dart @@ -0,0 +1,111 @@ +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; + +import '../google-analytics.dart'; + +class TodoList{ + + final GALogger logger; + TodoList(this.logger); + + // R047.1 + to_do_list_pay_now(AppoitmentAllHistoryResultList appointment){ + logger('to_do_list_pay_now', parameters: { + 'appointment_type' : appointment.isLiveCareAppointment! ? 'livecare' : 'regular', + 'clinic_type_online' : appointment.clinicName, + 'hospital_name' : appointment.projectName, + 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, + 'payment_type' : 'appointment', + }); + } + + // R047.2 + to_do_list_more_details(AppoitmentAllHistoryResultList appointment){ + logger('to_do_list_more_details', parameters: { + 'appointment_type' : appointment.isLiveCareAppointment! ? 'livecare' : 'regular', + 'clinic_type_online' : appointment.clinicName, + 'hospital_name' : appointment.projectName, + 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, + 'payment_type' : 'appointment', + }); + } + + // R048 + to_do_list_confirm_payment_details(AppoitmentAllHistoryResultList appointment){ + logger('to_do_list_confirm_payment_details', parameters: { + 'appointment_type' : appointment.isLiveCareAppointment! ? 'livecare' : 'regular', + 'clinic_type_online' : appointment.clinicName, + 'hospital_name' : appointment.projectName, + 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, + 'payment_type' : 'appointment', + }); + } + + // R048 + to_do_list_cancel_payment_details(AppoitmentAllHistoryResultList appointment){ + logger('to_do_list_cancel_payment_details', parameters: { + 'appointment_type' : appointment.isLiveCareAppointment! ? 'livecare' : 'regular', + 'clinic_type_online' : appointment.clinicName, + 'hospital_name' : appointment.projectName, + 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, + 'payment_type' : 'appointment', + }); + } + + + + // R049.2 + to_do_list_cancel_appointment(AppoitmentAllHistoryResultList appointment){ + logger('to_do_list_cancel_appointment', parameters: { + 'appointment_type' : appointment.isLiveCareAppointment! ? 'livecare' : 'regular', + 'clinic_type_online' : appointment.clinicName, + 'hospital_name' : appointment.projectName, + 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, + 'payment_type' : 'appointment', + }); + } + + // R049.3 + to_do_list_confirm_appointment(AppoitmentAllHistoryResultList appointment){ + logger('confirm_appointment', parameters: { + 'appointment_type' : appointment.isLiveCareAppointment! ? 'livecare' : 'regular', + 'flow_type' : 'todo list', + 'clinic_type_online' : appointment.clinicName, + 'hospital_name' : appointment.projectName, + 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, + 'payment_type' : 'appointment', + }); + } + + // R050 + to_do_list_check_in(AppoitmentAllHistoryResultList appointment){ + logger('to_do_list_check_in', parameters: { + 'appointment_type' : appointment.isLiveCareAppointment! ? 'livecare' : 'regular', + 'clinic_type_online' : appointment.clinicName, + 'hospital_name' : appointment.projectName, + 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, + 'payment_type' : 'appointment', + }); + } + + // R051 + to_do_list_nfc(AppoitmentAllHistoryResultList appointment){ + logger('to_do_list_nfc', parameters: { + 'appointment_type' : appointment.isLiveCareAppointment! ? 'livecare' : 'regular', + 'clinic_type_online' : appointment.clinicName, + 'hospital_name' : appointment.projectName, + 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, + 'payment_type' : 'appointment', + }); + } + + // R052 + to_do_list_nfc_cancel(AppoitmentAllHistoryResultList appointment){ + logger('to_do_list_nfc_cancel', parameters: { + 'appointment_type' : appointment.isLiveCareAppointment != null ? appointment.isLiveCareAppointment! ? 'livecare' : 'regular' : 'regular', + 'clinic_type_online' : appointment.clinicName, + 'hospital_name' : appointment.projectName, + 'doctor_name' : (appointment.doctorName == null || appointment.doctorName == '') ? appointment.doctorNameObj : appointment.doctorName, + 'payment_type' : 'appointment', + }); + } +} \ No newline at end of file diff --git a/lib/analytics/google-analytics.dart b/lib/analytics/google-analytics.dart new file mode 100644 index 00000000..46ae7f80 --- /dev/null +++ b/lib/analytics/google-analytics.dart @@ -0,0 +1,145 @@ +import 'package:diplomaticquarterapp/analytics/analytic-events.dart'; +import 'package:diplomaticquarterapp/analytics/flows/advance_payments.dart'; +import 'package:diplomaticquarterapp/analytics/flows/appointments.dart'; +import 'package:diplomaticquarterapp/analytics/flows/error_tracking.dart'; +import 'package:diplomaticquarterapp/analytics/flows/hamburger_menu.dart'; +import 'package:diplomaticquarterapp/analytics/flows/live_care.dart'; +import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart'; +import 'package:diplomaticquarterapp/analytics/flows/offers_promotions.dart'; +import 'package:diplomaticquarterapp/analytics/flows/todo_list.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:diplomaticquarterapp/uitl/utils.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'; +import 'package:geocoding/geocoding.dart'; +import 'package:geolocator/geolocator.dart'; + +import 'flows/app_nav.dart'; +import 'flows/hmg_services.dart'; + +typedef GALogger = Function(String name, {Map parameters}); + +var _analytics = FirebaseAnalytics.instance; + +_logger(String name, {Map? parameters}) async { + // return; + if (name != null && name.isNotEmpty) { + if (name.contains(' ')) name = name.replaceAll(' ', '_'); + + // To LowerCase + if (parameters != null && parameters.isNotEmpty) + parameters = parameters.map((key, value) { + final key_ = key.toLowerCase(); + var value_ = value; + if (value is String) value_ = value.toLowerCase(); + return MapEntry(key_, value_); + }); + + try { + _analytics.logEvent(name: name.trim().toLowerCase(), parameters: parameters).then((value) { + // debugPrint('SUCCESS: Google analytics event "$name" sent with parameters $parameters'); + }).catchError((error) { + // debugPrint('ERROR: Google analytics event "$name" sent failed'); + }); + } catch (e) { + print(e); + } + } +} + +class GAnalytics { + static String? TREATMENT_TYPE; + static String? APPOINTMENT_DETAIL_FLOW_TYPE; + static String? PAYMENT_TYPE; + + setUser(AuthenticatedUser user) async { + try { + _analytics.setUserProperty(name: 'user_language', value: user.preferredLanguage == '1' ? 'arabic' : 'english'); + _analytics.setUserProperty(name: 'userid', value: Utils.generateMd5Hash(user.emailAddress!)); + _analytics.setUserProperty(name: 'login_status', value: user == null ? 'guest' : 'loggedin'); + if (await PermissionService.isLocationEnabled()) { + final location = await Geolocator.getCurrentPosition(); + if (location != null && !location.isMocked) { + final places = await placemarkFromCoordinates(location.latitude, location.longitude,); + final countryCode = places.first.isoCountryCode; + _analytics.setUserProperty(name: 'user_country', value: countryCode); + } + } else { + _analytics.setUserProperty(name: 'user_country', value: "N/A"); + } + } catch (e) {} + } + + NavObserver navObserver() => NavObserver(); + final hamburgerMenu = HamburgerMenu(_logger); + final bottomTabNavigation = AppNav(_logger); + final hmgServices = HMGServices(_logger); + final loginRegistration = LoginRegistration(_logger); + final appointment = Appointment(_logger); + final liveCare = LiveCare(_logger); + final todoList = TodoList(_logger); + final advancePayments = AdvancePayments(_logger); + final offerPackages = OfferAndPromotion(_logger); + final errorTracking = ErrorTracking(_logger); +} + +// 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 != null) { + _analytics.setCurrentScreen(screenName: event.flutterName(), screenClassOverride: className).catchError( + (Object error) { + print('$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(route.subtreeContext!); + 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); + // } + } +} diff --git a/lib/app_state/app_state.dart b/lib/app_state/app_state.dart new file mode 100644 index 00000000..0fd54e74 --- /dev/null +++ b/lib/app_state/app_state.dart @@ -0,0 +1,13 @@ +class AppState { + static final AppState _instance = AppState._internal(); + + AppState._internal(); + + factory AppState() => _instance; + + bool isLogged = false; + + set setLogged(v) => isLogged = v; + + bool get getIsLogged => isLogged; +} diff --git a/lib/config/config.dart b/lib/config/config.dart new file mode 100644 index 00000000..8d75daae --- /dev/null +++ b/lib/config/config.dart @@ -0,0 +1,735 @@ +import 'dart:io'; + +import 'package:amazon_payfort/amazon_payfort.dart'; +import 'package:diplomaticquarterapp/models/Request.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; + +var MAX_SMALL_SCREEN = 660; +final OPENTOK_API_KEY = '46209962'; +// final OPENTOK_API_KEY = '47464241'; + +// PACKAGES and OFFERS +var EXA_CART_API_BASE_URL = 'https://mdlaboratories.com/offersdiscounts'; +// var EXA_CART_API_BASE_URL = 'http://10.200.101.75:9000'; +var PACKAGES_CATEGORIES = '/api/categories'; +var PACKAGES_STORES = '/api/stores'; +var PACKAGES_TOKEN = '/api/token'; +var PACKAGES_PRODUCTS = '/api/products'; +var PACKAGES_CUSTOMER = '/api/customers'; +var PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; +var PACKAGES_ORDERS = '/api/orders'; +var PACKAGES_ORDER_HISTORY = '/api/orders/items'; +var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; + // var BASE_URL = 'http://10.50.100.198:2018/'; + // var BASE_URL = 'https://uat.hmgwebservices.com/'; +var BASE_URL = 'https://hmgwebservices.com/'; +// var BASE_URL = 'http://10.201.204.103/'; +// var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; +// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; +// var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/'; + +// var BASE_URL = 'https://webservices.hmg.com/'; + +// var BASE_URL = 'http://10.50.100.198:4422/'; + +// Pharmacy UAT URLs +// var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; +// var PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; + +// // Pharmacy Production URLs +var BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; +var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; + +var PHARMACY_REDIRECT_URL = 'https://bit.ly/AlhabibPharmacy'; + +// Pharmacy VidaPlus URLs +// var BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapitest/api/'; +// var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapitest/api/'; + +// // Pharmacy Pre-Production URLs +// var BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapitest/api/'; +// var PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapitest/api/'; + +// RC API URL +var RC_BASE_URL = 'https://rc.hmg.com/'; + +// var RC_BASE_URL = 'https://rc.hmg.com/test/'; + +// var RC_BASE_URL = 'https://ms.hmg.com/rc/'; + +var PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; + +var GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; + +///Geofencing +var GET_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_GetAllPoints'; +var LOG_GEO_ZONES = 'Services/Patients.svc/REST/GeoF_InsertPatientFileInfo'; + +// Delivery Driver +var DRIVER_LOCATION = 'Services/Patients.svc/REST/PatientER_GetDriverLocation'; + +//weather +var WEATHER_INDICATOR = 'Services/Weather.svc/REST/GetCityInfo'; + +var GET_PRIVILEGE = 'Services/Patients.svc/REST/Service_Privilege'; + +// Wifi Credentials +var WIFI_CREDENTIALS = "Services/Patients.svc/Hmg_SMS_Get_By_ProjectID_And_PatientID"; + +///Doctor +var GET_MY_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; +var GET_DOCTOR_PROFILE = 'Services/Doctors.svc/REST/GetDocProfiles'; +var GET_DOCTOR_PRE_POST_IMAGES = 'Services/Doctors.svc/REST/GetDoctorPrePostImages'; +var GET_DOCTOR_RATING_NOTES = 'Services/Doctors.svc/REST/dr_GetNotesDoctorRating'; +var GET_DOCTOR_RATING_DETAILS = 'Services/Doctors.svc/REST/dr_GetDoctorRatingDetails'; + +var GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; + +///Prescriptions +// var PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; +var PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async'; + +var GET_PRESCRIPTIONS_ALL_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +var GET_PRESCRIPTION_REPORT = 'Services/Patients.svc/REST/INP_GetPrescriptionReport'; +var SEND_PRESCRIPTION_EMAIL = 'Services/Notifications.svc/REST/SendPrescriptionEmail'; +var GET_PRESCRIPTION_REPORT_ENH = 'Services/Patients.svc/REST/GetPrescriptionReport_enh'; + +///Lab Order +var GET_Patient_LAB_ORDERS = 'Services/Patients.svc/REST/GetPatientLabOrders'; +var GET_Patient_LAB_SPECIAL_RESULT = 'Services/Patients.svc/REST/GetPatientLabSpecialResults'; +var SEND_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmail'; +var GET_Patient_LAB_RESULT = 'Services/Patients.svc/REST/GetPatientLabResults'; +var GET_Patient_LAB_ORDERS_RESULT = 'Services/Patients.svc/REST/GetPatientLabOrdersResults'; +var SEND_COVID_LAB_RESULT_EMAIL = 'Services/Notifications.svc/REST/GenerateCOVIDReport'; +var COVID_PASSPORT_UPDATE = 'Services/Patients.svc/REST/Covid19_Certificate_PassportUpdate'; +var GET_PATIENT_PASSPORT_NUMBER = 'Services/Patients.svc/REST/Covid19_Certificate_GetPassport'; +var SEND_LAB_RESULT_EMAIL_NEW = 'ReportsAPI/api/reports/labReport'; + +var UPDATE_WORKPLACE_NAME = 'Services/Patients.svc/REST/ActivateSickLeave_FromVida'; +var GET_SICKLEAVE_STATUS_ADMISSION_NO = 'Services/ChatBot_Service.svc/REST/GetSickLeaveStatusByAdmissionNo'; + +/// +var GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders'; +var GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo'; + +var GET_PATIENT_ORDERS_DETAILS = 'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead'; +var GET_RAD_IMAGE_URL = 'Services/Patients.svc/Rest/GetRadImageURL'; +var SEND_RAD_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendRadReportEmail'; + +///Feedback +var SEND_FEEDBACK = 'Services/COCWS.svc/REST/InsertCOCItemInSPList'; +var GET_STATUS_FOR_COCO = 'Services/COCWS.svc/REST/GetStatusforCOC'; +// var GET_PATIENT_AppointmentHistory = 'Services' +// '/Doctors.svc/REST/PateintHasAppoimentHistory'; + +var GET_PATIENT_AppointmentHistory = 'Services' + '/Doctors.svc/REST/PateintHasAppoimentHistory_Async'; + +///VITAL SIGN +var GET_PATIENT_VITAL_SIGN = 'Services/Doctors.svc/REST/Doctor_GetPatientVitalSign'; + +///Er Nearest +var GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; + +///ED Online +var ER_GET_VISUAL_TRIAGE_QUESTIONS = "services/Doctors.svc/REST/ER_GetVisualTriageQuestions"; +var ER_SAVE_TRIAGE_INFORMATION = "services/Doctors.svc/REST/ER_SaveTriageInformation"; +var ER_GetPatientPaymentInformationForERClinic = "services/Doctors.svc/REST/ER_GetPatientPaymentInformationForERClinic"; + +///Er Nearest +var GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; +var GET_PATIENT_ALL_PRES_ORDERS = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +var GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; +var UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; +var INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; + +/// ER RRT +var GET_ALL_RC_TRANSPORTATION = 'api/Transportation/getalltransportation'; +var GET_ALL_TRANSPORTATIONS_RC = 'api/Transportation/getalltransportation'; +var GET_ALL_RRT_QUESTIONS = 'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions'; +var GET_RRT_SERVICE_PRICE = 'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice'; + +var GET_ALL_TRANSPORTATIONS_ORDERS = 'api/Transportation/get'; + +var CANCEL_AMBULANCE_REQUEST = "api/Transportation/update"; + +var INSERT_TRANSPORTATION_ORDER_RC = "api/Transportation/add"; + +///FindUs +var GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; + +///LiveChat +var GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects'; + +///babyInformation +var GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID'; + +///Get Baby By User ID +var GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID'; + +///userInformation +var GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New'; + +///Update email +var UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail'; +var UPDATE_PATENT_INFO = 'Services/Community.svc/REST/UpdateUserInfo_New'; + +///addNewChild +var GET_NEWCHILD_REQUEST = 'Services/Community.svc/REST/CreateNewBaby'; + +///newUserId +var GET_NEW_USER_REQUEST = 'Services/Community.svc/REST/CreateNewUser_New'; + +///delete Child +var DELETE_CHILD_REQUEST = 'Services/Community.svc/REST/DeleteBaby'; + +///addNewTABLE +var GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable'; + +///BloodDenote +var GET_CITIES_REQUEST = 'Services/Lists.svc/REST/GetAllCities'; + +///BloodDetails +var GET_BLOOD_REQUEST = 'services/PatientVarification.svc/REST/BloodDonation_GetBloodGroupDetails'; + +var SAVE_BLOOD_REQUEST = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; + +var GET_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/CheckUserAgreementForBloodDonation'; +var SAVE_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; + +///Reports +var REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; +var INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; +var SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail'; +var GET_INPATIENT_ADMISSIONS = 'Services/inps.svc/REST/getAdmissionForMedicalReport'; +var GET_MEDICAL_REPORT_PDF = 'Services/inps.svc/REST/getMedicalReportPDF'; + +///Rate +// var IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; +var IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated_Async'; +var GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; +var NEW_RATE_APPOINTMENT_URL = "Services/Doctors.svc/REST/AppointmentsRating_InsertAppointmentRate"; +var NEW_RATE_DOCTOR_URL = "Services/Doctors.svc/REST/DoctorsRating_InsertDoctorRate"; + +var GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; + +//URL to get clinic list +var GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; +var GET_CLINICS_LIST_WRT_HOSPITAL_URL = "Services/Lists.svc/REST/GetClinicFromDoctorSchedule"; + +//URL to get active appointment list +var GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; + +//URL to get projects list +var GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; + +//URL to get doctors list +var GET_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/SearchDoctorsByTime"; + +//URL to dental doctors list +var GET_DENTAL_DOCTORS_LIST_URL = "Services/Doctors.svc/REST/Dental_DoctorChiefComplaintMapping"; + +//URL to get doctor free slots +var GET_DOCTOR_FREE_SLOTS = "Services/Doctors.svc/REST/GetDoctorFreeSlots"; + +//URL to insert appointment +var INSERT_SPECIFIC_APPOINTMENT = "Services/Doctors.svc/REST/InsertSpecificAppointment"; + +//URL to get patient share +var GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; + +//URL to get patient appointment history +var GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; + +var GET_OBGYNE_ORDERS_LIST = "services/Patients.svc/REST/HIS_OBGYNEProcedureGet"; + +var GET_OBGYNE_DOCTORS_LIST = "services/Doctors.svc/REST/HIS_ObgyneUltrasoundDoctors"; + +var OBGYNE_PROCEDURE_UPDATE = "services/Patients.svc/REST/HIS_OBGYNEProcedure_Update"; + +var GET_RRT_PROCEDURE_LIST = "Services/Patients.svc/REST/GetRRTProcedureDetailsListFromVida"; + +var DOCTOR_SCHEDULE_URL = 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable'; + +var SEND_REPORT_EYE_EMAIL = "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail"; + +var SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail"; + +//URL to get patient appointment curfew history +// var GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew"; +var GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = "Services/Doctors.svc/REST/AppoimentHistoryForCurfew_Async"; + +//URL to confirm appointment +var CONFIRM_APPOINTMENT = "Services/MobileNotifications.svc/REST/ConfirmAppointment"; + +var INSERT_VIDA_REQUEST = "Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart"; + +//URL to cancel appointment +var CANCEL_APPOINTMENT = "Services/Doctors.svc/REST/CancelAppointment"; + +//URL get appointment QR +var GENERATE_QR_APPOINTMENT = "Services/Doctors.svc/REST/GenerateQRAppointmentNo"; + +//URL send email appointment QR +var EMAIL_QR_APPOINTMENT = "Services/Notifications.svc/REST/sendEmailForOnLineCheckin"; + +//URL check payment status +var CHECK_PAYMENT_STATUS = "Services/PayFort_Serv.svc/REST/GetRequestStatusByRequestID"; + +//URL create advance payment +var CREATE_ADVANCE_PAYMENT = "Services/Doctors.svc/REST/CreateAdvancePayment"; + +var HIS_CREATE_ADVANCE_PAYMENT = "Services/Patients.svc/REST/HIS_CreateAdvancePayment"; + +var ER_CREATE_ADVANCE_PAYMENT = "services/Doctors.svc/REST/ER_CreateAdvancePaymentForClinic"; + +var ER_INSERT_ADVANCE_PAYMENT = "services/Doctors.svc/REST/ER_InsertEROnlinePaymentDetails"; + +var ADD_ADVANCE_NUMBER_REQUEST = 'Services/PayFort_Serv.svc/REST/AddAdvancedNumberRequest'; + +var GENERATE_ANCILLARY_ORDERS_INVOICE = 'Services/Doctors.svc/REST/AutoGenerateAncillaryOrderInvoice'; + +var IS_ALLOW_ASK_DOCTOR = 'Services/Doctors.svc/REST/GetPatientDoctorAppointmentResult'; +var GET_CALL_REQUEST_TYPE = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; +var ADD_VIDA_REQUEST = 'Services/ER_VirtualCall.svc/REST/PatientER_VidaRequestInseart'; + +var SEND_CALL_REQUEST = 'Services/Doctors.svc/REST/InsertCallInfo'; + +var GET_LIVECARE_CLINICS = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinics'; + +var GET_LIVECARE_SCHEDULE_CLINICS = 'Services/Doctors.svc/REST/PatientER_GetClinicsHaveSchedule'; + +var GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST = 'Services/Doctors.svc/REST/PatientER_GetDoctorByClinicID'; + +var GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS = 'Services/Doctors.svc/REST/PatientER_GetDoctorFreeSlots'; + +var INSERT_LIVECARE_SCHEDULE_APPOINTMENT = 'Services/Doctors.svc/REST/InsertSpecificAppoitmentForSchedule'; + +var GET_PATIENT_SHARE_LIVECARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare"; + +var SET_ONLINE_CHECKIN_FOR_APPOINTMENT = "Services/Patients.svc/REST/SetOnlineCheckInForAppointment"; + +var GET_LIVECARE_CLINIC_TIMING = 'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule'; + +var GET_ER_APPOINTMENT_FEES = 'Services/DoctorApplication.svc/REST/GetERAppointmentFees'; +var GET_ER_APPOINTMENT_TIME = 'Services/ER_VirtualCall.svc/REST/GetRestTime'; + +var CHECK_PATIENT_DERMA_PACKAGE = 'Services/OUTPs.svc/REST/getPatientPackageComponentsForOnlineCheckIn'; + +var ADD_NEW_CALL_FOR_PATIENT_ER = 'Services/DoctorApplication.svc/REST/NewCallForPatientER'; + +var GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtualHistory'; +var CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest'; +var SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare'; + +var CHANGE_PATIENT_ER_SESSION = 'Services/DoctorApplication.svc/REST/ChangePatientERSession'; + +var APPLE_PAY_INSERT_REQUEST = 'Services/PayFort_Serv.svc/REST/PayFort_ApplePayRequestData_Insert'; + +var GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions'; + +var TAMARA_REQUEST_INSERT = 'Services/PayFort_Serv.svc/REST/AddTamaraRequest'; + +var UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport'; + +var GET_PATIENT_HEALTH_STATS = 'Services/Patients.svc/REST/Med_GetTransactionsSts'; + +var SEND_CHECK_IN_NFC_REQUEST = 'Services/Patients.svc/REST/Patient_CheckAppointmentValidation_ForNFC'; + +var CHECK_SCANNED_NFC_QR_CODE = 'Services/Patients.svc/REST/Patient_ValidationMachine_ForNFC'; + +var HAS_DENTAL_PLAN = 'Services/Doctors.svc/REST/Dental_IsPatientHasOnGoingEstimation'; + +var LASER_BODY_PARTS = 'Services/Patients.svc/REST/Laser_GetBodyPartsByCategory'; + +var INSERT_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Insert'; + +var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnarie_Update'; + +var GET_PATIENT_SHARE_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForWalkIn'; + +var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWalkinAppointment'; + +//URL to get medicine and pharmacies list +var CHANNEL = 3; +var GENERAL_ID = 'Cs2020@2016\$2958'; +var IP_ADDRESS = '10.20.10.20'; +var VERSION_ID = 18.7; +var SETUP_ID = '91877'; +var LANGUAGE = 2; +// var PATIENT_OUT_SA = 0; +var SESSION_ID = 'TMRhVmkGhOsvamErw'; +var IS_DENTAL_ALLOWED_BACKEND = false; +var PATIENT_TYPE = 1; +var PATIENT_TYPE_ID = 1; +var DEVICE_TOKEN = ""; +var IS_VOICE_COMMAND_CLOSED = true; +var IS_TEXT_COMPLETED = false; +// var DeviceTypeID = Platform.isIOS ? 1 : 2; +// var LANGUAGE_ID = 2; + +var GET_PHARMCY_ITEMS = "Services/Lists.svc/REST/GetPharmcyItems_Region"; +var GET_PHARMACY_LIST = "Services/Patients.svc/REST/GetPharmcyList"; +var GET_PAtIENTS_INSURANCE = "Services/Patients.svc/REST/Get_PatientInsuranceDetails"; +var GET_PAtIENTS_INSURANCE_UPDATED = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory"; + +var INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList"; +var INSURANCE_SCHEMES = "Services/Patients.svc/REST/PatientER_SchemesOfAactiveCompaniesGet"; +var UPDATE_MANUAL_INSURANCE = "Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate"; +var INSURANCE_COMPANIES = "Services/Patients.svc/REST/PatientER_InsuranceCompanyGet"; +var GET_PATIENT_INSURANCE_DETAILS = "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails"; +var UPLOAD_INSURANCE_CARD = 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate'; + +var GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID"; +var GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail"; +var GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus_Async"; +// var GET_PAtIENTS_INSURANCE_APPROVALS = "Services/Patients.svc/REST/GetApprovalStatus"; +var SEARCH_BOT = 'HabibiChatBotApi/BotInterface/GetVoiceCommandResponse'; + +var GET_VACCINATIONS_ITEMS = "/Services/ERP.svc/REST/GET_VACCINATIONS_ITEMS"; +var GET_VACCINATION_ONHAND = "/Services/ERP.svc/REST/GET_VACCINATION_ONHAND"; + +var GET_PATIENT_SICK_LEAVE = 'Services/Patients.svc/REST/GetPatientSickLeave'; + +var GET_PATIENT_SICK_LEAVE_STATUS = 'Services/Patients.svc/REST/GetPatientSickLeave_Status'; + +var SendSickLeaveEmail = 'Services/Notifications.svc/REST/SendSickLeaveEmail'; + +var GET_PATIENT_AdVANCE_BALANCE_AMOUNT = 'Services/Patients.svc/REST/GetPatientAdvanceBalanceAmount'; +var GET_PATIENT_INFO_BY_ID = 'Services/Doctors.svc/REST/GetPatientInfoByPatientID'; +var GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER = 'Services/Patients.svc/REST/AP_GetPatientInfoByPatientIDandMobileNumber'; +var SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/SendActivationCodeForAdvancePayment'; +var CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; + +var GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; + +var GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; + +var GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; + +var GET_COVID_DRIVETHRU_PROCEDURES_LIST = 'Services/Doctors.svc/REST/COVID19_GetTestProcedures'; + +///Smartwatch Integration Services +var GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; +var INSERT_PATIENT_HEALTH_DATA = 'Services/Patients.svc/REST/Med_InsertTransactions'; + +///My Trackers +var GET_DIABETIC_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetDiabeticResultAverage'; +var GET_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_GetDiabtecResults'; +var ADD_DIABTEC_RESULT = 'Services/Patients.svc/REST/Patient_AddDiabtecResult'; + +var GET_BLOOD_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetBloodPressureResultAverage'; +var GET_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetBloodPressureResult'; +var ADD_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddBloodPressureResult'; + +var GET_WEIGHT_PRESSURE_RESULT_AVERAGE = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResultAverage'; +var GET_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_GetWeightMeasurementResult'; +var ADD_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_AddWeightMeasurementResult'; + +var ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = 'Services/Patients.svc/Rest/GetActivePrescriptionReportByPatientID'; + +var GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult'; +var GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; + +var GET_QUESTION_TYPES = 'Services/OUTPs.svc/REST/getQuestionsTypes'; + +var UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult'; + +var SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; +var DEACTIVATE_DIABETIC_STATUS = 'services/Patients.svc/REST/Patient_DeactivateDiabeticStatus'; +var DEACTIVATE_BLOOD_PRESSURES_STATUS = 'services/Patients.svc/REST/Patient_DeactivateBloodPressureStatus'; + +var UPDATE_BLOOD_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateBloodPressureResult'; +var SEND_AVERAGE_BLOOD_WEIGHT_REPORT = 'Services/Notifications.svc/REST/SendAverageBodyWeightReport'; +var SEND_AVERAGE_BLOOD_PRESSURE_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodPressureReport'; + +var UPDATE_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateWeightMeasurementResult'; +var DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus'; +var GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse'; +var UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus'; + +var INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; +var INSERT_APPOINTMENT_QUESTION = 'Services/OUTPs.svc/REST/insertAppointmentQuestion'; +var RATE_DOCTOR_RESPONSE = 'Services/OUTPs.svc/REST/insertAppointmentQuestionRating'; + +var GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies'; + +// H2O +var H2O_GET_USER_PROGRESS = "Services/H2ORemainder.svc/REST/H2O_GetUserProgress"; +var H2O_INSERT_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2O_InsertUserActivity"; +var H2O_GET_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_GetUserDetails_New"; +var H2O_UPDATE_USER_DETAIL = "Services/H2ORemainder.svc/REST/H2O_UpdateUserDetails_New"; +var H2O_UNDO_USER_ACTIVITY = "Services/H2ORemainder.svc/REST/H2o_UndoUserActivity"; +//E_Referral Services + +var GET_ALL_RELATIONSHIP_TYPES = "Services/Patients.svc/REST/GetAllRelationshipTypes"; +var SEND_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/SendActivationCodeForEReferral'; +var CHECK_ACTIVATION_CODE_FOR_E_REFERRAL = 'Services/Authentication.svc/REST/CheckActivationCodeForEReferral'; +var GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities'; +var CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; +var GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; + +// Encillary Orders + +var GET_ANCILLARY_ORDERS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderList'; + +var GET_ANCILLARY_ORDERS_DETAILS = 'Services/Doctors.svc/REST/GetOnlineAncillaryOrderProcList'; + +//Pharmacy wishlist +// var GET_WISHLIST = "http://swd-pharapp-01:7200/api/shopping_cart_items/"; + +var GET_DOCTOR_LIST_BY_TIME = "Services/Doctors.svc/REST/SearchDoctorsByTime"; + +// pharmacy +var PHARMACY_AUTORZIE_CUSTOMER = "AutorizeCustomer"; +var PHARMACY_VERIFY_CUSTOMER = "VerifyCustomer"; +var PHARMACY_GET_COUNTRY = "countries"; +// var PHARMACY_CREATE_CUSTOMER = "epharmacy/api/CreateCustomer"; +var PHARMACY_CREATE_CUSTOMER = "getorcreateCustomer"; +var GET_PHARMACY_BANNER = "promotionbanners"; +var GET_PHARMACY_TOP_MANUFACTURER = "topmanufacturer"; +var GET_PHARMACY_BEST_SELLER_PRODUCT = "bestsellerproducts"; +var GET_PHARMACY_PRODUCTs_BY_IDS = "productsbyids/"; +var GET_PHARMACY_PRODUCTs_BY_SKU = "productbysku/"; +var GET_CUSTOMERS_ADDRESSES = "Customers/"; +var SUBSCRIBE_PRODUCT = "subscribe?"; +var GET_ORDER = "orders?"; +var GET_ORDER_DETAILS = "orders/"; +var ADD_CUSTOMER_ADDRESS = "addcustomeraddress"; +var EDIT_CUSTOMER_ADDRESS = "editcustomeraddress"; +var DELETE_CUSTOMER_ADDRESS = "deletecustomeraddress"; +var GET_ADDRESS = "Customers/"; +var GET_Cancel_ORDER = "cancelorder/"; +var WRITE_REVIEW = "Content-Type" + "text/plain; charset=utf-8"; +var GET_SHOPPING_CART = "shopping_cart_items/"; +var GET_SHIPPING_OPTIONS = "get_shipping_option/"; +var DELETE_SHOPPING_CART = "delete_shopping_cart_items/"; +var DELETE_SHOPPING_CART_ALL = "delete_shopping_cart_item_by_customer/"; +var ORDER_SHOPPING_CART = "orders"; +var GET_LACUM_ACCOUNT_INFORMATION = "Services/Patients.svc/REST/GetLakumAccountInformation"; +var GET_LACUM_GROUP_INFORMATION = "Services/Patients.svc/REST/GetlakumInQueryInfoGrouping"; +var LACUM_ACCOUNT_ACTIVATE = "Services/Patients.svc/REST/LakumAccountActivation"; +var LACUM_ACCOUNT_DEACTIVATE = "Services/Patients.svc/REST/LakumAccountDeactivation"; +var CREATE_LAKUM_ACCOUNT = "Services/Patients.svc/REST/PHR_CreateLakumAccount"; +var TRANSFER_YAHALA_LOYALITY_POINTS = "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; +var LAKUM_GET_USER_TERMS_AND_CONDITIONS = "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy"; + +// var PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList'; +var PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async'; + +var GET_RECOMMENDED_PRODUCT = 'alsoProduct/'; +var GET_MOST_VIEWED_PRODUCTS = "mostview"; +var GET_NEW_PRODUCTS = "newproducts"; + +// Home Health Care +var HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; +var HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; +var PATIENT_ER_UPDATE_PRES_ORDER = "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; +var GET_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; +var GET_CMC_ORDER_DETAIL_BY_ID = "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; +var GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems"; +var PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = 'Services/MobileNotifications.svc/REST/PushNotification_GetAllNotifications'; +var PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead'; +var GET_PATIENT_ALL_PRES_ORD = 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +var PATIENT_ER_INSERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +var BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; +var ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; + +// HHC RC SERVICES +var HHC_GET_ALL_SERVICES_RC = "api/HHC/getallhhc"; +var ADD_HHC_ORDER_RC = "api/HHC/add"; +var GET_ALL_HHC_ORDERS_RC = 'api/hhc/list'; +var UPDATE_HHC_ORDER_RC = 'api/hhc/update'; + +// CMC RC SERVICES +var GET_ALL_CMC_SERVICES_RC = 'api/cmc/getallcmc'; +var ADD_CMC_ORDER_RC = 'api/cmc/add'; +var GET_ALL_CMC_ORDERS_RC = 'api/cmc/list'; +var UPDATE_CMC_ORDER_RC = 'api/cmc/update'; + +// RRT RC SERVICES +var ADD_RRT_ORDER_RC = "api/rrt/add"; +var GET_ALL_RRT_ORDERS_RC = "api/rrt/list"; +var UPDATE_RRT_ORDER_RC = 'api/rrt/update'; + +// PRESCRIPTION RC SERVICES +var ADD_PRESCRIPTION_ORDER_RC = "api/prescription/add"; +var GET_ALL_PRESCRIPTION_ORDERS_RC = "api/prescription/list"; +var GET_ALL_PRESCRIPTION_INFO_RC = "api/Prescription/info"; +var UPDATE_PRESCRIPTION_ORDER_RC = 'api/prescription/update'; + +//Pharmacy wishlist +var GET_WISHLIST = "shopping_cart_items/"; +var DELETE_WISHLIST = "delete_shopping_cart_item_by_product?customer_id="; +var GET_REVIEW = "customerreviews/"; +var GET_BRANDS = "manufacturer"; +var GET_TOP_BRANDS = "topmanufacturer?page=1&limit=8"; +var GET_PRODUCT_DETAIL = "products/"; +var GET_LOCATION = "Services/Patients.svc/REST/GetPharmcyListBySKU"; +var GET_SPECIFICATION = "productspecification/"; +var GET_BRAND_ITEMS = "products"; +var PHARMACY_MAKE_REVIEW = 'insertreviews'; + +// External API +var ADD_ADDRESS_INFO = "addcustomeraddress"; +var GET_CUSTOMER_ADDRESSES = "Customers/"; +var GET_CUSTOMER_INFO = "VerifyCustomer"; + +//Pharmacy + +var GET_PHARMACY_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id=0'; +var GET_OFFERS_CATEGORISE = 'discountcategories'; +var GET_OFFERS_PRODUCTS = 'offerproducts/'; +var GET_CATEGORISE_PARENT = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; +var GET_PARENT_PRODUCTS = 'products?categoryid='; +var GET_SUB_CATEGORISE = 'categories?fields=id,name,namen,description,image,localized_names,display_order,parent_category_id,is_leaf&parent_id='; +var GET_SUB_PRODUCTS = 'products?categoryid='; +var 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='; +var GET_CLINIC_CATEGORY = 'Services/Doctors.svc/REST/DP_GetClinicCategory'; +var GET_DISEASE_BY_CLINIC_ID = 'Services/Doctors.svc/REST/DP_GetDiseasesByClinicID'; +var SEARCH_DOCTOR_BY_TIME = 'Services/Doctors.svc/REST/SearchDoctorsByTime'; + +var TIMER_MIN = 10; + +var GOOGLE_API_KEY = "AIzaSyCmevVlr2Bh-c8W1VUzo8gt8JRY7n5PANw"; + +var GET_BRANDS_LIST = 'categoryManufacturer?categoryids='; + +var GET_SEARCH_PRODUCTS = + 'searchproducts?fields=id,discount_ids,reviews,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&search_key='; + +var SCAN_QR_CODE = 'productbysku/'; + +var FILTERED_PRODUCTS = 'products?categoryids='; + +var GET_DOCTOR_LIST_CALCULATION = "Services/Doctors.svc/REST/GetCallculationDoctors"; + +var GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC = "Services/Patients.svc/REST/GetDentalAppointments"; + +var GET_DENTAL_APPOINTMENT_INVOICE = "Services/Patients.svc/REST/HIS_eInvoiceForDentalByAppointmentNo"; + +var SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL = "Services/Notifications.svc/REST/SendInvoiceForDental"; + +var GET_TAMARA_PLAN = 'https://mdlaboratories.com/tamaralive/Home/GetInstallments'; + +var GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid='; + +var UPDATE_TAMARA_STATUS = 'Services/PayFort_Serv.svc/REST/Tamara_UpdateRequestStatus'; + +var MARK_APPOINTMENT_TAMARA_STATUS = 'Services/Patients.svc/REST/MarkAppointmentForTamaraPayment_FromVida'; + +var AUTO_GENERATE_INVOICE_TAMARA = 'Services/PayFort_Serv.svc/REST/Tamara_GetinfoByAppointmentNo_AutoGenerateInvoice'; + +var GET_ONESIGNAL_VOIP_TOKEN = 'https://onesignal.com/api/v1/players'; + +var CANCEL_PHARMA_LIVECARE_REQUEST = 'https://vcallapi.hmg.com/api/PharmaLiveCare/SendPaymentStatus'; + +var INSERT_FREE_SLOTS_LOGS = 'Services/Doctors.svc/Rest/InsertDoctorFreeSlotsLogs'; + +var GET_NATIONALITY = 'Services/Lists.svc/REST/GetNationality'; + +var PAYFORT_TEST_URL = 'https://sbpaymentservices.payfort.com/FortAPI/paymentApi'; +var PAYFORT_PROD_URL = 'https://paymentservices.payfort.com/FortAPI/paymentApi'; + +// Check If InPatient API +var CHECK_IF_INPATIENT = 'Services/Patients.svc/REST/GetInPatientAdmissionInfo'; + +var CHECK_IF_PATIENT_ADMITTED = 'Services/Inps.svc/REST/checkIsPatientAdmittedOrAdmissionRequest'; + +// Get General Instructions API +var GET_GENERAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getGeneralInstructions'; + +// Get Medical Instructions API +var GET_MEDICAL_INSTRUCTIONS = 'Services/INPs.svc/REST/getPatientAdmissionRequest'; + +var GET_INPATIENT_ADVANCE_PAYMENT_REQUESTS = 'Services/INPs.svc/REST/getInpatientAdvancePendingPayment'; + +var GET_INPATIENT_PAID_ADVANCE_PAYMENT = 'Services/INPs.svc/REST/getInpatientAdvanceHistory'; + +var GET_INPATIENT_ADVANCE_PAYMENT_LINK = 'Services/PayFort_Serv.svc/REST/InsertInPatientAdvanceDetails'; + +var INSERT_INPATIENT_ORDER = 'Services/INPs.svc/REST/Inpcp_insertOrder'; + +var INPATIENT_DISCHARGE_MEDICATIONS = 'Services/INPs.svc/REST/chekPatientHasDischargeMedicine'; + +var GET_BIRTH_NOTIFICATION = 'Services/INPs.svc/REST/getBirthNotification_bymothermrn'; + +var SAVE_BIRTH_NOTIFICATION = 'Services/INPs.svc/REST/SaveBirthNotification'; + +var INSERT_GENERAL_ADMISSION_CONSENT = 'Services/INPs.svc/REST/Inp_insertAAForGeneralAdmissionConsent'; + +//Meal Plan APIs +var GET_ADMITTED_PATIENTS = 'Services/MOP.svc/REST/GetAdmittedPatients'; +var GET_CURRENT_WEEKID_WEEKDAY = 'Services/MOP.svc/REST/GetCurrentWeekAndDayHMGMP'; +var GET_MEALS_OF_SCHEDULE_ID = 'Services/MOP.svc/REST/GetMealsOfScheduleID_Mobile'; +var GET_MEAL_ITEMS_OF_SCHEDULE_ID = 'Services/MOP.svc/REST/GetDefaultItemsOfScheduleID'; +var PLACE_MEAL_PLAN_ORDER = 'Services/MOP.svc/REST/UpdateOrMakeNewOrder'; + +var CHECK_PATIENT_NPHIES_ELIGIBILITY = 'Services/Doctors.svc/REST/checkPatientInsuranceCompanyValidity'; +var CONVERT_PATIENT_TO_CASH = 'Services/Doctors.svc/REST/deActivateInsuranceCompany'; + +var GET_BLOOD_DONATION_PROJECTS_LIST = 'Services/OUTPs.svc/REST/BD_getProjectsHaveBDClinics'; + +var GET_BLOOD_DONATION_FREE_SLOTS = 'Services/OUTPs.svc/REST/BD_GetFreeSlots'; + +var GET_WE_CARE_TOUR_URL = 'Services/Consent.svc/Rest/Consent_VirtualJurny_Url_GetByProjectID'; + +var GET_DENTAL_INSTRUCTIONS = 'Services/OUTPs.svc/Rest/getProcedureNotification'; + +var INSERT_WALKIN_APPOINTMENT = "Services/Doctors.svc/REST/InsertWalkinAppointment"; + +//Usage Agreement APIs +var CHECK_USAGE_AGREEMENT = "Services/Patients.svc/REST/CheckForUsageAgreement"; +var GET_USAGE_AGREEMENT = "Services/Patients.svc/REST/GetUsageAgreementText"; +var ADD_USAGE_AGREEMENT = "Services/Patients.svc/REST/AddUsageAgreement"; + +var GET_ER_ONLINE_PAYMENT_DETAILS = 'Services/OUTPs.svc/Rest/Outp_GetPatientPaymentInformationForERClinic'; + +var AUTO_GENERATE_INVOICE_ER = 'Services/OUTPs.svc/Rest/Outp_AutoGenerateInvoiceForER'; + +var CHECK_IF_PATIENT_ARRIVED_ER_ONLINE_CHECKIN = 'Services/OUTPs.svc/Rest/IsPatientArrived'; + +var CHECK_PATIENT_ER_ADVANCE_BALANCE = 'Services/OUTPs.svc/Rest/getPatientAdvanceBalanceAmountByClinic'; + +var GET_PROJECT_FROM_NFC = 'Services/OUTPs.svc/Rest/GetProjectByNFC'; + +var GET_PATIENT_OCCUPATION_LIST = 'Services/Authentication.svc/REST/GetPatientOccupation'; + +var IS_DOCTOR_AVAILABLE_BY_CALENDAR_SCHEDULE = 'Services/OUTPs.svc/REST/HIS_IsDoctorAvailableByCalendarSchedule'; + +//PAYFORT +var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; +var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; +var payFortEnvironment = FortEnvironment.production; +var applePayMerchantId = "merchant.com.hmgwebservices"; +// var payFortEnvironment = FortEnvironment.test; +// var applePayMerchantId = "merchant.com.hmgwebservices.uat"; + +class AppGlobal { + static var context; + static var projectViewModelContext; + + AppSharedPreferences sharedPref = AppSharedPreferences(); + + static bool isNetworkDebugEnabled = false; + static String appLanguage = ""; + + Request getPublicRequest() { + Request request = new Request(); + request.Channel = 3; + request.IPAdress = "10.20.10.20"; + request.generalid = 'Cs2020@2016\$2958'; + request.VersionID = VERSION_ID; //5.3; //3.6; + request.Channel = CHANNEL; //3; + request.IPAdress = IP_ADDRESS; //"10.20.10.20"; + request.generalid = GENERAL_ID; //'Cs2020@2016\$2958'; + request.PatientOutSA = 0; + request.SessionID = "wEVNbagIkaNhGECWZjHaA"; + request.isDentalAllowedBackend = false; + request.DeviceTypeID = Platform.isIOS ? 1 : 2; + request.DeviceType = Platform.isIOS ? "iOS" : "Android"; + + return request; + } +} diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart new file mode 100644 index 00000000..786baadc --- /dev/null +++ b/lib/config/localized_values.dart @@ -0,0 +1,2330 @@ +// --------- - -- - - - - - - - - ---------------- +// Used for Native through Platform Method Channel +// --------- - -- - - - - - - - - ---------------- +const Map platformLocalizedValues = { + "errorConnectingHmgNetwork": {"en": "Sorry you are not connecting to HMG network", "ar": "نعتذر لست متصل في شكبة مستشفى د.سليمان الحبيب"}, + "successConnectingHmgNetwork": {"en": "You connected to HMG network successfully, you can access the app", "ar": "تم التصال بشبكة د.سليمان الحبيب بنجاح, تستطيع الان استخدام تطبيق الحبيب"}, + "failedConnectingHmgNetwork": { + "en": "Sorry the connection to HMG network had been failed, make sure you are in range of HMG network", + "ar": "نعتذر لقد فشل الاتصال بشبكة د.سليمان الحبيب, تاكد من وجودك داخل نطاق الشبكة" + }, + "alreadyConnectedHmgNetwork": {"en": " You already connected to HMG network to access Alhabib app", "ar": "انت متصل مسبقاً بالشبكة تستطيع استخدام تطبيق الحبيب"}, + "somethingWentWrong": {"en": "Sorry something went wrong please try again later", "ar": "نعتذر لخدمتكم يرجى المحاولة لاحقا"}, + "enablingWifi": {"en": "Enabling wifi...", "ar": "Enabling wifi..."}, + "connectedHmgNetworkWithInternet": {"en": "Successfully connected to the HMG network to access internet", "ar": "Successfully connected to the HMG network to access internet"}, + "connectedToHmgNetworkWithNoInternet": { + "en": "Successfully connected to the HMG network but it have no internet access", + "ar": "Successfully connected to the HMG network but it have no internet access" + }, + "notConnectedToHmgNetworkSecurityIssue": { + "en": "We are not able to connect you to HMG network due to security reasons", + "ar": "We are not able to connect you to HMG network due to security reasons" + } +}; + +const Map localizedValues = { + 'kilometerUnit': {'en': 'KM', 'ar': 'كيلومتر'}, + 'dashboardScreenToolbarTitle': {'ar': 'الرئيسة', 'en': 'Home'}, + 'settings': {'en': 'Settings', 'ar': 'الاعدادات'}, + 'language': {'en': 'App Language', 'ar': 'لغة التطبيق'}, + 'lanEnglish': {'en': 'English', 'ar': 'English'}, + 'lanArabic': {'en': 'العربية', 'ar': 'العربية'}, + 'cancel': {'en': 'CANCEL', 'ar': 'الغاء'}, + 'done': {'en': 'DONE', 'ar': 'تأكيد'}, + 'replay2': {'en': 'Replay', 'ar': 'رد الطبيب'}, + 'home': {'en': 'Home', 'ar': 'الرئيسية'}, + 'services': {'en': 'SERVICES', 'ar': 'الخدمات'}, + 'mySchedule': {'en': 'My Schedule', 'ar': 'جدولي'}, + 'logout': {'en': 'Logout', 'ar': 'تسجيل خروج'}, + 'respirationRate': {'en': 'Respiration Rate', 'ar': 'معدل التنفس'}, + 'bookAppo': {'en': 'Book Appointment', 'ar': 'حجز موعد'}, + 'searchBy': {'en': 'Search By:', 'ar': 'البحث عن طريق:'}, + 'clinic': {'en': 'Clinic', 'ar': 'العيادة'}, + 'by-clinic': {'en': 'By Clinic', 'ar': 'العيادة'}, + 'hospital': {'en': 'Hospital', 'ar': 'المستشفى'}, + 'by-hospital': {'en': 'By Hospital', 'ar': 'المستشفى'}, + 'name': {'en': 'Name', 'ar': 'الإسم'}, + 'doctor': {'en': 'Doctor', 'ar': 'الطبيب'}, + 'clinicName': {'en': 'Clinic Name', 'ar': 'اسم العيادة'}, + 'hospitalName': {'en': 'Hospital Name', 'ar': 'اسم المستشفى'}, + 'NoClinicFound': {'en': 'No Clinic Found', 'ar': 'لم يتم العثور على عيادة'}, + 'doctorName': {'en': 'Doctor Name', 'ar': 'إسم الطبيب'}, + 'nearestAppo': {'en': 'Nearest Appointment', 'ar': 'أقرب موعد'}, + 'searchByDocText': {'en': 'Type the name of the doctor to help you find him', 'ar': 'اكتب اسم الطبيب لمساعدتك في العثور عليه'}, + 'enterDocName': {'en': 'Enter Doctor name', 'ar': 'أدخل إسم الطبيب'}, + 'search': {'en': 'Search', 'ar': 'بحث'}, + 'noResultFound': {'en': 'No Result Found', 'ar': 'لم يتم العثور على نتائج '}, + 'noSearchResultFound': {'en': 'No Result Found', 'ar': 'لم يتم العثور على نتائج الرجاء تغيير لغة البحث'}, + 'pleaseEnterProductName': {'en': 'Please Enter Product Name', 'ar': 'ادخل اسم المنتج'}, + 'bookNow': {'en': 'Book Now', 'ar': 'احجز الآن'}, + 'docInfo': {'en': 'Doctor Information', 'ar': 'معلومات الطبيب'}, + 'appoInfo': {'en': 'Appointment Information', 'ar': 'معلومات الموعد'}, + 'availableAppo': {'en': 'Available Appointments', 'ar': 'المواعيد المتاحة'}, + 'gender': {'en': 'Gender', 'ar': 'الجنس'}, + 'nationality': {'en': 'Nationality', 'ar': 'الجنسية'}, + 'neverWait': {'en': 'Never wait in queue', 'ar': 'لا تنتظر في قائمة الانتظار'}, + 'reminderTitle': {'en': 'You have appointment with Dr. ', 'ar': 'لديك موعد مع د'}, + 'appointmentCalendar': {'en': 'Would you like to set a reminder for this appointment in your calendar?', 'ar': 'هل ترغب في إضافة تذكير لهذا الموعد في التقويم الخاص بك؟'}, + 'appointmentSuccess': {'en': 'Appointment is successfully booked', 'ar': 'تم حجز الموعد بنجاح'}, + 'docQualifications': {'en': 'Doctor Qualifications', 'ar': 'مؤهلات الطبيب'}, + 'pressAgain': {'en': 'Press again to exit the app', 'ar': 'اضغط مرة أخرى للخروج من التطبيق'}, + 'laserMaxLimitReach': {'en': "Maximum limit is 90 minutes", 'ar': "الحد الأقصى هو 90 دقيقة"}, + 'confirmAppoHeading': {'en': 'Kindly review your Appointment', 'ar': 'يرجى تأكيد موعدك'}, + 'patientInfo': {'en': 'Patient Information', 'ar': 'معلومات المراجع'}, + 'doctorFilter': {'en': 'Doctors will be filtered based on your gender and age', 'ar': 'سيتم تصفية الأطباء بناءً على جنسك وعمرك'}, + 'bookSuccess': {'en': 'Book Success', 'ar': 'تم حجز الموعد بنجاح'}, + 'patientShare': {'en': 'Patient Share', 'ar': 'نسبة العميل'}, + 'patientShareWithTax': {'en': 'Patient Share with Tax', 'ar': 'المبلغ الإجمالي المستحق مع الضريبة'}, + 'confirmAppo': {'en': 'Confirm Appointment', 'ar': 'تأكيد الموعد'}, + 'confirm': {'en': 'Confirm', 'ar': 'تأكيد'}, + 'confirmLiveCare': {'en': 'Confirm LiveCare', 'ar': 'تأكيد لايف كير'}, + 'waitingForDoctor': {'en': 'Waiting for doctor', 'ar': 'في انتظار الطبيب'}, + 'appointment': {'en': 'Appointment', 'ar': 'الموعد'}, + 'confirmLater': {'en': 'Confirm Later', 'ar': 'التاكيد لاحقا'}, + 'todoList': {'en': 'Todo List', 'ar': 'مهامي'}, + 'appoActions': {'en': 'Appointment Actions', 'ar': 'إجراءات الموعد'}, + 'date': {'en': 'Date', 'ar': 'التاريخ'}, + 'time': {'en': 'Time', 'ar': 'الوقت'}, + 'pendingPayment': {'en': 'Pending for payment', 'ar': 'في انتظار الدفع'}, + 'payNow': {'en': 'Pay Now', 'ar': 'ادفع الآن'}, + 'viewQR': {'en': 'View QR Code', 'ar': 'عرض رمز الاستجابة السريعة'}, + 'instruction': {'en': 'Instructions', 'ar': 'تعليمات'}, + 'livecare': {'en': 'LiveCare', 'ar': 'لايف كير'}, + 'livecareAppo': {'en': 'LiveCare Appointment', 'ar': 'الموعد لايف كير'}, + 'agreeTo': {'en': 'I agree to the', 'ar': 'أوافق على'}, + 'termsConditoins': {'en': 'Terms and Conditions', 'ar': 'الأحكام والشروط'}, + 'cancelAppoMsg': {'en': 'Are you sure you want to cancel this appointment?', 'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'}, + 'changePayment': {'en': 'Change Payment Method', 'ar': 'تغيير آلية الدفع'}, + 'upcoming-noAction': {'en': 'No Action Required', 'ar': 'لا يلزم اتخاذ أي إجراء'}, + 'upcoming-confirm': {'en': 'Please confirm the appointment to avoid cancellation', 'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء'}, + "book-success-confirm-more-24-1-2": {"en": "The online payment process will be available 24 hours before the appointment.", "ar": "عملية الدفع الالكتروني ستكون متاحة قبل الموعد ب 24 ساعة."}, + 'upcoming-payment-pending': {'en': 'Online Payment will be Activated before 24 Hours of Appointment Time', 'ar': 'سيتم تفعيل خدمة الدفع الالكتروني قبل 24 ساعة من موعد الحجز'}, + 'upcoming-payment-now': {'en': 'Pay Online now to avoid long waiting queue', 'ar': 'ادفع الآن لتفادي طابور الانتظار'}, + 'upcoming-QR': {'en': 'Use the QR Code to Check-In in hospital', 'ar': 'استخدم الرمز لتسجيل الحضور بشكل آلي في المستشفى'}, + 'upcoming-virtual': {'en': 'This is a virtual appointment, Please adhere to the instructions for a seamless experience.', 'ar': 'هذا موعد اتصال مرئي عن بعد ، يرجى اتباع تعليمات الخدمة.'}, + 'upcoming-livecare': {'en': 'This is a LiveCare appointment', 'ar': 'هذا موعد لايف كير'}, + 'upcoming-details': {'en': 'More Details', 'ar': 'المزيد'}, + 'reschedule': {'en': 'Reschedule', 'ar': 'إعادة جدولة'}, + 'raise': {'en': 'Raise', 'ar': 'رفع'}, + 'complaint': {'en': 'Complaint', 'ar': 'شكوى'}, + 'add': {'en': 'Add', 'ar': 'إضافة'}, + 'reminder': {'en': 'Reminder', 'ar': 'تذكير'}, + 'location': {'en': 'Locations', 'ar': 'مواقعنا'}, + 'online': {'en': 'Online', 'ar': 'الدفع'}, + 'payment': {'en': 'Payment', 'ar': 'الالكتروني'}, + 'onlinePayment': {'en': 'Online', 'ar': 'الدفع'}, + 'onlinePaymentSubtitle': {'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": "مرحبا بك في"}, + "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 previously visited the hospitals or medical centers of Dr. Sulaiman Al Habib?', 'ar': 'هل قمت مسبقا بزيارة مستشفيات او مراكز الدكتور سليمان الحبيب الطبية ؟'}, + 'yes': {'en': 'Yes', 'ar': 'نعم'}, + 'no': {'en': 'No', 'ar': 'لا'}, + "logintyperadio": {"en": " Choose from the below options to login to your medical file.", "ar": " اختر احدى الخيارات أدناه لتسجيل الدخول إلى ملفك الطبي "}, + "registernow": {"en": "Register Now", "ar": "سجل الان"}, + "nationalID": {"en": "Enter the Identification 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 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": "أدخل رقم الجوال المسجل لاستلام رقم الملف عن طريق الرسائل النصية"}, + "dob": {"en": "Birth Date:", "ar": "تاريخ الميلاد"}, + "hijri-date": {"en": "Hijri Date", "ar": "التاريخ الهجري"}, + "gregorian-date": {"en": "Gregorian Date", "ar": "التاريخ الميلادي"}, + "verify-login-with": {"en": "Please choose one of the following options to verify", "ar": "الرجاء اختيار احدى الخيارات التالية للتحقق من البيانات"}, + "register-user": {"en": "Register", "ar": "تسجيل"}, + "verify-with-fingerprint": {"en": "Fingerprint", "ar": "بصمة"}, + "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 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": "لتفعيل خدمة الدخول بالبصمة، يرجى اختيار احدى القنوات التالية للتحقق من البيانات" + }, + 'searchMedicine': {'en': 'Search Medicine', 'ar': 'البحث عن الدواء'}, + 'pharmaciesList': {'en': 'Pharmacies List', 'ar': 'قائمة الصيدليات'}, + 'searchMedicineHere': {'en': 'Search Medicine Here', 'ar': 'ابحث عن الدواء هنا'}, + 'description': {'en': 'Description', 'ar': 'الوصف'}, + 'howToUse': {'en': 'How to Use', 'ar': 'طريقة الأستخدام'}, + 'price': {'en': 'Price', 'ar': 'السعر'}, + 'youCanFindItIn': {'en': 'You can find it in', 'ar': 'يمكنك ان تجده في'}, + 'pleaseEnterMedicineName': {'en': 'Please Enter Medicine Name', 'ar': 'الرجاء ادخال اسم الدواء'}, + "verification_message": {"en": "Please enter the Verification Code sent to", "ar": "الرجاء ادخال رمز التحقق الذي تم إرساله إلى"}, + "validation_message": {"en": "The verification code expires in", "ar": "تنتهي صلاحية رمز التحقق خلال"}, + "arabic-change": {"en": "عربي", "ar": "English"}, + "notification": {"en": "Notifications", "ar": "إشعارات"}, + "app-settings": {"en": "App Settings", "ar": "إعدادات التطبيق"}, + "rate-app": {"en": "Rate Our App", "ar": "قيم التطبيق"}, + "before": {"en": "Before", "ar": "قبل"}, + "minute": {"en": "Minutes", "ar": "دقيقة"}, + "hour": {"en": "Hour", "ar": "ساعة"}, + "reminderSuccess": {"en": "The reminder has been added successfully", "ar": "تمت إضافة التذكير بنجاح"}, + "reminderCancelSuccess": {"en": "The reminder has been cancelled successfully", "ar": "تم إلغاء التذكير بنجاح"}, + "patientShareToDo": {"en": "Amount before tax: ", "ar": "المبلغ قبل الضريبة:"}, + "patientTaxToDo": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"}, + "patientShareTotalToDo": {"en": "Total amount due: ", "ar": "المبلغ الإجمالي المستحق:"}, + 'paymentMethod': {'en': 'Payment Method', 'ar': 'طريقة الدفع او السداد'}, + 'noNeedToWaitInLine': {'en': 'No need to stand in line.', 'ar': 'لا داعي للوقوف في الطابور.'}, + 'useQRAppoAttend': {'en': 'Use the QR code to register the appointment attendance.', 'ar': 'استخدم الكود لتسجيل الحضور في المستشفى.'}, + 'passQRAppoAttend': {'en': 'Pass the QR code through the attendance devices available in the Hospital.', 'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'}, + 'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'}, + 'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'}, + 'scanQRHospital': { + 'en': 'Approach the Online Check-In board in the hospital & scan via NFC or QR Code to Check-In', + 'ar': 'اقترب من لوحة تسجيل الوصول عبر الإنترنت في المستشفى وقم بالمسح الضوئي عبر NFC أو رمز الاستجابة السريعة لتسجيل الوصول' + }, + 'scanNFC': {'en': 'Scan NFC to Check-In', 'ar': 'مسح NFC لتسجيل الوصول'}, + "sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"}, + "success": {"en": "Done successfully", "ar": "تم تنفذ الطلب بنجاح"}, + "EmailSentSuccessfully": {"en": "Email Sent Successfully", "ar": "تم إرسال البريد الإلكتروني بنجاح"}, + "EmailSentError": {"en": "Error Sending Email", "ar": "خطأ في إرسال البريد الإلكتروني"}, + "close": {"en": "Close", "ar": "مغلق"}, + "closeIt": {"en": "Close", "ar": "اغلاق"}, + "booked": {"en": "Booked", "ar": "محجوز"}, + "confirmed": {"en": "Confirmed", "ar": "مؤكد"}, + "arrived": {"en": "Arrived", "ar": "تم الحضور"}, + "payNowBookSuccess": {"en": "Pay now via Al Habib App", "ar": "ادفع الآن عبر تطبيق الحبيب"}, + "payNowBookSuccesstext1": {"en": "Pay Now using online payment service from secure payment gateways", "ar": " ادفع الآن من خلال خدمة الدفع الالكتروني الآمنة"}, + "payNowBookSuccesstext2": {"en": "You can also Pay Later via online payment or in Hospital", "ar": "يمكنك أيضًا الدفع لاحقًا عبر الدفع الالكتروني أو في المستشفى"}, + 'payLater': {'en': 'Pay Later', 'ar': 'ادفع لاحقا'}, + '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": "هل ترغب في تسجيل الدخول باسم المستخدم الحالي؟"}, + "another-acc": {"en": "Use Another Account", "ar": "استخدم حسابا آخر"}, + "next": {"en": "Next", "ar": 'التالى'}, + "first-name": {"en": "First Name", "ar": "الاسم الأول"}, + "middle-name": {"en": "Middle Name", "ar": "الاسم الثاني"}, + "last-name": {"en": "Last Name", "ar": "إسم العائلة"}, + "female": {"en": "Female", "ar": "أنثى"}, + "male": {"en": "Male", "ar": "ذكر"}, + "preferred-language": {"en": "Preferred Language *", "ar": "اللغة المفضلة *"}, + "english": {"en": "English", "ar": "الإنجليزية"}, + "arabic": {"en": "Arabic", "ar": "العربية"}, + "locations-register": {"en": "Where do you want to create this file?", "ar": "أين تريد فتح هذا الملف؟"}, + "ksa": {"en": "KSA", "ar": "السعودية"}, + "dubai": {"en": "Dubai", "ar": "دبي"}, + "enter-email": {"en": "Please Enter Email", "ar": "ادخل البريد الالكتروني"}, + "family": {"en": "My Family", "ar": "عائلتي"}, + "family-title": {"en": "My Family Files", "ar": "ملفات العائلة"}, + "myFamily": {"en": "My Family", "ar": "ملفات العائلة"}, + "add-new-member": {"en": "Add Family Member", "ar": "إضافة عضو جديد"}, + "sent-requests": {"en": "Sent Requests", "ar": "الطلبات المرسلة"}, + "recieved-requests": {"en": "Recieved Requests", "ar": "الطلبات المستلمة"}, + "manage-files": {"en": "Manage Family Files", "ar": "إدارة ملفات العائلة"}, + 'oxygenation': {'en': 'Oxygenation', 'ar': 'الأوكسجين'}, + 'bodyMeasurements': {'en': 'body Mass Index', 'ar': 'مؤشر الكتلة'}, + 'temperature': {'en': 'Temperature', 'ar': 'درجة الحرارة'}, + 'pulse': {'en': 'Pulse', 'ar': 'النبض'}, + 'respiration': {'en': 'Respiration', 'ar': 'التنفس'}, + 'bloodPressure': {'en': 'Blood Pressure', 'ar': 'ضغط الدم'}, + 'painScale': {'en': 'Pain Scale', 'ar': 'مقياس الألم'}, + 'weight': {'en': 'Weight', 'ar': 'الوزن'}, + 'height': {'en': 'Height', 'ar': 'الطول'}, + 'heart': {'en': 'Heart Rate', 'ar': 'معدل النبض'}, + "heightUnit": {"en": "height unit", "ar": "وحدة الطول"}, + "weightUnit": {"en": "Weight Unit", "ar": "وحدة الوزن"}, + "unit": {"en": "Unit", "ar": "وحدة"}, + "request": {"en": "Request", "ar": "طلبات الاضافة"}, + "member-name": {"en": "Member Name", "ar": "اسم العضو"}, + "switch-login": {"en": "Switch", "ar": "تغير "}, + "remove-member": {"en": "Remove", "ar": "حذف"}, + "allow-view": {"en": "Allow", "ar": "قبول"}, + "reject-view": {"en": "Reject", "ar": "رفض"}, + "delete-view": {"en": "Delete", "ar": "حذف"}, + "my-family": {"en": "MY FAMILY", "ar": "عائلتي"}, + "approvals": {"en": "Approvals", "ar": "موافقات التأمين"}, + "approvalNo": {"en": "Approval No:", "ar": "رقم الموافقة: "}, + "companyName": {"en": "Company Name:", "ar": "اسم الشركة: "}, + "receiptOn": {"en": "Receipt on:", "ar": "تاريخ الفاتورة: "}, + "expiryDate": {"en": "Expiry Date:", "ar": "تاريخ الانتهاء: "}, + "expiryPoints": {"en": "Expired", "ar": " منتهية الصلاحية"}, + "expiryOn": {"en": "Expiry on:", "ar": "تاريخ الانتهاء: "}, + "procedureName": {"en": "Procedure Name:", "ar": "اسم الاجراء:"}, + "procedure": {"en": "Procedure", "ar": "اسم الاجراء:"}, + "procedureStatus": {"en": "Procedure Status: ", "ar": "حالة الاجراء"}, + "usageStatus": {"en": "Usage Status", "ar": "حالة الاستخدام"}, + "unusedCount": {"en": "Unused Count:", "ar": "غير مستخدم:"}, + "totalApproval": {"en": "Total approval unused", "ar": "اجمالي الموافقات الغير مستخدمة"}, + "category": {"en": "Category: ", "ar": "الفئة"}, + "expirationDate": {"en": "Expiration Date: ", "ar": "تاريخ الانتهاء"}, + "patientCard": {"en": "Patient Card ID: ", "ar": "رقم الاشتراك"}, + "policyNumber": {"en": "Policy Number: ", "ar": "رقم بوليصة التامين:"}, + "seeDetails": {"en": "SEE DETAILS", "ar": "منافعك التامينية"}, + "insuranceCards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"}, + "requestType": {"en": "Request Type", "ar": "نوع الاستفسار"}, + "register-info-family": {"en": "How would like to add the new member?", "ar": "كيف ترغب باضافة العضو الجديد؟"}, + "remove-family-member": {"en": "Remove this member?", "ar": "إزالة ملف العضو؟"}, + "MyMedicalFile": {"en": "My Medical File", 'ar': 'الملف الطبي الالكتروني'}, + "myMedicalFileSubTitle": {"en": "All your medical records", 'ar': 'جميع سجلاتك الطبية'}, + "viewMore": {"en": "View More", 'ar': 'عرض المزيد'}, + "homeHealthCareService": {"en": "Home Health Care Service", 'ar': 'الرعاية الصحية المنزلية'}, + "OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'الصيدلية الإلكترونية'}, + "EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'}, + "OnlinePaymentService": {"en": "Online Payment Service", 'ar': 'خدمة الدفع الإلكتروني'}, + "OffersAndPackages": {"en": "Online transfer request", 'ar': 'طلب التحويل الالكتروني'}, + "ComprehensiveMedicalCheckup": {"en": "Comprehensive Medical Check-up", 'ar': 'فحص طبي شامل'}, + "HMGService": {"en": "HMG Service", 'ar': 'الخدمات الإلكترونية'}, + "ViewAllHabibMedicalService": {"en": "View All Habib Medical Service", 'ar': 'عرض خدمات الحبيب الطبية'}, + "viewAll": {"en": "View All", 'ar': 'عرض الكل'}, + "view": {"en": "View", 'ar': 'عرض'}, + "ContactUs": {"en": "Contact Us", 'ar': 'الوصول إلينا'}, + "contactUsLocation": { + "en": "P.O.Box: 91877 - Riyadh 11643, King Fahad Road - Olaya - Kingdom of Saudi Arabia", + 'ar': 'صندوق بريد: 91877 - الرياض 11643 ، طريق الملك فهد - العليا - المملكة العربية السعودية' + }, + "contactUsTime": { + "en": "Saturday - Wednesday 8:00 AM - 10 PM, Thursday 8:00 AM- 8:00 PM, Friday 2:00 PM - 8:00 PM", + 'ar': " السبت – الأربعاء 08:00 ص – 10:00 م , الخميس 08:00 ص – 08:00 م, الجمعة 02:00 م - 08:00 م" + }, + "ViewAllWaysReachUs": {"en": "View All Ways Reach Us", 'ar': 'جميع طرق الاتصال بنا'}, + "medicalProfile": {"en": "Medical Profile", 'ar': 'الملف الطبي'}, + "consultation": {"en": "Consultation", "ar": "استشارة"}, + "logs": {"en": "Logs", "ar": "السجلات"}, + "textToSpeech": {"en": "How May I Help You?", "ar": "كيف يمكنني مساعدتك؟"}, + "locationDialogMessage": { + "en": "Allow the HMG app to access your location will assist you in showing the hospitals according to the nearest to you.", + "ar": "السماح لتطبيق مجموعة الحبيب الطبية بالوصول إلى موقعك سيساعدك في إظهار المستشفيات وفقًا للأقرب إليك." + }, + "user-view-requester": {"en": "User Wants to View Your Medical File", "ar": "أشخاص يرغبون في الاطلاع على ملفك الطبي"}, + "user-view": {"en": "User Can View Your Medical File", "ar": "أشخاص مصرح لهم الاطلاع على ملفك الطبي"}, + "parking": {"en": "Parking", "ar": "مواقف"}, + "alhabiServices": {"en": "HMG Service", "ar": "خدمات الحبيب"}, + "parkingTitle": { + "en": + "Car service, car service, service to save parking information, return to it later, 1- By clicking on (Read the code), save the parking data. 2- By clicking on the button (view my car park), it shows you the car’s location in Google Maps. 3- Read another position by pressing the Clear Position Data button.", + "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- لإعادة قراءة موقف آخرعن طريق الضغط على زر(مسح بيانات الموقف)." + }, + "appointments": {"en": "Appointments", "ar": "مواعيد"}, + "all2": {"en": "All", "ar": "الكل"}, + "checkinOption": {"en": "Check-In", "ar": "لتسجيل الحضور"}, + "readBarcode": {"en": "Read Barcode", "ar": "قراءة الكود"}, + "showMyPark": {"en": "Show My Park", "ar": "عرض الموقف"}, + "clearMyData": {"en": "Clear My Data", "ar": "امسح البيانات"}, + "floor": {"en": "Floor:", "ar": "الطابق"}, + "gate": {"en": "Gate:", "ar": "بوابة"}, + "building": {"en": "Building:", "ar": "المبنى"}, + "branch": {"en": "Branch:", "ar": "الفرع"}, + "emergencyServices": {"en": "Emergency Services", "ar": "خدمات الطوارئ"}, + "nearester": {"en": "Nearest ER", "ar": "أقرب طوارى"}, + "locationa": {"en": "Location", "ar": "الموقع"}, + "call_now": {"en": "Call now", "ar": "اتصل الان"}, + "ambulancerequest": {"en": "Ambulance", "ar": "طلب النقل "}, + "requestA": {"en": "Request", "ar": "الاسعافي"}, + "NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"}, + "NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"}, + "noArrivedAppointments": {"en": "No Arrived Appointments", "ar": "لم يتم حضورها"}, + "MyAppointmentsList": {"en": "Appointments", "ar": "بمواعيدي"}, + "MyAppointments": {"en": "My", "ar": "قائمة"}, + "Radiology": {"en": "Radiology", "ar": "الأشعة"}, + "RadiologySubtitle": {"en": "Result", "ar": "صور وتقارير"}, + "Lab": {"en": "Lab", "ar": "نتائج"}, + "LabSubtitle": {"en": "Results", "ar": "تحليل المختبر"}, + "Medicines": {"en": "Medicines", "ar": "الوصفات"}, + "MedicinesSubtitle": {"en": "Prescriptions", "ar": "الطبية"}, + "VitalSigns": {"en": "Vital Signs", "ar": "المؤشرات"}, + "VitalSignsSubTitle": {"en": "Reports", "ar": "الحيوية"}, + "MyMedical": {"en": "Active", "ar": "الأدوية"}, + "MyMedicalSubtitle": {"en": "Medications", "ar": "النشطة"}, + "MyDoctor": {"en": "My Doctor", "ar": "اطبائي"}, + "MyDoctorSubtitle": {"en": "List", "ar": "قمت بزيارتهم"}, + "Eye": {"en": "Eye", "ar": "قياسات"}, + "EyeSubtitle": {"en": "Measurement", "ar": "النظر"}, + "Insurance": {"en": "Insurance", "ar": "بطاقات"}, + "InsuranceSubtitle": {"en": "Card", "ar": "التأمين"}, + "UpdateInsurance": {"en": "Update", "ar": "تحديث"}, + "UpdateInsuranceSubtitle": {"en": "Insurance", "ar": "التأمين"}, + "InsuranceApproval": {"en": "Insurance", "ar": "موافقات"}, + "InsuranceApprovalSubtitle": {"en": "Approvals", "ar": "التأمين"}, + "Allergies": {"en": "Allergies", "ar": "قائمة"}, + "AllergiesSubtitle": {"en": "List", "ar": "الحساسية"}, + "MyVaccines": {"en": "My Vaccines", "ar": "قائمة"}, + "MyVaccinesSubtitle": {"en": "List", "ar": "تطعيماتي"}, + "Medical": {"en": "Medical", "ar": "التقارير"}, + "MedicalSubtitle": {"en": "Report", "ar": "الطبية"}, + "Monthly": {"en": "Monthly", "ar": "التقارير"}, + "MonthlySubtitle": {"en": "Report", "ar": "الشهرية"}, + "Sick": {"en": "Sick", "ar": "الإجازات"}, + "SickSubtitle": {"en": "Leaves", "ar": "المرضية"}, + "MyBalance": {"en": "My Balance", "ar": "رصيد"}, + "MyBalanceSubtitle": {"en": "Credit", "ar": "محفظتي"}, + "PatientCall": {"en": "Patient Call", "ar": "النداء للموعد"}, + "PatientCallSubtitle": {"en": "Service", "ar": "خدمة"}, + "SmartWatches": {"en": "Smart Watches", "ar": "الساعات الذكية"}, + "SmartWatchesSubtitle": {"en": "Pairing", "ar": "ربط بيانات"}, + "MyTrackers": {"en": "My Trackers", "ar": "تتبع قراءاتي"}, + "MyTrackersSubtitle": {"en": "Service", "ar": "الطبية"}, + "AskYour": {"en": "Ask Your", "ar": "إسال طبيبك"}, + "AskYourSubtitle": {"en": "Doctor", "ar": "خدمة"}, + "Internet": {"en": "Internet", "ar": "الاتصال"}, + "InternetSubtitle": {"en": "Pairing", "ar": "بالإنترنت"}, + "Chatbot": {"en": "Chatbot", "ar": "شات بوت"}, + "ChatbotSubtitle": {"en": "", "ar": ""}, + "TimeLine": {"en": "Timeline", "ar": "الجدول الزمني"}, + "LabOrders": {"en": "Lab Orders", "ar": "تحاليل المختبر"}, + "BillNo": {"en": "Bill No:", "ar": "رقم الفاتورة"}, + "Prescriptions": {"en": "Prescriptions", "ar": "الوصفات الطبية"}, + "History": {"en": "History", "ar": "السجلات"}, + "OrderNo": {"en": "Order No", "ar": "رقم الطلب"}, + "OrderDetails": {"en": "Order Details", "ar": "تفاصيل الطلب"}, + "DeliveryDriverTrack": {"en": "Driver Tracking", "ar": "تتبع السائق"}, + "DeliveryLocation": {"en": "Delivery Location", "ar": "موقع التسليم"}, + "Driver": {"en": "Driver", "ar": "السائق"}, + "VitalSign": {"en": "Vital Sign", "ar": "العلامة حيوية"}, + "MonthlyReports": {"en": "Monthly Reports", "ar": "تقارير شهرية"}, + "km": {"en": "KMs:", "ar": "كم"}, + "km_": {"en": "KM", "ar": "كم"}, + "PatientHealthSummaryReport": {"en": "Patient Health Summary Report", "ar": " ملخص التقارير الشهرية"}, + "ToViewTheTermsAndConditions": {"en": "To View the Terms and Conditions Report", "ar": " عرض الشروط والأحكام "}, + "ClickHere": {"en": "Click here", "ar": "أنقر هنا"}, + "IAgreeToTheTermsAndConditions": {"en": "I agree to the terms and conditions ", "ar": "موافق على الشروط والاحكام "}, + "IAgreeToTheTermsAndConditionsSubtitle": { + "en": "I agree to the terms and conditions ", + "ar": + "هذا ملخص التقرير الصحي الشهري و الذي يسرد المؤشرات الصحية و نتائج التحاليل لأخر الزيارات. يرجى ملاحظة أن هذا التقرير يتم ارساله بشكل آلي من النظام و لا يعتبر رسمي و لا تؤخذ عليه أي قرارات طبية" + }, + "Save": {"en": "Save", "ar": "حفظ "}, + "UserAgreement": {"en": "User Agreement", "ar": "اتفاقية الخصوصية "}, + "UpdateSuccessfully": {"en": "Update Successfully", "ar": "تم التحديث بنجاح"}, + "CHECK_VACCINE_AVAILABILITY": {"en": "CHECK VACCINE AVAILABILITY", "ar": "التحقق من توفر اللقاح"}, + "MyVaccinesAvailability": {"en": "MyVaccinesAvailability", "ar": "توفر لقاحي"}, + "PaymentService": {"en": "Payment Service", "ar": "خدمة المدفوعات"}, + "PaymentOnline": {"en": "Service", "ar": "الالكتروني"}, + "OnlineCheckIn": {"en": "Online Check-In", "ar": "مدفوعات معلقة"}, + "MyBalances": {"en": "My Balances", "ar": "رصيدي"}, + "MyWallet": {"en": "My Wallet", "ar": "محفظتى"}, + "BalanceAmount": {"en": "Wallet Amount", "ar": "مبلغ المحفظة"}, + "TotalBalance": {"en": "Total Balance", "ar": "إجمالي الرصيد"}, + "CreateAdvancedPayment": {"en": "Recharge Wallet", "ar": "شحن المحفظة"}, + "AdvancePayment": {"en": "Advance Payment", "ar": "الدفع مقدما"}, + "AdvancePaymentLabel": {"en": "You can create and add an Advanced Payment for your account or other accounts.", "ar": "يمكنك تحويل مبلغ لحسابك لدى المجموعة أو لحساب احد المراجعين"}, + "FileNumber": {"en": "File Number", "ar": "رقم الملف"}, + "Amount": {"en": "Amount *", "ar": "المبلغ *"}, + "DepositorEmail": {"en": "Depositor Email *", "ar": "البريد الإلكتروني للمودع *"}, + "Notes": {"en": "Notes", "ar": "ملاحظات"}, + "SelectPatientName": {"en": "Select Patient Name", "ar": "اختر اسم المراجع"}, + "SelectFamilyPatientName": {"en": "Family Members", "ar": "أفراد الأسرة"}, + "SelectHospital": {"en": "Select Hospital", "ar": "اختر المستشفى"}, + "selectCity": {"en": "Select City", "ar": "اختر المدينة"}, + "city": {"en": "City", "ar": "مدينة"}, + "distance": {"en": "Distance", "ar": "مسافه"}, + "MyAccount": {"en": "My Account", "ar": "حسابي"}, + "OtherAccount": {"en": "Other Account", "ar": "حساب آخر"}, + "SelectBeneficiary": {"en": "Select Beneficiary", "ar": "حدد المستفيد"}, + "ConfirmThePayment": {"en": "Confirm The Payment", "ar": "تأكيد عملية الدفع"}, + "DepositorName": {"en": "Depositor Name", "ar": "اسم المودع *"}, + "MobileNumber": {"en": "Mobile Number", "ar": "رقم الجوال"}, + "phone-number": {"en": "Phone Number", "ar": "رقم الجوال"}, + "country": {"en": "Country", "ar": "دولة"}, + "Ok": {"en": "Ok", "ar": "موافق"}, + "averageWaitingTime": {"en": "Average Waiting Time:", "ar": "متوسط ​​وقت الانتظار:"}, + "waitingTime": {"en": "Expected waiting time:", "ar": "وقت الانتظار المتوقع:"}, + "WaterConsumedInWeek": {"en": "Water consumed in a week", "ar": "معدل شرب الماء خلال الاسبوع"}, + "WaterConsumedInMonth": {"en": "Water consumed in a month", "ar": "معدل شرب الماء خلال الشهر"}, + "TheVerificationCodeExpiresIn": {"en": "The Verification Code Expires in", "ar": "تنتهي صلاحية رمز التحقق في"}, + "PleaseEnterTheVerificationCode": {"en": "Please enter the verification code send to", "ar": "الرجاء إدخال رمز التحقق المرسل إلى"}, + "EyeMeasurements": {"en": "Eye Measurements", "ar": "قياسات النظر"}, + "Measurements": {"en": "Measurements", "ar": "قياسات"}, + "Classes": {"en": "Glasses", "ar": "نظارات"}, + "ContactLens": {"en": "Contact Lens", "ar": "العدسات اللاصقة"}, + "RightEye": {"en": "Right Eye", "ar": "العين اليمين"}, + "Sphere": {"en": "Sphere", "ar": "القوة"}, + "Cylinder": {"en": "Cylinder", "ar": "الدائرية"}, + "Axis": {"en": "Axis", "ar": "المحاور"}, + "Prism": {"en": "Prism", "ar": "موشور"}, + "VA": {"en": "VA", "ar": "فرجينيا"}, + "LeftEye": {"en": "Left Eye", "ar": "العين اليسرى"}, + "Brand": {"en": "Brand", "ar": "النوع"}, + "Power": {"en": "Power", "ar": "القوة"}, + "Diameter": {"en": "Diameter", "ar": "القطر"}, + "Remarks": {"en": "Remarks", "ar": "ملاحظات"}, + "ActiveMedications": {"en": "Active Medications", "ar": "ادويتي النشطة"}, + "ExpDate": {"en": "Active Exp Date :", "VA": "تاريخ الإنتهاء"}, + "Route": {"en": "Route", "ar": "الطريقة"}, + "Frequency": {"en": "Frequency", "ar": "المعدل"}, + "DailyQuantity": {"en": "Daily Quantity :", "ar": "جرعات يومية"}, + "AddReminder": {"en": "Add Reminder", "ar": "إضافة تذكير"}, + "CancelReminder": {"en": "Cancel Reminder", "ar": "إلغاء تذكير"}, + "reminderDes": { + "en": "Please select treatment start day and time to be notified when it\'s time to take the medicine", + "ar": "يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء" + }, + "pleaseSelectAllQuestionToContinue": {"en": "Please answer all questions to continue...", "ar": "يرجى الإجابة على جميع الأسئلة للمتابعة..."}, + "StartDay": {"en": "Start Day", "ar": "يوم البداية"}, + "EndDay": {"en": "End Day", "ar": "يوم الانتهاء"}, + "Days": {"en": "Days ", "ar": "أيام"}, + "please-verify": {"en": "Please Verify ", "ar": "ارجوك تحقق"}, + "ScheduleTime": {"en": "Schedule time", "ar": "الجدول الزمني"}, + "AskDoctor": {"en": "Ask Doctor", "ar": "اسأل طبيبك"}, + "DoctorResponses": {"en": "Doctor Responses", "ar": "ردود الأطباء"}, + "New": {"en": "New", "ar": "جديد"}, + "All": {"en": "All", "ar": "الكل"}, + "dailyWater": {"en": "Daily Water Check", "ar": "فحص المياه اليومي"}, + "QuestionHere": {"en": "Enter the question here...", "ar": "اضف الاستفسار هنا"}, + "ViewDoctorResponses": {"en": "View Doctor Responses", "ar": "الاطلاع على ردود الأطباء"}, + "ServiceInformationButton": {"en": "LOGIN / REGISTER", "ar": "دخول / تسجيل"}, + "ServiceInformationTitle": {"en": "Service Information", "ar": "معلومات الخدمة"}, + "ServiceInformation": {"en": "Service Information", "ar": "معلومات الخدمة"}, + "HomeHealthCare": {"en": "Home Health Care", "ar": " الرعاية الصحية المنزلية "}, + "noAppointmentAvailable": {"en": "No Available Appointments", "ar": "لا توجد مواعيد متاحة"}, + "HomeHealthCareText": { + "en": + "This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.", + "ar": + "توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية – الاشعة – التطعيمات – العلاج الطبيعي) ... " + }, + "LoginRegister": {"en": "Login/Register", "ar": "دخول / تسجيل"}, + "OrderLog": {"en": "Order Log", "ar": " سجل الطلبات"}, + "info-lab": { + "en": "This service allows you to view the results of all laboratory tests performed in Al Habib Medical Group as well as sending the report via e-mail.", + "ar": "خدمة نتائج المختبر: هذه الخدمة تمكنك من الاطلاع على نتائج جميع الفحوصات المخبرية التي تمت في مجموعة الحبيب الطبية." + }, + "info-radiology": { + "en": "This service allows you to view the reports and photos of radiology in Al Habib Medical Group as well as send the report by e-mail.", + "ar": "خدمة الاشعة: هذه الخدمة تمكنك من الاطلاع على تقارير وصور الاشعة التي تمت في مجموعة الحبيب الطبية وكذلك ارسال التقرير عن طريق الايميل." + }, + "noReviewsAvailable": {"en": "No Reviews Available", "ar": "لا يوجد تقييمات"}, + "noLocationAvailable": {"en": "No Location Available", "ar": "لا يوجد موقع"}, + "orders": {"en": "Orders", "ar": "الطلبات"}, + "lakum": {"en": "Lakum", "ar": "برنامج لكم"}, + "lakumMsg": {"en": "No Details of Points Are There", "ar": " لاتوجد تفاصيل عن النقاط"}, + "lakumPoint": {"en": "Point", "ar": "نقطه"}, + "wishlist": {"en": "Wishlist", "ar": "المفضلة"}, + "products": {"en": "Products", "ar": "المنتجات"}, + "reviews": {"en": "Reviews", "ar": "التقييمات"}, + "brands": {"en": "Brands", "ar": "العلامات التجارية"}, + "productDetails": {"en": "Product Details", "ar": "تفاصيل المنتج"}, + "medicationRefill": {"en": "Medication Refill", "ar": "تعبئة الأدوية"}, + "pillReminder": {"en": "Pill Reminder", "ar": "تذكير الأدويه"}, + "shippingAddresses": {"en": "Shipping Addresses", "ar": "عناوين الشحن"}, + "reachUs": {"en": "Reach Us", "ar": "الوصول لنا"}, + "ourLocations": {"en": "Our Locations", "ar": "مواقعنا"}, + "edit": {"en": "Edit", "ar": "تعديل"}, + "whatsApp": {"en": "Whats App", "ar": " واتس اب"}, + "phone": {"en": "Phone", "ar": " هاتف"}, + "delete": {"en": "Delete", "ar": " حذف"}, + "deleteAddress": {"en": "Are you sure want to delete", "ar": " هل انت متأكد تريد حذف هذا العنوان"}, + "deletedAddres": {"en": "Address has been deleted", "ar": " تم حذف العنوان"}, + "addAddress": {"en": "ADD A NEW ADDRESS", "ar": " اضافة عنوان جديد"}, + "addNewAddress": {"en": "Add New Address", "ar": " اضافة عنوان جديد"}, + "order": {"en": "My Order", "ar": " طلباتي"}, + "delivered": {"en": "Delivered", "ar": " تم التوصيل"}, + "pending": {"en": "Pending", "ar": " معلقة "}, + "enterNameHere": {"en": "Enter Your Name", "ar": "أدخل أسمك"}, + "processing": {"en": "Processing", "ar": " تحت المعالجة"}, + "cancelled": {"en": "Cancelled", "ar": " ملغي"}, + "writeReview": {"en": "Write Review", "ar": " اكتب تقييمك"}, + "shareReview": {"en": "SHARE REVIEW", "ar": " اكتب تقييمك"}, + "review": {"en": " reviews", "ar": "تقييمات"}, + "viewMedicalFile": {"en": "View Details", "ar": "عرض الملف الطبي"}, + "viewAllServices": {"en": "View All Services", "ar": "عرض جميع الخدمات"}, + "medicalFile": {"en": "Medical File", "ar": "ملفي الطبي"}, + "verified": {"en": "Verified", "ar": "تم التحقق"}, + "checkup": {"en": "Checkup", "ar": "فحص"}, + "hhcHome": {"en": "Home", "ar": "الرعاية"}, + "refferal": {"en": "E-Refferal", "ar": "الإحالة الإلكترونية"}, + "refferalTitle": {"en": "E-Refferal", "ar": "خدمات"}, + "refferalSubTitle": {"en": "Service", "ar": "الإحالة الإلكترونية"}, + "healthCare": {"en": "Health Care", "ar": "الصحية المنزلية"}, + "emergency": {"en": "Emergency", "ar": "الطوارئ"}, + "erservices": {"en": "Emergency", "ar": "الطوارئ"}, + "services2": {"en": "Services", "ar": "خدمات"}, + "cantSeeProfile": {"en": "To view your medical profile, please log in or register now", "ar": "لتصفح ملفك الطبي الرجاء تسجيل الدخول أو التسجيل الآن"}, + "loginRegisterNow": {"en": "Login or Register Now", "ar": "تسجيل الدخول أو التسجيل الآن"}, + "HMGPharmacy": {"en": "HMG Pharmacy", "ar": "صيدلية HMG"}, + "ecommerceSolution": {"en": "Ecommerce Solution", "ar": "حل التجارة الإلكترونية"}, + "comprehensive": {"en": "Comprehensive", "ar": "شامل"}, + "onlineConsulting": {"en": "Online Consulting", "ar": "استشارات فورية عن بعد"}, + "pendingOrder": {"en": " PENDING", "ar": " معلقة"}, + "deliveredOrder": {"en": " DELIVERED", "ar": "تم التوصيل"}, + "processingOrder": {"en": " PROCESSING", "ar": "قيد التنفيذ"}, + "cancelledOrder": {"en": " CANCELLED", "ar": "ملغي"}, + "compare": {"en": " Compare", "ar": "مقارنه"}, + "medicationsRefill": {"en": " Medication Refill", "ar": "طلب أعادة صرف"}, + "recommended": {"en": " Recommended for You", "ar": "موصى لك"}, + "myPrescription": {"en": " My Prescriptions", "ar": "وصفاتي"}, + "quantity": {"en": " QTY ", "ar": "الكمية"}, + "reviewAppointment": {"en": " Review Appointment ", "ar": "مراجعة الموعد"}, + "backMyAccount": {"en": "BACK TO MY ACCOUNT ", "ar": "الرجوع لحسابي الشخصي"}, + "reviewSuccessful": {"en": "Review Successful", "ar": " تقييم ناجح"}, + "reviewShared": {"en": "Your review has been shared on product review section", "ar": " تمت مشاركة تقييمك في قسم تقييم المنتج"}, + "reviewComment": {"en": "Your reviews help other to choose better product", "ar": " تقييمك سوف يساعد الأخرين في اختيار المنتج الأفضل"}, + "shippedMethod": {"en": "SHIP BY:", "ar": " الشحن بواسطة:"}, + "orderDetail": {"en": "Order Details", "ar": " تفاصيل الطلب"}, + "orderSummary": {"en": "Order Summary", "ar": " تفاصيل المنتج"}, + "subtotal": {"en": "Subtotal", "ar": " المجموع الفرعي"}, + "shipping": {"en": "Shipping", "ar": " الشحن"}, + "shipBy": {"en": "SHIP BY:", "ar": "الشحن عن طريق:"}, + "lakumPoints": {"en": "Lakum Points", "ar": "نقاط برنامج لكم"}, + "useLakumPoints": {"en": "Use Lakum points", "ar": "استخدم برنامج لكم"}, + "use": {"en": "USE", "ar": "استخدم"}, + "proceedPay": {"en": "PROCEED TO PAY", "ar": "المتابعة للدفع"}, + "vat": {"en": "VAT (15%)", "ar": "(15%) القيمة المضافة"}, + "inclusiveVat": {"en": "(inclusive VAT)", "ar": "(شامل الضريبة)"}, + "items": {"en": "item(s)", "ar": "عنصر"}, + "checkOut": {"en": "CHECK OUT", "ar": "الدفع"}, + "sar": {"en": "SAR", "ar": " ر.س "}, + // "sar": {"en": "", "ar": " "}, + "aed": {"en": "AED", "ar": "درهم"}, + "payOnline": {"en": "PAY ONLINE", "ar": "اتمام عملية الدفع "}, + "cancelOrder": {"en": "CANCEL ORDER", "ar": "الغاء الطلب "}, + "confirmAddress": {"en": "CONFIRM ADDRESS ", "ar": " تأكيد العنوان "}, + "confirmLocation": {"en": "CONFIRM LOCATION ", "ar": " تأكيد الموقع "}, + "conditionsHMG": {"en": "Terms & Conditions ", "ar": "الشروط و الأحكام "}, + "conditions": {"en": "Terms & Conditions of Lakum", "ar": "شروط واحكام برنامج لكم"}, + "confirmDeleteMsg": {"en": "Are you sure! want to delete ", "ar": "هل انت متأكد من الحذف "}, + "confirmDelete": {"en": "DELETE", "ar": "حذف"}, + "confirmCancellation": {"en": "Are you sure! want to cancel this order ", "ar": "هل انت متأكد من حذف هذا المنتج "}, + "orderNumber": {"en": "Order#: ", "ar": "الطلب: "}, + "orderDate": {"en": "Date", "ar": "التاريخ:"}, + "itemsNo": {"en": "items(s)", "ar": "عناصر"}, + "noOrder": {"en": "You Don't have any orders.", "ar": "ليس لديك طلبات"}, + "noResult": {"en": "No Result.", "ar": "لا يوجد نتائج"}, + "nonRecommended": {"en": "No Recommended Products.", "ar": "لا يوجد منتجات"}, + "TermsService": {"en": "Terms of Service", "ar": "شروط الخدمه"}, + "Beforeusing": {"en": "Before using the checkup, please read Terms of Service.", "ar": "قبل استخدام الفحص ، يرجى قراءة شروط الخدمة"}, + "accept": {"en": "I read and accept Terms of Service and Privacy Policy", "ar": "قرأت ووافقت على شروط الخدمة وسياسة الخصوصية"}, + "data-safe-info": {"en": "Information that you provide is anonymous and not shared with anyone.", "ar": "المعلومات التي تقدمها لا تتم مشاركتها مع أي شخص"}, + "data-safe": {"en": " Your data is safe.", "ar": "بياناتك آمنة"}, + "informational": {"en": "Checkup is for informational purposes and is not a qualified medical opinion", "ar": "الفحص هو لأغراض معلوماتية وليس رأي طبي مؤهل"}, + "not-use-in-emerbency": {"en": "Do not use in emergencies.", "ar": "لا تستخدم في حالات الطوارئ"}, + "not-use-in-emerbency-details": {"en": "In case of health emergency, ", "ar": "في حالة الطوارئ اتصل بأقرب رقم للطوارئ على الفور"}, + "not-use-in-emerbency-details-call": {"en": "call the nearest emergency number immediately", "ar": " اتصل بأقرب رقم للطوارئ على الفور"}, + "check-diagnosis": {"en": "Checkup is not a diagnosis.", "ar": "الفحص ليس تشخيص."}, + "remeberthat": {"en": "Remember that", "ar": "تذكر ذلك:"}, + "loginToUseService": {"en": "You need to login to use this service", "ar": "هذة الخدمة تتطلب تسجيل الدخول"}, + "offersAndPromotions": {"en": "OFFERS & SPECIAL PROMOTIONS", "ar": "العروض والترقيات الخاصة"}, + "offers": {"en": "OFFERS", "ar": "العروض"}, + "myPrescriptions": {"en": "MY PRESCRIPTIONS", "ar": "وصفاتي"}, + "searchAndScanMedication": {"en": "SEARCH & SCAN FOR MEDICATION", "ar": "البحث والمسح للأدوية"}, + "shopByBrands": {"en": "Shop by Brands", "ar": "تسوق حسب الماركات"}, + "recentlyViewed": {"en": "Recently Viewed", "ar": "شوهدت مؤخرا"}, + "bestSellers": {"en": "Best Seller", "ar": "الأكثر مبيعأ"}, + "deleteAllItems": {"en": "Delete All Items", "ar": "حذف كافة العناصر"}, + "total": {"en": "Total", "ar": "المجموع"}, + "totalWithColonRight": {"en": "Total:", "ar": "المجموع"}, + "selectAddress": {"en": "Select Address", "ar": "حدد العنوان"}, + "shippingAddress": {"en": "SHIPPING ADDRESS", "ar": "عنوان الشحن"}, + "changeAddress": {"en": "Change Address", "ar": "تغيير العنوان"}, + "selectPaymentOption": {"en": "Select Payment Option", "ar": "حدد طريقة الدفع"}, + "selectTamaraPlan": {"en": "Select Tamara Payment Plan", "ar": "حدد خطة الدفع تمارا"}, + "changeMethod": {"en": "Change Method", "ar": "تغيير طريقة الدفع"}, + "reviewOrder": {"en": "Review Order", "ar": "مراجعة الطلب"}, + "active": {"en": "ACTIVE", "ar": "فعال"}, + "inactive": {"en": "INACTIVE", "ar": "غير فعال"}, + "balance": {"en": "BALANCE", "ar": "الحالي"}, + "gained": {"en": "GAINED", "ar": "المكتسب"}, + "consumed": {"en": "Consumed", "ar": "المستهلك"}, + "transferred": {"en": "TRANSFERRED", "ar": "المحول"}, + "RIYAL": {"en": "RIYAL", "ar": "ريال"}, + "MEMBERSINCE": {"en": "MEMBER SINCE", "ar": "تاريخ العضوية"}, + "IDENTIFICATION": {"en": "IDENTIFICATION", "ar": "رقم الهوية"}, + "lakumMobile": {"en": "lakum Mobile", "ar": "رقم الجوال"}, + "Waitinggained": {"en": "Waiting gained", "ar": " بأنتظار التفعيل"}, + "Expired": {"en": "Expired", "ar": "منتهية الصلاحيه"}, + "WillBeExpired": {"en": "Will Be Expired", "ar": "ستنتهي صلاحيتها"}, + "LakumPoint": {"en": "Lakum Points", "ar": "نقاط لكم"}, + "ActivateLAKUMAccount": {"en": "Activate LAKUM Account", "ar": "تفعيل لكم"}, + "checkBeneficiary": {"en": "CHECK BENEFICIARY", "ar": "تحقق من المستفيد"}, + "beneficiaryName": {"en": "Beneficiary Name", "ar": "اسم المستفيد"}, + "accountActivation": {"en": "Account Activation", "ar": "تفعيل الحساب"}, + "lakumTransfer": {"en": "Lakum Transfer", "ar": "تحويل نقاط لكم"}, + "acceptLbl": {"en": "Accept", "ar": "موافق"}, + "declineLbl": {"en": "Decline", "ar": "رفض"}, + "select-gender": {"en": "Select Gender", "ar": "اختر الجنس"}, + "i-am-a": {"en": "I am a ...", "ar": "أنا ..."}, + "select-age": {"en": "Select Your Age", "ar": "حدد العمر"}, + "select": {"en": "Select", "ar": "اختر"}, + "i-am": {"en": "I am", "ar": "أنا"}, + "years-old": {"en": "years old", "ar": "سنة"}, + "drag-point": {"en": "Drag point to change your age", "ar": "اسحب لتغيير عمرك"}, + "refine": {"en": "Refine", "ar": "تصفية"}, + "subGroup": {"en": "Subgroup", "ar": "مجموعة فرعيه"}, + "max": {"en": "Max", "ar": "اعلى"}, + "compeleteOrderMsg": {"en": "Order has been placed successfully!!", "ar": "تم اتمام الطلب بنجاح"}, + "addToCompareMsg": {"en": "You have added a product to the Compare list", "ar": "تمت الاضافه لقائمة المقارنه"}, + "itInListMsg": {"en": "Item is already in the list", "ar": "المنتج موجود في القائمه"}, + "compareListFull": {"en": "Your compare list is full", "ar": "قائمة المقارنة ممتلئه"}, + "addQuantity": {"en": "You should add quantity", "ar": "اختر الكمية"}, + "addToCartMsg": {"en": "You have added a product to the cart", "ar": "تمت اضافة المنتج بنجاح"}, + "addToWishlistMsg": {"en": "You have added a product to the Wishlist", "ar": "تمت الاضافة لقائمة المفضله"}, + "notifyMeMsg": {"en": "You will be notified when product available", "ar": "سيتم اخبارك في حال توفر المنتج"}, + "removeFromWishlistMsg": {"en": "You have removed a product from the Wishlist", "ar": "تمت ازالة المنتج بنجاح"}, + "min": {"en": "Min", "ar": "اقل"}, + "reset": {"en": "Reset", "ar": "اعادة تعيين"}, + "apply": {"en": "Apply", "ar": "تطبيق"}, + "viewCategorise": {"en": "View All Categories", "ar": "عرض جميع الفئات"}, + "viewSubCategorise": {"en": "View All Sub Categories", "ar": "عرض جميع الفئات الفرعيه"}, + "categorise": {"en": "Categories", "ar": "الفئات"}, + "wishList": {"en": "WishList", "ar": "المفضلة"}, + "myAccount": {"en": "My Account", "ar": "حسابي"}, + "cart": {"en": "Cart", "ar": "التسوق"}, + "Alhabibapp": {"en": "Al Habib app", "ar": "تطبيق الحبيب"}, + "searchProductHere": {"en": "Search Product here", "ar": "البحث عن منتج"}, + "HHCNotAuthMsg": { + "en": + "This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.", + "ar": + "توفر هذه الخدمة مجموعه من خدمات الرعايه الصحيه المنزلية و متابعه مستمره وشامله للذين لا يستطيعون الوصول للمنشات الصحيه في اماكن اقامتهم (التحاليل المخبرية – الاشعة – التطعيمات – العلاج الطبيعي) ..." + }, + "email": {"en": "Email *", "ar": "البريد الالكتروني *"}, + "Book": {"en": "Book", "ar": "حجز"}, + "AppointmentLabel": {"en": "Appointment", "ar": "موعد"}, + "BloodType": {"en": "Blood Type", "ar": "فصيلة الدم"}, + "marital-status": {"en": "Marital status", "ar": "الحالة الإجتماعية"}, + "general": {"en": "General", "ar": "عام"}, + "profile": {"en": "Profile", "ar": "ملفي"}, + "notifications": {"en": "Notifications", "ar": "إشعارات"}, + "notificationDetails": {"en": "Notification Details", "ar": "تفاصيل الاشعار"}, + "notificationDetailsa": {"en": "Notification Details", "ar": "تفاصيل الاشعار"}, + "info-my-doctor-points": { + "en": [ + "View the doctor's profile and qualifications.", + "View the doctor's schedule.", + "View details of your appointments with the selected doctor.", + "Book appointment with the doctor. ", + ], + "ar": ["الاطلاع على معلومات الطبيب ومؤهلاته.", "الاطلاع على جدول الطبيب.", "الاطلاع على تفاصيل المواعيد التي تمت مع الطبيب.", "حجز موعد مع الطبيب."] + }, + "info-my-doctor": { + "en": "This service allows you to see all the doctors you have visited in Al Habib Medical Group, and through this service:", + "ar": "خدمة اطبائي: هذه الخدمة تمكنك من الاطلاع على جميع الاطباء الذين قمت بزيارتهم في مجموعة الحبيب الطبية, كما تستطيع من خلال هذه الخدمة:" + }, + "info-prescriptions": { + "en": "This service allows you to view all the medical prescriptions issued by Al Habib Medical Group, and through this service, you can:", + "ar": "خدمة الوصفات الطبية: هذه الخدمة تمكنك من الاطلاع على جميع الوصفات الطبية التي تم اصدارها في مجموعة الحبيب الطبية، كما تستطيع من خلال هذه الخدمة:" + }, + "info-my-prescription-points": { + "en": [ + "View the duration days.", + "View the frequency timing.", + "View the doctor's remarks.", + "Add a reminder to remind you when to take medicine doses.", + "Search in AlHabib Pharmacies about the branches where medicines are available, pharmacies locations and contact numbers.", + "Ordering and delivery medications online.", + "View the prices of the drug. ", + ], + "ar": [ + "الاطلاع على طريقة تناول العلاج.", + "الاطلاع على مدة تناول العلاج.", + "الاطلاع على ملاحظات الطبيب.", + "اضافة منبه للتذكير بموعد تناول جرعات الادوية.", + "البحث في صيدليات الحبيب عن الفروع التي يتوفر فيها العلاج وكذلك مواقع الصيدليات وارقام الاتصال. ", + "امكانية شراء وتوصيل العلاج عن طريق الانترنت.", + "الاطلاع على اسعار الادوية المصروفة." + ] + }, + "info-insurance-cards": { + "en": "This service allows you to view all the insurance cards that recorded during your visits to Al Habib Medical Group in addition to:", + "ar": "خدمة بطاقات التامين: هذه الخدمة تمكنك من الاطلاع على جميع بطاقات التامين والتي تم تسجيلها اثناء زياراتك لمجموعة الحبيب الطبية بالاضافة الى:" + }, + "info-insurance-cards-points": { + "en": [ + "Name of the insurance company.", + "Insurance category.", + "Insurance policy number.", + "The expiry date of insurance.", + "The status of the insurance card (active or inactive).", + "Details of the coverage, e.x the room category covered as well some cases covered by the insurance.", + ], + "ar": [ + "اسم شركة التامين.", + "فئة التامين.", + "رقم بوليصة التامين.", + "تاريخ انتهاء التامين.", + "حالة بطاقة التامين (فعالة او غير فعالة).", + "تفاصيل التامين، مثلاً: مستوى الغرفة التي يغطيها التامين وكذلك الحالات التي يغطيها التامين.", + ] + }, + "info-allergies": { + "en": "This service allows you to view all types of allergies recorded during your visits to Al Habib Medical Group.", + "ar": "خدمة الحساسية: هذه الخدمة تمكنك من الاطلاع على جميع انواع الحساسية التي تم تسجيلها خلال زياراتك في مجموعة الحبيب الطبية." + }, + "sick-leaves": {"en": "Sick Leaves", "ar": "الاجازات المرضية"}, + "info-sick-leaves": { + "en": "This service allows you to view all sick leaves that were taken in Al Habib Medical Group in addition to:", + "ar": "الاجازات المرضية: هذه الخدمة تمكنك من الاطلاع على جميع الاجازات المرضية والتي تم اصدارها في مجموعة الحبيب الطبية بالاضافة الى:" + }, + "info-sick-leave-points": { + "en": [ + "Doctor Name", + "Sick leave date ", + "Sick leave days", + "Branch that patient take the vaccination form.", + "Sending a report of vaccinations to the email. ", + ], + "ar": ["اسم الطبيب", "تاريخ الاجازة.", "عدد ايام الاجازة.", "الفرع الذي تم اصدار الاجازة منه.", "ارسال نسخة مختومة من الاجازة الى البريد الالكتروني."] + }, + "info-approvals": { + "en": "This service allows you to view all approvals requests that have been sent to the insurance companies in addition to:", + "ar": "خدمة الموافقات: هذه الخدمة تمكنك من الاطلاع على جميع طلبات الموافقات والتي تم ارسالها الى شركات التامين بالاضافة الى:" + }, + "info-approval-points": { + "en": [ + "View the total unused approvals.", + "Track the approvals status.", + ], + "ar": [ + "الاطلاع على اجمالي الموافقات الغير مستخدمة.", + "تتبع حالة الموافقة.", + ] + }, + "month-report": {"en": "Monthly Reports", "ar": "تقاريري الشهرية"}, + "info-month-report": { + "en": + "Upon activation of this service, the system will send a monthly report automatically to the registered email which lists the vital signs and the results for the last visits made in AlHabib Medical Group.", + "ar": "خدمة التقارير الشهرية: عند تفعيل هذه الخدمة سيقوم النظام بارسال تقرير شهري بشكل آلي على الايميل المسجل والذي يسرد المؤشرات الحيوية ونتائج التحاليل لآخر زيارات تمت بمجموعة الحبيب الطبية." + }, + "language-setting": {"en": "SMS, WhatsApp and Confirmation Calls Language", "ar": "لغة الرسائل القصيرة والواتس اب وتأكيد المكالمات"}, + "alert": {"en": "Alerts", "ar": "التنبيهات"}, + "email-alert": {"en": "Alert by Email", "ar": "استلام التنبيهات بالبريد الالكتروني"}, + "sms-alert": {"en": "Alert by SMS", "ar": "استلام التنبيهات بالرسائل القصيرة"}, + "contact-info": {"en": "Contact Information", "ar": "معلومات التواصل"}, + "emrg-name": {"en": "Emergency Contact Name", "ar": "اسم للتواصل في حالة الطوارئ"}, + "emrg-no": {"en": "Emergency Contact Number", "ar": "رقم للتواصل في حالة الطوارئ"}, + "modes": {"en": "Modes", "ar": "الاوضاع"}, + "vibration": {"en": "Vibration Touch Feedback", "ar": "الاهتزاز عند اللمس"}, + "blind-modes": {"en": "Modes for Partially Blind", "ar": "تأثيرات لدعم ضعاف البصر"}, + "invert-theme": {"en": "Invert", "ar": "ألوان سلبية"}, + "off-theme": {"en": "Off", "ar": "إيقاف"}, + "dim-theme": {"en": "Dim", "ar": "ضوء خافت"}, + "bw-theme": {"en": "Black and White", "ar": "أبيض و أسود"}, + "permissions": {"en": "Permission", "ar": "الصلاحيات"}, + "camera-permission": {"en": "Camera", "ar": "الكاميرا"}, + "location-permission": {"en": "Location", "ar": "تحديد المواقع"}, + "needPrescription": {"en": "This product requires a prescription", "ar": " هذا المنتج يتطلب وصفة طبية"}, + "outOfStockMsg": {"en": "You have added product which is out of stock now, Please remove that!", "ar": "لقد قمت بإضافة المنتج الذي نفذ من المخزون الآن. يرجى إزالة ذلك"}, + "noArabicLetters": {"en": "It Is Not Allow to Use Arabic Letters", "ar": "غير مسموح باستخدام الحروف العربيه"}, + "noOffersAvailable": {"en": "No Offers Available!", "ar": "لايوجد عروض حاليا"}, + "accessibility": {"en": "Accessibility Mode", "ar": "وضع امكانية الوصول"}, + "orderStatus": {"en": "Order Status", "ar": "حالة الطلب"}, + "CancelOrder": {"en": "Cancel Order", "ar": "الغاء الطلب"}, + "FindUs": {"en": "Find Us", "ar": "اين تجدنا"}, + "Feedback": {"en": "Feedback", "ar": "رأيك يهمنا"}, + "LiveChat": {"en": "Live Chat", "ar": "محادثة مباشرة"}, + "Service": {"en": "Service", "ar": "خدمة"}, + "HMGServiceLabel": {"en": "HMG Service", 'ar': 'خدمات الحبيب'}, + "HealthWeatherIndicators": {"en": "Health Weather Indicators", 'ar': ' مؤشرات الطقس الصحية '}, + "HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية بناءاً على الطقس الحالي '}, + "MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "}, + "SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"}, + "ResendOrder": {"en": "Refill & Delivery", "ar": "إعادة صرف وتوصيل"}, + "Ports": {"en": "Ports", "ar": "المنافذ"}, + "Way": {"en": "Way", "ar": "الطريقة"}, + "Average": {"en": "Average", "ar": "متوسط"}, + "DailyDoses": {"en": "Daily Doses", "ar": "جرعات يومية"}, + "Period": {"en": "Period", "ar": "الفترة"}, + "duration": {"en": "Duration", "ar": "المدة"}, + "cm": {"en": "CM", "ar": "سم"}, + "ft": {"en": "ft", "ar": "قدم"}, + "kg": {"en": "kg", "ar": "كجم"}, + "lb": {"en": "lb", "ar": "رطل"}, + "birth_date": {"en": "Birth Date", "ar": "تاريخ الميلاد"}, + "date_of_birth": {"en": "Date of Birth", "ar": "تاريخ الولادة"}, + "mass": {"en": "Mass", "ar": "كتلة"}, + "temp-c": {"en": "°C", "ar": "°س"}, + "bpm": {"en": "bpm", "ar": "نبضة"}, + "respiration-signs": {"en": "Respiration", "ar": "تنفس"}, + "sys-dias": {"en": "SBP/DBP", "ar": "إنقباض/إنبساط"}, + "body": {"en": "Body Mass", "ar": "كتلة\nالجسم"}, + "body_string": {"en": "Body", "ar": "الجسم"}, + "face": {"en": "Face", "ar": "وجه"}, + "retouch": {"en": "Retouch", "ar": "روتوش"}, + "bikini": {"en": "Bikini", "ar": "بيكيني"}, + "totalMinutes": {"en": "Total Minutes", "ar": "إجمالي الدقائق"}, + "feedback": {"en": "Feedback", "ar": "رأيك يهمنا"}, + "send": {"en": "Send", "ar": "أرسل"}, + "status": {"en": "Status", "ar": "الحالة"}, + "like-to-hear": { + "en": "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form", + "ar": "يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة" + }, + "subject": {"en": "Subject", "ar": "الموضوع"}, + "message": {"en": "Message", "ar": "رسالة"}, + "empty-subject": {"en": "Please enter the subject", "ar": "يرجى ادخال الموضوع"}, + "empty-message": {"en": "Please enter message", "ar": "يرجى ادخال الرسالة"}, + "select-attachment": {"en": "Select Attachment", "ar": "إختر المرفق"}, + "complain-appo": {"en": "Complaint for appointment", "ar": "شكوى على موعد"}, + "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": "Appreciation", "ar": "تقدير"}, + "suggestion": {"en": "Suggestion", "ar": "إقتراح"}, + "your-feedback": {"en": "Your feedback was sent", "ar": "لقد تم ارسال اقتراحك شكرا لك"}, + "select-part": {"en": "Please select the part that complain about", "ar": "يرجى تحديد الجزء الذي تشكو منه"}, + "number": {"en": "Number", "ar": "الرقم"}, + "not-classified": {"en": "Not classified", "ar": "غير محدد"}, + "selectClinic": {"en": "Select Clinic", "ar": "اختر بالعيادة"}, + "selectProject": {"en": "Select Hospital", "ar": " بحث المستشفى"}, + "searchItemError": {"en": "Item name should be more than 3 character ", "ar": "يجب أن يكون الاسم المدخل أكثر من 3 أحرف"}, + "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": { + "en": "Dear customer there is no internet access, do you want to connect with HMG network to use our app, make sure you are in range of HMG network", + "ar": "عزيز العميل لا يوجد اتصال بالإنترنت, هل تريد الاتصال بشبكة مستشفى د. سليمان الحبيب لاستخدام التطبيق. يجب عليك ان تكون في نطاق شبكة المستشفى" + }, + "failedToAccessHmgServices": {"en": "Connected with HMG Network,\n\nBut failed to access HMG services", "ar": "Connected with HMG Network,\n\nBut failed to access HMG services"}, + "offerAndPackages": {"en": "Offers and Packages", "ar": "العروض والباقات"}, + "offerAndPackagesDetails": {"en": "This service allows you to view all HMG Offers:", "ar": "This service allows you to view all HMG Offers:"}, + "InvoiceNo": {"en": "Invoice No", "ar": "رقم الفاتورة"}, + "InvoiceDate": {"en": "Invoice Date", "ar": "تاريخ الفاتورة"}, + "SpecialResult": {"en": " Special Result", "ar": "نتيجة خاصة"}, + "GeneralResult": {"en": "General Result", "ar": "نتيجة عامة"}, + "show-more-btn": {"en": "Flow Chart", "ar": "النتائج التراكمية"}, + "view_flow_chart": {"en": "View Flowchart", "ar": "النتائج التراكمية"}, + "value": {"en": "Value", "ar": "القيمة"}, + "range": {"en": "Range", "ar": "المدى"}, + "out-patient": {"en": "Out Patient", "ar": "عيادات خارجية"}, + "in-patient": {"en": "In Patient", "ar": "تنويم"}, + "report": {"en": "Radiology Report", "ar": "تقرير الاشعة"}, + "open-rad": {"en": "Open Image", "ar": "فتح صور الاشعة"}, + "send-copy": {"en": "Email the Report", "ar": "أرسل التقرير"}, + "appoSurvey": {"en": "Survey", "ar": "الاستبيان"}, + "appoSurveySubtitle": {"en": "Survey", "ar": "الاستبيان"}, + "labResults": {"en": "Lab Results", "ar": "نتيجة المختبر"}, + "doctorRating": {"en": "Doctor Rating", "ar": "تقييم الطبيب"}, + "good": {"en": "Good", "ar": "جيد"}, + "v-good": {"en": "Very Good", "ar": "جيد جدا"}, + "excellent": {"en": "Excellent", "ar": "ممتاز"}, + "average": {"en": "Average", "ar": "متوسط"}, + "below-average": {"en": "Below Average", "ar": "أقل من المتوسط"}, + "info-signs": { + "en": "This service allows you to view all vital signs were performed in the Habib Medical Group, e.x (height, weight, body mass index, heart rate, etc.) as well shows some statistics charts.", + "ar": + "خدمة المؤشرات الحيوية: هذه الخدمة تمكنك من الاطلاع على جميع المؤشرات الحيوية على سبيل المثال (الطول، الوزن، مؤشر كتلة الجسم، معدل نبضات القلب الخ.) التي تمت في مجموعة الحبيب الطبية وكذلك رسوم بيانية على مستوى المؤشر." + }, + "info-advance-payment": { + "en": "This service designed so that you can deposit an amount in advance either in your account or in someone else's account with Al Habib Medical Group.", + "ar": "تم تصميم هذه الخدمة حتى تتمكن من دفع مبلغ مقدما او تحت الحساب سواء في حسابك او في حساب شخص اخر لدى مجموعة الحبيب الطبية." + }, + "info-my-balance": {"en": "This service allows you to check your balance in all branchs", "ar": "هذه الخدمه تتيح لك الاطلاع رصيدك في كل الفروع"}, + "er-contant": { + "en": "This service displays nearest branch among all the branches of Al Habib Medical Group based on your current location.", + "ar": "تعرض هذه الخدمة أقرب فرع من بين جميع فروع مجموعة الحبيب الطبية بناءً على موقعك الحالي." + }, + "er": {"en": "ER", "ar": "الطوارىء"}, + "transportation-Service": {"en": "Ambulance Request", "ar": "خدمات النقل الاسعافي"}, + "info-ambulance": { + "en": "Through this service, you can request evacuation by ambulance, whether from home or to home, in addition to a set of other services", + "ar": "عن طريق هذه الخدمة يمكنك طلب اخلاء بواسطة سيارة اسعاف سواء من المزل او الى المنزل بالاضافة الى مجموعة من الخدمات الاخرى" + }, + "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": "ذهاب"}, + "two-direc": {"en": "Two Ways", "ar": "ذهاب وعودة"}, + "pickup-location": {"en": "Pickup Location", "ar": "نقطة الانطلاق"}, + "pickup-spot": {"en": "Pickup Spot", "ar": "نقطة اللقاء"}, + "inside-home": {"en": "Inside Home", "ar": "داخل المنزل"}, + "have-appo": {"en": "Do you have an appointment?", "ar": "هل لديك موعد ؟"}, + "dropoff-location": {"en": "Dropoff Location", "ar": "نقطة الوصول"}, + "select-all": {"en": "Please select all fields", "ar": "يرجى تحديد جميع الحقول"}, + "select-map": {"en": "Select from Map", "ar": "حدد من الخريطة"}, + "no-appointment": {"en": "You don't have any appointments yet", "ar": "ليس لديك أي مواعيد حتى الآن"}, + "patient-share": {"en": "Amount before tax: ", "ar": "المبلغ قبل الضريبة:"}, + "patient-share-tax": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"}, + "patient-share-total": {"en": "Total amount payable: ", "ar": "المبلغ الإجمالي المستحق:"}, + "select-ambulate": {"en": "Select Ambulate", "ar": "بحاجة للتنقل بواسطة"}, + "wheelchair": {"en": "Wheelchair", "ar": "كرسي متحرك"}, + "walker": {"en": "Walker", "ar": "مشاية"}, + "stretcher": {"en": "Stretcher", "ar": "نقالة"}, + "none": {"en": "None", "ar": "لا شيء"}, + "RRT-Summary": {"en": "Summary", "ar": "ملخص الطلب"}, + "Rapid-Response-Team": {"en": "Rapid Response Team", "ar": "فريق الاستجابة السريع"}, + "AmountBeforeTax": {"en": "Amount Before Tax:", "ar": "المبلغ قبل الضريبة:"}, + "ApproximateServiceFee": {"en": "Service fee starting from", "ar": "تبدأ رسوم الخدمة من"}, + "TaxAmount": {"en": "Tax Amount:", "ar": "مبلغ الضريبة:"}, + "somethingWentWrongTryLater": {"en": "Sorry something went wrong please try again later", "ar": "نعتذر عن خدمتك يرجى المحاولة لاحقا"}, + "TotalAmountPayable": {"en": "Total Amount Payable:", "ar": " إجمالي المبلغ المستحق:"}, + "iAcceptTermsConditions": {"en": "I Accept the Terms and Conditions", "ar": "أوافق على الشروط والأحكام"}, + "YouCanPayByTheFollowingOptions": {"en": "You can pay by the following options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"}, + "RRTDDetails": { + "en": + "The Rapid response team provides a comprehensive medical service for all sorts of urgent and stable cases of all ages, including adult and paediatric patients, the service is covered by a fully equipped and highly trained medical team capable of providing the best medical care at the patient’s home.", + "ar": + "فريق الاستجابة السريعة يقوم بتقديم رعاية صحية متكاملة لجميع الحالات الطارئة و المستقرة، الخدمة تشمل جميع الأعمار بما في ذلك حالات الأطفال، تشمل الخدمة إرسال فريق طبي كامل الجاهزية و على مستوى عالي من التدريب قادر على تقديم أفضل رعاية صحية من داخل المنزل." + }, + "rrtService": {"en": "RRT Service", "ar": "خدمة RRT"}, + "bill-amount": {"en": "Bill Amount", "ar": "مبلغ الفاتورة"}, + "transport-method": {"en": "Transportation Method", "ar": "طريقة النقل"}, + "directions": {"en": "Directions", "ar": "الاتجاهات"}, + "info-my-appointments": { + "en": "This service allows you to see all the appointment you have visited in Al Habib Medical Group, and through this service:", + "ar": "خدمة مواعيدي: هذه الخدمة تمكنك من الاطلاع على جميع المواعيد التي قمت بزيارتهم في مجموعة الحبيب الطبية, كما تستطيع من خلال هذه الخدمة:" + }, + "info-todo": { + "en": "This service is designed to enable you to have a quick link to the list of tasks that need to be done", + "ar": "هذه الخدمة تم تصميمها لتمكنك من الوصول الى رابط سريع لقائمة المهام التي يجب القيام بها" + }, + "family-info": { + "en": "Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file.", + "ar": "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي." + }, + "update-succ": {"en": "Successfully updated profile", "ar": "تم تحديث البيانات بنجاح"}, + "dental-complains": {"en": "Symptoms", "ar": "الأعراض"}, + "empty-result": {"en": "There is no search results found", "ar": "لايوجد نتائج"}, + "no-booked-appointment": {"en": "No booked appointments", "ar": "لا يوجد مواعيد محجوزة"}, + "no-confirmed-appointment": {"en": "No confirmed appointments", "ar": "لا توجد مواعيد مؤكدة"}, + "no-arrived-appointment": {"en": "No arrived appointments", "ar": "لا يوجد مواعيد"}, + "upcoming-empty": {"en": "You do not have any Todo actions yet.", "ar": "ليس لديك أي إجراءات الآن."}, + "upcoming-timeLeft": {"en": "time left for appointment", "ar": "الوقت المتبقي للموعد"}, + "covid-test-all-services": {"en": "Covid-19 Drive-Thru Test", "ar": "فحص كورونا من داخل السيارة"}, + "pharmacy": {"en": "Pharmacy", "ar": "الصيدلية"}, + "ereferral": {"en": "E-Referral", "ar": "طلب التحويل"}, + "child-vaccine": {"en": "Child Vaccines", "ar": "تطعيمات الأطفال"}, + "calculators": {"en": "Health Calculators", "ar": "الحاسبات الصحية"}, + "converters": {"en": "Health Converter", "ar": "تحويل القياسات"}, + "waterTracker": {"en": "Water Tracker", "ar": "حساب كمية الماء"}, + "h2o": {"en": "H2O", "ar": "استهلاك"}, + "v-tour": {"en": "Virtual Tour", "ar": "جولة إفتراضية"}, + "hmg-news": {"en": "HMG News", "ar": "أخبار المجموعة"}, + "blood-d": {"en": "Blood Donation", "ar": "تبرع بالدم"}, + "symptomCheckerTitle": {"en": "Symptom Checker", "ar": "مدقق الأعراض"}, + "latest-news": {"en": "Latest News", "ar": "أحدث الأخبار"}, + "our-location": {"en": "Our Locations", "ar": "مواقعنا"}, + "pharmacies": {"en": "Pharmacies", "ar": "الصيدليات"}, + "hospitals": {"en": "Hospitals", "ar": "المستشفيات"}, + "wallet": {"en": "Wallet", "ar": "محفظة نقود"}, + "hmg": {"en": "Al Habib", "ar": "الحبيب"}, + "requested": {"en": "Requested", "ar": "مطلوب"}, + "ready": {"en": "Ready", "ar": "جاهز"}, + "completed": {"en": "Completed", "ar": "مكتمل"}, + "request-medical-report": {"en": "Request medical report", "ar": "طلب تقرير طبي"}, + "insur-cards": {"en": "Insurance Cards", "ar": "بطاقات التأمين"}, + 'labResult': {"en": "Lab results", "ar": "نتائج التحاليل المخبرية"}, + 'details': {'en': 'Details', 'ar': 'التفاصيل'}, + 'graph-details': {'en': 'Graph Details', 'ar': 'التفاصيل الرسم البياني'}, + "age": {"en": "Age", "ar": "العمر"}, + "active-insurence": {"en": "Active", "ar": "نشطة"}, + "not-active": {"en": "Not Active", "ar": "غير نشط"}, + "card-detail": {"en": "Insurance Details", "ar": "منافعك التامينية"}, + "Dr": {"en": "Dr. ", "ar": "الدكتور."}, + "empty": {"en": "You do not have any records.", "ar": "ليس لديك أي سجلات"}, + "last-visit": {"en": "How was your last visit with doctor?", "ar": "كيف تقيم زيارتك الأخيرة للطبيب؟"}, + "tap-title": {"en": "Please rate the doctor", "ar": "يرجى تقييم الطبيب"}, + "later": {"en": "Later", "ar": "لاحقاً"}, + "sendSuc": {"en": "A copy has been sent to the email", "ar": "تم إرسال نسخة إلى البريد الإلكتروني"}, + "instructions": { + "en": "You can now talk directly to the appointments department by chat or request a call back", + "ar": "يمكنك الان التحدث مباشرة مع قسم المواعيد عن طريق خدمة المحادثة النصية أو طلب معاودة الاتصال" + }, + "instructions-pharmacies": {"en": "You can now talk directly to the pharmacist by chat or request a call back", "ar": "يمكنك الآن التحدث مباشرة إلى الصيدلي عن طريق الدردشة أو طلب معاودة الاتصال"}, + "select-hospital": {"en": "Choose Hospital", "ar": "اختر المستشفىالمستشفى"}, + "start": {"en": "Start", "ar": "ابدأ"}, + "info-chat": { + "en": "This service allows you to chat with customer service directly without the need to call.", + "ar": "المحادثة المباشرة: هذه الخدمة تمكنك التحدث كتابياً مع خدمة العملاء مباشرة دون الحاجة الى الاتصال هاتفياً." + }, + "last-appointment": {"en": "How was your appointment?", "ar": "كيف كان موعدك الطبي ؟"}, + "rate-clinic": {"en": "Please rate the clinic", "ar": "يرجى تقييم العيادة"}, + "fetch-data": {"en": "Fetch Data", "ar": "تحديث الان"}, + "rate": {"en": "Rate", "ar": "تقييم"}, + "send-email": {"en": "Send a copy of this report to the email", "ar": "أرسل نسخة من هذا التقرير إلى البريد الإلكتروني"}, + "update-email-msg": {"en": "Email updated", "ar": "تم تحديث البريد الالكتروني"}, + "update-email": {"en": "Update Email", "ar": "تحديث البريد الالكتروني"}, + "booked-success": {"en": "The appointment has been successfully booked.", "ar": "لقد تم حجز الموعد بنجاح"}, + "appo-reminder-select-option-30": {"en": "Before 30 Mins", "ar": "قبل 30 دقيقة"}, + "appo-reminder-select-option-60": {"en": "Before 1 Hour", "ar": "قبل ساعة واحدة"}, + "appo-reminder-select-option-90": {"en": "Before 1 Hour and 30 mins", "ar": "قبل ساعة و 30 دقيقة"}, + "appo-reminder-select-option-120": {"en": "Before 2 Hours", "ar": "قبل ساعتين"}, + "noDataAvailable": {"en": "No data available", "ar": " لا يوجد بيانات متاحة "}, + "thename": {"en": "The Name", "ar": "الاسم"}, + "noSearchResult": {"en": "No Search Result", "ar": "لا توجد نتيجة بحث"}, + "selectFileSouse": {"en": "Select file souse", "ar": "حدد الملف"}, + "gallery": {"en": "Gallery", "ar": "معرض الصور"}, + "camera": {"en": "Camera", "ar": "كاميرا"}, + "med-report": {"en": "Medical Reports", "ar": "التقارير الطبية"}, + "new-med-report": {"en": "Requests", "ar": "الطلبات"}, + "requestReport": {"en": "Request a report", "ar": "طلب تقرير"}, + "confirm-msg-report": {"en": "Request for medical report?", "ar": "طلب تقرير طبي؟"}, + "successSendReport": {"en": "The request has been submitted successfully", "ar": "تم تنفيذ طلبك بنجاح"}, + "pulseTitle": {"en": "Heart rate", "ar": "معدل النبض بالدقيقة"}, + "systolic-lng": {"en": "Systolic", "ar": "الإنقباض"}, + "diastolic-lng": {"en": "Diastolic", "ar": "الإنبساط"}, + "policy-holder": {"en": "Policy Holder", "ar": "حامل بطاقة التأمين"}, + "policy-no": {"en": "Policy Number", "ar": "رقم السياسة"}, + "agree": {"en": "I agree, this is the correct information", "ar": "موافق، هذه المعلومات صحيحة"}, + "disagree": {"en": "No, this is not the correct information", "ar": "غير موافق، هذه المعلومات غير الصحيحة"}, + "expiry-date": {"en": "Expiry Date", "ar": "تاريخ انتهاء الصلاحية"}, + "class": {"en": "Class", "ar": "فئة"}, + "offersdiscount": {"en": "Offers", "ar": "العروض"}, + "explore": {"en": "Explore Now", "ar": "استكشف الآن"}, + "approval": {"en": "Approval", "ar": "موافقة"}, + "no-data": {"en": "No data found", "ar": "لاتوجد بيانات"}, + "insurance-details": {"en": "Insurance Details", "ar": "تفاصيل التأمين"}, + "nearest-hospital": {"en": "Nearest Hospital", "ar": "أقرب مستشفى"}, + "submitReview": {"en": "Your review has been Submitted successfully", "ar": "تم إرسال التقييم بنجاح"}, + "request-sent": {"en": "Request sent successfully", "ar": "تم إرسال الطلب بنجاح"}, + "message-sent": {"en": "Message sent successfully", "ar": "تم إرسال الرسالة بنجاح"}, + "sent-on": {"en": "Sent on", "ar": "أرسلت في"}, + "attach-insurace-image": {"en": "Attach insurance card image", "ar": "إرفاق صورة بطاقة التأمين"}, + "upload-without-image": {"en": "You can still submit, if you don't have Insurance Image", "ar": "لا يزال بإمكانك الإرسال ، إذا لم يكن لديك صورة تأمين"}, + "info-insur-cards": { + "en": "This service allows you to view all the insurance cards that recorded during your visits to Al Habib Medical Group in addition to:", + "ar": "خدمة بطاقات التامين: هذه الخدمة تمكنك من الاطلاع على جميع بطاقات التامين والتي تم تسجيلها اثناء زياراتك لمجموعة الحبيب الطبية بالاضافة الى:" + }, + "scan-now": {"en": "If you have a card/Document Scan now", "ar": "إذا كانت لديك بطاقة / مستند ارفقها الان"}, + "liveCare": {"en": "Live Care", "ar": "لايف كير"}, + "topBrands": {"en": "Top Brands", "ar": "اعلى العلامات التجارية"}, + "notifyMe": {"en": "notify me", "ar": "اعلمني"}, + "specification": {"en": "Specification", "ar": "تخصيص"}, + "availability": {"en": "Availability", "ar": "متوفر في"}, + "vaccination": {"en": "Vaccination", "ar": "جدول التطعيمات"}, + "welcomeBack": {"en": "Welcome back", "ar": "مرحبا مرة أخرى"}, + "quantitySize": {"en": "Quantity", "ar": "كميه"}, + "addToCart": {"en": "Add to Cart", "ar": "إضف للسلة"}, + "addToWishlist": {"en": "Add to Wishlist", "ar": "اضف للمفضلة"}, + "removeFromWishlist": {"en": "Remove From Wishlist", "ar": "احذف للمفضلة"}, + "noData": {"en": "There is no data", "ar": "لايوجد بيانات"}, + "no_data": {"en": "No data", "ar": "لايوجد بيانات"}, + "buyNow": {"en": "Buy Now", "ar": "إشتري الان"}, + "quantityShortcut": {"en": "QTY", "ar": "كمية"}, + "pharmacyServiceTermsCondition": {"en": "I agree with the terms of service and I adhere to them unconditionally", "ar": " موافق على شروط الخدمة وألتزم بها دون قيد أو شرط"}, + "Year": {"en": "YEAR", "ar": "السنة"}, + "Month": {"en": "MONTH", "ar": "الشهر"}, + "point": {"en": "POINT", "ar": "النقاط"}, + "riyal": {"en": "RIYAL", "ar": "الريال"}, + "termOfService": {"en": "Terms of service", "ar": "شروط الخدمة"}, + "shoppingCart": {"en": "Shopping Cart", "ar": "عربة التسوق"}, + "add-child": {"en": "Add New Child", "ar": "اضافة طفل"}, + "child-name": {"en": "Child Name", "ar": "اسم الطفل"}, + "childDob": {"en": "Birth Date", "ar": "تاريخ الولادة"}, + "deleted-child-mes": {"en": "The request was successful. The children have removed from the vaccination schedule subscription service.", "ar": "تم حذف الطفل بنجاح"}, + "deleted-child": {"en": "Delete child", "ar": "إالغاء الطفل"}, + "visit": {"en": "Visit", "ar": "زيارة"}, + "referralStatus": {"en": "Referral Status", "ar": "حالة الإحالة"}, + "referralDate": {"en": "Referral Date", "ar": "تاريخ الإحالة"}, + "patientName": {"en": "Patient Name", "ar": "اسم المراجع"}, + "referralNumber": {"en": "Referral Number", "ar": "رقم الإحالة"}, + "requestID": {"en": "Req ID", "ar": " رقم الطلب"}, + "OrderStatus": {"en": "Status", "ar": "الحاله"}, + "pickupDate": {"en": "Pickup Date", "ar": "التاريخ"}, + "serviceName": {"en": "Service Name", "ar": " اسم الخدمة"}, + "orderLocation": {"en": "Location", "ar": "الموقع"}, + "selectService": {"en": "Select Service", "ar": "حدد الخدمة"}, + "coveredService": {"en": "Covered Services: ", "ar": " الخدمات المغطاة: "}, + "selectedService": {"en": "Selected Services: ", "ar": " الخدمات المختارة: "}, + "cancelOrderMsg": {"en": "Are you sure!! want to cancel this order", "ar": "هل ترغب في إلغاء هذا الطلب"}, + "processDoneSuccessfully": {"en": "Process Done Successfully", "ar": "تمت العملية بنجاح"}, + "selectHomeHealthCareServices": {"en": "Select Home Health Care Services", "ar": " حدد خدمات الرعاية الصحية المنزلية"}, + "description-vaccination": {"en": "Description", "ar": "وصف"}, + "due-date": {"en": "Due date", "ar": "تاريخ الاستحقاق"}, + "valid-email": {"en": "Please enter valid email", "ar": "الرجاء إدخال بريد الكتروني صحيح"}, + "confirm-send": {"en": "Send the child's schedule to the email?", "ar": "ارسال جدول التطعيمات الى بريدك الالكتروني؟"}, + "email-success": {"en": " The request was successful. You will receive the Schedule in moments.", "ar": "تم ارسال جدول التطعيمات "}, + "add-instructions": {"en": "Add the child's information below to recieve the schedule of vaccinations.", "ar": "أضف معلومات الطفل لاستلام جدول التطعيمات"}, + "added-child": {"en": "The request was successful. You have added a child to the vaccination schedule subscription service.", "ar": "تمت الاضافة بنجاح."}, + "appUpdate": {"en": "UPDATE THE APP", "ar": "تحديث التطبيق"}, + "ereferralSaveSuccess": { + "en": "The referral request has been submitted successfully, you will be contacted ASAP to complete the process.", + "ar": " تم إرسال طلب الإحالة بنجاح ، وسيتم الاتصال بك في أسرع وقت ممكن لإكمال العملية." + }, + "help": {"en": "Help", "ar": "مساعدة"}, + "habibRobotText": { + "en": "Hi, this is HABIB, your personal assistant. I'm here to assist you by voice commands. How can I help?", + "ar": "مرحباً ، معك حبيب مساعدك الشخصي. أنا هنا لمساعدتك بالأوامر الصوتية." + }, + "updated-email": {"en": "Updated email successfully", "ar": "تم تحديث البريد الالكتروني"}, + "view-list-children": {"en": "View List of Children", "ar": "عرض قائمة الأطفال"}, + "covidTest": {"en": "COVID-19", "ar": "فحص"}, + "driveThru": {"en": "Test", "ar": "كورونا"}, + "trackDeliveryDriver": {"en": "Track Delivery Driver", "ar": "تتبع السائق"}, + "NearestErDesc": { + "en": "This service Displays nearest branch among all the branches of All Habib medical Group based on your current Location", + "ar": "تعرض هذه الخدمة أقرب فرع من بين جميع فروع مجموعة الحبيب الطبية بناءً على موقعك الحالي." + }, + "NearestEr": {"en": "Nearest ER", "ar": "اقرب طوارئ"}, + "infoCMC": { + "en": "Through this service, you can request a set of tests that help you and your doctor to understand the current health condition and then identify potential risks.", + "ar": "من خلال هذه الخدمة يمكنك طلب مجموعة من الفحوصات التي تساعدك وتساعد طبيبك في فهم حالتك الصحية الحالية ومن ثم تحديد المخاطر المحتملة" + }, + "instructionAgree": { + "en": + "This monthly Health Summary Report reflects the health indicators and analysis results of the latest visits. Please note that this will be sent automatically from the system and it's not considered as an official report so no medical decisions should be taken based on it.", + "ar": + "هذا ملخص التقرير الصحي الشهري و الذي يسرد المؤشرات الصحية و نتائج التحاليل لأخر الزيارات. يرجى ملاحظة أن هذا التقرير هو تقرير يتم ارساله بشكل آلي من النظام و لا يعتبر رسمي و لا تؤخذ عليه أي قرارات طبية" + }, + "reqId": {"en": "Request ID:", "ar": " رقم الطلب"}, + "RRT-orders-log": {"en": "Orders Log", "ar": "سجل الطلبات"}, + "blood-sugar": {"en": "Blood Sugar", "ar": "سكر الدم"}, + "covid19_driveThrueTest": {"en": "'Covid-19- Drive-Thru Test'", "ar": " الفحص من داخل السيارة"}, + "E-Referral": {"en": "'E-Referral'", "ar": "الإحالة الإلكترونية"}, + "childName": {"en": "'CHILD NAME'", "ar": "إسم الطفل"}, + "recordDeleted": {"en": "'Record Deleted'", "ar": "تم حذف السجل"}, + "msg_email_address_up_to_date": { + "en": "Please ensure that the email address is up-to-date and proceed to view the schedule.", + "ar": " يرجى التأكد من تحديث عنوان البريد الإلكتروني والمتابعة لعرض الجدول" + }, + "add-new-child": {"en": "ADD NEW CHILD", "ar": "إضافة طفل جديد"}, + "send-child-email-msg": {"en": "Send the child's schedule to the email", "ar": "أرسل جدول التطعيمات إلى البريد الإلكتروني"}, + "vaccination-add-child-msg": {"en": "Add the child's information below to receive the schedule of vaccinations.", "ar": "أضف معلومات الطفل أدناه للحصول على جدول التطعيمات."}, + "child_added_successfully": {"en": "Child added successfully", "ar": "تمت إضافة الطفل بنجاح"}, + "bloodSugar": {"en": "Blood", "ar": "السكر في الدم"}, + "sugar": {"en": "Sugar", "ar": "السكر"}, + "bloodCholesterol": {"en": "Blood", "ar": " الكولسترول في الدم"}, + "cholesterol": {"en": "Cholesterol", "ar": " الكولسترول"}, + "triglycerides": {"en": "Triglycerides", "ar": "الدهون الثلاثية"}, + "fatInBlood": {"en": "Fat in Blood", "ar": ""}, + "convertFrom": {"en": "Convert from", "ar": "تحويل من"}, + "calculate": {"en": "Calculate", "ar": "احسب"}, + "enterReadingValue": {"en": "Enter the reading value", "ar": "ادخل القيمة"}, + "result": {"en": "Result", "ar": "النتيجة"}, + "sort": {"en": "Sort", "ar": "فرز"}, + "bloodSugarConversion": {"en": "Blood Sugar Conversion", "ar": "السكر في الدم"}, + "convertBloodSugarStatement": { + "en": "Convert blood sugar/glucose from mmol/l (UK standard) to mg/dlt (US standard) and vice versa.", + "ar": "تحويل مستوى السكر في الدم من مليمول/ لتر (مقياس المملكة المتحدة) الى ملغ/ ديسيلتر (مقياس الولايات المتحدة) والعكس" + }, + "convertCholesterolStatement": { + "en": "Convert blood cholesterol from mmol/l to mg/dlt and vice versa.", + "ar": "تحويل مستوى الكولسترول في الدم من مليمول/ لتر (مقياس المملكة المتحدة) الى ملغ/ ديسيلتر (مقياس الولايات المتحدة) والعكس" + }, + "triglyceridesConvertStatement": { + "en": "Convert Triglycerides from mmol/l to mg/dlt and vice versa.", + "ar": "تحويل مستوى الدهون الثلاثية في الدم من مليمول/ لتر (مقياس المملكة المتحدة) الى ملغ/ ديسيلتر (مقياس الولايات المتحدة) والعكس" + }, + "my-tracker": {"en": "My Tracker", "ar": "قراءاتي"}, + "weekly": {"en": "Weekly", "ar": "أسبوعي"}, + "monthly": {"en": "Monthly", "ar": "شهري"}, + "yearly": {"en": "Yearly", "ar": "سنوي"}, + "measured": {"en": "Measured", "ar": "قياس"}, + "sugar-add": {"en": "Enter Blood Sugar Value", "ar": "أدخل قيمة قراءة السكر"}, + "other": {"en": "Other", "ar": "آخر"}, + "measure-unit": {"en": "Measure unit", "ar": "وحدة القياس"}, + "measure-time": {"en": "Measure time", "ar": "وقت القياس"}, + "update": {"en": "Update", "ar": "تحديث"}, + "bloodD-enter-desc": {"en": "Enter the required information, in order to register for Blood Donation Service", "ar": "أدخل المعلومات المطلوبة ، للتسجيل في خدمة التبرع بالدم"}, + "viewTermsConditions": {"en": "To view the terms and conditions", "ar": "لعرض الشروط والأحكام"}, + "WalkinAppo": {"en": "Hospital Visit Appointment", "ar": "موعد زيارة للمستشفى"}, + "videoAppo": {"en": "Video Call Appointment", "ar": "موعد اتصال فيديو"}, + "generalHealth": {"en": "General Health", "ar": "صحة عامة"}, + "womanHealth": {"en": "Women's Health", "ar": "صحة المرأة"}, + "bmi": {"en": "BMI", "ar": "الكتلة"}, + "bloodType": {"en": "Blood Type:", "ar": "فصيلة الدم"}, + "calc-health": {"en": "Calculators", "ar": "الصحية"}, + "calories": {"en": "Calories", "ar": "سعرات"}, + "bmr": {"en": "BMR", "ar": "معدل الأيض القاعدي"}, + "idealBody": {"en": "Ideal Body", "ar": "الجسم المثالي"}, + "body_word": {"en": "Body", "ar": "الجسم"}, + "fat": {"en": "Fat", "ar": "دهون"}, + "carbohydrate": {"en": "Carbohydrate", "ar": "كربوهيدرات"}, + "proteinFat": {"en": "Protein Fat", "ar": "دهون البروتين"}, + "ovulation": {"en": "Ovulation", "ar": "الإباضة"}, + "delivery": {"en": "Delivery", "ar": "الولادة"}, + "bmiCalcDesc": { + "en": "Calculate the BMI value and weight status to identify the healthy weight. Not appropriate for children and women who are pregnant or breastfeeding", + "ar": "احسب قيمة مؤشر كتلة الجسم وحالة الوزن لتحديد الوزن الصحي. غير مناسب للأطفال والنساء الحوامل أو المرضعات" + }, + "selectUnit": {"en": "Select Unit", "ar": "اختر الوحدة"}, + "feet": {"en": "Feet", "ar": "قدم"}, + "pound": {"en": "Pound", "ar": "رطل"}, + "seeListOfDoctor": {"en": "See List of Doctors", "ar": "انظر قائمة الأطباء"}, + "obese": {"en": "Obese", "ar": "سمين"}, + "overWeight": {"en": "OverWeight", "ar": "وزن زائد"}, + "healthy": {"en": "Healthy", "ar": "صحي"}, + "underWeight": {"en": "UnderWeight", "ar": "وزن ناقص"}, + "bmiCalcMsgObese": { + "en": + "A BMI of over 30 indicates that are heavily overweight. Health may be at risk if not lose weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.", + "ar": + "يشير مؤشر كتلة الجسم الذي يزيد عن 30 إلى زيادة الوزن بشكل كبير. قد تكون الصحة في خطر إذا لم تفقد الوزن. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للبدء." + }, + "bmiCalcMsgOverweight": { + "en": + 'A BMI of 25 - 30 indicates that are slightly overweight. May be advised to lose some weight for health reasons. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get ', + "ar": + "يشير مؤشر كتلة الجسم من 25 إلى 30 إلى زيادة الوزن قليلاً. قد ينصح بفقدان بعض الوزن لأسباب صحية. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للحصول على" + }, + "bmiCalcMsgHealthy": { + "en": + "A BMI of 18.5 - 25 indicates that are at a healthy weight for the height. By maintaining a healthy weight, lower the risk of developing severe health problems. To book an appointment, click below to get started.", + "ar": "يشير مؤشر كتلة الجسم من 18.5 - 25 إلى وزن صحي بالنسبة للطول. بالحفاظ على وزن صحي ، قلل من خطر الإصابة بمشاكل صحية خطيرة. لحجز موعد ، انقر أدناه للبدء." + }, + "bmiCalcMsgUnderWeight": { + "en": + "A BMI of less than 18.5 indicates that are underweight, so may need to put on some weight. Recommended talking to a doctor or a dietician for advice. To book an appointment, click below to get started.", + "ar": + "يشير مؤشر كتلة الجسم الذي يقل عن 18.5 إلى أنك تعاني من نقص الوزن ، لذلك قد تحتاج إلى زيادة الوزن. يوصى بالتحدث إلى الطبيب أو أخصائي التغذية للحصول على المشورة. لحجز موعد ، انقر أدناه للبدء." + }, + "bariatrics": {"en": "Bariatrics", "ar": " أمراض السمنة"}, + "bariatricsHeaderMsg": { + "en": "Choose one of the following symptoms to show the right doctors or choose a consultation to show all", + "ar": "اختر أحد الأعراض التالية لتظهر للأطباء المناسبين أو اختر استشارة لإظهار الكل" + }, + "continue": {"en": "Continue", "ar": "إستمرار"}, + "skip": {"en": "SKIP", "ar": "تخطى"}, + "calorieCalcDesc": { + "en": "Calculates daily calorie intake based on several factors, like height, weight, age, gender and daily physical activity ", + "ar": "يحسب السعرات الحرارية اليومية بناءً على عدة عوامل ، مثل الطول والوزن والعمر والجنس والنشاط البدني اليومي" + }, + "age11_120_years": {"en": "The Age (11 - 120) yrs", "ar": "العمر (11 - 120) سنة"}, + "weight-add": {"en": "Enter Weight Value", "ar": "أدخل الوزن "}, + "systolic-add": {"en": "Enter Systolic Value", "ar": "أدخل قيمة الإنقباض "}, + "diastolic-add": {"en": "Enter Diastolic Value", "ar": "أدخل قيمة الإنبساط "}, + "cmc-heading": {"en": "Comprehensive Medical Checkup", "ar": "فحص طبي شامل"}, + "today": {"en": "Today", "ar": "اليوم"}, + "week": {"en": "Week", "ar": "أسبوع"}, + "month": {"en": "Month", "ar": "شهر"}, + "enter_detail_below": {"en": "Enter the details below", "ar": "أدخل التفاصيل أدناه"}, + "h2o-amount-of-water": {"en": "Enter the amount of water:", "ar": "ادخل كمية الماء:"}, + "update-user": {"en": "Update Information", "ar": "تحديث بيانات"}, + "editname": {"en": "Enter the name here", "ar": "أدخل الاسم هنا"}, + "activity-level": {"en": "Activity Level", "ar": "مستوى النشاط"}, + "light-active": {"en": "Lightly Active", "ar": " قليل النشاط"}, + "mod-active": {"en": "Moderately Active", "ar": "متوسط النشاط"}, + "reminder-label": {"en": "Activate the reminder of drink water?", "ar": "تفعيل خاصية تذكير شرب الماء؟"}, + "reminder-times-label": {"en": "How many times do you want to be reminded?", "ar": "عدد مرات التذكير"}, + "times": {"en": "Times", "ar": "مرات"}, + "WaterCalculate": {"en": "Save", "ar": "حفظ"}, + "notif-title": {"en": "Water Reminder", "ar": "تذكير"}, + "notif-text": {"en": " Don't forget to drink water.", "ar": "لا تنسى شرب الماء"}, + "custom": {"en": "Custom", "ar": "مخصص"}, + "undo": {"en": "Undo", "ar": "تراجع"}, + "drinking": {"en": "Drinkning", "ar": "الشرب"}, + "remaining": {"en": "Remaining", "ar": "المتبقي"}, + "addCustomAmount": {"en": "Add Custom Amount", "ar": "إضافة كمية محددة"}, + "left": {"en": "Left", "ar": "المتبقي"}, + "taken": {"en": "Taken", "ar": " مأخوذ"}, + "ml": {"en": "ML", "ar": "مل"}, + "mililitre": {"en": "Mililitre (ml)", "ar": "مليلتر (مل)"}, + "l": {"en": "L", "ar": "لتر"}, + "litre": {"en": "Litre (l)", "ar": "لتر (لتر)"}, + "custom-label": {"en": "Enter amount", "ar": "أدخل كمية الماء"}, + "custom-label-in-litres": {"en": "Enter amount in liters", "ar": "أدخل الكمية باللتر"}, + "custom-label-in-mililitres": {"en": "Enter amount in millilitres", "ar": "أدخل الكمية بالملليتر"}, + "amount": {"en": "Amount", "ar": "الكمية"}, + "target-reach": {"en": "You have reached the target for the day!", "ar": "لقد حققت هدفك اليومي! مبروك"}, + "week-header": {"en": "Water consumed in a week", "ar": "معدل شرب الماء خلال الاسبوع"}, + "month-header": {"en": "Water consumed in a month", "ar": "معدل شرب الماء خلال الشهر"}, + "notif-permission-title": {"en": "Could not set the water reminders", "ar": "لا يمكن ضبط اشعار شرب الماء"}, + "notif-permission-msg": {"en": "To recieve water reminders, please turn on notifications in the system settings", "ar": "الرجاء تفعيل الاشعارات في الاعدادات"}, + "verification_message_code": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"}, + "select-location": {"en": "Select Location *", "ar": "اختر الموقع *"}, + "result-header": {"en": "Get the result in Few Hours", "ar": "احصل على النتيجة خلال عدة ساعات"}, + "please_select_gender": {"en": "Please select gender", "ar": "يرجى تحديد الجنس"}, + "covid-info": { + "en": + "Dr. Sulaiman Al Habib hospitals are conducting a test for the emerging corona virus and issuing travel certificates 24/7 in a short time and with high accuracy. Those wishing to benefit from this service can visit one of Dr. Sulaiman Al Habib branches to conduct a corona test within few minutes, and obtain the result within several hours. Corona Virus Covid 19 testing service with PCR technology to detect the virus according to the highest international standards and with the latest high-precision RT-PCR devices (American GeneXpert and others), That is approved by the Food and Drug Authority as well as by the Saudi Center for Infectious Diseases Prevention.", + "ar": + "تجري مستشفيات د. سليمان الحبيب فحص فيروس كورونا المستجد وتصدر شهادات السفر على مدار الساعة، طوال أيام الأسبوع، وبسرعة ودقة عالية. يمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد فروع مستشفيات د. سليمان الحبيب وإجراء فحص كورونا خلال بضع دقائق والحصول على النتائج خلال عدة ساعات خدمة فحص فيروس كورونا Covid 19 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية" + }, + "select-appo": {"en": "Kindly select one of the available appointments from below:", "ar": " يرجى اختيار أحد المواعيد المتاحة مما يلي:"}, + "covid-alert-header": {"en": "Pay With-in 15 mins to confirm the appointment", "ar": "الرجاء اتمام عملية الدفع خلال 15 دقيقه لتاكيد الموعد"}, + "covid-alert-info": { + "en": "Payment for Covid-19 Test should Be made with-in 15 mins otherwise The system will Cancel the Scheduled appointment automatically​", + "ar": "سيتم الغاء الموعد عن طريق النظام بشكل الي في حال عدم اتمام عمليه الدفع خلال 15 دقيقة" + }, + "covid-alert-mins": {"en": "Pay With-in 15 mins", "ar": "ادفع خلال 15 دقيقة"}, + "back": {"en": "Back", "ar": "رجوع"}, + "get-directions": {"en": "Get Directions", "ar": "احصل على الاتجاهات"}, + "selected-location": {"en": "Selected Location:", "ar": "الموقع المحدد:"}, + "test-fee": {"en": "Test Fee", "ar": "الرسوم"}, + "pay-options": {"en": "You can pay by the following Options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"}, + "livecare-service": {"en": "LiveCare Service", "ar": "خدمة لايف كير"}, + "livecare-service-desc": {"en": "is to obtain medical advice with a specialist doctor Via a video call", "ar": "هي الحصول على استشارة طبية مع طبيب مختص عن طريق اتصال فيديو"}, + "why-livecare": {"en": "Why LiveCare?", "ar": "?لماذا خدمة اللايف كير"}, + "livecare-point-1": {"en": "No need to wait you will get Medical consultation immediately via Video call", "ar": "لا داعي للانتظار سوف تحصل على الاستشارة الطبية فورا عن طريق مكالمة الفيديو"}, + "doc-virtual-appo-ins4": {"en": "The doctor will see your medical file", "ar": "سوف يتمكن الطبيب من الاطلاع على ملفك الطبي كامل"}, + "doc-virtual-appo-ins5": {"en": "Free prescription delivery service", "ar": "خدمة توصيل الادوية مجانا"}, + "livecare-summary": { + "en": "** The service is included with some insurance companies according to the terms and conditions with our best wishes for health and wellness", + "ar": "** الخدمة مشمولة لدى بعض شركات التامين على حسب الشروط والاحكام مع تمنياتنا لكم بدوام الصحة والعافية" + }, + "livecare-option-1": {"en": "Get consultation immediately", "ar": "الحصول على الاستشارة فورا"}, + "livecare-option-2": {"en": "Instant video call", "ar": "اتصال فيديو فوري"}, + "livecare-option-3": {"en": "Book Appointment", "ar": "حجز موعد"}, + "livecare-option-4": {"en": "Schedule video call", "ar": "اتصال فيديو مجدول"}, + "sms_code": {"en": "Enter SMS Code here", "ar": "أدخل رمز التحقق هنا"}, + "code_failure": {"en": "Didn’t received the code", "ar": "لم أستلم رمز التحقق"}, + "resend": {"en": "Resend", "ar": "إعادة إرسال"}, + "submitncontinue": {"en": "Submit and continue", "ar": "إرسال ومتابعة"}, + "areyousure": {"en": "Are you sure you want to Add", "ar": "هل أنت متأكد أنك تريد إضافة"}, + "preferredunit": {"en": "Select the preferred unit", "ar": "اختر الوحدة المفضلة"}, + "select-unit": {"en": "Select unit", "ar": "اختر وحدة القياس"}, + "try-saying": {"en": "Try saying something", "ar": 'حاول قول شيء ما'}, + "app-update": {"en": "UPDATE THE APP", "ar": "تحديث التطبيق"}, + "covid-alert": {"en": "Alert", "ar": "تنبيه"}, + "enterIdentificationNumber": {"en": "Enter Identification Number", "ar": "أدخل رقم الهوية"}, + "identificationNumber": {"en": "Identification Number", "ar": "رقم الهوية"}, + "complaintNumber": {"en": "Complaint Number", "ar": "رقم الشكوى"}, + "accountActivationDesc": { + "en": " This service allows you to activate your LAKUM account after registering completed.", + "ar": " تتيح لك هذه الخدمة تفعيل حساب برنامج الولاء لكم بعد اكتمال التسجيل. " + }, + "pointsToTransfer": {"en": "Points to Transfer:", "ar": "النقاط المراد تحويلها:"}, + "enterBeneficiaryAccountNo": {"en": "Enter Beneficiary Account No.", "ar": "أدخل رقم حساب المستفيد"}, + "confirm-prescription": {"en": "Are you sure !! you want to send this request", "ar": "تاكيد ارسال الطلب؟"}, + "you-already-have-order": {"en": "You already have this order! do you want to view it?", "ar": "لديك هذا الطلب بالفعل! هل تريد مشاهدته؟"}, + "order-overview": {"en": "Order Overview", "ar": "ملخص الطلب"}, + "shipping-address": {"en": "Delivery Address", "ar": "عنوان التوصيل"}, + "pharmacy-relogin": {"en": "Your session has timed out, please try again", "ar": "انتهت مهلة جلسة الخاص بها. يرجى المحاولة مرة أخرى"}, + "ancillary-orders": {"en": "Ancillary Orders", "ar": "الطلبات الاضافية"}, + "onlineCheckInAgreement": { + "en": + "The online check-in is for non-life threatening situation. Call the red crescent (997) or go to the nearest emergency department if there are: \n\nsigns of stroke or heart attack \nhistory of seizure or syncope \nthere is limb or life threatening injury \npicture of severe injuries", + "ar": + "تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات التي لا تهدد الحياة يجب الاتصال بالهلال الأحمر (997) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة" + }, + "MRN": {"en": "MRN", "ar": "رقم الملف الطبي"}, + "appointment-date": {"en": "Appointment Date", "ar": "تاريخ الموعد"}, + "appointment-no": {"en": "Appointment No", "ar": "رقم الموعد"}, + "insurance-id": {"en": "Insurance ID", "ar": "رقم العضويه"}, + "chiefComplaints": {"en": "Chief Complaints", "ar": "الشكوى الرئيسة"}, + "errorChiefComplaints": {"en": "Please Chief Complaints", "ar": "يرجى ادخال الشكوى الرئيسة"}, + "errorExpectedArrivalTimes": {"en": "Please Expected arrival time", "ar": "يرجى ادخال الوقت المتوقع للوصول"}, + "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": "ابحث عن الإحالات"}, + "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": "يرجى قبول الشروط والأحكام للمتابعة"}, + "type": {"en": "Type", "ar": "اكتب"}, + "info-ereferral": { + "en": + "This service allows you to submit a Referral request from any health care providers either inside or outside the kingdom of Saudi Arabia to any of HMG Hospitals, by filling some of the patient's data and attaching the medical reports, moreover you can track the request status (Under process, Accepted or Rejected)", + "ar": + "تتيح لك هذه الخدمة إرسال طلب إحالة من أي من مقدمي الرعاية الصحية سواء داخل المملكة العربية السعودية أو خارجها إلى أي من مستشفيات HMG ، عن طريق ملء بعض بيانات المراجع وإرفاق التقارير الطبية ، علاوة على ذلك يمكنك تتبع حالة الطلب (قيد المعالجة ، مقبول أو مرفوض)" + }, + "er-consultation": { + "en": "This service allows you to make an online virtual consultation via video call directly with the doctor from anywhere at any time.", + "ar": "تتيح لك هذه الخدمة إجراء استشارة عبر مكالمة فيديو مباشرة مع الطبيب من أي مكان وفي أي وقت" + }, + "my-invoice": {"en": "List", "ar": "فواتيري"}, + "invoice-list": {"en": "My Invoice", "ar": "قائمة"}, + "thisItemIsNotAvailable": {"en": "This item is not available", "ar": "هذا العنصر غير متوفر"}, + "beforeAfterImages": {"en": "Before & After Images", "ar": "الصور قبل وبعد"}, + "clinic-accept-livecare": { + "en": "No need to wait or visit You can now get medical consultation via Video call (LiveCare service) in The name of the clinic clinic and the doctor will contact you immediately", + "ar": "لا داعي للانتظار او الحضور يمكنك الان الحصول على الاستشارة عن طريق مكالمة الفيديو (خدمة لايف كير) في العيادة وسوف يقوم الطبيب بالتواصل معك فورا" + }, + "livecareModal-top": {"en": "This Clinic is Accepting livecare services", "ar": "هذه العيادة تقدم خدمة لايف كير"}, + "schedule": {"en": "Schedule", "ar": "جدول الحضور"}, + "livecare-point-2": {"en": "A Specialized doctor will contact you", "ar": "سوف يقوم بخدمتك طبيب متخصص"}, + "livecare-point-3": {"en": "A Doctor will be able to see your full medical file history", "ar": "سوف يتمكن الطبيب من الاطلاع على ملفك الطبي كاملا"}, + "livecare-point-4": {"en": "Free Medicine Delivery Available", "ar": "خدمة توصيل الادوية مجانية"}, + "livecare-point-5": {"en": "No need to visit the service is in your place", "ar": "لا داعي للحضور سوف تحصل على الخدمة في مكانك"}, + "book-immediate-livecare": {"en": "I accept to get the service immediately", "ar": "موافق اريد الحصول على الخدمة فورا"}, + "book-video-livecare-2": {"en": "I don't need to visit the clinic", "ar": "اتصال فيديو لا احتاج الحضور الى العيادة"}, + "no-thankyou": {"en": "No Thanks", "ar": "لا شكرا"}, + "visit-clinic": {"en": "Schedule appointment with the doctor", "ar": "ارغب في حجز موعد مجدول مع الطبيب"}, + "generate-covid-certificate": {"en": "Generate Covid-19 Certificate", "ar": "إنشاء شهادة كورونا"}, + "is-report-outside-ksa": {"en": "Is the certificate needed for outside KSA?", "ar": "هل الشهادة مطلوبة من خارج المملكة؟"}, + "passport-number": {"en": "Passport Number", "ar": "رقم جواز السفر"}, + "enter-passport-number": {"en": "Please confirm or update your passport number:", "ar": "الرجاء تأكيد أو تحديث رقم جواز السفر الخاص بك:"}, + "valid-passport-number": {"en": "Please enter valid passport number", "ar": "الرجاء إدخال رقم جواز سفر صحيح"}, + "continue-plan": {"en": "Continue with the treatment plan?", "ar": "إكمال الخطة العلاجية؟"}, + "about-app": {"en": "About the app", "ar": "عن التطبيق"}, + "about-points": { + "length": {"en": "16", "ar": "16"}, + "1": {"en": "Online Appointment Booking & rescheduling", "ar": "حجز المواعيد إلكترونياً و إعادة جدولتها"}, + "2": {"en": "Insurance approval status", "ar": "موافقات شركات التأمين الطبية"}, + "3": {"en": "Find A doctor", "ar": "معلومات الأطباء والبحث عنهم وسؤالهم"}, + "4": {"en": "Ask your doctor", "ar": "اسأل طبيبك"}, + "5": {"en": "Medical prescriptions", "ar": "الوصفات الطبية"}, + "6": {"en": "Lab results", "ar": "نتائج التحاليل المخبرية"}, + "7": {"en": "Hospitals contact numbers", "ar": "أرقام هواتف جميع المستشفيات"}, + "8": {"en": "Doctor profiles", "ar": "ملف الطبيب"}, + "9": {"en": "Hospitals locations", "ar": "مواقع المستشفيات على الخريطة"}, + "10": {"en": "Pharmacies Locations", "ar": "مواقع الصيدليات على الخريطة"}, + "11": {"en": "Hospital's Virtual Tour", "ar": "جولة افتراضية داخل المستشفيات"}, + "12": {"en": "Official Social Media", "ar": "مواقع التواصل الاجتماعي الخاصة بالمجموعة"}, + "13": {"en": "Vaccines Schedule", "ar": "جدول التطعيمات"}, + "14": {"en": "Health Calculators", "ar": "حاسبات صحية"}, + "15": {"en": "Other Services", "ar": "خدمات أخرى"} + }, + "dental-procedure-list": {"en": "Dental Procedures for this Appointment: ", "ar": "إجراءات الأسنان لهذا الموعد:"}, + "time-needed": {"en": "Time Needed:", "ar": "الوقت اللازم:"}, + "total-time-needed": {"en": "Total Appointment Time:", "ar": "وقت المواعيد الكلي:"}, + "info-eye": { + "en": "This service allows you to view all the eye measurements, lenses, and eyeglasses that have been made in the Habib Medical Group.", + "ar": " خدمة قياسات النظر: هذه الخدمة تمكنك من الاطلاع على جميع قياسات النظر والعدسات والنظارات التي تمت في مجموعة الحبيب الطبية." + }, + "info-vaccines": { + "en": "This service allows you to view all the vaccinations that were taken in Al Habib Medical Group.", + "ar": "خدمة تطعيماتي: هذه الخدمة تمكنك من الاطلاع على جميع التطعيمات التي تمت في مجموعة الحبيب الطبية." + }, + "info-trackers": { + "en": "This service allows you to record the readings of the measurement of sugar, pressure, and weight and then refer to them as a reference in addition to view the statistics charts.", + "ar": "متابعة قراءاتي: هذه الخدمة تمكنك من تسجيل قراءات قياس السكر والضغط والوزن بشكل دوري ومن ثم الاطلاع عليها كمرجع وكذلك الاطلاع على الرسوم البيانية لمتابعة تطور الحالة." + }, + "info-health-data": { + "en": + "This service is designed to allows you to synchronize the health data from your smart watches into your health record system in Habib Medical Group so that the doctors you are visiting can analyze your health & activity level.", + "ar": "تم تصميم هذه الخدمة للسماح لك بمزامنة البيانات الصحية من ساعاتك الذكية الى نظام السجلات الصحية الخاص بك في مجموعة حبيب الطبية حتى يتمكن الأطباء الذين تزورهم من تحليل مستوى صحتك ونشاطك." + }, + "info-ask-doc": { + "en": + "This service allows you to ask the doctor you have visited during the last 14 days. When you receive a response from the doctor, you will be notified via the system to view the doctor's reply.", + "ar": "اسال طبيبك: هذه الخدمة تمكنك من توجيه استفسارات الى الطبيب الذي قمت بزيارته خلال اخر 14 يوم وكذلك عند تلقى الرد من الطبيب سوف يتم ابلاغك عن طريق النظام للاطلاع على رد الطبيب." + }, + "info-auto-wifi": { + "en": "This service allows you to connect to the Internet directly without the need for entering a user name or password.", + "ar": "الاتصال بالانترنت: هذه الخدمة تمكنك من الاتصال بالانترنت مباشرة دون الحاجة الى اسم مستخدم او كلمة مرور." + }, + "auto-wifi": {"en": "Connect To Internet", "ar": "الإتصال بالإنترنت"}, + "child-vaccine-info": { + "en": + "This service to remind you of the deadlines of the necessary vaccinations for your child’s against diseases targeted by immunization according to the MOH vaccinations schedule by sending a reminding message and notifications of the vaccination date to the registered mobile phone.", + "ar": + "هذه الخدمة تم تصميمها لتذكيرك بالمواعيد النهائية للتحصينات اللازمة لطفلك ضد الأمراض المستهدفة بالتحصين وفقًا لجدول تطعيمات وزارة الصحة عن طريق إرسال رسالة تذكير وإشعارات عن مواعيد التطعيم على الجوال المسجل." + }, + "h2o-info": { + "en": + "This service is designed to help you to set drinking water goals and track the volume of water you are drinking on a daily basis. This service allows for schedule reminders and offers a basic statistical analysis of the amount of what you have consumed over the course of a day, week or month.", + "ar": + "تم تصميم هذه الخدمة لمساعدتك في تحديد وتتبع كميات المياه التي يتوجب شربها بشكل يومي. كما توفر هذه الخدمة تذكيرات الجدول الزمني وتقدم تحليلًا إحصائيًا لمقدار ما استهلكته خلال اليوم أو الأسبوع أو الشهر." + }, + "sys/dias": {"en": "SBP/DBP", "ar": "إنقباض/إنبساط"}, + "arm": {"en": "Arm", "ar": "الذراع"}, + "remove-measure": {"en": "Remove this measure", "ar": "إزالة هذا القياس؟"}, + "select-arm": {"en": "Select the Arm", "ar": "إختر الذراع"}, + "ask-doc-empty": {"en": "This service is available to doctors visited during the past 15 days", "ar": "هذه الخدمة متاحة للاطباء الذين تمت زيارتهم خلال ال 15 يوم الماضية"}, + "online-clinics": {"en": "Online Clinics: ", "ar": "​العيادات المفتوحة: "}, + "offline-clinics": {"en": "Offline Clinics: ", "ar": "العيادات المغلقة: "}, + "clinic-schedule": {"en": "Clinic Schedule", "ar": "جدول العيادة"}, + "discount": {"en": "Discount:", "ar": "الخصم:"}, + "total-VAT": {"en": "VAT", "ar": "القيمة المضافة"}, + "paid": {"en": "Paid", "ar": "المدفوع"}, + "dental-insurance": {"en": "Insurance", "ar": "التأمين"}, + "drivethru-appo": {"en": "Drive Thru Appointment", "ar": "موعد من داخل السيارة"}, + "upcoming-QR-NFC": {"en": "Use the NFC or QR Code to Check-In", "ar": "استخدم NFC أو رمزQR لتسجيل الوصول"}, + "ovulation-desc": {"en": "Calculates Ovulation Period", "ar": "حساب افضل فترة للحمل بناءاً على تاريخ اخر دورة شهرية"}, + "cycle-label": {"en": "Average Cycle Length (usually 28 days):", "ar": "متوسط الدورة الشهرية 28 يوم: "}, + "luteal-label": {"en": "Average Luteal Phase Length (usually 14 days):", "ar": "متوسط الأيام ما بعد الاباضة عادة 14 يوما: "}, + "pregnancy-title": {"en": "Delivery Due Date", "ar": "تاريخ الولادة"}, + "pregnancy-desc": { + "en": "Congratulations, you are pregnant! Now when will the new baby arrive? To estimate the due date, enter the date when the last menstrual period began (the first day), then click calculate.", + "ar": "مبروك, أنت حامل! الآن متى سيصل الطفل؟ لتقدير موعد الولادة, ادخل تاريخ بداية آخر دورة شهرية (اليوم الأول), ثم اضغط على الحساب" + }, + "pregnancy-date-label": {"en": "What was the date of the first day of the last period?", "ar": "ما هو تاريخ أول يوم من أخر دورة شهرية ؟"}, + "ovulation-period": {"en": "The next ovulation period is estimated to be: ", "ar": "تقدر فترة الاباضة القادمة "}, + "from": {"en": "From: ", "ar": "من:"}, + "to": {"en": "To: ", "ar": "الى:"}, + "conceive": {"en": "You have conceived on: ", "ar": " تاريخ بداية الحمل"}, + "firstTri": {"en": "First Trimester Ends (12 weeks):", "ar": "تاريخ انتهاء الثلث الأول 12 اسبوع: "}, + "secondTri": {"en": "Second Trimester Ends (27 weeks):", "ar": "تاريخ انتهاء الثلث الثاني 27 اسبوع: "}, + "thirdTri": {"en": "Third Trimester, Estimated Due Date (40 weeks):", "ar": "تاريخ احتمال الولادة 40 اسبوع:"}, + "seeDoctorsList": {"en": "See List of Doctors", "ar": "اعرض قائمة الأطباء"}, + "covidQuestionnaire": {"en": "Please answer below questionnaire:", "ar": "الرجاء الإجابة على الاستبيان أدناه:"}, + "covidBookAppo": {"en": "Booking Appointment for: ", "ar": "موعد الحجز لـ: "}, + "emptySchedule": {"en": "Doctor has no schedule.", "ar": "لا يوجد جدول حضور مسجل للطبيب"}, + "serviceNotAvailable": {"en": "Dear, this service is not available now, please try again later", "ar": "عزيزي المراجع, هذه الخدمة غير متوفرة الان يرجى المحاوله لاحقا"}, + "doctorScheduleNot": {"en": "Doctor schedule not available", "ar": "جدول الطبيب غير متوفر"}, + "RRTRequestSuccess": {"en": "Request has been sent successfully, you will be contacted soon.", "ar": "تم إرسال الطلب بنجاح ، وسيتم الاتصال بك باسرع وقت ممكن"}, + "rateDoctorAppo": {"en": "Rate DR & Appointment", "ar": "تقييم الطبيب والموعد"}, + "invoice": {"en": "Invoice", "ar": "الفاتورة"}, + "requestedDate": {"en": "Req Date", "ar": "التاريخ "}, + "requestedDateLiveCare": {"en": "Requested Date: ", "ar": "التاريخ: "}, + "callDuration": {"en": "Call Duration", "ar": "مدة الاتصال"}, + "alreadyRated": {"en": "This appointment has been previously evaluated.", "ar": "تم تقييم هذا الموعد مسبقاً"}, + "insuranceCompany": {"en": "Insurance Company", "ar": "شركة تأمين"}, + "preferredBranch": {"en": "Preferred Branch", "ar": "الفرع المفضل"}, + "selectPreferredBranch": {"en": "Select Preferred Branch", "ar": "اختر الفرع المفضل"}, + "patientLocated": {"en": "Where the patient located", "ar": "اين موقع المراجع"}, + "otherInfo": {"en": "Other details", "ar": "تفاصيل أخرى"}, + "medicalReport": {"en": "Medical Report", "ar": "تقرير طبي"}, + "insuredPatient": {"en": "Insured Patient", "ar": "هل لدى المراجع تامين؟"}, + "rateDoctor": {"en": "Rate Doctor", "ar": "تقييم الطبيب"}, + "rateAppointment": {"en": "Rate Appointment", "ar": "تقييم الموعد"}, + "noInsuranceCardAttached": {"en": "Please attach your insurance card image to continue", "ar": "يرجى إرفاق صورة بطاقة التأمين الخاصة بك للمتابعة"}, + "bodyMassIndex": {"en": "Body Mass Index is: ", "ar": "مؤشر كتلة الجسم هو:"}, + "noSlotsError": {"en": "No appointments available for selected date", "ar": "لا توجد مواعيد متاحة للتاريخ المحدد"}, + "selectSlot": {"en": "Please select Time Slot to continue", "ar": "الرجاء تحديد فترة زمنية للمتابعة"}, + "years": {"en": "Years", "ar": "سنوات"}, + "respirationBPM": {"en": "bpm", "ar": "نفس"}, + "extremeObese": {"en": "Extreme Obese", "ar": "سمنة مفرطة"}, + "invoiceDetails": {"en": "Invoice Details", "ar": "تفاصيل الفاتورة"}, + "appoDetails": {"en": "Appointment Details", "ar": "تفاصيل الموعد"}, + "appoPaymentConfirm": {"en": "Are you sure you Want to make payment for this appointment?", "ar": "هل أنت متأكد من أنك تريد سداد هذا الموعد؟"}, + "selectSearchCriteria": {"en": "Select the search criteria", "ar": "حدد معايير البحث"}, + "enterComplainNumber": {"en": "Enter the Complain Number", "ar": "أدخل رقم الشكوى"}, + "enterfileNumber": {"en": "Enter File Number", "ar": "أدخل رقم الملف"}, + "please_select_from_below_options": {"en": "Please select from below options:", "ar": "الرجاء التحديد من الخيارات أدناه:"}, + "selectLanguage": {"en": "Please select any language:", "ar": ":الرجاء تحديد أي لغة"}, + "recAlert": {"en": "How do you want to receive alerts?", "ar": "كيف تريد تلقي التنبيهات؟"}, + "modesBelow": {"en": "Please select the modes below:", "ar": ":الرجاء تحديد الأوضاع أدناه"}, + "prefferedMode": {"en": "Please select the preferred mode below:", "ar": ":الرجاء تحديد الوضع المفضل أدناه"}, + "permissionsBellow": {"en": "Please allow the permissions below:", "ar": ":الرجاء السماح الأذونات أدناه"}, + "appointmentReminder": {"en": "Would you like to set a reminder for this in your calendar?", "ar": "هل ترغب في اضافة تذكير لهذا في التقويم؟"}, + "cancelAppointment": {"en": "Cancel Appt.", "ar": "الغاء الموعد"}, + "updateInsurCards": {"en": "Update Insurance Card", "ar": "تحديث بطاقات التأمين"}, + "patientAge": {"en": "y", "ar": "سنة"}, + "searchCriteria": {"en": "Select Search Criteria", "ar": "حدد معايير البحث"}, + "RequesterInfo": {"en": "Requester Info", "ar": "معلومات مقدم الطلب"}, + "PatientInfo": {"en": "Patient Info", "ar": "معلومات المراجع"}, + "OtherInfo": {"en": "Other Info", "ar": "معلومات اخرى"}, + "inPrgress": {"en": "Active", "ar": "نشط"}, + "locked": {"en": "Inactive", "ar": "غير نشط"}, + "personalInfo": {"en": "Personal Information", "ar": "معلومات شخصية"}, + "cmcTitle": {"en": "Comprehensive", "ar": "خدمة"}, + "cmcSubtitle": {"en": "Medical Checkup", "ar": "الفحص الشامل"}, + "emergencyTitle": {"en": "Emergency", "ar": "خدمات"}, + "emergencySubtitle": {"en": "Services", "ar": "الطوارئ"}, + "ereferralTitle": {"en": "E-Referral", "ar": "خدمة"}, + "ereferralSubtitle": {"en": "Service", "ar": "الإحالة الإلكترونية"}, + "medicalFileTitle": {"en": "Medical File", 'ar': 'الملف الطبي'}, + "My_File_Details": {"en": "My File Details", "ar": "تفاصيل ملفي"}, + "Ecommerce": {"en": "Ecommerce", "ar": "التجارة الإلكترونية"}, + "Family_Files": {"en": "Family Files", "ar": "ملفات العائلة"}, + "My_Child": {"en": "My Child", "ar": "تطعيمات"}, + "Vaccines": {"en": "Vaccines", "ar": "الأطفال"}, + "Todo": {"en": "Todo", "ar": "قائمة"}, + "List": {"en": "List", "ar": "المهام"}, + "Blood": {"en": "Blood", "ar": "التبرع"}, + "Donation": {"en": "Donation", "ar": "بالدم"}, + "Health": {"en": "Health", "ar": "الصحة"}, + "Calculator": {"en": "Calculator", "ar": "آلة حاسبة"}, + "Converter": {"en": "Converter", "ar": "محول"}, + "Smart": {"en": "Smart", "ar": "ذكي"}, + "Watches": {"en": "Watches", "ar": "ساعات"}, + "parkingTitle2": {"en": "Car parking", "ar": "خدمة"}, + "ParkingSubtitle": {"en": "service", "ar": "مواقف السيارات"}, + "Details": {"en": "Details", "ar": "تفاصيل"}, + "News": {"en": "News", "ar": "أحدث"}, + "Latest": {"en": "Latest", "ar": "ألاخبار"}, + "Virtual": {"en": "Virtual", "ar": "جولة"}, + "Tour": {"en": "Tour", "ar": "افتراضية"}, + "mostViewed": {"en": "Most Viewed", "ar": "الأكثر مشاهدة"}, + "newProducts": {"en": "New Products", "ar": "منتجات جديدة"}, + "paymentSelected": {"en": "Selected", "ar": "المحدد"}, + "moreNotifications": {"en": "More notifications", "ar": "الإشعارات المزيد"}, + "familyTitle": {"en": "My Family", "ar": "ملفات"}, + "familySubtitle": {"en": "Files", "ar": "العائلة"}, + "liveCareTitle": {"en": "LiveCare", "ar": "خدمة"}, + "liveCareSubtitle": {"en": "Service", "ar": "لايف كير"}, + "pharmacyTitle": {"en": "Online", "ar": "الصيدلية"}, + "pharmacySubtitle": {"en": "Pharmacy", "ar": "االلكترونية"}, + "healthCalculatorTitle": {"en": "Health", "ar": "الحاسبات"}, + "healthCalculatorSubtitle": {"en": "Calculators", "ar": "الصحية"}, + "waterTitle": {"en": "Water", "ar": "استهلاك"}, + "waterSubtitle": {"en": "Consumption", "ar": "الماء"}, + "medicalFileTitle2": {"en": "My Medical File", "ar": "تفاصيل"}, + "medicalFileSubtitle": {"en": "Details", "ar": "ملفي الطبي"}, + "healthConvertersTitle": {"en": "Health", "ar": "تحويل"}, + "healthConvertersSubtitle": {"en": "Converters", "ar": "القياسات"}, + "syncHealthData": {"en": "Sync Health Data", "ar": "مزامنة البيانات الصحية"}, + "steps": {"en": "Steps", "ar": "الخطوات"}, + "avgSteps": {"en": "Average Steps", "ar": "متوسط الخطوات"}, + "avgDistance": {"en": "Average Distance", "ar": "متوسط المسافة"}, + "enterDetails": {"en": "Enter Details", "ar": "أدخل التفاصيل"}, + "avgHeartRate": {"en": "Average Heart Rate", "ar": "متوسط معدل ضربات القلب"}, + "alreadySynced": {"en": "Already Synced", "ar": "متزامنة"}, + "sync-instructions-intro1": { + "en": "It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App", + "ar": "يبدو أنك لم تقم بمزامنة بياناتك الصحية مع تطبيق Dr. Alhabib App من قبل. للمتابعة ، تحتاج إلى مزامنة بياناتك الصحية مع تطبيق Dr. Alhabib" + }, + "sync-instructions-intro2": {"en": "Before syncing data, please make sure that you have followed the instructions properly", "ar": "قبل مزامنة البيانات ، يرجى التأكد من اتباع التعليمات بشكل صحيح."}, + "sync-instructions-intro3": {"en": "Before syncing data, please make sure that following instructions are met:", "ar": "قبل مزامنة البيانات ، يرجى التأكد من تلبية الإرشادات التالية:"}, + "ios-instructions-1": {"en": "Make sure that you have installed 'Health' App & 'Watch' App from Apple Store.", "ar": "تأكد من أنك قمت بتثبيت تطبيق 'Health' App & 'Watch' من متجر Apple."}, + "ios-instructions-2": {"en": "Make sure that your Apple Watch is connected with the Watch & Health Apps.", "ar": "تأكد من اتصال Apple Watch بتطبيقات Watch & Health."}, + "ios-instructions-3": { + "en": "Make sure that data like heart rate, steps, distance etc. are being shown on your health app.", + "ar": "تأكد من عرض بيانات مثل معدل ضربات القلب والخطوات والمسافة وما إلى ذلك على تطبيق صحتك." + }, + "supportedWatches": {"en": "Supported SmartWatches", "ar": "الساعات الذكية المدعومة"}, + "watchInstructions": {"en": "View watch instructions", "ar": "عرض تعليمات الساعة"}, + "monthlyTab": {"en": "Monthly", "ar": "شهري"}, + "moreSupportedWatches": {"en": "More Supported Smartwatches...", "ar": "المزيد من الساعات الذكية المدعومة..."}, + "android-instructions-1": { + "en": "Make sure that you have installed 'WearOS' & 'Google Fit' apps from Google PlayStore.", + "ar": "تأكد من تثبيت تطبيقات 'WearOS' و 'Google Fit' من متجر Google PlayStore." + }, + "android-instructions-2": {"en": "Make sure that you have installed your watch related apps from Google PlayStore.", "ar": "تأكد من أنك قمت بتثبيت التطبيقات المتعلقة بالساعات من Google PlayStore."}, + "android-instructions-3": {"en": "Make sure that your Smart Watch is connected with the WearOS app & your watch apps.", "ar": "تأكد من أن ساعتك الذكية متصلة بتطبيق WearOS وتطبيقات ساعتك."}, + "android-instructions-4": {"en": "Make sure that your smart watch apps are linked/associated with Google Fit App.", "ar": "تأكد من أن تطبيقات ساعتك الذكية مرتبطة / مرتبطة بتطبيق Google Fit."}, + "android-instructions-5": { + "en": "Make sure that data like heart rate, steps, distance etc. are being shown on your watch app & on Google Fit app & both are in sync.", + "ar": "تأكد من عرض بيانات مثل معدل ضربات القلب والخطوات والمسافة وما إلى ذلك على تطبيق الساعة وعلى تطبيق Google Fit وكلاهما في حالة مزامنة." + }, + "tamaraInstPlan": {"en": "Select the tamara installment plan", "ar": "حدد خطة تقسيط تمارة"}, + "onlineTag": {"en": "Online", "ar": "مفتوح"}, + "offlineTag": {"en": "Offline", "ar": "مغلق"}, + "viewDocList": {"en": "View List of Doctors", "ar": "عرض قائمة الأطباء"}, + "bodyFatTitle": {"en": "Body Fat", "ar": " الدهون في الجسم"}, + "cholesTitle": {"en": "Blood Cholesterol", "ar": " الكولسترول في الدم"}, + "laserClinic": {"en": "Laser Clinic", "ar": "عيادة الليزر"}, + "noImage": {"en": "No Image", "ar": "لا توجد صورة"}, + "signoutMessage": {"en": "Are you sure you want to logout?", "ar": "هل أنت متأكد أنك تريد تسجيل الخروج؟"}, + "RRTTitle": {"en": "RRT", "ar": "خدمة فريق"}, + "RRTSubTitle": {"en": "Service", "ar": "الاستجابة السريع"}, + "transportation": {"en": "Transportation", "ar": "النقل"}, + "installments": {"en": "Installments", "ar": "أقساط"}, + "neck": {"en": "Neck", "ar": "رقبه"}, + "waist": {"en": "Waist", "ar": "وسط"}, + "hip": {"en": "Hip", "ar": "ورك او نتوء"}, + "carbsProtin": {"en": "Carbs, Protein and Fat", "ar": "الكربوهيدرات والبروتينات والدهون"}, + "usefulInfo": {"en": "Useful Information", "ar": "معلومات مفيدة"}, + "babyAge": {"en": "Baby Age", "ar": "عمر الطفل الآن:"}, + "babyAgeAvail": {"en": "baby age is not available", "ar": "عمر الطفل غير متوفر"}, + "deliveryDue": {"en": "The delivery due date is estimated to be on the", "ar": "من المقدر أن يكون تاريخ استحقاق التسليم في"}, + "almostInactive": {"en": "Almost Inactive(Little or no exercises)", "ar": "شبه غير نشط (تمارين قليلة أو معدومة)"}, + "lightActive1": {"en": "Lighty Active (1-3) days per week", "ar": "Lighty Active (1-3) أيام في الأسبوع"}, + "veryActive": {"en": "very Active(6-7) days per week", "ar": "نشط جدا (6-7) أيام في الأسبوع"}, + "superActive": {"en": "Super Active(very hard exercises)", "ar": "سوبر نشط (تمارين صعبة للغاية)"}, + "dailyIntake": {"en": "Daily intake is", "ar": "المدخول اليومي"}, + "calculateAmount": {"en": "Calculates the amount of energy that the person’s body expends in a day", "ar": "تحسب كمية الطاقة التي يبذلها جسم الشخص في اليوم"}, + "bodyWillBurn": {"en": "This means the body will burn", "ar": "هذا يعني أن الجسم سوف يحترق"}, + "caloriesEachDay": { + "en": "calories each day, if engaged in no activity for the entire day.. Note: Daily calorie requirement is", + "ar": "السعرات الحرارية في كل يوم ، إذا لم تمارس أي نشاط طوال اليوم .. ملاحظة: متطلبات السعرات الحرارية اليومية هي" + }, + "maintainWeight": {"en": "calories, to maintain the current weight.", "ar": "السعرات الحرارية للحفاظ على الوزن الحالي."}, + "mediumFinger": {"en": "Medium(fingers touch)", "ar": "متوسطة (لمسة الأصابع)"}, + "smallFinger": {"en": "Small(fingers overlap)", "ar": "صغير (أصابع متداخلة)"}, + "largeFinger": {"en": "Large(fingers don\'n touch)", "ar": "كبير (لا تلمس الأصابع)"}, + "idealBodyWeight": {"en": "Calculates the ideal body weight based on height, Weight, and Body Size", "ar": "يحسب وزن الجسم المثالي بناءً على الطول والوزن وحجم الجسم"}, + "bodyFrameSize": {"en": "Body Frame Size", "ar": "حجم إطار الجسم"}, + "idealWeightRange": {"en": "Ideal weight range is", "ar": "نطاق الوزن المثالي هو"}, + "currentWeightPerfect": {"en": "Congratulations! The current weight is perfect and considered healthy", "ar": "تهانينا! الوزن الحالي مثالي ويعتبر صحي"}, + "littleBitWeightMore": {"en": "This means that the weight is a little bit more than ideal weight by", "ar": "هذا يعني أن الوزن أكثر قليلاً من الوزن المثالي به"}, + "consultWithDoctor": { + "en": "May wish to consult with the doctor for medical help. Click to view our list of Doctors", + "ar": "قد ترغب في استشارة الطبيب للحصول على مساعدة طبية. انقر لعرض قائمة الأطباء لدينا" + }, + "excessiveObesity": {"en": "Means that you suffer from excessive obesity by", "ar": "يعني أنك تعاني من السمنة المفرطة بها"}, + "mayWish": { + "en": "May wish to consult with the doctor for medical help. Click to view our list of\n Doctors", + "ar": "قد ترغب في استشارة الطبيب للحصول على مساعدة طبية. انقر لعرض قائمة الأطباء \ n الخاصة بنا" + }, + "essential": {"en": "The category falls under essential", "ar": "الفئة تندرج تحت الأساسية"}, + "athlete": {"en": "The category falls under athlete", "ar": "فئة تندرج تحت رياضي"}, + "fitness": {"en": "The category falls under fitness", "ar": "الفئة تندرج تحت اللياقة البدنية"}, + "acceptable": {"en": "The category falls under acceptable", "ar": "الفئة تندرج تحت مقبول"}, + "underObese": {"en": "The category falls under obese", "ar": "تندرج الفئة تحت السمنة"}, + "crossedLimits": { + "en": "Please check the value you have entered, since the body fat percentage has crosed the limits.", + "ar": "يرجى التحقق من القيمة التي أدخلتها ، لأن نسبة الدهون في الجسم تجاوزت الحدود." + }, + "lowLimits": { + "en": "Please check the value you have entered, since the body fat percentage cannot be this low.", + "ar": "يرجى التحقق من القيمة التي أدخلتها ، حيث لا يمكن أن تكون نسبة الدهون في الجسم منخفضة." + }, + "estimates": {"en": "Estimates the total body fat based on\nthe size", "ar": "تقدير إجمالي الدهون في الجسم بناءً على \ n الحجم"}, + "myCart": {"en": "My Cart", "ar": "عربة التسوق"}, + "browseOffers": {"en": "Browse offers by clinic", "ar": "تصفح العروض حسب العيادة"}, + "browseOffersByProject": {"en": "Browse offers by hospital", "ar": "تصفح العروض حسب المستشفى"}, + "inactiveAct": {"en": "Almost inactive (little or no exercise)", "ar": "غير نشط تقريبا (ممارسة الرياضة قليلة أو منعدمة)"}, + "light": {"en": "Lightly active (1-3) days per week", "ar": "خفيف النشاط (1-3 أيام في الأسبوع)"}, + "moderate": {"en": "Moderately active (3-5) days per week)", "ar": "معتدل النشاط (3-5 أيام في الأسبوع)"}, + "very": {"en": "Very active (6-7) days per week)", "ar": "نشط جداُ (6-7 أيام في الأسبوع)"}, + "super": {"en": "Super active (very hard exercise)", "ar": "عالي النشاط (ممارسة الرياضة الصعبة)"}, + "resultCalories": {"en": "Daily intake is (#) calories", "ar": "الإحتياج اليومي (#) سعرة حرارية"}, + "bmrDesc": {"en": "Calculates the amount of energy that the person’s body expends in a day", "ar": "معدل الأيض القاعدي: هو حساب كمية الطاقة التي يحتاجها الجسم في اليوم الواحد"}, + "idealWeightDesc": {"en": "Calculates the ideal body weight based on height, Weight, and Body Size", "ar": "حساب الوزن المثالي والوزن الصحي للجسم على أساس الطول، والوزن ،والجسم"}, + "bodyFrame": {"en": "Body Frame Size", "ar": "مقاس هيكل الجسم"}, + "bodyFrameSmall": {"en": "Small (fingers overlap)", "ar": "رفيع (الأصابع تتداخل)"}, + "bodyFrameMedium": {"en": "Medium (fingers touch)", "ar": "متوسط (الأصابع تتلامس)"}, + "bodyFrameLarge": {"en": "Large (fingers don't touch)", "ar": "عريض (الأصابع لا تتلامس)"}, + "bodyFatDesc": {"en": "Estimates the total body fat based on the size", "ar": "حساب الدهون في الجسم بناءاً على الحجم"}, + "obeseBodyFat": {"en": "The category falls under Obese.", "ar": "تندرج تحت فئة دهون جسم سمين"}, + "invalid": {"en": "Invalid input for calculation.", "ar": "البيانات المدخلة غير صالحة للحساب"}, + "more": { + "en": "Please check the value you have entered, since the body fat percentage has crossed the limits.", + "ar": "يرجى التحقق من القيمة التي أدخلتها ، نظرًا لأن نسبة الدهون في الجسم قد تجاوزت الحدود" + }, + "less": { + "en": "Please check the value you have entered, since the body fat percentage cannot be this low.", + "ar": "يرجى التحقق من القيمة التي أدخلتها ، نظرًا لأن نسبة الدهون في الجسم لا يمكن أن تكون منخفضة" + }, + "carbProteinDesc": { + "en": "Calculates carbohydrate protein and fat ratio in calories and grams according to a pre-set ratio", + "ar": "حساب نسب الكربوهيدرات و البروتينات و الدهون بالسعرات الحرارية والغرامات وفقا لنسب محددة مسبقا" + }, + "calDay": {"en": "Calories Per Day", "ar": "السعرات الحرارية في اليوم الواحد"}, + "notSure": {"en": "Not sure? click here", "ar": "غير متأكد؟ اضغط هنا"}, + "selectDiet": {"en": "Select Diet Type", "ar": "حدد نوع النظام الغذائي"}, + "dietVeryLow": {"en": "Very Low Carb", "ar": "حمية منخفضة جدا في الكربوهيدرات"}, + "dietLow": {"en": "Low Carb", "ar": "حمية منخفضة الكربوهيدرات"}, + "dietModerate": {"en": "Moderate Carb", "ar": "حمية معتدلة الكربوهيدرات"}, + "dietUSDA": {"en": "USDA Guidelines", "ar": "ارشادات وزارة الزراعة الأمريكية"}, + "dietZone": {"en": "Zone Diet", "ar": "حمية زون"}, + "Protein": {"en": "Protein", "ar": "بروتين"}, + "Cals": {"en": "Cals", "ar": "كالس"}, + "gramsPerDay": {"en": "Grams Per Day", "ar": "غرام في اليوم"}, + "gr": {"en": "gr", "ar": "غرام"}, + "gramsPerMeal": {"en": "Grams Per Meal", "ar": "عدد الجرامات لكل وجبة"}, + "syncSuccess": {"en": "Data Synced Successfully", "ar": "تمت مزامنة البيانات بنجاح"}, + "points": {"en": "Points", "ar": "نقاط"}, + "availableBalance": {"en": "Available Balance", "ar": "الرصيد المتوفر"}, + "ordersDashboard": {"en": "My Orders", "ar": "طلباتي"}, + "productOutOfStock": {"en": "Out Of Stock", "ar": "إنتهى من المخزن"}, + "productQuantity": {"en": "Quantity", "ar": "كمية"}, + "yourTurn": {"en": "your turn is after", "ar": "دورك بعد"}, + "patients": {"en": "patients", "ar": "مريض"}, + "group": {"en": "Group", "ar": "مجموعة"}, + "covidTestTodo": {"en": "Covid-19 Test", "ar": "فحص كورونا"}, + "ancillaryOrdersPaymentConfirm": {"en": "Are you sure you want to make payment for selected orders?", "ar": "هل أنت متأكد أنك تريد سداد قيمة الطلبات المختارة؟"}, + "successRegister": {"en": "Your account has been created.", "ar": "لقد تم إنشاء حسابك."}, + "pharmacyLiveCare": {"en": "Pharmacy LiveCare", "ar": "لايف كير صيدلية"}, + "ancillaryOrderPaymentSuccess": {"en": "Your payment for selected orders has been made successfully.", "ar": "تم سداد دفعتك للطلبات المحددة بنجاح."}, + "connectTitle": {"en": "Connect", "ar": "تواصل"}, + "connectSubtitle": {"en": "With us", "ar": "معنا"}, + "covidConsent": { + "en": + "Covid-19 Test feature allows you to book an appointment for the Covid-19 Lab test within HMG branches, where a swab sample will be collected & processed. Once the result has been processed, we shall notify you via SMS on your registered mobile number & the test result will also be available in the Lab Results section of this app. Please note that this result is only available to you & not publicly available to anyone else.", + "ar": + "تتيح لك ميزة اختبار كوفيد19 حجز موعد في احد فروع مجموعة الحبيب الطبية ، حيث سيتم اخذ عينة المسحة ومعالجتها. بمجرد معالجة النتيجة ، سنخطرك عبر رسالة نصية قصيرة على رقم هاتفك المحمول المسجل وستكون نتيجة الاختبار متاحة أيضًا على التطبيق في قسم نتائج المختبر. يرجى ملاحظة أن هذه النتيجة متاحة لك فقط وليست متاحة للجمهور او اي شخص آخر. الرجاء الموافقة للتأكيد والمتابعة." + }, + "covidConsentHeader": {"en": "User Consent", "ar": "موافقة المستخدم"}, + "drawOverAppsPermission": { + "en": "Please allow the Al-Habib Medical Group application to appear on the top of the screen when receiving the call from the doctor for LiveCare service.", + "ar": "الرجاء السماح لتطبيق مجموعة الحبيب الطبية للظهورعلى سطح الشاشة عند استلام الاتصال من الطبيب لخدمة اللايف كير" + }, + "cameraPermissionDialog": { + "en": "Dr. Al Habib app needs to access Camera to enable virtual consultation between patient & doctor, attach images and scan QR for parking service.", + "ar": "يحتاج تطبيق دكتور الحبيب الى صلاحية الوصول إلى الكاميرا لخدمة الاستشارة الافتراضية بين المراجع والطبيب وإرفاق الصور ومسح رمز الاستجابة السريع لخدمة مواقف السيارات." + }, + "galleryPermission": { + "en": "Dr. Al Habib app needs to access Read & write external storage to upload images & documents in the E-Referral module and renew and update the insurance cards.", + "ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول إلى معرض الصور وذلك لتحميل الصور والمستندات لخدمة الإحالة الإلكترونية وكذلك لخدمة تجديد بطاقات التأمين وتحديثها." + }, + "locationPermissionDialog": { + "en": + "Dr. Al Habib app collects location data to show the nearest HMG hospitals and ER Locations and provides health care services to your location and Health weather indicators service and the medication delivery.", + "ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول الى الموقع لإظهار أقرب مستشفيات المجموعة، مواقع الطوارئ، تقديم خدمات الرعاية الصحية إلى موقعك، خدمة مؤشرات الطقس الصحية وكذلك خدمة توصيل الأدوية." + }, + "calendarPermission": { + "en": "Dr. Al Habib app collects calendar data to modify and set reminders for Appointments", + "ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول الى التقويم وذلك لاضافة تذكيرات بالمواعيد في التقويم." + }, + "recordAudioPermission": { + "en": "Dr. Al Habib app needs audio permission to enable voice command features.", + "ar": "يحتاج تطبيق دكتور الحبيب إلى صلاحية الوصول الى الصوت لتفعيل خدمة الأوامر الصوتية." + }, + "wifiPermission": { + "en": "Dr. Al Habib app needs to access WiFi state permission to connect to the HMG WiFi network from within the app when you visit the hospital.", + "ar": "يحتاج تطبيق دكتور الحبيب إلى الوصول إلى الواي فاي للاتصال بشبكة الواي فاي في المجموعة عند زيارة المستشفى." + }, + "physicalActivityPermission": { + "en": "Dr. Al Habib app collects physical activity data to read heart rate, steps & distance from your smartwatch & send it to your doctor.", + "ar": "يحتاج تطبيق دكتور الحبيب إلى الوصول إلى بيانات النشاط البدني لقراءة معدل ضربات القلب والخطوات والمسافة من ساعتك الذكية وتحميلها على ملفك الطبي حتى يتمكن الطبيب من الاطلاع عليها." + }, + "bluetoothPermission": { + "en": "Dr. Al Habib app needs to access Bluetooth permission to connect blood pressure & blood sugar devices with the app to analyze the data", + "ar": "يحتاج تطبيق دكتور الحبيب إلى الوصول إلى البلوتوث لربط أجهزة ضغط الدم وسكر الدم بالتطبيق لتحليل البيانات وتحميلها على ملفك الطبي حتى يتمكن الطبيب من الاطلاع عليها." + }, + "privacyPolicy": {"en": "Privacy Policy", "ar": "سياسة الخصوصية"}, + "termsConditions": {"en": "Terms & Conditions", "ar": "الأحكام والشروط"}, + "prescriptionDeliveryError": {"en": "This clinic does not support refill & delivery.", "ar": "هذه العيادة لا تدعم إعادة التعبئة والتسليم."}, + "liveCarePermissions": { + "en": "LiveCare requires Camera, Microphone & Location permissions to enable virtual consultation between patient & doctor, Please allow these to proceed.", + "ar": "يتطلب لايف كير أذونات الكاميرا والميكروفون والموقع، يرجى السماح لها بالمتابعة." + }, + "lakumUnhold": {"en": "The account has already been activated", "ar": "لقد تم تفعيل الحساب من قبل"}, + "lakumDiscontinue": {"en": "The account is closed", "ar": "الحساب مغلق"}, + "lakumSuccess": {"en": "The account has been activated successfully", "ar": "تم تفعيل الحساب بنجاح"}, + "deleteAccount": {"en": "Deactivate Account", "ar": "ايقاف الحساب مؤقتاً"}, + "deactivateAccount": {"en": "Are you sure you want to deactivate your account?", "ar": "هل أنت متأكد أنك تريد ايقاف الحساب مؤقتاً حسابك؟"}, + "accountDeactivated": {"en": "Your account has been deactivated successfully", "ar": "تم ايقاف الحساب مؤقتاً بنجاح."}, + "accountDeactivatedMsg": {"en": "Your account has been deactivated. Would you like to reactivate it?", "ar": "حسابك معطل. هل ترغب في إعادة تنشيطه مرة أخرى؟"}, + "updateInsuranceManually": {"en": "Update Insurance Manually", "ar": "تحديث التأمين يدويا"}, + "or": {"en": "Update Insurance Manually", "ar": "تحديث التأمين يدويا"}, + "enterInsuranceDetails": {"en": "Please enter your insurance card details below:", "ar": "الرجاء إدخال تفاصيل بطاقة التأمين الخاصة بك أدناه:"}, + "cardHolderName": {"en": "Card Holder Name", "ar": "إسم صاحب البطاقة"}, + "membershipNo": {"en": "Membership No.", "ar": "رقم العضوية"}, + "policyNo": {"en": "Policy No.", "ar": "رقم وثيقة التأمين"}, + "paymentOnly": {"en": "Payment", "ar": "معلقة"}, + "pendingOnly": {"en": "Pending", "ar": "مدفوعات"}, + "insuranceClassName": {"en": "Insurance Class", "ar": "فئة التأمين"}, + "insuranceRequestSubmit": {"en": "Your insurance update request has been submitted successfully.", "ar": "تم تقديم طلب تحديث التأمين الخاص بك بنجاح."}, + "NFCNotSupported": {"en": "Your device does not support NFC. Please visit reception to Check-In", "ar": "جهازك لا يدعم NFC. يرجى زيارة مكتب الاستقبال لتسجيل الوصول"}, + "enter-workplace-name": {"en": "Please enter your workplace details:", "ar": "الرجاء إدخال تفاصيل مكان عملك:"}, + + // "workplaceName": {"en": "Workplace name:", "ar": "مكان العمل:"}, + "workplaceName": {"en": "Workplace name English", "ar": "مكان العمل انجليزي:"}, + "workplaceNameAr": {"en": "Workplace name Arabic *", "ar": "مكان العمل عربي:"}, + "occupationNameEn": {"en": "Occupation name English", "ar": "مكان العمل انجليزي:"}, + "occupationNameAr": {"en": "Occupation name Arabic *", "ar": "مكان العمل عربي:"}, + + "callLiveCareSupport": {"en": "Call LiveCare Support", "ar": "اتصل بدعم اللايف كير"}, + "needApproval": { + "en": "Your sick leave is under process in medical administration, you will be notified once approved.", + "ar": "جازتك المرضية تحت الإجراء في الإدارة الطبية ، سوف يتم إشعارك فور الموافقه عليها." + }, + "pendingActivation": {"en": "Pending Activation", "ar": "في انتظار التنشيط"}, + "awaitingApproval": {"en": "Awaiting Approval", "ar": "انتظر القبول"}, + "liveCareSupportContact": {"en": "LiveCare Support Contact: ", "ar": "اتصل لايف كير: "}, + "pharmaLiveCare": {"en": "Pharma LiveCare", "ar": "لايف كير الصيدلية"}, + "pharmaLiveCare1": {"en": "What is Pharma LiveCare?", "ar": "ما هولايف كير الصيدلية؟"}, + "pharmaLiveCareDesc1": { + "en": "Pharma LiveCare allows you to get consultation from your doctor virtually being in HMG Pharmacy booth.", + "ar": "تتيح لك خدمة لايف كير الصيدلية الحصول على استشارة من طبيبك المتواجد فعليًا في كشك صيدلية د.سليمان الحبيب." + }, + "wherePharmaLiveCare": {"en": "Where can i find Pharma LiveCare?", "ar": "أين يمكنني أن أجد لايف كير الصيدلية؟"}, + "pharmaLiveCareDesc2": {"en": "You can find the booth in HMG Pharmacies.", "ar": "يمكنك العثور على الكشك في صيدليات مستشفى د.سليمان الحبيب."}, + "howPharmaLiveCare": {"en": "How can i use Pharma LiveCare?", "ar": "كيف يمكنني استخدام لايف كير الصيدلية؟"}, + "pharmaLiveCareDesc3": { + "en": "Following the below steps you can easily benefit from the virtual consultation service:", + "ar": "باتباع الخطوات التالية يمكنك الاستفادة بسهولة من خدمة الاستشارة الافتراضية:" + }, + "pharmaLiveCareScanQR": {"en": "Scan QR Code", "ar": "مسح رمز الاستجابة السريعة"}, + "pharmaLiveCareScanQR1": {"en": "Scan the QR Code in the booth to make the connection", "ar": "امسح رمز الاستجابة السريعة في المقصورة لإجراء الاتصال"}, + "pharmaLiveCareMakePayment": {"en": "Make Payment Online", "ar": "قم بالدفع عبر الإنترنت"}, + "pharmaLiveCareMakePayment1": {"en": "Make the payment through the mobile app", "ar": "قم بالدفع من خلال تطبيق الهاتف المحمول"}, + "pharmaLiveCareJoinConsultation": {"en": "Join the virtual consultation from booth", "ar": "انضم إلى الاستشارة الافتراضية من الكبينة"}, + "pharmaLiveCareJoinConsultation1": {"en": "Wait for the doctor in the pharma booth to join you", "ar": "انتظر حتى ينضم إليك الطبيب في كبينة لايف كير الصيدلية"}, + "emergencyServicesSubtitle": {"en": "Always at your service", "ar": "في خدمتكم دائما"}, + "rateDoctorResponse": {"en": "Rate Doctor Response", "ar": "تقييم استجابة الطبيب"}, + "comments": {"en": "Comments", "ar": "تعليقات"}, + "rateDoctorResponseHeading": {"en": "Please rate the doctor response:", "ar": "يرجى تقييم استجابة الطبيب:"}, + "updateInsuranceManuallyDialog": {"en": "Would you like to update your insurance manually?", "ar": "هل ترغب في تحديث التأمين الخاص بك يدويًا؟"}, + "viewReport": {"en": "View Report", "ar": "عرض التقرير"}, + "sickLeaveAdmittedPatient": {"en": "You cannot activate this sick leave since you're an admitted patient.", "ar": "لا يمكنك تفعيل هذه الإجازة المرضية لأنك مريض مقبل."}, + "InPatient": {"en": "InPatient", "ar": "خدمات"}, + "InPatientServices": {"en": "Services", "ar": "تنويم"}, + "InPatientServicesHeader": {"en": "InPatient Services", "ar": "خدمات التنويم"}, + "admissionGeneral": {"en": "Admission General", "ar": "اقرار"}, + "consent": {"en": "Consent", "ar": "التنويم"}, + "generalInstructionsTitle": {"en": "General", "ar": "تعليمات"}, + "generalInstructionsSubTitle": {"en": "Instructions", "ar": "التنويم العامة"}, + "generalConsentTitle": {"en": "General", "ar": "الموافقة"}, + "generalConsentSubTitle": {"en": "Consent", "ar": "العامة"}, + "medicalInstructionsTitle": {"en": "Medical", "ar": "التعليمات الطبية"}, + "medicalInstructionsSubTitle": {"en": "Instructions", "ar": "قبل التنويم"}, + "mealPlanTitle": {"en": "Meal Plan", "ar": "خدمات"}, + "mealPlanSubTitle": {"en": "Services", "ar": "الوجبات"}, + "birthNotificationTitle": {"en": "Birth", "ar": "خدمات"}, + "birthNotificationSubTitle": {"en": "Notification", "ar": "تبليغ الولادة"}, + "admissionNoticeTitle": {"en": "Admission", "ar": "إشعار"}, + "admissionNoticeSubTitle": {"en": "Notice", "ar": "تنويم"}, + "mothersMRN": {"en": "Mother's MRN *", "ar": "رقم ملف الأم"}, + "mothersName": {"en": "Mother's name *", "ar": "اسم الأم"}, + "fathersNameEN": {"en": "Father's name english *", "ar": "اسم الاب انجليزي"}, + "fathersNameAR": {"en": "Father's name arabic *", "ar": "اسم الاب عربي"}, + "babysNameEN": {"en": "Baby's name english *", "ar": "اسم المولود انجليزي"}, + "babysNameAR": {"en": "Baby's name arabic *", "ar": "اسم المولود عربي"}, + "contactNumber": {"en": "Contact number *", "ar": "رقم الاتصال"}, + "scanID": {"en": "Scan ID", "ar": "معرف المسح"}, + "birthNotificationNotes1": { + "en": "For Saudis: Provide copy of the identification card for both couples. If the wife doesn't have identification card, The family card must be provided.", + "ar": "للسعوديين : إرفاق صورة من بطاقة الأحوال لكلا الزوجين وفي حال عدم توفر بطاقة الزوجة ترفق عنها بطاقة العائلة" + }, + "birthNotificationNotes2": {"en": "Non Saudis: Provide copy of iqama or copy of the passport.", "ar": "لغير السعوديين : إرفاق صورة الإقامة آأو جواز السفر"}, + "birthNotificationNotes3": {"en": "For Residents without identification card: Provide marriage contract.", "ar": "للمواطنين الغير حاملين لبطاقة الأحوال : إرفاق صورة من عقد الزواج برقم الحاسب"}, + "placeOrder": {"en": "Place Order", "ar": "مكان الامر"}, + "isFasting": {"en": "Are you fasting?", "ar": "هل أنت صائم؟"}, + "noGeneralInstructions": {"en": "You do not have any general instructions right now.", "ar": "ليس لديك أي تعليمات عامة في الوقت الحالي."}, + "noMedicalInstructions": {"en": "You do not have any medical instructions right now.", "ar": "ليس لديك أي تعليمات طبية في الوقت الحالي."}, + "medicalInstructions": {"en": "Medical Instructions:", "ar": "تعليمات طبية:"}, + "generalInstructions": {"en": "General Instructions:", "ar": "تعليمات عامة:"}, + "copyLink": {"en": "COPY LINK", "ar": "نسخ الوصلة:"}, + "paymentLinkCopied": {"en": "Payment link copied to your clipboard!'", "ar": "تم نسخ رابط الدفع إلى الحافظة الخاصة بك!"}, + "copyLinkTxt": { + "en": "Or you can copy the payment link from below & send it to someone who can pay on your behalf: ", + "ar": "أو يمكنك نسخ رابط الدفع من الأسفل وإرساله إلى شخص يمكنه الدفع نيابة عنك:" + }, + "proErrorMessage": { + "en": + "Dear patient, Our staff is currently out of office, please note that our working hours are from 7:00 AM to 10:00 PM, and we'd love to help you during that time, or you can call ", + "ar": "عزيزي المريض ، طاقم العمل لدينا خارج المكتب حاليًا ، يرجى ملاحظة أن ساعات العمل لدينا من 7:00 صباحًا إلى 10:00 مساءً ، ويسعدنا مساعدتك خلال هذا الوقت ، أو يمكنك الاتصال بـ <أدخل الرقم هنا>" + }, + "admissionNo": {"en": "Admission No", "ar": "رقم القبول:"}, + "admissionReqNo": {"en": "Admission Request No", "ar": "رقم طلب القبول:"}, + "dischargeDate": {"en": "Discharge Date", "ar": "تاريخ التفريغ"}, + "selectAdmissionText": {"en": "Please select one of the admissions from below to view medical reports:", "ar": "يرجى تحديد أحد حالات القبول من الأسفل لعرض التقارير الطبية:"}, + "onlyAdmitted": {"en": "This service is only available for admitted patients", "ar": "هذه الخدمة متاحة فقط للمرضى المقبولين"}, + "assistYou": {"en": "How we may assist you?", "ar": "كيف يمكننا مساعدتك؟"}, + "receive": {"en": "Receive", "ar": "تجهيز"}, + "PRO": {"en": "PRO", "ar": "علاقات المرضى"}, + "patientRelationOffice": {"en": "Patient Relation Office", "ar": "علاقات المرضى"}, + "roomNo": {"en": "Room No.", "ar": "رقم الغرفة"}, + "invalidEligibility": { + "en": "You cannot make online payment because you are not eligible to use the provided service.", + "ar": "لا يمكنك إجراء الدفع عبر الإنترنت لأنك غير مؤهل لاستخدام الخدمة المقدمة." + }, + "invalidInsurance": {"en": "You cannot make online payment because you do not have a valid insurance.", "ar": "لا يمكنك إجراء الدفع عبر الإنترنت لأنه ليس لديك تأمين صالح."}, + "continueCash": {"en": "Continue as cash", "ar": "تواصل نقدا"}, + "updateInsurance": {"en": "Update insurance", "ar": "تحديث التأمين"}, + "downloadReport": {"en": "Download Report", "ar": "تحميل تقرير المختبر"}, + "habibCallCenter": {"en": "Please contact AlHabib call center to update your insurance manually.", "ar": "يرجى الاتصال بمركز اتصال الحبيب لتحديث التأمين الخاص بك يدوياً."}, + "cashAmountUpdateInsurance": { + "en": "Please note that this is the cash amount, If you want to update your insurance, Please tap below:", + "ar": "يرجى ملاحظة أن هذا هو المبلغ النقدي، إذا كنت ترغب في تحديث التأمين الخاص بك، يرجى النقر أدناه:" + }, + "validInsurance": {"en": "Do you have a valid insurance?", "ar": "هل لديك تأمين صالح؟"}, + "resultStatus": {"en": "Result Status: ", "ar": "حالة النتيجة: "}, + "contactRRT": {"en": "Contact RRT", "ar": "تواصل مع فريق الاستجابة السريعة"}, + "checkInViaLocation": {"en": "Check-In Via Location", "ar": "تسجيل الوصول عبر الموقع"}, + "locationCheckInError": {"en": "Please ensure you're within the hospital location to perform online check-in.", "ar": "يرجى التأكد من تواجدك داخل موقع المستشفى لإجراء تسجيل الوصول عبر الإنترنت."}, + "upcoming": {"en": "Upcoming", "ar": "المواعيد القادمة"}, + "noUpcomingAppointment": {"en": "No upcoming appointments", "ar": "لا توجد مواعيد القادمة"}, + "locationTimeoutError": {"en": "Unable to fetch your location, Please try again.", "ar": "غير قادر على جلب موقعك، يرجى المحاولة مرة أخرى."}, + "loadMore": {"en": "Load More", "ar": "تحميل المزيد"}, + "selectHospitalBloodDonation": {"en": "Please select the hospital you want to book an appointment with: ", "ar": "يرجى اختيار المستشفى الذي تريد حجز موعد معه:"}, + "wecare": {"en": "We Care", "ar": "نحن نهتم"}, + "myinstructions": {"en": "My Instructions", "ar": "تعليماتي"}, + "existingPackage": {"en": "This patient has a package under this clinic,", "ar": "هذا المريض لديه حزمة تحت هذه العيادة،"}, + "continueOrbookNew": {"en": "do you want to continue with that package? or book new appointment?", "ar": "هل تريد الاستمرار في هذه الباقة؟ أو حجز موعد جديد؟"}, + "newAppointment": {"en": "New Appointment", "ar": "موعد جديد"}, + "proceedPackage": {"en": "Proceed with package", "ar": "المضي قدما في الحزمة"}, + + "clinicLocation": {"en": "Clinic Location", "ar": "موقع العيادة"}, + "waitingAppointment": {"en": "Waiting appointment", "ar": "انتظار الموعد"}, + "whatWaitingAppointment": {"en": "What is Waiting appointment?", "ar": "ما هو انتظار الموعد؟"}, + "waitingAppointmentText1": { + "en": "The waiting appointments feature allows you to book an appointment while you are inside the hospital building, and in case there is no available slot in the doctor’s schedule.", + "ar": "تتيح لك خاصية انتظار المواعيد حجز موعد أثناء تواجدك داخل مبنى المستشفى، وفي حالة عدم وجود وقت متاح في جدول الطبيب." + }, + "waitingAppointmentText2": {"en": "The appointment with the doctor is confirmed, but the time of entry is uncertain", "ar": "دخول الموعد مؤكد, التوقيت غير محدد."}, + "waitingAppointmentText3": { + "en": "Note: You must have to pay within 10 minutes of booking, otherwise your appointment will be cancelled automatically", + "ar": "ملحوظة: يجب عليك الدفع خلال 10 دقائق من الحجز، وإلا سيتم إلغاء موعدك تلقائيًا" + }, + "waitingAppointmentVerificationMethod": {"en": "Please select verification method", "ar": "الرجاء تحديد طريقة التحقق"}, + "howToUseVerificationMethod": {"en": "How to use verification methods?", "ar": "كيفية استخدام طرق التحقق؟"}, + "addToWaitingList": {"en": "Add to waiting list", "ar": "اضافه الى قائمة الانتظار"}, + "searchClinic": {"en": "Search Clinic", "ar": "بحث العيادة"}, + "enterMobileNumber": {"en": "Enter Mobile Number", "ar": "أدخل رقم الجوال"}, + "videoCall": {"en": "Video Call", "ar": "اتصال فيديو"}, + "audioCall": {"en": "Audio Call", "ar": "اتصال صوتية"}, + "phoneCall": {"en": "Phone Call", "ar": "اتصال هاتفية"}, + "selectCallType": {"en": "Select Call Type", "ar": "حدد نوع المكالمة"}, + "selectedCallType": {"en": "Selected Call Type", "ar": "نوع المكالمة المحدد"}, + "selectBranch": {"en": "Select Branch", "ar": "اختر الفرع"}, + "searchByBranch": {"en": "Search By Branch Name", "ar": "البحث عن طريق اسم الفرع"}, + "hospitalNavigationTitle": {"en": "Hospital", "ar": "الملاحة"}, + "hospitalNavigationSubtitle": {"en": "Navigation", "ar": "المستشفى"}, + "continueAgreeTerms": {"en": "By continuing, You agree to the above Terms and Conditions.", "ar": "من خلال المتابعة، فإنك توافق على الشروط والأحكام المذكورة أعلاه."}, + "agreeText": {"en": "Agree", "ar": "أوافق"}, + "ERCheckInSuccess": {"en": "Your ER Online Check-In has been successfully done. Please proceed to the waiting area.", "ar": "لقد تم تسجيل دخولك عبر الإنترنت بنجاح. يرجى التوجه إلى منطقة الانتظار."}, + "generalConsent": {"en": "General Consent: ", "ar": "موافقة عامة:"}, + + "generalConsent1": { + "en": + "I authorize the Hospital and their staff to conduct any diagnostic examinations, test (including, but not limited to, HIV, HBsAg and any other as the clinician may deem fit), procedures and to provide any medications, treatments or therapy necessary to effectively assess and maintain my health, and to assess, diagnose and treat my illness or injuries. I understand that it is the responsibility of my health care providers to explain the patient's condition and thereby reasons for any particular diagnostic examination, test or procedure, the available treatment options, the common risks, anticipated benefits associated with these options, alternative courses of treatment and possible outcomes of non-treatment.", + "ar": + "أفوض المستشفى وموظفيه بإجراء أية فحوصات واختبارات وإجراءات تشخيصية (بما في ذلك مثالاً وليس حصراً فحوصات أمراض الكبد الوبائية أو نقص المناعة المكتسبة أو أي فحوصات أخرى يرى الطبيب المعالج (مناسبتها وتقديم أية أدوية أو علاج ضروري لتقييم . صحتي والمحافظة عليها بفاعلية والتقييم وتشخيص ومعالجة مرضي او الإصابات اللاحقة بي، وأدرك بأنه من مسؤولية مقدمي الرعاية الصحية بيان أسباب أي فحص أو إختبار أو إجراء تشخيصي محدد وخيارات العلاج المتوفرة والمخاطرة الشائعة والمنافع المتوقعة المرتبطة بهذه الخيارات والعلاج البديل والنتائج المحتملة لرفض العلاج." + }, + "hospitalRules": {"en": "HOSPITAL RULES: ", "ar": "أنظمة المستشفى: "}, + "generalConsent2": { + "en": + "Agree to be obliged to adhere to the Hospital rules, and to ensure compliance by all visitors. In the event of any severe violations of the rules, the hospital reserves the right to take the necessary measures according to the applicable Laws.", + "ar": + "أوافق على التقيد بقواعد وأنظمة المستشفى، وأضمن التزام جميع الزوار بذلك ، في حالة حدوث أي إنتهاكات جسيمة لقواعد وأنظمة المستشفى، يحتفظ المستشفى بالحق في إتخاذ جميع الاجراءات النظامية المكفولة." + }, + "communicationConsent": {"en": "COMMUNICATION VIA EMAIL, TEXT MESSAGES AND PHONE CALLS: ", "ar": "الاتصال عبر البريد الإلكتروني والرسائل النصية والمكالمات الهاتفية: "}, + "generalConsent3": { + "en": + "I understand that the contact number or Email that I have provided on registration will be used for communication by the Hospital. I hereby agree to be notified by the Hospital through SMS, Email, phone calls or any other method, for appointments notifications, special promotions, new features or products, current HMG's medical services, and of any services introduced by the Hospital or any third party in the future or any modifications made to the services offered by the Hospital. And these messages may be submitted as evidence where the Hospital has the right to use at any time whatsoever and as it sees fit. I understand the risks of communicating by email and text messages, in particular the privacy risks. I understand that the Hospital cannot guarantee the security and confidentiality of email or text communication. The Hospital will not be responsible for messages that are not received or delivered due to technical failure, or for disclosure of confidential information unless caused by intentional misconduct.", + "ar": + "المستشفى أدرك بأن رقم الجوال الهاتف أو البريد الإلكتروني الذي قدمته في نموذج التسجيل سيستخدم كوسيلة اتصال بيني وبين | وأقر بموافقتي على قيام المستشفى بإخطاري عن طريق رسائل البريد أو الرسائل القصيرة أو البريد الإلكتروني أو المكالمات الهاتفية أو أي طريقة أخرى بالمواعيد والعروض الترويجية أو المميزات والمنتجات الخاصة بالمستشفى أو) خاصة بأي طرف خارجي) وبأي خدمات طبية تقدمها المجموعة أو قد يطرحها المستشفى في المستقبل أو أي تعديلات قد تطرأ على الخدمات المقدمة من قبل المستشفى. وتعتبر هذه الرسائل دليل إثبات يحق للمستشفى استخدامه في اي وقت يشاء. أفهم مخاطر التواصل عبر البريد الإلكتروني والرسائل النصية خاصة مخاطر الخصوصية وأدرك أن المستشفى لا يمكنه ضمان أمن وسرية البريد الإلكتروني أو الرسائل النصية ولن يكون المستشفى مسؤول عن الرسائل التي لم يتم استلامها أو تسليمها بسبب الفشل التقني أو الكشف عن المعلومات السرية ما لم يكن سببها سوء سلوك متعمد." + }, + "releaseConsent": {"en": "RELEASE OF PERSONAL AND MEDICAL INFORMATION: ", "ar": "الإفصاح عن المعلومات الشخصية والطبية: "}, + "generalConsent4": { + "en": + "On completion of this consent I hereby authorize the hospital to provide any information of whatever nature concerning my treatment, including but not limited to, current conditions/co-morbidities to my insurance carrier or third party payer, for the purpose of determining benefit entitlement and to process payment, therefore taking responsibility for the financial settlement of my medical bills.", + "ar": + "عند تعبئة هذا النموذج ، أصرح بموجبه للمستشفي بتقديم أية معلومات أياً كانت طبيعتها بخصوص حالتي الصحية وعلاجي لشركة التأمين أو لأي طرف آخر مسؤول عن الدفع لأغراض تحديد حق الاستفادة والقيام بالدفع وبالتالي تحمل المسؤولية عن التسوية المالية للفواتير الطبية الخاصة بي." + }, + "generalConsent5": { + "en": + "The Hospital is obliged by local and government regulations to submit certain patient information and I hereby give consent for the disclosure or use of my information as per statutory requirement. I also acknowledge that this consent is subject to the laws and jurisdiction of the country in which the Hospital is located.", + "ar": + " إن المستشفى ملزم بموجب الأنظمة المحلية وأنظمة الدولة بتقديم بعض المعلومات المتعلقة بالمريض وأوافق بموجبه على إفصاح أو استخدام المستشفى للمعلومات الخاصة بي حسبما هو مطلوب نظاماً، وأن هذا الإقرار خاضع للأنظمة والقوانين والاختصاص القضائي للدولة حيث يقع المستشفى." + }, + "valuables": {"en": "VALUABLES: ", "ar": "الممتلكات الثمينة: "}, + "generalConsent6": { + "en": "The Hospital is not liable for the loss or damage of any money, jewelry, documents or other personal articles of value.", + "ar": "المستشفى غير مسؤول عن ضياع أو تلف أي أموال أو مجوهرات أو مستندات أو أي أشياء أخري ذات قيمة." + }, + "financialConsent": {"en": "FINANCIAL AGREEMENT: ", "ar": "الموافقة المالية: "}, + "generalConsent7": { + "en": + "Within the expected time frame during their hospital visit or stay, patients/relatives are required to take personal responsibility and meet any financial obligation towards the Hospital regardless of the mode and source of payment (i.e. self-paying, insurance company, sponsoring company & others). I understand that for credit cases (Insurance covered or corporate patients) approval letter is essential at the time of admission. In case the approval letter is not available, I, the undersigned, agree to be treated as cash patient and advance deposit shall be made. Once approval is obtained the amount paid as advance shall be refunded to me / patient and if there is no approval till discharge the bill shall be settled in full by me/patient.", + "ar": + "يتوجب علي ضمن الاطار الزمني المتوقع أثناء زيارة المستشفى أو الإقامة فيها تحمل المسؤولية الشخصية والوفاء بأي التزام مالي تجاه المستشفى بغض النظر عن طريقة ومصدر الدفع (أي: الدفع الذاتي أو شركة التأمين أو صاحب العمل أو غيره، وأن الموافقة المسبقة ضرورية قبل دخول المستشفى في حالة التغطية المالية من قبل شركة التأمين أو شركة الكفالة في الحالات التي يتم فيها تأخر الموافقة أتعهد أنا الموقع أدناه بالموافقة على العلاج كمريض دفع ذاتي ويجب إيداع مبلغ تحت الحساب يتم استرداده بعد الحصول على موافقة التأمين، ويجب دفع الحساب بالكامل في حالة عدم الحصول على موافقة التأمين حتى موعد الخروج." + }, + "dataSharingConsent": {"en": "DATA SHARING AND INQUIRY: ", "ar": "تبادل المعلومات والاستفسارات: "}, + "generalConsent8": { + "en": + "Hereby, I, the undersigned, agree to provide the Hospital with any information that it requires for the establishing and/or auditing and/or administering my accounts and facilities therewith and I authorize it to obtain and collect any information as it deems necessary or in need for regarding me, my accounts and facilities therewith, from the Saudi Credit Bureau (SIMAH) or to any other agency approved by Saudi Arabian Monetary Agency (SAMA) and to disclose and share (inclusive of Data Pooling) that information to the said company (SIMAH) or to any other agency approved by Saudi Arabian Monetary Agency (SAMA) in accordance with the Membership Agreement and Code of Conduct approved. I agree and acknowledge that the delay in payment or non-payment of Hospital dues is a failure and as a result, SIMAH and/or any other agency approved by will be provided with my name and information to be added to the lists at SIMAH. These lists are accessed by other parties, and I will not be removed from these lists until I pay all of the outstanding amounts.", + "ar": + "بهذا أنا الموقع أدناه أوافق على تزويد المستشفى بأي معلومات أو بيانات يطلبها مني لتأسيس ملفي لدى المستشفى و/أو لمراجعته و/ أو لإدارته وأفوض المستشفى بأن يحصل على ما يلزم أو يحتاج إليه من معلومات تخصني من الشركة السعودية للمعلومات الائتمانية (سمة) واو اي جهة أخرى معتمدة من مؤسسة النقد العربي السعودي (ساما). كما أوافق على أن يفصح المستشفى عن المعلومات الخاصة بي لدى المستشفى للشركة السعودية للمعلومات الائتمانية (سمة) واو اي جهة أخرى معتمدة من مؤسسة النقد العربي السعودي (ساما) من خلال إتفاقية العضوية المبرمة وقواعد العمل المقرة والخاصة بتبادل المعلومات. كما أوافق وأقر بان التأخير في السداد أو عدم السداد لمستحقات المستشفى يعتبر تقصيراً وإخلالاً مني ونتيجة لذلك سيتم تزويد الشركة السعودية للمعلومات الائتمانية (سمه) و/أو أي جهة أخرى توافق عليها مؤسسة النقد العربي السعودي (ساما) بإسمي ومعلوماتي الإضافتها على القوائم لديها هذه القوائم يتم الوصول اليها والإطلاع عليها من قبل جهات أخرى، ولن يتم رفع اسمي من تلك القوائم إلا بعد أداء كافة ما علي من مبالغ مستحقة." + }, + "permissionLeaveConsent": {"en": "PERMISSION TO LEAVE THE HOSPITAL: ", "ar": "قواعد المستشفى: "}, + "generalConsent9": { + "en": + "Fully understand that, at no time, patient can leave the Hospital without prior consent and approval of treating doctor. In case I insist on leaving the Hospital, I must sign an undertaking of my responsibility on leaving the Hospital against the medical advice.", + "ar": "اتفهم انه ليس بإمكاني مغادرة المستشفى في أي وقت شئت دون أخذ إذن طبيبي المعالج. وفي حالة إصراري على مغادرة المستشفى يتعين علي توقيع اقرار مغادرتي ضد النصيحة الطبية وعلى مسؤوليتي." + }, + "observeConsent": {"en": "CONSENT TO OBSERVE: ", "ar": "قواعد المستشفى: "}, + "generalConsent10": { + "en": + "Observers will be allowed according to the Hospital policy as will the taking of pictures of medical or surgical procedures and the use of same for internal staff education or process improvement purposes. Observation and photography or medical or surgical procedures may be done with the approval of the Hospital and in accordance with the Hospital's policy and related laws. I, the undersigned, fully understand that electronically-transmitted information may be used and/or shared by the Hospital with other hospitals for my diagnosis, therapy, follow-up and/or patient education, and may include patient medical records, medical images, interactive audio, video, and/or data communications, output data from medical devices, sound and video files etc. for betterment of patient care.", + "ar": + "وفقاً لسياسة المستشفى، سيتم السماح للمراقبين بمتابعة الإجراءات الطبية والجراحية وسيتم استخدامها لتعليم الموظفين الداخليين أو لأغراض التحسين والتطوير ويمكن إجراء المراقبة والتصوير الفوتوغرافي أو الإجراءات الطبية أو الجراحية بموافقة المستشفى ووفقاً لسياسة المستشفى والانظمة ذات العلاقة. أنا الموقع ادناه أتفهم انه قد يتم الكترونياً إرسال معلومات متعلقة بالتشخيص الطبي لي، العلاج المتابعة وتثقيف المريض، والتي قد تتضمن ملف المريض الطبي النتائج الإشعاعية، التسجيلات الصوتية والمرئية، وذلك بين المستشفى ومستشفيات أخرى بهدف تقديم رعاية صحية أفضل." + }, + "noGuaranteeConsent": {"en": "NO GUARENTEE OF THE RESULTS OF TREATMENT OR EXAMINATION: ", "ar": "لا ضمان لنتائج العلاج أو الفحوصات: "}, + "generalConsent11": { + "en": "I fully understand that no guarantee can be made to me as to the results of treatment or examinations done in the hospital during my hospitalization.", + "ar": "أنا الموقع أدناه أتفهم أنه لا يمكن ضمان نتائج العلاج أو الفحوصات أو الإجراءات التي قد تجرى لي خلال فترة وجودي بالمستشفى." + }, + "disputeConsent": {"en": "GOVERNING LAWS AND DISPUTE RESOLUTION: ", "ar": "النظام الحاكم وحل النزاعات: "}, + "generalConsent12": { + "en": + "This General Consent and Conditions of Admissions is governed by and shall be construed in accordance with the laws of the Kingdom of Saudi Arabia. Any dispute which arises during the execution of it, in which the parties have failed to resolve amicably, will be referred to the concerned judicial authorities in the city of Riyadh, Kingdom of Saudi Arabia.", + "ar": + "تخضع وتفسر هذه الموافقة العامة وشروط القبول للأنظمة المعمول بها في المملكة العربية السعودية. كل خلاف ينشأ عن تنفيذها ولا يتوصل إلى تسويته بين الطرفين وديا يحال إلى الجهة القضائية المختصة بالفصل في النزاع في مدينة الرياض، المملكة العربية السعودية." + }, + "patientsRightsConsent": {"en": "ACKNOWLEDGEMENT OF NOTICE OF PATIENT RIGHTS AND RESPONSIBILITIES: ", "ar": "الإقرار بحقوق ومسؤوليات المرضى: "}, + "generalConsent13": { + "en": + "I, the undersigned, acknowledge that I have been provided with a copy of the Patients' Bill of Right and Responsibilities and the admission staff has explained to me Patients' Bill of Right and Responsibilities.", + "ar": "أنا الموقع أدناه أقر بانه تم تزويدي بـ وثيقة حقوق ومسؤوليات المرضى وقام الموظف المختص بشرح وثيقة حقوق ومسؤوليات المرضى لي." + }, + "acknowledgementConsent": {"en": "ACKNOWLEDGEMENTS: ", "ar": "الإقرارات: "}, + "generalConsent14": { + "en": + "I, the undersigned, acknowledge that I have been provided with a copy of the Patients' Bill of Right and Responsibilities and the admission staff has explained to me Patients' Bill of Right and Responsibilities.", + "ar": + "لقد قرأت وفهمت وأوافق على الشروط والأحكام المبينة أعلاه وأوافق على الإلتزام بالمتطلبات المذكورة تجاه المستشفى ، لقد قرأت التفاصيل المبينة في نموذج التسجيل الخاص بي وأقر بأنها صحيحة. أنا الموقع ادناه أقر بأنه أتيحت لي الفرصة لطرح الأسئلة والتحفظات بشأن هذه الموافقة، وتلقيت إجابات مرضية على جميع إستفساراتي." + }, + "incorrectNationalId": {"en": "Incorrect National ID", "ar": "رقم الهوية غير صحيحة"}, + "labResultFlag": {"en": "Flag", "ar": "Flag"}, + "selectOccupation": {"en": "Select Occupation", "ar": "اختر المهنة"}, + "selectOccupationError": {"en": "Please select your occupation.", "ar": "الرجاء تحديد مهنتك."}, + + "whatIsOnlineCheckIn": {"en": "What is Online Check-In?", "ar": "ما هو تسجيل الوصول عبر الإنترنت؟"}, + "EROnlineCheckInDesc1": {"en": "Online check-in lets patients fill out forms, share insurance details, and book appointments online, making their visit smoother and quicker.", "ar": "يتيح تسجيل الوصول عبر الإنترنت للمرضى ملء النماذج ومشاركة تفاصيل التأمين وحجز المواعيد عبر الإنترنت، مما يجعل زيارتهم أكثر سلاسة وسرعة."}, + "EROnlineCheckInHow": {"en": "How can i use Online Check-In?", "ar": "كيف يمكنني استخدام تسجيل الوصول عبر الإنترنت؟"}, + "EROnlineCheckInTapOn": {"en": "Tap On", "ar": "اضغط على"}, + "EROnlineCheckInHoldPhone": {"en": "Hold your phone", "ar": "أمسك هاتفك"}, + "EROnlineCheckInWaitTurn": {"en": "Wait your turn", "ar": "انتظر دورك"}, + "EROnlineCheckInWaitTurnInstruction": {"en": "Please wait in the waiting area until called by the nurse.", "ar": "يرجى الانتظار في منطقة الانتظار حتى يتم استدعاؤك من قبل الممرضة."}, + "EROnlineCheckInHoldPhoneInstruction": {"en": "Hold the phone 1 to 2 cm from the NFC sign displayed on the board", "ar": "امسك الهاتف على مسافة 1 إلى 2 سم من علامة NFC المعروضة على اللوحة"}, + "EROnlineCheckInTapOnCheckIn": {"en": "Tap on the check-in button within the app", "ar": "اضغط على زر تسجيل الدخول داخل التطبيق"}, + "download": {"en": "Download", "ar": "تحميل"}, + "share": {"en": "Share", "ar": "يشارك"}, + "nearest": {"en": "Nearest", "ar": "الأقرب"}, + "selectRegion": {"en": "Select Region", "ar": "اختر المنطقة"}, + "selectFacitlity": {"en": "Select Facility", "ar": "اختر المنشأة"}, + "selectDoctor": {"en": "Select Doctor", "ar": "اختر الطبيب"}, + "hmgHospital": {"en": "Hospital", "ar": "المستشفيات "}, + "hmcHospital": {"en": "Medical Center", "ar": "المراكز الطبية"}, + "hmcHospitalCountSingle": { + "en": "@ Medical Center", + "ar": "المراكز الطبية @" + }, + "hmgHospitalCountSingle": {"en": "@ Hospital", "ar": "المستشفيات @"}, + "hmcHospitalCountPlural": { + "en": "@ Medical Centers", + "ar": "المراكز الطبية @" + }, + "hmgHospitalCountPlural": {"en": "@ Hospitals", "ar": "المستشفيات @"}, + + "termsHeading": {"en": "ONLINE SERVICES TERMS OF USE", "ar": "شروط استخدام الخدمات الالكترونية"}, + "termsConditions1": {"en": "These Online Services Terms of Use (Service Terms) govern certain online services provided by Dr Sulaiman Al Habib Medical Services Group Company (HMG, we, us, our) to the visitors and users of our websites and mobile app (you, your).", "ar": "تخضع الخدمات الالكترونية المحددة التي تقدمها شركة مجموعة الدكتور سليمان الحبيب للخدمات الطبية (المجموعة، نحن، والضمائر التي تشير إلينا) إلى زوار ومستخدمي مواقع الويب الخاصة بنا وتطبيقاتنا المحمولة (أنت، والضمائر التي تشير إليك) لشروط استخدام الخدمات الالكترونية (شروط الخدمة) هذه."}, + "termsConditions2": {"en": "By accessing our websites and/or mobile app, you agree to our Website Terms of Use and App User Agreement, as applicable (General Terms), which creates an agreement between you and us. When you accept these Service Terms they are incorporated into and become part of that same agreement. ", "ar": "بمجرد دخولك إلى مواقع الويب و/أو تطبيق الجوال الخاص بنا، فإنك توافق على شروط استخدام الموقع الإلكتروني الخاص بنا واتفاقية مستخدم التطبيق، حسب الاقتضاء (الشروط العامة)، والتي اتفاقاً بينك وبيننا. عندما تقبل شروط الخدمة هذه، فإنها تصبح مشمولة في وتشكل جزءا من نفس الاتفاقية."}, + "termsConditions3": {"en": "Please ensure you have read our Privacy Policy. Use of our online services may require you to provide us with personal information to create an account and may also require you to provide us with personal information, including information related to your health and wellbeing, to access specific services. If you purchase items from us and wish to bill charges to your insurance provider, we will need to provide personal information relating to you and your purchase to your insurance provider. By using our online services, you agree and consent to our use of your personal information in accordance with the Privacy Policy.", "ar": "يرجى التأكد من أنك قد قرأت سياسة الخصوصيةالخاصة بنا. قد يتطلب منك استخدام خدماتنا عبر الإنترنت أن تزودنا بالمعلومات الشخصية لإنشاء حساب قد تتطلب منك أيضاً تزويدنا بالمعلومات الشخصية بما في ذلك المعلومات المتعلقة بصحتك ورفاهيتك، للوصول إلى خدمات محددة. إذا قمت بشراء سلع منا وترغب منا في تقاضي قيمة الفاتورة من مزود التأمين الخاص بك، فسوف نحتاج إلى تقديم معلومات شخصية تتعلق بك وبمشترياتك لمزود التأمين الخاص بك. بمجرد استخدامك لخدماتنا الالكترونية، فإنك توافق على استخدامنا لمعلوماتك الشخصية وفقاً لسياسة الخصوصية."}, + "termsConditions4": {"en": "The Service Terms apply when you access services on our Sites, which require you to create a user account or log-in to your existing user account. You are required to indicate your acceptance of these Service Terms when creating your user account. If the Service Terms are updated by us, you will be required to confirm your agreement again, on your next log-in.", "ar": "تنطبق شروط الخدمة عند دخولك إلى الخدمات على مواقعنا التي تتطلب منك إنشاء حساب مستخدم أو تسجيل الدخول إلى حساب المستخدم الحالي. يتعين عليك الإشارة إلى قبولك لشروط الخدمة هذه عند إنشاء حساب المستخدم الخاص بك. إذا تم تحديث شروط الخدمة من قبلنا، فسيُطلب منك تأكيد موافقتك عليها مرة أخرى، عند تسجيل الدخول التالي الخاص بك."}, + "termsConditions5": {"en": "Telehealth and Online Pharmacy - Additional terms apply to our telehealth and online pharmacy services, and you will be required to agree to such terms before using those particular services.", "ar": "الرعاية الصحية عن بعد والصيدلية الإلكترونية – تنطبق شروط إضافية على خدماتنا المتعلقة بالرعاية الصحية عن بُعد والصيدلية الإلكترونية، ويتعين عليك الموافقة على هذه الشروط قبل استخدام هذه الخدمات."}, + "termsHeading2": {"en": "1. GENERAL TERMS", "ar": "1. أحكام عامة"}, + "termsConditions6": {"en": "The General Terms form part of this agreement, and all provisions of the General Terms apply to our online services.", "ar": "تشكل الشروط العامة جزءاً من هذه الاتفاقية وتُطبق جميع أحكام الشروط العامة على خدماتنا الإلكترونية عبر الإنترنت."}, + "termsHeading3": {"en": "2. APPOINTMENT BOOKING CONDITIONS", "ar": "2. شروط حجز الموعد"}, + "termsConditions7": {"en": "2.1 The Sites (all the websites defined in the General Terms, along with the mobile app) must not be used for speculative, false, or fraudulent appointment bookings. You warrant, represent and undertake that all information you provide about yourself and about anyone else is true and accurate when you are providing information to make an appointment.", "ar": "2-1 يتعين عليك ألا تستخدم المواقع (جميع مواقع الويب المحددة في الشروط العامة، إلى جانب تطبيق الجوال) لإجراء حجوزات غير مؤكدة أو خاطئة أو احتيالية. أنت تضمن وتقر وتتعهد بأن جميع المعلومات التي تقدمها عن نفسك وحول أي شخص آخر هي معلومات صحيحة ودقيقة عند تقديمك لمعلومات لحجز موعد."}, + "termsConditions8": {"en": "2.2 Appointment bookings can only be made through the Sites for selected HMG hospitals and clinics, to be determined at our sole discretion. ", "ar": "2-2 لا يمكن إجراء حجوزات المواعيد إلا من خلال مواقع مستشفيات وعيادات المجموعة المحددة، والتي نقوم بتحديدها وفقاً لتقديرنا الخاص."}, + "termsConditions9": {"en": "2.3 Once the appointment booking has been made through the Site, you will be required to confirm your appointment through the Sites, by phone, or in person at least twenty-four (24) hours prior to the appointment.", "ar": "2-3 بمجرد إجراء حجز المواعيد من خلال الموقع، سيُطلب منك تأكيد موعدك من خلال المواقع أو عن طريق الهاتف أو شخصياً قبل ما لا يقل عن أربعة وعشرين (24) ساعة من الموعد."}, + "termsConditions10": {"en": "2.4 For those HMG hospitals and clinics for which appointment bookings through the Sites are not permitted, you shall be required to book an appointment by phone or in person.", "ar": "2-4 بالنسبة لمستشفيات وعيادات المجموعة التي لا يسمح بحجز مواعيد فيها من خلال المواقع، يتعين عليك حجز موعد عبر الهاتف أو شخصياً. "}, + "termsConditions11": {"en": "2.5 You must register in accordance with the terms outlined in clause 7 to be able to make appointment bookings through the Sites.", "ar": "2-5 يتعين عليك التسجيل وفقاً للشروط المبينة في البند 7 لكي تتمكن من إجراء حجوزات المواعيد من خلال المواقع."}, + "termsConditions12": {"en": "2.6 In using the Sites, you will be entitled to:", "ar": "2-6 عند استخدامك للمواقع، فإنه يحق لك:"}, + "termsConditions12a": {"en": "a) book an appointment at an HMG hospital or clinic ", "ar": "(1) حجز موعد في إحدى مستشفيات أو عيادات المجوعة"}, + "termsConditions12b": {"en": "b) book one appointment at given time", "ar": "(2) حجز موعد في وقت معين"}, + "termsConditions12c": {"en": "c) book one appointment at given clinic. ", "ar": "(3) حجز موعد في عيادة معينة."}, + "termsConditions13": {"en": "To ensure there is no misunderstanding, In case that you won’t attend your confirmed appointment, you shall be required to cancel or reschedule appointment by phone or in person or through the Sites.", "ar": " تفادياً للشك، في حال عدم الرغبة في الحضور للموعد المؤكد، يتعين عليك إلغاء أو إعادة جدولة أي موعد مؤكد إما عن طريق الهاتف أو شخصياً أو من خلال المواقع."}, + "termsConditions14": {"en": "2.7 We reserve the right to disable your ability to book appointments through the Sites for a period, the duration of which is at sole discretion in the following circumstances: ", "ar": "2-7 نحن نحتفظ بالحق في تعطيل قدرتك على حجز المواعيد من خلال المواقع لفترة يتم تحديد مدتها وفقًا لتقديرنا الخاص، وذلك في الحالات التالية:"}, + "termsConditions14a": {"en": "a) you fail to attend appointments booked and confirmed through the Sites ", "ar": "(1) في حال أخفقت في حضور مواعيد تم حجزها وتأكيدها من خلال المواقع"}, + "termsConditions14b": {"en": "b) we determine at our sole discretion to do so for whatever reason. ", "ar": "(1) في حال أخفقت في حضور مواعيد تم حجزها وتأكيدها من خلال المواقع"}, + "termsHeading4": {"en": "3. ONLINE ENQUIRY CONDITIONS", "ar": "3. شروط الاستفسار عبر الإنترنت"}, + "termsConditions15": {"en": "3.1 You shall be entitled to communicate your enquiries to doctors through the Sites should you have visited an HMG hospital or clinic within the last 14 days. The enquiry must be submitted to the doctor with whom you had your appointment. For enquiries that are not directed towards doctors, you can submit them through the Sites without any time limitation.", "ar": "3-1 يحق لك إيصال استفساراتك إلى الأطباء من خلال المواقع في حال كان قد سبق لك أن قمت بزيارة أي مستشفى أو عيادة في المجموعة خلال الـ 14 يوما الماضية. يجب تقديم الاستفسار إلى الطبيب الذي كان لديك موعد معه. بالنسبة للاستفسارات التي لا يتم توجيهها إلى الأطباء، يمكنك إرسالها عبر المواقع دون أي قيود زمنية."}, + "termsConditions16": {"en": "3.2 In using the Sites, you shall only be entitled to:", "ar": "3-2 عند استخدامك للمواقع، فإنه لا يحق لك سوى:"}, + "termsConditions16a": {"en": "a) submit the enquiry to the doctor with whom you had your appointment within the last 14 days.", "ar": "(1) إرسال الاستفسار للطبيب الذي كان لديك موعد معه خلال الـ 14 يوما الماضية."}, + "termsConditions16b": {"en": "b) only make one doctor enquiry in any twenty-four (24) hour period.", "ar": "(2) إرسال استفسار واحد فقط للطبيب في أي فترة أربع وعشرين (24) ساعة."}, + "termsConditions17": {"en": "3.3 A response to enquiries made through the Sites is not guaranteed and is subject to doctor availability. Responses to enquiries will be subject to the doctor's sole discretion.", "ar": "3-3 عدم ضمان استجابة الاستفسارات المقدمة من خلال المواقع وهي عرضة لتوافر الطبيب. الردود على الاستفسارات سوف تخضع لتقدير الطبيب وحده ."}, + "termsConditions18": {"en": "3.4 Any response to enquiries made through the Sites which include details concerning, amongst other things, prescriptions, lab results, and radiology reports should not be considered as final and should be verified and stamped by the relevant medical office.", "ar": "3-4 أي رد على الاستفسارات المقدمة من خلال المواقع التي تشمل تفاصيل تتعلق، من بين الأشياء الأخرى، بالوصفات الطبية، نتائج المختبرات وتقارير الأشعة ينبغي عدم اعتبارها نهائية وينبغي التحقق منها وختمها من قبل المكتب الطبي المختص."}, + "termsConditions19": {"en": "3.5 We reserve the right to disable your ability to make enquiries through the Sites for a period, the duration of which is at sole discretion in the following circumstances:", "ar": "3-5 نحن نحتفظ بالحق في تعطيل قدرتك على إرسال الاستفسارات من خلال المواقع لأي فترة يتم تحديد مدتها وفقًا لتقديرنا الخاص في الحالات التالية:"}, + "termsConditions19a": {"en": "a) you fail to attend three (3) appointments booked and confirmed through the Sites. ", "ar": "(1) في حال أخفقت في حضور ثلاثة (3) مواعيد تم حجزها وتأكيدها من خلال المواقع. "}, + "termsConditions19b": {"en": "b) we determine at our sole discretion to do so for whatever reason.", "ar": "(2) في حال ارتأينا القيام بذلك وفقاً لتقديرنا المنفرد لأي سبب كان."}, + "termsHeading5": {"en": "4. PURCHASE CONDITIONS", "ar": "4. شروط الشراء"}, + "termsConditions20": {"en": "4.1 The Sites must not be used for speculative, false, or fraudulent purchases. You warrant, represent and undertake that all information you provide about yourself and about anyone else is true and accurate when you are making payments to the Sites. ", "ar": "4-1 يتعين عدم استخدام المواقع لإجراء مشتريات مضاربة أو خاطئة أو احتيالية. أنت تضمن وتقر وتتعهد بأن جميع المعلومات التي تقدمها عن نفسك وحول أي شخص آخر هي معلومات صحيحة ودقيقة عند سدادك لمدفوعات عبر المواقع."}, + "termsConditions21": {"en": "4.2 Services purchased through the Sites as a result of visits to the Sites made by you will be subject to the policy that applies to the particular services purchased by you (Policy). In the event of any discrepancy between these Terms of Use and the relevant Policy, the terms of the Policy will prevail, but only to the extent of the inconsistency. If there is a Policy for any particular service, it will be made clear to you before you access the service.", "ar": "4-2 الخدمات التي تم شراؤها من خلال المواقع نتيجة لزياراتك إلى المواقع، ستكون خاضعة للسياسة التي تنطبق على الخدمات المعينة التي تم شراؤها من جانبك (السياسة). في حالة وجود أي تباين بين شروط الاستخدام هذه والسياسة ذات الصلة، فإنه يُعتد بشروط السياسة، ولكن فقط في حدود ذلك التعارض . إذا كانت هناك سياسة محددة لأي خدمة معينة، فسيتم توضيحها لك قبل دخولك إلى الخدمة."}, + "termsHeading6": {"en": "5. PRICING AND AVAILABILITY", "ar": "5. التسعير والتوافر"}, + "termsConditions22": {"en": "5.1 Unless otherwise expressly stated, all prices on the Sites are exclusive of all applicable taxes and surcharges. All prices are expressed to be in Saudi riyals, as indicated on the Sites. We may also accept payment in US dollars, if indicated.", "ar": "5-1 ما لم يرد نص على خلاف ذلك صراحةً، فإن جميع الأسعار على المواقع لا تشمل أياً من الضرائب والرسوم الإضافية المعمول بها. جميع الأسعار معبر عنها بالريال السعودي، كما هو موضح في المواقع. قد نقبل أيضاً الدفع بالدولار الأمريكي، إذا تم بيان ذلك."}, + "termsConditions23": {"en": "5.2 Prices and availability stated on the Sites are subject to change at any time until your online purchase has been confirmed and your payment has been processed. While we will endeavour to ensure that the information on the Sites is as accurate and as up to date as possible, we do not provide a warranty to that effect. You acknowledge that we have no responsibility for the accuracy, completeness, currency or timeliness of price and availability information that is made available on the Sites.", "ar": "5-2 الأسعار ومدى التوافر الموضح على المواقع عرضة للتغيير في أي وقت حتى يتم تأكيد الشراء عبر الإنترنت ومعالجة مدفوعاتك بنجاح. رغم أننا سنسعى للتأكد من أن المعلومات الموجودة على المواقع دقيقة ومحدثة قدر الإمكان، إلا أننا لا نقدم أي ضمان بهذا الخصوص. أنت تقر بأننا لا نتحمل أي مسؤولية عن دقة معلومات السعر ومدى التوافر المبين على المواقع أو مدى اكتمالها أو حداثتها أو إتاحتها في الوقت المناسب."}, + "termsConditions24": {"en": "5.3 Special offers may be advertised on the Sites at any time. Special offers are not applicable to any transactions that have already been confirmed.", "ar": "5-3 قد يتم الإعلان عن عروض خاصة على المواقع في أي وقت. لا تنطبق العروض الخاصة على أي معاملات سبق أن تم تأكيدها بالفعل."}, + "termsHeading7": {"en": "6. PAYMENTS", "ar": "6. سداد المدفوعات"}, + "termsConditions25": {"en": "6.1 We may accept the following methods of payment: ", "ar": "6-1 يجوز لنا قبول طرق السداد التالية:"}, + "termsConditions25a": {"en": "a) direct debit bank transfers in accordance with the provisions of clause 6.2 below: ", "ar": "(1) تحويلات بنكية بالخصم المباشر وفقاً لأحكام البند 6-2 أدناه: "}, + "termsConditions25b": {"en": "b) credit card payments in accordance with the provisions of clauses 6.3, 6.4 and 6.5 below: ", "ar": "(2) مدفوعات بطاقات الائتمان وفقاً لبنود 6-3 و 6-4 و 6-5 أدناه: "}, + "termsConditions25c": {"en": "c) direct billing to medical insurance providers in accordance with the provisions of clause 6.6 below. ", "ar": "(3) الفواتير المباشرة لمزودي خدمات التأمين الطبي وفقاً لأحكام البند 6-6 أدناه."}, + "termsConditions26": {"en": "6.2 All payments made by direct debit bank transfer should be made to respective bank account that will be shown along with your purchasing activity.", "ar": "6-2 يجب أن يتم سداد جميع المدفوعات التي تتم عن طريق التحويل المصرفي بالخصم المباشر إلى الحساب المصرفي المعني الذي سيتم بيانه جنباً إلى جنب مع عملية الشراء التي تخصك."}, + "termsConditions27": {"en": "6.3 We accept all major international credit and debit cards (each a Card). Your Card will be debited when you click the 'confirm payment' button. ", "ar": "6-3 نقبل جميع بطاقات الائتمان والخصم الدولية الرئيسية (ويُشار إلى كل منها بلفظ بطاقة). سيتم الخصم من بطاقتك عندما تنقر على زر 'تأكيد الدفع'."}, + "termsConditions28": {"en": "6.3 We accept all major international credit and debit cards (each a Card). Your Card will be debited when you click the 'confirm payment' button. ", "ar": "6-3 نقبل جميع بطاقات الائتمان والخصم الدولية الرئيسية (ويُشار إلى كل منها بلفظ بطاقة). سيتم الخصم من بطاقتك عندما تنقر على زر 'تأكيد الدفع'."}, + "termsConditions29": {"en": "6.4 Please supply us with the correct c card billing and cardholder information (Payment Information). If you do not supply the correct Payment Information, purchases made through the Sites may be delayed. We reserve the right to cancel purchases made through the Sites if payment is declined or if you have supplied incorrect Payment Information.", "ar": "6-4 يرجى تزويدنا بفاتورة البطاقة الصحيحة ومعلومات حامل البطاقة (معلومات الدفع). إذا لم تقدم معلومات الدفع الصحيحة، فقد تتأخر عمليات الشراء التي تتم عبر المواقع. نحتفظ بالحق في إلغاء المشتريات التي تتم عبر المواقع إذا تم رفض الدفع أو إذا قدمت معلومات دفع غير صحيحة."}, + "termsConditions30": {"en": "6.5 We may incur charges when a booking is made through the Sites using a Card. We reserve the right to pass on to you, in full, any changes incurred by us in connection with any purchase made through the Sites by you using a Card. We will let you know of any applicable charges prior to you clicking the 'confirm payment' button.", "ar": "6-5 قد نتحمل رسوماً عند إجراء الحجز عبر المواقع باستخدام البطاقة. نحتفظ بالحق في أن نتقاضى منك، بالكامل، أي تغييرات نُطالب بدفعها فيما يتعلق بأي عملية شراء يتم إجراؤها عبر المواقع بواسطتك باستخدام البطاقة. سنخبرك بأي رسوم مطبقة قبل النقر فوق زر 'تأكيد الدفع'."}, + "termsConditions31": {"en": "6.6 If our Site provides the option for you to submit insurance provider details for the purposes of direct billing then you may do so. We may provide the ability for you to store insurance details on your account profile. You are responsible for ensuring all insurance details provided are valid and up to date. You represent and warrant to us that any insurance details you provide will relate to a valid medical insurance policy which covers treatment in the country from which you are making your purchase. You acknowledge that we will need to provide details to your insurer of your purchase, and you hereby consent to us doing so. Before we confirm an order, we will need to verify that your insurer accepts payment for the order. If the insurer declines payment or you are required to pay part or all of the order price, we will contact you and the order will not progress until you have paid the remainder of the total amount due. Aside from seeking approval of costs in accordance with the information you provide with your order, we cannot act as an intermediary for communications between you and your insurer and we accept no liability whatsoever for any delay, act or omission of your insurer. If you are unhappy with your insurer’s treatment of your claim you must contact your insurer or the appropriate supervisory authority directly. ", "ar": "6-6 إذا كان موقعنا يوفر لك خيار إرسال تفاصيل مزود التأمين لأغراض الفوترة المباشرة، فيمكنك القيام بذلك. قد نوفر لك القدرة على تخزين تفاصيل التأمين في ملف تعريف حسابك. أنت مسؤول عن التأكد من أن جميع تفاصيل التأمين المقدمة صحيحة ومحدثة. أنت تقر وتضمن لنا أن أي تفاصيل تأمين تقدمها سوف تتعلق بوثيقة تأمين طبي سارية المفعول تغطي العلاج في البلد الذي تقوم بالشراء منه. أنت تقر بأننا سنحتاج إلى تقديم تفاصيل إلى شركة التأمين الخاصة بك عن مشترياتك وأنت توافق بموجبه على قيامنا بذلك. قبل تأكيد طلب الشراء، سنحتاج إلى التحقق من أن شركة التأمين توافق على سداد قيمة طلب الشراء. إذا رفضت شركة التأمين سداد ذلك أو طُلب منك سداد جزء من قيمة الطلبية أو جميعها، فسنقوم بالاتصال بك ولن يتم تنفيذ طلب الشراء حتى تقوم بسداد باقي المبلغ الإجمالي المستحق. بصرف النظر عن السعي للحصول على الموافقة على التكاليف وفقاً للمعلومات التي تقدمها مع طلبك، لا يمكننا العمل كوسيط للاتصالات بينك وبين شركة التأمين الخاصة بك ولا نتحمل أي مسؤولية من أي نوع عن أي تأخير أو فعل أو إغفال من جانب شركة التأمين الخاصة بك. إذا لم تكن راضيًا عن كيفية معاملة شركة التأمين الخاصة بك لطلبك، فيجب عليك الاتصال بشركة التأمين أو السلطة الإشرافية المناسبة بشكل مباشر."}, + "termsConditions32": {"en": "6.7 We may outsource payment processing to a third party provider. We will not be liable to you or anyone else for any loss resulting from an act or omission of a third party payment provider.", "ar": "6-7 يجوز لنا تعهيد مسألة معالجة المدفوعات لمزود خارجي. لن نتحمل أي مسؤولية تجاهك أو تجاه أي شخص آخر عن أي خسارة ناتجة عن أي فعل أو إغفال من قبل مزود خارجي لخدمات المدفوعات."}, + "termsHeading8": {"en": "7. ACCOUNT RULES ", "ar": "7. قواعد الحساب"}, + "termsConditions33": {"en": "7.1 In order to access certain services, you will need to: ", "ar": "7-1 من أجل الدخول إلى خدمات معينة، سوف تحتاج إلى:"}, + "termsConditions33a": {"en": "(a) enter your credentials (registered National ID and mobile number). ", "ar": "(1) إدخال بيانات الاعتماد الخاصة بك (رقم الهوية الوطنية المسجل ورقم الجوال )"}, + "termsConditions33b": {"en": "(b) enter the onetime secure-access code that you will receive to your registered mobile number. ", "ar": "(2) إدخال رمز الدخول الآمن لمرة واحدة الذي ستتلقاه على رقم هاتفك الجوال المسجل."}, + "termsConditions34": {"en": "7.2 In order to create an account to obtain full access to the services on the Sites, you must: ", "ar": "7-2 لإنشاء حساب والحصول على حق الوصول الكامل إلى الخدمات على المواقع، يتعين عليك:"}, + "termsConditions34a": {"en": "(a) satisfy the minimum age requirement of 18 years (measured according to the Gregorian calendar); ", "ar": "(1) استيفاء شرط الحد الأدنى للسن وهو 18 سنة (يُقاس بالتقويم الميلادي)؛"}, + "termsConditions34b": {"en": "(b) provide us with complete and accurate registration information in accordance with requested information fields on the Site;", "ar": "(2) تزويدنا بمعلومات تسجيل كاملة ودقيقة وفقاً لحقول المعلومات المطلوبة على الموقع؛"}, + "termsConditions34c": {"en": "(c) ensure your use of the Sites is in accordance with these Online Services Terms of Use and any applicable laws;", "ar": "(3) التأكد من أن استخدامك للمواقع يتوافق مع شروط استخدام الخدمات الالكترونية هذه وأي أنظمة معمول بها؛"}, + "termsConditions34d": {"en": "(d) enter your national ID card number; ", "ar": "(4)إدخال رقم بطاقة الهوية الوطنية الخاصة بك؛ و"}, + "termsConditions34e": {"en": "(e) enter your mobile telephone number to receive a confidential secure-access code via SMS. ", "ar": "(5) إدخال رقم هاتفك الجوال لتلقي رمز دخول آمن سري عبر رسالة نصية قصيرة."}, + "termsConditions35": {"en": "7.3 When you create an account, and any time you attempt to access our on-line services, you warrant, represent and undertake that: ", "ar": "7-3 عندما تنشئ حساباً، وفي أي وقت تحاول فيه الدخول إلى خدماتنا الالكترونية عبر الإنترنت، فإنك تضمن وتقر وتتعهد بما يلي:"}, + "termsConditions35a": {"en": "(a) you meet the minimum age requirement ", "ar": "(1)أنك تستوفي الحد الأدنى من متطلبات العمر"}, + "termsConditions35b": {"en": "(b) you have given complete and accurate registration information, and will keep that information updated; ", "ar": "(2) أنك قدمت معلومات تسجيل كاملة ودقيقة، وأنك ستقوم بتحديث هذه المعلومات "}, + "termsConditions35c": {"en": "(c) you are resident in the Kingdom of Saudi Arabia. ", "ar": "(3) أنك مقيم في المملكة العربية السعودية؛"}, + "termsConditions35d": {"en": "(d) you have authorised us to execute all instructions and transactions on your behalf in relation to your use of the Sites; ", "ar": "(4) أنك قد فوضتنا بتنفيذ جميع التعليمات والمعاملات نيابة عنك فيما يتعلق باستخدامك للمواقع"}, + "termsConditions35e": {"en": "(e) your use of the Sites will not violate these Online Services Terms of Use or breach any applicable laws. ", "ar": "(5) أن استخدامك للمواقع لا ينتهك شروط استخدام الخدمات الالكترونية هذه ولا ينتهك أي أنظمة معمول بها. "}, + "termsConditions36": {"en": "7.4 We reserve the right to reject or revoke, for whatever reason and at our sole discretion, your request to access the Sites or to freeze access to the Sites.", "ar": "7-4 نحتفظ بالحق في رفض أو إلغاء طلبك للدخول إلى المواقع أو تجميد إمكانية الوصول إلى إلى المواقع، لأي سبب من الأسباب ووفقاً لتقديرنا الخاص ."}, + "termsConditions37": {"en": "7.5 In order to use the Sites, you will require access to the Internet. You are responsible for any connection, service and other fees associated with such access and for providing all equipment necessary to enable you to connect to the Internet (including a computer and modem or other access device).", "ar": "7-5 من أجل استخدام المواقع، سوف تحتاج إلى الاتصال بالإنترنت. أنت مسؤول عن أي رسوم اتصال أو رسوم خدمة أو أي رسوم أخرى مرتبطة بهذا الدخول وعن توفير جميع المعدات اللازمة لتمكينك من الاتصال بالإنترنت (بما في ذلك الكمبيوتر والمودم أو أي جهاز اتصال آخر)."}, + "termsConditions38": {"en": "7.6 We may use information from your profile for aggregated analysis purposes (such as your age, gender, nationality etc.) to enable us to gain insights into who is using our online services and how we may improve the reach and quality of the services. We will not use any information which can personally identify you, including any information which links you to any medical procedure or health status, for any such purpose. Please see our Privacy Policy for more information about how we use your information.", "ar": "7-6 قد نستخدم معلومات من ملفك الشخصي لأغراض التحليل المجمع (مثل عمرك وجنسك وجنسيتك وما إلى ذلك) لتمكيننا من اكتساب نظرة عامة بشأن من يستخدم خدماتنا الإلكترونية عبر الإنترنت وكيف يمكننا تحسين الدخول إلى الخدمات وجودتها. لن نستخدم أي معلومات يمكن أن تحدد هويتك، بما في ذلك أي معلومات تربطك بأي إجراء طبي أو حالة صحية لأي غرض من هذا القبيل. يرجى الاطلاع على سياسة الخصوصية الخاصة بنا للحصول على مزيد من المعلومات حول كيفية استخدامنا لمعلوماتك."}, + "termsConditions39": {"en": "7.7 You may create an account on behalf of a child for whom you have legal responsibility. If you create an account on behalf of a child you warrant, represent and undertake that:", "ar": "7-7 يمكنك إنشاء حساب نيابة عن طفل ما تكون مسؤولاً عنه بموجب النظام. إذا أنشأت حساباً نيابةً عن أي طفل، فإنك تضمن وتقر وتتعهد بما يلي:"}, + "termsConditions39a": {"en": "(a) you are a parent or legal guardian of that child and are lawfully authorised to direct the medical care of the child and to provide us will all necessary information in connection with the child (such as identification documents, medical history etc.)", "ar": "(1)أنك أحد الوالدين أو الوصي الشرعي لذلك الطفل ومصرح لك نظاماً بتوجيه الرعاية الطبية للطفل وتزويدنا بجميع المعلومات اللازمة فيما يتعلق بالطفل (مثل وثائق الهوية والتاريخ الطبي وما إلى ذلك)"}, + "termsConditions39b": {"en": "(b) you have authorised us to execute all instructions and transactions on behalf of the child in relation to your use of the Sites;", "ar": "(2) أنك قد فوضتنا بتنفيذ جميع التعليمات والمعاملات نيابة عن الطفل فيما يتعلق باستخدامك للمواقع"}, + "termsConditions39c": {"en": "(c) without prejudice to any patient/doctor confidentiality obligations that may occur if the child independently seeks medical advice, you will supervise and direct all use of the child’s account on the Site and will not permit the child to use the account without supervision;", "ar": "(3) دون الإخلال بأي التزامات سرية بين المريض / الطبيب قد تحدث إذا طلب الطفل مشورة طبية بشكل مستقل، فسوف تشرف وتوجه كافة استخدامات حساب الطفل على الموقع ولن تسمح للطفل باستخدام الحساب دون إشراف؛ و"}, + "termsConditions39d": {"en": "(d) you will remain responsible for all charges incurred in connection with the account.", "ar": "(4) ستظل مسؤولاً عن جميع الرسوم المستحقة فيما يتعلق بالحساب."}, + "termsHeading9": {"en": "8.PASSWORD SECURITY AND NOTIFICATION", "ar": "8. أمن كلمة المرور والإشعار"}, + "termsConditions40": {"en": "8.1 You are solely responsible for all activities that occur in connection with your log-in details in respect of the Sites. You must take steps to protect the confidentiality of your log-in details and you must not allow any other person to use your account.", "ar": "8-1 أنت وحدك المسؤول عن جميع الأنشطة التي تحدث فيما يتعلق بتفاصيل تسجيل الدخول الخاصة بك بخصوص المواقع. يتعين عليك اتخاذ خطوات لحماية سرية بيانات تسجيل الدخول الخاصة بك ويجب ألا تسمح لأي شخص آخر باستخدام حسابك."}, + "termsConditions41": {"en": "8.2 You must notify us immediately if you become aware of any disclosure, loss, theft or unauthorised use of your log-In details.", "ar": "8-2 يتعين عليك إخطارنا على الفور إذا علمت بأي إفشاء أو ضياع أو سرقة أو استخدام غير مصرح به لبيانات تسجيل الدخول الخاصة بك."}, + "termsHeading10": {"en": "9.TERMINATION", "ar": "9. الإنهاء"}, + "termsConditions42": {"en": "9.1 We may discontinue any service at any time or terminate your access to one or more services at any time for any reason, with or without notice to you and without incurring any liability to you, however that liability may arise.", "ar": "9-1 يجوز لنا التوقف عن توفير أي خدمة أو أنهاء حقك في الدخول إلى أي خدمة أو أكثر في أي وقت ولأي سبب سواء بموجب إخطار نرسله لك أو بدونه ودون أنت نتحمل أي مسؤولية تجاهك، بغض النظر عن كيفية نشوء تلك المسؤولية."}, + "termsConditions43": {"en": "9.2 All restrictions and all disclaimers and exclusions and limitations of our liability will survive any termination. Upon termination, you must not directly or indirectly access or use the services.", "ar": "9-2 ستظل جميع القيود وجميع إخلاءات الطرف من المسؤولية والاستثناءات والقيود الخاصة بمسؤوليتنا سارية بعد أي إنهاء. عند الإنهاء، يتعين عليك عدم الدخول إلى الخدمات سواء بشكل مباشر أو غير مباشر."}, + "termsHeading11": {"en": "10. INDEMNITY", "ar": "10. ضمان التعويض"}, + "termsConditions44": {"en": "You indemnify us in full in respect of any liability incurred by us or suffered by us for any loss, cost, damage or expense, as a result of your breach of these Online Services Terms of Use. Where you use our services inappropriately or maliciously, you agree that you will indemnify us against any losses suffered by us or any third parties as a result of or in connection with such use.", "ar": "أنت تلتزم بضمان تعويضنا بشكل الكامل فيما يتعلق بأي مسؤولية تترتب علينا أو نتحملها عن أي خسارة أو تكلفة أو ضرر أو مصاريف، نتيجة لإخلالك بشروط استخدام الخدمات الالكترونية هذه. عندما تستخدم خدماتنا بشكل غير مناسب أو ضار، فإنك توافق على أنك ستعوضنا عن أي خسائر نتكبدها نحن أو أي طرف ثالث نتيجة هذا الاستخدام أو فيما يتعلق به."}, + "termsHeading12": {"en": "11. GENERAL", "ar": "11. أحكام عامة"}, + "termsConditions45": {"en": "As noted above, these Online Services Terms of Use are subject to the General Terms and form part of the same agreement. You should ensure you have read the General Terms. In particular, please note the following sections, as they relate to the online services, Website Terms of Use: 2) No Warranties; 3) Submission of Content; 12) Limitation of Liability; 13) Indemnity; 14) Availability of the Site; 15) Privacy; 18) General. App User Agreement: 1.4) use of location data.", "ar": "11-1 كما هو مذكور أعلاه، تخضع شروط استخدام الخدمات الالكترونية هذه للشروط العامة وتشكل جزءاً من نفس الاتفاقية. يتعين عليك الحرص على قراءة الشروط العامة بتمعن. على وجه الخصوص، يرجى التمعن في الأقسام التالية، من حيث صلتها بالخدمات الالكترونية, شروط استخدام الموقع الإلكتروني: 2) انعدام الضمانات؛ 3) تقديم المحتوى؛ 12) حدود المسؤولية؛ 13) ضمان التعويض؛ 14) توافر الموقع؛ 15) الخصوصية؛ 18) أحكام عامة. اتفاقية مستخدم التطبيق: 1-4) استخدام بيانات تحديد المواقع."}, + "termsConditionsRead": {"en": "I have read these Online Services Terms of Use and all other terms and conditions referred to in them. I understand that by ticking this box and proceeding to use the services I will be bound by these Terms & Conditions and that they govern the services to be provided to me. I consent to the receipt of the online services and the use of my personal information, including sensitive personal information, for the purposes set out above and in accordance with the Privacy Policy.", "ar": "لقد قرأت شروط وأحكام الخدمات الالكترونية عبر الانترنت هذه وجميع البنود والشروط الأخرى المشار إليها فيها. أدرك أنه بمجرد وضع إشارة صح في هذا المربع والاستمرار في استخدام الخدمات، سأكون ملزماً بهذه الشروط والأحكام وأنها تحكم الخدمات التي سيتم تقديمها لي. أوافق على تلقي الخدمات الالكترونية عبر الانترنت واستخدام معلوماتي الشخصية، بما في ذلك المعلومات الشخصية الحساسة، للأغراض الموضحة أعلاه ووفقاً لسياسة الخصوصية."}, + "liveCareTermsHeading": {"en": "TELEHEALTH SERVICES TERMS OF USE", "ar": "شروط خدمات الرعاية الصحية عن بُعد"}, + "liveCareTermsIntroHeading": {"en": "INTRODUCTION", "ar": "مقدمة"}, + "liveCareTermsConditions1": {"en": "Dr. Sulaiman Al Habib Medical Services Group Company (the “Group”) is one of the leaders in the healthcare sector in the Kingdom of Saudi Arabia with an aim to always improve its services in the region, and as a step to take our services to another level and to facilitate the process of receiving healthcare services we have adopted the approach of providing some of our services remotely to patients. These terms apply to our Telehealth Services, which enable consultations to occur between a doctor and a patient over the internet, using audio or and video conferencing technology (often referred to as “Telehealth Services”).", "ar": "تعتبر شركة مجموعة الدكتور سليمان الحبيب للخدمات الطبية ('المجموعة') واحدة من الشركات الرائدة في قطاع الرعاية الصحية في المملكة العربية السعودية والتي تسعى دائمًا لتحسين خدماتها في المنطقة، وكخطوة لنقل خدماتنا إلى مستوى آخر ولتسهيل عملية تلقي خدمات الرعاية الصحية، فقد اعتمدنا نهج تقديم بعض خدماتنا عن بُعد للمرضى. تنطبق هذه الشروط على خدمات الرعاية الصحية عن بُعد التي نقدمها، والتي تتيح إجراء الاستشارات بين الطبيب والمريض عبر الإنترنت، باستخدام تقنية الاتصالات الصوتية أو المرئية (يشار إليها غالباً باسم 'خدمات الرعاية الصحية عن بُعد')."}, + "liveCareTermsConditions2": {"en": "The purpose of the Telehealth Services is to facilitate communication between healthcare practitioners and patients to provide healthcare services through advanced electronic communication means, which allows healthcare professionals to evaluate, diagnose, treat and follow-up with patients remotely without the need for patients to attend in person.).", "ar": "الغرض من خدمات الرعاية الصحية عن بعد هو تسهيل الاتصالات بين الممارسين الصحيين والمرضى لتقديم خدمات الرعاية الصحية من خلال وسائل الاتصال الإلكترونية المتقدمة، والتي تتيح للممارسين الصحيين تقييم وتشخيص وعلاج ومتابعة المرضى عن بُعد دون الحاجة إلى حضور المرضى شخصياً."}, + "liveCareTermsHeading2": {"en": "AGREEMENT", "ar": "الاتفاقية"}, + "liveCareTermsConditions3": {"en": "Telehealth Services is delivered over the Group’s mobile application or and Website. The following terms apply to the Telehealth Services: ", "ar": "يتم تقديم خدمات الرعاية الصحية عن بُعد عبر تطبيق الهاتف المحمول أو الموقع الإلكتروني للمجموعة. تنطبق الشروط التالية على خدمات الرعاية الصحية عن بُعد: "}, + "liveCareTermsConditions3a": {"en": " - Website Terms of Use", "ar": "شروط استخدام الموقع الالكتروني - "}, + "liveCareTermsConditions3b": {"en": " - App User Agreement", "ar": "تفاقية مستخدم التطبيق - "}, + "liveCareTermsConditions3c": {"en": " - Online Services Terms of Use", "ar": "روط استخدام الخدمات الإلكترونية - "}, + "liveCareTermsConditions3d": {"en": " - These Telehealth Services User Terms of Use", "ar": "شروط خدمات الرعاية الصحية عن بُعد هذه - "}, + "liveCareTermsConditions4": {"en": "By agreeing to proceed with the Telehealth Services and accepting these terms, you enter into an agreement with The Group incorporating all the above terms (Telehealth Services Agreement).", "ar": "بالموافقة على الاستمرار في خدمات الرعاية الصحية عن بُعد وقبول هذه الشروط، فإنك تدخل في اتفاقية مع المجموعة تتضمن جميع الشروط المذكورة أعلاه (اتفاقية خدمات الرعاية الصحية عن بُعد)."}, + "liveCareTermsConditions5": {"en": "Our Privacy Policy should also be read. It contains details about how we use your personal information and your rights. By proceeding with the Telehealth Services, you agree to our use of your personal information in accordance with our Privacy Policy and you expressly consent to our use of your personal information for the performance of the Telehealth Services and the discharge of our professional duties as a medical care provider.", "ar": "يتعين عليك أيضاً قراءة سياسة الخصوصية الخاصة بنا حيث تحتوي سياسة الخصوصية على تفاصيل حول كيفية استخدامنا لمعلوماتك الشخصية وحقوقك بشأنها. من خلال متابعة استخدام خدمات الرعاية الصحية عن بُعد، فإنك توافق على استخدامنا لمعلوماتك الشخصية وفقاً لسياسة الخصوصية الخاصة بنا وتوافق صراحةً على استخدامنا لمعلوماتك الشخصية لأداء خدمات الرعاية الصحية عن بُعد وأداء واجباتنا المهنية كمقدم لخدمات الرعاية الطبية."}, + "liveCareTermsConditions6": {"en": "Our Privacy Policy should also be read. It contains details about how we use your personal information and your rights. By proceeding with the Telehealth Services, you agree to our use of your personal information in accordance with our Privacy Policy and you expressly consent to our use of your personal information for the performance of the Telehealth Services and the discharge of our professional duties as a medical care provider.", "ar": "يتعين عليك أيضاً قراءة سياسة الخصوصية الخاصة بنا حيث تحتوي سياسة الخصوصية على تفاصيل حول كيفية استخدامنا لمعلوماتك الشخصية وحقوقك بشأنها. من خلال متابعة استخدام خدمات الرعاية الصحية عن بُعد، فإنك توافق على استخدامنا لمعلوماتك الشخصية وفقاً لسياسة الخصوصية الخاصة بنا وتوافق صراحةً على استخدامنا لمعلوماتك الشخصية لأداء خدمات الرعاية الصحية عن بُعد وأداء واجباتنا المهنية كمقدم لخدمات الرعاية الطبية."}, + "liveCareTermsHeading3": {"en": "1. DEFINITIONS", "ar": "1. التعاريف"}, + "liveCareTermsConditions7": {"en": "Group means Dr. Sulaiman Al Habib Medical Services Group Company and its subsidiaries. ", "ar": "المجموعة تعني شركة مجموعة الدكتور سليمان الحبيب للخدمات الطبية والشركات التابعة لها."}, + "liveCareTermsConditions8": {"en": "Telehealth Services means the Group’s telehealth service, enabling remote consultation, diagnosis and follow-up between the patient and doctor, using the Application and or the Website.", "ar": "خدمات الرعاية الصحية عن بُعد تعني خدمة الرعاية الصحية عن بُعد التي تقدمها المجموعة، والتي تتيح الاستشارة والتشخيص والمتابعة عن بُعد بين المريض والطبيب، باستخدام التطبيق و/أو موقع الويب."}, + "liveCareTermsConditions9": {"en": "Our Services means certain services provided by the Group which covers viewing patients’ medical records and medical test results, providing medical diagnostics in addition to the availability of voice and video Telehealth Service between healthcare practitioners and patients.", "ar": "خدماتنا تعني بعض الخدمات التي تقدمها المجموعة والتي تغطي استعراض السجلات الطبية للمرضى ونتائج الفحوصات الطبية، وتوفير التشخيصات الطبية بالإضافة إلى توفر خدمة الرعاية الصحية عن بعد بالصوت والفيديو بين ممارسي الرعاية الصحية والمرضى."}, + "liveCareTermsConditions10": {"en": "Application means Dr. ALHABIB Application which is a platform where Our Services are provided through and accessible by users. ", "ar": "التطبيق يعني تطبيق (Dr. ALHABIB) وهو عبارة عن منصة يتم من خلالها تقديم خدماتنا ويمكن للمستخدمين الولوج إليها."}, + "liveCareTermsConditions11": {"en": "Website means the Group internet website which is a platform where Our Services are provided through and accessible by users. ", "ar": "موقع الويب يعني موقع الويب الخاص بالمجموعة وهو عبارة عن منصة يتم من خلالها تقديم خدماتنا ويمكن للمستخدمين الدخول إليها."}, + "liveCareTermsConditions12": {"en": "Terms & Conditions means these Telehealth Services Terms of Use. ", "ar": "الشروط والأحكام تعني شروط خدمات الرعاية الصحية عن بُعد هذه."}, + "liveCareTermsConditions13": {"en": "Content means any message, data, information, text, sound, photos, video, graphics, code or any other material contained on the Application and or the Website or transmitted via the Application and or the Website. ", "ar": "المحتوى يعني أي رسالة أو بيانات أو معلومات أو نص أو صوت أو صور أو فيديو أو رسومات أو رمز أو أي مادة أخرى واردة في التطبيق أو موقع الويب أو يتم نقلها عبر التطبيق أو موقع الويب."}, + "liveCareTermsHeading4": {"en": "2. USER UNDERTAKINGS", "ar": "2. تعهدات المستخدم"}, + "liveCareTermsConditions14": {"en": "2.1 By accessing and using Telehealth Services, you agree to these Terms & Conditions, and you should not attempt to access Our Services if you do not agree. ", "ar": "2-1 من خلال دخولك إلى خدمات الرعاية الصحية عن بُعد واستخدامها، فإنك توافق على هذه الشروط والأحكام ويتعين عليك ألا تحاول الدخول إلى خدماتنا إذا كنت لا توافق عليها."}, + "liveCareTermsConditions15": {"en": "2.2 You warrant, represent and undertake that all information you provide about yourself and about anyone else is true and accurate. ", "ar": "2-2 أنت تضمن وتقر وتتعهد بأن جميع المعلومات التي تقدمها عن نفسك وعن أي شخص آخر صحيحة ودقيقة."}, + "liveCareTermsConditions16": {"en": "2.3 Telehealth Services is intended for use by patients physically located in the Kingdom Saudi Arabia (Permitted Territory) and should not be used by patients outside the Permitted Territory. By agreeing to these Terms & Conditions and accessing Telehealth Services via the Application and or the Website, you represent and warrant to us that you are physically located in one of the Permitted Territory. ", "ar": "2-3 خدمات الرعاية الصحية عن بعد مخصصة للاستخدام من قبل المرضى الموجودين فعلياً في المملكة العربية السعودية (المنطقة المسموح بها) ولا ينبغي استخدامها من قبل المرضى خارج المنطقة المسموح بها. بالموافقة على هذه الشروط والأحكام والدخول إلى خدمات الرعاية الصحية عن بُعد عبر التطبيق أو موقع الويب، فإنك تقر وتضمن لنا أنك موجود فعلياً في إحدى المناطق المسموح بها."}, + "liveCareTermsHeading5": {"en": "3. LIMITATIONS OF TELEHEALTH SERVICES AND ASSOCIATED RISKS", "ar": "3. القيود على خدمات الرعاية الصحية عن بعد والمخاطر المرتبطة بها"}, + "liveCareTermsConditions17": {"en": "3.1 Do not use the Application and or the Website or the Telehealth Services to communicate or treat medical emergencies. Neither the Application nor the Website nor Telehealth Services are intended for the provision of care in an emergency. IF THERE IS AN URGENT MEDICAL EMERGENCY OR A RESPONSE IS NEEDED QUICKLY REGARDING YOUR HEALTH, GO TO A NEARBY EMERGENCY CENTER/HOSPITAL OR CALL IMMEDIATELY ANY EMERGENCY PHONE NUMBER. ", "ar": "3-1 لا تستخدم التطبيق أو موقع الويب أو خدمات الرعاية الصحية عن بُعد للتواصل بشأن الحالات الطبية الطارئة أو علاجها. لا التطبيق ولا موقع الويب ولا خدمات الرعاية الصحية عن بُعد توفر الرعاية في الحالات الطبية الطارئة. إذا كانت هناك حالة طبية طارئة عاجلة أو كانت هناك حاجة إلى استجابة سريعة فيما يتعلق بصحتك، فانتقل إلى أقرب مركز/مستشفى طوارئ أو اتصل على الفور بأي رقم هاتف للطوارئ."}, + "liveCareTermsConditions18": {"en": "3.2 Telehealth Services is not appropriate for emergency conditions and there may be some treatments or medicines which cannot be provided without follow-up physical consultation. If you believe you have a serious medical condition, you should seek an in-person consultation with a licensed medical professional.", "ar": "3-2 خدمات الرعاية الصحية عن بعد ليست مناسبة للحالات الطبية الطارئة وقد تكون هناك بعض العلاجات أو الأدوية التي لا يمكن تقديمها دون استشارة متابعة في حضور المريض شخصياً. إذا كنت تعتقد أن لديك حالة طبية خطيرة، فعليك طلب استشارة شخصية مع أخصائي طبي مرخص."}, + "liveCareTermsConditions19": {"en": "3.3 Telehealth Services is intended to provide benefits including patient convenience. As such, it is most suitable as an alternative to in-person consultation for routine medical matters. However, there are potential risks associated with the use of any telehealth service, including Telehealth Services, and these risks may include but not be limited to the following: ", "ar": "3-3 تهدف خدمات الرعاية الصحية عن بُعد إلى توفير مزايا تشمل راحة المريض. لذلك، فهو قد يكون الأنسب كبديل للاستشارة الشخصية للأمور الطبية الروتينية. ومع ذلك، هناك مخاطر محتملة مرتبطة باستخدام أي خدمة للرعاية الصحية عن بُعد، بما في ذلك خدمات الرعاية الصحية عن بُعد، وقد تشمل هذه المخاطر على سبيل المثال لا الحصر ما يلي:"}, + "liveCareTermsConditions19a": {"en": "(a) information transmitted may not be sufficient (e.g. poor resolution of images) to allow for appropriate medical decision making by healthcare practitioners.", "ar": "(1) المعلومات المنقولة قد لا تكون كافية (مثل ضعف دقة الصور) للسماح باتخاذ القرار الطبي المناسب من قبل الممارسين الصحيين"}, + "liveCareTermsConditions19b": {"en": "(b) healthcare practitioners may determine that the transmitted information is of inadequate quality, thus necessitating a face-to-face meeting with the patient, or at least a rescheduled voice and video medical consult. ", "ar": "(2) قد يقرر الممارسين الصحيين أن المعلومات المنقولة ليست ذات جودة كافية، مما يستلزم مقابلة المريض وجهاً لوجه، أو على الأقل إعادة جدولة استشارة طبية صوتية ومرئية في وقت لاحق"}, + "liveCareTermsConditions19c": {"en": "(c) delays in medical care could occur due to deficiencies or failures of the electronic devices. ", "ar": "(3) يمكن أن يحدث تأخير في تقديم الرعاية الطبية بسبب أوجه القصور أو الأعطال في الأجهزة الإلكترونية"}, + "liveCareTermsConditions19d": {"en": "(d) the practitioner is dependent on the patient to provide all relevant information orally and via the appropriate use of the patient’s own camera device. It is possible that information may not be provided to the practitioner or may not be apparent which would have been apparent to the practitioner during an in-person physical examination. ", "ar": "(4) يعتمد الممارس الصحي على المريض لتقديم جميع المعلومات ذات الصلة شفوياً وعبر الاستخدام المناسب لجهاز الكاميرا الخاص بالمريض. من الممكن ألا يتم تقديم المعلومات إلى الممارس أو قد لا تكون واضحة بقدر الوضوح الذي يتوفر للممارس الصحي أثناء إجراء الفحص البدني الشخصي"}, + "liveCareTermsConditions19e": {"en": "(e) security protocols could fail, causing a breach of privacy of personal medical information. Whilst we take reasonable measures to protect the security of the information transmitted over the Application and or the Website, such transmissions can never be guaranteed to be completely secure and information transmitted over public telecommunications networks is outside our control and cannot be secured by us.", "ar": "(5) قد تفشل البروتوكولات الأمنية، مما يتسبب في انتهاك خصوصية المعلومات الطبية الشخصية. على الرغم من أننا نتخذ تدابير معقولة لحماية أمن المعلومات المنقولة عبر التطبيق و/أو الموقع الإلكتروني، إلا أنه لا يمكن أبدًا ضمان أن تكون عمليات الإرسال هذه آمنة تماماً، والمعلومات المنقولة عبر شبكات الاتصالات العامة خارجة عن سيطرتنا ولا يمكننا تأمينها."}, + "liveCareTermsConditions20": {"en": "3.4 If you use Telehealth Services but are experiencing any ongoing condition or concerns, we recommend you schedule an in-person consultation. ", "ar": "3-4 في حال كنت تستخدم خدمات الرعاية الصحية عن بُعد ولكنك تواجه أي حالة أو مخاوف مستمرة، فإننا نوصيك بحجز استشارة شخصية."}, + "liveCareTermsHeading6": {"en": "4. DISCLAIMER OF WARRANTY ", "ar": "4. إخلاء المسؤولية عن الضمان"}, + "liveCareTermsConditions21": {"en": "4.1 We do not warrant, represent or undertake that Telehealth Services will meet your needs, or that it will be uninterrupted, timely, secure, error-free or free from viruses. We shall have no liability to you if a Telehealth Services session cannot occur or is interrupted or abandoned due to any unavailability of our online platform, however, where the Telehealth Services session cannot be delivered fully due to the downtime of our own platform, we will not charge you for a replacement consultation.", "ar": "4-1 نحن لا نضمن ولا نقر أو نتعهد بأن خدمات الرعاية الصحية عن بُعد ستلبي احتياجاتك، أو أنها ستكون مستمرة دون انقطاع أو سيتم توفيرها في الوقت المناسب أو أنها آمنة أو خالية من الأخطاء أو خالية من الفيروسات. لن نتحمل أي مسؤولية تجاهك في حالة تعذر حدوث جلسة خدمات الرعاية الصحية عن بُعد أو تمت مقاطعتها أو التخلي عنها بسبب عدم توفر منصتنا عبر الإنترنت ومع ذلك، في حالة تعذر علينا إجراء جلسة خدمات الرعاية الصحية عن بُعد بالكامل بسبب تعطل منصتنا، فلن نتقاضى منك أي أجور عن جلسة الاستشارة البديلة."}, + "liveCareTermsConditions22": {"en": "4.2 All warranties expressed or implied by law, except those that cannot be lawfully excluded, are excluded. ", "ar": "4-2 تُستثنى جميع الضمانات الصريحة أو الضمنية بموجب النظام، باستثناء تلك التي لا يمكن استثناؤها بشكل قانوني."}, + "liveCareTermsConditions23": {"en": "4.3 Nothing in this section 4 is intended to exclude or limit our liability for any medical negligence claim, to the extent the applicable law in the relevant Permitted Territory does not permit us to do so.", "ar": "4-3 لا يوجد في هذا القسم 4 أي نص يُقصد منه استبعاد أو تقييد مسؤوليتنا عن أي مطالبة تتعلق بالإهمال الطبي، إلى الحد الذي لا يسمح لنا فيه النظام المعمول به في المنطقة المسموح بها ذات الصلة بالقيام بذلك."}, + "liveCareTermsHeading7": {"en": "5. ELIGIBILITY, REGISTRATION AND USE", "ar": "5. الأهلية والتسجيل والاستخدام"}, + "liveCareTermsConditions24": {"en": "5.1 To access Telehealth Services, you must satisfy the minimum age requirement of 18 years (measured according to the Gregorian calendar) and have full legal capacity. ", "ar": "5-1 من أجل الدخول إلى خدمات الرعاية الصحية عن بُعد، يتعين عليك أن تفي بمتطلبات الحد الأدنى للسن وهو 18 عاماً (يتم احتسابها وفقاً للتقويم الميلادي) وأن تتمتع بالأهلية القانونية الكاملة."}, + "liveCareTermsConditions25": {"en": "5.2 Any person under the age of 18 years (measured according to the Gregorian calendar) accessing Telehealth Services must have permission from their parent or guardian to do so.", "ar": "5-2 يجب أن يحصل أي شخص يقل عمره عن 18 عاماً (يتم احتسابها وفقاً للتقويم الميلادي) يقوم بالدخول إلى خدمات الرعاية الصحية عن بُعد على إذن من أحد الوالدين أو الوصي للقيام بذلك."}, + "liveCareTermsConditions26": {"en": "5.3 You warrant, represent and undertake that you possess the legal right and ability to access the Application and or the Website in accordance with these Terms & Conditions and, where relevant, to make bookings and payments through the Application and or the Website.", "ar": "5-3 أنت تضمن وتقر وتتعهد بأن لديك الحق القانوني والقدرة على الدخول إلى التطبيق و/أو موقع الويب وفقاً لهذه الشروط والأحكام و، عند الاقتضاء، إجراء الحجوزات والمدفوعات من خلال التطبيق أو موقع الويب."}, + "liveCareTermsConditions27": {"en": "5.4 The registration process is as provided in the Online Services Terms of Use.", "ar": "5-4 تتم عملية التسجيل وفق ما ورد في شروط استخدام الخدمات الإلكترونية"}, + "liveCareTermsConditions28": {"en": "5.5 Telehealth Services is intended only for your own personal use and the use of your children under your supervision. You must not share your user access details (log-in name, password etc.) with any other person and must take reasonable steps to maintain the security of such details. Our services are delivered on the basis that we have certain information about the user, which may be connected to or obtained from your account details (age, gender, medical history etc.). We accept no responsibility whatsoever to you or any other person if our services are delivered via a user account to a person other than the registered user. This is particularly important for telehealth services, where the practitioner will need to assess the information, the patient provides during the consultation in the context of the patient’s medical file and history.", "ar": "5-5 خدمات الرعاية الصحية عن بُعد مخصصة فقط لاستخدامك الشخصي واستخدام أطفالك تحت إشرافك. يتعين عليك ألا تشارك بيانات تسجيل الدخول الخاصة بك (اسم المستخدم وكلمة المرور وما إلى ذلك) مع أي شخص آخر ويجب أن تتخذ خطوات معقولة للحفاظ على أمان هذه البيانات. يتم تقديم خدماتنا على أساس أن لدينا معلومات معينة حول المستخدم، والتي قد تكون مرتبطة أو تم الحصول عليها من تفاصيل حسابك (العمر والجنس والتاريخ الطبي وما إلى ذلك). نحن لا نتحمل أي مسؤولية من أي نوع تجاهك أو تجاه أي شخص آخر إذا تم تقديم خدماتنا عبر حساب مستخدم إلى شخص آخر غير المستخدم المسجل. هذا مهم بشكل خاص لخدمات الرعاية الصحية عن بعد، حيث سيحتاج الممارس الصحي إلى تقييم المعلومات التي يقدمها المريض أثناء الاستشارة في سياق الملف الطبي للمريض وتاريخه."}, + "liveCareTermsConditions29": {"en": "5.6 You are responsible for ensuring you have a device connected to the internet and capable of transmitting and receiving video and sound. We are not responsible for any failure of a Telehealth Services session caused by your device or your internet connection. You are responsible for all costs associated with your own internet connection and use.", "ar": "5-6 أنت مسؤول عن التأكد من أن لديك جهازاً متصلاً بالإنترنت وقادراً على إرسال واستقبال الفيديو والصوت. نحن لسنا مسؤولين عن أي انقطاع في جلسة خدمات الرعاية الصحية عن بعد بسبب ناجم عن جهازك أو اتصالك بالإنترنت. أنت مسؤول عن جميع التكاليف المرتبطة باتصالك بالإنترنت واستخدامك لها."}, + "liveCareTermsConditions30": {"en": "5.7 From time to time we may release updates to our Application and or the Website. You should ensure that you are running the latest version of the Application. Use of old versions of the Application may lead to technical errors in your use of the Telehealth Services and may expose you to additional security risks.", "ar": "5-7 قد نقوم من وقت لآخر بإصدار تحديثات لتطبيقنا و/أو موقع الويب الخاص بنا. يجب عليك التأكد من أنك تقوم بتشغيل أحدث إصدار من التطبيق. قد يؤدي استخدام الإصدارات القديمة من التطبيق إلى حدوث أخطاء فنية أثناء استخدامك لخدمات الرعاية الصحية عن بُعد وقد يعرضك ذلك لمخاطر أمنية إضافية."}, + + "liveCareTermsHeading8": {"en": "6. TELEHEALTH SERVICES", "ar": "6. خدمات الرعاية الصحية عن بُعد"}, + "liveCareTermsConditions31": {"en": "Our Telehealth Services will be for specific medical specialties or follow-up or medication refill appointments.", "ar": "خدمات الرعاية الصحية عن بُعد الخاصة بنا سوف تكون لتخصصات طبية محددة أو لمواعيد المتابعة أو إعادة صرف الدواء. "}, + "liveCareTermsHeading9": {"en": "7. CHARGES AND PAYMENT", "ar": "7. الأجور والسداد"}, + "liveCareTermsConditions32": {"en": "Our Telehealth Services will be for specific medical specialties or follow-up or medication refill appointments.", "ar": "خدمات الرعاية الصحية عن بُعد الخاصة بنا سوف تكون لتخصصات طبية محددة أو لمواعيد المتابعة أو إعادة صرف الدواء. "}, + "liveCareTermsConditions33": {"en": "7.1 The charges for a Telehealth Services consultation will be indicated before you choose to proceed. By proceeding, you agree to pay the charges. Any subsequent charges, such as prescription charges, lab tests, follow-up consultations etc. are excluded from the initial charge and will be communicated to you following the initial consultation. ", "ar": "7-1 ستتم الإشارة إلى أجور استشارة خدمات الرعاية الصحية عن بُعد قبل أن تختار المتابعة. بمجرد المتابعة، فإنك توافق على سداد الأجور. لا تشمل تلك الأجور الأولية أي أجور لاحقة مثل أجور الوصفات الطبية والاختبارات المعملية واستشارات المتابعة وما إلى ذلك من أجور وسيتم إبلاغك بها بعد الاستشارة الأولية."}, + "liveCareTermsConditions34": {"en": "7.2 The applicable payment terms and methods are set out in our Online Services Terms of Use. ", "ar": "7-2 يتم تحديد شروط وطرق السداد المعمول بها في شروط استخدام الخدمات عبر الإنترنت الخاصة بنا."}, + "liveCareTermsConditions35": {"en": "7.3 It may be possible to charge Telehealth Services directly to a provider of medical insurance, although we give no undertaking or warranty that this shall be possible at any given time. Further details are set out in our Online Services Terms of Use. If such facility is made available and you choose to use it, you will need to provide us with details of your medical insurer and policy coverage, unless you have already done so and linked them to your account. You hereby authorise us to contact any such insurer with the details you provide at the time of purchase, or which are linked to your account to seek approval of the cost of your services. You acknowledge that we may be required to provide specific details of the medical services sought by you to do so and you expressly consent to such disclosure.", "ar": "7-3 قد يكون من الممكن فرض أجور خدمات الرعاية الصحية عن بُعد مباشرة على مزود التأمين الطبي، على الرغم من أننا لا نقدم أي تعهد أو ضمان بأن هذا سيكون ممكناً في أي وقت. تضمنت شروط استخدام الخدمات عبر الإنترنت الخاصة بنا مزيد من التفاصيل حول ذلك. إذا كان هذا التسهيل الخدمي متاحاً واخترت استخدامه، فستحتاج إلى تزويدنا بتفاصيل شركة التأمين الطبي وتغطية وثيقة التأمين، ما لم تكن قد قمت بذلك مسبقاً وربطتها بحسابك. أنت تفوضنا بموجب هذا بالتواصل مع أي شركة تأمين وفق التفاصيل التي تقدمها لنا في وقت الشراء أو المرتبطة بحسابك من أجل الحصول على الموافقة على تكلفة الخدمات المقدمة لك. أنت تقر بأنه قد يُطلب منا تقديم تفاصيل محددة عن الخدمات الطبية التي تطلبها من أجل القيام بذلك وتوافق صراحة على هذا الإفصاح."}, + "liveCareTermsHeading10": {"en": "8. COMMUNICATION AND/OR INQUIRIES", "ar": "8. الاتصالات و/أو الاستفسارات"}, + "liveCareTermsConditions36": {"en": "In case there are any questions and/or inquiries regarding the use of Telehealth Services please contact: EServices.HMG@drsulaimanalhabib.com or call 011 525 9553", "ar": "في حال وجود أي أسئلة و/أو استفسارات بخصوص استخدام خدمات الرعاية الصحية عن بُعد، يرجى التواصل معنا على: EServices.HMG@drsulaimanalhabib.com أو الاتصال على الرقم: 9553 525 011"}, + "liveCareTermsHeading11": {"en": "9. LIMITATION OF LIABILITY ", "ar": "9. حدود المسؤولية"}, + "liveCareTermsConditions37": {"en": "9.1 Subject to any responsibilities implied by law and which cannot be excluded, neither the Group nor any of our directors, employees, agents or contractors, are liable to you for any losses, damages, liabilities, claims and expenses (including without limitation but not limited to legal costs and defense or settlement costs) whatsoever, whether direct, indirect or consequential, arising out of or referable to your use of Telehealth Services , however caused, whether in contract, tort (including negligence), statute or otherwise. ", "ar": "9-1 مع مراعاة أي مسؤوليات ينص عليها النظام والتي لا يمكن استبعادها بموجبه، لا تتحمل المجموعة أو أي من مديرينا أو موظفينا أو وكلائنا أو مقاولينا المسؤولية تجاهك عن أي خسائر وأضرار ومسؤوليات ومطالبات ونفقات (بما في ذلك على سبيل المثال لا الحصر الأتعاب القانونية وتكاليف الدفاع أو التسوية) أيا كانت، سواء كانت مباشرة أو غير مباشرة أو تبعية، ناشئة عن أو متعلقة باستخدامك لخدمات الرعاية الصحية عن بُعد، أياً كان سبب نشوئها، سواء كان ذلك بموجب عقد أو المسؤولية التقصيرية (بما في ذلك الإهمال) أو النظام أو غير ذلك."}, + "liveCareTermsConditions38": {"en": "9.2 We will not be liable to you or anyone else for any loss resulting from a cause over which we do not have control. This includes failure of electronic or mechanical equipment or communications lines (including telephone, cable and Internet), unauthorized access, acts or omissions of third parties, viruses, theft, operator errors, severe or extraordinary weather (including flood, earthquake, or other act of God), fire, war, insurrection, terrorist act, riot, labor dispute or other labor problems, accident, emergency, delay, overbooking, cancellation, Royal demise or action of government", "ar": "9-2 لن نكون مسؤولين تجاهك أو تجاه أي شخص آخر عن أي خسارة ناتجة عن سبب خارج عن سيطرتنا. يتضمن ذلك تعطل المعدات الإلكترونية أو الميكانيكية أو خطوط الاتصالات (بما في ذلك الهاتف والكابل والإنترنت)، أو الدخول غير المصرح به، أو أفعال أو إغفالات الأطراف الثالثة، أو الفيروسات، أو السرقة، أو أخطاء المشغل، أو الطقس القاسي أو غير العادي (بما في ذلك الفيضانات، أو الزلازل، أو أي من أفعال القضاء والقدر الأخرى)، أو الحرائق والحروب والتمرد والأعمال الإرهابية وأعمال شغب والنزاع العمالي أو المشاكل العمالية الأخرى أو الحوادث أو الطوارئ أو التأخير أو الحجز الزائد أو الإلغاء، أو الزوال الملكي أو أي إجراء حكومي."}, + "liveCareTermsHeading12": {"en": "10. TERMINATION OF USE", "ar": "10. إنهاء الاستخدام"}, + "liveCareTermsConditions39": {"en": "10.1 We may discontinue the provision of Telehealth Services at any time and for any reason. We shall have no liability for any discontinuation, including where you are part-way through a series of consultations or courses of treatment using Telehealth Services. We will assist in enabling you to book in-person consultations instead or in transferring relevant information to an alternative medical provider to enable you to continue treatment (subject to data protection, confidentiality and medical practice laws and to prevailing medical good practice).", "ar": "10-1 يجوز لنا التوقف عن توفير خدمات الرعاية الصحية عن بُعد في أي وقت ولأي سبب. لن نتحمل أي مسؤولية عن أي توقف، بما في ذلك عندما تكون خلال الاستشارات أو دورات العلاج باستخدام خدمات الرعاية الصحية عن بُعد. سنساعدك للتمكن من حجز الاستشارات الشخصية بدلاً من ذلك أو في نقل المعلومات ذات الصلة إلى مزود طبي بديل لتمكينك من مواصلة العلاج (مع مراعاة أنظمة حماية البيانات والسرية والممارسات الطبية والممارسات الطبية الجيدة السائدة)."}, + "liveCareTermsConditions40": {"en": "10.2 We may terminate your use and access to Telehealth Services for any or no reason, at any time, with or without notice to you and without incurring any liability to you, however that liability may arise (although we will consider our medical duties to you, if doing so). ", "ar": "10-2 يجوز لنا إنهاء استخدامك ودخولك إلى خدمات الرعاية الصحية عن بُعد لأي سبب أو بدون سبب، في أي وقت، سواء بإشعارك أو بدونه ودون تحمل أي مسؤولية تجاهك، ومع ذلك قد تنشأ هذه المسؤولية (على الرغم من أننا سنأخذ واجباتنا الطبية تجاهك بعين الاعتبار في حالة القيام بذلك)."}, + "liveCareTermsConditions41": {"en": "10.3 All restrictions and all disclaimers and exclusions and limitations of our liability will survive any termination. Upon termination, you must not directly or indirectly access or use the Application and or the Website.", "ar": "10-3 ستظل جميع القيود وجميع إخلاءات الطرف من المسؤولية والاستثناءات والقيود الخاصة بمسؤوليتنا سارية بعد أي إنهاء. عند الإنهاء، يتعين عليك عدم الدخول إلى أو استخدام التطبيق و/أو موقع الويب بشكل مباشر أو غير مباشر."}, + "liveCareTermsHeading13": {"en": "11. GOVERNING LAW AND JURISDICTION ", "ar": "11. القانون الحاكم والاختصاص القضائي"}, + "liveCareTermsConditions42": {"en": "The law applicable to the Application and or the Website User Terms and Conditions and to disputes arising out of or in connection with them are the laws of The Kingdom of Saudi Arabia. You irrevocably submit to the exclusive jurisdiction of the courts of the Kingdom of Saudi Arabia. ", "ar": "النظام المعمول به على التطبيق و/أو شروط وأحكام مستخدم موقع الويب والنزاعات الناشئة عنها أو المتعلقة بها هي أنظمة المملكة العربية السعودية. وأنت تخضع بشكل لا رجوع فيه للاختصاص القضائي الحصري لمحاكم المملكة العربية السعودية."}, + "liveCareTermsHeading14": {"en": "12. ACKNOWLEDGEMENTS", "ar": "12. الإقرارات"}, + "liveCareTermsConditions43": {"en": "12.1 Except as expressly set out in these Terms & Conditions or as permitted by any applicable law, you agree on the following: ", "ar": "12-1 باستثناء ما هو منصوص عليه صراحةً في هذه الشروط والأحكام أو ما يسمح به أي نظام معمول به، فإنك توافق على ما يلي:"}, + "liveCareTermsConditions43a": {"en": "(a) you have read and understand these Terms & Conditions and the other terms forming part of your Agreement with us; ", "ar": "(1) أنك قد قرأت وفهمت هذه الشروط والأحكام والبنود الأخرى التي تشكل جزءاً من اتفاقيتك معنا"}, + "liveCareTermsConditions43b": {"en": "(b) you have read our Privacy Policy and hereby expressly consent to our use of your personal information as described. In addition, you understand that the contact number or email address that you have provided on registration will be used for communications by the Group through SMS, email or any other method in connection with the Telehealth Services, including for appointment notifications and current medical services;", "ar": "(2) أنك قد قرأت سياسة الخصوصية الخاصة بنا وتوافق بموجبه صراحة على استخدامنا لمعلوماتك الشخصية كما هو موضح فيها. بالإضافة إلى ذلك، أنت تدرك أن رقم الاتصال أو عنوان البريد الإلكتروني الذي زودتنا به عند التسجيل سيتم استخدامه للاتصالات من قبل المجموعة من خلال الرسائل القصيرة أو البريد الإلكتروني أو أي طريقة أخرى فيما يتعلق بخدمات الرعاية الصحية عن بُعد، بما في ذلك إشعارات المواعيد والخدمات الطبية الحالية."}, + "liveCareTermsConditions43c": {"en": "(c) you understand that you have the right to withhold or withdraw your consent to the use of the Application and or the Website in the course of your care at any time, without affecting your right to future care or treatment; ", "ar": "(3) أنت تدرك أن لديك الحق في حجب أو سحب موافقتك بشأن استخدام التطبيق و/أو موقع الويب في سياق رعايتك في أي وقت، دون التأثير على حقك في تلقي الرعاية أو العلاج في المستقبل؛"}, + "liveCareTermsConditions43d": {"en": "(d) you understand that you may expect to receive benefits from the use of Application and or the Website concerning your healthcare, but that no results can be guaranteed or assured; ", "ar": "(4) أنت تدرك أنك قد تتوقع الحصول على مزايا من استخدام التطبيق و/أو موقع الويب فيما يتعلق برعايتك الصحية، ولكن لا يمكن ضمان أي نتائج أو تأكيدها؛"}, + "liveCareTermsConditions43e": {"en": "(e) you understand that your healthcare information may be shared with other employees in the Group for scheduling and billing purposes;", "ar": "(5) أنت تدرك أنه قد تتم مشاركة معلومات الرعاية الصحية الخاصة بك مع موظفين آخرين في المجموعة لأغراض جدولة المواعيد والفواتير؛"}, + "liveCareTermsConditions43f": {"en": "(f) you understand that video images and audio recordings of you may be captured and stored electronically. You understand that these recordings may be later used in connection with legal proceedings if necessary but will not otherwise be used for any purpose other than providing Telehealth Services and follow-up medical services to you. You acknowledge and consent to the use of these images and audio recordings by us for the purposes described; ", "ar": "(6) أنت تدرك أن صور الفيديو والتسجيلات الصوتية الخاصة بك قد يتم التقاطها وتخزينها إلكترونياً. وأنت تدرك كذلك أنه يمكن استخدام هذه التسجيلات لاحقاً فيما يتعلق بالإجراءات النظامية إذا لزم الأمر ولكن لن يتم استخدامها لأي غرض بخلاف توفير خدمات الرعاية الصحية عن بُعد وخدمات المتابعة الطبية لك. أنت تقر وتوافق على استخدام هذه الصور والتسجيلات الصوتية من قبلنا للأغراض الموضحة؛"}, + "liveCareTermsConditions43g": {"en": "(g) you understand the risks of communicating by email and text messages, particularly the privacy risks. You understand that the Group cannot guarantee the security and confidentiality of email or text communication. The Group will not be responsible for messages that are not received or delivered due to technical failure, or for disclosure of confidential information unless caused by intentional misconduct.", "ar": "(7) أنك تدرك مخاطر الاتصال عبر البريد الإلكتروني والرسائل النصية، ولا سيما مخاطر الخصوصية. أنت تدرك أن المجموعة لا يمكنها ضمان أمان وسرية البريد الإلكتروني أو الاتصالات النصية. لن تكون المجموعة مسؤولة عن الرسائل التي لم يتم استلامها أو تسليمها بسبب عطل فني أو الكشف عن معلومات سرية ما لم يكن ذلك بسبب سوء سلوك متعمد."}, + "liveCareTermsHeading15": {"en": "13. GENERAL TERMS AND CONDITIONS ", "ar": "13. شروط وأحكام عامة"}, + "liveCareTermsConditions44": {"en": "13.1 We may at any time vary these Terms & Conditions for security, legal or regulatory reasons, or to reflect updates or changes to the services or functionality of Telehealth Services or the Application, by publishing the varied Terms & Conditions on the Application. We will notify you on the Application that these Terms & Conditions have changed before your next use of the Telehealth Services and you will have the opportunity to agree to the revised terms before using the service again. ", "ar": "13-1 يجوز لنا في أي وقت تغيير هذه الشروط والأحكام لأسباب أمنية أو نظامية أو تنظيمية ، أو لتعكس التحديثات أو التغييرات التي تطرأ على خدمات أو وظائف خدمات الرعاية الصحية عن بُعد أو التطبيق، عن طريق نشر الشروط والأحكام المتنوعة على التطبيق. سنخطرك في التطبيق بأن هذه الشروط والأحكام قد تغيرت قبل استخدامك التالي لخدمات الرعاية الصحية عن بُعد وستتاح لك الفرصة للموافقة على الشروط المعدلة قبل استخدام الخدمة مرة أخرى."}, + "liveCareTermsConditions45": {"en": "13.2 We may perform any of our obligations, and exercise any of the rights granted to us under these Terms & Conditions, through a third party. We may assign any or all our rights and obligations under these Terms & Conditions to any third party.", "ar": "13-2 يجوز لنا أداء أي من التزاماتنا، وممارسة أي من الحقوق الممنوحة لنا بموجب هذه الشروط والأحكام، من خلال طرف ثالث. يجوز لنا التنازل عن أي من حقوقنا والتزاماتنا أو جميعها بموجب هذه الشروط والأحكام إلى أي طرف ثالث."}, + "liveCareTermsConditions46": {"en": "13.3 If any clause or part of any clause of these Terms & Conditions is found to be void, unenforceable or invalid, then it will be severed from these Terms & Conditions, leaving the remainder in full force and effect, provided that the severance has not altered the basic nature of these Terms & Conditions. ", "ar": "13-3 إذا تبين أن أي بند أو جزء من أي بند من هذه الشروط والأحكام باطل أو غير قابل للإنفاذ أو غير صالح، فسيتم فصله عن هذه الشروط والأحكام، تاركاً باقي الشروط سارية المفعول بكامل الأثر والنفاذ، بشرط ألا يغير فصل ذلك البند من الطبيعة الأساسية لهذه الشروط والأحكام."}, + "liveCareTermsHeading16": {"en": "14. COMPLAINTS", "ar": "14. الشكاوى"}, + "liveCareTermsConditions47": {"en": "Our Telehealth Services will be for specific medical specialties or follow-up or medication refill appointments.", "ar": "خدمات الرعاية الصحية عن بُعد الخاصة بنا سوف تكون لتخصصات طبية محددة أو لمواعيد المتابعة أو إعادة صرف الدواء. "}, + "liveCareTermsConditions48": {"en": "If you have any complaints or concerns about the Application and or the Website, Our Services, or how we handle your personal information please contact us on: EServices.HMG@drsulaimanalhabib.com or call 011 525 9553", "ar": "إذا كانت لديك أي شكاوى أو مخاوف بشأن التطبيق و/أو موقع الويب أو خدماتنا أو كيفية تعاملنا مع معلوماتك الشخصية، فيرجى التواصل معنا على: EServices.HMG@drsulaimanalhabib.com أو الاتصال على الرقم: 9553 525 011"}, + "clickPrivacyPolicy": {"en": "Please click here to view the privacy policy", "ar": "الرجاء الضغط هنا لعرض سياسة الخصوصية"}, +}; diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart new file mode 100644 index 00000000..07295d75 --- /dev/null +++ b/lib/config/shared_pref_kay.dart @@ -0,0 +1,47 @@ +const TOKEN = 'token'; +const APP_LANGUAGE = 'language'; +const USER_PROFILE = 'user-profile'; +const PUSH_TOKEN = 'push-token'; +const APNS_TOKEN = 'apns-token'; +const ONESIGNAL_APNS_TOKEN = 'onesignal-apns-token'; +const REGISTER_DATA_FOR_REGISTER = 'register-data-for-register'; +const LOGIN_TOKEN_ID = 'register-data-for-register'; +const REGISTER_DATA_FOR_LOGIIN = 'register-data-for-login'; +const LAST_LOGIN = 'last-login'; +const ER_CHECKIN_RISK_SCORE = 'er-checkin-risk-score'; +const ONLY_SMS = 'only-sms'; +const AUTH_DATA = 'auth-data'; +const IMEI_USER_DATA = 'imei-user-data'; +const NHIC_DATA = 'nhic-data'; +const FAMILY_FILE = 'family-file'; +const USER_LAT = 'user-lat'; +const USER_LONG = 'user-long'; +const IS_GO_TO_PARKING = 'IS_GO_TO_PARKING'; +const IS_SEARCH_APPO = 'is-search-appo'; +const IS_LIVECARE_APPOINTMENT = 'is_livecare_appointment'; +const IS_VIBRATION = 'is_vibration'; +const THEME_VALUE = 'is_vibration'; +const MAIN_USER = 'main-user'; +const PHARMACY_LAST_VISITED_PRODUCTS = 'last-visited'; +const PHARMACY_CUSTOMER_ID = 'costumer-id'; +const PHARMACY_CUSTOMER_GUID = 'customer-guid'; +const PHARMACY_CUSTOMER_OBJECT = 'pharmacy-customer-object'; +const IS_ROBOT_VISIBLE = 'robot-visible'; +const IS_ROBOT_INIT = 'robot-init'; +const HMG_GEOFENCES = 'hmg-geo-fences'; +const WEATHER = 'weather'; +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'; +const LIVECARE_CLINIC_DATA = 'LIVECARE_CLINIC_DATA'; +const DOCTOR_SCHEDULE_DATE_SEL = 'DOCTOR_SCHEDULE_DATE_SEL'; +const APPOINTMENT_HISTORY_MEDICAL = 'APPOINTMENT_HISTORY_MEDICAL'; +const CLINICS_LIST = 'CLINICS_LIST'; +const COVID_QA_LIST = 'COVID_QA_LIST'; +const IS_COVID_CONSENT_SHOWN = 'IS_COVID_CONSENT_SHOWN'; +const REGISTER_INFO_DUBAI ='register-info-dubai'; +const IS_LAST_APPOINTMENT_RATE_SHOWN ='is-last-appointment-rate-shown'; +const PATIENT_OCCUPATION_LIST ='patient-occupation-list'; diff --git a/lib/config/size_config.dart b/lib/config/size_config.dart new file mode 100644 index 00000000..8a9a92f2 --- /dev/null +++ b/lib/config/size_config.dart @@ -0,0 +1,59 @@ +import 'package:flutter/cupertino.dart'; + +import 'config.dart'; + +class SizeConfig { + static double _blockWidth = 0; + static double _blockHeight = 0; + + static double? realScreenWidth; + static double? realScreenHeight; + static double? screenWidth; + static double? screenHeight; + static double? textMultiplier; + static double? imageSizeMultiplier; + static double? heightMultiplier; + static double? widthMultiplier; + + static bool isPortrait = true; + static bool isMobilePortrait = false; + static bool isMobile = false; + + void init(BoxConstraints constraints, Orientation orientation) { + realScreenHeight = constraints.maxHeight; + realScreenWidth = constraints.maxWidth; + + if (constraints.maxWidth <= MAX_SMALL_SCREEN) { + isMobile = true; + } + if (orientation == Orientation.portrait) { + isPortrait = true; + if (realScreenWidth! < 450) { + isMobilePortrait = true; + } + screenHeight = realScreenHeight; + screenWidth = realScreenWidth; + } else { + isPortrait = false; + isMobilePortrait = false; + screenHeight = realScreenWidth; + screenWidth = realScreenHeight; + } + _blockWidth = screenWidth! / 100; + _blockHeight = screenHeight! / 100; + + textMultiplier = _blockHeight; + imageSizeMultiplier = _blockWidth; + heightMultiplier = _blockHeight; + widthMultiplier = _blockWidth; + + print('realScreenWidth $realScreenWidth'); + print('realScreenHeight $realScreenHeight'); + print('textMultiplier $textMultiplier'); + print('imageSizeMultiplier $imageSizeMultiplier'); + print('heightMultiplier$heightMultiplier'); + print('widthMultiplier $widthMultiplier'); + print('isPortrait $isPortrait'); + print('isMobilePortrait $isMobilePortrait'); + } +} diff --git a/lib/core/enum/Ambulate.dart b/lib/core/enum/Ambulate.dart new file mode 100644 index 00000000..e4714cb2 --- /dev/null +++ b/lib/core/enum/Ambulate.dart @@ -0,0 +1,61 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/cupertino.dart'; + +enum Ambulate { Wheelchair, Walker, Stretcher, None } + +extension SelectedAmbulate on Ambulate { + String getAmbulateTitle(BuildContext context) { + switch (this) { + case Ambulate.Wheelchair: + return TranslationBase.of(context).wheelchair; + break; + case Ambulate.Walker: + return TranslationBase.of(context).walker; + break; + case Ambulate.Stretcher: + return TranslationBase.of(context).stretcher; + break; + case Ambulate.None: + return TranslationBase.of(context).none; + break; + } + return TranslationBase.of(context).none; + } + + int selectAmbulateNumber() { + switch (this) { + case Ambulate.Wheelchair: + return 0; + break; + case Ambulate.Walker: + return 1; + break; + case Ambulate.Stretcher: + return 2; + break; + case Ambulate.None: + return 3; + break; + } + return 3; + } + + Ambulate getAmbulateById(int id) { + switch (id) { + case 0: + return Ambulate.Wheelchair; + break; + case 1: + return Ambulate.Walker; + break; + case 2: + return Ambulate.Stretcher; + break; + case 3: + return Ambulate.None; + break; + } + + return Ambulate.None; + } +} diff --git a/lib/core/enum/OrderService.dart b/lib/core/enum/OrderService.dart new file mode 100644 index 00000000..833e0919 --- /dev/null +++ b/lib/core/enum/OrderService.dart @@ -0,0 +1,35 @@ +enum OrderService { AMBULANCE,HOME_HEALTH_CARE,Comprehensive_Medical_Checkup } + +extension SelectedOrderService on OrderService { + int getIdOrderService() { + switch (this) { + case OrderService.AMBULANCE: + return 4; + break; + case OrderService.Comprehensive_Medical_Checkup: + return 3; + break; + case OrderService.HOME_HEALTH_CARE: + return 2; + break; + + } + return 4; + } + + OrderService getOrderServiceById(int id) { + switch (id) { + case 4: + return OrderService.AMBULANCE; + break; + case 2: + return OrderService.HOME_HEALTH_CARE; + break; + case 3: + return OrderService.Comprehensive_Medical_Checkup; + break; + } + + return OrderService.AMBULANCE; + } +} diff --git a/lib/core/enum/PayfortEnums.dart b/lib/core/enum/PayfortEnums.dart new file mode 100644 index 00000000..2951eed8 --- /dev/null +++ b/lib/core/enum/PayfortEnums.dart @@ -0,0 +1,44 @@ +enum ServiceTypeEnum { + advancePayment, //3 + ancillaryOrder, //3 + appointmentPayment, //2 + covidPayment, //2 + erOnlineCheckIn, //3 + liveCareAppointment //4 +} + +extension ServiceTypeEnumExt on ServiceTypeEnum { + String value() { + switch (this) { + case ServiceTypeEnum.advancePayment: + return "Advance Payment"; + case ServiceTypeEnum.ancillaryOrder: + return "Ancillary Order"; + case ServiceTypeEnum.appointmentPayment: + return "Appointment Payment"; + case ServiceTypeEnum.covidPayment: + return "Covid Payment"; + case ServiceTypeEnum.erOnlineCheckIn: + return "ER Online Check In"; + case ServiceTypeEnum.liveCareAppointment: + return "LiveCare Appointment"; + } + } + + int getIdFromServiceEnum() { + switch (this) { + case ServiceTypeEnum.advancePayment: + return 3; + case ServiceTypeEnum.ancillaryOrder: + return 3; + case ServiceTypeEnum.appointmentPayment: + return 2; + case ServiceTypeEnum.covidPayment: + return 2; + case ServiceTypeEnum.erOnlineCheckIn: + return 3; + case ServiceTypeEnum.liveCareAppointment: + return 4; + } + } +} diff --git a/lib/core/enum/PaymentOptions.dart b/lib/core/enum/PaymentOptions.dart new file mode 100644 index 00000000..1e2bab4e --- /dev/null +++ b/lib/core/enum/PaymentOptions.dart @@ -0,0 +1,32 @@ +enum PaymentOptions { + VISA, + MASTERCARD, + MADA, + INSTALLMENT, + APPLEPAY +} + +extension PaymentOptions_ on PaymentOptions{ + String value(){ + switch(this){ + case PaymentOptions.VISA: + return "VISA"; + break; + + case PaymentOptions.MASTERCARD: + return "MASTERCARD"; + break; + + case PaymentOptions.MADA: + return "MADA"; + break; + + case PaymentOptions.INSTALLMENT: + return "INSTALLMENT"; + break; + case PaymentOptions.APPLEPAY: + return "APPLEPAY"; + break; + } + } +} diff --git a/lib/core/enum/filter_type.dart b/lib/core/enum/filter_type.dart new file mode 100644 index 00000000..4591e023 --- /dev/null +++ b/lib/core/enum/filter_type.dart @@ -0,0 +1,2 @@ +enum FilterType { Clinic, Hospital } + diff --git a/lib/core/enum/patient_lookup.dart b/lib/core/enum/patient_lookup.dart new file mode 100644 index 00000000..08de54b2 --- /dev/null +++ b/lib/core/enum/patient_lookup.dart @@ -0,0 +1,39 @@ +const PATIENT_TYPE = const [ + {"text": "outPatiant", "text_ar": "المريض الخارجي", "val": "0"}, + {"text": "InPatiant", "text_ar": "المريض المنوم", "val": "1"}, + {"text": "Discharge", "text_ar": "المريض المعافى", "val": "2"}, + {"text": "Referrd", "text_ar": "المريض المحول الي", "val": "3"}, + { + "text": "Referral Discharge", + "text_ar": "المريض المحال المعافى", + "val": "4" + }, + {"text": "Tomorrow Patient", "text_ar": "مريض الغد", "val": "5"}, + {"text": "Referral", "text_ar": "المريض المحول مني", "val": "6"}, +]; + +const LOCATIONS = const [ + { + "text": "In Saudi Arabia", + "text-ar": "داخل المملكة العربية السعودية", + "val": "1" + }, + { + "text": "Out Saudi Arabia", + "text-ar": "خارج المملكة العربية السعودية", + "val": "2" + }, +]; + +enum VitalSignDetails { + BodyMeasurements, + Temperature, + Pulse, + Prescriptions, + BloodPressure, + Respiration, + heart, + PainScale, + Weight, + Height +} diff --git a/lib/core/enum/reportfilter_type.dart b/lib/core/enum/reportfilter_type.dart new file mode 100644 index 00000000..74cd97c6 --- /dev/null +++ b/lib/core/enum/reportfilter_type.dart @@ -0,0 +1 @@ +enum ReportFilterType { Requested, Ready,Completed,Cancelled } \ No newline at end of file diff --git a/lib/core/enum/viewstate.dart b/lib/core/enum/viewstate.dart new file mode 100644 index 00000000..94d79bec --- /dev/null +++ b/lib/core/enum/viewstate.dart @@ -0,0 +1 @@ +enum ViewState { Idle, Busy, Error, BusyLocal, ErrorLocal } diff --git a/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart new file mode 100644 index 00000000..8364a240 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart @@ -0,0 +1,345 @@ +class GetCMCAllOrdersResponseModel { + int? iD; + int? patientId; + int? patientOutSa; + bool? isOutPatient; + int? projectId; + int? nearestProjectId; + dynamic longitude; + dynamic latitude; + dynamic appointmentNo; + dynamic dischargeId; + int? statusId; + int? serviceId; + int? channel; + Orderpayment? orderpayment; + dynamic orderselectedservice; + dynamic wforder; + dynamic orderapprovalobj; + String? created; + dynamic createdBy; + dynamic modified; + dynamic modifiedBy; + bool? isDeleted; + String? statusText; + int? paymentStatus; + dynamic clientRequestid; + dynamic paymentStatusText; + String? projectName; + String? nearestProjectName; + dynamic paymentAmount; + WFOrder? wFOrder; + String? serviceText; + bool? isSentForApproval; + int? exaCartOrderId; + bool? isTimer; + int? timeSeconds; + int? totalPendingSeconds; + int? timeMinute; + int? timeHour; + int? timeTotalSeconds; + int? timeTotalMinute; + int? timeTotalHour; + dynamic approvalStatus; + bool? isActive; + int? clickButton; + List? procedures; + dynamic pickupLocation; + dynamic dropOffLocation; + dynamic clinicName; + dynamic doctorName; + dynamic branch; + dynamic time; + dynamic notes; + + GetCMCAllOrdersResponseModel( + {this.iD, + this.patientId, + this.patientOutSa, + this.isOutPatient, + this.projectId, + this.nearestProjectId, + this.longitude, + this.latitude, + this.appointmentNo, + this.dischargeId, + this.statusId, + this.serviceId, + this.channel, + this.orderpayment, + this.orderselectedservice, + this.wforder, + this.orderapprovalobj, + this.created, + this.createdBy, + this.modified, + this.modifiedBy, + this.isDeleted, + this.statusText, + this.paymentStatus, + this.clientRequestid, + this.paymentStatusText, + this.projectName, + this.nearestProjectName, + this.paymentAmount, + this.wFOrder, + this.serviceText, + this.isSentForApproval, + this.exaCartOrderId, + this.isTimer, + this.timeSeconds, + this.totalPendingSeconds, + this.timeMinute, + this.timeHour, + this.timeTotalSeconds, + this.timeTotalMinute, + this.timeTotalHour, + this.approvalStatus, + this.isActive, + this.clickButton, + this.procedures, + this.pickupLocation, + this.dropOffLocation, + this.clinicName, + this.doctorName, + this.branch, + this.time, + this.notes}); + + GetCMCAllOrdersResponseModel.fromJson(Map json) { + iD = json['ID']; + patientId = json['PatientId']; + patientOutSa = json['PatientOutSa']; + isOutPatient = json['IsOutPatient']; + projectId = json['ProjectId']; + nearestProjectId = json['NearestProjectId']; + longitude = json['Longitude']; + latitude = json['Latitude']; + appointmentNo = json['AppointmentNo']; + dischargeId = json['DischargeId']; + statusId = json['StatusId']; + serviceId = json['ServiceId']; + channel = json['Channel']; + orderpayment = json['orderpayment'] != null + ? new Orderpayment.fromJson(json['orderpayment']) + : null; + orderselectedservice = json['orderselectedservice']; + wforder = json['wforder']; + orderapprovalobj = json['orderapprovalobj']; + created = json['Created']; + createdBy = json['CreatedBy']; + modified = json['Modified']; + modifiedBy = json['ModifiedBy']; + isDeleted = json['IsDeleted']; + statusText = json['StatusText']; + paymentStatus = json['PaymentStatus']; + clientRequestid = json['ClientRequestid']; + paymentStatusText = json['PaymentStatusText']; + projectName = json['ProjectName']; + nearestProjectName = json['NearestProjectName']; + paymentAmount = json['PaymentAmount']; + wFOrder = json['WF_order'] != null + ? new WFOrder.fromJson(json['WF_order']) + : null; + serviceText = json['ServiceText']; + isSentForApproval = json['isSentForApproval']; + exaCartOrderId = json['ExaCart_OrderId']; + isTimer = json['isTimer']; + timeSeconds = json['TimeSeconds']; + totalPendingSeconds = json['TotalPendingSeconds']; + timeMinute = json['TimeMinute']; + timeHour = json['TimeHour']; + timeTotalSeconds = json['TimeTotalSeconds']; + timeTotalMinute = json['TimeTotalMinute']; + timeTotalHour = json['TimeTotalHour']; + approvalStatus = json['ApprovalStatus']; + isActive = json['isActive']; + clickButton = json['ClickButton']; + pickupLocation = json['PickupLocation']; + dropOffLocation = json['DropOffLocation']; + clinicName = json['clinicName']; + doctorName = json['DoctorName']; + branch = json['Branch']; + time = json['Time']; + notes = json['Notes']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['PatientId'] = this.patientId; + data['PatientOutSa'] = this.patientOutSa; + data['IsOutPatient'] = this.isOutPatient; + data['ProjectId'] = this.projectId; + data['NearestProjectId'] = this.nearestProjectId; + data['Longitude'] = this.longitude; + data['Latitude'] = this.latitude; + data['AppointmentNo'] = this.appointmentNo; + data['DischargeId'] = this.dischargeId; + data['StatusId'] = this.statusId; + data['ServiceId'] = this.serviceId; + data['Channel'] = this.channel; + if (this.orderpayment != null) { + data['orderpayment'] = this.orderpayment!.toJson(); + } + data['orderselectedservice'] = this.orderselectedservice; + + data['wforder'] = this.wforder; + data['orderapprovalobj'] = this.orderapprovalobj; + data['Created'] = this.created; + data['CreatedBy'] = this.createdBy; + data['Modified'] = this.modified; + data['ModifiedBy'] = this.modifiedBy; + data['IsDeleted'] = this.isDeleted; + data['StatusText'] = this.statusText; + data['PaymentStatus'] = this.paymentStatus; + data['ClientRequestid'] = this.clientRequestid; + data['PaymentStatusText'] = this.paymentStatusText; + data['ProjectName'] = this.projectName; + data['NearestProjectName'] = this.nearestProjectName; + data['PaymentAmount'] = this.paymentAmount; + if (this.wFOrder != null) { + data['WF_order'] = this.wFOrder!.toJson(); + } + data['ServiceText'] = this.serviceText; + data['isSentForApproval'] = this.isSentForApproval; + data['ExaCart_OrderId'] = this.exaCartOrderId; + data['isTimer'] = this.isTimer; + data['TimeSeconds'] = this.timeSeconds; + data['TotalPendingSeconds'] = this.totalPendingSeconds; + data['TimeMinute'] = this.timeMinute; + data['TimeHour'] = this.timeHour; + data['TimeTotalSeconds'] = this.timeTotalSeconds; + data['TimeTotalMinute'] = this.timeTotalMinute; + data['TimeTotalHour'] = this.timeTotalHour; + data['ApprovalStatus'] = this.approvalStatus; + data['isActive'] = this.isActive; + data['ClickButton'] = this.clickButton; + data['PickupLocation'] = this.pickupLocation; + data['DropOffLocation'] = this.dropOffLocation; + data['clinicName'] = this.clinicName; + data['DoctorName'] = this.doctorName; + data['Branch'] = this.branch; + data['Time'] = this.time; + data['Notes'] = this.notes; + return data; + } +} + +class Orderpayment { + int? iD; + int? orderId; + dynamic clientRequestId; + dynamic totalAmount; + int? paymentStatus; + dynamic order; + String? created; + dynamic createdBy; + dynamic modified; + dynamic modifiedBy; + bool? isDeleted; + + Orderpayment( + {this.iD, + this.orderId, + this.clientRequestId, + this.totalAmount, + this.paymentStatus, + this.order, + this.created, + this.createdBy, + this.modified, + this.modifiedBy, + this.isDeleted}); + + Orderpayment.fromJson(Map json) { + iD = json['ID']; + orderId = json['OrderId']; + clientRequestId = json['ClientRequestId']; + totalAmount = json['TotalAmount']; + paymentStatus = json['PaymentStatus']; + order = json['Order']; + created = json['Created']; + createdBy = json['CreatedBy']; + modified = json['Modified']; + modifiedBy = json['ModifiedBy']; + isDeleted = json['IsDeleted']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['OrderId'] = this.orderId; + data['ClientRequestId'] = this.clientRequestId; + data['TotalAmount'] = this.totalAmount; + data['PaymentStatus'] = this.paymentStatus; + data['Order'] = this.order; + data['Created'] = this.created; + data['CreatedBy'] = this.createdBy; + data['Modified'] = this.modified; + data['ModifiedBy'] = this.modifiedBy; + data['IsDeleted'] = this.isDeleted; + return data; + } +} + +class WFOrder { + dynamic wfButtonsDTO; + int? iD; + int? orderId; + int? previousStep; + int? nextStep; + int? serviceId; + dynamic order; + String? created; + dynamic createdBy; + dynamic modified; + dynamic modifiedBy; + bool? isDeleted; + + WFOrder( + {this.wfButtonsDTO, + this.iD, + this.orderId, + this.previousStep, + this.nextStep, + this.serviceId, + this.order, + this.created, + this.createdBy, + this.modified, + this.modifiedBy, + this.isDeleted}); + + WFOrder.fromJson(Map json) { + wfButtonsDTO = json['wf_ButtonsDTO']; + iD = json['ID']; + orderId = json['OrderId']; + previousStep = json['PreviousStep']; + nextStep = json['NextStep']; + serviceId = json['ServiceId']; + order = json['Order']; + created = json['Created']; + createdBy = json['CreatedBy']; + modified = json['Modified']; + modifiedBy = json['ModifiedBy']; + isDeleted = json['IsDeleted']; + } + + Map toJson() { + final Map data = new Map(); + data['wf_ButtonsDTO'] = this.wfButtonsDTO; + data['ID'] = this.iD; + data['OrderId'] = this.orderId; + data['PreviousStep'] = this.previousStep; + data['NextStep'] = this.nextStep; + data['ServiceId'] = this.serviceId; + data['Order'] = this.order; + data['Created'] = this.created; + data['CreatedBy'] = this.createdBy; + data['Modified'] = this.modified; + data['ModifiedBy'] = this.modifiedBy; + data['IsDeleted'] = this.isDeleted; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart new file mode 100644 index 00000000..98857fff --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart @@ -0,0 +1,68 @@ +class CMCGetItemsRequestModel { + 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? checkupType; + + CMCGetItemsRequestModel( + {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.checkupType}); + + CMCGetItemsRequestModel.fromJson(Map json) { + 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']; + checkupType = json['CheckupType']; + } + + 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['PatientType'] = this.patientType; + data['CheckupType'] = this.checkupType; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_response_model.dart b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_response_model.dart new file mode 100644 index 00000000..2aa8e35f --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_response_model.dart @@ -0,0 +1,18 @@ +class CMCGetItemsResponseModel { + String? itemDescription; + String? itemName; + + CMCGetItemsResponseModel({this.itemDescription, this.itemName}); + + CMCGetItemsResponseModel.fromJson(Map json) { + itemDescription = json['ItemDescription']; + itemName = json['ItemName']; + } + + Map toJson() { + final Map data = new Map(); + data['ItemDescription'] = this.itemDescription; + data['ItemName'] = this.itemName; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart new file mode 100644 index 00000000..5eb8877f --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart @@ -0,0 +1,130 @@ +class CMCInsertPresOrderRequestModel { + 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; + double? latitude; + double? longitude; + int? createdBy; + int? orderServiceID; + int? projectID; + List? patientERCMCInsertServicesList; + + CMCInsertPresOrderRequestModel( + {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.latitude, + this.longitude, + this.createdBy, + this.orderServiceID, + this.projectID, + this.patientERCMCInsertServicesList}); + + CMCInsertPresOrderRequestModel.fromJson(Map json) { + 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']; + latitude = json['Latitude']; + longitude = json['Longitude']; + createdBy = json['CreatedBy']; + orderServiceID = json['OrderServiceID']; + projectID = json['ProjectId']; + if (json['PatientER_CMC_InsertServicesList'] != null) { + patientERCMCInsertServicesList = []; + json['PatientER_CMC_InsertServicesList'].forEach((v) { + patientERCMCInsertServicesList!.add( + new PatientERCMCInsertServicesList.fromJson(v), + ); + }); + } + } + + 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['isOutPatient'] = this.patientOutSA == 0 ? false : true; + data['SessionID'] = this.sessionID; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['DeviceTypeID'] = this.deviceTypeID; + data['TokenID'] = this.tokenID; + data['PatientTypeID'] = this.patientTypeID; + data['PatientType'] = this.patientType; + data['latitude'] = this.latitude; + data['longitude'] = this.longitude; + // data['CreatedBy'] = this.createdBy; + data['OrderServiceID'] = this.orderServiceID; + data['ProjectID'] = this.projectID; + if (this.patientERCMCInsertServicesList != null) { + data['procedures'] = this.patientERCMCInsertServicesList!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class PatientERCMCInsertServicesList { + int? recordID; + String? serviceID; + String? selectedServiceName; + String? selectedServiceNameAR; + dynamic price; + dynamic vAT; + dynamic totalPrice; + + PatientERCMCInsertServicesList({this.recordID, this.serviceID, this.selectedServiceName, this.selectedServiceNameAR, this.price, this.vAT, this.totalPrice}); + + PatientERCMCInsertServicesList.fromJson(Map json) { + recordID = json['RecordID']; + serviceID = json['ServiceID']; + selectedServiceName = json['selectedServiceName']; + selectedServiceNameAR = json['selectedServiceNameAR']; + price = json['Price']; + vAT = json['VAT']; + totalPrice = json['TotalPrice']; + } + + Map toJson() { + final Map data = new Map(); + data['RecordID'] = this.recordID; + data['ServiceID'] = this.serviceID; + data['selectedServiceName'] = this.selectedServiceName; + data['selectedServiceNameAR'] = this.selectedServiceNameAR; + data['Price'] = this.price; + data['VAT'] = this.vAT; + data['TotalPrice'] = this.totalPrice; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_request_model.dart b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_request_model.dart new file mode 100644 index 00000000..2492a7b7 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_request_model.dart @@ -0,0 +1,72 @@ +class GetCMCServicesRequestModel { + int? channel; + int? deviceTypeID; + int? genderID; + String? generalid; + String? identificationNo; + String? iPAdress; + bool? isDentalAllowedBackend; + int? languageID; + int? patientID; + int? patientOutSA; + int? patientType; + int? patientTypeID; + String? sessionID; + String? tokenID; + double? versionID; + + GetCMCServicesRequestModel( + {this.channel, + this.deviceTypeID, + this.genderID, + this.generalid, + this.identificationNo, + this.iPAdress, + this.isDentalAllowedBackend, + this.languageID, + this.patientID, + this.patientOutSA, + this.patientType, + this.patientTypeID, + this.sessionID, + this.tokenID, + this.versionID}); + + GetCMCServicesRequestModel.fromJson(Map json) { + channel = json['Channel']; + deviceTypeID = json['DeviceTypeID']; + genderID = json['GenderID']; + generalid = json['generalid']; + identificationNo = json['IdentificationNo']; + iPAdress = json['IPAdress']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; + languageID = json['LanguageID']; + patientID = json['PatientID']; + patientOutSA = json['PatientOutSA']; + patientType = json['PatientType']; + patientTypeID = json['PatientTypeID']; + sessionID = json['SessionID']; + tokenID = json['TokenID']; + versionID = json['VersionID']; + } + + Map toJson() { + final Map data = new Map(); + data['Channel'] = this.channel; + data['DeviceTypeID'] = this.deviceTypeID; + data['GenderID'] = this.genderID; + data['generalid'] = this.generalid; + data['IdentificationNo'] = this.identificationNo; + data['IPAdress'] = this.iPAdress; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['LanguageID'] = this.languageID; + data['PatientID'] = this.patientID; + data['PatientOutSA'] = this.patientOutSA; + data['PatientType'] = this.patientType; + data['PatientTypeID'] = this.patientTypeID; + data['SessionID'] = this.sessionID; + data['TokenID'] = this.tokenID; + data['VersionID'] = this.versionID; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_response_model.dart b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_response_model.dart new file mode 100644 index 00000000..38741b14 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_response_model.dart @@ -0,0 +1,56 @@ +class GetCMCServicesResponseModel { + int? iD; + String? serviceID; + int? orderServiceID; + String? text; + String? textN; + dynamic price; + dynamic priceVAT; + dynamic priceTotal; + bool? isEnabled; + int? orderId; + int? quantity; + + GetCMCServicesResponseModel( + {this.iD, + this.serviceID, + this.orderServiceID, + this.text, + this.textN, + this.price, + this.priceVAT, + this.priceTotal, + this.isEnabled, + this.orderId, + this.quantity}); + + GetCMCServicesResponseModel.fromJson(Map json) { + iD = json['ID']; + serviceID = json['ServiceID']; + orderServiceID = json['OrderServiceID']; + text = json['Text']; + textN = json['TextN']; + price = json['Price']; + priceVAT = json['PriceVAT']; + priceTotal = json['PriceTotal']; + isEnabled = json['IsEnabled']; + orderId = json['OrderId']; + quantity = json['Quantity']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['ServiceID'] = this.serviceID; + data['OrderServiceID'] = this.orderServiceID; + data['Text'] = this.text; + data['TextN'] = this.textN; + data['Price'] = this.price; + data['PriceVAT'] = this.priceVAT; + data['PriceTotal'] = this.priceTotal; + data['IsEnabled'] = this.isEnabled; + data['OrderId'] = this.orderId; + data['Quantity'] = this.quantity; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/EReferral/check_activation_code_for_e_referral_request_model.dart b/lib/core/model/AlHabibMedicalService/EReferral/check_activation_code_for_e_referral_request_model.dart new file mode 100644 index 00000000..d95ced18 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/EReferral/check_activation_code_for_e_referral_request_model.dart @@ -0,0 +1,57 @@ +class CheckActivationCodeForEReferralResponseModel { + String? logInTokenID; + String? activationCode; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + dynamic sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + + CheckActivationCodeForEReferralResponseModel( + {this.logInTokenID, + this.activationCode, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID}); + + CheckActivationCodeForEReferralResponseModel.fromJson( + Map json) { + logInTokenID = json['LogInTokenID']; + activationCode = json['activationCode']; + 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['LogInTokenID'] = this.logInTokenID; + data['activationCode'] = this.activationCode; + 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/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart b/lib/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart new file mode 100644 index 00000000..b63ba8e8 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart @@ -0,0 +1,150 @@ +class CreateEReferralRequestModel { + bool? isInsuredPatient; + String? cityCode; + String? cityName; + String? requesterName; + String? requesterContactNo; + int? requesterRelationship; + String? otherRelationship; + String? fullName; + int? identificationNo; + String? patientMobileNumber; + int? preferredBranchCode; + String? preferredBranchName; + List? medicalReportAttachment; + dynamic insuranceCardAttachment; + 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; + + CreateEReferralRequestModel( + {this.isInsuredPatient, + this.cityCode, + this.cityName, + this.requesterName, + this.requesterContactNo, + this.requesterRelationship, + this.otherRelationship, + this.fullName, + this.identificationNo, + this.patientMobileNumber, + this.preferredBranchCode, + this.preferredBranchName, + this.medicalReportAttachment, + this.insuranceCardAttachment, + 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}); + + CreateEReferralRequestModel.fromJson(Map json) { + isInsuredPatient = json['IsInsuredPatient']; + cityCode = json['CityCode']; + cityName = json['CityName']; + requesterName = json['RequesterName']; + requesterContactNo = json['RequesterContactNo']; + requesterRelationship = json['RequesterRelationship']; + otherRelationship = json['OtherRelationship']; + fullName = json['FullName']; + identificationNo = json['IdentificationNo']; + patientMobileNumber = json['PatientMobileNumber']; + preferredBranchCode = json['PreferredBranchCode']; + preferredBranchName = json['PreferredBranchName']; + if (json['MedicalReportAttachment'] != null) { + medicalReportAttachment = []; + json['MedicalReportAttachment'].forEach((v) { + medicalReportAttachment!.add(EReferralAttachment.fromJson(v)); + }); + } + insuranceCardAttachment = json['InsuranceCardAttachment'] != null ? EReferralAttachment.fromJson(json['InsuranceCardAttachment']) : null; + 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']; + } + + Map toJson() { + final Map data = new Map(); + data['IsInsuredPatient'] = this.isInsuredPatient; + data['CityCode'] = this.cityCode; + data['CityName'] = this.cityName; + data['RequesterName'] = this.requesterName; + data['RequesterContactNo'] = this.requesterContactNo; + data['RequesterRelationship'] = this.requesterRelationship; + data['OtherRelationship'] = this.otherRelationship; + data['FullName'] = this.fullName; + data['IdentificationNo'] = this.identificationNo; + data['PatientMobileNumber'] = this.patientMobileNumber; + data['PreferredBranchCode'] = this.preferredBranchCode; + data['PreferredBranchName'] = this.preferredBranchName; + if (this.medicalReportAttachment != null) { + data['MedicalReportAttachment'] = this.medicalReportAttachment!.map((v) => v.toJson()).toList(); + } + if (this.insuranceCardAttachment == null) { + data['InsuranceCardAttachment'] = {}; + } else + data['InsuranceCardAttachment'] = this.insuranceCardAttachment.toJson(); + + 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['PatientType'] = this.patientType; + return data; + } +} + +class EReferralAttachment { + String? fileName; + String? base64String; + + EReferralAttachment({this.fileName, this.base64String}); + + EReferralAttachment.fromJson(Map json) { + fileName = json['FileName']; + base64String = json['Base64String']; + } + + Map toJson() { + final Map data = new Map(); + data['FileName'] = this.fileName; + data['Base64String'] = this.base64String; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/EReferral/get_all_cities_request_model.dart b/lib/core/model/AlHabibMedicalService/EReferral/get_all_cities_request_model.dart new file mode 100644 index 00000000..f2302b2a --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/EReferral/get_all_cities_request_model.dart @@ -0,0 +1,48 @@ +class GetAllCitiesRequestModel { + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + dynamic sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + + GetAllCitiesRequestModel( + {this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID}); + + GetAllCitiesRequestModel.fromJson(Map json) { + 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['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/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart b/lib/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart new file mode 100644 index 00000000..efc3d58c --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart @@ -0,0 +1,21 @@ +class GetAllCitiesResponseModel { + int? iD; + String? description; + String? descriptionN; + + GetAllCitiesResponseModel({this.iD, this.description, this.descriptionN}); + + GetAllCitiesResponseModel.fromJson(Map json) { + iD = json['ID']; + description = json['Description']; + descriptionN = json['DescriptionN']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart b/lib/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart new file mode 100644 index 00000000..c3d3b2cb --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart @@ -0,0 +1,76 @@ +class GetAllProjectsResponseModel { + String? desciption; + dynamic desciptionN; + int? iD; + String? legalName; + String? legalNameN; + String? name; + dynamic nameN; + String? phoneNumber; + String? setupID; + int? distanceInKilometers; + bool? isActive; + String? latitude; + String? longitude; + int? mainProjectID; + dynamic projectOutSA; + bool? usingInDoctorApp; + + GetAllProjectsResponseModel( + {this.desciption, + this.desciptionN, + this.iD, + this.legalName, + this.legalNameN, + this.name, + this.nameN, + this.phoneNumber, + this.setupID, + this.distanceInKilometers, + this.isActive, + this.latitude, + this.longitude, + this.mainProjectID, + this.projectOutSA, + this.usingInDoctorApp}); + + GetAllProjectsResponseModel.fromJson(Map json) { + desciption = json['Desciption']; + desciptionN = json['DesciptionN']; + iD = json['ID']; + legalName = json['LegalName']; + legalNameN = json['LegalNameN']; + name = json['Name']; + nameN = json['NameN']; + phoneNumber = json['PhoneNumber']; + setupID = json['SetupID']; + distanceInKilometers = json['DistanceInKilometers']; + isActive = json['IsActive']; + latitude = json['Latitude']; + longitude = json['Longitude']; + mainProjectID = json['MainProjectID']; + projectOutSA = json['ProjectOutSA']; + usingInDoctorApp = json['UsingInDoctorApp']; + } + + Map toJson() { + final Map data = new Map(); + data['Desciption'] = this.desciption; + data['DesciptionN'] = this.desciptionN; + data['ID'] = this.iD; + data['LegalName'] = this.legalName; + data['LegalNameN'] = this.legalNameN; + data['Name'] = this.name; + data['NameN'] = this.nameN; + data['PhoneNumber'] = this.phoneNumber; + data['SetupID'] = this.setupID; + data['DistanceInKilometers'] = this.distanceInKilometers; + data['IsActive'] = this.isActive; + data['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + data['MainProjectID'] = this.mainProjectID; + data['ProjectOutSA'] = this.projectOutSA; + data['UsingInDoctorApp'] = this.usingInDoctorApp; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/EReferral/get_all_relationship_types_request_model.dart b/lib/core/model/AlHabibMedicalService/EReferral/get_all_relationship_types_request_model.dart new file mode 100644 index 00000000..a85b74ac --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/EReferral/get_all_relationship_types_request_model.dart @@ -0,0 +1,48 @@ +class GetAllRelationshipTypeRequestModel { + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + dynamic sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + + GetAllRelationshipTypeRequestModel( + {this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID}); + + GetAllRelationshipTypeRequestModel.fromJson(Map json) { + 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['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/AlHabibMedicalService/EReferral/get_all_relationship_types_response_model.dart b/lib/core/model/AlHabibMedicalService/EReferral/get_all_relationship_types_response_model.dart new file mode 100644 index 00000000..237017d3 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/EReferral/get_all_relationship_types_response_model.dart @@ -0,0 +1,25 @@ +class GetAllRelationshipTypeResponseModel { + int? iD; + String? text; + String? textAr; + String? textEn; + + GetAllRelationshipTypeResponseModel( + {this.iD, this.text, this.textAr, this.textEn}); + + GetAllRelationshipTypeResponseModel.fromJson(Map json) { + iD = json['ID']; + text = json['Text']; + textAr = json['Text_Ar']; + textEn = json['Text_En']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['Text'] = this.text; + data['Text_Ar'] = this.textAr; + data['Text_En'] = this.textEn; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/EReferral/get_ereferral_response_model.dart b/lib/core/model/AlHabibMedicalService/EReferral/get_ereferral_response_model.dart new file mode 100644 index 00000000..e80e7d90 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/EReferral/get_ereferral_response_model.dart @@ -0,0 +1,125 @@ +class GetEReferralResponseModel { + dynamic acceptedBrachCode; + dynamic acceptedBranchName; + dynamic acceptedBranchNameAr; + Channel? channel; + dynamic identityCardAttachment; + String? identityNumber; + dynamic insuranceCardAttachment; + bool? isInsuredPatient; + String? otherRelationship; + String? patientContactNo; + int? patientId; + String? patientName; + int? preferredBranchCode; + String? preferredBranchName; + String? referralDate; + int? referralNumber; + Channel? relationshipType; + String? requesterContactNo; + String? requesterName; + String? status; + String? statusAr; + + GetEReferralResponseModel( + {this.acceptedBrachCode, + this.acceptedBranchName, + this.acceptedBranchNameAr, + this.channel, + this.identityCardAttachment, + this.identityNumber, + this.insuranceCardAttachment, + this.isInsuredPatient, + this.otherRelationship, + this.patientContactNo, + this.patientId, + this.patientName, + this.preferredBranchCode, + this.preferredBranchName, + this.referralDate, + this.referralNumber, + this.relationshipType, + this.requesterContactNo, + this.requesterName, + this.status, + this.statusAr}); + + GetEReferralResponseModel.fromJson(Map json) { + acceptedBrachCode = json['AcceptedBrachCode']; + acceptedBranchName = json['AcceptedBranchName']; + acceptedBranchNameAr = json['AcceptedBranchNameAr']; + channel = json['Channel'] != null ? new Channel.fromJson(json['Channel']) : null; + identityCardAttachment = json['IdentityCardAttachment']; + identityNumber = json['IdentityNumber']; + insuranceCardAttachment = json['InsuranceCardAttachment']; + isInsuredPatient = json['IsInsuredPatient']; + otherRelationship = json['OtherRelationship']; + patientContactNo = json['PatientContactNo']; + patientId = json['PatientId']; + patientName = json['PatientName']; + preferredBranchCode = json['PreferredBranchCode']; + preferredBranchName = json['PreferredBranchName']; + referralDate = json['ReferralDate']; + referralNumber = json['ReferralNumber']; + relationshipType = json['RelationshipType'] != null ? new Channel.fromJson(json['RelationshipType']) : null; + requesterContactNo = json['RequesterContactNo']; + requesterName = json['RequesterName']; + status = json['Status']; + statusAr = json['StatusAr']; + } + + Map toJson() { + final Map data = new Map(); + data['AcceptedBrachCode'] = this.acceptedBrachCode; + data['AcceptedBranchName'] = this.acceptedBranchName; + data['AcceptedBranchNameAr'] = this.acceptedBranchNameAr; + if (this.channel != null) { + data['Channel'] = this.channel!.toJson(); + } + data['IdentityCardAttachment'] = this.identityCardAttachment; + data['IdentityNumber'] = this.identityNumber; + data['InsuranceCardAttachment'] = this.insuranceCardAttachment; + data['IsInsuredPatient'] = this.isInsuredPatient; + data['OtherRelationship'] = this.otherRelationship; + data['PatientContactNo'] = this.patientContactNo; + data['PatientId'] = this.patientId; + data['PatientName'] = this.patientName; + data['PreferredBranchCode'] = this.preferredBranchCode; + data['PreferredBranchName'] = this.preferredBranchName; + data['ReferralDate'] = this.referralDate; + data['ReferralNumber'] = this.referralNumber; + if (this.relationshipType != null) { + data['RelationshipType'] = this.relationshipType!.toJson(); + } + data['RequesterContactNo'] = this.requesterContactNo; + data['RequesterName'] = this.requesterName; + data['Status'] = this.status; + data['StatusAr'] = this.statusAr; + return data; + } +} + +class Channel { + int? iD; + String? text; + String? textAr; + String? textEn; + + Channel({this.iD, this.text, this.textAr, this.textEn}); + + Channel.fromJson(Map json) { + iD = json['ID']; + text = json['Text']; + textAr = json['Text_Ar']; + textEn = json['Text_En']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['Text'] = this.text; + data['Text_Ar'] = this.textAr; + data['Text_En'] = this.textEn; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/EReferral/search_criteria_model.dart b/lib/core/model/AlHabibMedicalService/EReferral/search_criteria_model.dart new file mode 100644 index 00000000..db73b395 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/EReferral/search_criteria_model.dart @@ -0,0 +1,21 @@ +class SearchCriteriaModel { + String? name; + String? nameAr; + int? value; + + SearchCriteriaModel({this.name, this.nameAr, this.value}); + + SearchCriteriaModel.fromJson(Map json) { + name = json['name']; + nameAr = json['name_ar']; + value = json['value']; + } + + Map toJson() { + final Map data = new Map(); + data['name'] = this.name; + data['name_ar'] = this.nameAr; + data['value'] = this.value; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/EReferral/search_e_referral_request_model.dart b/lib/core/model/AlHabibMedicalService/EReferral/search_e_referral_request_model.dart new file mode 100644 index 00000000..deb3a92d --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/EReferral/search_e_referral_request_model.dart @@ -0,0 +1,60 @@ +class SearchEReferralRequestModel { + String? patientMobileNumber; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + dynamic sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? referralNumber; + String? identificationNo; + + SearchEReferralRequestModel( + {this.patientMobileNumber, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.referralNumber, + this.identificationNo}); + + SearchEReferralRequestModel.fromJson(Map json) { + patientMobileNumber = json['PatientMobileNumber']; + 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']; + referralNumber = json['ReferralNumber']; + identificationNo = json['IdentificationNo']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientMobileNumber'] = this.patientMobileNumber; + 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['ReferralNumber'] = this.referralNumber; + data['IdentificationNo'] = this.identificationNo; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/EReferral/search_e_referral_response_model.dart b/lib/core/model/AlHabibMedicalService/EReferral/search_e_referral_response_model.dart new file mode 100644 index 00000000..6a1b4e8d --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/EReferral/search_e_referral_response_model.dart @@ -0,0 +1,128 @@ +class SearchEReferralResponseModel { + dynamic acceptedBrachCode; + dynamic acceptedBranchName; + dynamic acceptedBranchNameAr; + dynamic channel; + dynamic identityCardAttachment; + String? identityNumber; + dynamic insuranceCardAttachment; + bool? isInsuredPatient; + List? medicalReportAttachment; + String? otherRelationship; + String? patientContactNo; + int? patientId; + String? patientName; + int? preferredBranchCode; + String? preferredBranchName; + String? referralDate; + int? referralNumber; + RelationshipType? relationshipType; + String? requesterContactNo; + String? requesterName; + String? status; + String? statusAr; + + SearchEReferralResponseModel( + {this.acceptedBrachCode, + this.acceptedBranchName, + this.acceptedBranchNameAr, + this.channel, + this.identityCardAttachment, + this.identityNumber, + this.insuranceCardAttachment, + this.isInsuredPatient, + this.medicalReportAttachment, + this.otherRelationship, + this.patientContactNo, + this.patientId, + this.patientName, + this.preferredBranchCode, + this.preferredBranchName, + this.referralDate, + this.referralNumber, + this.relationshipType, + this.requesterContactNo, + this.requesterName, + this.status, + this.statusAr}); + + SearchEReferralResponseModel.fromJson(Map json) { + acceptedBrachCode = json['AcceptedBrachCode']; + acceptedBranchName = json['AcceptedBranchName']; + acceptedBranchNameAr = json['AcceptedBranchNameAr']; + channel = json['Channel']; + identityCardAttachment = json['IdentityCardAttachment']; + identityNumber = json['IdentityNumber']; + insuranceCardAttachment = json['InsuranceCardAttachment']; + isInsuredPatient = json['IsInsuredPatient']; + otherRelationship = json['OtherRelationship']; + patientContactNo = json['PatientContactNo']; + patientId = json['PatientId']; + patientName = json['PatientName']; + preferredBranchCode = json['PreferredBranchCode']; + preferredBranchName = json['PreferredBranchName']; + referralDate = json['ReferralDate']; + referralNumber = json['ReferralNumber']; + relationshipType = json['RelationshipType'] != null ? new RelationshipType.fromJson(json['RelationshipType']) : null; + requesterContactNo = json['RequesterContactNo']; + requesterName = json['RequesterName']; + status = json['Status']; + statusAr = json['StatusAr']; + } + + Map toJson() { + final Map data = new Map(); + data['AcceptedBrachCode'] = this.acceptedBrachCode; + data['AcceptedBranchName'] = this.acceptedBranchName; + data['AcceptedBranchNameAr'] = this.acceptedBranchNameAr; + data['Channel'] = this.channel; + data['IdentityCardAttachment'] = this.identityCardAttachment; + data['IdentityNumber'] = this.identityNumber; + data['InsuranceCardAttachment'] = this.insuranceCardAttachment; + data['IsInsuredPatient'] = this.isInsuredPatient; + if (this.medicalReportAttachment != null) { + data['MedicalReportAttachment'] = this.medicalReportAttachment!.map((v) => v.toJson()).toList(); + } + data['OtherRelationship'] = this.otherRelationship; + data['PatientContactNo'] = this.patientContactNo; + data['PatientId'] = this.patientId; + data['PatientName'] = this.patientName; + data['PreferredBranchCode'] = this.preferredBranchCode; + data['PreferredBranchName'] = this.preferredBranchName; + data['ReferralDate'] = this.referralDate; + data['ReferralNumber'] = this.referralNumber; + if (this.relationshipType != dynamic) { + data['RelationshipType'] = this.relationshipType!.toJson(); + } + data['RequesterContactNo'] = this.requesterContactNo; + data['RequesterName'] = this.requesterName; + data['Status'] = this.status; + data['StatusAr'] = this.statusAr; + return data; + } +} + +class RelationshipType { + int? iD; + String? text; + String? textAr; + String? textEn; + + RelationshipType({this.iD, this.text, this.textAr, this.textEn}); + + RelationshipType.fromJson(Map json) { + iD = json['ID']; + text = json['Text']; + textAr = json['Text_Ar']; + textEn = json['Text_En']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['Text'] = this.text; + data['Text_Ar'] = this.textAr; + data['Text_En'] = this.textEn; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/EReferral/send_activation_code_for_e_referral_request_model.dart b/lib/core/model/AlHabibMedicalService/EReferral/send_activation_code_for_e_referral_request_model.dart new file mode 100644 index 00000000..43e4c2eb --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/EReferral/send_activation_code_for_e_referral_request_model.dart @@ -0,0 +1,56 @@ +class SendActivationCodeForEReferralRequestModel { + int? patientMobileNumber; + String? zipCode; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + dynamic sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + + SendActivationCodeForEReferralRequestModel( + {this.patientMobileNumber, + this.zipCode, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID}); + + SendActivationCodeForEReferralRequestModel.fromJson(Map json) { + patientMobileNumber = json['PatientMobileNumber']; + zipCode = json['ZipCode']; + 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['PatientMobileNumber'] = this.patientMobileNumber; + data['ZipCode'] = this.zipCode; + 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/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart b/lib/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart new file mode 100644 index 00000000..f2dc41d1 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart @@ -0,0 +1,76 @@ +class InsertUserActivityRequestModel { + String? identificationNo; + String? mobileNumber; + int? quantityIntake; + 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; + + InsertUserActivityRequestModel( + {this.identificationNo, + this.mobileNumber, + this.quantityIntake, + 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}); + + InsertUserActivityRequestModel.fromJson(Map json) { + identificationNo = json['IdentificationNo']; + mobileNumber = json['MobileNumber']; + quantityIntake = json['QuantityIntake']; + 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']; + } + + Map toJson() { + final Map data = new Map(); + data['IdentificationNo'] = this.identificationNo; + data['MobileNumber'] = this.mobileNumber; + data['QuantityIntake'] = this.quantityIntake; + 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['PatientType'] = this.patientType; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/H2O/user_detail_model.dart b/lib/core/model/AlHabibMedicalService/H2O/user_detail_model.dart new file mode 100644 index 00000000..dd76ccf2 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/H2O/user_detail_model.dart @@ -0,0 +1,105 @@ +class UserDetailModel { + int? userID; + int? patientID; + int? patientType; + bool? patientOutSA; + String? firstName; + String? middleName; + String? lastName; + String? firstNameN; + String? middleNameN; + String? lastNameN; + String? identificationNo; + String? mobile; + String? emailID; + String? zipCode; + String? dOB; + String? gender; + int? activityID; + String? createdDate; + double? height; + double? weight; + bool? isHeightInCM; + bool? isWeightInKG; + bool? isNotificationON; + + UserDetailModel( + {this.userID, + this.patientID, + this.patientType, + this.patientOutSA, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.identificationNo, + this.mobile, + this.emailID, + this.zipCode, + this.dOB, + this.gender, + this.activityID, + this.createdDate, + this.height, + this.weight, + this.isHeightInCM, + this.isWeightInKG, + this.isNotificationON}); + + UserDetailModel.fromJson(Map json) { + if (json == null) return; + userID = json['UserID']; + patientID = json['PatientID']; + patientType = json['PatientType']; + patientOutSA = json['PatientOutSA']; + firstName = json['FirstName']; + middleName = json['MiddleName']; + lastName = json['LastName']; + firstNameN = json['FirstNameN']; + middleNameN = json['MiddleNameN']; + lastNameN = json['LastNameN']; + identificationNo = json['IdentificationNo']; + mobile = json['Mobile']; + emailID = json['EmailID']; + zipCode = json['ZipCode']; + dOB = json['DOB']; + gender = json['Gender']; + activityID = json['ActivityID']; + createdDate = json['CreatedDate']; + height = json['Height']; + weight = json['Weight']; + isHeightInCM = json['IsHeightInCM']; + isWeightInKG = json['IsWeightInKG']; + isNotificationON = json['IsNotificationON']; + } + + Map toJson() { + final Map data = new Map(); + data['UserID'] = this.userID; + data['PatientID'] = this.patientID; + data['PatientType'] = this.patientType; + data['PatientOutSA'] = this.patientOutSA; + data['FirstName'] = this.firstName; + data['MiddleName'] = this.middleName; + data['LastName'] = this.lastName; + data['FirstNameN'] = this.firstNameN; + data['MiddleNameN'] = this.middleNameN; + data['LastNameN'] = this.lastNameN; + data['IdentificationNo'] = this.identificationNo; + data['Mobile'] = this.mobile; + data['EmailID'] = this.emailID; + data['ZipCode'] = this.zipCode; + data['DOB'] = this.dOB; + data['Gender'] = this.gender; + data['ActivityID'] = this.activityID; + data['CreatedDate'] = this.createdDate; + data['Height'] = this.height; + data['Weight'] = this.weight; + data['IsHeightInCM'] = this.isHeightInCM; + data['IsWeightInKG'] = this.isWeightInKG; + data['IsNotificationON'] = this.isNotificationON; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/H2O/user_detail_request_model.dart b/lib/core/model/AlHabibMedicalService/H2O/user_detail_request_model.dart new file mode 100644 index 00000000..44ef6471 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/H2O/user_detail_request_model.dart @@ -0,0 +1,124 @@ +class UserDetailRequestModel { + String? activityID; + int? channel; + int? deviceTypeID; + String? dOB; + String? email; + String? firstName; + String? gender; + String? generalid; + double? height; + String? identificationNo; + String? iPAdress; + bool? isDentalAllowedBackend; + bool? isHeightInCM; + bool? isNotificationOn; + bool? isWeightInKG; + int? languageID; + String? lastName; + String? middleName; + String? mobileNumber; + int? patientID; + int? patientOutSA; + int? patientType; + int? patientTypeID; + String? sessionID; + String? tokenID; + double? versionID; + double? weight; + String? zipCode; + + UserDetailRequestModel( + {this.activityID, + this.channel, + this.deviceTypeID, + this.dOB, + this.email, + this.firstName, + this.gender, + this.generalid, + this.height, + this.identificationNo, + this.iPAdress, + this.isDentalAllowedBackend, + this.isHeightInCM, + this.isNotificationOn, + this.isWeightInKG, + this.languageID, + this.lastName, + this.middleName, + this.mobileNumber, + this.patientID, + this.patientOutSA, + this.patientType, + this.patientTypeID, + this.sessionID, + this.tokenID, + this.versionID, + this.weight, + this.zipCode}); + + UserDetailRequestModel.fromJson(Map json) { + activityID = json['ActivityID']; + channel = json['Channel']; + deviceTypeID = json['DeviceTypeID']; + dOB = json['DOB']; + email = json['Email']; + firstName = json['FirstName']; + gender = json['Gender']; + generalid = json['generalid']; + height = json['Height']; + identificationNo = json['IdentificationNo']; + iPAdress = json['IPAdress']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; + isHeightInCM = json['IsHeightInCM']; + isNotificationOn = json['isNotificationOn']; + isWeightInKG = json['IsWeightInKG']; + languageID = json['LanguageID']; + lastName = json['LastName']; + middleName = json['MiddleName']; + mobileNumber = json['MobileNumber']; + patientID = json['PatientID']; + patientOutSA = json['PatientOutSA']; + patientType = json['PatientType']; + patientTypeID = json['PatientTypeID']; + sessionID = json['SessionID']; + tokenID = json['TokenID']; + versionID = json['VersionID']; + weight = json['Weight']; + zipCode = json['ZipCode']; + } + + Map toJson() { + final Map data = new Map(); + data['ActivityID'] = this.activityID; + data['Channel'] = this.channel; + data['DeviceTypeID'] = this.deviceTypeID; + data['DOB'] = this.dOB; + data['Email'] = this.email; + data['FirstName'] = this.firstName; + data['Gender'] = this.gender; + data['generalid'] = this.generalid; + data['Height'] = this.height; + data['IdentificationNo'] = this.identificationNo; + data['IPAdress'] = this.iPAdress; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['IsHeightInCM'] = this.isHeightInCM; + data['isNotificationOn'] = this.isNotificationOn; + data['IsWeightInKG'] = this.isWeightInKG; + data['LanguageID'] = this.languageID; + data['LastName'] = this.lastName; + data['MiddleName'] = this.middleName; + data['MobileNumber'] = this.mobileNumber; + data['PatientID'] = this.patientID; + data['PatientOutSA'] = this.patientOutSA; + data['PatientType'] = this.patientType; + data['PatientTypeID'] = this.patientTypeID; + data['SessionID'] = this.sessionID; + data['TokenID'] = this.tokenID; + data['VersionID'] = this.versionID; + data['Weight'] = this.weight; + data['ZipCode'] = this.zipCode; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/AlHabibMedicalService/H2O/user_progress_for_month_data_model.dart b/lib/core/model/AlHabibMedicalService/H2O/user_progress_for_month_data_model.dart new file mode 100644 index 00000000..fc961dd9 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/H2O/user_progress_for_month_data_model.dart @@ -0,0 +1,22 @@ +class UserProgressForMonthDataModel { + int? monthNumber; + String? monthName; + int? percentageConsumed; + + UserProgressForMonthDataModel( + {this.monthNumber, this.monthName, this.percentageConsumed}); + + UserProgressForMonthDataModel.fromJson(Map json) { + monthNumber = json['MonthNumber']; + monthName = json['MonthName']; + percentageConsumed = json['PercentageConsumed']; + } + + Map toJson() { + final Map data = new Map(); + data['MonthNumber'] = this.monthNumber; + data['MonthName'] = this.monthName; + data['PercentageConsumed'] = this.percentageConsumed; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/H2O/user_progress_for_today_data_model.dart b/lib/core/model/AlHabibMedicalService/H2O/user_progress_for_today_data_model.dart new file mode 100644 index 00000000..63c7093b --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/H2O/user_progress_for_today_data_model.dart @@ -0,0 +1,28 @@ +class UserProgressForTodayDataModel { + dynamic quantityConsumed; + dynamic percentageConsumed; + dynamic percentageLeft; + dynamic quantityLimit; + + UserProgressForTodayDataModel( + {this.quantityConsumed, + this.percentageConsumed, + this.percentageLeft, + this.quantityLimit}); + + UserProgressForTodayDataModel.fromJson(Map json) { + quantityConsumed = json['QuantityConsumed']; + percentageConsumed = json['PercentageConsumed']; + percentageLeft = json['PercentageLeft']; + quantityLimit = json['QuantityLimit']; + } + + Map toJson() { + final Map data = new Map(); + data['QuantityConsumed'] = this.quantityConsumed; + data['PercentageConsumed'] = this.percentageConsumed; + data['PercentageLeft'] = this.percentageLeft; + data['QuantityLimit'] = this.quantityLimit; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/H2O/user_progress_for_week_data_model.dart b/lib/core/model/AlHabibMedicalService/H2O/user_progress_for_week_data_model.dart new file mode 100644 index 00000000..84655dc8 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/H2O/user_progress_for_week_data_model.dart @@ -0,0 +1,25 @@ +class UserProgressForWeekDataModel { + int? dayNumber; + dynamic dayDate; + String? dayName; + int? percentageConsumed; + + UserProgressForWeekDataModel( + {this.dayNumber, this.dayDate, this.dayName, this.percentageConsumed}); + + UserProgressForWeekDataModel.fromJson(Map json) { + dayNumber = json['DayNumber']; + dayDate = json['DayDate']; + dayName = json['DayName']; + percentageConsumed = json['PercentageConsumed']; + } + + Map toJson() { + final Map data = new Map(); + data['DayNumber'] = this.dayNumber; + data['DayDate'] = this.dayDate; + data['DayName'] = this.dayName; + data['PercentageConsumed'] = this.percentageConsumed; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/H2O/user_progress_request_model.dart b/lib/core/model/AlHabibMedicalService/H2O/user_progress_request_model.dart new file mode 100644 index 00000000..b004162a --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/H2O/user_progress_request_model.dart @@ -0,0 +1,76 @@ +class UserProgressRequestModel { + int? progress; + String? mobileNumber; + String? identificationNo; + 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; + + UserProgressRequestModel( + {this.progress, + this.mobileNumber, + this.identificationNo, + 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}); + + UserProgressRequestModel.fromJson(Map json) { + progress = json['Progress']; + mobileNumber = json['MobileNumber']; + identificationNo = json['IdentificationNo']; + 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']; + } + + Map toJson() { + final Map data = new Map(); + data['Progress'] = this.progress; + data['MobileNumber'] = this.mobileNumber; + data['IdentificationNo'] = this.identificationNo; + 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['PatientType'] = this.patientType; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart b/lib/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart new file mode 100644 index 00000000..dbc6b990 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/HealthCalculator/ClinicCategory.dart @@ -0,0 +1,68 @@ +class ClinicCategory { + int? clinicID; + int? categoryID; + String? categoryName; + String? categoryNameN; + String? icon; + String? bodyImageEN; + String? fullImageEN; + String? bodyImageAR; + String? fullmageAR; + bool? isActive; + bool? isCategoryGroup; + dynamic sortOrderAR; + dynamic sortOrderEN; + String? clinicName; + + ClinicCategory( + {this.clinicID, + this.categoryID, + this.categoryName, + this.categoryNameN, + this.icon, + this.bodyImageEN, + this.fullImageEN, + this.bodyImageAR, + this.fullmageAR, + this.isActive, + this.isCategoryGroup, + this.sortOrderAR, + this.sortOrderEN, + this.clinicName}); + + ClinicCategory.fromJson(Map json) { + clinicID = json['ClinicID']; + categoryID = json['CategoryID']; + categoryName = json['CategoryName']; + categoryNameN = json['CategoryNameN']; + icon = json['Icon']; + bodyImageEN = json['BodyImageEN']; + fullImageEN = json['FullImageEN']; + bodyImageAR = json['BodyImageAR']; + fullmageAR = json['FullmageAR']; + isActive = json['IsActive']; + isCategoryGroup = json['IsCategoryGroup']; + sortOrderAR = json['SortOrderAR']; + sortOrderEN = json['SortOrderEN']; + clinicName = json['ClinicName']; + } + + Map toJson() { + final Map data = new Map(); + data['ClinicID'] = this.clinicID; + data['CategoryID'] = this.categoryID; + data['CategoryName'] = this.categoryName; + data['CategoryNameN'] = this.categoryNameN; + data['Icon'] = this.icon; + data['BodyImageEN'] = this.bodyImageEN; + data['FullImageEN'] = this.fullImageEN; + data['BodyImageAR'] = this.bodyImageAR; + data['FullmageAR'] = this.fullmageAR; + data['IsActive'] = this.isActive; + data['IsCategoryGroup'] = this.isCategoryGroup; + data['SortOrderAR'] = this.sortOrderAR; + data['SortOrderEN'] = this.sortOrderEN; + data['ClinicName'] = this.clinicName; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart b/lib/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart new file mode 100644 index 00000000..04e839ec --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/HealthCalculator/DiseasesByClinic.dart @@ -0,0 +1,44 @@ +class DiseasesByClinic { + int? diseasesID; + String? diseasesEN; + String? diseasesAR; + int? diseasesCategoryID; + dynamic diseasesCategoryEN; + dynamic diseasesCategoryAR; + String? diseases; + dynamic diseasesCategory; + + DiseasesByClinic( + {this.diseasesID, + this.diseasesEN, + this.diseasesAR, + this.diseasesCategoryID, + this.diseasesCategoryEN, + this.diseasesCategoryAR, + this.diseases, + this.diseasesCategory}); + + DiseasesByClinic.fromJson(Map json) { + diseasesID = json['DiseasesID']; + diseasesEN = json['Diseases_EN']; + diseasesAR = json['Diseases_AR']; + diseasesCategoryID = json['Diseases_CategoryID']; + diseasesCategoryEN = json['Diseases_CategoryEN']; + diseasesCategoryAR = json['Diseases_CategoryAR']; + diseases = json['Diseases']; + diseasesCategory = json['Diseases_Category']; + } + + Map toJson() { + final Map data = new Map(); + data['DiseasesID'] = this.diseasesID; + data['Diseases_EN'] = this.diseasesEN; + data['Diseases_AR'] = this.diseasesAR; + data['Diseases_CategoryID'] = this.diseasesCategoryID; + data['Diseases_CategoryEN'] = this.diseasesCategoryEN; + data['Diseases_CategoryAR'] = this.diseasesCategoryAR; + data['Diseases'] = this.diseases; + data['Diseases_Category'] = this.diseasesCategory; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart b/lib/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart new file mode 100644 index 00000000..bf56a750 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart @@ -0,0 +1,64 @@ +class HHCGetAllServicesRequestModel { + 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; + + HHCGetAllServicesRequestModel( + {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}); + + HHCGetAllServicesRequestModel.fromJson(Map json) { + 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']; + } + + 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['PatientType'] = this.patientType; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart b/lib/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart new file mode 100644 index 00000000..19148546 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart @@ -0,0 +1,56 @@ +class HHCGetAllServicesResponseModel { + int? iD; + String? serviceID; + int? orderServiceID; + String? text; + String? textN; + dynamic price; + dynamic priceVAT; + dynamic priceTotal; + bool? isEnabled; + int? orderId; + int? quantity; + + HHCGetAllServicesResponseModel( + {this.iD, + this.serviceID, + this.orderServiceID, + this.text, + this.textN, + this.price, + this.priceVAT, + this.priceTotal, + this.isEnabled, + this.orderId, + this.quantity}); + + HHCGetAllServicesResponseModel.fromJson(Map json) { + iD = json['ID']; + serviceID = json['ServiceID']; + orderServiceID = json['OrderServiceID']; + text = json['Text']; + textN = json['TextN']; + price = json['Price']; + priceVAT = json['PriceVAT']; + priceTotal = json['PriceTotal']; + isEnabled = json['IsEnabled']; + orderId = json['OrderId']; + quantity = json['Quantity']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['ServiceID'] = this.serviceID; + data['OrderServiceID'] = this.orderServiceID; + data['Text'] = this.text; + data['TextN'] = this.textN; + data['Price'] = this.price; + data['PriceVAT'] = this.priceVAT; + data['PriceTotal'] = this.priceTotal; + data['IsEnabled'] = this.isEnabled; + data['OrderId'] = this.orderId; + data['Quantity'] = this.quantity; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart b/lib/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart new file mode 100644 index 00000000..95b7ba83 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart @@ -0,0 +1,21 @@ +class PatientERHHCInsertServicesList { + int? recordID; + int? serviceID; + String? serviceName; + + PatientERHHCInsertServicesList({this.recordID, this.serviceID, this.serviceName}); + + PatientERHHCInsertServicesList.fromJson(Map json) { + recordID = json['RecordID']; + serviceID = json['ServiceID']; + serviceName = json['ServiceName']; + } + + Map toJson() { + final Map data = new Map(); + data['RecordID'] = this.recordID; + data['ServiceID'] = this.serviceID.toString(); + data['ServiceName'] = this.serviceName; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_request_model.dart b/lib/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_request_model.dart new file mode 100644 index 00000000..00b907e0 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_request_model.dart @@ -0,0 +1,64 @@ +class GetHHCAllPresOrdersRequestModel { + 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; + + GetHHCAllPresOrdersRequestModel( + {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}); + + GetHHCAllPresOrdersRequestModel.fromJson(Map json) { + 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']; + } + + 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['PatientType'] = this.patientType; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart b/lib/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart new file mode 100644 index 00000000..1333c218 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart @@ -0,0 +1,132 @@ +class GetHHCAllPresOrdersResponseModel { + int? iD; + String? patientID; + bool? patientOutSA; + bool? isOutPatient; + int? projectID; + int? nearestProjectID; + double? longitude; + double? latitude; + String? appointmentNo; + String? dischargeID; + int? lineItemNo; + int? status; + String? description; + String? descriptionN; + String? createdOn; + int? serviceID; + int? createdBy; + String? editedOn; + int? editedBy; + int? channel; + dynamic clientRequestID; + bool? returnedToQueue; + dynamic pickupDateTime; + dynamic pickupLocationName; + dynamic dropoffLocationName; + int? realRRTHaveTransactions; + String? nearestProjectDescription; + String? nearestProjectDescriptionN; + String? projectDescription; + String? projectDescriptionN; + + GetHHCAllPresOrdersResponseModel( + {this.iD, + this.patientID, + this.patientOutSA, + this.isOutPatient, + this.projectID, + this.nearestProjectID, + this.longitude, + this.latitude, + this.appointmentNo, + this.dischargeID, + this.lineItemNo, + this.status, + this.description, + this.descriptionN, + this.createdOn, + this.serviceID, + this.createdBy, + this.editedOn, + this.editedBy, + this.channel, + this.clientRequestID, + this.returnedToQueue, + this.pickupDateTime, + this.pickupLocationName, + this.dropoffLocationName, + this.realRRTHaveTransactions, + this.nearestProjectDescription, + this.nearestProjectDescriptionN, + this.projectDescription, + this.projectDescriptionN}); + + GetHHCAllPresOrdersResponseModel.fromJson(Map json) { + iD = json['ID']; + patientID = json['PatientID']; + patientOutSA = json['PatientOutSA']; + isOutPatient = json['IsOutPatient']; + projectID = json['ProjectID']; + nearestProjectID = json['NearestProjectID']; + longitude = json['Longitude']; + latitude = json['Latitude']; + appointmentNo = json['AppointmentNo']; + dischargeID = json['DischargeID']; + lineItemNo = json['LineItemNo']; + status = json['Status']; + description = json['Description']; + descriptionN = json['DescriptionN']; + createdOn = json['CreatedOn']; + serviceID = json['ServiceID']; + createdBy = json['CreatedBy']; + editedOn = json['EditedOn']; + editedBy = json['EditedBy']; + channel = json['Channel']; + clientRequestID = json['ClientRequestID']; + returnedToQueue = json['ReturnedToQueue']; + pickupDateTime = json['PickupDateTime']; + pickupLocationName = json['PickupLocationName']; + dropoffLocationName = json['DropoffLocationName']; + realRRTHaveTransactions = json['RealRRT_HaveTransactions']; + nearestProjectDescription = json['NearestProjectDescription']; + nearestProjectDescriptionN = json['NearestProjectDescriptionN']; + projectDescription = json['ProjectDescription']; + projectDescriptionN = json['ProjectDescriptionN']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['PatientID'] = this.patientID; + data['PatientOutSA'] = this.patientOutSA; + data['IsOutPatient'] = this.isOutPatient; + data['ProjectID'] = this.projectID; + data['NearestProjectID'] = this.nearestProjectID; + data['Longitude'] = this.longitude; + data['Latitude'] = this.latitude; + data['AppointmentNo'] = this.appointmentNo; + data['DischargeID'] = this.dischargeID; + data['LineItemNo'] = this.lineItemNo; + data['Status'] = this.status; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + data['CreatedOn'] = this.createdOn; + data['ServiceID'] = this.serviceID; + data['CreatedBy'] = this.createdBy; + data['EditedOn'] = this.editedOn; + data['EditedBy'] = this.editedBy; + data['Channel'] = this.channel; + data['ClientRequestID'] = this.clientRequestID; + data['ReturnedToQueue'] = this.returnedToQueue; + data['PickupDateTime'] = this.pickupDateTime; + data['PickupLocationName'] = this.pickupLocationName; + data['DropoffLocationName'] = this.dropoffLocationName; + data['RealRRT_HaveTransactions'] = this.realRRTHaveTransactions; + data['NearestProjectDescription'] = this.nearestProjectDescription; + data['NearestProjectDescriptionN'] = this.nearestProjectDescriptionN; + data['ProjectDescription'] = this.projectDescription; + data['ProjectDescriptionN'] = this.projectDescriptionN; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart b/lib/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart new file mode 100644 index 00000000..62af618e --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart @@ -0,0 +1,68 @@ +class GetOrderDetailByOrderIDRequestModel { + 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? presOrderID; + + GetOrderDetailByOrderIDRequestModel( + {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.presOrderID}); + + GetOrderDetailByOrderIDRequestModel.fromJson(Map json) { + 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']; + presOrderID = json['PresOrderID']; + } + + 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['PatientType'] = this.patientType; + data['PresOrderID'] = this.presOrderID; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart b/lib/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart new file mode 100644 index 00000000..d26af589 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart @@ -0,0 +1,52 @@ +class GetOrderDetailByOrderIDResponseModel { + int? iD; + int? presOrderID; + int? hHCServiceID; + int? createdBy; + String? createdOn; + int? editedBy; + String? editedOn; + bool? isActive; + String? description; + String? descriptionN; + + GetOrderDetailByOrderIDResponseModel( + {this.iD, + this.presOrderID, + this.hHCServiceID, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn, + this.isActive, + this.description, + this.descriptionN}); + + GetOrderDetailByOrderIDResponseModel.fromJson(Map json) { + iD = json['ID']; + presOrderID = json['PresOrderID']; + hHCServiceID = json['HHC_ServiceID']; + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + isActive = json['IsActive']; + description = json['Description']; + descriptionN = json['DescriptionN']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['PresOrderID'] = this.presOrderID; + data['HHC_ServiceID'] = this.hHCServiceID; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + data['IsActive'] = this.isActive; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart b/lib/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart new file mode 100644 index 00000000..e8da3ed6 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart @@ -0,0 +1,94 @@ +import 'PatientERHHCInsertServicesList.dart'; + +class PatientERInsertPresOrderRequestModel { + 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; + double? latitude; + double? longitude; + int? createdBy; + int? orderServiceID; + List? patientERHHCInsertServicesList = []; + + PatientERInsertPresOrderRequestModel( + {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.latitude, + this.longitude, + this.createdBy, + this.orderServiceID, + this.patientERHHCInsertServicesList}); + + PatientERInsertPresOrderRequestModel.fromJson(Map json) { + 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']; + latitude = json['Latitude']; + longitude = json['Longitude']; + createdBy = json['CreatedBy']; + orderServiceID = json['OrderServiceID']; + if (json['PatientER_HHC_InsertServicesList'] != null) { + patientERHHCInsertServicesList = []; + json['PatientER_HHC_InsertServicesList'].forEach((v) { + patientERHHCInsertServicesList!.add(new PatientERHHCInsertServicesList.fromJson(v)); + }); + } + } + + 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['isOutPatient'] = this.patientOutSA == 0 ? false : true; + // 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['PatientType'] = this.patientType; + data['latitude'] = this.latitude; + data['longitude'] = this.longitude; + // data['CreatedBy'] = this.createdBy; + data['OrderServiceID'] = this.orderServiceID; + if (this.patientERHHCInsertServicesList != null) { + data['procedures'] = this.patientERHHCInsertServicesList!.map((v) => v.toJson()).toList(); + } + return data; + } +} diff --git a/lib/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart b/lib/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart new file mode 100644 index 00000000..b32d51a5 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart @@ -0,0 +1,81 @@ +class UpdatePresOrderRequestModel { + 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? presOrderID; + int? presOrderStatus; + int? editedBy; + String? rejectionReason; + + UpdatePresOrderRequestModel( + {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.presOrderID, + this.presOrderStatus, + this.editedBy, + this.rejectionReason}); + + UpdatePresOrderRequestModel.fromJson(Map json) { + 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']; + presOrderID = json['PresOrderID']; + presOrderStatus = json['PresOrderStatus']; + editedBy = json['EditedBy']; + rejectionReason = json['RejectionReason']; + } + + 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['PatientType'] = this.patientType; + data['Id'] = this.presOrderID; + data['ClickButton'] = 14; + data['PresOrderStatus'] = this.presOrderStatus; + data['EditedBy'] = this.editedBy; + data['RejectionReason'] = this.rejectionReason; + return data; + } +} diff --git a/lib/core/model/Allergy/Allergy.dart b/lib/core/model/Allergy/Allergy.dart new file mode 100644 index 00000000..de9fe5d6 --- /dev/null +++ b/lib/core/model/Allergy/Allergy.dart @@ -0,0 +1,48 @@ +class Allergy { + int? patientID; + int? allergyDiseaseType; + int? allergyDiseaseID; + String? description; + dynamic descriptionN; + dynamic remarks; + dynamic avgDoctorRatingList; + dynamic doctorRatingDetailsList; + dynamic notesDoctorRatingList; + + Allergy( + {this.patientID, + this.allergyDiseaseType, + this.allergyDiseaseID, + this.description, + this.descriptionN, + this.remarks, + this.avgDoctorRatingList, + this.doctorRatingDetailsList, + this.notesDoctorRatingList}); + + Allergy.fromJson(Map json) { + patientID = json['PatientID']; + allergyDiseaseType = json['AllergyDiseaseType']; + allergyDiseaseID = json['AllergyDiseaseID']; + description = json['Description']; + descriptionN = json['DescriptionN']; + remarks = json['Remarks']; + avgDoctorRatingList = json['AvgDoctorRatingList']; + doctorRatingDetailsList = json['DoctorRatingDetailsList']; + notesDoctorRatingList = json['NotesDoctorRatingList']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientID'] = this.patientID; + data['AllergyDiseaseType'] = this.allergyDiseaseType; + data['AllergyDiseaseID'] = this.allergyDiseaseID; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + data['Remarks'] = this.remarks; + data['AvgDoctorRatingList'] = this.avgDoctorRatingList; + data['DoctorRatingDetailsList'] = this.doctorRatingDetailsList; + data['NotesDoctorRatingList'] = this.notesDoctorRatingList; + return data; + } +} diff --git a/lib/core/model/ImagesInfo.dart b/lib/core/model/ImagesInfo.dart new file mode 100644 index 00000000..5455d1bb --- /dev/null +++ b/lib/core/model/ImagesInfo.dart @@ -0,0 +1,7 @@ +class ImagesInfo { + final String? imageAr; + final String? imageEn; + final bool? isAsset; + + ImagesInfo({this.imageAr, this.imageEn, this.isAsset = false}); +} diff --git a/lib/core/model/ResponseModel.dart b/lib/core/model/ResponseModel.dart new file mode 100644 index 00000000..41f28412 --- /dev/null +++ b/lib/core/model/ResponseModel.dart @@ -0,0 +1,7 @@ +class ResponseModel{ + final bool? status; + final String? error; + final T? data; + + ResponseModel({this.status, this.data, this.error}); +} \ No newline at end of file diff --git a/lib/core/model/active_medications/ActivePrescriptionReport.dart b/lib/core/model/active_medications/ActivePrescriptionReport.dart new file mode 100644 index 00000000..50e3d45a --- /dev/null +++ b/lib/core/model/active_medications/ActivePrescriptionReport.dart @@ -0,0 +1,148 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class ActivePrescriptionReport { + dynamic address; + int? appointmentNo; + dynamic clinic; + dynamic companyName; + int? days; + dynamic doctorName; + int? doseDailyQuantity; + String? frequency; + int? frequencyNumber; + + // List image; + // String imageExtension; + // dynamic imageSRCUrl; + String? imageString; + + // dynamic imageThumbUrl; + dynamic isCovered; + String? itemDescription; + int? itemID; + DateTime? orderDate; + int? patientID; + dynamic patientName; + dynamic phoneOffice1; + dynamic prescriptionQR; + int? prescriptionTimes; + dynamic productImage; + String? productImageBase64; + String? productImageString; + int? projectID; + dynamic projectName; + dynamic remarks; + String? route; + String? sKU; + int? scaleOffset; + DateTime? startDate; + + ActivePrescriptionReport( + {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}); + + ActivePrescriptionReport.fromJson(Map json) { + address = json['Address']; + appointmentNo = json['AppointmentNo']; + clinic = json['Clinic']; + companyName = json['CompanyName']; + days = json['Days']; + doctorName = json['DoctorName']; + doseDailyQuantity = json['DoseDailyQuantity']; + frequency = json['Frequency']; + frequencyNumber = json['FrequencyNumber']; + // image = json['Image'].cast(); + // imageExtension = json['ImageExtension']; + // imageSRCUrl = json['ImageSRCUrl']; + imageString = json['ImageString']; + // imageThumbUrl = json['ImageThumbUrl']; + isCovered = json['IsCovered']; + itemDescription = json['ItemDescription']; + itemID = json['ItemID']; + orderDate = DateUtil.convertStringToDate(json['OrderDate']); + patientID = json['PatientID']; + patientName = json['PatientName']; + phoneOffice1 = json['PhoneOffice1']; + prescriptionQR = json['PrescriptionQR']; + prescriptionTimes = json['PrescriptionTimes']; + productImage = json['ProductImage']; + productImageBase64 = json['ProductImageBase64']; + productImageString = json['ProductImageString']; + projectID = json['ProjectID']; + projectName = json['ProjectName']; + remarks = json['Remarks']; + route = json['Route']; + sKU = json['SKU']; + scaleOffset = json['ScaleOffset']; + startDate = DateUtil.convertStringToDate(json['StartDate']); + } + + Map toJson() { + final Map data = new Map(); + data['Address'] = this.address; + data['AppointmentNo'] = this.appointmentNo; + data['Clinic'] = this.clinic; + data['CompanyName'] = this.companyName; + data['Days'] = this.days; + data['DoctorName'] = this.doctorName; + data['DoseDailyQuantity'] = this.doseDailyQuantity; + data['Frequency'] = this.frequency; + data['FrequencyNumber'] = this.frequencyNumber; + // data['Image'] = this.image; + // data['ImageExtension'] = this.imageExtension; + // data['ImageSRCUrl'] = this.imageSRCUrl; + data['ImageString'] = this.imageString; + // data['ImageThumbUrl'] = this.imageThumbUrl; + data['IsCovered'] = this.isCovered; + data['ItemDescription'] = this.itemDescription; + data['ItemID'] = this.itemID; + data['OrderDate'] = this.orderDate; + data['PatientID'] = this.patientID; + data['PatientName'] = this.patientName; + data['PhoneOffice1'] = this.phoneOffice1; + data['PrescriptionQR'] = this.prescriptionQR; + data['PrescriptionTimes'] = this.prescriptionTimes; + data['ProductImage'] = this.productImage; + data['ProductImageBase64'] = this.productImageBase64; + data['ProductImageString'] = this.productImageString; + data['ProjectID'] = this.projectID; + data['ProjectName'] = this.projectName; + data['Remarks'] = this.remarks; + data['Route'] = this.route; + data['SKU'] = this.sKU; + data['ScaleOffset'] = this.scaleOffset; + data['StartDate'] = this.startDate; + return data; + } +} diff --git a/lib/core/model/ask_doctor/AskDoctorReqTypes.dart b/lib/core/model/ask_doctor/AskDoctorReqTypes.dart new file mode 100644 index 00000000..e7e9b4ee --- /dev/null +++ b/lib/core/model/ask_doctor/AskDoctorReqTypes.dart @@ -0,0 +1,92 @@ +class AskDoctorReqTypes { + dynamic setupID; + int? parameterGroup; + int? parameterType; + int? parameterCode; + String? description; + dynamic descriptionN; + dynamic alias; + dynamic aliasN; + dynamic prefix; + dynamic suffix; + dynamic isColorCodingRequired; + dynamic backColor; + dynamic foreColor; + bool? isBuiltIn; + bool? isActive; + int? createdBy; + String? createdOn; + dynamic editedBy; + dynamic editedOn; + dynamic rowVer; + + AskDoctorReqTypes( + {this.setupID, + this.parameterGroup, + this.parameterType, + this.parameterCode, + this.description, + this.descriptionN, + this.alias, + this.aliasN, + this.prefix, + this.suffix, + this.isColorCodingRequired, + this.backColor, + this.foreColor, + this.isBuiltIn, + this.isActive, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn, + this.rowVer}); + + AskDoctorReqTypes.fromJson(Map json) { + setupID = json['SetupID']; + parameterGroup = json['ParameterGroup']; + parameterType = json['ParameterType']; + parameterCode = json['ParameterCode']; + description = json['Description']; + descriptionN = json['DescriptionN']; + alias = json['Alias']; + aliasN = json['AliasN']; + prefix = json['Prefix']; + suffix = json['Suffix']; + isColorCodingRequired = json['IsColorCodingRequired']; + backColor = json['BackColor']; + foreColor = json['ForeColor']; + isBuiltIn = json['IsBuiltIn']; + isActive = json['IsActive']; + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + rowVer = json['RowVer']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ParameterGroup'] = this.parameterGroup; + data['ParameterType'] = this.parameterType; + data['ParameterCode'] = this.parameterCode; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + data['Alias'] = this.alias; + data['AliasN'] = this.aliasN; + data['Prefix'] = this.prefix; + data['Suffix'] = this.suffix; + data['IsColorCodingRequired'] = this.isColorCodingRequired; + data['BackColor'] = this.backColor; + data['ForeColor'] = this.foreColor; + data['IsBuiltIn'] = this.isBuiltIn; + data['IsActive'] = this.isActive; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + data['RowVer'] = this.rowVer; + return data; + } +} diff --git a/lib/core/model/ask_doctor/DoctorResponse.dart b/lib/core/model/ask_doctor/DoctorResponse.dart new file mode 100644 index 00000000..6b26a63f --- /dev/null +++ b/lib/core/model/ask_doctor/DoctorResponse.dart @@ -0,0 +1,76 @@ +class DoctorResponse { + int? projectID; + int? transactionNo; + int? patientID; + int? doctorID; + int? requestType; + String? requestTypeDescription; + dynamic requestTypeDescriptionN; + int? status; + String? remarks; + String? createdOn; + dynamic readStatus; + String? doctorName; + bool? isDoctorRespond; + bool? isPatientRead; + List? transactions; + + DoctorResponse( + {this.projectID, + this.transactionNo, + this.patientID, + this.doctorID, + this.requestType, + this.requestTypeDescription, + this.requestTypeDescriptionN, + this.status, + this.remarks, + this.createdOn, + this.readStatus, + this.doctorName, + this.isDoctorRespond, + this.isPatientRead, + this.transactions}); + + DoctorResponse.fromJson(Map json) { + projectID = json['ProjectID']; + transactionNo = json['TransactionNo']; + patientID = json['PatientID']; + doctorID = json['DoctorID']; + requestType = json['RequestType']; + requestTypeDescription = json['RequestTypeDescription']; + requestTypeDescriptionN = json['RequestTypeDescriptionN']; + status = json['Status']; + remarks = json['Remarks']; + createdOn = json['CreatedOn']; + readStatus = json['ReadStatus']; + doctorName = json['DoctorName']; + isDoctorRespond = json['IsDoctorRespond']; + isPatientRead = json['IsPatientRead']; + if (json['Transactions'] != null) { + transactions = json['Transactions']; + } + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + data['TransactionNo'] = this.transactionNo; + data['PatientID'] = this.patientID; + data['DoctorID'] = this.doctorID; + data['RequestType'] = this.requestType; + data['RequestTypeDescription'] = this.requestTypeDescription; + data['RequestTypeDescriptionN'] = this.requestTypeDescriptionN; + data['Status'] = this.status; + data['Remarks'] = this.remarks; + data['CreatedOn'] = this.createdOn; + data['ReadStatus'] = this.readStatus; + data['DoctorName'] = this.doctorName; + data['IsDoctorRespond'] = this.isDoctorRespond; + data['IsPatientRead'] = this.isPatientRead; + if (this.transactions != null) { + data['Transactions'] = this.transactions!.map((v) => v.toJson()).toList(); + } + return data; + } +} diff --git a/lib/core/model/blooddonation/blood_donation_free_slots_response.dart b/lib/core/model/blooddonation/blood_donation_free_slots_response.dart new file mode 100644 index 00000000..df62f895 --- /dev/null +++ b/lib/core/model/blooddonation/blood_donation_free_slots_response.dart @@ -0,0 +1,25 @@ +class BloodDonationFreeSlotsResponseModel { + int? clinicID; + int? doctorID; + String? freeTimeSlots; + int? projectID; + + BloodDonationFreeSlotsResponseModel( + {this.clinicID, this.doctorID, this.freeTimeSlots, this.projectID}); + + BloodDonationFreeSlotsResponseModel.fromJson(Map json) { + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + freeTimeSlots = json['FreeTimeSlots']; + projectID = json['ProjectID']; + } + + Map toJson() { + final Map data = new Map(); + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['FreeTimeSlots'] = this.freeTimeSlots; + data['ProjectID'] = this.projectID; + return data; + } +} diff --git a/lib/core/model/blooddonation/blood_donation_projects_list_response.dart b/lib/core/model/blooddonation/blood_donation_projects_list_response.dart new file mode 100644 index 00000000..3ba5952d --- /dev/null +++ b/lib/core/model/blooddonation/blood_donation_projects_list_response.dart @@ -0,0 +1,46 @@ +class BloodDonationProjectsListResponse { + int? rowID; + int? iD; + int? projectID; + int? numberOfRooms; + bool? isActive; + int? createdBy; + String? createdOn; + dynamic editedBy; + dynamic editedON; + String? projectName; + dynamic projectNameN; + + BloodDonationProjectsListResponse( + {this.rowID, this.iD, this.projectID, this.numberOfRooms, this.isActive, this.createdBy, this.createdOn, this.editedBy, this.editedON, this.projectName, this.projectNameN}); + + BloodDonationProjectsListResponse.fromJson(Map json) { + rowID = json['RowID']; + iD = json['ID']; + projectID = json['ProjectID']; + numberOfRooms = json['NumberOfRooms']; + isActive = json['IsActive']; + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedON = json['EditedON']; + projectName = json['ProjectName']; + projectNameN = json['ProjectNameN']; + } + + Map toJson() { + final Map data = new Map(); + data['RowID'] = this.rowID; + data['ID'] = this.iD; + data['ProjectID'] = this.projectID; + data['NumberOfRooms'] = this.numberOfRooms; + data['IsActive'] = this.isActive; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedON'] = this.editedON; + data['ProjectName'] = this.projectName; + data['ProjectNameN'] = this.projectNameN; + return data; + } +} diff --git a/lib/core/model/blooddonation/blood_groub_details.dart b/lib/core/model/blooddonation/blood_groub_details.dart new file mode 100644 index 00000000..77c2d944 --- /dev/null +++ b/lib/core/model/blooddonation/blood_groub_details.dart @@ -0,0 +1,77 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +class List_BloodGroupDetailsModel { + int? iD; + int? patientID; + int? patientType; + bool? patientOutSA; + int? zipCode; + String? cellNumber; + String? cityCode; + String? city; + int? gender; + String? bloodGroup; + String? nationalID; + bool? isActive; + int? createdBy; + DateTime? createdOn; + int? editedBy; + DateTime? editedOn; + + List_BloodGroupDetailsModel( + {this.iD, + this.patientID, + this.patientType, + this.patientOutSA, + this.zipCode, + this.cellNumber, + this.cityCode, + this.city, + this.gender, + this.bloodGroup, + this.nationalID, + this.isActive, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn}); + + List_BloodGroupDetailsModel.fromJson(Map json) { + iD = json['ID']; + patientID = json['PatientID']; + patientType = json['PatientType']; + patientOutSA = json['PatientOutSA']; + zipCode = json['ZipCode']; + cellNumber = json['CellNumber']; + cityCode = json['CityCode']; + city = json['City']; + gender = json['Gender']; + bloodGroup = json['BloodGroup']; + nationalID = json['NationalID']; + isActive = json['IsActive']; + createdBy = json['CreatedBy']; + createdOn = DateUtil.convertStringToDate(json['CreatedOn']);// json['CreatedOn']; + editedBy = json['EditedBy']; + editedOn = DateUtil.convertStringToDate(json['EditedOn']);//json['EditedOn']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['PatientID'] = this.patientID; + data['PatientType'] = this.patientType; + data['PatientOutSA'] = this.patientOutSA; + data['ZipCode'] = this.zipCode; + data['CellNumber'] = this.cellNumber; + data['CityCode'] = this.cityCode; + data['City'] = this.city; + data['Gender'] = this.gender; + data['BloodGroup'] = this.bloodGroup; + data['NationalID'] = this.nationalID; + data['IsActive'] = this.isActive; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/blooddonation/get_all_cities.dart b/lib/core/model/blooddonation/get_all_cities.dart new file mode 100644 index 00000000..cf7e6318 --- /dev/null +++ b/lib/core/model/blooddonation/get_all_cities.dart @@ -0,0 +1,21 @@ +class CitiesModel { + int? iD; + String? description; + String? descriptionN; + + CitiesModel({this.iD, this.description, this.descriptionN}); + + CitiesModel.fromJson(Map json) { + iD = json['ID']; + description = json['Description']; + descriptionN = json['DescriptionN']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/childvaccines/List_BabyInformationModel.dart b/lib/core/model/childvaccines/List_BabyInformationModel.dart new file mode 100644 index 00000000..cce3e248 --- /dev/null +++ b/lib/core/model/childvaccines/List_BabyInformationModel.dart @@ -0,0 +1,45 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +class List_BabyInformationModel { + int? alertBy; + int? babyID; + String? babyName; + DateTime? dOB; + int? gender; + String? genderDescription; + int? patientID; + int? userID; + + List_BabyInformationModel( + {this.alertBy, + this.babyID, + this.babyName, + this.dOB, + this.gender, + this.genderDescription, + this.patientID, + this.userID}); + + List_BabyInformationModel.fromJson(Map json) { + alertBy = json['AlertBy']; + babyID = json['BabyID']; + babyName = json['BabyName']; + dOB = DateUtil.convertStringToDate(json['DOB']); + gender = json['Gender']; + genderDescription = json['GenderDescription']; + patientID = json['PatientID']; + userID = json['UserID']; + } + + Map toJson() { + final Map data = new Map(); + data['AlertBy'] = this.alertBy; + data['BabyID'] = this.babyID; + data['BabyName'] = this.babyName; + data['DOB'] = this.dOB; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['PatientID'] = this.patientID; + data['UserID'] = this.userID; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/childvaccines/add_newchild_model.dart b/lib/core/model/childvaccines/add_newchild_model.dart new file mode 100644 index 00000000..1f6afa32 --- /dev/null +++ b/lib/core/model/childvaccines/add_newchild_model.dart @@ -0,0 +1,100 @@ +class CreateNewBaby { + String? babyName; + String? gender; + String? strDOB; + int? editedBy; + int? createdBy; + bool? tempValue; + int? userID; + bool? isLogin; + int? alertBy; + 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; + + CreateNewBaby( + {this.babyName, + this.gender, + this.strDOB, + this.editedBy, + this.createdBy, + this.tempValue, + this.userID, + this.isLogin, + this.alertBy, + 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}); + + CreateNewBaby.fromJson(Map json) { + babyName = json['BabyName']; + gender = json['Gender']; + strDOB = json['StrDOB']; + editedBy = json['EditedBy']; + createdBy = json['CreatedBy']; + tempValue = json['TempValue']; + userID = json['UserID']; + isLogin = json['IsLogin']; + alertBy = json['AlertBy']; + 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']; + } + + Map toJson() { + final Map data = new Map(); + data['BabyName'] = this.babyName; + data['Gender'] = this.gender; + data['StrDOB'] = this.strDOB; + data['EditedBy'] = this.editedBy; + data['CreatedBy'] = this.createdBy; + data['TempValue'] = this.tempValue; + data['UserID'] = this.userID; + data['IsLogin'] = this.isLogin; + data['AlertBy'] = this.alertBy; + 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['PatientType'] = this.patientType; + return data; + } +} diff --git a/lib/core/model/childvaccines/create_new_user_model.dart b/lib/core/model/childvaccines/create_new_user_model.dart new file mode 100644 index 00000000..2d496651 --- /dev/null +++ b/lib/core/model/childvaccines/create_new_user_model.dart @@ -0,0 +1,164 @@ +class CreateNewUser_New { + dynamic date; + int? languageID; + int? serviceName; + dynamic time; + dynamic androidLink; + dynamic authenticationTokenID; + dynamic data; + bool? dataw; + int? dietType; + dynamic errorCode; + dynamic errorEndUserMessage; + dynamic errorEndUserMessageN; + dynamic errorMessage; + int? errorType; + int? foodCategory; + dynamic iOSLink; + bool? isAuthenticated; + int? mealOrderStatus; + int? mealType; + int? messageStatus; + int? numberOfResultRecords; + dynamic patientBlodType; + dynamic successMsg; + dynamic successMsgN; + dynamic htmlResult; + bool? isHMGPatient; + bool? isRegister; + bool? isSendSMS; + dynamic listBabyInformationModel; + dynamic listBabyNeedReminderModel; + dynamic listCreateVaccinationTableModel; + dynamic listHisPatientModel; + dynamic listUserInformationModel; + dynamic listUserInformationModelNew; + dynamic listVaccinationTableModel; + dynamic tokinID; + int? userID; + dynamic verificationCode; + + CreateNewUser_New( + {this.date, + this.languageID, + this.serviceName, + this.time, + this.androidLink, + this.authenticationTokenID, + this.data, + this.dataw, + this.dietType, + this.errorCode, + this.errorEndUserMessage, + this.errorEndUserMessageN, + this.errorMessage, + this.errorType, + this.foodCategory, + this.iOSLink, + this.isAuthenticated, + this.mealOrderStatus, + this.mealType, + this.messageStatus, + this.numberOfResultRecords, + this.patientBlodType, + this.successMsg, + this.successMsgN, + this.htmlResult, + this.isHMGPatient, + this.isRegister, + this.isSendSMS, + this.listBabyInformationModel, + this.listBabyNeedReminderModel, + this.listCreateVaccinationTableModel, + this.listHisPatientModel, + this.listUserInformationModel, + this.listUserInformationModelNew, + this.listVaccinationTableModel, + this.tokinID, + this.userID, + this.verificationCode}); + + CreateNewUser_New.fromJson(Map json) { + date = json['Date']; + languageID = json['LanguageID']; + serviceName = json['ServiceName']; + time = json['Time']; + androidLink = json['AndroidLink']; + authenticationTokenID = json['AuthenticationTokenID']; + data = json['Data']; + dataw = json['Dataw']; + dietType = json['DietType']; + errorCode = json['ErrorCode']; + errorEndUserMessage = json['ErrorEndUserMessage']; + errorEndUserMessageN = json['ErrorEndUserMessageN']; + errorMessage = json['ErrorMessage']; + errorType = json['ErrorType']; + foodCategory = json['FoodCategory']; + iOSLink = json['IOSLink']; + isAuthenticated = json['IsAuthenticated']; + mealOrderStatus = json['MealOrderStatus']; + mealType = json['MealType']; + messageStatus = json['MessageStatus']; + numberOfResultRecords = json['NumberOfResultRecords']; + patientBlodType = json['PatientBlodType']; + successMsg = json['SuccessMsg']; + successMsgN = json['SuccessMsgN']; + htmlResult = json['HtmlResult']; + isHMGPatient = json['IsHMGPatient']; + isRegister = json['IsRegister']; + isSendSMS = json['IsSendSMS']; + listBabyInformationModel = json['List_BabyInformationModel']; + listBabyNeedReminderModel = json['List_BabyNeedReminderModel']; + listCreateVaccinationTableModel = json['List_CreateVaccinationTableModel']; + listHisPatientModel = json['List_His_PatientModel']; + listUserInformationModel = json['List_UserInformationModel']; + listUserInformationModelNew = json['List_UserInformationModel_New']; + listVaccinationTableModel = json['List_VaccinationTableModel']; + tokinID = json['TokinID']; + userID = json['UserID']; + verificationCode = json['VerificationCode']; + } + + Map toJson() { + final Map data = new Map(); + data['Date'] = this.date; + data['LanguageID'] = this.languageID; + data['ServiceName'] = this.serviceName; + data['Time'] = this.time; + data['AndroidLink'] = this.androidLink; + data['AuthenticationTokenID'] = this.authenticationTokenID; + data['Data'] = this.data; + data['Dataw'] = this.dataw; + data['DietType'] = this.dietType; + data['ErrorCode'] = this.errorCode; + data['ErrorEndUserMessage'] = this.errorEndUserMessage; + data['ErrorEndUserMessageN'] = this.errorEndUserMessageN; + data['ErrorMessage'] = this.errorMessage; + data['ErrorType'] = this.errorType; + data['FoodCategory'] = this.foodCategory; + data['IOSLink'] = this.iOSLink; + data['IsAuthenticated'] = this.isAuthenticated; + data['MealOrderStatus'] = this.mealOrderStatus; + data['MealType'] = this.mealType; + data['MessageStatus'] = this.messageStatus; + data['NumberOfResultRecords'] = this.numberOfResultRecords; + data['PatientBlodType'] = this.patientBlodType; + data['SuccessMsg'] = this.successMsg; + data['SuccessMsgN'] = this.successMsgN; + data['HtmlResult'] = this.htmlResult; + data['IsHMGPatient'] = this.isHMGPatient; + data['IsRegister'] = this.isRegister; + data['IsSendSMS'] = this.isSendSMS; + data['List_BabyInformationModel'] = this.listBabyInformationModel; + data['List_BabyNeedReminderModel'] = this.listBabyNeedReminderModel; + data['List_CreateVaccinationTableModel'] = this.listCreateVaccinationTableModel; + data['List_His_PatientModel'] = this.listHisPatientModel; + data['List_UserInformationModel'] = this.listUserInformationModel; + data['List_UserInformationModel_New'] = this.listUserInformationModelNew; + data['List_VaccinationTableModel'] = this.listVaccinationTableModel; + data['TokinID'] = this.tokinID; + data['UserID'] = this.userID; + data['VerificationCode'] = this.verificationCode; + return data; + } +} diff --git a/lib/core/model/childvaccines/create_vaccination_table.dart b/lib/core/model/childvaccines/create_vaccination_table.dart new file mode 100644 index 00000000..32b2ffff --- /dev/null +++ b/lib/core/model/childvaccines/create_vaccination_table.dart @@ -0,0 +1,25 @@ +class CreateVaccinationTable { + String? givenAt; + String? status; + String? vaccinesDescription; + String? visit; + + CreateVaccinationTable( + {this.givenAt, this.status, this.vaccinesDescription, this.visit}); + + CreateVaccinationTable.fromJson(Map json) { + givenAt = json['GivenAt']; + status = json['Status']; + vaccinesDescription = json['VaccinesDescription']; + visit = json['Visit']; + } + + Map toJson() { + final Map data = new Map(); + data['GivenAt'] = this.givenAt; + data['Status'] = this.status; + data['VaccinesDescription'] = this.vaccinesDescription; + data['Visit'] = this.visit; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/childvaccines/delete_baby_model.dart b/lib/core/model/childvaccines/delete_baby_model.dart new file mode 100644 index 00000000..4d20bef5 --- /dev/null +++ b/lib/core/model/childvaccines/delete_baby_model.dart @@ -0,0 +1,76 @@ +class DeleteBaby { + bool? isLogin; + int? babyID; + int? editedBy; + 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; + + DeleteBaby( + {this.isLogin, + this.babyID, + this.editedBy, + 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}); + + DeleteBaby.fromJson(Map json) { + isLogin = json['IsLogin']; + babyID = json['BabyID']; + editedBy = json['EditedBy']; + 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']; + } + + Map toJson() { + final Map data = new Map(); + data['IsLogin'] = this.isLogin; + data['BabyID'] = this.babyID; + data['EditedBy'] = this.editedBy; + 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['PatientType'] = this.patientType; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/childvaccines/get_vacainations_itemsmodel.dart b/lib/core/model/childvaccines/get_vacainations_itemsmodel.dart new file mode 100644 index 00000000..5ac35904 --- /dev/null +++ b/lib/core/model/childvaccines/get_vacainations_itemsmodel.dart @@ -0,0 +1,18 @@ +class GET_VACCINATIONS_ITEMSMODEL { + String? dESCRIPTION; + String? iTEMCODE; + + GET_VACCINATIONS_ITEMSMODEL({this.dESCRIPTION, this.iTEMCODE}); + + GET_VACCINATIONS_ITEMSMODEL.fromJson(Map json) { + dESCRIPTION = json['DESCRIPTION']; + iTEMCODE = json['ITEM_CODE']; + } + + Map toJson() { + final Map data = new Map(); + data['DESCRIPTION'] = this.dESCRIPTION; + data['ITEM_CODE'] = this.iTEMCODE; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/childvaccines/user_information_model.dart b/lib/core/model/childvaccines/user_information_model.dart new file mode 100644 index 00000000..9e3ba427 --- /dev/null +++ b/lib/core/model/childvaccines/user_information_model.dart @@ -0,0 +1,39 @@ +class List_UserInformationModel { + int? userID; + String? mobileNumber; + String? nationalID; + String? emailAddress; + int? patientID; + int? patientType; + bool? patientOutSA; + int? createdBy; + int? editedBy; + + List_UserInformationModel({this.userID, this.mobileNumber, this.nationalID, this.emailAddress, this.patientID, this.patientType, this.patientOutSA, this.createdBy, this.editedBy}); + + List_UserInformationModel.fromJson(Map json) { + userID = json['UserID']; + mobileNumber = json['MobileNumber']; + nationalID = json['NationalID']; + emailAddress = json['EmailAddress']; + patientID = json['PatientID']; + patientType = json['PatientType']; + patientOutSA = json['PatientOutSA']; + createdBy = json['CreatedBy']; + editedBy = json['EditedBy']; + } + + Map toJson() { + final Map data = new Map(); + data['UserID'] = this.userID; + data['MobileNumber'] = this.mobileNumber; + data['NationalID'] = this.nationalID; + data['EmailAddress'] = this.emailAddress; + data['PatientID'] = this.patientID; + data['PatientType'] = this.patientType; + data['PatientOutSA'] = this.patientOutSA; + data['CreatedBy'] = this.createdBy; + data['EditedBy'] = this.editedBy; + return data; + } +} diff --git a/lib/core/model/contactus/get_hmg_locations.dart b/lib/core/model/contactus/get_hmg_locations.dart new file mode 100644 index 00000000..d15b8534 --- /dev/null +++ b/lib/core/model/contactus/get_hmg_locations.dart @@ -0,0 +1,80 @@ +class GetHMGLocationsModel { + dynamic cityID; + String? cityName; + dynamic cityNameN; + dynamic distanceInKilometers; + bool? isActive; + String? latitude; + int? locationID; + String? locationName; + dynamic locationNameN; + dynamic locationType; + String? longitude; + int? pharmacyLocationID; + String? phoneNumber; + int? projectID; + String? projectImageURL; + int? setupID; + dynamic sortOrder; + + GetHMGLocationsModel( + {this.cityID, + this.cityName, + this.cityNameN, + this.distanceInKilometers, + this.isActive, + this.latitude, + this.locationID, + this.locationName, + this.locationNameN, + this.locationType, + this.longitude, + this.pharmacyLocationID, + this.phoneNumber, + this.projectID, + this.projectImageURL, + this.setupID, + this.sortOrder}); + + GetHMGLocationsModel.fromJson(Map json) { + cityID = json['CityID']; + cityName = json['CityName']; + cityNameN = json['CityNameN']; + distanceInKilometers = json['DistanceInKilometers']; + isActive = json['IsActive']; + latitude = json['Latitude']; + locationID = json['LocationID']; + locationName = json['LocationName']; + locationNameN = json['LocationNameN']; + locationType = json['LocationType']; + longitude = json['Longitude']; + pharmacyLocationID = json['PharmacyLocationID']; + phoneNumber = json['PhoneNumber']; + projectID = json['ProjectID']; + projectImageURL = json['ProjectImageURL']; + setupID = json['SetupID']; + sortOrder = json['SortOrder']; + } + + Map toJson() { + final Map data = new Map(); + data['CityID'] = this.cityID; + data['CityName'] = this.cityName; + data['CityNameN'] = this.cityNameN; + data['DistanceInKilometers'] = this.distanceInKilometers; + data['IsActive'] = this.isActive; + data['Latitude'] = this.latitude; + data['LocationID'] = this.locationID; + data['LocationName'] = this.locationName; + data['LocationNameN'] = this.locationNameN; + data['LocationType'] = this.locationType; + data['Longitude'] = this.longitude; + data['PharmacyLocationID'] = this.pharmacyLocationID; + data['PhoneNumber'] = this.phoneNumber; + data['ProjectID'] = this.projectID; + data['ProjectImageURL'] = this.projectImageURL; + data['SetupID'] = this.setupID; + data['SortOrder'] = this.sortOrder; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/contactus/get_patientI_cprojects.dart b/lib/core/model/contactus/get_patientI_cprojects.dart new file mode 100644 index 00000000..72a1968c --- /dev/null +++ b/lib/core/model/contactus/get_patientI_cprojects.dart @@ -0,0 +1,48 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class GetPatientICProjectsModel { + int? id; + String? projectName; + String? projectNameN; + String? value; + dynamic languageId; + DateTime? createdOn; + String? createdBy; + dynamic editedOn; + dynamic editedBy; + bool? isActive; + dynamic distanceInKilometers; + + GetPatientICProjectsModel( + {this.id, this.projectName, this.projectNameN, this.value, this.languageId, this.createdOn, this.createdBy, this.editedOn, this.editedBy, this.distanceInKilometers, this.isActive}); + + GetPatientICProjectsModel.fromJson(Map json) { + id = json['id']; + projectName = json['ProjectName']; + projectNameN = json['ProjectNameN']; + value = json['Value']; + languageId = json['LanguageId']; + createdOn = DateUtil.convertStringToDate(json['CreatedOn']); + createdBy = json['CreatedBy']; + editedOn = json['EditedOn']; + editedBy = json['EditedBy']; + isActive = json['IsActive']; + distanceInKilometers = json['DistanceInKilometers']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['ProjectName'] = this.projectName; + data['ProjectNameN'] = this.projectNameN; + data['Value'] = this.value; + data['LanguageId'] = this.languageId; + data['CreatedOn'] = this.createdOn; + data['CreatedBy'] = this.createdBy; + data['EditedOn'] = this.editedOn; + data['EditedBy'] = this.editedBy; + data['IsActive'] = this.isActive; + data['DistanceInKilometers'] = this.distanceInKilometers; + return data; + } +} diff --git a/lib/core/model/doctor/doctor_profile.dart b/lib/core/model/doctor/doctor_profile.dart new file mode 100644 index 00000000..36d77f53 --- /dev/null +++ b/lib/core/model/doctor/doctor_profile.dart @@ -0,0 +1,176 @@ +class DoctorProfile { + int? doctorID; + String? doctorName; + dynamic doctorNameN; + int? clinicID; + String? clinicDescription; + dynamic clinicDescriptionN; + dynamic licenseExpiry; + int? employmentType; + dynamic setupID; + int? projectID; + String? projectName; + String? nationalityID; + String? nationalityName; + dynamic nationalityNameN; + int? gender; + String? genderDescription; + dynamic genderDescriptionN; + dynamic doctorTitle; + dynamic projectNameN; + bool? isAllowWaitList; + String? titleDescription; + dynamic titleDescriptionN; + dynamic isRegistered; + dynamic isDoctorDummy; + bool? isActive; + dynamic isDoctorAppointmentDisplayed; + bool? doctorClinicActive; + dynamic isbookingAllowed; + String? doctorCases; + dynamic doctorPicture; + String? doctorProfileInfo; + List? specialty; + int? actualDoctorRate; + String? doctorImageURL; + int? doctorRate; + String? doctorTitleForProfile; + bool? isAppointmentAllowed; + String? nationalityFlagURL; + int? noOfPatientsRate; + String? qR; + int? serviceID; + + DoctorProfile( + {this.doctorID, + this.doctorName, + this.doctorNameN, + this.clinicID, + this.clinicDescription, + this.clinicDescriptionN, + this.licenseExpiry, + this.employmentType, + this.setupID, + this.projectID, + this.projectName, + this.nationalityID, + this.nationalityName, + this.nationalityNameN, + this.gender, + this.genderDescription, + this.genderDescriptionN, + this.doctorTitle, + this.projectNameN, + this.isAllowWaitList, + this.titleDescription, + this.titleDescriptionN, + this.isRegistered, + this.isDoctorDummy, + this.isActive, + this.isDoctorAppointmentDisplayed, + this.doctorClinicActive, + this.isbookingAllowed, + this.doctorCases, + this.doctorPicture, + this.doctorProfileInfo, + this.specialty, + this.actualDoctorRate, + this.doctorImageURL, + this.doctorRate, + this.doctorTitleForProfile, + this.isAppointmentAllowed, + this.nationalityFlagURL, + this.noOfPatientsRate, + this.qR, + this.serviceID}); + + DoctorProfile.fromJson(Map json) { + doctorID = json['DoctorID']; + doctorName = json['DoctorName']; + doctorNameN = json['DoctorNameN']; + clinicID = json['ClinicID']; + clinicDescription = json['ClinicDescription']; + clinicDescriptionN = json['ClinicDescriptionN']; + licenseExpiry = json['LicenseExpiry']; + employmentType = json['EmploymentType']; + setupID = json['SetupID']; + projectID = json['ProjectID']; + projectName = json['ProjectName']; + nationalityID = json['NationalityID']; + nationalityName = json['NationalityName']; + nationalityNameN = json['NationalityNameN']; + gender = json['Gender']; + genderDescription = json['Gender_Description']; + genderDescriptionN = json['Gender_DescriptionN']; + doctorTitle = json['DoctorTitle']; + projectNameN = json['ProjectNameN']; + isAllowWaitList = json['IsAllowWaitList']; + titleDescription = json['Title_Description']; + titleDescriptionN = json['Title_DescriptionN']; + isRegistered = json['IsRegistered']; + isDoctorDummy = json['IsDoctorDummy']; + isActive = json['IsActive']; + isDoctorAppointmentDisplayed = json['IsDoctorAppointmentDisplayed']; + doctorClinicActive = json['DoctorClinicActive']; + isbookingAllowed = json['IsbookingAllowed']; + doctorCases = json['DoctorCases']; + doctorPicture = json['DoctorPicture']; + doctorProfileInfo = json['DoctorProfileInfo']; + specialty = json['Specialty'].cast(); + actualDoctorRate = json['ActualDoctorRate']; + doctorImageURL = json['DoctorImageURL']; + doctorRate = json['DoctorRate']; + doctorTitleForProfile = json['DoctorTitleForProfile']; + isAppointmentAllowed = json['IsAppointmentAllowed']; + nationalityFlagURL = json['NationalityFlagURL']; + noOfPatientsRate = json['NoOfPatientsRate']; + qR = json['QR']; + serviceID = json['ServiceID']; + } + + Map toJson() { + final Map data = new Map(); + data['DoctorID'] = this.doctorID; + data['DoctorName'] = this.doctorName; + data['DoctorNameN'] = this.doctorNameN; + data['ClinicID'] = this.clinicID; + data['ClinicDescription'] = this.clinicDescription; + data['ClinicDescriptionN'] = this.clinicDescriptionN; + data['LicenseExpiry'] = this.licenseExpiry; + data['EmploymentType'] = this.employmentType; + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['ProjectName'] = this.projectName; + data['NationalityID'] = this.nationalityID; + data['NationalityName'] = this.nationalityName; + data['NationalityNameN'] = this.nationalityNameN; + data['Gender'] = this.gender; + data['Gender_Description'] = this.genderDescription; + data['Gender_DescriptionN'] = this.genderDescriptionN; + data['DoctorTitle'] = this.doctorTitle; + data['ProjectNameN'] = this.projectNameN; + data['IsAllowWaitList'] = this.isAllowWaitList; + data['Title_Description'] = this.titleDescription; + data['Title_DescriptionN'] = this.titleDescriptionN; + data['IsRegistered'] = this.isRegistered; + data['IsDoctorDummy'] = this.isDoctorDummy; + data['IsActive'] = this.isActive; + data['IsDoctorAppointmentDisplayed'] = this.isDoctorAppointmentDisplayed; + data['DoctorClinicActive'] = this.doctorClinicActive; + data['IsbookingAllowed'] = this.isbookingAllowed; + data['DoctorCases'] = this.doctorCases; + data['DoctorPicture'] = this.doctorPicture; + data['DoctorProfileInfo'] = this.doctorProfileInfo; + data['Specialty'] = this.specialty; + data['ActualDoctorRate'] = this.actualDoctorRate; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorRate'] = this.doctorRate; + data['DoctorTitleForProfile'] = this.doctorTitleForProfile; + data['IsAppointmentAllowed'] = this.isAppointmentAllowed; + data['NationalityFlagURL'] = this.nationalityFlagURL; + data['NoOfPatientsRate'] = this.noOfPatientsRate; + data['QR'] = this.qR; + data['ServiceID'] = this.serviceID; + return data; + } +} diff --git a/lib/core/model/doctor/doctor_rating.dart b/lib/core/model/doctor/doctor_rating.dart new file mode 100644 index 00000000..7996cbaa --- /dev/null +++ b/lib/core/model/doctor/doctor_rating.dart @@ -0,0 +1,32 @@ +class DoctorRating { + dynamic projectID; + dynamic clinicID; + int? doctorID; + int? patientNumber; + int? doctorRate; + + DoctorRating( + {this.projectID, + this.clinicID, + this.doctorID, + this.patientNumber, + this.doctorRate}); + + DoctorRating.fromJson(Map json) { + projectID = json['ProjectID']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + patientNumber = json['PatientNumber']; + doctorRate = json['DoctorRate']; + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['PatientNumber'] = this.patientNumber; + data['DoctorRate'] = this.doctorRate; + return data; + } +} diff --git a/lib/core/model/doctor/patient_doctor_appointment.dart b/lib/core/model/doctor/patient_doctor_appointment.dart new file mode 100644 index 00000000..9ee31e04 --- /dev/null +++ b/lib/core/model/doctor/patient_doctor_appointment.dart @@ -0,0 +1,323 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class PatientDoctorAppointment { + String? setupID; + int? projectID; + int? appointmentNo; + DateTime? appointmentDate; + String? appointmentDateN; + bool? appointmentType; + DateTime? bookDate; + bool? patientType; + int? patientID; + int? clinicID; + int? doctorID; + DateTime? endDate; + String? startTime; + String? endTime; + bool? status; + bool? visitType; + String? visitFor; + String? patientStatusType; + String? actualVisitStartTime; + String? actualVisitEndTime; + bool? isReminderActivated; + String? reminderDisplayInterval; + String? reminderDisplayIntervalUnit; + String? mainAppointmentNo; + String? notes; + int? companyID; + String? dHCCPatApptRef; + String? bookedBy; + DateTime? bookedOn; + String? confirmedBy; + DateTime? confirmedOn; + String? arrivalChangedBy; + DateTime? arrivedOn; + String? rescheduledBy; + String? rescheduledOn; + String? mRStatus; + String? mRSentBy; + String? mRSentOn; + String? mRReceiptBy; + String? mRReceiptOn; + String? isDocumentScanned; + String? documentScanDateTime; + String? documentScannedUser; + String? editedBy; + String? editedOn; + String? isRecordedByNurse; + String? isCheckedByDoctor; + String? isVisitClosed; + String? isRecurring; + String? isPersonallyConfirmed; + String? confirmationBy; + String? relationId; + int? appointmentDays; + int? isActive; + int? actualDoctorRate; + String? clinicName; + String? doctorCases; + String? doctorImageURL; + String? doctorInfo; + String? doctorName; + int? doctorRate; + String? doctorTitle; + int? gender; + String? genderDescription; + bool? isActiveDoctorProfile; + bool? isAppointmentAllowed; + bool? isDoctorAllowVedioCall; + String? nationalityFlagURL; + String? nationalityID; + String? nationalityName; + int? noOfPatientsRate; + String? projectName; + String? qR; + List? speciality; + + PatientDoctorAppointment( + {this.setupID, + this.projectID, + this.appointmentNo, + this.appointmentDate, + this.appointmentDateN, + this.appointmentType, + this.bookDate, + this.patientType, + this.patientID, + this.clinicID, + this.doctorID, + this.endDate, + this.startTime, + this.endTime, + this.status, + this.visitType, + this.visitFor, + this.patientStatusType, + this.actualVisitStartTime, + this.actualVisitEndTime, + this.isReminderActivated, + this.reminderDisplayInterval, + this.reminderDisplayIntervalUnit, + this.mainAppointmentNo, + this.notes, + this.companyID, + this.dHCCPatApptRef, + this.bookedBy, + this.bookedOn, + this.confirmedBy, + this.confirmedOn, + this.arrivalChangedBy, + this.arrivedOn, + this.rescheduledBy, + this.rescheduledOn, + this.mRStatus, + this.mRSentBy, + this.mRSentOn, + this.mRReceiptBy, + this.mRReceiptOn, + this.isDocumentScanned, + this.documentScanDateTime, + this.documentScannedUser, + this.editedBy, + this.editedOn, + this.isRecordedByNurse, + this.isCheckedByDoctor, + this.isVisitClosed, + this.isRecurring, + this.isPersonallyConfirmed, + this.confirmationBy, + this.relationId, + this.appointmentDays, + this.isActive, + this.actualDoctorRate, + this.clinicName, + this.doctorCases, + this.doctorImageURL, + this.doctorInfo, + this.doctorName, + this.doctorRate, + this.doctorTitle, + this.gender, + this.genderDescription, + this.isActiveDoctorProfile, + this.isAppointmentAllowed, + this.isDoctorAllowVedioCall, + this.nationalityFlagURL, + this.nationalityID, + this.nationalityName, + this.noOfPatientsRate, + this.projectName, + this.qR, + this.speciality}); + + PatientDoctorAppointment.fromJson(Map json) { + try { + setupID = json['SetupID']; + projectID = json['ProjectID']; + appointmentNo = json['AppointmentNo']; + appointmentDate = DateUtil.convertStringToDate(json['AppointmentDate']); + appointmentDateN = json['AppointmentDateN']; + appointmentType = json['AppointmentType']; + bookDate = DateUtil.convertStringToDate(json['BookDate']); + patientType = json['PatientType']; + patientID = json['PatientID']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + endDate = DateUtil.convertStringToDate(json['EndDate']); + startTime = json['StartTime']; + endTime = json['EndTime']; + status = json['Status']; + visitType = json['VisitType']; + visitFor = json['VisitFor']; + patientStatusType = json['PatientStatusType']; + actualVisitStartTime = json['ActualVisitStartTime']; + actualVisitEndTime = json['ActualVisitEndTime']; + isReminderActivated = json['IsReminderActivated']; + reminderDisplayInterval = json['ReminderDisplayInterval']; + reminderDisplayIntervalUnit = json['ReminderDisplayIntervalUnit']; + mainAppointmentNo = json['MainAppointmentNo']; + notes = json['Notes']; + companyID = json['CompanyID']; + dHCCPatApptRef = json['DHCCPatApptRef']; + bookedBy = json['BookedBy']; + // bookedOn = DateUtil.convertStringToDate(json['BookedOn']); + confirmedBy = json['ConfirmedBy']; + // confirmedOn = DateUtil.convertStringToDate(json['ConfirmedOn']); + arrivalChangedBy = json['ArrivalChangedBy']; + // arrivedOn = DateUtil.convertStringToDate(json['ArrivedOn']); + rescheduledBy = json['RescheduledBy']; + rescheduledOn = json['RescheduledOn']; + mRStatus = json['MRStatus']; + mRSentBy = json['MRSentBy']; + mRSentOn = json['MRSentOn']; + mRReceiptBy = json['MRReceiptBy']; + mRReceiptOn = json['MRReceiptOn']; + isDocumentScanned = json['IsDocumentScanned']; + documentScanDateTime = json['DocumentScanDateTime']; + documentScannedUser = json['DocumentScannedUser']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + isRecordedByNurse = json['IsRecordedByNurse']; + isCheckedByDoctor = json['IsCheckedByDoctor']; + isVisitClosed = json['IsVisitClosed']; + isRecurring = json['IsRecurring']; + isPersonallyConfirmed = json['IsPersonallyConfirmed']; + confirmationBy = json['ConfirmationBy']; + relationId = json['RelationId']; + appointmentDays = json['AppointmentDays']; + isActive = json['IsActive']; + actualDoctorRate = json['ActualDoctorRate']; + clinicName = json['ClinicName']; + doctorCases = json['DoctorCases']; + doctorImageURL = json['DoctorImageURL']; + doctorInfo = json['DoctorInfo']; + doctorName = json['DoctorName']; + doctorRate = json['DoctorRate']; + doctorTitle = json['DoctorTitle']; + gender = json['Gender']; + genderDescription = json['GenderDescription']; + isActiveDoctorProfile = json['IsActiveDoctorProfile']; + isAppointmentAllowed = json['IsAppointmentAllowed']; + isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; + nationalityFlagURL = json['NationalityFlagURL']; + nationalityID = json['NationalityID']; + nationalityName = json['NationalityName']; + noOfPatientsRate = json['NoOfPatientsRate']; + projectName = json['ProjectName']; + qR = json['QR']; + // speciality = json['Speciality'].cast(); + } catch (e) { + print(e); + } + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['AppointmentNo'] = this.appointmentNo; + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentDateN'] = this.appointmentDateN; + data['AppointmentType'] = this.appointmentType; + data['BookDate'] = this.bookDate; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['EndDate'] = this.endDate; + data['StartTime'] = this.startTime; + data['EndTime'] = this.endTime; + data['Status'] = this.status; + data['VisitType'] = this.visitType; + data['VisitFor'] = this.visitFor; + data['PatientStatusType'] = this.patientStatusType; + data['ActualVisitStartTime'] = this.actualVisitStartTime; + data['ActualVisitEndTime'] = this.actualVisitEndTime; + data['IsReminderActivated'] = this.isReminderActivated; + data['ReminderDisplayInterval'] = this.reminderDisplayInterval; + data['ReminderDisplayIntervalUnit'] = this.reminderDisplayIntervalUnit; + data['MainAppointmentNo'] = this.mainAppointmentNo; + data['Notes'] = this.notes; + data['CompanyID'] = this.companyID; + data['DHCCPatApptRef'] = this.dHCCPatApptRef; + data['BookedBy'] = this.bookedBy; + data['BookedOn'] = this.bookedOn; + data['ConfirmedBy'] = this.confirmedBy; + data['ConfirmedOn'] = this.confirmedOn; + data['ArrivalChangedBy'] = this.arrivalChangedBy; + data['ArrivedOn'] = this.arrivedOn; + data['RescheduledBy'] = this.rescheduledBy; + data['RescheduledOn'] = this.rescheduledOn; + data['MRStatus'] = this.mRStatus; + data['MRSentBy'] = this.mRSentBy; + data['MRSentOn'] = this.mRSentOn; + data['MRReceiptBy'] = this.mRReceiptBy; + data['MRReceiptOn'] = this.mRReceiptOn; + data['IsDocumentScanned'] = this.isDocumentScanned; + data['DocumentScanDateTime'] = this.documentScanDateTime; + data['DocumentScannedUser'] = this.documentScannedUser; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + data['IsRecordedByNurse'] = this.isRecordedByNurse; + data['IsCheckedByDoctor'] = this.isCheckedByDoctor; + data['IsVisitClosed'] = this.isVisitClosed; + data['IsRecurring'] = this.isRecurring; + data['IsPersonallyConfirmed'] = this.isPersonallyConfirmed; + data['ConfirmationBy'] = this.confirmationBy; + data['RelationId'] = this.relationId; + data['AppointmentDays'] = this.appointmentDays; + data['IsActive'] = this.isActive; + data['ActualDoctorRate'] = this.actualDoctorRate; + data['ClinicName'] = this.clinicName; + data['DoctorCases'] = this.doctorCases; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorInfo'] = this.doctorInfo; + data['DoctorName'] = this.doctorName; + data['DoctorRate'] = this.doctorRate; + data['DoctorTitle'] = this.doctorTitle; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile; + data['IsAppointmentAllowed'] = this.isAppointmentAllowed; + data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; + data['NationalityFlagURL'] = this.nationalityFlagURL; + data['NationalityID'] = this.nationalityID; + data['NationalityName'] = this.nationalityName; + data['NoOfPatientsRate'] = this.noOfPatientsRate; + data['ProjectName'] = this.projectName; + data['QR'] = this.qR; + data['Speciality'] = this.speciality; + return data; + } +} + +class PatientDoctorAppointmentList { + String? filterName = ""; + List patientDoctorAppointmentList = []; + + PatientDoctorAppointmentList({this.filterName, PatientDoctorAppointment? patientDoctorAppointment}) { + patientDoctorAppointmentList.add(patientDoctorAppointment!); + } +} diff --git a/lib/core/model/doctor/reques_patient_doctor_appointmentt.dart b/lib/core/model/doctor/reques_patient_doctor_appointmentt.dart new file mode 100644 index 00000000..883b11dc --- /dev/null +++ b/lib/core/model/doctor/reques_patient_doctor_appointmentt.dart @@ -0,0 +1,76 @@ +class RequestPatientDoctorAppointment { + int? top; + double? versionID; + int? beforeDays; + int? exludType; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? patientID; + String? tokenID; + int? patientTypeID; + int? patientType; + + RequestPatientDoctorAppointment( + {this.top, + this.versionID, + this.beforeDays, + this.exludType, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType}); + + RequestPatientDoctorAppointment.fromJson(Map json) { + top = json['Top']; + versionID = json['VersionID']; + beforeDays = json['beforeDays']; + exludType = json['exludType']; + 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']; + } + + Map toJson() { + final Map data = new Map(); + data['Top'] = this.top; + data['VersionID'] = this.versionID; + data['beforeDays'] = this.beforeDays; + data['exludType'] = this.exludType; + 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['PatientType'] = this.patientType; + return data; + } +} diff --git a/lib/core/model/doctor/request_doctor_profile.dart b/lib/core/model/doctor/request_doctor_profile.dart new file mode 100644 index 00000000..cae86c2f --- /dev/null +++ b/lib/core/model/doctor/request_doctor_profile.dart @@ -0,0 +1,72 @@ +class RequestDoctorProfile { + int? doctorID; + bool? license; + bool? isRegistered; + int? projectID; + int? clinicID; + int? patientID; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + + RequestDoctorProfile( + {this.doctorID, + this.license, + this.isRegistered, + this.projectID, + this.clinicID, + this.patientID, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID}); + + RequestDoctorProfile.fromJson(Map json) { + doctorID = json['doctorID']; + license = json['License']; + isRegistered = json['IsRegistered']; + projectID = json['ProjectID']; + clinicID = json['ClinicID']; + patientID = json['PatientID']; + 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['doctorID'] = this.doctorID; + data['License'] = this.license; + data['IsRegistered'] = this.isRegistered; + data['ProjectID'] = this.projectID; + data['ClinicID'] = this.clinicID; + data['PatientID'] = this.patientID; + 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/doctor/request_doctor_rating.dart b/lib/core/model/doctor/request_doctor_rating.dart new file mode 100644 index 00000000..ca9e82d4 --- /dev/null +++ b/lib/core/model/doctor/request_doctor_rating.dart @@ -0,0 +1,42 @@ +class RequestDoctorRating { + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? doctorID; + + RequestDoctorRating({this.versionID, this.channel, this.languageID, this.iPAdress, this.generalid, this.patientOutSA, this.sessionID, this.isDentalAllowedBackend, this.deviceTypeID, this.doctorID}); + + RequestDoctorRating.fromJson(Map json) { + 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']; + doctorID = json['DoctorID']; + } + + 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['DoctorID'] = this.doctorID; + return data; + } +} diff --git a/lib/core/model/er/AmbulanceRequestOrdersModel.dart b/lib/core/model/er/AmbulanceRequestOrdersModel.dart new file mode 100644 index 00000000..6993183c --- /dev/null +++ b/lib/core/model/er/AmbulanceRequestOrdersModel.dart @@ -0,0 +1,346 @@ +class AmbulanceRequestOrdersModel { + String? statusText; + num? paymentStatus; + dynamic clientRequestid; + dynamic paymentStatusText; + dynamic projectName; + String? nearestProjectName; + num? paymentAmount; + WFOrder? wFOrder; + String? serviceText; + bool? isSentForApproval; + num? exaCartOrderId; + String? exaCartGUID; + bool? isTimer; + num? timeSeconds; + num? totalPendingSeconds; + num? timeMinute; + num? timeHour; + num? timeTotalSeconds; + num? timeTotalMinute; + num? timeTotalHour; + dynamic approvalStatus; + bool? isActive; + num? clickButton; + dynamic orderHistory; + String? pickupLocation; + String? dropOffLocation; + String? clinicName; + String? doctorName; + String? branch; + String? time; + String? notes; + int? iD; + num? patientId; + num? patientOutSa; + bool? isOutPatient; + num? projectId; + num? nearestProjectId; + dynamic longitude; + dynamic latitude; + dynamic appointmentNo; + dynamic dischargeId; + int? statusId; + num? serviceId; + num? channel; + Orderpayment? orderpayment; + dynamic wforder; + dynamic orderapprovalobj; + String? created; + dynamic createdBy; + dynamic modified; + dynamic modifiedBy; + bool? isDeleted; + + AmbulanceRequestOrdersModel( + {this.statusText, + this.paymentStatus, + this.clientRequestid, + this.paymentStatusText, + this.projectName, + this.nearestProjectName, + this.paymentAmount, + this.wFOrder, + this.serviceText, + this.isSentForApproval, + this.exaCartOrderId, + this.exaCartGUID, + this.isTimer, + this.timeSeconds, + this.totalPendingSeconds, + this.timeMinute, + this.timeHour, + this.timeTotalSeconds, + this.timeTotalMinute, + this.timeTotalHour, + this.approvalStatus, + this.isActive, + this.clickButton, + this.orderHistory, + this.pickupLocation, + this.dropOffLocation, + this.clinicName, + this.doctorName, + this.branch, + this.time, + this.notes, + this.iD, + this.patientId, + this.patientOutSa, + this.isOutPatient, + this.projectId, + this.nearestProjectId, + this.longitude, + this.latitude, + this.appointmentNo, + this.dischargeId, + this.statusId, + this.serviceId, + this.channel, + this.orderpayment, + this.wforder, + this.orderapprovalobj, + this.created, + this.createdBy, + this.modified, + this.modifiedBy, + this.isDeleted}); + + AmbulanceRequestOrdersModel.fromJson(Map json) { + statusText = json['StatusText']; + paymentStatus = json['PaymentStatus']; + clientRequestid = json['ClientRequestid']; + paymentStatusText = json['PaymentStatusText']; + projectName = json['ProjectName']; + nearestProjectName = json['NearestProjectName']; + paymentAmount = json['PaymentAmount']; + wFOrder = json['WF_order'] != null + ? new WFOrder.fromJson(json['WF_order']) + : null; + serviceText = json['ServiceText']; + isSentForApproval = json['isSentForApproval']; + exaCartOrderId = json['ExaCart_OrderId']; + exaCartGUID = json['ExaCart_GUID']; + isTimer = json['isTimer']; + timeSeconds = json['TimeSeconds']; + totalPendingSeconds = json['TotalPendingSeconds']; + timeMinute = json['TimeMinute']; + timeHour = json['TimeHour']; + timeTotalSeconds = json['TimeTotalSeconds']; + timeTotalMinute = json['TimeTotalMinute']; + timeTotalHour = json['TimeTotalHour']; + approvalStatus = json['ApprovalStatus']; + isActive = json['isActive']; + clickButton = json['ClickButton']; + orderHistory = json['OrderHistory']; + pickupLocation = json['PickupLocation']; + dropOffLocation = json['DropOffLocation']; + clinicName = json['clinicName']; + doctorName = json['DoctorName']; + branch = json['Branch']; + time = json['Time']; + notes = json['Notes']; + iD = json['ID']; + patientId = json['PatientId']; + patientOutSa = json['PatientOutSa']; + isOutPatient = json['IsOutPatient']; + projectId = json['ProjectId']; + nearestProjectId = json['NearestProjectId']; + longitude = json['Longitude']; + latitude = json['Latitude']; + appointmentNo = json['AppointmentNo']; + dischargeId = json['DischargeId']; + statusId = json['StatusId']; + serviceId = json['ServiceId']; + channel = json['Channel']; + orderpayment = json['orderpayment'] != null + ? new Orderpayment.fromJson(json['orderpayment']) + : null; + wforder = json['wforder']; + orderapprovalobj = json['orderapprovalobj']; + created = json['Created']; + createdBy = json['CreatedBy']; + modified = json['Modified']; + modifiedBy = json['ModifiedBy']; + isDeleted = json['IsDeleted']; + } + + Map toJson() { + final Map data = new Map(); + data['StatusText'] = this.statusText; + data['PaymentStatus'] = this.paymentStatus; + data['ClientRequestid'] = this.clientRequestid; + data['PaymentStatusText'] = this.paymentStatusText; + data['ProjectName'] = this.projectName; + data['NearestProjectName'] = this.nearestProjectName; + data['PaymentAmount'] = this.paymentAmount; + if (this.wFOrder != null) { + data['WF_order'] = this.wFOrder!.toJson(); + } + data['ServiceText'] = this.serviceText; + data['isSentForApproval'] = this.isSentForApproval; + data['ExaCart_OrderId'] = this.exaCartOrderId; + data['ExaCart_GUID'] = this.exaCartGUID; + data['isTimer'] = this.isTimer; + data['TimeSeconds'] = this.timeSeconds; + data['TotalPendingSeconds'] = this.totalPendingSeconds; + data['TimeMinute'] = this.timeMinute; + data['TimeHour'] = this.timeHour; + data['TimeTotalSeconds'] = this.timeTotalSeconds; + data['TimeTotalMinute'] = this.timeTotalMinute; + data['TimeTotalHour'] = this.timeTotalHour; + data['ApprovalStatus'] = this.approvalStatus; + data['isActive'] = this.isActive; + data['ClickButton'] = this.clickButton; + data['OrderHistory'] = this.orderHistory; + data['PickupLocation'] = this.pickupLocation; + data['DropOffLocation'] = this.dropOffLocation; + data['clinicName'] = this.clinicName; + data['DoctorName'] = this.doctorName; + data['Branch'] = this.branch; + data['Time'] = this.time; + data['Notes'] = this.notes; + data['ID'] = this.iD; + data['PatientId'] = this.patientId; + data['PatientOutSa'] = this.patientOutSa; + data['IsOutPatient'] = this.isOutPatient; + data['ProjectId'] = this.projectId; + data['NearestProjectId'] = this.nearestProjectId; + data['Longitude'] = this.longitude; + data['Latitude'] = this.latitude; + data['AppointmentNo'] = this.appointmentNo; + data['DischargeId'] = this.dischargeId; + data['StatusId'] = this.statusId; + data['ServiceId'] = this.serviceId; + data['Channel'] = this.channel; + if (this.orderpayment != null) { + data['orderpayment'] = this.orderpayment!.toJson(); + } + data['wforder'] = this.wforder; + data['orderapprovalobj'] = this.orderapprovalobj; + data['Created'] = this.created; + data['CreatedBy'] = this.createdBy; + data['Modified'] = this.modified; + data['ModifiedBy'] = this.modifiedBy; + data['IsDeleted'] = this.isDeleted; + return data; + } +} + +class WFOrder { + dynamic wfButtonsDTO; + num? iD; + num? orderId; + num? previousStep; + num? nextStep; + num? serviceId; + dynamic order; + String? created; + dynamic createdBy; + dynamic modified; + dynamic modifiedBy; + bool? isDeleted; + + WFOrder( + {this.wfButtonsDTO, + this.iD, + this.orderId, + this.previousStep, + this.nextStep, + this.serviceId, + this.order, + this.created, + this.createdBy, + this.modified, + this.modifiedBy, + this.isDeleted}); + + WFOrder.fromJson(Map json) { + wfButtonsDTO = json['wf_ButtonsDTO']; + iD = json['ID']; + orderId = json['OrderId']; + previousStep = json['PreviousStep']; + nextStep = json['NextStep']; + serviceId = json['ServiceId']; + order = json['Order']; + created = json['Created']; + createdBy = json['CreatedBy']; + modified = json['Modified']; + modifiedBy = json['ModifiedBy']; + isDeleted = json['IsDeleted']; + } + + Map toJson() { + final Map data = new Map(); + data['wf_ButtonsDTO'] = this.wfButtonsDTO; + data['ID'] = this.iD; + data['OrderId'] = this.orderId; + data['PreviousStep'] = this.previousStep; + data['NextStep'] = this.nextStep; + data['ServiceId'] = this.serviceId; + data['Order'] = this.order; + data['Created'] = this.created; + data['CreatedBy'] = this.createdBy; + data['Modified'] = this.modified; + data['ModifiedBy'] = this.modifiedBy; + data['IsDeleted'] = this.isDeleted; + return data; + } +} + +class Orderpayment { + num? iD; + num? orderId; + dynamic clientRequestId; + num? totalAmount; + num? paymentStatus; + dynamic order; + String? created; + dynamic createdBy; + dynamic modified; + dynamic modifiedBy; + bool? isDeleted; + + Orderpayment( + {this.iD, + this.orderId, + this.clientRequestId, + this.totalAmount, + this.paymentStatus, + this.order, + this.created, + this.createdBy, + this.modified, + this.modifiedBy, + this.isDeleted}); + + Orderpayment.fromJson(Map json) { + iD = json['ID']; + orderId = json['OrderId']; + clientRequestId = json['ClientRequestId']; + totalAmount = json['TotalAmount']; + paymentStatus = json['PaymentStatus']; + order = json['Order']; + created = json['Created']; + createdBy = json['CreatedBy']; + modified = json['Modified']; + modifiedBy = json['ModifiedBy']; + isDeleted = json['IsDeleted']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['OrderId'] = this.orderId; + data['ClientRequestId'] = this.clientRequestId; + data['TotalAmount'] = this.totalAmount; + data['PaymentStatus'] = this.paymentStatus; + data['Order'] = this.order; + data['Created'] = this.created; + data['CreatedBy'] = this.createdBy; + data['Modified'] = this.modified; + data['ModifiedBy'] = this.modifiedBy; + data['IsDeleted'] = this.isDeleted; + return data; + } +} diff --git a/lib/core/model/er/ErPatientShareModel.dart b/lib/core/model/er/ErPatientShareModel.dart new file mode 100644 index 00000000..cf07be7b --- /dev/null +++ b/lib/core/model/er/ErPatientShareModel.dart @@ -0,0 +1,92 @@ +class ErPatientShareModel { + int? cashPrice; + int? cashPriceTax; + int? cashPriceWithTax; + int? companyId; + String? companyName; + int? companyShareWithTax; + dynamic errCode; + int? groupID; + dynamic insurancePolicyNo; + String? message; + dynamic patientCardID; + num? patientShare; + num? patientShareWithTax; + num? patientTaxAmount; + int? policyId; + String? policyName; + String? procedureName; + dynamic setupID; + int? statusCode; + dynamic subPolicyNo; + + ErPatientShareModel( + {this.cashPrice, + this.cashPriceTax, + this.cashPriceWithTax, + this.companyId, + this.companyName, + this.companyShareWithTax, + this.errCode, + this.groupID, + this.insurancePolicyNo, + this.message, + this.patientCardID, + this.patientShare, + this.patientShareWithTax, + this.patientTaxAmount, + this.policyId, + this.policyName, + this.procedureName, + this.setupID, + this.statusCode, + this.subPolicyNo}); + + ErPatientShareModel.fromJson(Map json) { + cashPrice = json['CashPrice']; + cashPriceTax = json['CashPriceTax']; + cashPriceWithTax = json['CashPriceWithTax']; + companyId = json['CompanyId']; + companyName = json['CompanyName']; + companyShareWithTax = json['CompanyShareWithTax']; + errCode = json['ErrCode']; + groupID = json['GroupID']; + insurancePolicyNo = json['InsurancePolicyNo']; + message = json['Message']; + patientCardID = json['PatientCardID']; + patientShare = json['PatientShare']; + patientShareWithTax = json['PatientShareWithTax']; + patientTaxAmount = json['PatientTaxAmount']; + policyId = json['PolicyId']; + policyName = json['PolicyName']; + procedureName = json['ProcedureName']; + setupID = json['SetupID']; + statusCode = json['StatusCode']; + subPolicyNo = json['SubPolicyNo']; + } + + Map toJson() { + final Map data = new Map(); + data['CashPrice'] = this.cashPrice; + data['CashPriceTax'] = this.cashPriceTax; + data['CashPriceWithTax'] = this.cashPriceWithTax; + data['CompanyId'] = this.companyId; + data['CompanyName'] = this.companyName; + data['CompanyShareWithTax'] = this.companyShareWithTax; + data['ErrCode'] = this.errCode; + data['GroupID'] = this.groupID; + data['InsurancePolicyNo'] = this.insurancePolicyNo; + data['Message'] = this.message; + data['PatientCardID'] = this.patientCardID; + data['PatientShare'] = this.patientShare; + data['PatientShareWithTax'] = this.patientShareWithTax; + data['PatientTaxAmount'] = this.patientTaxAmount; + data['PolicyId'] = this.policyId; + data['PolicyName'] = this.policyName; + data['ProcedureName'] = this.procedureName; + data['SetupID'] = this.setupID; + data['StatusCode'] = this.statusCode; + data['SubPolicyNo'] = this.subPolicyNo; + return data; + } +} diff --git a/lib/core/model/er/PatientAllPresOrders.dart b/lib/core/model/er/PatientAllPresOrders.dart new file mode 100644 index 00000000..59d184d3 --- /dev/null +++ b/lib/core/model/er/PatientAllPresOrders.dart @@ -0,0 +1,132 @@ +class PatientAllPresOrders { + int? iD; + String? patientID; + bool? patientOutSA; + bool? isOutPatient; + int? projectID; + int? nearestProjectID; + double? longitude; + double? latitude; + String? appointmentNo; + String? dischargeID; + int? lineItemNo; + int? status; + String? description; + String? descriptionN; + String? createdOn; + int? serviceID; + int? createdBy; + String? editedOn; + int? editedBy; + int? channel; + dynamic clientRequestID; + bool? returnedToQueue; + dynamic pickupDateTime; + dynamic pickupLocationName; + dynamic dropoffLocationName; + int? realRRTHaveTransactions; + String? nearestProjectDescription; + String? nearestProjectDescriptionN; + String? projectDescription; + String? projectDescriptionN; + + PatientAllPresOrders( + {this.iD, + this.patientID, + this.patientOutSA, + this.isOutPatient, + this.projectID, + this.nearestProjectID, + this.longitude, + this.latitude, + this.appointmentNo, + this.dischargeID, + this.lineItemNo, + this.status, + this.description, + this.descriptionN, + this.createdOn, + this.serviceID, + this.createdBy, + this.editedOn, + this.editedBy, + this.channel, + this.clientRequestID, + this.returnedToQueue, + this.pickupDateTime, + this.pickupLocationName, + this.dropoffLocationName, + this.realRRTHaveTransactions, + this.nearestProjectDescription, + this.nearestProjectDescriptionN, + this.projectDescription, + this.projectDescriptionN}); + + PatientAllPresOrders.fromJson(Map json) { + iD = json['ID']; + patientID = json['PatientID']; + patientOutSA = json['PatientOutSA']; + isOutPatient = json['IsOutPatient']; + projectID = json['ProjectID']; + nearestProjectID = json['NearestProjectID']; + longitude = json['Longitude']; + latitude = json['Latitude']; + appointmentNo = json['AppointmentNo']; + dischargeID = json['DischargeID']; + lineItemNo = json['LineItemNo']; + status = json['Status']; + description = json['Description']; + descriptionN = json['DescriptionN']; + createdOn = json['CreatedOn']; + serviceID = json['ServiceID']; + createdBy = json['CreatedBy']; + editedOn = json['EditedOn']; + editedBy = json['EditedBy']; + channel = json['Channel']; + clientRequestID = json['ClientRequestID']; + returnedToQueue = json['ReturnedToQueue']; + pickupDateTime = json['PickupDateTime']; + pickupLocationName = json['PickupLocationName']; + dropoffLocationName = json['DropoffLocationName']; + realRRTHaveTransactions = json['RealRRT_HaveTransactions']; + nearestProjectDescription = json['NearestProjectDescription']; + nearestProjectDescriptionN = json['NearestProjectDescriptionN']; + projectDescription = json['ProjectDescription']; + projectDescriptionN = json['ProjectDescriptionN']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['PatientID'] = this.patientID; + data['PatientOutSA'] = this.patientOutSA; + data['IsOutPatient'] = this.isOutPatient; + data['ProjectID'] = this.projectID; + data['NearestProjectID'] = this.nearestProjectID; + data['Longitude'] = this.longitude; + data['Latitude'] = this.latitude; + data['AppointmentNo'] = this.appointmentNo; + data['DischargeID'] = this.dischargeID; + data['LineItemNo'] = this.lineItemNo; + data['Status'] = this.status; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + data['CreatedOn'] = this.createdOn; + data['ServiceID'] = this.serviceID; + data['CreatedBy'] = this.createdBy; + data['EditedOn'] = this.editedOn; + data['EditedBy'] = this.editedBy; + data['Channel'] = this.channel; + data['ClientRequestID'] = this.clientRequestID; + data['ReturnedToQueue'] = this.returnedToQueue; + data['PickupDateTime'] = this.pickupDateTime; + data['PickupLocationName'] = this.pickupLocationName; + data['DropoffLocationName'] = this.dropoffLocationName; + data['RealRRT_HaveTransactions'] = this.realRRTHaveTransactions; + data['NearestProjectDescription'] = this.nearestProjectDescription; + data['NearestProjectDescriptionN'] = this.nearestProjectDescriptionN; + data['ProjectDescription'] = this.projectDescription; + data['ProjectDescriptionN'] = this.projectDescriptionN; + return data; + } +} diff --git a/lib/core/model/er/PatientER.dart b/lib/core/model/er/PatientER.dart new file mode 100644 index 00000000..f8248956 --- /dev/null +++ b/lib/core/model/er/PatientER.dart @@ -0,0 +1,207 @@ +import 'package:diplomaticquarterapp/core/enum/Ambulate.dart'; + +import 'get_all_transportation_method_list_model.dart'; + +class PatientER { + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + dynamic patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? patientID; + String? tokenID; + int? patientTypeID; + int? patientType; + int? orderServiceID; + String? patientIdentificationID; + int? direction; + bool? haveAppointment; + int? tripType; + int? pickupUrgency; + int? pickupSpot; + String? pickupDateTime; + int? transportationMethodId; + int? selectedAmbulate; + String? requesterNote; + int? requesterFileNo; + String? requesterMobileNo; + bool? requesterIsOutSA; + int? isOutPatient; + String? pickupLocationName; + String? dropoffLocationName; + int? projectID; + int? createdBy; + int? lineItemNo; + double? cost; + double? vAT; + double? totalPrice; + String? pickupLocationLattitude; + String? pickupLocationLongitude; + String? dropoffLocationLattitude; + String? dropoffLocationLongitude; + String? latitude; + String? longitude; + String? appointmentNo; + dynamic appointmentClinicName; + dynamic appointmentDoctorName; + dynamic appointmentBranch; + dynamic appointmentTime; + PatientERTransportationMethod? patientERTransportationMethod; + Ambulate? ambulate; + PatientER( + {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.orderServiceID = 4, + this.patientIdentificationID, + this.direction, + this.haveAppointment, + this.tripType, + this.pickupUrgency, + this.pickupSpot, + this.pickupDateTime, + this.transportationMethodId, + this.selectedAmbulate, + this.requesterNote, + this.requesterFileNo, + this.requesterMobileNo, + this.requesterIsOutSA, + this.isOutPatient, + this.pickupLocationName, + this.dropoffLocationName, + this.projectID, + this.createdBy, + this.lineItemNo, + this.cost, + this.vAT, + this.totalPrice, + this.pickupLocationLattitude, + this.pickupLocationLongitude, + this.dropoffLocationLattitude, + this.dropoffLocationLongitude, + this.latitude, + this.longitude, + this.appointmentNo, + this.appointmentClinicName, + this.appointmentDoctorName, + this.appointmentBranch, + this.appointmentTime, + this.patientERTransportationMethod, + this.ambulate}); + + PatientER.fromJson(Map json) { + 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']; + orderServiceID = json['OrderServiceID']; + patientIdentificationID = json['PatientIdentificationID']; + direction = json['Direction']; + haveAppointment = json['HaveAppointment']; + tripType = json['TripType']; + pickupUrgency = json['PickupUrgency']; + pickupSpot = json['PickupSpot']; + pickupDateTime = json['PickupDateTime']; + transportationMethodId = json['TransportationMethodId']; + selectedAmbulate = json['SelectedAmbulate']; + requesterNote = json['RequesterNote']; + requesterFileNo = json['RequesterFileNo']; + requesterMobileNo = json['RequesterMobileNo']; + requesterIsOutSA = json['RequesterIsOutSA']; + isOutPatient = json['IsOutPatient']; + pickupLocationName = json['PickupLocationName']; + dropoffLocationName = json['DropoffLocationName']; + projectID = json['ProjectID']; + createdBy = json['CreatedBy']; + lineItemNo = json['LineItemNo']; + cost = json['Cost']; + vAT = json['VAT']; + totalPrice = json['TotalPrice']; + pickupLocationLattitude = json['PickupLocationLattitude']; + pickupLocationLongitude = json['PickupLocationLongitude']; + dropoffLocationLattitude = json['DropoffLocationLattitude']; + dropoffLocationLongitude = json['DropoffLocationLongitude']; + latitude = json['Latitude']; + longitude = json['Longitude']; + appointmentNo = json['AppointmentNo']; + appointmentClinicName = json['AppointmentClinicName']; + appointmentDoctorName = json['AppointmentDoctorName']; + appointmentBranch = json['AppointmentBranch']; + appointmentTime = json['AppointmentTime']; + } + + 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.toString(); + data['TokenID'] = this.tokenID; + data['PatientTypeID'] = this.patientTypeID; + data['PatientType'] = this.patientType; + data['OrderServiceID'] = this.orderServiceID; + data['PatientIdentificationID'] = this.patientIdentificationID; + data['Direction'] = this.direction; + data['HaveAppointment'] = this.haveAppointment; + data['TripType'] = this.tripType; + data['PickupUrgency'] = this.pickupUrgency; + data['PickupSpot'] = this.pickupSpot; + data['PickupDateTime'] = this.pickupDateTime; + data['TransportationMethodId'] = this.transportationMethodId; + data['SelectedAmbulate'] = this.selectedAmbulate; + data['RequesterNote'] = this.requesterNote; + data['RequesterFileNo'] = this.requesterFileNo; + data['RequesterMobileNo'] = this.requesterMobileNo; + data['RequesterIsOutSA'] = this.requesterIsOutSA; + data['IsOutPatient'] = this.isOutPatient; + data['PickupLocationName'] = this.pickupLocationName; + data['DropoffLocationName'] = this.dropoffLocationName; + data['ProjectID'] = this.projectID; + data['CreatedBy'] = this.createdBy; + data['LineItemNo'] = this.lineItemNo; + data['Cost'] = this.cost; + data['VAT'] = this.vAT; + data['TotalPrice'] = this.totalPrice; + data['PickupLocationLattitude'] = this.pickupLocationLattitude; + data['PickupLocationLongitude'] = this.pickupLocationLongitude; + data['DropoffLocationLattitude'] = this.dropoffLocationLattitude; + data['DropoffLocationLongitude'] = this.dropoffLocationLongitude; + data['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + data['AppointmentNo'] = this.appointmentNo; + data['AppointmentClinicName'] = this.appointmentClinicName; + data['AppointmentDoctorName'] = this.appointmentDoctorName; + data['AppointmentBranch'] = this.appointmentBranch; + data['AppointmentTime'] = this.appointmentTime; + return data; + } +} diff --git a/lib/core/model/er/PatientER_RC.dart b/lib/core/model/er/PatientER_RC.dart new file mode 100644 index 00000000..cd4d8d5d --- /dev/null +++ b/lib/core/model/er/PatientER_RC.dart @@ -0,0 +1,204 @@ +import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; + +class PatientER_RC { + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + bool? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? patientID; + String? tokenID; + int? patientTypeID; + int? patientType; + int? orderServiceID; + String? patientIdentificationID; + dynamic patientOutSa; + int? projectID; + int? lineItemNo; + TransportationDetails? transportationDetails; + PatientERTransportationMethod? patientERTransportationMethod; + + PatientER_RC( + {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.orderServiceID, + this.patientIdentificationID, + this.patientOutSa, + this.projectID, + this.lineItemNo, + this.transportationDetails}); + + PatientER_RC.fromJson(Map json) { + 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']; + orderServiceID = json['OrderServiceID']; + patientIdentificationID = json['PatientIdentificationID']; + patientOutSa = json['patientOutSa']; + projectID = json['projectID']; + lineItemNo = json['lineItemNo']; + transportationDetails = json['transportationDetails'] != null + ? new TransportationDetails.fromJson(json['transportationDetails']) + : null; + } + + 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['PatientType'] = this.patientType; + data['OrderServiceID'] = this.orderServiceID; + data['PatientIdentificationID'] = this.patientIdentificationID; + data['patientOutSa'] = this.patientOutSa; + data['projectID'] = this.projectID; + data['lineItemNo'] = this.lineItemNo; + if (this.transportationDetails != null) { + data['transportationDetails'] = this.transportationDetails!.toJson(); + } + return data; + } +} + +class TransportationDetails { + int? direction; + int? haveAppointment; + int? tripType; + int? pickupUrgency; + int? pickupSpot; + String? pickupDateTime; + String? transportationType; + int? ambulate; + String? ambulateTitle; + String? notes; + int? requesterFileNo; + String? requesterMobileNo; + bool? requesterIsOutSA; + String? pickupLocationName; + String? dropoffLocationName; + String? pickupLatitude; + String? pickupLongitude; + String? dropoffLatitude; + String? dropoffLongitude; + String? appointmentNo; + String? appointmentClinicName; + String? appointmentDoctorName; + String? appointmentBranch; + String? appointmentTime; + + TransportationDetails( + {this.direction, + this.haveAppointment, + this.tripType, + this.pickupUrgency, + this.pickupSpot, + this.pickupDateTime, + this.transportationType, + this.ambulate, + this.ambulateTitle, + this.notes, + this.requesterFileNo, + this.requesterMobileNo, + this.requesterIsOutSA, + this.pickupLocationName, + this.dropoffLocationName, + this.pickupLatitude, + this.pickupLongitude, + this.dropoffLatitude, + this.dropoffLongitude, + this.appointmentNo, + this.appointmentClinicName, + this.appointmentDoctorName, + this.appointmentBranch, + this.appointmentTime}); + + TransportationDetails.fromJson(Map json) { + direction = json['direction']; + haveAppointment = json['haveAppointment']; + tripType = json['tripType']; + pickupUrgency = json['pickupUrgency']; + pickupSpot = json['pickupSpot']; + pickupDateTime = json['pickupDateTime']; + transportationType = json['transportationType']; + ambulate = json['ambulate']; + ambulateTitle = ""; + notes = json['notes']; + requesterFileNo = json['requesterFileNo']; + requesterMobileNo = json['requesterMobileNo']; + requesterIsOutSA = json['requesterIsOutSA']; + pickupLocationName = json['pickupLocationName']; + dropoffLocationName = json['dropoffLocationName']; + pickupLatitude = json['pickup_Latitude']; + pickupLongitude = json['pickup_Longitude']; + dropoffLatitude = json['dropoff_Latitude']; + dropoffLongitude = json['dropoff_Longitude']; + appointmentNo = json['appointmentNo']; + appointmentClinicName = json['appointmentClinicName']; + appointmentDoctorName = json['appointmentDoctorName']; + appointmentBranch = json['appointmentBranch']; + appointmentTime = json['appointmentTime']; + } + + Map toJson() { + final Map data = new Map(); + data['direction'] = this.direction; + data['haveAppointment'] = this.haveAppointment; + data['tripType'] = this.tripType; + data['pickupUrgency'] = this.pickupUrgency; + data['pickupSpot'] = this.pickupSpot; + data['pickupDateTime'] = this.pickupDateTime; + data['transportationType'] = this.transportationType; + data['ambulate'] = this.ambulate; + data['ambulateTitle'] = this.ambulateTitle; + data['notes'] = this.notes; + data['requesterFileNo'] = this.requesterFileNo; + data['requesterMobileNo'] = this.requesterMobileNo; + data['requesterIsOutSA'] = this.requesterIsOutSA; + data['pickupLocationName'] = this.pickupLocationName; + data['dropoffLocationName'] = this.dropoffLocationName; + data['pickup_Latitude'] = this.pickupLatitude; + data['pickup_Longitude'] = this.pickupLongitude; + data['dropoff_Latitude'] = this.dropoffLatitude; + data['dropoff_Longitude'] = this.dropoffLongitude; + data['appointmentNo'] = this.appointmentNo; + data['appointmentClinicName'] = this.appointmentClinicName; + data['appointmentDoctorName'] = this.appointmentDoctorName; + data['appointmentBranch'] = this.appointmentBranch; + data['appointmentTime'] = this.appointmentTime; + return data; + } +} diff --git a/lib/core/model/er/PickUpRequestPresOrder.dart b/lib/core/model/er/PickUpRequestPresOrder.dart new file mode 100644 index 00000000..75f39ea4 --- /dev/null +++ b/lib/core/model/er/PickUpRequestPresOrder.dart @@ -0,0 +1,204 @@ +class PickUpRequestPresOrder { + int? id; + int? presOrderID; + String? createDate; + String? lastEditDate; + int? createdBy; + int? lastEditBy; + bool? isActive; + String? requestNo; + int? requesterId; + int? direction; + bool? haveAppointment; + dynamic appointmentId; + int? tripType; + int? pickupUrgency; + String? pickupDateTime; + dynamic pickupLocationId; + int? pickupSpot; + dynamic dropoffLocationId; + int? transportationMethodId; + dynamic cost; + dynamic vAT; + double? totalPrice; + int? amountCollected; + int? selectedAmbulate; + String? requesterNote; + int? status; + int? paymentStatus; + dynamic rejectReason; + int? visibility; + dynamic durationId; + dynamic imageId; + String? requesterFileNo; + String? requesterMobileNo; + bool? requesterIsOutSA; + String? pickupLocationLongitude; + String? pickupLocationLattitude; + String? dropoffLocationLongitude; + String? dropoffLocationLattitude; + dynamic appointmentClinicName; + dynamic appointmentDoctorName; + dynamic appointmentBranch; + dynamic appointmentTime; + String? pickupLocationName; + String? dropoffLocationName; + String? title; + String? titleAR; + String? ambulateDescription; + String? ambulateDescriptionN; + + PickUpRequestPresOrder( + {this.id, + this.presOrderID, + this.createDate, + this.lastEditDate, + this.createdBy, + this.lastEditBy, + this.isActive, + this.requestNo, + this.requesterId, + this.direction, + this.haveAppointment, + this.appointmentId, + this.tripType, + this.pickupUrgency, + this.pickupDateTime, + this.pickupLocationId, + this.pickupSpot, + this.dropoffLocationId, + this.transportationMethodId, + this.cost, + this.vAT, + this.totalPrice, + this.amountCollected, + this.selectedAmbulate, + this.requesterNote, + this.status, + this.paymentStatus, + this.rejectReason, + this.visibility, + this.durationId, + this.imageId, + this.requesterFileNo, + this.requesterMobileNo, + this.requesterIsOutSA, + this.pickupLocationLongitude, + this.pickupLocationLattitude, + this.dropoffLocationLongitude, + this.dropoffLocationLattitude, + this.appointmentClinicName, + this.appointmentDoctorName, + this.appointmentBranch, + this.appointmentTime, + this.pickupLocationName, + this.dropoffLocationName, + this.title, + this.titleAR, + this.ambulateDescription, + this.ambulateDescriptionN}); + + PickUpRequestPresOrder.fromJson(Map json) { + id = json['Id']; + presOrderID = json['PresOrderID']; + createDate = json['CreateDate']; + lastEditDate = json['LastEditDate']; + createdBy = json['CreatedBy']; + lastEditBy = json['LastEditBy']; + isActive = json['IsActive']; + requestNo = json['RequestNo']; + requesterId = json['RequesterId']; + direction = json['Direction']; + haveAppointment = json['HaveAppointment']; + appointmentId = json['AppointmentId']; + tripType = json['TripType']; + pickupUrgency = json['PickupUrgency']; + pickupDateTime = json['PickupDateTime']; + pickupLocationId = json['PickupLocationId']; + pickupSpot = json['PickupSpot']; + dropoffLocationId = json['DropoffLocationId']; + transportationMethodId = json['TransportationMethodId']; + cost = json['Cost']; + vAT = json['VAT']; + totalPrice = json['TotalPrice']; + amountCollected = json['AmountCollected']; + selectedAmbulate = json['SelectedAmbulate']; + requesterNote = json['RequesterNote']; + status = json['Status']; + paymentStatus = json['PaymentStatus']; + rejectReason = json['RejectReason']; + visibility = json['Visibility']; + durationId = json['DurationId']; + imageId = json['ImageId']; + requesterFileNo = json['RequesterFileNo']; + requesterMobileNo = json['RequesterMobileNo']; + requesterIsOutSA = json['RequesterIsOutSA']; + pickupLocationLongitude = json['PickupLocationLongitude']; + pickupLocationLattitude = json['PickupLocationLattitude']; + dropoffLocationLongitude = json['DropoffLocationLongitude']; + dropoffLocationLattitude = json['DropoffLocationLattitude']; + appointmentClinicName = json['AppointmentClinicName']; + appointmentDoctorName = json['AppointmentDoctorName']; + appointmentBranch = json['AppointmentBranch']; + appointmentTime = json['AppointmentTime']; + pickupLocationName = json['PickupLocationName']; + dropoffLocationName = json['DropoffLocationName']; + title = json['Title']; + titleAR = json['TitleAR']; + ambulateDescription = json['AmbulateDescription']; + ambulateDescriptionN = json['AmbulateDescriptionN']; + } + + Map toJson() { + final Map data = new Map(); + data['Id'] = this.id; + data['PresOrderID'] = this.presOrderID; + data['CreateDate'] = this.createDate; + data['LastEditDate'] = this.lastEditDate; + data['CreatedBy'] = this.createdBy; + data['LastEditBy'] = this.lastEditBy; + data['IsActive'] = this.isActive; + data['RequestNo'] = this.requestNo; + data['RequesterId'] = this.requesterId; + data['Direction'] = this.direction; + data['HaveAppointment'] = this.haveAppointment; + data['AppointmentId'] = this.appointmentId; + data['TripType'] = this.tripType; + data['PickupUrgency'] = this.pickupUrgency; + data['PickupDateTime'] = this.pickupDateTime; + data['PickupLocationId'] = this.pickupLocationId; + data['PickupSpot'] = this.pickupSpot; + data['DropoffLocationId'] = this.dropoffLocationId; + data['TransportationMethodId'] = this.transportationMethodId; + data['Cost'] = this.cost; + data['VAT'] = this.vAT; + data['TotalPrice'] = this.totalPrice; + data['AmountCollected'] = this.amountCollected; + data['SelectedAmbulate'] = this.selectedAmbulate; + data['RequesterNote'] = this.requesterNote; + data['Status'] = this.status; + data['PaymentStatus'] = this.paymentStatus; + data['RejectReason'] = this.rejectReason; + data['Visibility'] = this.visibility; + data['DurationId'] = this.durationId; + data['ImageId'] = this.imageId; + data['RequesterFileNo'] = this.requesterFileNo; + data['RequesterMobileNo'] = this.requesterMobileNo; + data['RequesterIsOutSA'] = this.requesterIsOutSA; + data['PickupLocationLongitude'] = this.pickupLocationLongitude; + data['PickupLocationLattitude'] = this.pickupLocationLattitude; + data['DropoffLocationLongitude'] = this.dropoffLocationLongitude; + data['DropoffLocationLattitude'] = this.dropoffLocationLattitude; + data['AppointmentClinicName'] = this.appointmentClinicName; + data['AppointmentDoctorName'] = this.appointmentDoctorName; + data['AppointmentBranch'] = this.appointmentBranch; + data['AppointmentTime'] = this.appointmentTime; + data['PickupLocationName'] = this.pickupLocationName; + data['DropoffLocationName'] = this.dropoffLocationName; + data['Title'] = this.title; + data['TitleAR'] = this.titleAR; + data['AmbulateDescription'] = this.ambulateDescription; + data['AmbulateDescriptionN'] = this.ambulateDescriptionN; + return data; + } +} diff --git a/lib/core/model/er/TriageInformationRequest.dart b/lib/core/model/er/TriageInformationRequest.dart new file mode 100644 index 00000000..53d4bfb0 --- /dev/null +++ b/lib/core/model/er/TriageInformationRequest.dart @@ -0,0 +1,136 @@ +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; + +class TriageInformationRequest { + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? sessionID; + int? patientID; + String? tokenID; + String? generalid; + int? patientOutSA; + int? patientTypeID; + int? patientType; + int? projectID; + ERTriageInformation? eRTriageInformation; + HospitalsModel? selectedHospital; + + TriageInformationRequest( + {this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.sessionID, + this.patientID, + this.tokenID, + this.generalid, + this.patientOutSA, + this.patientTypeID, + this.patientType, + this.projectID, + this.eRTriageInformation, + this.selectedHospital}); + + TriageInformationRequest.fromJson(Map json) { + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + sessionID = json['SessionID']; + patientID = json['PatientID']; + tokenID = json['TokenID']; + generalid = json['generalid']; + patientOutSA = json['PatientOutSA']; + patientTypeID = json['PatientTypeID']; + patientType = json['PatientType']; + projectID = json['ProjectID']; + eRTriageInformation = json['ERTriageInformation'] != null ? new ERTriageInformation.fromJson(json['ERTriageInformation']) : null; + } + + Map toJson() { + final Map data = new Map(); + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['SessionID'] = this.sessionID; + data['PatientID'] = this.patientID; + data['TokenID'] = this.tokenID; + data['generalid'] = this.generalid; + data['PatientOutSA'] = this.patientOutSA; + data['PatientTypeID'] = this.patientTypeID; + data['PatientType'] = this.patientType; + data['ProjectID'] = this.projectID; + if (this.eRTriageInformation != null) { + data['ERTriageInformation'] = this.eRTriageInformation!.toJson(); + } + return data; + } +} + +class ERTriageInformation { + String? notes; + String? chiefComplaint; + int? patientId; + int? projectId; + int? riskScore; + List? checklist; + + ERTriageInformation({this.notes, this.chiefComplaint, this.patientId, this.projectId, this.riskScore, this.checklist}); + + ERTriageInformation.fromJson(Map json) { + notes = json['Notes']; + chiefComplaint = json['ChiefComplaint']; + patientId = json['PatientId']; + projectId = json['ProjectId']; + riskScore = json['RiskScore']; + if (json['checklist'] != null) { + checklist = []; + json['checklist'].forEach((v) { + checklist!.add(new Checklist.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + data['Notes'] = this.notes; + data['ChiefComplaint'] = this.chiefComplaint; + data['PatientId'] = this.patientId; + data['ProjectId'] = this.projectId; + data['RiskScore'] = this.riskScore; + if (this.checklist != null) { + data['checklist'] = this.checklist!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class Checklist { + int? isSelected; + int? parameterCode; + int? parameterGroup; + int? parameterType; + int? score; + + Checklist({this.isSelected, this.parameterCode, this.parameterGroup, this.parameterType, this.score}); + + Checklist.fromJson(Map json) { + isSelected = json['IsSelected']; + parameterCode = json['ParameterCode']; + parameterGroup = json['ParameterGroup']; + parameterType = json['ParameterType']; + score = json['Score']; + } + + Map toJson() { + final Map data = new Map(); + data['IsSelected'] = this.isSelected; + data['ParameterCode'] = this.parameterCode; + data['ParameterGroup'] = this.parameterGroup; + data['ParameterType'] = this.parameterType; + data['Score'] = this.score; + return data; + } +} diff --git a/lib/core/model/er/TriageQuestionsModel.dart b/lib/core/model/er/TriageQuestionsModel.dart new file mode 100644 index 00000000..5467cb7d --- /dev/null +++ b/lib/core/model/er/TriageQuestionsModel.dart @@ -0,0 +1,52 @@ +class TriageQuestionsModel { + String? adultPoints; + String? headerSequence; + int? parameterCode; + int? parameterGroup; + int? parameterType; + String? pediaPoints; + String? question; + String? questionN; + String? scoreGroup; + String? titles; + + TriageQuestionsModel( + {this.adultPoints, + this.headerSequence, + this.parameterCode, + this.parameterGroup, + this.parameterType, + this.pediaPoints, + this.question, + this.questionN, + this.scoreGroup, + this.titles}); + + TriageQuestionsModel.fromJson(Map json) { + adultPoints = json['AdultPoints']; + headerSequence = json['HeaderSequence']; + parameterCode = json['ParameterCode']; + parameterGroup = json['ParameterGroup']; + parameterType = json['ParameterType']; + pediaPoints = json['PediaPoints']; + question = json['Question']; + questionN = json['QuestionN']; + scoreGroup = json['ScoreGroup']; + titles = json['Titles']; + } + + Map toJson() { + final Map data = new Map(); + data['AdultPoints'] = this.adultPoints; + data['HeaderSequence'] = this.headerSequence; + data['ParameterCode'] = this.parameterCode; + data['ParameterGroup'] = this.parameterGroup; + data['ParameterType'] = this.parameterType; + data['PediaPoints'] = this.pediaPoints; + data['Question'] = this.question; + data['QuestionN'] = this.questionN; + data['ScoreGroup'] = this.scoreGroup; + data['Titles'] = this.titles; + return data; + } +} diff --git a/lib/core/model/er/get_all_transportation_method_list_model.dart b/lib/core/model/er/get_all_transportation_method_list_model.dart new file mode 100644 index 00000000..80c30da9 --- /dev/null +++ b/lib/core/model/er/get_all_transportation_method_list_model.dart @@ -0,0 +1,56 @@ +class PatientERTransportationMethod { + int? iD; + String? serviceID; + int? orderServiceID; + String? text; + String? textN; + dynamic price; + dynamic priceVAT; + dynamic priceTotal; + bool? isEnabled; + int? orderId; + int? quantity; + + PatientERTransportationMethod( + {this.iD, + this.serviceID, + this.orderServiceID, + this.text, + this.textN, + this.price, + this.priceVAT, + this.priceTotal, + this.isEnabled, + this.orderId, + this.quantity}); + + PatientERTransportationMethod.fromJson(Map json) { + iD = json['ID']; + serviceID = json['ServiceID']; + orderServiceID = json['OrderServiceID']; + text = json['Text']; + textN = json['TextN']; + price = json['Price']; + priceVAT = json['PriceVAT']; + priceTotal = json['PriceTotal']; + isEnabled = json['IsEnabled']; + orderId = json['OrderId']; + quantity = json['Quantity']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['ServiceID'] = this.serviceID; + data['OrderServiceID'] = this.orderServiceID; + data['Text'] = this.text; + data['TextN'] = this.textN; + data['Price'] = this.price; + data['PriceVAT'] = this.priceVAT; + data['PriceTotal'] = this.priceTotal; + data['IsEnabled'] = this.isEnabled; + data['OrderId'] = this.orderId; + data['Quantity'] = this.quantity; + return data; + } +} diff --git a/lib/core/model/er/projectavgerwaitingtime.dart b/lib/core/model/er/projectavgerwaitingtime.dart new file mode 100644 index 00000000..ccc92a7e --- /dev/null +++ b/lib/core/model/er/projectavgerwaitingtime.dart @@ -0,0 +1,104 @@ +class ProjectAvgERWaitingTime { + int? iD; + int? projectID; + int? avgTimeInMinutes; + String? avgTimeInHHMM; + dynamic distanceInKilometers; + String? latitude; + String? longitude; + String? phonenumber; + String? projectImageURL; + String? projectName; + + ProjectAvgERWaitingTime( + {this.iD, + this.projectID, + this.avgTimeInMinutes, + this.avgTimeInHHMM, + this.distanceInKilometers, + this.latitude, + this.longitude, + this.phonenumber, + this.projectImageURL, + this.projectName}); + + ProjectAvgERWaitingTime.fromJson(Map json) { + iD = json['ID']; + projectID = json['ProjectID']; + avgTimeInMinutes = json['AvgTimeInMinutes']; + avgTimeInHHMM = json['AvgTimeInHHMM']; + distanceInKilometers = json['DistanceInKilometers']; + latitude = json['Latitude']; + longitude = json['Longitude']; + phonenumber = json['PhoneNumber']; + projectImageURL = json['ProjectImageURL']; + projectName = json['ProjectName']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['ProjectID'] = this.projectID; + data['AvgTimeInMinutes'] = this.avgTimeInMinutes; + data['AvgTimeInHHMM'] = this.avgTimeInHHMM; + data['DistanceInKilometers'] = this.distanceInKilometers; + data['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + data['PhoneNumber'] = this.phonenumber; + data['ProjectImageURL'] = this.projectImageURL; + data['ProjectName'] = this.projectName; + return data; + } +} +//class ProjectAvgERWaitingTime { +// int? iD; +// int? projectID; +// int? avgTimeInMinutes; +// String? avgTimeInHHMM; +// String? distanceInKilometers; +// String? latitude; +// String? longitude; +// String? phonenum?ber; +// String? projectImageURL; +// String? projectName; +// +// ProjectAvgERWaitingTime( +// {this.iD, +// this.projectID, +// this.avgTimeInMinutes, +// this.avgTimeInHHMM, +// this.distanceInKilometers, +// this.latitude, +// this.longitude, +// this.phonenum?ber, +// this.projectImageURL, +// this.projectName}); +// +// ProjectAvgERWaitingTime.fromJson(Map json) { +// iD = json['ID']; +// projectID = json['ProjectID']; +// avgTimeInMinutes = json['AvgTimeInMinutes']; +// avgTimeInHHMM = json['AvgTimeInHHMM']; +// distanceInKilometers = json['DistanceInKilometers']; +// latitude = json['Latitude']; +// longitude = json['Longitude']; +// phonenum?ber = json['Phonenum?ber']; +// projectImageURL = json['ProjectImageURL']; +// projectName = json['ProjectName']; +// } +// +// Map toJson() { +// final Map data = new Map(); +// data['ID'] = this.iD; +// data['ProjectID'] = this.projectID; +// data['AvgTimeInMinutes'] = this.avgTimeInMinutes; +// data['AvgTimeInHHMM'] = this.avgTimeInHHMM; +// data['DistanceInKilometers'] = this.distanceInKilometers; +// data['Latitude'] = this.latitude; +// data['Longitude'] = this.longitude; +// data['Phonenum?ber'] = this.phonenum?ber; +// data['ProjectImageURL'] = this.projectImageURL; +// data['ProjectName'] = this.projectName; +// return data; +// } +//} \ No newline at end of file diff --git a/lib/core/model/eye/AppoimentAllHistoryResult.dart b/lib/core/model/eye/AppoimentAllHistoryResult.dart new file mode 100644 index 00000000..fb62f3f5 --- /dev/null +++ b/lib/core/model/eye/AppoimentAllHistoryResult.dart @@ -0,0 +1,500 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class AppoimentAllHistoryResultList { + String? setupID; + int? projectID; + int? appointmentNo; + String? appointmentDate; + dynamic appointmentDateN; + int? appointmentType; + DateTime? bookDate; + dynamic patientType; + int? patientID; + dynamic clinicID; + int? doctorID; + String? endDate; + String? startTime; + String? endTime; + dynamic status; + dynamic visitType; + int? visitFor; + int? patientStatusType; + int? companyID; + int? bookedBy; + String? bookedOn; + int? confirmedBy; + String? confirmedOn; + int? arrivalChangedBy; + String? arrivedOn; + dynamic editedBy; + dynamic editedOn; + dynamic doctorName; + dynamic doctorNameN; + String? statusDesc; + dynamic statusDescN; + bool? vitalStatus; + dynamic vitalSignAppointmentNo; + int? episodeID; + int? actualDoctorRate; + String? clinicName; + bool? complainExists; + String? doctorImageURL; + String? doctorNameObj; + int? doctorRate; + List? doctorSpeciality; + String? doctorTitle; + int? gender; + String? genderDescription; + bool? iSAllowOnlineCheckedIN; + bool? isActiveDoctor; + bool? isActiveDoctorProfile; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + int? isFollowup; + bool? isLiveCareAppointment; + bool? isMedicalReportRequested; + bool? isOnlineCheckedIN; + String? latitude; + List? listHISGetContactLensPerscription; + List? listHISGetGlassPerscription; + String? longitude; + int? nextAction; + int? noOfPatientsRate; + int? originalClinicID; + int? originalProjectID; + String? projectName; + String? qR; + int? remaniningHoursTocanPay; + bool? sMSButtonVisable; + bool? isInOutPatient; + + AppoimentAllHistoryResultList({ + this.setupID, + this.projectID, + this.appointmentNo, + this.appointmentDate, + this.appointmentDateN, + this.appointmentType, + this.bookDate, + this.patientID, + this.doctorID, + this.endDate, + this.startTime, + this.endTime, + this.status, + this.visitFor, + this.patientStatusType, + this.companyID, + this.bookedBy, + this.bookedOn, + this.confirmedBy, + this.confirmedOn, + this.arrivalChangedBy, + this.arrivedOn, + this.editedBy, + this.editedOn, + this.doctorName, + this.doctorNameN, + this.statusDesc, + this.statusDescN, + this.vitalStatus, + this.vitalSignAppointmentNo, + this.episodeID, + this.actualDoctorRate, + this.clinicName, + this.complainExists, + this.doctorImageURL, + this.doctorNameObj, + this.doctorRate, + this.doctorSpeciality, + this.doctorTitle, + this.gender, + this.genderDescription, + this.iSAllowOnlineCheckedIN, + this.isActiveDoctor, + this.isActiveDoctorProfile, + this.isDoctorAllowVedioCall, + this.isExecludeDoctor, + this.isFollowup, + this.isLiveCareAppointment, + this.isMedicalReportRequested, + this.isOnlineCheckedIN, + this.latitude, + this.listHISGetContactLensPerscription, + this.listHISGetGlassPerscription, + this.longitude, + this.nextAction, + this.noOfPatientsRate, + this.originalClinicID, + this.originalProjectID, + this.projectName, + this.qR, + this.remaniningHoursTocanPay, + this.sMSButtonVisable, + this.clinicID, + this.patientType, + this.visitType, + this.isInOutPatient, + }); + + AppoimentAllHistoryResultList.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + appointmentNo = json['AppointmentNo']; + appointmentDate = json['AppointmentDate']; + appointmentDateN = json['AppointmentDateN']; + appointmentType = json['AppointmentType']; + bookDate = DateUtil.convertStringToDate(json['BookDate']); + patientType = json['PatientType']; + patientID = json['PatientID']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + endDate = json['EndDate']; + startTime = json['StartTime']; + endTime = json['EndTime']; + status = json['Status']; + visitType = json['VisitType']; + visitFor = json['VisitFor']; + patientStatusType = json['PatientStatusType']; + companyID = json['CompanyID']; + bookedBy = json['BookedBy']; + bookedOn = json['BookedOn']; + confirmedBy = json['ConfirmedBy']; + confirmedOn = json['ConfirmedOn']; + arrivalChangedBy = json['ArrivalChangedBy']; + arrivedOn = json['ArrivedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + doctorName = json['DoctorName']; + doctorNameN = json['DoctorNameN']; + statusDesc = json['StatusDesc']; + statusDescN = json['StatusDescN']; + vitalStatus = json['VitalStatus']; + vitalSignAppointmentNo = json['VitalSignAppointmentNo']; + episodeID = json['EpisodeID']; + actualDoctorRate = json['ActualDoctorRate']; + clinicName = json['ClinicName']; + complainExists = json['ComplainExists']; + doctorImageURL = json['DoctorImageURL']; + doctorNameObj = json['DoctorNameObj']; + doctorRate = json['DoctorRate']; + if (doctorSpeciality != null) doctorSpeciality = json['DoctorSpeciality'].cast(); + doctorTitle = json['DoctorTitle']; + gender = json['Gender']; + genderDescription = json['GenderDescription']; + iSAllowOnlineCheckedIN = json['ISAllowOnlineCheckedIN']; + isActiveDoctor = json['IsActiveDoctor']; + isActiveDoctorProfile = json['IsActiveDoctorProfile']; + isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; + isExecludeDoctor = json['IsExecludeDoctor']; + isFollowup = json['IsFollowup']; + isLiveCareAppointment = json['IsLiveCareAppointment']; + isMedicalReportRequested = json['IsMedicalReportRequested']; + isOnlineCheckedIN = json['IsOnlineCheckedIN']; + latitude = json['Latitude']; + if (json['List_HIS_GetContactLensPerscription'] != null) { + listHISGetContactLensPerscription = []; + json['List_HIS_GetContactLensPerscription'].forEach((v) { + listHISGetContactLensPerscription!.add(new ListHISGetContactLensPerscription.fromJson(v)); + }); + } + if (json['List_HIS_GetGlassPerscription'] != null) { + listHISGetGlassPerscription = []; + json['List_HIS_GetGlassPerscription'].forEach((v) { + listHISGetGlassPerscription!.add(new ListHISGetGlassPerscription.fromJson(v)); + }); + } + longitude = json['Longitude']; + nextAction = json['NextAction']; + noOfPatientsRate = json['NoOfPatientsRate']; + originalClinicID = json['OriginalClinicID']; + originalProjectID = json['OriginalProjectID']; + projectName = json['ProjectName']; + qR = json['QR']; + remaniningHoursTocanPay = json['RemaniningHoursTocanPay']; + sMSButtonVisable = json['SMSButtonVisable']; + clinicID = json['clinicID']; + patientType = json['patientType']; + status = json['status']; + visitType = json['visitType']; + isInOutPatient = json['IsInOutPatient']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['AppointmentNo'] = this.appointmentNo; + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentDateN'] = this.appointmentDateN; + data['AppointmentType'] = this.appointmentType; + data['BookDate'] = this.bookDate; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['EndDate'] = this.endDate; + data['StartTime'] = this.startTime; + data['EndTime'] = this.endTime; + data['Status'] = this.status; + data['VisitType'] = this.visitType; + data['VisitFor'] = this.visitFor; + data['PatientStatusType'] = this.patientStatusType; + data['CompanyID'] = this.companyID; + data['BookedBy'] = this.bookedBy; + data['BookedOn'] = this.bookedOn; + data['ConfirmedBy'] = this.confirmedBy; + data['ConfirmedOn'] = this.confirmedOn; + data['ArrivalChangedBy'] = this.arrivalChangedBy; + data['ArrivedOn'] = this.arrivedOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + data['DoctorName'] = this.doctorName; + data['DoctorNameN'] = this.doctorNameN; + data['StatusDesc'] = this.statusDesc; + data['StatusDescN'] = this.statusDescN; + data['VitalStatus'] = this.vitalStatus; + data['VitalSignAppointmentNo'] = this.vitalSignAppointmentNo; + data['EpisodeID'] = this.episodeID; + data['ActualDoctorRate'] = this.actualDoctorRate; + data['ClinicName'] = this.clinicName; + data['ComplainExists'] = this.complainExists; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorNameObj'] = this.doctorNameObj; + data['DoctorRate'] = this.doctorRate; + data['DoctorSpeciality'] = this.doctorSpeciality; + data['DoctorTitle'] = this.doctorTitle; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['ISAllowOnlineCheckedIN'] = this.iSAllowOnlineCheckedIN; + data['IsActiveDoctor'] = this.isActiveDoctor; + data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile; + data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; + data['IsExecludeDoctor'] = this.isExecludeDoctor; + data['IsFollowup'] = this.isFollowup; + data['IsLiveCareAppointment'] = this.isLiveCareAppointment; + data['IsMedicalReportRequested'] = this.isMedicalReportRequested; + data['IsOnlineCheckedIN'] = this.isOnlineCheckedIN; + data['Latitude'] = this.latitude; + if (this.listHISGetContactLensPerscription != null) { + data['List_HIS_GetContactLensPerscription'] = this + .listHISGetContactLensPerscription! + .map( + (v) => v.toJson(), + ) + .toList(); + } + if (this.listHISGetGlassPerscription != null) { + data['List_HIS_GetGlassPerscription'] = this + .listHISGetGlassPerscription! + .map( + (v) => v.toJson(), + ) + .toList(); + } + data['Longitude'] = this.longitude; + data['NextAction'] = this.nextAction; + data['NoOfPatientsRate'] = this.noOfPatientsRate; + data['OriginalClinicID'] = this.originalClinicID; + data['OriginalProjectID'] = this.originalProjectID; + data['ProjectName'] = this.projectName; + data['QR'] = this.qR; + data['RemaniningHoursTocanPay'] = this.remaniningHoursTocanPay; + data['SMSButtonVisable'] = this.sMSButtonVisable; + data['clinicID'] = this.clinicID; + data['patientType'] = this.patientType; + data['status'] = this.status; + data['visitType'] = this.visitType; + return data; + } +} + +class ListHISGetContactLensPerscription { + String? setupId; + int? projectId; + int? patientType; + int? patientId; + int? encounterType; + int? encounterNo; + int? oDOS; + dynamic brand; + dynamic baseCurve; + dynamic power; + dynamic diameter; + dynamic oZ; + dynamic cT; + dynamic blend; + String? remarks; + int? status; + bool? isActive; + String? createdOn; + + ListHISGetContactLensPerscription( + {this.setupId, + this.projectId, + this.patientType, + this.patientId, + this.encounterType, + this.encounterNo, + this.oDOS, + this.brand, + this.baseCurve, + this.power, + this.diameter, + this.oZ, + this.cT, + this.blend, + this.remarks, + this.status, + this.isActive, + this.createdOn}); + + ListHISGetContactLensPerscription.fromJson(Map json) { + setupId = json['SetupId']; + projectId = json['ProjectId']; + patientType = json['PatientType']; + patientId = json['PatientId']; + encounterType = json['EncounterType']; + encounterNo = json['EncounterNo']; + oDOS = json['OD_OS']; + brand = json['Brand']; + baseCurve = json['BaseCurve']; + power = json['Power']; + diameter = json['Diameter']; + oZ = json['OZ']; + cT = json['CT']; + blend = json['Blend']; + remarks = json['Remarks']; + status = json['Status']; + isActive = json['IsActive']; + createdOn = json['CreatedOn']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupId'] = this.setupId; + data['ProjectId'] = this.projectId; + data['PatientType'] = this.patientType; + data['PatientId'] = this.patientId; + data['EncounterType'] = this.encounterType; + data['EncounterNo'] = this.encounterNo; + data['OD_OS'] = this.oDOS; + data['Brand'] = this.brand; + data['BaseCurve'] = this.baseCurve; + data['Power'] = this.power; + data['Diameter'] = this.diameter; + data['OZ'] = this.oZ; + data['CT'] = this.cT; + data['Blend'] = this.blend; + data['Remarks'] = this.remarks; + data['Status'] = this.status; + data['IsActive'] = this.isActive; + data['CreatedOn'] = this.createdOn; + return data; + } +} + +class ListHISGetGlassPerscription { + dynamic projectID; + String? setupID; + dynamic patientId; + dynamic encounterType; + dynamic encounterNo; + String? visionType; + double? rightEyeSpherical; + dynamic rightEyeCylinder; + dynamic rightEyeAxis; + dynamic rightEyePrism; + dynamic rightEyeVA; + String? rightEyeRemarks; + dynamic leftEyeSpherical; + dynamic leftEyeCylinder; + dynamic leftEyeAxis; + dynamic leftEyePrism; + dynamic leftEyeVA; + String? leftEyeRemarks; + dynamic pD; + dynamic bVD; + dynamic status; + bool? isActive; + String? createdOn; + + ListHISGetGlassPerscription( + {this.projectID, + this.setupID, + this.patientId, + this.encounterType, + this.encounterNo, + this.visionType, + this.rightEyeSpherical, + this.rightEyeCylinder, + this.rightEyeAxis, + this.rightEyePrism, + this.rightEyeVA, + this.rightEyeRemarks, + this.leftEyeSpherical, + this.leftEyeCylinder, + this.leftEyeAxis, + this.leftEyePrism, + this.leftEyeVA, + this.leftEyeRemarks, + this.pD, + this.bVD, + this.status, + this.isActive, + this.createdOn}); + + ListHISGetGlassPerscription.fromJson(Map json) { + projectID = json['ProjectID']; + setupID = json['SetupID']; + patientId = json['PatientId']; + encounterType = json['EncounterType']; + encounterNo = json['EncounterNo']; + visionType = json['VisionType']; + rightEyeSpherical = json['RightEyeSpherical']; + rightEyeCylinder = json['RightEyeCylinder']; + rightEyeAxis = json['RightEyeAxis']; + rightEyePrism = json['RightEyePrism']; + rightEyeVA = json['RightEyeVA']; + rightEyeRemarks = json['RightEyeRemarks']; + leftEyeSpherical = json['LeftEyeSpherical']; + leftEyeCylinder = json['LeftEyeCylinder']; + leftEyeAxis = json['LeftEyeAxis']; + leftEyePrism = json['LeftEyePrism']; + leftEyeVA = json['LeftEyeVA']; + leftEyeRemarks = json['LeftEyeRemarks']; + pD = json['PD']; + bVD = json['BVD']; + status = json['Status']; + isActive = json['IsActive']; + createdOn = json['CreatedOn']; + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + data['SetupID'] = this.setupID; + data['PatientId'] = this.patientId; + data['EncounterType'] = this.encounterType; + data['EncounterNo'] = this.encounterNo; + data['VisionType'] = this.visionType; + data['RightEyeSpherical'] = this.rightEyeSpherical; + data['RightEyeCylinder'] = this.rightEyeCylinder; + data['RightEyeAxis'] = this.rightEyeAxis; + data['RightEyePrism'] = this.rightEyePrism; + data['RightEyeVA'] = this.rightEyeVA; + data['RightEyeRemarks'] = this.rightEyeRemarks; + data['LeftEyeSpherical'] = this.leftEyeSpherical; + data['LeftEyeCylinder'] = this.leftEyeCylinder; + data['LeftEyeAxis'] = this.leftEyeAxis; + data['LeftEyePrism'] = this.leftEyePrism; + data['LeftEyeVA'] = this.leftEyeVA; + data['LeftEyeRemarks'] = this.leftEyeRemarks; + data['PD'] = this.pD; + data['BVD'] = this.bVD; + data['Status'] = this.status; + data['IsActive'] = this.isActive; + data['CreatedOn'] = this.createdOn; + return data; + } +} diff --git a/lib/core/model/eye/AppointmentFilter.dart b/lib/core/model/eye/AppointmentFilter.dart new file mode 100644 index 00000000..58146a92 --- /dev/null +++ b/lib/core/model/eye/AppointmentFilter.dart @@ -0,0 +1,12 @@ +import 'AppoimentAllHistoryResult.dart'; + +class AppointmentFilter { + ListappointmentAllHistoryResultList = []; + String? filterName; + + AppointmentFilter( + AppoimentAllHistoryResultList allHistoryResultList, String filterName) { + appointmentAllHistoryResultList.add(allHistoryResultList); + this.filterName = filterName; + } +} diff --git a/lib/core/model/family-file/add_family_file_request.dart b/lib/core/model/family-file/add_family_file_request.dart new file mode 100644 index 00000000..f03fa80a --- /dev/null +++ b/lib/core/model/family-file/add_family_file_request.dart @@ -0,0 +1,92 @@ +class AddFamilyFileReq { + int? searchType; + int? sharedPatientID; + String? sharedPatientIdentificationID; + String? sharedPatientMobileNumber; + String? zipCode; + bool? isRegister; + int? patientStatus; + 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; + + AddFamilyFileReq( + {this.searchType, + this.sharedPatientID, + this.sharedPatientIdentificationID, + this.sharedPatientMobileNumber, + this.zipCode, + this.isRegister, + this.patientStatus, + 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}); + + AddFamilyFileReq.fromJson(Map json) { + searchType = json['SearchType']; + sharedPatientID = json['SharedPatientID']; + sharedPatientIdentificationID = json['SharedPatientIdentificationID']; + sharedPatientMobileNumber = json['SharedPatientMobileNumber']; + zipCode = json['ZipCode']; + isRegister = json['isRegister']; + patientStatus = json['PatientStatus']; + 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']; + } + + Map toJson() { + final Map data = new Map(); + data['SearchType'] = this.searchType; + data['SharedPatientID'] = this.sharedPatientID; + data['SharedPatientIdentificationID'] = this.sharedPatientIdentificationID; + data['SharedPatientMobileNumber'] = this.sharedPatientMobileNumber; + data['ZipCode'] = this.zipCode; + data['isRegister'] = this.isRegister; + data['PatientStatus'] = this.patientStatus; + 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['PatientType'] = this.patientType; + return data; + } +} diff --git a/lib/core/model/family-file/insert b/lib/core/model/family-file/insert new file mode 100644 index 00000000..e69de29b diff --git a/lib/core/model/family-file/insert_share_file_request.dart b/lib/core/model/family-file/insert_share_file_request.dart new file mode 100644 index 00000000..b153a366 --- /dev/null +++ b/lib/core/model/family-file/insert_share_file_request.dart @@ -0,0 +1,80 @@ +class InsertSharePatientFileReq { + int? responseID; + String? shareFamilyPatientName; + int? status; + int? regionID; + 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; + + InsertSharePatientFileReq( + {this.responseID, + this.shareFamilyPatientName, + this.status, + this.regionID, + 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}); + + InsertSharePatientFileReq.fromJson(Map json) { + responseID = json['ResponseID']; + shareFamilyPatientName = json['ShareFamilyPatientName']; + status = json['Status']; + regionID = json['RegionID']; + 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']; + } + + Map toJson() { + final Map data = new Map(); + data['ResponseID'] = this.responseID; + data['ShareFamilyPatientName'] = this.shareFamilyPatientName; + data['Status'] = this.status; + data['RegionID'] = this.regionID; + 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['PatientType'] = this.patientType; + return data; + } +} diff --git a/lib/core/model/feedback/COC_items.dart b/lib/core/model/feedback/COC_items.dart new file mode 100644 index 00000000..ed62d8ba --- /dev/null +++ b/lib/core/model/feedback/COC_items.dart @@ -0,0 +1,124 @@ +class COCItem { + dynamic appointment; + String? appointmentClinicName; + String? appointmentDate; + String? appointmentProjectName; + String? cOCID; + String? cOCTitle; + String? channel; + dynamic clinic; + String? clinicID; + String? date; + dynamic detail; + dynamic doctor; + String? doctorID; + String? formType; + int? formTypeID; + dynamic identificationNo; + int? itemID; + dynamic mobileNo; + dynamic naturename; + dynamic patientID; + dynamic patientName; + dynamic project; + dynamic projectID; + String? solution; + String? status; + String? statusAr; + dynamic statusEn; + int? statusId; + + COCItem({ + this.appointment, + this.appointmentClinicName, + this.appointmentDate, + this.appointmentProjectName, + this.cOCID, + this.cOCTitle, + this.channel, + this.clinic, + this.clinicID, + this.date, + this.detail, + this.doctor, + this.doctorID, + this.formType, + this.formTypeID, + this.identificationNo, + this.itemID, + this.mobileNo, + this.naturename, + this.patientID, + this.patientName, + this.project, + this.projectID, + this.solution, + this.status, + this.statusAr, + this.statusEn, + this.statusId, + }); + + COCItem.fromJson(Map json) { + appointment = json['Appointment']; + appointmentClinicName = json['AppointmentClinicName']; + appointmentDate = json['AppointmentDate']; + appointmentProjectName = json['AppointmentProjectName']; + cOCID = json['COCID']; + cOCTitle = json['COCTitle']; + channel = json['Channel']; + clinic = json['Clinic']; + clinicID = json['ClinicID']; + date = json['Date']; + detail = json['Detail']; + doctor = json['Doctor']; + doctorID = json['DoctorID']; + formType = json['FormType']; + formTypeID = json['FormTypeID']; + identificationNo = json['IdentificationNo']; + itemID = json['ItemID']; + mobileNo = json['MobileNo']; + naturename = json['Naturename']; + patientID = json['PatientID']; + patientName = json['PatientName']; + project = json['Project']; + projectID = json['ProjectID']; + solution = json['Solution']; + status = json['Status']; + statusAr = json['StatusAr']; + statusEn = json['StatusEn']; + statusId = json['StatusId']; + } + + Map toJson() { + final Map data = new Map(); + data['Appointment'] = this.appointment; + data['AppointmentClinicName'] = this.appointmentClinicName; + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentProjectName'] = this.appointmentProjectName; + data['COCID'] = this.cOCID; + data['COCTitle'] = this.cOCTitle; + data['Channel'] = this.channel; + data['Clinic'] = this.clinic; + data['ClinicID'] = this.clinicID; + data['Date'] = this.date; + data['Detail'] = this.detail; + data['Doctor'] = this.doctor; + data['DoctorID'] = this.doctorID; + data['FormType'] = this.formType; + data['FormTypeID'] = this.formTypeID; + data['IdentificationNo'] = this.identificationNo; + data['ItemID'] = this.itemID; + data['MobileNo'] = this.mobileNo; + data['Naturename'] = this.naturename; + data['PatientID'] = this.patientID; + data['PatientName'] = this.patientName; + data['Project'] = this.project; + data['ProjectID'] = this.projectID; + data['Solution'] = this.solution; + data['Status'] = this.status; + data['StatusAr'] = this.statusAr; + data['StatusEn'] = this.statusEn; + return data; + } +} diff --git a/lib/core/model/feedback/request_insert_coc_item.dart b/lib/core/model/feedback/request_insert_coc_item.dart new file mode 100644 index 00000000..e285999c --- /dev/null +++ b/lib/core/model/feedback/request_insert_coc_item.dart @@ -0,0 +1,137 @@ +class RequestInsertCOCItem { + bool? isUserLoggedIn; + String? mobileNo; + int? identificationNo; + int? patientID; + int? patientOutSA; + int? patientTypeID; + String? tokenID; + String? patientName; + int? projectID; + String? fileName; + String? attachment; + String? uILanguage; + String? browserInfo; + String? cOCTypeName; + String? formTypeID; + String? details; + String? deviceInfo; + String? deviceType; + String? title; + String? resolution; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? patientType; + double? appVersion; + bool? forDemo; + + RequestInsertCOCItem( + {this.isUserLoggedIn, + this.mobileNo, + this.identificationNo, + this.patientID, + this.patientOutSA, + this.patientTypeID, + this.tokenID, + this.patientName, + this.projectID, + this.fileName, + this.attachment, + this.uILanguage, + this.browserInfo, + this.cOCTypeName, + this.formTypeID, + this.details, + this.deviceInfo, + this.deviceType, + this.title, + this.resolution, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientType, + this.appVersion, + this.forDemo}); + + RequestInsertCOCItem.fromJson(Map json) { + isUserLoggedIn = json['IsUserLoggedIn']; + mobileNo = json['MobileNo']; + identificationNo = json['IdentificationNo']; + patientID = json['PatientID']; + patientOutSA = json['PatientOutSA']; + patientTypeID = json['PatientTypeID']; + tokenID = json['TokenID']; + patientName = json['PatientName']; + projectID = json['ProjectID']; + fileName = json['FileName']; + attachment = json['Attachment']; + uILanguage = json['UILanguage']; + browserInfo = json['BrowserInfo']; + cOCTypeName = json['COCTypeName']; + formTypeID = json['FormTypeID']; + details = json['Details']; + deviceInfo = json['DeviceInfo']; + deviceType = json['DeviceType']; + title = json['Title']; + resolution = json['Resolution']; + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + sessionID = json['SessionID']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; + deviceTypeID = json['DeviceTypeID']; + patientType = json['PatientType']; + appVersion = json['AppVersion']; + forDemo = json['ForDemo']; + } + + Map toJson() { + final Map data = new Map(); + data['IsUserLoggedIn'] = this.isUserLoggedIn; + data['MobileNo'] = this.mobileNo; + data['IdentificationNo'] = this.identificationNo; + data['PatientID'] = this.patientID; + data['PatientOutSA'] = this.patientOutSA; + data['PatientTypeID'] = this.patientTypeID; + data['TokenID'] = this.tokenID; + data['PatientName'] = this.patientName; + data['ProjectID'] = this.projectID; + data['FileName'] = this.fileName; + data['Attachment'] = this.attachment; + data['UILanguage'] = this.uILanguage; + data['BrowserInfo'] = this.browserInfo; + data['COCTypeName'] = this.cOCTypeName; + data['FormTypeID'] = this.formTypeID; + data['Details'] = this.details; + data['DeviceInfo'] = this.deviceInfo; + data['DeviceType'] = this.deviceType; + data['Title'] = this.title; + data['Resolution'] = this.resolution; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['SessionID'] = this.sessionID; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['DeviceTypeID'] = this.deviceTypeID; + data['PatientType'] = this.patientType; + data['AppVersion'] = this.appVersion; + data['ForDemo'] = this.forDemo; + + return data; + } +} diff --git a/lib/core/model/geofencing/requests/GeoZonesRequestModel.dart b/lib/core/model/geofencing/requests/GeoZonesRequestModel.dart new file mode 100644 index 00000000..265fedde --- /dev/null +++ b/lib/core/model/geofencing/requests/GeoZonesRequestModel.dart @@ -0,0 +1,11 @@ +class GeoZonesRequestModel { + final String? PatientID; + + GeoZonesRequestModel({this.PatientID}); + + Map toFlatMap() { + if (PatientID == null) return {}; + + return {"PatientID": PatientID.toString()}; + } +} diff --git a/lib/core/model/geofencing/requests/LogGeoZoneRequestModel.dart b/lib/core/model/geofencing/requests/LogGeoZoneRequestModel.dart new file mode 100644 index 00000000..abf67a61 --- /dev/null +++ b/lib/core/model/geofencing/requests/LogGeoZoneRequestModel.dart @@ -0,0 +1,12 @@ +import 'package:flutter/cupertino.dart'; + +class LogGeoZoneRequestModel { + final int PointsID; + final int GeoType; + + LogGeoZoneRequestModel({required this.PointsID, required this.GeoType}); + + Map toFlatMap() { + return {"PointsID": PointsID.toString(), "GeoType": GeoType.toString()}; + } +} diff --git a/lib/core/model/geofencing/responses/GeoZonesResponseModel.dart b/lib/core/model/geofencing/responses/GeoZonesResponseModel.dart new file mode 100644 index 00000000..eaf89db5 --- /dev/null +++ b/lib/core/model/geofencing/responses/GeoZonesResponseModel.dart @@ -0,0 +1,62 @@ +import 'package:diplomaticquarterapp/generated/json/base/json_convert_content.dart'; +import 'package:diplomaticquarterapp/generated/json/base/json_field.dart'; + +class GeoZonesResponseModel extends JsonConvert { + @JSONField(name: "GEOF_ID") + int? geofId; + @JSONField(name: "Description") + String? description; + @JSONField(name: "DescriptionN") + String? descriptionN; + @JSONField(name: "Latitude") + String? latitude; + @JSONField(name: "Longitude") + String? longitude; + @JSONField(name: "Radius") + int? radius; + @JSONField(name: "Type") + int? type; + @JSONField(name: "ProjectID") + int? projectID; + @JSONField(name: "ImageURL") + String? imageURL; + @JSONField(name: "IsCity") + bool? isCity; + + // Outside Server Response + bool isRegistered = false; + bool onEntry = true; + bool onExit = true; + + String geofenceId() { + return "$geofId\_${description!.replaceAll(" ", "")}"; + } + + static get(String coordinates, int radius, String name) { + coordinates = coordinates.replaceAll(" ", ""); + var geo = GeoZonesResponseModel(); + geo.latitude = coordinates.split(",").first; + geo.longitude = coordinates.split(",").last; + geo.radius = radius; + geo.description = name; + return geo; + } + + static GeoZonesResponseModel zkH() { + var geo = GeoZonesResponseModel(); + geo.latitude = "24.691136"; + geo.longitude = "46.650116"; + geo.radius = 150; + geo.description = "zkH"; + return geo; + } + + static GeoZonesResponseModel csO() { + var geo = GeoZonesResponseModel(); + geo.latitude = "24.7087913"; + geo.longitude = "46.6656461"; + geo.radius = 150; + geo.description = "csO"; + return geo; + } +} diff --git a/lib/core/model/geofencing/responses/LogGeoZoneResponseModel.dart b/lib/core/model/geofencing/responses/LogGeoZoneResponseModel.dart new file mode 100644 index 00000000..e27633a4 --- /dev/null +++ b/lib/core/model/geofencing/responses/LogGeoZoneResponseModel.dart @@ -0,0 +1,26 @@ +import 'package:diplomaticquarterapp/generated/json/base/json_convert_content.dart'; +import 'package:diplomaticquarterapp/generated/json/base/json_field.dart'; + +class LogGeoZoneResponseModel extends JsonConvert { + @JSONField(name: "LanguageID") + int? languageID; + @JSONField(name: "ErrorCode") + dynamic errorCode; + @JSONField(name: "ErrorEndUserMessage") + String? errorEndUserMessage; + @JSONField(name: "ErrorEndUserMessageN") + dynamic errorEndUserMessageN; + @JSONField(name: "ErrorMessage") + dynamic errorMessage; + @JSONField(name: "ErrorType") + int? errorType; + @JSONField(name: "IsAuthenticated") + bool? isAuthenticated; + @JSONField(name: "SuccessMsg") + dynamic successMsg; + @JSONField(name: "SuccessMsgN") + dynamic successMsgN; + int? statusCode; + @JSONField(name: "MessageStatus") + int? messageStatus; +} 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..754668c7 --- /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 = []; + 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..98c1c3d0 --- /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..22c5b37f --- /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..25be36a4 --- /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/hospitals/hospitals_model.dart b/lib/core/model/hospitals/hospitals_model.dart new file mode 100644 index 00000000..cc13ed81 --- /dev/null +++ b/lib/core/model/hospitals/hospitals_model.dart @@ -0,0 +1,104 @@ +class HospitalsModel { + String? desciption; + dynamic desciptionN; + dynamic iD; + String? legalName; + String? legalNameN; + String? name; + dynamic nameN; + String? phoneNumber; + String? setupID; + dynamic distanceInKilometers; + bool? isActive; + String? latitude; + String? longitude; + dynamic mainProjectID; + bool? projectOutSA; + bool? usingInDoctorApp; + bool? isHMC; + String? region; + String? regionArabic; + String? regionEnglish; + String? regionID; + + HospitalsModel( + {this.desciption, + this.desciptionN, + this.iD, + this.legalName, + this.legalNameN, + this.name, + this.nameN, + this.phoneNumber, + this.setupID, + this.distanceInKilometers, + this.isActive, + this.latitude, + this.longitude, + this.mainProjectID, + this.projectOutSA, + this.usingInDoctorApp, + this.isHMC, + this.region, + this.regionArabic, + this.regionEnglish, + this.regionID, + }); + + HospitalsModel.fromJson(Map json) { + desciption = json['Desciption']; + desciptionN = json['DesciptionN']; + iD = json['ID']; + legalName = json['LegalName']; + legalNameN = json['LegalNameN']; + name = json['Name']; + nameN = json['NameN']; + phoneNumber = json['PhoneNumber']; + setupID = json['SetupID']; + distanceInKilometers = json['DistanceInKilometers']; + isActive = json['IsActive']; + latitude = json['Latitude']; + longitude = json['Longitude']; + mainProjectID = json['MainProjectID']; + projectOutSA = json['ProjectOutSA']; + usingInDoctorApp = json['UsingInDoctorApp']; + this.isHMC = json["IsHMC"]; + this.regionArabic = json['RegionNameN']; + this.regionEnglish = json['RegionName']; + } + + String? getRegionName(bool isArabic) { + if (isArabic) { + return regionArabic; + } + return regionEnglish; + } + + String? getName(bool isArabic) { + if (isArabic) { + return "$nameN"; + } + return name; + } + + Map toJson() { + final Map data = new Map(); + data['Desciption'] = this.desciption; + data['DesciptionN'] = this.desciptionN; + data['ID'] = this.iD; + data['LegalName'] = this.legalName; + data['LegalNameN'] = this.legalNameN; + data['Name'] = this.name; + data['NameN'] = this.nameN; + data['PhoneNumber'] = this.phoneNumber; + data['SetupID'] = this.setupID; + data['DistanceInKilometers'] = this.distanceInKilometers; + data['IsActive'] = this.isActive; + data['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + data['MainProjectID'] = this.mainProjectID; + data['ProjectOutSA'] = this.projectOutSA; + data['UsingInDoctorApp'] = this.usingInDoctorApp; + return data; + } +} diff --git a/lib/core/model/hospitals/request_get_hospitals_model.dart b/lib/core/model/hospitals/request_get_hospitals_model.dart new file mode 100644 index 00000000..9c0b8842 --- /dev/null +++ b/lib/core/model/hospitals/request_get_hospitals_model.dart @@ -0,0 +1,56 @@ +class RequestGetHospitalsModel { + int? latitude; + int? longitude; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + + RequestGetHospitalsModel( + {this.latitude, + this.longitude, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID}); + + RequestGetHospitalsModel.fromJson(Map json) { + latitude = json['Latitude']; + longitude = json['Longitude']; + 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['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + 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/Insurance_card_details.dart b/lib/core/model/insurance/Insurance_card_details.dart new file mode 100644 index 00000000..c9287a2a --- /dev/null +++ b/lib/core/model/insurance/Insurance_card_details.dart @@ -0,0 +1,88 @@ +class InsuranceCardDetailsModel { + int? approvalLimit; + int? companyGroupID; + String? companyName; + String? companyRemarks; + String? dOB; + int? deductible; + String? effectiveFrom; + String? effectiveTo; + String? eligabilityFailureReason; + bool? isMemberEligible; + String? memberID; + String? memberName; + String? memberStatus; + dynamic message; + String? nationalId; + String? policyNumber; + String? responseMessage; + String? room; + String? subCategory; + + InsuranceCardDetailsModel( + {this.approvalLimit, + this.companyGroupID, + this.companyName, + this.companyRemarks, + this.dOB, + this.deductible, + this.effectiveFrom, + this.effectiveTo, + this.eligabilityFailureReason, + this.isMemberEligible, + this.memberID, + this.memberName, + this.memberStatus, + this.message, + this.nationalId, + this.policyNumber, + this.responseMessage, + this.room, + this.subCategory}); + + InsuranceCardDetailsModel.fromJson(Map json) { + approvalLimit = json['ApprovalLimit']; + companyGroupID = json['CompanyGroupID']; + companyName = json['CompanyName']; + companyRemarks = json['CompanyRemarks']; + dOB = json['DOB']; + deductible = json['Deductible']; + effectiveFrom = json['EffectiveFrom']; + effectiveTo = json['EffectiveTo']; + eligabilityFailureReason = json['EligabilityFailureReason']; + isMemberEligible = json['IsMemberEligible']; + memberID = json['MemberID']; + memberName = json['MemberName']; + memberStatus = json['MemberStatus']; + message = json['Message']; + nationalId = json['NationalId']; + policyNumber = json['PolicyNumber']; + responseMessage = json['ResponseMessage']; + room = json['Room']; + subCategory = json['SubCategory']; + } + + Map toJson() { + final Map data = new Map(); + data['ApprovalLimit'] = this.approvalLimit; + data['CompanyGroupID'] = this.companyGroupID; + data['CompanyName'] = this.companyName; + data['CompanyRemarks'] = this.companyRemarks; + data['DOB'] = this.dOB; + data['Deductible'] = this.deductible; + data['EffectiveFrom'] = this.effectiveFrom; + data['EffectiveTo'] = this.effectiveTo; + data['EligabilityFailureReason'] = this.eligabilityFailureReason; + data['IsMemberEligible'] = this.isMemberEligible; + data['MemberID'] = this.memberID; + data['MemberName'] = this.memberName; + data['MemberStatus'] = this.memberStatus; + data['Message'] = this.message; + data['NationalId'] = this.nationalId; + data['PolicyNumber'] = this.policyNumber; + data['ResponseMessage'] = this.responseMessage; + data['Room'] = this.room; + data['SubCategory'] = this.subCategory; + return data; + } +} diff --git a/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart b/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart new file mode 100644 index 00000000..6f154022 --- /dev/null +++ b/lib/core/model/insurance/ReauestInsuranceApprovalModel.dart @@ -0,0 +1,76 @@ +class RequestInsuranceApprovalModel { + 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; + int? projectID; + int? appointmentNo; + + RequestInsuranceApprovalModel( + {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.projectID, + this.appointmentNo}); + + RequestInsuranceApprovalModel.fromJson(Map json) { + 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']; + appointmentNo = json['AppointmentNo']; + } + + 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['PatientType'] = this.patientType; + data['EXuldAPPNO'] = this.eXuldAPPNO; + data['ProjectID'] = this.projectID; + data['AppointmentNo'] = this.appointmentNo; + return data; + } +} diff --git a/lib/core/model/insurance/insuranceManualUpdateRequest.dart b/lib/core/model/insurance/insuranceManualUpdateRequest.dart new file mode 100644 index 00000000..5c1f17df --- /dev/null +++ b/lib/core/model/insurance/insuranceManualUpdateRequest.dart @@ -0,0 +1,68 @@ +class InsuranceManualUpdateRequest { + String? setupID; + String? patientIdentificationID; + int? projectID; + String? mobileNo; + int? activityId; + String? component; + bool? enableLogging; + String? insuranceCompanyName; + String? cardHolderName; + String? memberShipNo; + String? policyNo; + String? schemeClass; + int? requestType; + int? patientID; + + InsuranceManualUpdateRequest( + {this.setupID, + this.patientIdentificationID, + this.projectID, + this.mobileNo, + this.activityId, + this.component, + this.enableLogging, + this.insuranceCompanyName, + this.cardHolderName, + this.memberShipNo, + this.policyNo, + this.schemeClass, + this.requestType, + this.patientID}); + + InsuranceManualUpdateRequest.fromJson(Map json) { + setupID = json['SetupID']; + patientIdentificationID = json['PatientIdentificationID']; + projectID = json['ProjectID']; + mobileNo = json['MobileNo']; + activityId = json['activityId']; + component = json['component']; + enableLogging = json['enableLogging']; + insuranceCompanyName = json['InsuranceCompanyName']; + cardHolderName = json['CardHolderName']; + memberShipNo = json['MemberShipNo']; + policyNo = json['PolicyNo']; + schemeClass = json['SchemeClass']; + requestType = json['RequestType']; + patientID = json['PatientID']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['PatientIdentificationID'] = this.patientIdentificationID; + data['ProjectID'] = this.projectID; + data['MobileNo'] = this.mobileNo; + data['activityId'] = this.activityId; + data['component'] = this.component; + data['enableLogging'] = this.enableLogging; + data['InsuranceCompanyName'] = this.insuranceCompanyName; + data['CardHolderName'] = this.cardHolderName; + data['MemberShipNo'] = this.memberShipNo; + data['PolicyNo'] = this.policyNo; + data['SchemeClass'] = this.schemeClass; + data['RequestType'] = this.requestType; + data['PatientID'] = this.patientID; + return data; + } +} diff --git a/lib/core/model/insurance/insurance_approval.dart b/lib/core/model/insurance/insurance_approval.dart new file mode 100644 index 00000000..df8102bd --- /dev/null +++ b/lib/core/model/insurance/insurance_approval.dart @@ -0,0 +1,465 @@ +class InsuranceApprovalModel { + String? setupID; + int? projectID; + int? approvalNo; + 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; + 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.setupID, + this.projectID, + this.approvalNo, + 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.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) { + 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 && json['ApporvalDetails'].length != 0) { + 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']; + if (json['Speciality'] != null) 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['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['ApprovalNo'] = this.approvalNo; + data['ApprovalDate'] = this.approvalDate; + data['PatientType'] = this.patientType; + 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/insurance/insurance_card.dart b/lib/core/model/insurance/insurance_card.dart new file mode 100644 index 00000000..364a7269 --- /dev/null +++ b/lib/core/model/insurance/insurance_card.dart @@ -0,0 +1,93 @@ +class InsuranceCardModel { + 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; + String? groupName; + String? companyName; + int? companyID; + String? subCategoryDesc; + int? subCategoryID; + String? patientCardID; + String? insurancePolicyNumber; + bool? isActive; + String? cardValidTo; + + InsuranceCardModel( + {this.insurancePolicyNumber, + this.subCategoryDesc, + this.subCategoryID, + 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.groupName, + this.companyName, + this.companyID, + this.patientCardID, + this.isActive, + this.cardValidTo}); + + InsuranceCardModel.fromJson(Map json) { + isActive = json['IsActive']; + insurancePolicyNumber = json['InsurancePolicyNo']; + patientCardID = json['PatientCardID']; + companyName = json['CompanyName']; + companyID = json['CompanyID']; + groupName = json['GroupName']; + 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']; + subCategoryDesc = json['SubCategoryDesc']; + subCategoryID = json["SubCategoryID"]; + cardValidTo = json['CardValidTo']; + } + + 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['PatientType'] = this.patientType; + + return data; + } +} diff --git a/lib/core/model/insurance/insurance_card_update_model.dart b/lib/core/model/insurance/insurance_card_update_model.dart new file mode 100644 index 00000000..d14f65bd --- /dev/null +++ b/lib/core/model/insurance/insurance_card_update_model.dart @@ -0,0 +1,65 @@ + + +class InsuranceUpdateModel { + int? patientID; + int? patientType; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + String? createdOn; + String? statusDescription; + int? appointmentNo; + + InsuranceUpdateModel( + {this.patientID, + this.patientType, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.createdOn, + this.statusDescription}); + + InsuranceUpdateModel.fromJson(Map json) { + statusDescription = json['StatusDescription']; + patientID = json['PatientID']; + patientType = json['PatientType']; + 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']; + createdOn = json['CreatedOn']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientID'] = this.patientID; + data['PatientType'] = this.patientType; + 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/labs/LabOrderResult.dart b/lib/core/model/labs/LabOrderResult.dart new file mode 100644 index 00000000..d282c6b4 --- /dev/null +++ b/lib/core/model/labs/LabOrderResult.dart @@ -0,0 +1,88 @@ +class LabOrderResult { + String? description; + dynamic femaleInterpretativeData; + int? gender; + int? lineItemNo; + dynamic maleInterpretativeData; + dynamic notes; + String? packageID; + int? patientID; + String? projectID; + String? referanceRange; + String? resultValue; + String? sampleCollectedOn; + String? sampleReceivedOn; + String? setupID; + dynamic superVerifiedOn; + String? testCode; + String? uOM; + String? verifiedOn; + String? verifiedOnDateTime; + + LabOrderResult( + {this.description, + this.femaleInterpretativeData, + this.gender, + this.lineItemNo, + this.maleInterpretativeData, + this.notes, + this.packageID, + this.patientID, + this.projectID, + this.referanceRange, + this.resultValue, + this.sampleCollectedOn, + this.sampleReceivedOn, + this.setupID, + this.superVerifiedOn, + this.testCode, + this.uOM, + this.verifiedOn, + this.verifiedOnDateTime}); + + LabOrderResult.fromJson(Map json) { + description = json['Description']; + femaleInterpretativeData = json['FemaleInterpretativeData']; + gender = json['Gender']; + lineItemNo = json['LineItemNo']; + maleInterpretativeData = json['MaleInterpretativeData']; + notes = json['Notes']; + packageID = json['PackageID']; + patientID = json['PatientID']; + projectID = json['ProjectID']; + referanceRange = json['ReferanceRange']; + resultValue = json['ResultValue']; + sampleCollectedOn = json['SampleCollectedOn']; + sampleReceivedOn = json['SampleReceivedOn']; + setupID = json['SetupID']; + superVerifiedOn = json['SuperVerifiedOn']; + testCode = json['TestCode']; + uOM = json['UOM']; + verifiedOn = json['VerifiedOn']; + verifiedOnDateTime = json['VerifiedOnDateTime']; + } + + Map toJson() { + final Map data = new Map(); + data['Description'] = this.description; + data['FemaleInterpretativeData'] = this.femaleInterpretativeData; + data['Gender'] = this.gender; + data['LineItemNo'] = this.lineItemNo; + data['MaleInterpretativeData'] = this.maleInterpretativeData; + data['Notes'] = this.notes; + data['PackageID'] = this.packageID; + data['PatientID'] = this.patientID; + data['ProjectID'] = this.projectID; + data['ReferanceRange'] = this.referanceRange; + data['ResultValue'] = this.resultValue; + data['SampleCollectedOn'] = this.sampleCollectedOn; + data['SampleReceivedOn'] = this.sampleReceivedOn; + data['SetupID'] = this.setupID; + data['SuperVerifiedOn'] = this.superVerifiedOn; + data['TestCode'] = this.testCode; + data['UOM'] = this.uOM; + data['VerifiedOn'] = this.verifiedOn; + data['VerifiedOnDateTime'] = this.verifiedOnDateTime; + return data; + } +} diff --git a/lib/core/model/labs/lab_result.dart b/lib/core/model/labs/lab_result.dart new file mode 100644 index 00000000..3de55ff1 --- /dev/null +++ b/lib/core/model/labs/lab_result.dart @@ -0,0 +1,117 @@ +class LabResultList { + String? filterName = ""; + List? patientLabResultList = []; + + LabResultList({this.filterName, LabResult? lab}) { + patientLabResultList!.add(lab!); + } +} + +class LabResult { + String? description; + dynamic femaleInterpretativeData; + int? gender; + bool? isCertificateAllowed; + int? lineItemNo; + dynamic maleInterpretativeData; + dynamic notes; + int? orderLineItemNo; + int? orderNo; + String? packageID; + int? patientID; + String? projectID; + String? referanceRange; + String? resultValue; + int? resultValueBasedLineItemNo; + String? resultValueFlag; + String? sampleCollectedOn; + String? sampleReceivedOn; + String? setupID; + dynamic superVerifiedOn; + String? testCode; + String? uOM; + String? verifiedOn; + dynamic verifiedOnDateTime; + + LabResult( + {this.description, + this.femaleInterpretativeData, + this.gender, + this.isCertificateAllowed, + this.lineItemNo, + this.maleInterpretativeData, + this.notes, + this.orderLineItemNo, + this.orderNo, + this.packageID, + this.patientID, + this.projectID, + this.referanceRange, + this.resultValue, + this.resultValueBasedLineItemNo, + this.resultValueFlag, + this.sampleCollectedOn, + this.sampleReceivedOn, + this.setupID, + this.superVerifiedOn, + this.testCode, + this.uOM, + this.verifiedOn, + this.verifiedOnDateTime}); + + LabResult.fromJson(Map json) { + description = json['Description']; + femaleInterpretativeData = json['FemaleInterpretativeData']; + gender = json['Gender']; + isCertificateAllowed = json['IsCertificateAllowed']; + lineItemNo = json['LineItemNo']; + maleInterpretativeData = json['MaleInterpretativeData']; + notes = json['Notes']; + orderLineItemNo = json['OrderLineItemNo']; + orderNo = json['OrderNo']; + packageID = json['PackageID']; + patientID = json['PatientID']; + projectID = json['ProjectID']; + referanceRange = json['ReferanceRange']; + resultValue = json['ResultValue']; + resultValueBasedLineItemNo = json['ResultValueBasedLineItemNo']; + resultValueFlag = json['ResultValueFlag']; + sampleCollectedOn = json['SampleCollectedOn']; + sampleReceivedOn = json['SampleReceivedOn']; + setupID = json['SetupID']; + superVerifiedOn = json['SuperVerifiedOn']; + testCode = json['TestCode']; + uOM = json['UOM']; + verifiedOn = json['VerifiedOn']; + verifiedOnDateTime = json['VerifiedOnDateTime']; + } + + Map toJson() { + final Map data = new Map(); + data['Description'] = this.description; + data['FemaleInterpretativeData'] = this.femaleInterpretativeData; + data['Gender'] = this.gender; + data['IsCertificateAllowed'] = this.isCertificateAllowed; + data['LineItemNo'] = this.lineItemNo; + data['MaleInterpretativeData'] = this.maleInterpretativeData; + data['Notes'] = this.notes; + data['OrderLineItemNo'] = this.orderLineItemNo; + data['OrderNo'] = this.orderNo; + data['PackageID'] = this.packageID; + data['PatientID'] = this.patientID; + data['ProjectID'] = this.projectID; + data['ReferanceRange'] = this.referanceRange; + data['ResultValue'] = this.resultValue; + data['ResultValueBasedLineItemNo'] = this.resultValueBasedLineItemNo; + data['ResultValueFlag'] = this.resultValueFlag; + data['SampleCollectedOn'] = this.sampleCollectedOn; + data['SampleReceivedOn'] = this.sampleReceivedOn; + data['SetupID'] = this.setupID; + data['SuperVerifiedOn'] = this.superVerifiedOn; + data['TestCode'] = this.testCode; + data['UOM'] = this.uOM; + data['VerifiedOn'] = this.verifiedOn; + data['VerifiedOnDateTime'] = this.verifiedOnDateTime; + return data; + } +} diff --git a/lib/core/model/labs/patient_lab_orders.dart b/lib/core/model/labs/patient_lab_orders.dart new file mode 100644 index 00000000..2f3b1629 --- /dev/null +++ b/lib/core/model/labs/patient_lab_orders.dart @@ -0,0 +1,173 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class PatientLabOrders { + int? actualDoctorRate; + String? clinicDescription; + String? clinicDescriptionEnglish; + dynamic clinicDescriptionN; + int? clinicID; + int? doctorID; + String? doctorImageURL; + String? doctorName; + String? doctorNameEnglish; + dynamic doctorNameN; + int? doctorRate; + String ?doctorTitle; + int? gender; + String? genderDescription; + String? invoiceNo; + String? invoiceNo_VP; + String? invoiceType; + bool? isActiveDoctorProfile; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + bool? isInOutPatient; + String? isInOutPatientDescription; + String? isInOutPatientDescriptionN; + bool? isRead; + String? nationalityFlagURL; + int? noOfPatientsRate; + DateTime? orderDate; + String? orderNo; + String? patientID; + String? projectID; + String? projectName; + dynamic projectNameN; + String? qR; + String? setupID; + List? speciality; + bool? isLiveCareAppointment; + int? status; + String? statusDesc; + PatientLabOrders( + {this.actualDoctorRate, + this.clinicDescription, + this.clinicDescriptionEnglish, + this.clinicDescriptionN, + this.clinicID, + this.doctorID, + this.doctorImageURL, + this.doctorName, + this.doctorNameEnglish, + this.doctorNameN, + this.doctorRate, + this.doctorTitle, + this.gender, + this.genderDescription, + this.invoiceNo, + this.isActiveDoctorProfile, + this.isDoctorAllowVedioCall, + this.isExecludeDoctor, + this.isInOutPatient, + this.isInOutPatientDescription, + this.isInOutPatientDescriptionN, + this.isRead, + this.nationalityFlagURL, + this.noOfPatientsRate, + this.orderDate, + this.orderNo, + this.patientID, + this.projectID, + this.projectName, + this.projectNameN, + this.qR, + this.setupID, + this.invoiceNo_VP, + this.invoiceType, + this.speciality, + this.isLiveCareAppointment, + this.status, + this.statusDesc,}); + + PatientLabOrders.fromJson(Map json) { + actualDoctorRate = json['ActualDoctorRate']; + clinicDescription = json['ClinicDescription']; + clinicDescriptionEnglish = json['ClinicDescriptionEnglish']; + clinicDescriptionN = json['ClinicDescriptionN']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + doctorImageURL = json['DoctorImageURL']; + doctorName = json['DoctorName']; + doctorNameEnglish = json['DoctorNameEnglish']; + doctorNameN = json['DoctorNameN']; + doctorRate = json['DoctorRate']; + doctorTitle = json['DoctorTitle']; + gender = json['Gender']; + genderDescription = json['GenderDescription']; + invoiceNo = json['InvoiceNo']; + isActiveDoctorProfile = json['IsActiveDoctorProfile']; + isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; + isExecludeDoctor = json['IsExecludeDoctor']; + isInOutPatient = json['IsInOutPatient']; + isInOutPatientDescription = json['IsInOutPatientDescription']; + isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN']; + isRead = json['IsRead']; + nationalityFlagURL = json['NationalityFlagURL']; + noOfPatientsRate = json['NoOfPatientsRate']; + orderDate = DateUtil.convertStringToDate(json['OrderDate']); + orderNo = json['OrderNo']; + patientID = json['PatientID']; + projectID = json['ProjectID']; + projectName = json['ProjectName']; + projectNameN = json['ProjectNameN']; + qR = json['QR']; + setupID = json['SetupID']; + invoiceNo_VP = json['invoiceNo_VP']; + invoiceType = json['InvoiceType']; + isLiveCareAppointment = json['IsLiveCareAppointment']; + status = json['Status']; + statusDesc = json['StatusDesc']; + // speciality = json['Speciality'].cast(); + } + + Map toJson() { + final Map data = new Map(); + data['ActualDoctorRate'] = this.actualDoctorRate; + data['ClinicDescription'] = this.clinicDescription; + data['ClinicDescriptionEnglish'] = this.clinicDescriptionEnglish; + data['ClinicDescriptionN'] = this.clinicDescriptionN; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorName'] = this.doctorName; + data['DoctorNameEnglish'] = this.doctorNameEnglish; + data['DoctorNameN'] = this.doctorNameN; + data['DoctorRate'] = this.doctorRate; + data['DoctorTitle'] = this.doctorTitle; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['InvoiceNo'] = this.invoiceNo; + data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile; + data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; + data['IsExecludeDoctor'] = this.isExecludeDoctor; + data['IsInOutPatient'] = this.isInOutPatient; + data['IsInOutPatientDescription'] = this.isInOutPatientDescription; + data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN; + data['IsRead'] = this.isRead; + data['NationalityFlagURL'] = this.nationalityFlagURL; + data['NoOfPatientsRate'] = this.noOfPatientsRate; + data['OrderDate'] = this.orderDate; + data['OrderNo'] = this.orderNo; + data['PatientID'] = this.patientID; + data['ProjectID'] = this.projectID; + data['ProjectName'] = this.projectName; + data['ProjectNameN'] = this.projectNameN; + data['QR'] = this.qR; + data['SetupID'] = this.setupID; + data['Speciality'] = this.speciality; + data['IsLiveCareAppointment'] = this.isLiveCareAppointment; + data['invoiceNo_VP'] = this.invoiceNo_VP; + data['Status'] = this.status; + data['StatusDesc'] = this.statusDesc; + return data; + } +} + +class PatientLabOrdersList { + String? filterName = ""; + List patientLabOrdersList = []; + + PatientLabOrdersList({this.filterName, required PatientLabOrders patientDoctorAppointment}) { + patientLabOrdersList.add(patientDoctorAppointment); + } +} diff --git a/lib/core/model/labs/patient_lab_special_result.dart b/lib/core/model/labs/patient_lab_special_result.dart new file mode 100644 index 00000000..87301f94 --- /dev/null +++ b/lib/core/model/labs/patient_lab_special_result.dart @@ -0,0 +1,32 @@ +class PatientLabSpecialResult { + String? invoiceNo; + String? moduleID; + String? resultData; + String? resultDataHTML; + dynamic resultDataTxt; + + PatientLabSpecialResult( + {this.invoiceNo, + this.moduleID, + this.resultData, + this.resultDataHTML, + this.resultDataTxt}); + + PatientLabSpecialResult.fromJson(Map json) { + invoiceNo = json['InvoiceNo']; + moduleID = json['ModuleID']; + resultData = json['ResultData']; + resultDataHTML = json['ResultDataHTML']; + resultDataTxt = json['ResultDataTxt']; + } + + Map toJson() { + final Map data = new Map(); + data['InvoiceNo'] = this.invoiceNo; + data['ModuleID'] = this.moduleID; + data['ResultData'] = this.resultData; + data['ResultDataHTML'] = this.resultDataHTML; + data['ResultDataTxt'] = this.resultDataTxt; + return data; + } +} diff --git a/lib/core/model/labs/request_patient_lab_orders.dart b/lib/core/model/labs/request_patient_lab_orders.dart new file mode 100644 index 00000000..9f9dd4d3 --- /dev/null +++ b/lib/core/model/labs/request_patient_lab_orders.dart @@ -0,0 +1,64 @@ +class RequestPatientLabOrders { + 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; + + RequestPatientLabOrders( + {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}); + + RequestPatientLabOrders.fromJson(Map json) { + 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']; + } + + 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['PatientType'] = this.patientType; + return data; + } +} diff --git a/lib/core/model/labs/request_patient_lab_special_result.dart b/lib/core/model/labs/request_patient_lab_special_result.dart new file mode 100644 index 00000000..b1e1e4e3 --- /dev/null +++ b/lib/core/model/labs/request_patient_lab_special_result.dart @@ -0,0 +1,92 @@ +class RequestPatientLabSpecialResult { + String? invoiceNo; + String? invoiceNoVP; + String? invoiceType; + String? orderNo; + String? setupID; + String? projectID; + int? clinicID; + 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; + + RequestPatientLabSpecialResult( + {this.invoiceNo, + this.invoiceNoVP, + this.invoiceType, + this.orderNo, + this.setupID, + this.projectID, + this.clinicID, + 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}); + + RequestPatientLabSpecialResult.fromJson(Map json) { + invoiceNo = json['InvoiceNo']; + invoiceNo = json['InvoiceNo_VP']; + invoiceType = json['InvoiceType']; + orderNo = json['OrderNo']; + setupID = json['SetupID']; + projectID = json['ProjectID']; + clinicID = json['ClinicID']; + 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']; + } + + Map toJson() { + final Map data = new Map(); + data['InvoiceNo'] = this.invoiceNo; + data['InvoiceNo_VP'] = this.invoiceNoVP; + data['InvoiceType'] = this.invoiceType; + data['OrderNo'] = this.orderNo; + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['ClinicID'] = this.clinicID; + 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['PatientType'] = this.patientType; + return data; + } +} diff --git a/lib/core/model/labs/request_send_lab_report_email.dart b/lib/core/model/labs/request_send_lab_report_email.dart new file mode 100644 index 00000000..bfd99e52 --- /dev/null +++ b/lib/core/model/labs/request_send_lab_report_email.dart @@ -0,0 +1,132 @@ +class RequestSendLabReportEmail { + 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; + String? to; + String? dateofBirth; + String? patientIditificationNum; + String? patientMobileNumber; + String? patientName; + String? setupID; + String? projectName; + String? clinicName; + String? doctorName; + String? projectID; + String? invoiceNo; + String? invoiceNoVP; + String? invoiceType; + String? orderDate; + String? orderNo; + bool? isDownload; + int? doctorID; + + RequestSendLabReportEmail( + {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.to, + this.dateofBirth, + this.patientIditificationNum, + this.patientMobileNumber, + this.patientName, + this.setupID, + this.projectName, + this.clinicName, + this.doctorName, + this.projectID, + this.invoiceNo, + this.invoiceNoVP, + this.invoiceType, + this.orderDate, + this.orderNo, + this.isDownload, + this.doctorID}); + + RequestSendLabReportEmail.fromJson(Map json) { + 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']; + to = json['To']; + dateofBirth = json['DateofBirth']; + patientIditificationNum = json['PatientIditificationNum']; + patientMobileNumber = json['PatientMobileNumber']; + patientName = json['PatientName']; + setupID = json['SetupID']; + projectName = json['ProjectName']; + clinicName = json['ClinicName']; + doctorName = json['DoctorName']; + projectID = json['ProjectID']; + invoiceNo = json['InvoiceNo']; + invoiceNoVP = json['InvoiceNo_VP']; + invoiceType = json['InvoiceType']; + orderDate = json['OrderDate']; + orderNo = json['OrderNo']; + isDownload = json['IsDownload']; + doctorID = json['DoctorID']; + } + + 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['PatientType'] = this.patientType; + data['To'] = this.to; + data['DateofBirth'] = this.dateofBirth; + data['PatientIditificationNum'] = this.patientIditificationNum; + data['PatientMobileNumber'] = this.patientMobileNumber; + data['PatientName'] = this.patientName; + data['SetupID'] = this.setupID; + data['ProjectName'] = this.projectName; + data['ClinicName'] = this.clinicName; + data['DoctorName'] = this.doctorName; + data['ProjectID'] = this.projectID; + data['InvoiceNo'] = this.invoiceNo; + data['InvoiceNo_VP'] = this.invoiceNoVP; + data['InvoiceType'] = this.invoiceType; + data['OrderDate'] = this.orderDate; + data['OrderNo'] = this.orderNo; + data['IsDownload'] = this.isDownload; + data['DoctorID'] = this.doctorID; + return data; + } +} diff --git a/lib/core/model/my_balance/AdvanceModel.dart b/lib/core/model/my_balance/AdvanceModel.dart new file mode 100644 index 00000000..a186f9f6 --- /dev/null +++ b/lib/core/model/my_balance/AdvanceModel.dart @@ -0,0 +1,27 @@ +import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; + +class AdvanceModel { + String? fileNumber; + String? amount; + HospitalsModel? hospitalsModel; + String? email; + String? note; + String? depositorName; + String? mobileNumber; + String? patientName; + int? projectID; + CitiesModel? citiessModel; + + AdvanceModel( + {this.amount, + this.email, + this.note, + this.hospitalsModel, + this.fileNumber, + this.depositorName, + this.mobileNumber, + this.patientName, + this.projectID, + this.citiessModel}); +} diff --git a/lib/core/model/my_balance/patient_advance_balance_amount.dart b/lib/core/model/my_balance/patient_advance_balance_amount.dart new file mode 100644 index 00000000..3d8b133f --- /dev/null +++ b/lib/core/model/my_balance/patient_advance_balance_amount.dart @@ -0,0 +1,28 @@ +class PatientAdvanceBalanceAmount { + num? distanceInKilometers; + dynamic patientAdvanceBalanceAmount; + String? projectDescription; + int? projectID; + + PatientAdvanceBalanceAmount( + {this.distanceInKilometers, + this.patientAdvanceBalanceAmount, + this.projectDescription, + this.projectID}); + + PatientAdvanceBalanceAmount.fromJson(Map json) { + distanceInKilometers = json['DistanceInKilometers']; + patientAdvanceBalanceAmount = json['PatientAdvanceBalanceAmount']; + projectDescription = json['ProjectDescription']; + projectID = json['ProjectID']; + } + + Map toJson() { + final Map data = new Map(); + data['DistanceInKilometers'] = this.distanceInKilometers; + data['PatientAdvanceBalanceAmount'] = this.patientAdvanceBalanceAmount; + data['ProjectDescription'] = this.projectDescription; + data['ProjectID'] = this.projectID; + return data; + } +} diff --git a/lib/core/model/my_balance/patient_info.dart b/lib/core/model/my_balance/patient_info.dart new file mode 100644 index 00000000..0f307ec4 --- /dev/null +++ b/lib/core/model/my_balance/patient_info.dart @@ -0,0 +1,32 @@ +class PatientInfo { + String? fullName; + String? mobileNumber; + int? patientID; + int? projectID; + String? zipCode; + + PatientInfo( + {this.fullName, + this.mobileNumber, + this.patientID, + this.projectID, + this.zipCode}); + + PatientInfo.fromJson(Map json) { + fullName = json['FullName']; + mobileNumber = json['MobileNumber']; + patientID = json['PatientID']; + projectID = json['ProjectID']; + zipCode = json['ZipCode']; + } + + Map toJson() { + final Map data = new Map(); + data['FullName'] = this.fullName; + data['MobileNumber'] = this.mobileNumber; + data['PatientID'] = this.patientID; + data['ProjectID'] = this.projectID; + data['ZipCode'] = this.zipCode; + return data; + } +} diff --git a/lib/core/model/my_balance/patient_info_and_mobile_number.dart b/lib/core/model/my_balance/patient_info_and_mobile_number.dart new file mode 100644 index 00000000..45b9402e --- /dev/null +++ b/lib/core/model/my_balance/patient_info_and_mobile_number.dart @@ -0,0 +1,84 @@ +class PatientInfoAndMobileNumber { + String? setupID; + int? projectID; + int? mainAccountID; + int? patientType; + int? patientID; + String? firstName; + dynamic middleName; + dynamic lastName; + dynamic firstNameN; + dynamic middleNameN; + dynamic lastNameN; + dynamic gender; + dynamic dateofBirth; + dynamic dateofBirthN; + dynamic nationalityID; + String? mobileNumber; + String? emailAddress; + dynamic zipCode; + + PatientInfoAndMobileNumber( + {this.setupID, + this.projectID, + this.mainAccountID, + this.patientType, + this.patientID, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.gender, + this.dateofBirth, + this.dateofBirthN, + this.nationalityID, + this.mobileNumber, + this.emailAddress, + this.zipCode}); + + PatientInfoAndMobileNumber.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + mainAccountID = json['MainAccountID']; + patientType = json['PatientType']; + patientID = json['PatientID']; + firstName = json['FirstName']; + middleName = json['MiddleName']; + lastName = json['LastName']; + firstNameN = json['FirstNameN']; + middleNameN = json['MiddleNameN']; + lastNameN = json['LastNameN']; + gender = json['Gender']; + dateofBirth = json['DateofBirth']; + dateofBirthN = json['DateofBirthN']; + nationalityID = json['NationalityID']; + mobileNumber = json['MobileNumber']; + emailAddress = json['EmailAddress']; + zipCode = json['ZipCode']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['MainAccountID'] = this.mainAccountID; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['FirstName'] = this.firstName; + data['MiddleName'] = this.middleName; + data['LastName'] = this.lastName; + data['FirstNameN'] = this.firstNameN; + data['MiddleNameN'] = this.middleNameN; + data['LastNameN'] = this.lastNameN; + data['Gender'] = this.gender; + data['DateofBirth'] = this.dateofBirth; + data['DateofBirthN'] = this.dateofBirthN; + data['NationalityID'] = this.nationalityID; + data['MobileNumber'] = this.mobileNumber; + data['EmailAddress'] = this.emailAddress; + data['ZipCode'] = this.zipCode; + return data; + } +} diff --git a/lib/core/model/my_balance/tamara_installment_details.dart b/lib/core/model/my_balance/tamara_installment_details.dart new file mode 100644 index 00000000..12769cdd --- /dev/null +++ b/lib/core/model/my_balance/tamara_installment_details.dart @@ -0,0 +1,83 @@ +class TamaraInstallmentDetails { + String? name; + String? description; + MinLimit? minLimit; + MinLimit? maxLimit; + List? supportedInstalments; + + TamaraInstallmentDetails({this.name, this.description, this.minLimit, this.maxLimit, this.supportedInstalments}); + + TamaraInstallmentDetails.fromJson(Map json) { + name = json['name']; + description = json['description']; + minLimit = json['minLimit'] != null ? new MinLimit.fromJson(json['minLimit']) : null; + maxLimit = json['maxLimit'] != null ? new MinLimit.fromJson(json['maxLimit']) : null; + if (json['supportedInstalments'] != null) { + supportedInstalments = []; + json['supportedInstalments'].forEach((v) { + supportedInstalments!.add(new SupportedInstalments.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + data['name'] = this.name; + data['description'] = this.description; + if (this.minLimit != null) { + data['minLimit'] = this.minLimit!.toJson(); + } + if (this.maxLimit != null) { + data['maxLimit'] = this.maxLimit!.toJson(); + } + if (this.supportedInstalments != null) { + data['supportedInstalments'] = this.supportedInstalments!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class MinLimit { + String? currency; + int? amount; + + MinLimit({this.currency, this.amount}); + + MinLimit.fromJson(Map json) { + currency = json['currency']; + amount = json['amount']; + } + + Map toJson() { + final Map data = new Map(); + data['currency'] = this.currency; + data['amount'] = this.amount; + return data; + } +} + +class SupportedInstalments { + int? instalments; + MinLimit? minLimit; + MinLimit? maxLimit; + + SupportedInstalments({this.instalments, this.minLimit, this.maxLimit}); + + SupportedInstalments.fromJson(Map json) { + instalments = json['instalments']; + minLimit = json['minLimit'] != null ? new MinLimit.fromJson(json['minLimit']) : null; + maxLimit = json['maxLimit'] != null ? new MinLimit.fromJson(json['maxLimit']) : null; + } + + Map toJson() { + final Map data = new Map(); + data['instalments'] = this.instalments; + if (this.minLimit != null) { + data['minLimit'] = this.minLimit!.toJson(); + } + if (this.maxLimit != null) { + data['maxLimit'] = this.maxLimit!.toJson(); + } + return data; + } +} diff --git a/lib/core/model/my_trakers/blood_pressur/BloodPressureResult.dart b/lib/core/model/my_trakers/blood_pressur/BloodPressureResult.dart new file mode 100644 index 00000000..1528c5f7 --- /dev/null +++ b/lib/core/model/my_trakers/blood_pressur/BloodPressureResult.dart @@ -0,0 +1,90 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class BloodPressureResult { + int? patientID; + int? lineItemNo; + DateTime? bloodPressureDate; + int? measuredArm; + int? systolicePressure; + int? diastolicPressure; + dynamic remark; + bool? isActive; + int? chartYear; + String? chartMonth; + dynamic yearSystolicePressureAverageResult; + dynamic monthSystolicePressureResult; + dynamic weekSystolicePressureResult; + int? yearDiastolicPressureAverageResult; + dynamic monthDiastolicPressureResult; + dynamic weekDiastolicPressureResult; + String? measuredArmDesc; + dynamic weekDesc; + + BloodPressureResult( + {this.patientID, + this.lineItemNo, + this.bloodPressureDate, + this.measuredArm, + this.systolicePressure, + this.diastolicPressure, + this.remark, + this.isActive, + this.chartYear, + this.chartMonth, + this.yearSystolicePressureAverageResult, + this.monthSystolicePressureResult, + this.weekSystolicePressureResult, + this.yearDiastolicPressureAverageResult, + this.monthDiastolicPressureResult, + this.weekDiastolicPressureResult, + this.measuredArmDesc, + this.weekDesc}); + + BloodPressureResult.fromJson(Map json) { + patientID = json['PatientID']; + lineItemNo = json['LineItemNo']; + bloodPressureDate =DateUtil.convertStringToDate(json['BloodPressureDate']); + measuredArm = json['MeasuredArm']; + systolicePressure = json['SystolicePressure']; + diastolicPressure = json['DiastolicPressure']; + remark = json['Remark']; + isActive = json['IsActive']; + chartYear = json['ChartYear']; + chartMonth = json['ChartMonth']; + yearSystolicePressureAverageResult = + json['YearSystolicePressureAverageResult']; + monthSystolicePressureResult = json['MonthSystolicePressureResult']; + weekSystolicePressureResult = json['WeekSystolicePressureResult']; + yearDiastolicPressureAverageResult = + json['YearDiastolicPressureAverageResult']; + monthDiastolicPressureResult = json['MonthDiastolicPressureResult']; + weekDiastolicPressureResult = json['WeekDiastolicPressureResult']; + measuredArmDesc = json['MeasuredArmDesc']; + weekDesc = json['WeekDesc']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientID'] = this.patientID; + data['LineItemNo'] = this.lineItemNo; + data['BloodPressureDate'] = this.bloodPressureDate; + data['MeasuredArm'] = this.measuredArm; + data['SystolicePressure'] = this.systolicePressure; + data['DiastolicPressure'] = this.diastolicPressure; + data['Remark'] = this.remark; + data['IsActive'] = this.isActive; + data['ChartYear'] = this.chartYear; + data['ChartMonth'] = this.chartMonth; + data['YearSystolicePressureAverageResult'] = + this.yearSystolicePressureAverageResult; + data['MonthSystolicePressureResult'] = this.monthSystolicePressureResult; + data['WeekSystolicePressureResult'] = this.weekSystolicePressureResult; + data['YearDiastolicPressureAverageResult'] = + this.yearDiastolicPressureAverageResult; + data['MonthDiastolicPressureResult'] = this.monthDiastolicPressureResult; + data['WeekDiastolicPressureResult'] = this.weekDiastolicPressureResult; + data['MeasuredArmDesc'] = this.measuredArmDesc; + data['WeekDesc'] = this.weekDesc; + return data; + } +} diff --git a/lib/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart b/lib/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart new file mode 100644 index 00000000..ea0061a1 --- /dev/null +++ b/lib/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart @@ -0,0 +1,76 @@ +class MonthBloodPressureResultAverage { + dynamic weekfourSystolicePressureAverageResult; + dynamic weekfourDiastolicPressureAverageResult; + dynamic weekthreeSystolicePressureAverageResult; + dynamic weekthreeDiastolicPressureAverageResult; + dynamic weektwoSystolicePressureAverageResult; + dynamic weektwoDiastolicPressureAverageResult; + dynamic weekoneSystolicePressureAverageResult; + dynamic weekoneDiastolicPressureAverageResult; + String? weekDesc; + int? weekDiastolicPressureAverageResult; + int? weekSystolicePressureAverageResult; + + MonthBloodPressureResultAverage( + {this.weekfourSystolicePressureAverageResult, + this.weekfourDiastolicPressureAverageResult, + this.weekthreeSystolicePressureAverageResult, + this.weekthreeDiastolicPressureAverageResult, + this.weektwoSystolicePressureAverageResult, + this.weektwoDiastolicPressureAverageResult, + this.weekoneSystolicePressureAverageResult, + this.weekoneDiastolicPressureAverageResult, + this.weekDesc, + this.weekDiastolicPressureAverageResult, + this.weekSystolicePressureAverageResult}); + + MonthBloodPressureResultAverage.fromJson(Map json) { + weekfourSystolicePressureAverageResult = + json['weekfourSystolicePressureAverageResult']; + weekfourDiastolicPressureAverageResult = + json['weekfourDiastolicPressureAverageResult']; + weekthreeSystolicePressureAverageResult = + json['weekthreeSystolicePressureAverageResult']; + weekthreeDiastolicPressureAverageResult = + json['weekthreeDiastolicPressureAverageResult']; + weektwoSystolicePressureAverageResult = + json['weektwoSystolicePressureAverageResult']; + weektwoDiastolicPressureAverageResult = + json['weektwoDiastolicPressureAverageResult']; + weekoneSystolicePressureAverageResult = + json['weekoneSystolicePressureAverageResult']; + weekoneDiastolicPressureAverageResult = + json['weekoneDiastolicPressureAverageResult']; + weekDesc = json['WeekDesc']; + weekDiastolicPressureAverageResult = + json['WeekDiastolicPressureAverageResult']; + weekSystolicePressureAverageResult = + json['WeekSystolicePressureAverageResult']; + } + + Map toJson() { + final Map data = new Map(); + data['weekfourSystolicePressureAverageResult'] = + this.weekfourSystolicePressureAverageResult; + data['weekfourDiastolicPressureAverageResult'] = + this.weekfourDiastolicPressureAverageResult; + data['weekthreeSystolicePressureAverageResult'] = + this.weekthreeSystolicePressureAverageResult; + data['weekthreeDiastolicPressureAverageResult'] = + this.weekthreeDiastolicPressureAverageResult; + data['weektwoSystolicePressureAverageResult'] = + this.weektwoSystolicePressureAverageResult; + data['weektwoDiastolicPressureAverageResult'] = + this.weektwoDiastolicPressureAverageResult; + data['weekoneSystolicePressureAverageResult'] = + this.weekoneSystolicePressureAverageResult; + data['weekoneDiastolicPressureAverageResult'] = + this.weekoneDiastolicPressureAverageResult; + data['WeekDesc'] = this.weekDesc; + data['WeekDiastolicPressureAverageResult'] = + this.weekDiastolicPressureAverageResult; + data['WeekSystolicePressureAverageResult'] = + this.weekSystolicePressureAverageResult; + return data; + } +} diff --git a/lib/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart b/lib/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart new file mode 100644 index 00000000..b3fd4b7f --- /dev/null +++ b/lib/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart @@ -0,0 +1,30 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class WeekBloodPressureResultAverage { + int? dailySystolicePressureAverageResult; + int? dailyDiastolicPressureAverageResult; + DateTime? bloodPressureDate; + + WeekBloodPressureResultAverage( + {this.dailySystolicePressureAverageResult, + this.dailyDiastolicPressureAverageResult, + this.bloodPressureDate}); + + WeekBloodPressureResultAverage.fromJson(Map json) { + dailySystolicePressureAverageResult = + json['DailySystolicePressureAverageResult']; + dailyDiastolicPressureAverageResult = + json['DailyDiastolicPressureAverageResult']; + bloodPressureDate = DateUtil.convertStringToDate(json['BloodPressureDate']); + } + + Map toJson() { + final Map data = new Map(); + data['DailySystolicePressureAverageResult'] = + this.dailySystolicePressureAverageResult; + data['DailyDiastolicPressureAverageResult'] = + this.dailyDiastolicPressureAverageResult; + data['BloodPressureDate'] = this.bloodPressureDate; + return data; + } +} diff --git a/lib/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart b/lib/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart new file mode 100644 index 00000000..bd78d04c --- /dev/null +++ b/lib/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart @@ -0,0 +1,41 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class YearBloodPressureResultAverage { + int? monthSystolicePressureAverageResult; + int? monthDiastolicPressureAverageResult; + dynamic monthNumber; + String? monthName; + String? yearName; + DateTime? date; + + YearBloodPressureResultAverage( + {this.monthSystolicePressureAverageResult, + this.monthDiastolicPressureAverageResult, + this.monthNumber, + this.monthName, + this.yearName}); + + YearBloodPressureResultAverage.fromJson(Map json) { + monthSystolicePressureAverageResult = + json['monthSystolicePressureAverageResult']; + monthDiastolicPressureAverageResult = + json['monthDiastolicPressureAverageResult']; + monthNumber = json['monthNumber']; + monthName = json['monthName']; + yearName = json['yearName']; + date = DateUtil.getMonthDateTime(monthName!,yearName); + + } + + Map toJson() { + final Map data = new Map(); + data['monthSystolicePressureAverageResult'] = + this.monthSystolicePressureAverageResult; + data['monthDiastolicPressureAverageResult'] = + this.monthDiastolicPressureAverageResult; + data['monthNumber'] = this.monthNumber; + data['monthName'] = this.monthName; + data['yearName'] = this.yearName; + return data; + } +} diff --git a/lib/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart b/lib/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart new file mode 100644 index 00000000..62decb02 --- /dev/null +++ b/lib/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart @@ -0,0 +1,98 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class DiabtecPatientResult { + String? chartMonth; + var chartYear; + DateTime? dateChart; + var description; + var descriptionN; + int? diabtecAvarage; + bool? isActive; + int? lineItemNo; + var listMonth; + var listWeek; + int? measured; + String? measuredDesc; + var monthAverageResult; + int? patientID; + var remark; + var resultDesc; + dynamic resultValue; + String? unit; + var weekAverageResult; + String? weekDesc; + var yearAverageResult; + + DiabtecPatientResult( + {this.chartMonth, + this.chartYear, + this.dateChart, + this.description, + this.descriptionN, + this.diabtecAvarage, + this.isActive, + this.lineItemNo, + this.listMonth, + this.listWeek, + this.measured, + this.measuredDesc, + this.monthAverageResult, + this.patientID, + this.remark, + this.resultDesc, + this.resultValue, + this.unit, + this.weekAverageResult, + this.weekDesc, + this.yearAverageResult}); + + DiabtecPatientResult.fromJson(Map json) { + chartMonth = json['ChartMonth']; + chartYear = json['ChartYear']; + dateChart = DateUtil.convertStringToDate(json['DateChart']); + description = json['Description']; + descriptionN = json['DescriptionN']; + diabtecAvarage = json['DiabtecAvarage']; + isActive = json['IsActive']; + lineItemNo = json['LineItemNo']; + listMonth = json['List_Month']; + listWeek = json['List_Week']; + measured = json['Measured']; + measuredDesc = json['MeasuredDesc']; + monthAverageResult = json['MonthAverageResult']; + patientID = json['PatientID']; + remark = json['Remark']; + resultDesc = json['ResultDesc']; + resultValue = json['ResultValue']; + unit = json['Unit']; + weekAverageResult = json['WeekAverageResult']; + weekDesc = json['WeekDesc']; + yearAverageResult = json['YearAverageResult']; + } + + Map toJson() { + final Map data = new Map(); + data['ChartMonth'] = this.chartMonth; + data['ChartYear'] = this.chartYear; + data['DateChart'] = DateUtil.convertDateToString(this.dateChart!); + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + data['DiabtecAvarage'] = this.diabtecAvarage; + data['IsActive'] = this.isActive; + data['LineItemNo'] = this.lineItemNo; + data['List_Month'] = this.listMonth; + data['List_Week'] = this.listWeek; + data['Measured'] = this.measured; + data['MeasuredDesc'] = this.measuredDesc; + data['MonthAverageResult'] = this.monthAverageResult; + data['PatientID'] = this.patientID; + data['Remark'] = this.remark; + data['ResultDesc'] = this.resultDesc; + data['ResultValue'] = this.resultValue; + data['Unit'] = this.unit; + data['WeekAverageResult'] = this.weekAverageResult; + data['WeekDesc'] = this.weekDesc; + data['YearAverageResult'] = this.yearAverageResult; + return data; + } +} diff --git a/lib/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart b/lib/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart new file mode 100644 index 00000000..c52c08f3 --- /dev/null +++ b/lib/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart @@ -0,0 +1,36 @@ +class MonthDiabtectResultAverage { + var weekfourAverageResult; + var weekthreeAverageResult; + var weektwoAverageResult; + var weekoneAverageResult; + dynamic weekAverageResult; + String? weekDesc; + + MonthDiabtectResultAverage( + {this.weekfourAverageResult, + this.weekthreeAverageResult, + this.weektwoAverageResult, + this.weekoneAverageResult, + this.weekAverageResult, + this.weekDesc}); + + MonthDiabtectResultAverage.fromJson(Map json) { + weekfourAverageResult = json['weekfourAverageResult']; + weekthreeAverageResult = json['weekthreeAverageResult']; + weektwoAverageResult = json['weektwoAverageResult']; + weekoneAverageResult = json['weekoneAverageResult']; + weekAverageResult = json['WeekAverageResult']; + weekDesc = json['WeekDesc']; + } + + Map toJson() { + final Map data = new Map(); + data['weekfourAverageResult'] = this.weekfourAverageResult; + data['weekthreeAverageResult'] = this.weekthreeAverageResult; + data['weektwoAverageResult'] = this.weektwoAverageResult; + data['weekoneAverageResult'] = this.weekoneAverageResult; + data['WeekAverageResult'] = this.weekAverageResult; + data['WeekDesc'] = this.weekDesc; + return data; + } +} diff --git a/lib/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart b/lib/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart new file mode 100644 index 00000000..4d7c7952 --- /dev/null +++ b/lib/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart @@ -0,0 +1,20 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class WeekDiabtectResultAverage { + dynamic dailyAverageResult; + DateTime? dateChart; + + WeekDiabtectResultAverage({this.dailyAverageResult, this.dateChart}); + + WeekDiabtectResultAverage.fromJson(Map json) { + dailyAverageResult = json['DailyAverageResult']; + dateChart = DateUtil.convertStringToDate(json['DateChart']); + } + + Map toJson() { + final Map data = new Map(); + data['DailyAverageResult'] = this.dailyAverageResult; + data['DateChart'] = DateUtil.convertDateToString(this.dateChart!); + return data; + } +} diff --git a/lib/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart b/lib/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart new file mode 100644 index 00000000..8521e011 --- /dev/null +++ b/lib/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart @@ -0,0 +1,36 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class YearDiabtecResultAverage { + dynamic monthAverageResult; + var monthNumber; + String? monthName; + String? yearName; + DateTime? date; + + YearDiabtecResultAverage( + {this.monthAverageResult, + this.monthNumber, + this.monthName, + this.yearName}); + + YearDiabtecResultAverage.fromJson(Map json) { + try { + monthAverageResult = json['monthAverageResult']; + monthNumber = json['monthNumber']; + monthName = json['monthName']; + yearName = json['yearName']; + date = DateUtil.getMonthDateTime(monthName!,yearName); + } catch (e) { + print(e); + } + } + + Map toJson() { + final Map data = new Map(); + data['monthAverageResult'] = this.monthAverageResult; + data['monthNumber'] = this.monthNumber; + data['monthName'] = this.monthName; + data['yearName'] = this.yearName; + return data; + } +} diff --git a/lib/core/model/my_trakers/chartData/WeekChartDate.dart b/lib/core/model/my_trakers/chartData/WeekChartDate.dart new file mode 100644 index 00000000..ae3a9f47 --- /dev/null +++ b/lib/core/model/my_trakers/chartData/WeekChartDate.dart @@ -0,0 +1,6 @@ +class WeekChartDate { + final DateTime? x; + final dynamic y; + + WeekChartDate({this.x, this.y}); +} \ No newline at end of file diff --git a/lib/core/model/my_trakers/chartData/YearMonthlyChartDate.dart b/lib/core/model/my_trakers/chartData/YearMonthlyChartDate.dart new file mode 100644 index 00000000..96adca21 --- /dev/null +++ b/lib/core/model/my_trakers/chartData/YearMonthlyChartDate.dart @@ -0,0 +1,6 @@ + class YearMonthlyChartDate { + final dynamic x; + final dynamic y; + + YearMonthlyChartDate({this.x, this.y}); +} diff --git a/lib/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart b/lib/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart new file mode 100644 index 00000000..0296399a --- /dev/null +++ b/lib/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart @@ -0,0 +1,36 @@ +class MonthWeightMeasurementResultAverage { + dynamic weekfourAverageResult; + dynamic weekthreeAverageResult; + dynamic weektwoAverageResult; + dynamic weekoneAverageResult; + dynamic weekAverageResult; + String? weekDesc; + + MonthWeightMeasurementResultAverage( + {this.weekfourAverageResult, + this.weekthreeAverageResult, + this.weektwoAverageResult, + this.weekoneAverageResult, + this.weekAverageResult, + this.weekDesc}); + + MonthWeightMeasurementResultAverage.fromJson(Map json) { + weekfourAverageResult = json['weekfourAverageResult']; + weekthreeAverageResult = json['weekthreeAverageResult']; + weektwoAverageResult = json['weektwoAverageResult']; + weekoneAverageResult = json['weekoneAverageResult']; + weekAverageResult = json['WeekAverageResult']; + weekDesc = json['WeekDesc']; + } + + Map toJson() { + final Map data = new Map(); + data['weekfourAverageResult'] = this.weekfourAverageResult; + data['weekthreeAverageResult'] = this.weekthreeAverageResult; + data['weektwoAverageResult'] = this.weektwoAverageResult; + data['weekoneAverageResult'] = this.weekoneAverageResult; + data['WeekAverageResult'] = this.weekAverageResult; + data['WeekDesc'] = this.weekDesc; + return data; + } +} diff --git a/lib/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart b/lib/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart new file mode 100644 index 00000000..1c3566a9 --- /dev/null +++ b/lib/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart @@ -0,0 +1,21 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class WeekWeightMeasurementResultAverage { + dynamic dailyAverageResult; + DateTime? weightDate; + + WeekWeightMeasurementResultAverage( + {this.dailyAverageResult, this.weightDate}); + + WeekWeightMeasurementResultAverage.fromJson(Map json) { + dailyAverageResult = json['DailyAverageResult']; + weightDate = DateUtil.convertStringToDate(json['WeightDate']); + } + + Map toJson() { + final Map data = new Map(); + data['DailyAverageResult'] = this.dailyAverageResult; + data['WeightDate'] = this.weightDate; + return data; + } +} diff --git a/lib/core/model/my_trakers/weight/WeightMeasurementResult.dart b/lib/core/model/my_trakers/weight/WeightMeasurementResult.dart new file mode 100644 index 00000000..7436eccc --- /dev/null +++ b/lib/core/model/my_trakers/weight/WeightMeasurementResult.dart @@ -0,0 +1,74 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class WeightMeasurementResult { + int? patientID; + int? lineItemNo; + int? weightMeasured; + DateTime? weightDate; + dynamic remark; + bool? isActive; + int? measured; + dynamic unit; + int? chartYear; + dynamic chartMonth; + double? yearAverageResult; + dynamic monthAverageResult; + dynamic weekAverageResult; + dynamic weekDesc; + + WeightMeasurementResult( + {this.patientID, + this.lineItemNo, + this.weightMeasured, + this.weightDate, + this.remark, + this.isActive, + this.measured, + this.unit, + this.chartYear, + this.chartMonth, + this.yearAverageResult, + this.monthAverageResult, + this.weekAverageResult, + this.weekDesc}); + + WeightMeasurementResult.fromJson(Map json) { + try { + patientID = json['PatientID']; + lineItemNo = json['LineItemNo']; + weightMeasured = json['WeightMeasured']; + weightDate = DateUtil.convertStringToDate(json['WeightDate']); + remark = json['Remark']; + isActive = json['IsActive']; + measured = json['Measured']; + unit = json['Unit']; + chartYear = json['ChartYear']; + chartMonth = json['ChartMonth']; + yearAverageResult = json['YearAverageResult']; + monthAverageResult = json['MonthAverageResult']; + weekAverageResult = json['WeekAverageResult']; + weekDesc = json['WeekDesc']; + } catch (e) { + print(e); + } + } + + Map toJson() { + final Map data = new Map(); + data['PatientID'] = this.patientID; + data['LineItemNo'] = this.lineItemNo; + data['WeightMeasured'] = this.weightMeasured; + data['WeightDate'] = this.weightDate; + data['Remark'] = this.remark; + data['IsActive'] = this.isActive; + data['Measured'] = this.measured; + data['Unit'] = this.unit; + data['ChartYear'] = this.chartYear; + data['ChartMonth'] = this.chartMonth; + data['YearAverageResult'] = this.yearAverageResult; + data['MonthAverageResult'] = this.monthAverageResult; + data['WeekAverageResult'] = this.weekAverageResult; + data['WeekDesc'] = this.weekDesc; + return data; + } +} diff --git a/lib/core/model/my_trakers/weight/YearWeightMeasurementResultAverage.dart b/lib/core/model/my_trakers/weight/YearWeightMeasurementResultAverage.dart new file mode 100644 index 00000000..a8d64423 --- /dev/null +++ b/lib/core/model/my_trakers/weight/YearWeightMeasurementResultAverage.dart @@ -0,0 +1,33 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class YearWeightMeasurementResultAverage { + dynamic monthAverageResult; + int? monthNumber; + String? monthName; + String? yearName; + DateTime? date; + + YearWeightMeasurementResultAverage( + {this.monthAverageResult, + this.monthNumber, + this.monthName, + this.yearName}); + + YearWeightMeasurementResultAverage.fromJson(Map json) { + monthAverageResult = json['monthAverageResult']; + monthNumber = json['monthNumber']; + monthName = json['monthName']; + yearName = json['yearName']; + date = DateUtil.getMonthDateTime(monthName!,yearName); + + } + + Map toJson() { + final Map data = new Map(); + data['monthAverageResult'] = this.monthAverageResult; + data['monthNumber'] = this.monthNumber; + data['monthName'] = this.monthName; + data['yearName'] = this.yearName; + return data; + } +} diff --git a/lib/core/model/notifications/get_notifications_request_model.dart b/lib/core/model/notifications/get_notifications_request_model.dart new file mode 100644 index 00000000..1cf99092 --- /dev/null +++ b/lib/core/model/notifications/get_notifications_request_model.dart @@ -0,0 +1,22 @@ +class GetNotificationsRequestModel { + int? notificationStatusID; + int? pagingSize; + int? currentPage; + + GetNotificationsRequestModel( + {this.notificationStatusID, this.pagingSize, this.currentPage}); + + GetNotificationsRequestModel.fromJson(Map json) { + notificationStatusID = json['NotificationStatusID']; + pagingSize = json['pagingSize']; + currentPage = json['currentPage']; + } + + Map toJson() { + final Map data = new Map(); + data['NotificationStatusID'] = this.notificationStatusID; + data['pagingSize'] = this.pagingSize; + data['currentPage'] = this.currentPage; + return data; + } +} diff --git a/lib/core/model/notifications/get_notifications_response_model.dart b/lib/core/model/notifications/get_notifications_response_model.dart new file mode 100644 index 00000000..60b9c764 --- /dev/null +++ b/lib/core/model/notifications/get_notifications_response_model.dart @@ -0,0 +1,96 @@ +class GetNotificationsResponseModel { + int? id; + int? recordId; + int? patientID; + bool? projectOutSA; + String? deviceType; + String? deviceToken; + String? message; + String? messageType; + String? messageTypeData; + dynamic videoURL; + bool? isQueue; + String? isQueueOn; + String? createdOn; + String? createdBy; + String? notificationType; + bool? isSent; + String? isSentOn; + bool? isRead; + String? isReadOn; + int? channelID; + int? projectID; + + GetNotificationsResponseModel( + {this.id, + this.recordId, + this.patientID, + this.projectOutSA, + this.deviceType, + this.deviceToken, + this.message, + this.messageType, + this.messageTypeData, + this.videoURL, + this.isQueue, + this.isQueueOn, + this.createdOn, + this.createdBy, + this.notificationType, + this.isSent, + this.isSentOn, + this.isRead, + this.isReadOn, + this.channelID, + this.projectID}); + + GetNotificationsResponseModel.fromJson(Map json) { + id = json['Id']; + recordId = json['RecordId']; + patientID = json['PatientID']; + projectOutSA = json['ProjectOutSA']; + deviceType = json['DeviceType']; + deviceToken = json['DeviceToken']; + message = json['Message']; + messageType = json['MessageType']; + messageTypeData = json['MessageTypeData']; + videoURL = json['VideoURL']; + isQueue = json['IsQueue']; + isQueueOn = json['IsQueueOn']; + createdOn = json['CreatedOn']; + createdBy = json['CreatedBy']; + notificationType = json['NotificationType']; + isSent = json['IsSent']; + isSentOn = json['IsSentOn']; + isRead = json['IsRead']; + isReadOn = json['IsReadOn']; + channelID = json['ChannelID']; + projectID = json['ProjectID']; + } + + Map toJson() { + final Map data = new Map(); + data['Id'] = this.id; + data['RecordId'] = this.recordId; + data['PatientID'] = this.patientID; + data['ProjectOutSA'] = this.projectOutSA; + data['DeviceType'] = this.deviceType; + data['DeviceToken'] = this.deviceToken; + data['Message'] = this.message; + data['MessageType'] = this.messageType; + data['MessageTypeData'] = this.messageTypeData; + data['VideoURL'] = this.videoURL; + data['IsQueue'] = this.isQueue; + data['IsQueueOn'] = this.isQueueOn; + data['CreatedOn'] = this.createdOn; + data['CreatedBy'] = this.createdBy; + data['NotificationType'] = this.notificationType; + data['IsSent'] = this.isSent; + data['IsSentOn'] = this.isSentOn; + data['IsRead'] = this.isRead; + data['IsReadOn'] = this.isReadOn; + data['ChannelID'] = this.channelID; + data['ProjectID'] = this.projectID; + return data; + } +} diff --git a/lib/core/model/notifications/mark_message_as_read_request_model.dart b/lib/core/model/notifications/mark_message_as_read_request_model.dart new file mode 100644 index 00000000..9bf84bbe --- /dev/null +++ b/lib/core/model/notifications/mark_message_as_read_request_model.dart @@ -0,0 +1,15 @@ +class MarkMessageAsReadRequestModel { + int? notificationPoolID; + + MarkMessageAsReadRequestModel({this.notificationPoolID}); + + MarkMessageAsReadRequestModel.fromJson(Map json) { + notificationPoolID = json['NotificationPoolID']; + } + + Map toJson() { + final Map data = new Map(); + data['NotificationPoolID'] = this.notificationPoolID; + return data; + } +} diff --git a/lib/core/model/packages_offers/requests/AddProductToCartRequestModel.dart b/lib/core/model/packages_offers/requests/AddProductToCartRequestModel.dart new file mode 100644 index 00000000..f9a4e718 --- /dev/null +++ b/lib/core/model/packages_offers/requests/AddProductToCartRequestModel.dart @@ -0,0 +1,26 @@ +import 'package:flutter/cupertino.dart'; + +class AddProductToCartRequestModel { + int? quantity; + int? product_id; + String? shopping_cart_type; + int? customer_id; + + AddProductToCartRequestModel({@required this.product_id, this.customer_id, this.shopping_cart_type = "ShoppingCart", this.quantity = 1}); + + Map json() { + return { + "shopping_cart_item" : { + "quantity": quantity, + "product_id": product_id, + "shopping_cart_type": shopping_cart_type, + "customer_id": customer_id + } + }; + } +} + +class UpdateProductToCartRequestModel extends AddProductToCartRequestModel{ + UpdateProductToCartRequestModel({required int product_id, required int customer_id, String shopping_cart_type = "ShoppingCart", int quantity = 1}) + : super(customer_id: customer_id, product_id: product_id, quantity: quantity, shopping_cart_type: shopping_cart_type); +} diff --git a/lib/core/model/packages_offers/requests/CreateCustomerRequestModel.dart b/lib/core/model/packages_offers/requests/CreateCustomerRequestModel.dart new file mode 100644 index 00000000..58161886 --- /dev/null +++ b/lib/core/model/packages_offers/requests/CreateCustomerRequestModel.dart @@ -0,0 +1,45 @@ +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:flutter/cupertino.dart'; + +class PackagesCustomerRequestModel { + + String? username; + String? first_name; + String? last_name; + String? email; + String? phone; + String? national_id; + String? date_of_birth; + + + PackagesCustomerRequestModel.fromUser(AuthenticatedUser user){ + this.username = "${user.patientID}"; + this.first_name = user.firstName; + this.last_name = user.lastName; + this.email = user.emailAddress; + this.phone = user.mobileNumber; + this.national_id = user.patientIdentificationNo; + + String isoDateTime = DateUtil.getISODateFormat(user.dateofBirthDataTime!); + this.date_of_birth = isoDateTime; + } + + Map json() { + return { + "customer" : { + "email": email ?? '', + "username": username ?? '', + "national_id": national_id ?? '', + "phone": phone ?? '', + "date_of_birth": date_of_birth ?? '', + "first_name": first_name ?? '', + "last_name": last_name ?? '', + // "addresses": [{ + // "email": email, + // "phone_number": phoneNumber + // }] + } + }; + } +} \ No newline at end of file diff --git a/lib/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart b/lib/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart new file mode 100644 index 00000000..ecaf0a5c --- /dev/null +++ b/lib/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart @@ -0,0 +1,17 @@ +class OffersCategoriesRequestModel { + final int? limit; + final int? page; + final int? sinceId; + + OffersCategoriesRequestModel({this.limit, this.page, this.sinceId}); + + Map toFlatMap() { + return { + if(limit != null && limit! > 0) + "limit": limit.toString(), + + if(page != null && page! > 0) + "page": page.toString(), + }; + } +} diff --git a/lib/core/model/packages_offers/requests/OffersProductsRequestModel.dart b/lib/core/model/packages_offers/requests/OffersProductsRequestModel.dart new file mode 100644 index 00000000..00e71e54 --- /dev/null +++ b/lib/core/model/packages_offers/requests/OffersProductsRequestModel.dart @@ -0,0 +1,28 @@ +class OffersProductsRequestModel { + final int? categoryId; + final int? storeId; + final int? limit; + // final int page; + int? sinceId; + + OffersProductsRequestModel({this.categoryId, this.limit = 50, this.storeId}); + + Map toFlatMap() { + return { + + if(limit != null && limit! > 0) + "limit": limit.toString(), + + // if(page != null && page > 0) + // "page": page.toString(), + + if(categoryId != null && categoryId! > 0) + "categoryId": categoryId.toString(), + + if(storeId != null && storeId! > 0) + "store_id": storeId.toString(), + + "sinceId": sinceId != null ? sinceId.toString() : "0", + }; + } +} diff --git a/lib/core/model/packages_offers/responses/PackagesCartItemsResponseModel.dart b/lib/core/model/packages_offers/responses/PackagesCartItemsResponseModel.dart new file mode 100644 index 00000000..31350efb --- /dev/null +++ b/lib/core/model/packages_offers/responses/PackagesCartItemsResponseModel.dart @@ -0,0 +1,125 @@ +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; + +class PackagesCartItemsResponseModel { + int? _quantity; + + set quantity(int value) { + _quantity = value; + } + + String? _shoppingCartType; + int? _productId; + PackagesResponseModel? _product; + int? _id; + + int get quantity => _quantity!; + + String get shoppingCartType => _shoppingCartType!; + + int get productId => _productId!; + + PackagesResponseModel get product => _product!; + + int get id => _id!; + + PackagesCartItemsResponseModel({int? quantity, String? shoppingCartType, int? productId, PackagesResponseModel? product, int? id}) { + _quantity = quantity!; + _shoppingCartType = shoppingCartType; + _productId = productId; + _product = product; + _id = id; + } + + PackagesCartItemsResponseModel.fromJson(dynamic json) { + _quantity = json["quantity"]; + _shoppingCartType = json["shopping_cart_type"]; + _productId = json["product_id"]; + _product = json["product"] != null ? PackagesResponseModel().fromJson(json["product"]) : null; + _id = json["id"]; + } + + Map toJson() { + var map = {}; + map["quantity"] = _quantity; + map["shopping_cart_type"] = _shoppingCartType; + map["product_id"] = _productId; + if (_product != null) { + map["product"] = _product!.toJson(); + } + map["id"] = _id; + return map; + } +} + +class Images { + int? _id; + int? _pictureId; + int? _position; + String? _src; + dynamic _attachment; + + int get id => _id!; + + int get pictureId => _pictureId!; + + int get position => _position!; + + String get src => _src!; + + dynamic get attachment => _attachment; + + Images({int? id, int? pictureId, int? position, String? src, dynamic attachment}) { + _id = id; + _pictureId = pictureId; + _position = position; + _src = src; + _attachment = attachment; + } + + Images.fromJson(dynamic json) { + _id = json["id"]; + _pictureId = json["picture_id"]; + _position = json["position"]; + _src = json["src"]; + _attachment = json["attachment"]; + } + + Map toJson() { + var map = {}; + map["id"] = _id; + map["picture_id"] = _pictureId; + map["position"] = _position; + map["src"] = _src; + map["attachment"] = _attachment; + return map; + } +} + +/// language_id : 1 +/// localized_name : "Dermatology testing" + +class Localized_names { + int? _languageId; + String? _localizedName; + + int get languageId => _languageId!; + + String get localizedName => _localizedName!; + + Localized_names({int? languageId, String? localizedName}) { + _languageId = languageId; + _localizedName = localizedName; + } + + Localized_names.fromJson(dynamic json) { + _languageId = json["language_id"]; + _localizedName = json["localized_name"]; + } + + Map toJson() { + var map = {}; + map["language_id"] = _languageId; + map["localized_name"] = _localizedName; + return map; + } +} diff --git a/lib/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart b/lib/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart new file mode 100644 index 00000000..7db2b736 --- /dev/null +++ b/lib/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart @@ -0,0 +1,77 @@ +import 'package:diplomaticquarterapp/generated/json/base/json_convert_content.dart'; +import 'package:diplomaticquarterapp/generated/json/base/json_field.dart'; + +class PackagesCategoriesResponseModel extends JsonConvert { + int? id; + String? name; + String? namen; + @JSONField(name: "localized_names") + List? localizedNames; + dynamic description; + @JSONField(name: "category_template_id") + int? categoryTemplateId; + @JSONField(name: "meta_keywords") + String? metaKeywords; + @JSONField(name: "meta_description") + String? metaDescription; + @JSONField(name: "meta_title") + String? metaTitle; + @JSONField(name: "parent_category_id") + int? parentCategoryId; + @JSONField(name: "page_size") + int? pageSize; + @JSONField(name: "page_size_options") + String? pageSizeOptions; + @JSONField(name: "price_ranges") + dynamic priceRanges; + @JSONField(name: "show_on_home_page") + bool? showOnHomePage; + @JSONField(name: "include_in_top_menu") + bool? includeInTopMenu; + @JSONField(name: "has_discounts_applied") + dynamic hasDiscountsApplied; + bool? published; + bool? deleted; + @JSONField(name: "display_order") + int? displayOrder; + @JSONField(name: "created_on_utc") + String? createdOnUtc; + @JSONField(name: "updated_on_utc") + String? updatedOnUtc; + @JSONField(name: "role_ids") + List? roleIds; + @JSONField(name: "discount_ids") + List? discountIds; + @JSONField(name: "store_ids") + List? storeIds; + OfferCategoriesResponseModelImage? image; + @JSONField(name: "se_name") + String? seName; + @JSONField(name: "is_leaf") + bool? isLeaf; + + @override + String toString() { + if(localizedNames!.length == 2){ + if(localizedNames!.first.languageId == 1) + return localizedNames?.first.localizedName ?? name.toString(); + + else if(localizedNames?.first.languageId == 2) + return localizedNames?.last.localizedName ?? name.toString(); + } + return name.toString(); + } +} + +class OfferCategoriesResponseModelLocalizedName extends JsonConvert { + @JSONField(name: "language_id") + int? languageId; + @JSONField(name: "localized_name") + String? localizedName; +} + +class OfferCategoriesResponseModelImage extends JsonConvert { + String? src; + dynamic thumb; + dynamic attachment; +} diff --git a/lib/core/model/packages_offers/responses/PackagesCustomerResponseModel.dart b/lib/core/model/packages_offers/responses/PackagesCustomerResponseModel.dart new file mode 100644 index 00000000..8ddfd322 --- /dev/null +++ b/lib/core/model/packages_offers/responses/PackagesCustomerResponseModel.dart @@ -0,0 +1,367 @@ +import 'PackagesCartItemsResponseModel.dart'; + +/// shopping_cart_items : [] +/// billing_address : null +/// shipping_address : null +/// addresses : [{"first_name":null,"last_name":null,"email":"a2zzuhaib@gmil.com","company":null,"country_id":null,"country":null,"state_province_id":null,"city":null,"address1":null,"address2":null,"zip_postal_code":null,"phone_number":"0500409598","fax_number":null,"customer_attributes":null,"created_on_utc":"2021-03-11T09:40:23.8091261Z","province":null,"id":0}] +/// customer_guid : "1367e5c7-be3b-43cc-ad81-ff1fc8d3b130" +/// username : null +/// email : "a2zzuhaib@gmil.com" +/// first_name : null +/// last_name : null +/// language_id : null +/// date_of_birth : null +/// gender : null +/// admin_comment : null +/// is_tax_exempt : false +/// has_shopping_cart_items : false +/// active : true +/// deleted : false +/// is_system_account : false +/// system_name : null +/// last_ip_address : null +/// created_on_utc : "2021-03-11T09:40:23.7535859Z" +/// last_login_date_utc : null +/// last_activity_date_utc : "2021-03-11T09:40:23.7535892Z" +/// registered_in_store_id : 0 +/// subscribed_to_newsletter : false +/// role_ids : [] +/// id : 76823 + +class PackagesCustomerResponseModel { + List? _shoppingCartItems; + dynamic _billingAddress; + dynamic _shippingAddress; + List? _addresses; + String? _customerGuid; + dynamic _username; + String? _email; + dynamic _firstName; + dynamic _lastName; + dynamic _languageId; + dynamic _dateOfBirth; + dynamic _gender; + dynamic _adminComment; + bool? _isTaxExempt; + bool? _hasShoppingCartItems; + bool? _active; + bool? _deleted; + bool? _isSystemAccount; + dynamic _systemName; + dynamic _lastIpAddress; + String? _createdOnUtc; + dynamic _lastLoginDateUtc; + String? _lastActivityDateUtc; + int? _registeredInStoreId; + bool? _subscribedToNewsletter; + List? _roleIds; + int? _id; + + List get shoppingCartItems => _shoppingCartItems!; + dynamic get billingAddress => _billingAddress; + dynamic get shippingAddress => _shippingAddress; + List get addresses => _addresses!; + String get customerGuid => _customerGuid!; + dynamic get username => _username; + String get email => _email!; + dynamic get firstName => _firstName; + dynamic get lastName => _lastName; + dynamic get languageId => _languageId; + dynamic get dateOfBirth => _dateOfBirth; + dynamic get gender => _gender; + dynamic get adminComment => _adminComment; + bool get isTaxExempt => _isTaxExempt!; + bool get hasShoppingCartItems => _hasShoppingCartItems!; + bool get active => _active!; + bool get deleted => _deleted!; + bool get isSystemAccount => _isSystemAccount!; + dynamic get systemName => _systemName; + dynamic get lastIpAddress => _lastIpAddress; + String get createdOnUtc => _createdOnUtc!; + dynamic get lastLoginDateUtc => _lastLoginDateUtc; + String get lastActivityDateUtc => _lastActivityDateUtc!; + int get registeredInStoreId => _registeredInStoreId!; + bool get subscribedToNewsletter => _subscribedToNewsletter!; + List get roleIds => _roleIds!; + int get id => _id!; + + PackagesCustomerResponseModel({ + List? shoppingCartItems, + dynamic billingAddress, + dynamic shippingAddress, + List? addresses, + String? customerGuid, + dynamic username, + String? email, + dynamic firstName, + dynamic lastName, + dynamic languageId, + dynamic dateOfBirth, + dynamic gender, + dynamic adminComment, + bool? isTaxExempt, + bool? hasShoppingCartItems, + bool? active, + bool? deleted, + bool? isSystemAccount, + dynamic systemName, + dynamic lastIpAddress, + String? createdOnUtc, + dynamic lastLoginDateUtc, + String? lastActivityDateUtc, + int? registeredInStoreId, + bool? subscribedToNewsletter, + List? roleIds, + int? id}){ + _shoppingCartItems = shoppingCartItems; + _billingAddress = billingAddress; + _shippingAddress = shippingAddress; + _addresses = addresses; + _customerGuid = customerGuid; + _username = username; + _email = email; + _firstName = firstName; + _lastName = lastName; + _languageId = languageId; + _dateOfBirth = dateOfBirth; + _gender = gender; + _adminComment = adminComment; + _isTaxExempt = isTaxExempt; + _hasShoppingCartItems = hasShoppingCartItems; + _active = active; + _deleted = deleted; + _isSystemAccount = isSystemAccount; + _systemName = systemName; + _lastIpAddress = lastIpAddress; + _createdOnUtc = createdOnUtc; + _lastLoginDateUtc = lastLoginDateUtc; + _lastActivityDateUtc = lastActivityDateUtc; + _registeredInStoreId = registeredInStoreId; + _subscribedToNewsletter = subscribedToNewsletter; + _roleIds = roleIds; + _id = id; +} + + PackagesCustomerResponseModel.fromJson(dynamic json) { + _billingAddress = json["billing_address"]; + _shippingAddress = json["shipping_address"]; + if (json["addresses"] != null) { + _addresses = []; + json["addresses"].forEach((v) { + _addresses!.add(Addresses.fromJson(v)); + }); + } + _customerGuid = json["customer_guid"]; + _username = json["username"]; + _email = json["email"]; + _firstName = json["first_name"]; + _lastName = json["last_name"]; + _languageId = json["language_id"]; + _dateOfBirth = json["date_of_birth"]; + _gender = json["gender"]; + _adminComment = json["admin_comment"]; + _isTaxExempt = json["is_tax_exempt"]; + _hasShoppingCartItems = json["has_shopping_cart_items"]; + _active = json["active"]; + _deleted = json["deleted"]; + _isSystemAccount = json["is_system_account"]; + _systemName = json["system_name"]; + _lastIpAddress = json["last_ip_address"]; + _createdOnUtc = json["created_on_utc"]; + _lastLoginDateUtc = json["last_login_date_utc"]; + _lastActivityDateUtc = json["last_activity_date_utc"]; + _registeredInStoreId = json["registered_in_store_id"]; + _subscribedToNewsletter = json["subscribed_to_newsletter"]; + + if (json["role_ids"] != null) { + _roleIds = []; + json["role_ids"].forEach((v) { + _roleIds!.add(v); + }); + } + + if (json["shopping_cart_items"] != null) { + _shoppingCartItems = []; + json["shopping_cart_items"].forEach((v) { + _shoppingCartItems!.add(PackagesCartItemsResponseModel.fromJson(v)); + }); + } + + _id = json["id"]; + } + + Map toJson() { + var map = {}; + if (_shoppingCartItems != null) { + map["shopping_cart_items"] = _shoppingCartItems!.map((v) => v.toJson()).toList(); + } + map["billing_address"] = _billingAddress; + map["shipping_address"] = _shippingAddress; + if (_addresses != null) { + map["addresses"] = _addresses!.map((v) => v.toJson()).toList(); + } + map["customer_guid"] = _customerGuid; + map["username"] = _username; + map["email"] = _email; + map["first_name"] = _firstName; + map["last_name"] = _lastName; + map["language_id"] = _languageId; + map["date_of_birth"] = _dateOfBirth; + map["gender"] = _gender; + map["admin_comment"] = _adminComment; + map["is_tax_exempt"] = _isTaxExempt; + map["has_shopping_cart_items"] = _hasShoppingCartItems; + map["active"] = _active; + map["deleted"] = _deleted; + map["is_system_account"] = _isSystemAccount; + map["system_name"] = _systemName; + map["last_ip_address"] = _lastIpAddress; + map["created_on_utc"] = _createdOnUtc; + map["last_login_date_utc"] = _lastLoginDateUtc; + map["last_activity_date_utc"] = _lastActivityDateUtc; + map["registered_in_store_id"] = _registeredInStoreId; + map["subscribed_to_newsletter"] = _subscribedToNewsletter; + if (_roleIds != null) { + map["role_ids"] = _roleIds!.map((v) => v).toList(); + } + map["id"] = _id; + return map; + } + +} + +/// first_name : null +/// last_name : null +/// email : "a2zzuhaib@gmil.com" +/// company : null +/// country_id : null +/// country : null +/// state_province_id : null +/// city : null +/// address1 : null +/// address2 : null +/// zip_postal_code : null +/// phone_number : "0500409598" +/// fax_number : null +/// customer_attributes : null +/// created_on_utc : "2021-03-11T09:40:23.8091261Z" +/// province : null +/// id : 0 + +class Addresses { + dynamic _firstName; + dynamic _lastName; + String? _email; + dynamic _company; + dynamic _countryId; + dynamic _country; + dynamic _stateProvinceId; + dynamic _city; + dynamic _address1; + dynamic _address2; + dynamic _zipPostalCode; + String? _phoneNumber; + dynamic _faxNumber; + dynamic _customerAttributes; + String? _createdOnUtc; + dynamic _province; + int? _id; + + dynamic get firstName => _firstName; + dynamic get lastName => _lastName; + String get email => _email!; + dynamic get company => _company; + dynamic get countryId => _countryId; + dynamic get country => _country; + dynamic get stateProvinceId => _stateProvinceId; + dynamic get city => _city; + dynamic get address1 => _address1; + dynamic get address2 => _address2; + dynamic get zipPostalCode => _zipPostalCode; + String get phoneNumber => _phoneNumber!; + dynamic get faxNumber => _faxNumber; + dynamic get customerAttributes => _customerAttributes; + String get createdOnUtc => _createdOnUtc!; + dynamic get province => _province; + int get id => _id!; + + Addresses({ + dynamic firstName, + dynamic lastName, + String? email, + dynamic company, + dynamic countryId, + dynamic country, + dynamic stateProvinceId, + dynamic city, + dynamic address1, + dynamic address2, + dynamic zipPostalCode, + String? phoneNumber, + dynamic faxNumber, + dynamic customerAttributes, + String? createdOnUtc, + dynamic province, + int? id}){ + _firstName = firstName; + _lastName = lastName; + _email = email; + _company = company; + _countryId = countryId; + _country = country; + _stateProvinceId = stateProvinceId; + _city = city; + _address1 = address1; + _address2 = address2; + _zipPostalCode = zipPostalCode; + _phoneNumber = phoneNumber; + _faxNumber = faxNumber; + _customerAttributes = customerAttributes; + _createdOnUtc = createdOnUtc; + _province = province; + _id = id; +} + + Addresses.fromJson(dynamic json) { + _firstName = json["first_name"]; + _lastName = json["last_name"]; + _email = json["email"]; + _company = json["company"]; + _countryId = json["country_id"]; + _country = json["country"]; + _stateProvinceId = json["state_province_id"]; + _city = json["city"]; + _address1 = json["address1"]; + _address2 = json["address2"]; + _zipPostalCode = json["zip_postal_code"]; + _phoneNumber = json["phone_number"]; + _faxNumber = json["fax_number"]; + _customerAttributes = json["customer_attributes"]; + _createdOnUtc = json["created_on_utc"]; + _province = json["province"]; + _id = json["id"]; + } + + Map toJson() { + var map = {}; + map["first_name"] = _firstName; + map["last_name"] = _lastName; + map["email"] = _email; + map["company"] = _company; + map["country_id"] = _countryId; + map["country"] = _country; + map["state_province_id"] = _stateProvinceId; + map["city"] = _city; + map["address1"] = _address1; + map["address2"] = _address2; + map["zip_postal_code"] = _zipPostalCode; + map["phone_number"] = _phoneNumber; + map["fax_number"] = _faxNumber; + map["customer_attributes"] = _customerAttributes; + map["created_on_utc"] = _createdOnUtc; + map["province"] = _province; + map["id"] = _id; + return map; + } + +} \ No newline at end of file diff --git a/lib/core/model/packages_offers/responses/PackagesResponseModel.dart b/lib/core/model/packages_offers/responses/PackagesResponseModel.dart new file mode 100644 index 00000000..90feacfa --- /dev/null +++ b/lib/core/model/packages_offers/responses/PackagesResponseModel.dart @@ -0,0 +1,247 @@ +import 'package:diplomaticquarterapp/generated/json/base/json_convert_content.dart'; +import 'package:diplomaticquarterapp/generated/json/base/json_field.dart'; + +class PackagesResponseModel extends JsonConvert { + int? id; + @JSONField(name: "visible_individually") + bool? visibleIndividually; + String? name; + String? namen; + @JSONField(name: "localized_names") + List? localizedNames; + @JSONField(name: "short_description") + String? shortDescription; + @JSONField(name: "short_descriptionn") + String? shortDescriptionn; + @JSONField(name: "full_description") + String? fullDescription; + @JSONField(name: "full_descriptionn") + String? fullDescriptionn; + @JSONField(name: "markas_new") + bool? markasNew; + @JSONField(name: "show_on_home_page") + bool? showOnHomePage; + @JSONField(name: "meta_keywords") + dynamic metaKeywords; + @JSONField(name: "meta_description") + dynamic metaDescription; + @JSONField(name: "meta_title") + dynamic metaTitle; + @JSONField(name: "allow_customer_reviews") + bool? allowCustomerReviews; + @JSONField(name: "approved_rating_sum") + int? approvedRatingSum; + @JSONField(name: "not_approved_rating_sum") + int? notApprovedRatingSum; + @JSONField(name: "approved_total_reviews") + int? approvedTotalReviews; + @JSONField(name: "not_approved_total_reviews") + int? notApprovedTotalReviews; + String? sku; + @JSONField(name: "is_rx") + bool? isRx; + @JSONField(name: "prescription_required") + bool? prescriptionRequired; + @JSONField(name: "rx_message") + dynamic rxMessage; + @JSONField(name: "rx_messagen") + dynamic rxMessagen; + @JSONField(name: "manufacturer_part_number") + dynamic manufacturerPartNumber; + dynamic gtin; + @JSONField(name: "is_gift_card") + bool? isGiftCard; + @JSONField(name: "require_other_products") + bool? requireOtherProducts; + @JSONField(name: "automatically_add_required_products") + bool? automaticallyAddRequiredProducts; + @JSONField(name: "is_download") + bool? isDownload; + + @JSONField(name: "unlimited_downloads") + bool? unlimitedDownloads; + @JSONField(name: "max_number_of_downloads") + int? maxNumberOfDownloads; + @JSONField(name: "download_expiration_days") + dynamic downloadExpirationDays; + @JSONField(name: "has_sample_download") + bool? hasSampleDownload; + @JSONField(name: "has_user_agreement") + bool? hasUserAgreement; + @JSONField(name: "is_recurring") + bool? isRecurring; + @JSONField(name: "recurring_cycle_length") + int? recurringCycleLength; + @JSONField(name: "recurring_total_cycles") + int? recurringTotalCycles; + @JSONField(name: "is_rental") + bool? isRental; + @JSONField(name: "rental_price_length") + int? rentalPriceLength; + @JSONField(name: "is_ship_enabled") + bool? isShipEnabled; + @JSONField(name: "is_free_shipping") + bool? isFreeShipping; + @JSONField(name: "ship_separately") + bool? shipSeparately; + @JSONField(name: "additional_shipping_charge") + double? additionalShippingCharge; + @JSONField(name: "is_tax_exempt") + bool? isTaxExempt; + @JSONField(name: "is_telecommunications_or_broadcasting_or_electronic_services") + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + @JSONField(name: "use_multiple_warehouses") + bool? useMultipleWarehouses; + @JSONField(name: "manage_inventory_method_id") + int? manageInventoryMethodId; + @JSONField(name: "stock_quantity") + int? stockQuantity; + @JSONField(name: "stock_availability") + String? stockAvailability; + @JSONField(name: "stock_availabilityn") + String? stockAvailabilityn; + @JSONField(name: "display_stock_availability") + bool? displayStockAvailability; + @JSONField(name: "display_stock_quantity") + bool? displayStockQuantity; + @JSONField(name: "min_stock_quantity") + int? minStockQuantity; + @JSONField(name: "notify_admin_for_quantity_below") + int? notifyAdminForQuantityBelow; + @JSONField(name: "allow_back_in_stock_subscriptions") + bool? allowBackInStockSubscriptions; + @JSONField(name: "order_minimum_quantity") + int? orderMinimumQuantity; + @JSONField(name: "order_maximum_quantity") + int? orderMaximumQuantity; + @JSONField(name: "allowed_quantities") + dynamic allowedQuantities; + @JSONField(name: "allow_adding_only_existing_attribute_combinations") + bool? allowAddingOnlyExistingAttributeCombinations; + @JSONField(name: "disable_buy_button") + bool? disableBuyButton; + @JSONField(name: "disable_wishlist_button") + bool? disableWishlistButton; + @JSONField(name: "available_for_pre_order") + bool? availableForPreOrder; + @JSONField(name: "pre_order_availability_start_date_time_utc") + dynamic preOrderAvailabilityStartDateTimeUtc; + @JSONField(name: "call_for_price") + bool? callForPrice; + double? price; + @JSONField(name: "old_price") + double? oldPrice; + @JSONField(name: "product_cost") + double? productCost; + @JSONField(name: "special_price") + dynamic specialPrice; + @JSONField(name: "special_price_start_date_time_utc") + dynamic specialPriceStartDateTimeUtc; + @JSONField(name: "special_price_end_date_time_utc") + dynamic specialPriceEndDateTimeUtc; + @JSONField(name: "customer_enters_price") + bool? customerEntersPrice; + @JSONField(name: "minimum_customer_entered_price") + double? minimumCustomerEnteredPrice; + @JSONField(name: "maximum_customer_entered_price") + double? maximumCustomerEnteredPrice; + @JSONField(name: "baseprice_enabled") + bool? basepriceEnabled; + @JSONField(name: "baseprice_amount") + double? basepriceAmount; + @JSONField(name: "baseprice_base_amount") + double? basepriceBaseAmount; + @JSONField(name: "has_tier_prices") + bool? hasTierPrices; + @JSONField(name: "has_discounts_applied") + bool? hasDiscountsApplied; + @JSONField(name: "discount_name") + dynamic discountName; + @JSONField(name: "discount_namen") + dynamic discountNamen; + @JSONField(name: "discount_description") + dynamic discountDescription; + @JSONField(name: "discount_Descriptionn") + dynamic discountDescriptionn; + @JSONField(name: "discount_percentage") + dynamic discountPercentage; + String? currency; + String? currencyn; + double? weight; + double? length; + double? width; + double? height; + @JSONField(name: "available_start_date_time_utc") + dynamic availableStartDateTimeUtc; + @JSONField(name: "available_end_date_time_utc") + dynamic availableEndDateTimeUtc; + @JSONField(name: "display_order") + int? displayOrder; + bool? published; + bool? deleted; + @JSONField(name: "created_on_utc") + String? createdOnUtc; + @JSONField(name: "updated_on_utc") + String? updatedOnUtc; + @JSONField(name: "product_type") + String? productType; + @JSONField(name: "parent_grouped_product_id") + int? parentGroupedProductId; + @JSONField(name: "role_ids") + List? roleIds; + @JSONField(name: "discount_ids") + List? discountIds; + @JSONField(name: "store_ids") + List? storeIds; + @JSONField(name: "store_names") + List? storeNames; + @JSONField(name: "manufacturer_ids") + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + @JSONField(name: "associated_product_ids") + List? associatedProductIds; + List? tags; + @JSONField(name: "vendor_id") + int? vendorId; + @JSONField(name: "se_name") + String? seName; + + String getName() { + if (localizedNames!.length == 2) { + if (localizedNames?.first.languageId == 2) + return localizedNames!.first.localizedName ?? name.toString(); + else if (localizedNames!.first.languageId == 1) return localizedNames?.last.localizedName ?? name.toString(); + } + return name.toString(); + } +} + +class OfferProductsResponseModelLocalizedName extends JsonConvert { + @JSONField(name: "language_id") + int? languageId; + @JSONField(name: "localized_name") + String? localizedName; +} + +class OfferProductsResponseModelImage extends JsonConvert { + int? id; + int? position; + String? src; + String? thumb; + String? attachment; +} + +class OfferProductsResponseModelSpecification extends JsonConvert { + int? id; + @JSONField(name: "display_order") + int? displayOrder; + @JSONField(name: "default_value") + String? defaultValue; + @JSONField(name: "default_valuen") + String? defaultValuen; + String? name; + String? nameN; +} diff --git a/lib/core/model/packages_offers/responses/offers_stores_response_model.dart b/lib/core/model/packages_offers/responses/offers_stores_response_model.dart new file mode 100644 index 00000000..b219aa56 --- /dev/null +++ b/lib/core/model/packages_offers/responses/offers_stores_response_model.dart @@ -0,0 +1,44 @@ +class OfferProjectsResponseModel { + OfferProjectsResponseModel({ + this.project,}); + + OfferProjectsResponseModel.fromJson(dynamic json) { + if (json['stores'] != null) { + project = []; + json['stores'].forEach((v) { + project!.add(OfferProject.fromJson(v)); + }); + } + } + List? project; + + Map toJson() { + final map = {}; + if (project != null) { + map['stores'] = project!.map((v) => v.toJson()).toList(); + } + return map; + } + +} + +class OfferProject { + OfferProject({ + this.name, + this.id,}); + + OfferProject.fromJson(dynamic json) { + name = json['name']; + id = json['id']; + } + String? name; + int? id; + + Map toJson() { + final map = {}; + map['name'] = name; + map['id'] = id; + return map; + } + +} \ No newline at end of file diff --git a/lib/core/model/packages_offers/responses/order_response_model.dart b/lib/core/model/packages_offers/responses/order_response_model.dart new file mode 100644 index 00000000..aea27a86 --- /dev/null +++ b/lib/core/model/packages_offers/responses/order_response_model.dart @@ -0,0 +1,369 @@ +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCustomerResponseModel.dart'; + +import 'PackagesCartItemsResponseModel.dart'; + +class PackagesOrderResponseModel { + String? _customOrderNumber; + int? _storeId; + dynamic _pickUpInStore; + String? _paymentMethodSystemName; + String? _customerCurrencyCode; + double? _currencyRate; + int? _customerTaxDisplayTypeId; + dynamic _vatNumber; + double? _orderSubtotalInclTax; + double? _orderSubtotalExclTax; + double? _orderSubTotalDiscountInclTax; + double? _orderSubTotalDiscountExclTax; + double? _orderShippingInclTax; + double? _orderShippingExclTax; + double? _paymentMethodAdditionalFeeInclTax; + double? _paymentMethodAdditionalFeeExclTax; + String? _taxRates; + double? _orderTax; + double? _orderDiscount; + double? _orderTotal; + double? _refundedAmount; + dynamic _rewardPointsWereAdded; + String? _checkoutAttributeDescription; + int? _customerLanguageId; + int? _affiliateId; + String? _customerIp; + dynamic _authorizationTransactionId; + dynamic _authorizationTransactionCode; + dynamic _authorizationTransactionResult; + dynamic _captureTransactionId; + dynamic _captureTransactionResult; + dynamic _subscriptionTransactionId; + dynamic _paidDateUtc; + dynamic _shippingMethod; + dynamic _shippingRateComputationMethodSystemName; + String? _customValuesXml; + dynamic _paymentOption; + bool? _deleted; + String? _createdOnUtc; + PackagesCustomerResponseModel? _customer; + int? _customerId; + dynamic _billingAddress; + dynamic _shippingAddress; + List? _orderItems; + String? _orderStatus; + String? _paymentStatus; + String? _shippingStatus; + String? _customerTaxDisplayType; + int? _id; + + String get customOrderNumber => _customOrderNumber!; + + int get storeId => _storeId!; + + dynamic get pickUpInStore => _pickUpInStore; + + String get paymentMethodSystemName => _paymentMethodSystemName!; + + String get customerCurrencyCode => _customerCurrencyCode!; + + double get currencyRate => _currencyRate!; + + int get customerTaxDisplayTypeId => _customerTaxDisplayTypeId!; + + dynamic get vatNumber => _vatNumber; + + double get orderSubtotalInclTax => _orderSubtotalInclTax!; + + double get orderSubtotalExclTax => _orderSubtotalExclTax!; + + double get orderSubTotalDiscountInclTax => _orderSubTotalDiscountInclTax!; + + double get orderSubTotalDiscountExclTax => _orderSubTotalDiscountExclTax!; + + double get orderShippingInclTax => _orderShippingInclTax!; + + double get orderShippingExclTax => _orderShippingExclTax!; + + double get paymentMethodAdditionalFeeInclTax => _paymentMethodAdditionalFeeInclTax!; + + double get paymentMethodAdditionalFeeExclTax => _paymentMethodAdditionalFeeExclTax!; + + String get taxRates => _taxRates!; + + double get orderTax => _orderTax!; + + double get orderDiscount => _orderDiscount!; + + double get orderTotal => _orderTotal!; + + double get refundedAmount => _refundedAmount!; + + dynamic get rewardPointsWereAdded => _rewardPointsWereAdded; + + String get checkoutAttributeDescription => _checkoutAttributeDescription!; + + int get customerLanguageId => _customerLanguageId!; + + int get affiliateId => _affiliateId!; + + String get customerIp => _customerIp!; + + dynamic get authorizationTransactionId => _authorizationTransactionId; + + dynamic get authorizationTransactionCode => _authorizationTransactionCode; + + dynamic get authorizationTransactionResult => _authorizationTransactionResult; + + dynamic get captureTransactionId => _captureTransactionId; + + dynamic get captureTransactionResult => _captureTransactionResult; + + dynamic get subscriptionTransactionId => _subscriptionTransactionId; + + dynamic get paidDateUtc => _paidDateUtc; + + dynamic get shippingMethod => _shippingMethod; + + dynamic get shippingRateComputationMethodSystemName => _shippingRateComputationMethodSystemName; + + String get customValuesXml => _customValuesXml!; + + dynamic get paymentOption => _paymentOption; + + bool get deleted => _deleted!; + + String get createdOnUtc => _createdOnUtc!; + + PackagesCustomerResponseModel get customer => _customer!; + + int get customerId => _customerId!; + + dynamic get billingAddress => _billingAddress; + + dynamic get shippingAddress => _shippingAddress; + + List get orderItems => _orderItems!; + + String get orderStatus => _orderStatus!; + + String get paymentStatus => _paymentStatus!; + + String get shippingStatus => _shippingStatus!; + + String get customerTaxDisplayType => _customerTaxDisplayType!; + + int get id => _id!; + + OrderResponseModel( + {String? customOrderNumber, + int? storeId, + dynamic pickUpInStore, + String? paymentMethodSystemName, + String? customerCurrencyCode, + double? currencyRate, + int? customerTaxDisplayTypeId, + dynamic vatNumber, + double? orderSubtotalInclTax, + double? orderSubtotalExclTax, + double? orderSubTotalDiscountInclTax, + double? orderSubTotalDiscountExclTax, + double? orderShippingInclTax, + double? orderShippingExclTax, + double? paymentMethodAdditionalFeeInclTax, + double? paymentMethodAdditionalFeeExclTax, + String? taxRates, + double? orderTax, + double? orderDiscount, + double? orderTotal, + double? refundedAmount, + dynamic rewardPointsWereAdded, + String? checkoutAttributeDescription, + int? customerLanguageId, + int? affiliateId, + String? customerIp, + dynamic authorizationTransactionId, + dynamic authorizationTransactionCode, + dynamic authorizationTransactionResult, + dynamic captureTransactionId, + dynamic captureTransactionResult, + dynamic subscriptionTransactionId, + dynamic paidDateUtc, + dynamic shippingMethod, + dynamic shippingRateComputationMethodSystemName, + String? customValuesXml, + dynamic paymentOption, + bool? deleted, + String? createdOnUtc, + PackagesCustomerResponseModel? customer, + int? customerId, + dynamic billingAddress, + dynamic shippingAddress, + List? orderItems, + String? orderStatus, + String? paymentStatus, + String? shippingStatus, + String? customerTaxDisplayType, + int? id}) { + _customOrderNumber = customOrderNumber!; + _storeId = storeId!; + _pickUpInStore = pickUpInStore; + _paymentMethodSystemName = paymentMethodSystemName!; + _customerCurrencyCode = customerCurrencyCode!; + _currencyRate = currencyRate!; + _customerTaxDisplayTypeId = customerTaxDisplayTypeId!; + _vatNumber = vatNumber; + _orderSubtotalInclTax = orderSubtotalInclTax!; + _orderSubtotalExclTax = orderSubtotalExclTax!; + _orderSubTotalDiscountInclTax = orderSubTotalDiscountInclTax!; + _orderSubTotalDiscountExclTax = orderSubTotalDiscountExclTax!; + _orderShippingInclTax = orderShippingInclTax!; + _orderShippingExclTax = orderShippingExclTax!; + _paymentMethodAdditionalFeeInclTax = paymentMethodAdditionalFeeInclTax!; + _paymentMethodAdditionalFeeExclTax = paymentMethodAdditionalFeeExclTax!; + _taxRates = taxRates!; + _orderTax = orderTax!; + _orderDiscount = orderDiscount!; + _orderTotal = orderTotal!; + _refundedAmount = refundedAmount!; + _rewardPointsWereAdded = rewardPointsWereAdded; + _checkoutAttributeDescription = checkoutAttributeDescription!; + _customerLanguageId = customerLanguageId!; + _affiliateId = affiliateId!; + _customerIp = customerIp!; + _authorizationTransactionId = authorizationTransactionId; + _authorizationTransactionCode = authorizationTransactionCode; + _authorizationTransactionResult = authorizationTransactionResult; + _captureTransactionId = captureTransactionId; + _captureTransactionResult = captureTransactionResult; + _subscriptionTransactionId = subscriptionTransactionId; + _paidDateUtc = paidDateUtc; + _shippingMethod = shippingMethod; + _shippingRateComputationMethodSystemName = shippingRateComputationMethodSystemName; + _customValuesXml = customValuesXml!; + _paymentOption = paymentOption; + _deleted = deleted!; + _createdOnUtc = createdOnUtc!; + _customer = customer!; + _customerId = customerId!; + _billingAddress = billingAddress; + _shippingAddress = shippingAddress; + _orderItems = orderItems!; + _orderStatus = orderStatus!; + _paymentStatus = paymentStatus!; + _shippingStatus = shippingStatus!; + _customerTaxDisplayType = customerTaxDisplayType!; + _id = id!; + } + + PackagesOrderResponseModel.fromJson(dynamic json) { + _customOrderNumber = json["custom_order_number"]; + _storeId = json["store_id"]; + _pickUpInStore = json["pick_up_in_store"]; + _paymentMethodSystemName = json["payment_method_system_name"]; + _customerCurrencyCode = json["customer_currency_code"]; + _currencyRate = json["currency_rate"]; + _customerTaxDisplayTypeId = json["customer_tax_display_type_id"]!; + _vatNumber = json["vat_number"]; + _orderSubtotalInclTax = json["order_subtotal_incl_tax"]; + _orderSubtotalExclTax = json["order_subtotal_excl_tax"]; + _orderSubTotalDiscountInclTax = json["order_sub_total_discount_incl_tax"]; + _orderSubTotalDiscountExclTax = json["order_sub_total_discount_excl_tax"]; + _orderShippingInclTax = json["order_shipping_incl_tax"]; + _orderShippingExclTax = json["order_shipping_excl_tax"]; + _paymentMethodAdditionalFeeInclTax = json["payment_method_additional_fee_incl_tax"]; + _paymentMethodAdditionalFeeExclTax = json["payment_method_additional_fee_excl_tax"]; + _taxRates = json["tax_rates"]; + _orderTax = json["order_tax"]; + _orderDiscount = json["order_discount"]; + _orderTotal = json["order_total"]; + _refundedAmount = json["refunded_amount"]; + _rewardPointsWereAdded = json["reward_points_were_added"]; + _checkoutAttributeDescription = json["checkout_attribute_description"]; + _customerLanguageId = json["customer_language_id"]; + _affiliateId = json["affiliate_id"]; + _customerIp = json["customer_ip"]; + _authorizationTransactionId = json["authorization_transaction_id"]; + _authorizationTransactionCode = json["authorization_transaction_code"]; + _authorizationTransactionResult = json["authorization_transaction_result"]; + _captureTransactionId = json["capture_transaction_id"]; + _captureTransactionResult = json["capture_transaction_result"]; + _subscriptionTransactionId = json["subscription_transaction_id"]; + _paidDateUtc = json["paid_date_utc"]; + _shippingMethod = json["shipping_method"]; + _shippingRateComputationMethodSystemName = json["shipping_rate_computation_method_system_name"]; + _customValuesXml = json["custom_values_xml"]; + _paymentOption = json["payment_option"]; + _deleted = json["deleted"]; + _createdOnUtc = json["created_on_utc"]; + _customer = (json["customer"] != null ? PackagesCustomerResponseModel.fromJson(json["customer"]) : null)!; + _customerId = json["customer_id"]; + _billingAddress = json["billing_address"]; + _shippingAddress = json["shipping_address"]; + if (json["order_items"] != null) { + _orderItems = []; + json["order_items"].forEach((v) { + _orderItems!.add(PackagesCartItemsResponseModel.fromJson(v)); + })!; + } + _orderStatus = json["order_status"]; + _paymentStatus = json["payment_status"]; + _shippingStatus = json["shipping_status"]; + _customerTaxDisplayType = json["customer_tax_display_type"]; + _id = json["id"]; + } + + Map toJson() { + var map = {}; + map["custom_order_number"] = _customOrderNumber; + map["store_id"] = _storeId; + map["pick_up_in_store"] = _pickUpInStore; + map["payment_method_system_name"] = _paymentMethodSystemName; + map["customer_currency_code"] = _customerCurrencyCode; + map["currency_rate"] = _currencyRate; + map["customer_tax_display_type_id"] = _customerTaxDisplayTypeId; + map["vat_number"] = _vatNumber; + map["order_subtotal_incl_tax"] = _orderSubtotalInclTax; + map["order_subtotal_excl_tax"] = _orderSubtotalExclTax; + map["order_sub_total_discount_incl_tax"] = _orderSubTotalDiscountInclTax; + map["order_sub_total_discount_excl_tax"] = _orderSubTotalDiscountExclTax; + map["order_shipping_incl_tax"] = _orderShippingInclTax; + map["order_shipping_excl_tax"] = _orderShippingExclTax; + map["payment_method_additional_fee_incl_tax"] = _paymentMethodAdditionalFeeInclTax; + map["payment_method_additional_fee_excl_tax"] = _paymentMethodAdditionalFeeExclTax; + map["tax_rates"] = _taxRates; + map["order_tax"] = _orderTax; + map["order_discount"] = _orderDiscount; + map["order_total"] = _orderTotal; + map["refunded_amount"] = _refundedAmount; + map["reward_points_were_added"] = _rewardPointsWereAdded; + map["checkout_attribute_description"] = _checkoutAttributeDescription; + map["customer_language_id"] = _customerLanguageId; + map["affiliate_id"] = _affiliateId; + map["customer_ip"] = _customerIp; + map["authorization_transaction_id"] = _authorizationTransactionId; + map["authorization_transaction_code"] = _authorizationTransactionCode; + map["authorization_transaction_result"] = _authorizationTransactionResult; + map["capture_transaction_id"] = _captureTransactionId; + map["capture_transaction_result"] = _captureTransactionResult; + map["subscription_transaction_id"] = _subscriptionTransactionId; + map["paid_date_utc"] = _paidDateUtc; + map["shipping_method"] = _shippingMethod; + map["shipping_rate_computation_method_system_name"] = _shippingRateComputationMethodSystemName; + map["custom_values_xml"] = _customValuesXml; + map["payment_option"] = _paymentOption; + map["deleted"] = _deleted; + map["created_on_utc"] = _createdOnUtc; + if (_customer != null) { + map["customer"] = _customer!.toJson(); + } + map["customer_id"] = _customerId; + map["billing_address"] = _billingAddress; + map["shipping_address"] = _shippingAddress; + if (_orderItems != null) { + map["order_items"] = _orderItems!.map((v) => v.toJson()).toList(); + } + map["order_status"] = _orderStatus; + map["payment_status"] = _paymentStatus; + map["shipping_status"] = _shippingStatus; + map["customer_tax_display_type"] = _customerTaxDisplayType; + map["id"] = _id; + return map; + } +} diff --git a/lib/core/model/packages_offers/responses/tamara_payment_option.dart b/lib/core/model/packages_offers/responses/tamara_payment_option.dart new file mode 100644 index 00000000..dd82287f --- /dev/null +++ b/lib/core/model/packages_offers/responses/tamara_payment_option.dart @@ -0,0 +1,36 @@ +class TamaraPaymentOption { + String? name; + double? minLimit; + double? maxLimit; + int? id; + bool? enable = true; + + String fullName() => '$name Months'; + + TamaraPaymentOption({ + this.name, + this.minLimit, + this.maxLimit, + this.id}); + + + @override + String toString() => fullName(); + + TamaraPaymentOption.fromJson(dynamic json) { + name = json["name"]; + minLimit = json["min_limit"]; + maxLimit = json["max_limit"]; + id = json["id"]; + } + + Map toJson() { + var map = {}; + map["name"] = name; + map["min_limit"] = minLimit; + map["max_limit"] = maxLimit; + map["id"] = id; + return map; + } + +} \ No newline at end of file diff --git a/lib/core/model/pharmacies/Addresses.dart b/lib/core/model/pharmacies/Addresses.dart new file mode 100644 index 00000000..791ffc7f --- /dev/null +++ b/lib/core/model/pharmacies/Addresses.dart @@ -0,0 +1,94 @@ +class Addresses { + String? id; + String? firstName; + String? lastName; + String? email; + String? company; + int? countryId; + String? country; + String? stateProvinceId; + String? city; + String? address1; + String? address2; + String? zipPostalCode; + String? phoneNumber; + String? faxNumber; + String? customerAttributes; + String? createdOnUtc; + String? province; + String? latLong; + bool? isChecked; + + Addresses( + {this.id, + this.firstName, + this.lastName, + this.email, + this.company, + this.countryId, + this.country, + this.stateProvinceId, + this.city, + this.address1, + this.address2, + this.zipPostalCode, + this.phoneNumber, + this.faxNumber, + this.customerAttributes, + this.createdOnUtc, + this.province, + this.latLong, + this.isChecked = false}); + + Addresses.fromJson(Map json) { + id = json['id']; + firstName = json['first_name']; + lastName = json['last_name']; + email = json['email']; + company = json['company']; + countryId = json['country_id']; + country = json['country']; + stateProvinceId = json['state_province_id']; + city = json['city']; + address1 = json['address1']; + address2 = json['address2']; + zipPostalCode = json['zip_postal_code']; + phoneNumber = json['phone_number']; + faxNumber = json['fax_number']; + customerAttributes = json['customer_attributes']; + createdOnUtc = json['created_on_utc']; + province = json['province']; + latLong = json['lat_long']; + isChecked = json['isChecked']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['first_name'] = this.firstName; + data['last_name'] = this.lastName; + data['email'] = this.email; + data['company'] = this.company; + data['country_id'] = this.countryId; + data['country'] = this.country; + data['state_province_id'] = this.stateProvinceId; + data['city'] = this.city; + data['address1'] = this.address1; + data['address2'] = this.address2; + data['zip_postal_code'] = this.zipPostalCode; + data['phone_number'] = this.phoneNumber; + data['fax_number'] = this.faxNumber; + data['customer_attributes'] = this.customerAttributes; + data['created_on_utc'] = this.createdOnUtc; + data['province'] = this.province; + data['lat_long'] = this.latLong; + data['isChecked'] = this.isChecked; + return data; + } + + @override + String toString() { + return "${address1 ?? ""} ${address2 ?? ""}"; + } + +} diff --git a/lib/core/model/pharmacies/BillingAddress.dart b/lib/core/model/pharmacies/BillingAddress.dart new file mode 100644 index 00000000..faa56a45 --- /dev/null +++ b/lib/core/model/pharmacies/BillingAddress.dart @@ -0,0 +1,102 @@ +import 'package:google_maps_flutter/google_maps_flutter.dart'; + +class BillingAddress { + String? id; + String? firstName; + String? lastName; + String? email; + String? company; + int? countryId; + String? country; + String? stateProvinceId; + String? city; + String? address1; + String? address2; + String? zipPostalCode; + String? phoneNumber; + String? faxNumber; + String? customerAttributes; + String? createdOnUtc; + String? province; + String? latLong; + + BillingAddress( + {this.id, + this.firstName, + this.lastName, + this.email, + this.company, + this.countryId, + this.country, + this.stateProvinceId, + this.city, + this.address1, + this.address2, + this.zipPostalCode, + this.phoneNumber, + this.faxNumber, + this.customerAttributes, + this.createdOnUtc, + this.province, + this.latLong}); + + BillingAddress.fromJson(Map json) { + id = json['id']; + firstName = json['first_name']; + lastName = json['last_name']; + email = json['email']; + company = json['company']; + countryId = json['country_id']; + country = json['country']; + stateProvinceId = json['state_province_id']; + city = json['city']; + address1 = json['address1']; + address2 = json['address2']; + zipPostalCode = json['zip_postal_code']; + phoneNumber = json['phone_number']; + faxNumber = json['fax_number']; + customerAttributes = json['customer_attributes']; + createdOnUtc = json['created_on_utc']; + province = json['province']; + latLong = json['lat_long']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['first_name'] = this.firstName; + data['last_name'] = this.lastName; + data['email'] = this.email; + data['company'] = this.company; + data['country_id'] = this.countryId; + data['country'] = this.country; + data['state_province_id'] = this.stateProvinceId; + data['city'] = this.city; + data['address1'] = this.address1; + data['address2'] = this.address2; + data['zip_postal_code'] = this.zipPostalCode; + data['phone_number'] = this.phoneNumber; + data['fax_number'] = this.faxNumber; + data['customer_attributes'] = this.customerAttributes; + data['created_on_utc'] = this.createdOnUtc; + data['province'] = this.province; + data['lat_long'] = this.latLong; + return data; + } + + LatLng getLocation(){ + if(latLong!.contains(',')){ + var parts = latLong!.trim().split(','); + if(parts.length == 2){ + var lat = double.tryParse(parts.first); + var lng = double.tryParse(parts.last); + if(lat != null || lng != null) { + var location = LatLng(lat!, lng!); + return location; + } + } + } + return LatLng(double.nan, double.nan); + //Changed By Aamir + } +} diff --git a/lib/core/model/pharmacies/Country.dart b/lib/core/model/pharmacies/Country.dart new file mode 100644 index 00000000..26225d71 --- /dev/null +++ b/lib/core/model/pharmacies/Country.dart @@ -0,0 +1,32 @@ +class CountryData { + int? id; + String? name; + String? namen; + String? twoLetterIsoCode; + String? threeLetterIsoCode; + + CountryData( + {this.id, + this.name, + this.namen, + this.twoLetterIsoCode, + this.threeLetterIsoCode}); + + CountryData.fromJson(Map json) { + id = json['id']; + name = json['name']; + namen = json['namen']; + twoLetterIsoCode = json['two_letter_iso_code']; + threeLetterIsoCode = json['three_letter_iso_code']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['name'] = this.name; + data['namen'] = this.namen; + data['two_letter_iso_code'] = this.twoLetterIsoCode; + data['three_letter_iso_code'] = this.threeLetterIsoCode; + return data; + } +} diff --git a/lib/core/model/pharmacies/Customer.dart b/lib/core/model/pharmacies/Customer.dart new file mode 100644 index 00000000..5d3e49c3 --- /dev/null +++ b/lib/core/model/pharmacies/Customer.dart @@ -0,0 +1,159 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/BillingAddress.dart'; + +class Customer { + BillingAddress? billingAddress; + BillingAddress? shippingAddress; + List? addresses; + String? fileNumber; + String? iqamaNumber; + int? isOutSa; + int? patientType; + String? gender; + String? birthDate; + String? phone; + String? countryCode; + String? yahalaAccountno; + String? id; + String? username; + String? email; + String? firstName; + String? lastName; + String? languageId; + String? adminComment; + bool? isTaxExempt; + bool? hasShoppingCartItems; + bool? active; + bool? deleted; + bool? isSystemAccount; + String? systemName; + String? lastIpAddress; + String? createdOnUtc; + String? lastLoginDateUtc; + String? lastActivityDateUtc; + int? registeredInStoreId; + List? roleIds; + + Customer( + {this.billingAddress, + this.shippingAddress, + this.addresses, + this.fileNumber, + this.iqamaNumber, + this.isOutSa, + this.patientType, + this.gender, + this.birthDate, + this.phone, + this.countryCode, + this.yahalaAccountno, + this.id, + this.username, + this.email, + this.firstName, + this.lastName, + this.languageId, + this.adminComment, + this.isTaxExempt, + this.hasShoppingCartItems, + this.active, + this.deleted, + this.isSystemAccount, + this.systemName, + this.lastIpAddress, + this.createdOnUtc, + this.lastLoginDateUtc, + this.lastActivityDateUtc, + this.registeredInStoreId, + this.roleIds}); + + Customer.fromJson(Map json) { + billingAddress = json['billing_address'] != null + ? new BillingAddress.fromJson(json['billing_address']) + : null; + shippingAddress = json['shipping_address'] != null + ? new BillingAddress.fromJson(json['shipping_address']) + : null; + if (json['addresses'] != null) { + addresses = []; + json['addresses'].forEach((v) { + addresses!.add(new Addresses.fromJson(v)); + }); + } + fileNumber = json['file_number']; + iqamaNumber = json['iqama_number']; + isOutSa = json['is_out_sa']; + patientType = json['patient_type']; + gender = json['gender']; + birthDate = json['birth_date']; + phone = json['phone']; + countryCode = json['country_code']; + yahalaAccountno = json['yahala_accountno']; + id = json['id']; + username = json['username']; + email = json['email']; + firstName = json['first_name']; + lastName = json['last_name']; + languageId = json['language_id']; + adminComment = json['admin_comment']; + isTaxExempt = json['is_tax_exempt']; + hasShoppingCartItems = json['has_shopping_cart_items']; + active = json['active']; + deleted = json['deleted']; + isSystemAccount = json['is_system_account']; + systemName = json['system_name']; + lastIpAddress = json['last_ip_address']; + createdOnUtc = json['created_on_utc']; + lastLoginDateUtc = json['last_login_date_utc']; + lastActivityDateUtc = json['last_activity_date_utc']; + registeredInStoreId = json['registered_in_store_id']; + if (json['role_ids'] != null) { + roleIds = []; + json['role_ids'].forEach((v) { + roleIds!.add(v); + }); + } + } + + Map toJson() { + final Map data = new Map(); + if (this.billingAddress != null) { + data['billing_address'] = this.billingAddress!.toJson(); + } + if (this.shippingAddress != null) { + data['shipping_address'] = this.shippingAddress!.toJson(); + } + if (this.addresses != null) { + data['addresses'] = this.addresses!.map((v) => v.toJson()).toList(); + } + data['file_number'] = this.fileNumber; + data['iqama_number'] = this.iqamaNumber; + data['is_out_sa'] = this.isOutSa; + data['patient_type'] = this.patientType; + data['gender'] = this.gender; + data['birth_date'] = this.birthDate; + data['phone'] = this.phone; + data['country_code'] = this.countryCode; + data['yahala_accountno'] = this.yahalaAccountno; + data['id'] = this.id; + data['username'] = this.username; + data['email'] = this.email; + data['first_name'] = this.firstName; + data['last_name'] = this.lastName; + data['language_id'] = this.languageId; + data['admin_comment'] = this.adminComment; + data['is_tax_exempt'] = this.isTaxExempt; + data['has_shopping_cart_items'] = this.hasShoppingCartItems; + data['active'] = this.active; + data['deleted'] = this.deleted; + data['is_system_account'] = this.isSystemAccount; + data['system_name'] = this.systemName; + data['last_ip_address'] = this.lastIpAddress; + data['created_on_utc'] = this.createdOnUtc; + data['last_login_date_utc'] = this.lastLoginDateUtc; + data['last_activity_date_utc'] = this.lastActivityDateUtc; + data['registered_in_store_id'] = this.registeredInStoreId; + data['role_ids'] = this.roleIds; + return data; + } +} diff --git a/lib/core/model/pharmacies/LacumAccountInformation.dart b/lib/core/model/pharmacies/LacumAccountInformation.dart new file mode 100644 index 00000000..c78b1563 --- /dev/null +++ b/lib/core/model/pharmacies/LacumAccountInformation.dart @@ -0,0 +1,1926 @@ +import 'LakumInquiryInformationObjVersion.dart'; + +class LacumAccountInformation { + + String? date; + int? languageID; + int? serviceName; + String? time; + String? androidLink; + String? authenticationTokenID; + String? data; + bool? dataw; + int? dietType; + String? errorCode; + String? errorEndUserMessage; + String? errorEndUserMessageN; + String? errorMessage; + int? errorType; + int? foodCategory; + String? iOSLink; + bool? isAuthenticated; + int? mealOrderStatus; + int? mealType; + int? messageStatus; + int? numberOfResultRecords; + String? patientBlodType; + String? successMsg; + String? successMsgN; + int? accountStatus; + String? activeArchiveObject; + int? activeMedicationCount; + String? allMedicationTakenDuringAdmissionList; + int? appointmentNo; + String? arePatientsOnlineList; + String? balanceAmount; + String? bloodGroupList; + int? cVIUnreadCount; + String? checkUserHasAccount; + int? complaintNo; + String? dischargeList; + int? episodeID; + String? finalRadiologyList; + String? fullName; + String? geoFPointsList; + String? geoGetPateintInfo; + String? getAllDoctorsByProjectAndClinicList; + String? getAppointmentNumbersForDoctorList; + String? getCheckUpItemsList; + String? getCosmeticConferenceForTodayList; + String? getDoctorERClinicResult; + String? getInvoiceApprovalList; + String? getNearestProjectList; + String? getPatientAdmissionOrAppoinmentNoList; + String? getPatientBloodType; + String? getPatientInsuranceCardStatusStatisticsList; + String? getSurveyList; + String? getTotalRegisteredPatientList; + String? getUserDetailsList; + String? getCustomerPointInfo; + String? hISApprovalList; + String? hISInpAdmissionList; + String? hISProgNoteAssesmentModelList; + String? hMGGetAllOffersList; + bool? hasApproval; + bool? hasConsultation; + bool? hasDental; + bool? hasLab; + bool? hasPharmacy; + bool? hasRad; + String? hmgSMSGetByProjectIDAndPatientIDList; + int? hoursLeft; + String? iNPMGetAllAdmissionList; + String? iNPMGetPatientInfoForSickLeaveReportList; + String? iNPMHISPatientMedicalStatusUnreadCount; + String? iNPMLABGetPatientLabOrdersResultsList; + String? iNPMLABGetPatientLabResultsList; + String? iNPMLABGetPatientRADReportList; + String? iNPMLABGetPatientRadResultsList; + String? iNPMRadGetPatientRadOrdersCVIList; + String? iNPMRadGetPatientRadOrdersList; + String? iNPMRadGetRadMedicalRecordsList; + String? iNPGetPrescriptionDischargesList; + String? iNPGetPrescriptionReportList; + String? identificationNo; + bool? isHomeMedicineDeliverySupported; + int? isInsertedOrUpdated; + bool? isMainAcoountEqualPatienID; + bool? isPatientAlreadyAgreed; + bool? isPatientCallBackBlackList; + bool? isPatientHaveFingerPrint; + bool? isPatientOnline; + bool? isPatientTokenRemoved; + bool? isPaused; + bool? isProjectWorkingHours; + String? isStoreRateAllowed; + String? isStoreRateInserted; + String? isStoreRateUpdated; + int? labRadUpdatedToRead; + int? labReportUnreadNo; + String? lakumInquiryInformationObj; + LakumInquiryInformationObjVersion? lakumInquiryInformationObjVersion; + String? lakumResponseList; + String? laserGetBodyPartsByCategoryList; + String? laserGetCategoriesList; + String? list; + int? listCount; + int? listCountDeliverd; + int? listCountUnDeliverd; + String? listDeviceInfo; + String? listFamilyAppointments; + String? listLabResultsByAppNo; + String? listLakumInquiryInformationObj; + String? listOpinionGetAllPeriod; + String? listOpinionGetAllServices; + String? listOpinionGetIsAgreeValue; + String? listOpinionGetOpinionLogin; + String? listOpinionGetRequestedSerives; + String? listOpinionGetShareServicesDetails; + String? listOpinionUserTerms; + String? listPLO; + String? listPLR; + String? listPLSR; + String? listPRM; + String? listPatientFamilyFiles; + String? listPatientFileInfo; + String? listRAD; + String? listRADAPI; + String? listActiveGetPrescriptionReportByPatientID; + String? listAppointmentsForDentalClinic; + String? listBabyInfoResult; + String? listCheckInsuranceCoverage; + String? listCompanyClass; + String? listConsentMedicalReport; + String? listDentalAppointments; + String? listDeviceTokenIDByAppointmentNo; + String? listDischargeDiagnosis; + String? listDischargeMedicine; + String? listDischargeSummary; + String? listDoctorResponse; + String? listDoneVaccines; + String? listEReferralResult; + String? listEReferrals; + String? listGetAllPatientsLiveCareAdmin; + String? listGetDataForExcel; + String? listGetMainCountID; + String? listGetPrescriptionReportByPatientID; + String? listGetSickLeave; + String? listHISInvoice; + String? listHISInvoiceProcedures; + String? listInpatientInvoices; + String? listInsuranceCheckList; + String? listInsuranceCompanies; + String? listInsuranceCompaniesGroup; + String? listInsuranceUpdateDetails; + String? listInvoiceApprovalProcedureInfo; + String? listIsLastSatisfactionSurveyReviewedModel; + String? listLabOrderDetailsModel; + String? listMedicalReport; + String? listMedicalReportApprovals; + String? listMedicalReportStatus; + String? listMonthBloodPressureResult; + String? listMonthBloodPressureResultAverage; + String? listMonthDiabtecPatientResult; + String? listMonthDiabtectResultAverage; + String? listMonthWeightMeasurementResult; + String? listMonthWeightMeasurementResultAverage; + String? listOnlinePrescriptionResult; + String? listOutPatientInvoices; + String? listPHRInvoice; + String? listPHRInvoiceItems; + String? listPHRPaymentMethods; + String? listPateintDetails; + String? listPateintInformation; + String? listPatientAdmissionInfo; + String? listPatientAdvanceBalanceAmount; + String? listPatientCallBackLogs; + String? listPatientCallBackToUpdateFromICServer; + String? listPatientCount; + String? listPatientDashboard; + String? listPatientERGetAdminClinicsModel; + String? listPatientERGetAdminProjectsModel; + String? listPatientERGetAllClinicsModel; + String? listPatientHISInvoices; + String? listPatientICProjects; + String? listPatientICProjectsByID; + String? listPatientICProjectsTimings; + String? listPatientIDByUID; + String? listPatientIDForSurveyResult; + String? listPatientInfo; + String? listPatientInfoForDDScreen; + String? listPatientInfoForSickleaveReport; + String? listPatientInsuranceCard; + String? listPatientInsuranceCardHistory; + String? listPatientInsuranceDetails; + String? listPatientPHRInvoices; + String? listPatientServicePoint; + String? listPatientStatusCount; + String? listPatientChatRequestMapModel; + String? listPatientChatRequestModel; + String? listPatientChatRequestVCModel; + String? listPaymentMethods; + String? listPointServices; + String? listPregnancyStagesInfo; + String? listProjectAvgERWaitingTime; + String? listProjectAvgERWaitingTimeHourly; + String? listRadMedicalRecords; + String? listRadMedicalRecordsAPI; + String? listRadMedicalRecordsCVI; + String? listRadMedicalRecordsCVIAPI; + String? listRadMedicalRecordsResults; + String? listSickLeave; + String? listTransaction; + String? listVideoConferenceSessions; + String? listWeekBloodPressureResult; + String? listWeekBloodPressureResultAverage; + String? listWeekDiabtecPatientResult; + String? listWeekDiabtectResultAverage; + String? listWeekWeightMeasurementResult; + String? listWeekWeightMeasurementResultAverage; + String? listYearBloodPressureResult; + String? listYearBloodPressureResultAverage; + String? listYearDiabtecPatientResult; + String? listYearDiabtecResultAverage; + String? listYearWeightMeasurementResult; + String? listYearWeightMeasurementResultAverage; + String? listEInvoiceForDental; + String? listEInvoiceForOnlineCheckIn; + String? medGetActivitiesTransactionsStsList; + String? medGetAvgMonthTransactionsStsList; + String? medGetAvgWeekTransactionsStsList; + String? medGetCategoriesList; + String? medGetMonthActivitiesTransactionsStsList; + String? medGetMonthStepsTransactionsStsList; + String? medGetMonthTransactionsStsList; + String? medGetPatientLastRecordList; + String? medGetSubCategoriesList; + String? medGetTransactionsAndActTransactionsResult; + String? medGetTransactionsList; + String? medGetWeekActivitiesTransactionsStsList; + String? medGetWeekStepsTransactionsStsList; + String? medGetWeekTransactionsStsList; + String? medGetYearActivitiesTransactionsStsList; + String? medGetYearSleepTransactionsStsList; + String? medGetYearStepsTransactionsStsList; + String? medGetYearTransactionsStsList; + String? medInsertTransactionsOutputsList; + String? medicalRecordImages; + int? medicalReportToRead; + int? medicalReportUnreadNo; + bool? missingIDCardAttachment; + bool? missingInsuranceCardAttachment; + bool? missingMedicalReportAttachment; + bool? missingOtherRelationship; + bool? missingPatientContactNo; + bool? missingPatientId; + bool? missingPatientIdentityNumber; + bool? missingPatientName; + bool? missingReferralContactNo; + bool? missingReferralRelationship; + bool? missingReferralRequesterName; + String? mobileNumber; + int? nationalityNumber; + String? onlineCheckInAppointments; + String? opinionUserAgreementContent; + bool? orderInsert; + String? pateintInfoForUpdateList; + String? pateintUpatedList; + String? patientBirthdayCertificate; + String? patientERCMCRequestSummaryByProject; + String? patientERCMCRequestWithTotal; + String? patientERCMCGetAllServicesList; + String? patientERCMCGetTransactionsForOrderList; + String? patientERCoordinates; + String? patientERCountOrderList; + String? patientERCountsForApprovalOffice; + String? patientERDeleteOldCurrentDoctorsOutputsList; + String? patientERDeliveryGetAllDeliverdOrderList; + String? patientERDeliveryGetAllOrderList; + bool? patientERDeliveryIsOrderInserted; + bool? patientERDeliveryIsOrderUpdated; + bool? patientERDeliveryIsPausedChanged; + String? patientERDeliveryNextOrder; + int? patientERDeliveryOrderInsert; + int? patientERDeliveryUpdateOrderStatus; + bool? patientERDriverUpdate; + String? patientERExacartCheckIsDispenseAccpetableList; + String? patientERExacartGetDispenseQuantitiesByOrderIDList; + String? patientERExacartGetOrderDetailsByePharmacyOrderNoList; + String? patientERExacartGetOrderDetailsList; + String? patientERExacartGetTotalDispenseQuantitiesByPresNoList; + bool? patientERExacartIsDispenseAdded; + String? patientERExacartIsDispenseAddedList; + bool? patientERExacartIsOrderCompleted; + String? patientERGetAdminByProjectAndRoleList; + String? patientERGetAdminProjectsList; + String? patientERGetAllDriversList; + String? patientERGetAllNeedAproveStatusList; + String? patientERGetAllPresOrdersStatusList; + String? patientERGetAllProjectsList; + String? patientERGetArchiveInformationList; + String? patientERGetAskDoctorTotalByDateFilterList; + String? patientERGetBookScheduleConfigsList; + String? patientERGetClinicAndTimeAndEpisodeForAppointmentList; + String? patientERGetClinicAndTimeForDischargeList; + String? patientERGetDashboardDataforApporvalSectionForAdminList; + String? patientERGetDashboardDataforApporvalSectionList; + String? patientERGetDashboardDataforHHCSectionForAdminList; + String? patientERGetDashboardDataforHHCSectionList; + String? patientERGetDashboardDataforPrescriptionSectionForAdminList; + String? patientERGetDashboardDataforPrescriptionSectionList; + String? patientERGetDoctorDashboardDataModelList; + String? patientERGetDriverLocationList; + String? patientERGetInsuranceCardRequestByDateFilterList; + String? patientERGetLiveCareSummaryBookedAppoinmentStatusList; + String? patientERGetLiveCareSummaryCovidList; + String? patientERGetLiveCareSummaryForCMCList; + String? patientERGetLiveCareSummaryForHHCList; + String? patientERGetLiveCareSummaryForHomeDeliveryList; + String? patientERGetLiveCareSummaryForInsuranceCardRequestList; + String? patientERGetLiveCareSummaryForNewFilesList; + String? patientERGetLiveCareSummaryForOnlinePaymetRequestList; + String? patientERGetLiveCareSummaryForOnlinePharmacyOrdersList; + String? patientERGetLiveCareSummaryForTrasnportationList; + String? patientERGetLiveCareSummaryLiveCareCountsList; + String? patientERGetMedicalRequestTotalByDateFilterList; + String? patientERGetNearestPendingOrdersList; + String? patientERGetNeedAproveHistoryForOrderList; + String? patientERGetNeedAprovePendingOrdersList; + String? patientERGetNeedAproveStatusStatisticsList; + String? patientERGetPatientAllPresOrdersList; + String? patientERGetPendingPatientsCountList; + String? patientERGetPresOrdersHistoryForAdminList; + String? patientERGetPresOrdersHistoryForOrderList; + String? patientERGetPresOrdersStatusStatisticsList; + String? patientERHHCRequest; + String? patientERHHCRequestSummaryByProject; + String? patientERHHCRequestWithTotal; + String? patientERHHCGetAllServicesList; + String? patientERHHCGetTransactionsForOrderList; + String? patientERHomeDeliveryCounts; + bool? patientERInsertDriver; + String? patientERInsertNewCurrentDoctorsOutputsList; + String? patientERInsuranceStatusCountList; + bool? patientERIsNearestProjectUpdated; + bool? patientERIsNeedAproveReturnedToQueue; + bool? patientERIsNeedAproveUpdated; + bool? patientERIsOrderClientRequestUpdated; + bool? patientERIsOrderReturnedToQueue; + bool? patientERIsPresOrderInserted; + bool? patientERIsPresOrderUpdated; + bool? patientERIsProjectUpdated; + String? patientERNotCompletedDetails; + String? patientERPatientsCountByCallStatus; + String? patientERPeakHourCounts; + String? patientERPresOrderInfo; + String? patientERPrescriptionCounts; + String? patientERProjectsContribution; + String? patientERRRTGetAllQuestionsList; + String? patientERRRTGetAllTransportationMethodList; + String? patientERRRTGetPickUpRequestByPresOrderIDList; + String? patientERRealRRTGetAllServicesList; + String? patientERRealRRTGetOrderDetailsList; + String? patientERRealRRTGetTransactionsForOrderList; + bool? patientERRealRRTIsTransInserted; + String? patientERRequestList; + String? patientERTransportationRequestWithTotal; + String? patientERealRRTGetServicePriceList; + String? patientInfoByAdmissionNoList; + String? patientMonitorGetPatientHeartRate; + int? patientNotServedCounts; + String? patientPrescriptionList; + String? patientAllergies; + String? patientCheckAppointmentValidationList; + String? patientLoginTokenList; + String? patientQRLoginInfoList; + String? patientSELECTDeviceIMEIbyIMEIList; + String? pharmList; + String? prefLang; + int? radReportUnreadNo; + String? radGetPatientRadOrdersForDentalList; + int? referralNumber; + String? reminderConfigurations; + String? requestNo; + int? rowCount; + String? servicePrivilegeList; + String? shareFamilyFileObj; + String? status; + int? successCode; + String? surveyRate; + String? symptomCheckerConditionList; + String? symptomCheckerGetAllDefaultQuestionsList; + String? symptomCheckerGetBodyPartSymptomsList; + String? symptomCheckerGetBodyPartsByCodeList; + String? symptomCheckerGetBodyPartsList; + String? symptomCheckerJsonResponseInString; + int? timerTime; + int? totalAdvanceBalanceAmount; + int? totalPatientsCount; + int? totalPendingApprovalCount; + int? totalUnUsedCount; + int? transactionNo; + int? unReadCounts; + bool? updateStatus; + String? userAgreementContent; + int? yahalaAccountNo; + bool? check24HourComplaint; + String? currency; + String? message; + int? patientID; + int? returnValue; + String? returnValueStr; + int? statusCode; + + LacumAccountInformation( + {this.date, + this.languageID, + this.serviceName, + this.time, + this.androidLink, + this.authenticationTokenID, + this.data, + this.dataw, + this.dietType, + this.errorCode, + this.errorEndUserMessage, + this.errorEndUserMessageN, + this.errorMessage, + this.errorType, + this.foodCategory, + this.iOSLink, + this.isAuthenticated, + this.mealOrderStatus, + this.mealType, + this.messageStatus, + this.numberOfResultRecords, + this.patientBlodType, + this.successMsg, + this.successMsgN, + this.accountStatus, + this.activeArchiveObject, + this.activeMedicationCount, + this.allMedicationTakenDuringAdmissionList, + this.appointmentNo, + this.arePatientsOnlineList, + this.balanceAmount, + this.bloodGroupList, + this.cVIUnreadCount, + this.checkUserHasAccount, + this.complaintNo, + this.dischargeList, + this.episodeID, + this.finalRadiologyList, + this.fullName, + this.geoFPointsList, + this.geoGetPateintInfo, + this.getAllDoctorsByProjectAndClinicList, + this.getAppointmentNumbersForDoctorList, + this.getCheckUpItemsList, + this.getCosmeticConferenceForTodayList, + this.getDoctorERClinicResult, + this.getInvoiceApprovalList, + this.getNearestProjectList, + this.getPatientAdmissionOrAppoinmentNoList, + this.getPatientBloodType, + this.getPatientInsuranceCardStatusStatisticsList, + this.getSurveyList, + this.getTotalRegisteredPatientList, + this.getUserDetailsList, + this.getCustomerPointInfo, + this.hISApprovalList, + this.hISInpAdmissionList, + this.hISProgNoteAssesmentModelList, + this.hMGGetAllOffersList, + this.hasApproval, + this.hasConsultation, + this.hasDental, + this.hasLab, + this.hasPharmacy, + this.hasRad, + this.hmgSMSGetByProjectIDAndPatientIDList, + this.hoursLeft, + this.iNPMGetAllAdmissionList, + this.iNPMGetPatientInfoForSickLeaveReportList, + this.iNPMHISPatientMedicalStatusUnreadCount, + this.iNPMLABGetPatientLabOrdersResultsList, + this.iNPMLABGetPatientLabResultsList, + this.iNPMLABGetPatientRADReportList, + this.iNPMLABGetPatientRadResultsList, + this.iNPMRadGetPatientRadOrdersCVIList, + this.iNPMRadGetPatientRadOrdersList, + this.iNPMRadGetRadMedicalRecordsList, + this.iNPGetPrescriptionDischargesList, + this.iNPGetPrescriptionReportList, + this.identificationNo, + this.isHomeMedicineDeliverySupported, + this.isInsertedOrUpdated, + this.isMainAcoountEqualPatienID, + this.isPatientAlreadyAgreed, + this.isPatientCallBackBlackList, + this.isPatientHaveFingerPrint, + this.isPatientOnline, + this.isPatientTokenRemoved, + this.isPaused, + this.isProjectWorkingHours, + this.isStoreRateAllowed, + this.isStoreRateInserted, + this.isStoreRateUpdated, + this.labRadUpdatedToRead, + this.labReportUnreadNo, + this.lakumInquiryInformationObj, + this.lakumInquiryInformationObjVersion, + this.lakumResponseList, + this.laserGetBodyPartsByCategoryList, + this.laserGetCategoriesList, + this.list, + this.listCount, + this.listCountDeliverd, + this.listCountUnDeliverd, + this.listDeviceInfo, + this.listFamilyAppointments, + this.listLabResultsByAppNo, + this.listLakumInquiryInformationObj, + this.listOpinionGetAllPeriod, + this.listOpinionGetAllServices, + this.listOpinionGetIsAgreeValue, + this.listOpinionGetOpinionLogin, + this.listOpinionGetRequestedSerives, + this.listOpinionGetShareServicesDetails, + this.listOpinionUserTerms, + this.listPLO, + this.listPLR, + this.listPLSR, + this.listPRM, + this.listPatientFamilyFiles, + this.listPatientFileInfo, + this.listRAD, + this.listRADAPI, + this.listActiveGetPrescriptionReportByPatientID, + this.listAppointmentsForDentalClinic, + this.listBabyInfoResult, + this.listCheckInsuranceCoverage, + this.listCompanyClass, + this.listConsentMedicalReport, + this.listDentalAppointments, + this.listDeviceTokenIDByAppointmentNo, + this.listDischargeDiagnosis, + this.listDischargeMedicine, + this.listDischargeSummary, + this.listDoctorResponse, + this.listDoneVaccines, + this.listEReferralResult, + this.listEReferrals, + this.listGetAllPatientsLiveCareAdmin, + this.listGetDataForExcel, + this.listGetMainCountID, + this.listGetPrescriptionReportByPatientID, + this.listGetSickLeave, + this.listHISInvoice, + this.listHISInvoiceProcedures, + this.listInpatientInvoices, + this.listInsuranceCheckList, + this.listInsuranceCompanies, + this.listInsuranceCompaniesGroup, + this.listInsuranceUpdateDetails, + this.listInvoiceApprovalProcedureInfo, + this.listIsLastSatisfactionSurveyReviewedModel, + this.listLabOrderDetailsModel, + this.listMedicalReport, + this.listMedicalReportApprovals, + this.listMedicalReportStatus, + this.listMonthBloodPressureResult, + this.listMonthBloodPressureResultAverage, + this.listMonthDiabtecPatientResult, + this.listMonthDiabtectResultAverage, + this.listMonthWeightMeasurementResult, + this.listMonthWeightMeasurementResultAverage, + this.listOnlinePrescriptionResult, + this.listOutPatientInvoices, + this.listPHRInvoice, + this.listPHRInvoiceItems, + this.listPHRPaymentMethods, + this.listPateintDetails, + this.listPateintInformation, + this.listPatientAdmissionInfo, + this.listPatientAdvanceBalanceAmount, + this.listPatientCallBackLogs, + this.listPatientCallBackToUpdateFromICServer, + this.listPatientCount, + this.listPatientDashboard, + this.listPatientERGetAdminClinicsModel, + this.listPatientERGetAdminProjectsModel, + this.listPatientERGetAllClinicsModel, + this.listPatientHISInvoices, + this.listPatientICProjects, + this.listPatientICProjectsByID, + this.listPatientICProjectsTimings, + this.listPatientIDByUID, + this.listPatientIDForSurveyResult, + this.listPatientInfo, + this.listPatientInfoForDDScreen, + this.listPatientInfoForSickleaveReport, + this.listPatientInsuranceCard, + this.listPatientInsuranceCardHistory, + this.listPatientInsuranceDetails, + this.listPatientPHRInvoices, + this.listPatientServicePoint, + this.listPatientStatusCount, + this.listPatientChatRequestMapModel, + this.listPatientChatRequestModel, + this.listPatientChatRequestVCModel, + this.listPaymentMethods, + this.listPointServices, + this.listPregnancyStagesInfo, + this.listProjectAvgERWaitingTime, + this.listProjectAvgERWaitingTimeHourly, + this.listRadMedicalRecords, + this.listRadMedicalRecordsAPI, + this.listRadMedicalRecordsCVI, + this.listRadMedicalRecordsCVIAPI, + this.listRadMedicalRecordsResults, + this.listSickLeave, + this.listTransaction, + this.listVideoConferenceSessions, + this.listWeekBloodPressureResult, + this.listWeekBloodPressureResultAverage, + this.listWeekDiabtecPatientResult, + this.listWeekDiabtectResultAverage, + this.listWeekWeightMeasurementResult, + this.listWeekWeightMeasurementResultAverage, + this.listYearBloodPressureResult, + this.listYearBloodPressureResultAverage, + this.listYearDiabtecPatientResult, + this.listYearDiabtecResultAverage, + this.listYearWeightMeasurementResult, + this.listYearWeightMeasurementResultAverage, + this.listEInvoiceForDental, + this.listEInvoiceForOnlineCheckIn, + this.medGetActivitiesTransactionsStsList, + this.medGetAvgMonthTransactionsStsList, + this.medGetAvgWeekTransactionsStsList, + this.medGetCategoriesList, + this.medGetMonthActivitiesTransactionsStsList, + this.medGetMonthStepsTransactionsStsList, + this.medGetMonthTransactionsStsList, + this.medGetPatientLastRecordList, + this.medGetSubCategoriesList, + this.medGetTransactionsAndActTransactionsResult, + this.medGetTransactionsList, + this.medGetWeekActivitiesTransactionsStsList, + this.medGetWeekStepsTransactionsStsList, + this.medGetWeekTransactionsStsList, + this.medGetYearActivitiesTransactionsStsList, + this.medGetYearSleepTransactionsStsList, + this.medGetYearStepsTransactionsStsList, + this.medGetYearTransactionsStsList, + this.medInsertTransactionsOutputsList, + this.medicalRecordImages, + this.medicalReportToRead, + this.medicalReportUnreadNo, + this.missingIDCardAttachment, + this.missingInsuranceCardAttachment, + this.missingMedicalReportAttachment, + this.missingOtherRelationship, + this.missingPatientContactNo, + this.missingPatientId, + this.missingPatientIdentityNumber, + this.missingPatientName, + this.missingReferralContactNo, + this.missingReferralRelationship, + this.missingReferralRequesterName, + this.mobileNumber, + this.nationalityNumber, + this.onlineCheckInAppointments, + this.opinionUserAgreementContent, + this.orderInsert, + this.pateintInfoForUpdateList, + this.pateintUpatedList, + this.patientBirthdayCertificate, + this.patientERCMCRequestSummaryByProject, + this.patientERCMCRequestWithTotal, + this.patientERCMCGetAllServicesList, + this.patientERCMCGetTransactionsForOrderList, + this.patientERCoordinates, + this.patientERCountOrderList, + this.patientERCountsForApprovalOffice, + this.patientERDeleteOldCurrentDoctorsOutputsList, + this.patientERDeliveryGetAllDeliverdOrderList, + this.patientERDeliveryGetAllOrderList, + this.patientERDeliveryIsOrderInserted, + this.patientERDeliveryIsOrderUpdated, + this.patientERDeliveryIsPausedChanged, + this.patientERDeliveryNextOrder, + this.patientERDeliveryOrderInsert, + this.patientERDeliveryUpdateOrderStatus, + this.patientERDriverUpdate, + this.patientERExacartCheckIsDispenseAccpetableList, + this.patientERExacartGetDispenseQuantitiesByOrderIDList, + this.patientERExacartGetOrderDetailsByePharmacyOrderNoList, + this.patientERExacartGetOrderDetailsList, + this.patientERExacartGetTotalDispenseQuantitiesByPresNoList, + this.patientERExacartIsDispenseAdded, + this.patientERExacartIsDispenseAddedList, + this.patientERExacartIsOrderCompleted, + this.patientERGetAdminByProjectAndRoleList, + this.patientERGetAdminProjectsList, + this.patientERGetAllDriversList, + this.patientERGetAllNeedAproveStatusList, + this.patientERGetAllPresOrdersStatusList, + this.patientERGetAllProjectsList, + this.patientERGetArchiveInformationList, + this.patientERGetAskDoctorTotalByDateFilterList, + this.patientERGetBookScheduleConfigsList, + this.patientERGetClinicAndTimeAndEpisodeForAppointmentList, + this.patientERGetClinicAndTimeForDischargeList, + this.patientERGetDashboardDataforApporvalSectionForAdminList, + this.patientERGetDashboardDataforApporvalSectionList, + this.patientERGetDashboardDataforHHCSectionForAdminList, + this.patientERGetDashboardDataforHHCSectionList, + this.patientERGetDashboardDataforPrescriptionSectionForAdminList, + this.patientERGetDashboardDataforPrescriptionSectionList, + this.patientERGetDoctorDashboardDataModelList, + this.patientERGetDriverLocationList, + this.patientERGetInsuranceCardRequestByDateFilterList, + this.patientERGetLiveCareSummaryBookedAppoinmentStatusList, + this.patientERGetLiveCareSummaryCovidList, + this.patientERGetLiveCareSummaryForCMCList, + this.patientERGetLiveCareSummaryForHHCList, + this.patientERGetLiveCareSummaryForHomeDeliveryList, + this.patientERGetLiveCareSummaryForInsuranceCardRequestList, + this.patientERGetLiveCareSummaryForNewFilesList, + this.patientERGetLiveCareSummaryForOnlinePaymetRequestList, + this.patientERGetLiveCareSummaryForOnlinePharmacyOrdersList, + this.patientERGetLiveCareSummaryForTrasnportationList, + this.patientERGetLiveCareSummaryLiveCareCountsList, + this.patientERGetMedicalRequestTotalByDateFilterList, + this.patientERGetNearestPendingOrdersList, + this.patientERGetNeedAproveHistoryForOrderList, + this.patientERGetNeedAprovePendingOrdersList, + this.patientERGetNeedAproveStatusStatisticsList, + this.patientERGetPatientAllPresOrdersList, + this.patientERGetPendingPatientsCountList, + this.patientERGetPresOrdersHistoryForAdminList, + this.patientERGetPresOrdersHistoryForOrderList, + this.patientERGetPresOrdersStatusStatisticsList, + this.patientERHHCRequest, + this.patientERHHCRequestSummaryByProject, + this.patientERHHCRequestWithTotal, + this.patientERHHCGetAllServicesList, + this.patientERHHCGetTransactionsForOrderList, + this.patientERHomeDeliveryCounts, + this.patientERInsertDriver, + this.patientERInsertNewCurrentDoctorsOutputsList, + this.patientERInsuranceStatusCountList, + this.patientERIsNearestProjectUpdated, + this.patientERIsNeedAproveReturnedToQueue, + this.patientERIsNeedAproveUpdated, + this.patientERIsOrderClientRequestUpdated, + this.patientERIsOrderReturnedToQueue, + this.patientERIsPresOrderInserted, + this.patientERIsPresOrderUpdated, + this.patientERIsProjectUpdated, + this.patientERNotCompletedDetails, + this.patientERPatientsCountByCallStatus, + this.patientERPeakHourCounts, + this.patientERPresOrderInfo, + this.patientERPrescriptionCounts, + this.patientERProjectsContribution, + this.patientERRRTGetAllQuestionsList, + this.patientERRRTGetAllTransportationMethodList, + this.patientERRRTGetPickUpRequestByPresOrderIDList, + this.patientERRealRRTGetAllServicesList, + this.patientERRealRRTGetOrderDetailsList, + this.patientERRealRRTGetTransactionsForOrderList, + this.patientERRealRRTIsTransInserted, + this.patientERRequestList, + this.patientERTransportationRequestWithTotal, + this.patientERealRRTGetServicePriceList, + this.patientInfoByAdmissionNoList, + this.patientMonitorGetPatientHeartRate, + this.patientNotServedCounts, + this.patientPrescriptionList, + this.patientAllergies, + this.patientCheckAppointmentValidationList, + this.patientLoginTokenList, + this.patientQRLoginInfoList, + this.patientSELECTDeviceIMEIbyIMEIList, + this.pharmList, + this.prefLang, + this.radReportUnreadNo, + this.radGetPatientRadOrdersForDentalList, + this.referralNumber, + this.reminderConfigurations, + this.requestNo, + this.rowCount, + this.servicePrivilegeList, + this.shareFamilyFileObj, + this.status, + this.successCode, + this.surveyRate, + this.symptomCheckerConditionList, + this.symptomCheckerGetAllDefaultQuestionsList, + this.symptomCheckerGetBodyPartSymptomsList, + this.symptomCheckerGetBodyPartsByCodeList, + this.symptomCheckerGetBodyPartsList, + this.symptomCheckerJsonResponseInString, + this.timerTime, + this.totalAdvanceBalanceAmount, + this.totalPatientsCount, + this.totalPendingApprovalCount, + this.totalUnUsedCount, + this.transactionNo, + this.unReadCounts, + this.updateStatus, + this.userAgreementContent, + this.yahalaAccountNo, + this.check24HourComplaint, + this.currency, + this.message, + this.patientID, + this.returnValue, + this.returnValueStr, + this.statusCode}); + + LacumAccountInformation.fromJson(Map json) { + date = json['Date']; + languageID = json['LanguageID']; + serviceName = json['ServiceName']; + time = json['Time']; + androidLink = json['AndroidLink']; + authenticationTokenID = json['AuthenticationTokenID']; + data = json['Data']; + dataw = json['Dataw']; + dietType = json['DietType']; + errorCode = json['ErrorCode']; + errorEndUserMessage = json['ErrorEndUserMessage']; + errorEndUserMessageN = json['ErrorEndUserMessageN']; + errorMessage = json['ErrorMessage']; + errorType = json['ErrorType']; + foodCategory = json['FoodCategory']; + iOSLink = json['IOSLink']; + isAuthenticated = json['IsAuthenticated']; + mealOrderStatus = json['MealOrderStatus']; + mealType = json['MealType']; + messageStatus = json['MessageStatus']; + numberOfResultRecords = json['NumberOfResultRecords']; + patientBlodType = json['PatientBlodType']; + successMsg = json['SuccessMsg']; + successMsgN = json['SuccessMsgN']; + accountStatus = json['AccountStatus']; + activeArchiveObject = json['ActiveArchiveObject']; + activeMedicationCount = json['ActiveMedicationCount']; + allMedicationTakenDuringAdmissionList = + json['AllMedicationTakenDuringAdmission_List']; + appointmentNo = json['AppointmentNo']; + arePatientsOnlineList = json['ArePatientsOnlineList']; + balanceAmount = json['BalanceAmount']; + bloodGroupList = json['BloodGroupList']; + cVIUnreadCount = json['CVI_UnreadCount']; + checkUserHasAccount = json['CheckUserHasAccount']; + complaintNo = json['ComplaintNo']; + dischargeList = json['DischargeList']; + episodeID = json['EpisodeID']; + finalRadiologyList = json['FinalRadiologyList']; + fullName = json['FullName']; + geoFPointsList = json['GeoF_PointsList']; + geoGetPateintInfo = json['GeoGetPateintInfo']; + getAllDoctorsByProjectAndClinicList = + json['GetAllDoctorsByProjectAndClinicList']; + getAppointmentNumbersForDoctorList = + json['GetAppointmentNumbersForDoctorList']; + getCheckUpItemsList = json['GetCheckUpItemsList']; + getCosmeticConferenceForTodayList = + json['GetCosmeticConferenceForTodayList']; + getDoctorERClinicResult = json['GetDoctorERClinicResult']; + getInvoiceApprovalList = json['GetInvoiceApprovalList']; + getNearestProjectList = json['GetNearestProjectList']; + getPatientAdmissionOrAppoinmentNoList = + json['GetPatientAdmissionOrAppoinmentNo_List']; + getPatientBloodType = json['GetPatientBloodType']; + getPatientInsuranceCardStatusStatisticsList = + json['GetPatientInsuranceCardStatusStatisticsList']; + getSurveyList = json['GetSurveyList']; + getTotalRegisteredPatientList = json['GetTotalRegisteredPatientList']; + getUserDetailsList = json['GetUserDetailsList']; + getCustomerPointInfo = json['Get_CustomerPointInfo']; + hISApprovalList = json['HIS_Approval_List']; + hISInpAdmissionList = json['HIS_InpAdmission_List']; + hISProgNoteAssesmentModelList = json['HIS_ProgNoteAssesmentModel_List']; + hMGGetAllOffersList = json['HMG_GetAllOffersList']; + hasApproval = json['Has_Approval']; + hasConsultation = json['Has_Consultation']; + hasDental = json['Has_Dental']; + hasLab = json['Has_Lab']; + hasPharmacy = json['Has_Pharmacy']; + hasRad = json['Has_Rad']; + hmgSMSGetByProjectIDAndPatientIDList = + json['Hmg_SMS_Get_By_ProjectID_And_PatientIDList']; + hoursLeft = json['HoursLeft']; + iNPMGetAllAdmissionList = json['INPM_GetAllAdmission_List']; + iNPMGetPatientInfoForSickLeaveReportList = + json['INPM_GetPatientInfoForSickLeaveReport_List']; + iNPMHISPatientMedicalStatusUnreadCount = + json['INPM_HIS_PatientMedicalStatus_UnreadCount']; + iNPMLABGetPatientLabOrdersResultsList = + json['INPM_LAB_GetPatientLabOrdersResults_List']; + iNPMLABGetPatientLabResultsList = + json['INPM_LAB_GetPatientLabResults_List']; + iNPMLABGetPatientRADReportList = json['INPM_LAB_GetPatientRADReport_List']; + iNPMLABGetPatientRadResultsList = + json['INPM_LAB_GetPatientRadResults_List']; + iNPMRadGetPatientRadOrdersCVIList = + json['INPM_Rad_GetPatientRadOrders_CVI_List']; + iNPMRadGetPatientRadOrdersList = json['INPM_Rad_GetPatientRadOrders_List']; + iNPMRadGetRadMedicalRecordsList = + json['INPM_Rad_GetRadMedicalRecords_List']; + iNPGetPrescriptionDischargesList = + json['INP_GetPrescriptionDischarges_List']; + iNPGetPrescriptionReportList = json['INP_GetPrescriptionReport_List']; + identificationNo = json['IdentificationNo']; + isHomeMedicineDeliverySupported = json['IsHomeMedicineDeliverySupported']; + isInsertedOrUpdated = json['IsInsertedOrUpdated']; + isMainAcoountEqualPatienID = json['IsMainAcoountEqualPatienID']; + isPatientAlreadyAgreed = json['IsPatientAlreadyAgreed']; + isPatientCallBackBlackList = json['IsPatientCallBackBlackList']; + isPatientHaveFingerPrint = json['IsPatientHaveFingerPrint']; + isPatientOnline = json['IsPatientOnline']; + isPatientTokenRemoved = json['IsPatientTokenRemoved']; + isPaused = json['IsPaused']; + isProjectWorkingHours = json['IsProjectWorkingHours']; + isStoreRateAllowed = json['IsStoreRateAllowed']; + isStoreRateInserted = json['IsStoreRateInserted']; + isStoreRateUpdated = json['IsStoreRateUpdated']; + labRadUpdatedToRead = json['LabRadUpdatedToRead']; + labReportUnreadNo = json['LabReportUnreadNo']; + lakumInquiryInformationObj = json['LakumInquiryInformationObj']; + lakumInquiryInformationObjVersion = + json['LakumInquiryInformationObjVersion'] != null + ? LakumInquiryInformationObjVersion.fromJson( + json['LakumInquiryInformationObjVersion']) + : null; + lakumResponseList = json['LakumResponseList']; + laserGetBodyPartsByCategoryList = json['Laser_GetBodyPartsByCategoryList']; + laserGetCategoriesList = json['Laser_GetCategoriesList']; + list = json['List']; + listCount = json['ListCount']; + listCountDeliverd = json['ListCountDeliverd']; + listCountUnDeliverd = json['ListCountUnDeliverd']; + listDeviceInfo = json['ListDeviceInfo']; + listFamilyAppointments = json['ListFamilyAppointments']; + listLabResultsByAppNo = json['ListLabResultsByAppNo']; + listLakumInquiryInformationObj = json['ListLakumInquiryInformationObj']; + listOpinionGetAllPeriod = json['ListOpinion_GetAllPeriod']; + listOpinionGetAllServices = json['ListOpinion_GetAllServices']; + listOpinionGetIsAgreeValue = json['ListOpinion_GetIsAgreeValue']; + listOpinionGetOpinionLogin = json['ListOpinion_GetOpinionLogin']; + listOpinionGetRequestedSerives = json['ListOpinion_GetRequestedSerives']; + listOpinionGetShareServicesDetails = + json['ListOpinion_GetShareServicesDetails']; + listOpinionUserTerms = json['ListOpinion_UserTerms']; + listPLO = json['ListPLO']; + listPLR = json['ListPLR']; + listPLSR = json['ListPLSR']; + listPRM = json['ListPRM']; + listPatientFamilyFiles = json['ListPatientFamilyFiles']; + listPatientFileInfo = json['ListPatientFileInfo']; + listRAD = json['ListRAD']; + listRADAPI = json['ListRADAPI']; + listActiveGetPrescriptionReportByPatientID = + json['List_ActiveGetPrescriptionReportByPatientID']; + listAppointmentsForDentalClinic = json['List_AppointmentsForDentalClinic']; + listBabyInfoResult = json['List_BabyInfoResult']; + listCheckInsuranceCoverage = json['List_CheckInsuranceCoverage']; + listCompanyClass = json['List_CompanyClass']; + listConsentMedicalReport = json['List_ConsentMedicalReport']; + listDentalAppointments = json['List_DentalAppointments']; + listDeviceTokenIDByAppointmentNo = + json['List_DeviceTokenIDByAppointmentNo']; + listDischargeDiagnosis = json['List_DischargeDiagnosis']; + listDischargeMedicine = json['List_DischargeMedicine']; + listDischargeSummary = json['List_DischargeSummary']; + listDoctorResponse = json['List_DoctorResponse']; + listDoneVaccines = json['List_DoneVaccines']; + listEReferralResult = json['List_EReferralResult']; + listEReferrals = json['List_EReferrals']; + listGetAllPatientsLiveCareAdmin = + json['List_GetAllPatients_LiveCare_Admin']; + listGetDataForExcel = json['List_GetDataForExcel']; + listGetMainCountID = json['List_GetMainCountID']; + listGetPrescriptionReportByPatientID = + json['List_GetPrescriptionReportByPatientID']; + listGetSickLeave = json['List_GetSickLeave']; + listHISInvoice = json['List_HISInvoice']; + listHISInvoiceProcedures = json['List_HISInvoiceProcedures']; + listInpatientInvoices = json['List_InpatientInvoices']; + listInsuranceCheckList = json['List_InsuranceCheckList']; + listInsuranceCompanies = json['List_InsuranceCompanies']; + listInsuranceCompaniesGroup = json['List_InsuranceCompaniesGroup']; + listInsuranceUpdateDetails = json['List_InsuranceUpdateDetails']; + listInvoiceApprovalProcedureInfo = + json['List_InvoiceApprovalProcedureInfo']; + listIsLastSatisfactionSurveyReviewedModel = + json['List_IsLastSatisfactionSurveyReviewedModel']; + listLabOrderDetailsModel = json['List_LabOrderDetailsModel']; + listMedicalReport = json['List_MedicalReport']; + listMedicalReportApprovals = json['List_MedicalReportApprovals']; + listMedicalReportStatus = json['List_MedicalReportStatus']; + listMonthBloodPressureResult = json['List_MonthBloodPressureResult']; + listMonthBloodPressureResultAverage = + json['List_MonthBloodPressureResultAverage']; + listMonthDiabtecPatientResult = json['List_MonthDiabtecPatientResult']; + listMonthDiabtectResultAverage = json['List_MonthDiabtectResultAverage']; + listMonthWeightMeasurementResult = + json['List_MonthWeightMeasurementResult']; + listMonthWeightMeasurementResultAverage = + json['List_MonthWeightMeasurementResultAverage']; + listOnlinePrescriptionResult = json['List_OnlinePrescriptionResult']; + listOutPatientInvoices = json['List_OutPatientInvoices']; + listPHRInvoice = json['List_PHRInvoice']; + listPHRInvoiceItems = json['List_PHRInvoiceItems']; + listPHRPaymentMethods = json['List_PHRPaymentMethods']; + listPateintDetails = json['List_PateintDetails']; + listPateintInformation = json['List_PateintInformation']; + listPatientAdmissionInfo = json['List_PatientAdmissionInfo']; + listPatientAdvanceBalanceAmount = json['List_PatientAdvanceBalanceAmount']; + listPatientCallBackLogs = json['List_PatientCallBackLogs']; + listPatientCallBackToUpdateFromICServer = + json['List_PatientCallBackToUpdateFromICServer']; + listPatientCount = json['List_PatientCount']; + listPatientDashboard = json['List_PatientDashboard']; + listPatientERGetAdminClinicsModel = + json['List_PatientER_GetAdminClinicsModel']; + listPatientERGetAdminProjectsModel = + json['List_PatientER_GetAdminProjectsModel']; + listPatientERGetAllClinicsModel = json['List_PatientER_GetAllClinicsModel']; + listPatientHISInvoices = json['List_PatientHISInvoices']; + listPatientICProjects = json['List_PatientICProjects']; + listPatientICProjectsByID = json['List_PatientICProjectsByID']; + listPatientICProjectsTimings = json['List_PatientICProjectsTimings']; + listPatientIDByUID = json['List_PatientIDByUID']; + listPatientIDForSurveyResult = json['List_PatientIDForSurveyResult']; + listPatientInfo = json['List_PatientInfo']; + listPatientInfoForDDScreen = json['List_PatientInfoForDDScreen']; + listPatientInfoForSickleaveReport = + json['List_PatientInfoForSickleaveReport']; + listPatientInsuranceCard = json['List_PatientInsuranceCard']; + listPatientInsuranceCardHistory = json['List_PatientInsuranceCardHistory']; + listPatientInsuranceDetails = json['List_PatientInsuranceDetails']; + listPatientPHRInvoices = json['List_PatientPHRInvoices']; + listPatientServicePoint = json['List_PatientServicePoint']; + listPatientStatusCount = json['List_PatientStatusCount']; + listPatientChatRequestMapModel = json['List_Patient_ChatRequestMapModel']; + listPatientChatRequestModel = json['List_Patient_ChatRequestModel']; + listPatientChatRequestVCModel = json['List_Patient_ChatRequestVCModel']; + listPaymentMethods = json['List_PaymentMethods']; + listPointServices = json['List_PointServices']; + listPregnancyStagesInfo = json['List_PregnancyStagesInfo']; + listProjectAvgERWaitingTime = json['List_ProjectAvgERWaitingTime']; + listProjectAvgERWaitingTimeHourly = + json['List_ProjectAvgERWaitingTimeHourly']; + listRadMedicalRecords = json['List_RadMedicalRecords']; + listRadMedicalRecordsAPI = json['List_RadMedicalRecordsAPI']; + listRadMedicalRecordsCVI = json['List_RadMedicalRecordsCVI']; + listRadMedicalRecordsCVIAPI = json['List_RadMedicalRecordsCVIAPI']; + listRadMedicalRecordsResults = json['List_RadMedicalRecordsResults']; + listSickLeave = json['List_SickLeave']; + listTransaction = json['List_Transaction']; + listVideoConferenceSessions = json['List_VideoConferenceSessions']; + listWeekBloodPressureResult = json['List_WeekBloodPressureResult']; + listWeekBloodPressureResultAverage = + json['List_WeekBloodPressureResultAverage']; + listWeekDiabtecPatientResult = json['List_WeekDiabtecPatientResult']; + listWeekDiabtectResultAverage = json['List_WeekDiabtectResultAverage']; + listWeekWeightMeasurementResult = json['List_WeekWeightMeasurementResult']; + listWeekWeightMeasurementResultAverage = + json['List_WeekWeightMeasurementResultAverage']; + listYearBloodPressureResult = json['List_YearBloodPressureResult']; + listYearBloodPressureResultAverage = + json['List_YearBloodPressureResultAverage']; + listYearDiabtecPatientResult = json['List_YearDiabtecPatientResult']; + listYearDiabtecResultAverage = json['List_YearDiabtecResultAverage']; + listYearWeightMeasurementResult = json['List_YearWeightMeasurementResult']; + listYearWeightMeasurementResultAverage = + json['List_YearWeightMeasurementResultAverage']; + listEInvoiceForDental = json['List_eInvoiceForDental']; + listEInvoiceForOnlineCheckIn = json['List_eInvoiceForOnlineCheckIn']; + medGetActivitiesTransactionsStsList = + json['Med_GetActivitiesTransactionsStsList']; + medGetAvgMonthTransactionsStsList = + json['Med_GetAvgMonthTransactionsStsList']; + medGetAvgWeekTransactionsStsList = + json['Med_GetAvgWeekTransactionsStsList']; + medGetCategoriesList = json['Med_GetCategoriesList']; + medGetMonthActivitiesTransactionsStsList = + json['Med_GetMonthActivitiesTransactionsStsList']; + medGetMonthStepsTransactionsStsList = + json['Med_GetMonthStepsTransactionsStsList']; + medGetMonthTransactionsStsList = json['Med_GetMonthTransactionsStsList']; + medGetPatientLastRecordList = json['Med_GetPatientLastRecordList']; + medGetSubCategoriesList = json['Med_GetSubCategoriesList']; + medGetTransactionsAndActTransactionsResult = + json['Med_GetTransactionsAndActTransactionsResult']; + medGetTransactionsList = json['Med_GetTransactionsList']; + medGetWeekActivitiesTransactionsStsList = + json['Med_GetWeekActivitiesTransactionsStsList']; + medGetWeekStepsTransactionsStsList = + json['Med_GetWeekStepsTransactionsStsList']; + medGetWeekTransactionsStsList = json['Med_GetWeekTransactionsStsList']; + medGetYearActivitiesTransactionsStsList = + json['Med_GetYearActivitiesTransactionsStsList']; + medGetYearSleepTransactionsStsList = + json['Med_GetYearSleepTransactionsStsList']; + medGetYearStepsTransactionsStsList = + json['Med_GetYearStepsTransactionsStsList']; + medGetYearTransactionsStsList = json['Med_GetYearTransactionsStsList']; + medInsertTransactionsOutputsList = + json['Med_InsertTransactionsOutputsList']; + medicalRecordImages = json['MedicalRecordImages']; + medicalReportToRead = json['MedicalReportToRead']; + medicalReportUnreadNo = json['MedicalReportUnreadNo']; + missingIDCardAttachment = json['Missing_IDCardAttachment']; + missingInsuranceCardAttachment = json['Missing_InsuranceCardAttachment']; + missingMedicalReportAttachment = json['Missing_MedicalReportAttachment']; + missingOtherRelationship = json['Missing_OtherRelationship']; + missingPatientContactNo = json['Missing_PatientContactNo']; + missingPatientId = json['Missing_PatientId']; + missingPatientIdentityNumber = json['Missing_PatientIdentityNumber']; + missingPatientName = json['Missing_PatientName']; + missingReferralContactNo = json['Missing_ReferralContactNo']; + missingReferralRelationship = json['Missing_ReferralRelationship']; + missingReferralRequesterName = json['Missing_ReferralRequesterName']; + mobileNumber = json['MobileNumber']; + nationalityNumber = json['NationalityNumber']; + onlineCheckInAppointments = json['OnlineCheckInAppointments']; + opinionUserAgreementContent = json['Opinion_UserAgreementContent']; + orderInsert = json['OrderInsert']; + pateintInfoForUpdateList = json['PateintInfoForUpdateList']; + pateintUpatedList = json['PateintUpatedList']; + patientBirthdayCertificate = json['PatientBirthdayCertificate']; + patientERCMCRequestSummaryByProject = + json['PatientER_CMCRequestSummaryByProject']; + patientERCMCRequestWithTotal = json['PatientER_CMCRequestWithTotal']; + patientERCMCGetAllServicesList = json['PatientER_CMC_GetAllServicesList']; + patientERCMCGetTransactionsForOrderList = + json['PatientER_CMC_GetTransactionsForOrderList']; + patientERCoordinates = json['PatientER_Coordinates']; + patientERCountOrderList = json['PatientER_CountOrderList']; + patientERCountsForApprovalOffice = + json['PatientER_CountsForApprovalOffice']; + patientERDeleteOldCurrentDoctorsOutputsList = + json['PatientER_DeleteOldCurrentDoctorsOutputsList']; + patientERDeliveryGetAllDeliverdOrderList = + json['PatientER_Delivery_GetAllDeliverdOrderList']; + patientERDeliveryGetAllOrderList = + json['PatientER_Delivery_GetAllOrderList']; + patientERDeliveryIsOrderInserted = + json['PatientER_Delivery_IsOrderInserted']; + patientERDeliveryIsOrderUpdated = json['PatientER_Delivery_IsOrderUpdated']; + patientERDeliveryIsPausedChanged = + json['PatientER_Delivery_IsPausedChanged']; + patientERDeliveryNextOrder = json['PatientER_Delivery_NextOrder']; + patientERDeliveryOrderInsert = json['PatientER_Delivery_OrderInsert']; + patientERDeliveryUpdateOrderStatus = + json['PatientER_Delivery_UpdateOrderStatus']; + patientERDriverUpdate = json['PatientER_DriverUpdate']; + patientERExacartCheckIsDispenseAccpetableList = + json['PatientER_Exacart_CheckIsDispenseAccpetableList']; + patientERExacartGetDispenseQuantitiesByOrderIDList = + json['PatientER_Exacart_GetDispenseQuantitiesByOrderIDList']; + patientERExacartGetOrderDetailsByePharmacyOrderNoList = + json['PatientER_Exacart_GetOrderDetailsByePharmacyOrderNoList']; + patientERExacartGetOrderDetailsList = + json['PatientER_Exacart_GetOrderDetailsList']; + patientERExacartGetTotalDispenseQuantitiesByPresNoList = + json['PatientER_Exacart_GetTotalDispenseQuantitiesByPresNoList']; + patientERExacartIsDispenseAdded = json['PatientER_Exacart_IsDispenseAdded']; + patientERExacartIsDispenseAddedList = + json['PatientER_Exacart_IsDispenseAddedList']; + patientERExacartIsOrderCompleted = + json['PatientER_Exacart_IsOrderCompleted']; + patientERGetAdminByProjectAndRoleList = + json['PatientER_GetAdminByProjectAndRoleList']; + patientERGetAdminProjectsList = json['PatientER_GetAdminProjectsList']; + patientERGetAllDriversList = json['PatientER_GetAllDriversList']; + patientERGetAllNeedAproveStatusList = + json['PatientER_GetAllNeedAproveStatusList']; + patientERGetAllPresOrdersStatusList = + json['PatientER_GetAllPresOrdersStatusList']; + patientERGetAllProjectsList = json['PatientER_GetAllProjectsList']; + patientERGetArchiveInformationList = + json['PatientER_GetArchiveInformation_List']; + patientERGetAskDoctorTotalByDateFilterList = + json['PatientER_GetAskDoctorTotalByDateFilterList']; + patientERGetBookScheduleConfigsList = + json['PatientER_GetBookScheduleConfigsList']; + patientERGetClinicAndTimeAndEpisodeForAppointmentList = + json['PatientER_GetClinicAndTimeAndEpisodeForAppointmentList']; + patientERGetClinicAndTimeForDischargeList = + json['PatientER_GetClinicAndTimeForDischargeList']; + patientERGetDashboardDataforApporvalSectionForAdminList = + json['PatientER_GetDashboardDataforApporvalSectionForAdminList']; + patientERGetDashboardDataforApporvalSectionList = + json['PatientER_GetDashboardDataforApporvalSectionList']; + patientERGetDashboardDataforHHCSectionForAdminList = + json['PatientER_GetDashboardDataforHHCSectionForAdminList']; + patientERGetDashboardDataforHHCSectionList = + json['PatientER_GetDashboardDataforHHCSectionList']; + patientERGetDashboardDataforPrescriptionSectionForAdminList = + json['PatientER_GetDashboardDataforPrescriptionSectionForAdminList']; + patientERGetDashboardDataforPrescriptionSectionList = + json['PatientER_GetDashboardDataforPrescriptionSectionList']; + patientERGetDoctorDashboardDataModelList = + json['PatientER_GetDoctorDashboardDataModelList']; + patientERGetDriverLocationList = json['PatientER_GetDriverLocationList']; + patientERGetInsuranceCardRequestByDateFilterList = + json['PatientER_GetInsuranceCardRequestByDateFilterList']; + patientERGetLiveCareSummaryBookedAppoinmentStatusList = + json['PatientER_GetLiveCareSummaryBookedAppoinmentStatusList']; + patientERGetLiveCareSummaryCovidList = + json['PatientER_GetLiveCareSummaryCovidList']; + patientERGetLiveCareSummaryForCMCList = + json['PatientER_GetLiveCareSummaryForCMCList']; + patientERGetLiveCareSummaryForHHCList = + json['PatientER_GetLiveCareSummaryForHHCList']; + patientERGetLiveCareSummaryForHomeDeliveryList = + json['PatientER_GetLiveCareSummaryForHomeDeliveryList']; + patientERGetLiveCareSummaryForInsuranceCardRequestList = + json['PatientER_GetLiveCareSummaryForInsuranceCardRequestList']; + patientERGetLiveCareSummaryForNewFilesList = + json['PatientER_GetLiveCareSummaryForNewFilesList']; + patientERGetLiveCareSummaryForOnlinePaymetRequestList = + json['PatientER_GetLiveCareSummaryForOnlinePaymetRequestList']; + patientERGetLiveCareSummaryForOnlinePharmacyOrdersList = + json['PatientER_GetLiveCareSummaryForOnlinePharmacyOrdersList']; + patientERGetLiveCareSummaryForTrasnportationList = + json['PatientER_GetLiveCareSummaryForTrasnportationList']; + patientERGetLiveCareSummaryLiveCareCountsList = + json['PatientER_GetLiveCareSummaryLiveCareCountsList']; + patientERGetMedicalRequestTotalByDateFilterList = + json['PatientER_GetMedicalRequestTotalByDateFilterList']; + patientERGetNearestPendingOrdersList = + json['PatientER_GetNearestPendingOrdersList']; + patientERGetNeedAproveHistoryForOrderList = + json['PatientER_GetNeedAproveHistoryForOrderList']; + patientERGetNeedAprovePendingOrdersList = + json['PatientER_GetNeedAprovePendingOrdersList']; + patientERGetNeedAproveStatusStatisticsList = + json['PatientER_GetNeedAproveStatusStatisticsList']; + patientERGetPatientAllPresOrdersList = + json['PatientER_GetPatientAllPresOrdersList']; + patientERGetPendingPatientsCountList = + json['PatientER_GetPendingPatientsCountList']; + patientERGetPresOrdersHistoryForAdminList = + json['PatientER_GetPresOrdersHistoryForAdminList']; + patientERGetPresOrdersHistoryForOrderList = + json['PatientER_GetPresOrdersHistoryForOrderList']; + patientERGetPresOrdersStatusStatisticsList = + json['PatientER_GetPresOrdersStatusStatisticsList']; + patientERHHCRequest = json['PatientER_HHCRequest']; + patientERHHCRequestSummaryByProject = + json['PatientER_HHCRequestSummaryByProject']; + patientERHHCRequestWithTotal = json['PatientER_HHCRequestWithTotal']; + patientERHHCGetAllServicesList = json['PatientER_HHC_GetAllServicesList']; + patientERHHCGetTransactionsForOrderList = + json['PatientER_HHC_GetTransactionsForOrderList']; + patientERHomeDeliveryCounts = json['PatientER_HomeDeliveryCounts']; + patientERInsertDriver = json['PatientER_InsertDriver']; + patientERInsertNewCurrentDoctorsOutputsList = + json['PatientER_InsertNewCurrentDoctorsOutputsList']; + patientERInsuranceStatusCountList = + json['PatientER_InsuranceStatusCountList']; + patientERIsNearestProjectUpdated = + json['PatientER_IsNearestProjectUpdated']; + patientERIsNeedAproveReturnedToQueue = + json['PatientER_IsNeedAproveReturnedToQueue']; + patientERIsNeedAproveUpdated = json['PatientER_IsNeedAproveUpdated']; + patientERIsOrderClientRequestUpdated = + json['PatientER_IsOrderClientRequestUpdated']; + patientERIsOrderReturnedToQueue = json['PatientER_IsOrderReturnedToQueue']; + patientERIsPresOrderInserted = json['PatientER_IsPresOrderInserted']; + patientERIsPresOrderUpdated = json['PatientER_IsPresOrderUpdated']; + patientERIsProjectUpdated = json['PatientER_IsProjectUpdated']; + patientERNotCompletedDetails = json['PatientER_NotCompletedDetails']; + patientERPatientsCountByCallStatus = + json['PatientER_PatientsCountByCallStatus']; + patientERPeakHourCounts = json['PatientER_PeakHourCounts']; + patientERPresOrderInfo = json['PatientER_PresOrderInfo']; + patientERPrescriptionCounts = json['PatientER_PrescriptionCounts']; + patientERProjectsContribution = json['PatientER_ProjectsContribution']; + patientERRRTGetAllQuestionsList = json['PatientER_RRT_GetAllQuestionsList']; + patientERRRTGetAllTransportationMethodList = + json['PatientER_RRT_GetAllTransportationMethodList']; + patientERRRTGetPickUpRequestByPresOrderIDList = + json['PatientER_RRT_GetPickUpRequestByPresOrderIDList']; + patientERRealRRTGetAllServicesList = + json['PatientER_RealRRT_GetAllServicesList']; + patientERRealRRTGetOrderDetailsList = + json['PatientER_RealRRT_GetOrderDetailsList']; + patientERRealRRTGetTransactionsForOrderList = + json['PatientER_RealRRT_GetTransactionsForOrderList']; + patientERRealRRTIsTransInserted = json['PatientER_RealRRT_IsTransInserted']; + patientERRequestList = json['PatientER_RequestList']; + patientERTransportationRequestWithTotal = + json['PatientER_TransportationRequestWithTotal']; + patientERealRRTGetServicePriceList = + json['PatientE_RealRRT_GetServicePriceList']; + patientInfoByAdmissionNoList = json['PatientInfoByAdmissionNo_List']; + patientMonitorGetPatientHeartRate = + json['PatientMonitor_GetPatientHeartRate']; + patientNotServedCounts = json['PatientNotServedCounts']; + patientPrescriptionList = json['PatientPrescriptionList']; + patientAllergies = json['Patient_Allergies']; + patientCheckAppointmentValidationList = + json['Patient_CheckAppointmentValidationList']; + patientLoginTokenList = json['Patient_LoginTokenList']; + patientQRLoginInfoList = json['Patient_QRLoginInfoList']; + patientSELECTDeviceIMEIbyIMEIList = + json['Patient_SELECTDeviceIMEIbyIMEIList']; + pharmList = json['PharmList']; + prefLang = json['PrefLang']; + radReportUnreadNo = json['RadReportUnreadNo']; + radGetPatientRadOrdersForDentalList = + json['Rad_GetPatientRadOrdersForDental_List']; + referralNumber = json['ReferralNumber']; + reminderConfigurations = json['ReminderConfigurations']; + requestNo = json['RequestNo']; + rowCount = json['RowCount']; + servicePrivilegeList = json['ServicePrivilegeList']; + shareFamilyFileObj = json['ShareFamilyFileObj']; + status = json['Status']; + successCode = json['SuccessCode']; + surveyRate = json['SurveyRate']; + symptomCheckerConditionList = json['SymptomChecker_ConditionList']; + symptomCheckerGetAllDefaultQuestionsList = + json['SymptomChecker_GetAllDefaultQuestionsList']; + symptomCheckerGetBodyPartSymptomsList = + json['SymptomChecker_GetBodyPartSymptomsList']; + symptomCheckerGetBodyPartsByCodeList = + json['SymptomChecker_GetBodyPartsByCodeList']; + symptomCheckerGetBodyPartsList = json['SymptomChecker_GetBodyPartsList']; + symptomCheckerJsonResponseInString = + json['SymptomChecker_JsonResponseInString']; + timerTime = json['TimerTime']; + totalAdvanceBalanceAmount = json['TotalAdvanceBalanceAmount']; + totalPatientsCount = json['TotalPatientsCount']; + totalPendingApprovalCount = json['TotalPendingApprovalCount']; + totalUnUsedCount = json['TotalUnUsedCount']; + transactionNo = json['TransactionNo']; + unReadCounts = json['UnReadCounts']; + updateStatus = json['UpdateStatus']; + userAgreementContent = json['UserAgreementContent']; + yahalaAccountNo = json['YahalaAccountNo']; + check24HourComplaint = json['check24HourComplaint']; + currency = json['currency']; + message = json['message']; + patientID = json['patientID']; + returnValue = json['returnValue']; + returnValueStr = json['returnValueStr']; + statusCode = json['statusCode']; + } + + Map toJson() { + final Map data = new Map(); + data['Date'] = this.date; + data['LanguageID'] = this.languageID; + data['ServiceName'] = this.serviceName; + data['Time'] = this.time; + data['AndroidLink'] = this.androidLink; + data['AuthenticationTokenID'] = this.authenticationTokenID; + data['Data'] = this.data; + data['Dataw'] = this.dataw; + data['DietType'] = this.dietType; + data['ErrorCode'] = this.errorCode; + data['ErrorEndUserMessage'] = this.errorEndUserMessage; + data['ErrorEndUserMessageN'] = this.errorEndUserMessageN; + data['ErrorMessage'] = this.errorMessage; + data['ErrorType'] = this.errorType; + data['FoodCategory'] = this.foodCategory; + data['IOSLink'] = this.iOSLink; + data['IsAuthenticated'] = this.isAuthenticated; + data['MealOrderStatus'] = this.mealOrderStatus; + data['MealType'] = this.mealType; + data['MessageStatus'] = this.messageStatus; + data['NumberOfResultRecords'] = this.numberOfResultRecords; + data['PatientBlodType'] = this.patientBlodType; + data['SuccessMsg'] = this.successMsg; + data['SuccessMsgN'] = this.successMsgN; + data['AccountStatus'] = this.accountStatus; + data['ActiveArchiveObject'] = this.activeArchiveObject; + data['ActiveMedicationCount'] = this.activeMedicationCount; + data['AllMedicationTakenDuringAdmission_List'] = + this.allMedicationTakenDuringAdmissionList; + data['AppointmentNo'] = this.appointmentNo; + data['ArePatientsOnlineList'] = this.arePatientsOnlineList; + data['BalanceAmount'] = this.balanceAmount; + data['BloodGroupList'] = this.bloodGroupList; + data['CVI_UnreadCount'] = this.cVIUnreadCount; + data['CheckUserHasAccount'] = this.checkUserHasAccount; + data['ComplaintNo'] = this.complaintNo; + data['DischargeList'] = this.dischargeList; + data['EpisodeID'] = this.episodeID; + data['FinalRadiologyList'] = this.finalRadiologyList; + data['FullName'] = this.fullName; + data['GeoF_PointsList'] = this.geoFPointsList; + data['GeoGetPateintInfo'] = this.geoGetPateintInfo; + data['GetAllDoctorsByProjectAndClinicList'] = + this.getAllDoctorsByProjectAndClinicList; + data['GetAppointmentNumbersForDoctorList'] = + this.getAppointmentNumbersForDoctorList; + data['GetCheckUpItemsList'] = this.getCheckUpItemsList; + data['GetCosmeticConferenceForTodayList'] = + this.getCosmeticConferenceForTodayList; + data['GetDoctorERClinicResult'] = this.getDoctorERClinicResult; + data['GetInvoiceApprovalList'] = this.getInvoiceApprovalList; + data['GetNearestProjectList'] = this.getNearestProjectList; + data['GetPatientAdmissionOrAppoinmentNo_List'] = + this.getPatientAdmissionOrAppoinmentNoList; + data['GetPatientBloodType'] = this.getPatientBloodType; + data['GetPatientInsuranceCardStatusStatisticsList'] = + this.getPatientInsuranceCardStatusStatisticsList; + data['GetSurveyList'] = this.getSurveyList; + data['GetTotalRegisteredPatientList'] = this.getTotalRegisteredPatientList; + data['GetUserDetailsList'] = this.getUserDetailsList; + data['Get_CustomerPointInfo'] = this.getCustomerPointInfo; + data['HIS_Approval_List'] = this.hISApprovalList; + data['HIS_InpAdmission_List'] = this.hISInpAdmissionList; + data['HIS_ProgNoteAssesmentModel_List'] = + this.hISProgNoteAssesmentModelList; + data['HMG_GetAllOffersList'] = this.hMGGetAllOffersList; + data['Has_Approval'] = this.hasApproval; + data['Has_Consultation'] = this.hasConsultation; + data['Has_Dental'] = this.hasDental; + data['Has_Lab'] = this.hasLab; + data['Has_Pharmacy'] = this.hasPharmacy; + data['Has_Rad'] = this.hasRad; + data['Hmg_SMS_Get_By_ProjectID_And_PatientIDList'] = + this.hmgSMSGetByProjectIDAndPatientIDList; + data['HoursLeft'] = this.hoursLeft; + data['INPM_GetAllAdmission_List'] = this.iNPMGetAllAdmissionList; + data['INPM_GetPatientInfoForSickLeaveReport_List'] = + this.iNPMGetPatientInfoForSickLeaveReportList; + data['INPM_HIS_PatientMedicalStatus_UnreadCount'] = + this.iNPMHISPatientMedicalStatusUnreadCount; + data['INPM_LAB_GetPatientLabOrdersResults_List'] = + this.iNPMLABGetPatientLabOrdersResultsList; + data['INPM_LAB_GetPatientLabResults_List'] = + this.iNPMLABGetPatientLabResultsList; + data['INPM_LAB_GetPatientRADReport_List'] = + this.iNPMLABGetPatientRADReportList; + data['INPM_LAB_GetPatientRadResults_List'] = + this.iNPMLABGetPatientRadResultsList; + data['INPM_Rad_GetPatientRadOrders_CVI_List'] = + this.iNPMRadGetPatientRadOrdersCVIList; + data['INPM_Rad_GetPatientRadOrders_List'] = + this.iNPMRadGetPatientRadOrdersList; + data['INPM_Rad_GetRadMedicalRecords_List'] = + this.iNPMRadGetRadMedicalRecordsList; + data['INP_GetPrescriptionDischarges_List'] = + this.iNPGetPrescriptionDischargesList; + data['INP_GetPrescriptionReport_List'] = this.iNPGetPrescriptionReportList; + data['IdentificationNo'] = this.identificationNo; + data['IsHomeMedicineDeliverySupported'] = + this.isHomeMedicineDeliverySupported; + data['IsInsertedOrUpdated'] = this.isInsertedOrUpdated; + data['IsMainAcoountEqualPatienID'] = this.isMainAcoountEqualPatienID; + data['IsPatientAlreadyAgreed'] = this.isPatientAlreadyAgreed; + data['IsPatientCallBackBlackList'] = this.isPatientCallBackBlackList; + data['IsPatientHaveFingerPrint'] = this.isPatientHaveFingerPrint; + data['IsPatientOnline'] = this.isPatientOnline; + data['IsPatientTokenRemoved'] = this.isPatientTokenRemoved; + data['IsPaused'] = this.isPaused; + data['IsProjectWorkingHours'] = this.isProjectWorkingHours; + data['IsStoreRateAllowed'] = this.isStoreRateAllowed; + data['IsStoreRateInserted'] = this.isStoreRateInserted; + data['IsStoreRateUpdated'] = this.isStoreRateUpdated; + data['LabRadUpdatedToRead'] = this.labRadUpdatedToRead; + data['LabReportUnreadNo'] = this.labReportUnreadNo; + data['LakumInquiryInformationObj'] = this.lakumInquiryInformationObj; + if (this.lakumInquiryInformationObjVersion != null) { + data['LakumInquiryInformationObjVersion'] = + this.lakumInquiryInformationObjVersion!.toJson(); + } + data['LakumResponseList'] = this.lakumResponseList; + data['Laser_GetBodyPartsByCategoryList'] = + this.laserGetBodyPartsByCategoryList; + data['Laser_GetCategoriesList'] = this.laserGetCategoriesList; + data['List'] = this.list; + data['ListCount'] = this.listCount; + data['ListCountDeliverd'] = this.listCountDeliverd; + data['ListCountUnDeliverd'] = this.listCountUnDeliverd; + data['ListDeviceInfo'] = this.listDeviceInfo; + data['ListFamilyAppointments'] = this.listFamilyAppointments; + data['ListLabResultsByAppNo'] = this.listLabResultsByAppNo; + data['ListLakumInquiryInformationObj'] = + this.listLakumInquiryInformationObj; + data['ListOpinion_GetAllPeriod'] = this.listOpinionGetAllPeriod; + data['ListOpinion_GetAllServices'] = this.listOpinionGetAllServices; + data['ListOpinion_GetIsAgreeValue'] = this.listOpinionGetIsAgreeValue; + data['ListOpinion_GetOpinionLogin'] = this.listOpinionGetOpinionLogin; + data['ListOpinion_GetRequestedSerives'] = + this.listOpinionGetRequestedSerives; + data['ListOpinion_GetShareServicesDetails'] = + this.listOpinionGetShareServicesDetails; + data['ListOpinion_UserTerms'] = this.listOpinionUserTerms; + data['ListPLO'] = this.listPLO; + data['ListPLR'] = this.listPLR; + data['ListPLSR'] = this.listPLSR; + data['ListPRM'] = this.listPRM; + data['ListPatientFamilyFiles'] = this.listPatientFamilyFiles; + data['ListPatientFileInfo'] = this.listPatientFileInfo; + data['ListRAD'] = this.listRAD; + data['ListRADAPI'] = this.listRADAPI; + data['List_ActiveGetPrescriptionReportByPatientID'] = + this.listActiveGetPrescriptionReportByPatientID; + data['List_AppointmentsForDentalClinic'] = + this.listAppointmentsForDentalClinic; + data['List_BabyInfoResult'] = this.listBabyInfoResult; + data['List_CheckInsuranceCoverage'] = this.listCheckInsuranceCoverage; + data['List_CompanyClass'] = this.listCompanyClass; + data['List_ConsentMedicalReport'] = this.listConsentMedicalReport; + data['List_DentalAppointments'] = this.listDentalAppointments; + data['List_DeviceTokenIDByAppointmentNo'] = + this.listDeviceTokenIDByAppointmentNo; + data['List_DischargeDiagnosis'] = this.listDischargeDiagnosis; + data['List_DischargeMedicine'] = this.listDischargeMedicine; + data['List_DischargeSummary'] = this.listDischargeSummary; + data['List_DoctorResponse'] = this.listDoctorResponse; + data['List_DoneVaccines'] = this.listDoneVaccines; + data['List_EReferralResult'] = this.listEReferralResult; + data['List_EReferrals'] = this.listEReferrals; + data['List_GetAllPatients_LiveCare_Admin'] = + this.listGetAllPatientsLiveCareAdmin; + data['List_GetDataForExcel'] = this.listGetDataForExcel; + data['List_GetMainCountID'] = this.listGetMainCountID; + data['List_GetPrescriptionReportByPatientID'] = + this.listGetPrescriptionReportByPatientID; + data['List_GetSickLeave'] = this.listGetSickLeave; + data['List_HISInvoice'] = this.listHISInvoice; + data['List_HISInvoiceProcedures'] = this.listHISInvoiceProcedures; + data['List_InpatientInvoices'] = this.listInpatientInvoices; + data['List_InsuranceCheckList'] = this.listInsuranceCheckList; + data['List_InsuranceCompanies'] = this.listInsuranceCompanies; + data['List_InsuranceCompaniesGroup'] = this.listInsuranceCompaniesGroup; + data['List_InsuranceUpdateDetails'] = this.listInsuranceUpdateDetails; + data['List_InvoiceApprovalProcedureInfo'] = + this.listInvoiceApprovalProcedureInfo; + data['List_IsLastSatisfactionSurveyReviewedModel'] = + this.listIsLastSatisfactionSurveyReviewedModel; + data['List_LabOrderDetailsModel'] = this.listLabOrderDetailsModel; + data['List_MedicalReport'] = this.listMedicalReport; + data['List_MedicalReportApprovals'] = this.listMedicalReportApprovals; + data['List_MedicalReportStatus'] = this.listMedicalReportStatus; + data['List_MonthBloodPressureResult'] = this.listMonthBloodPressureResult; + data['List_MonthBloodPressureResultAverage'] = + this.listMonthBloodPressureResultAverage; + data['List_MonthDiabtecPatientResult'] = this.listMonthDiabtecPatientResult; + data['List_MonthDiabtectResultAverage'] = + this.listMonthDiabtectResultAverage; + data['List_MonthWeightMeasurementResult'] = + this.listMonthWeightMeasurementResult; + data['List_MonthWeightMeasurementResultAverage'] = + this.listMonthWeightMeasurementResultAverage; + data['List_OnlinePrescriptionResult'] = this.listOnlinePrescriptionResult; + data['List_OutPatientInvoices'] = this.listOutPatientInvoices; + data['List_PHRInvoice'] = this.listPHRInvoice; + data['List_PHRInvoiceItems'] = this.listPHRInvoiceItems; + data['List_PHRPaymentMethods'] = this.listPHRPaymentMethods; + data['List_PateintDetails'] = this.listPateintDetails; + data['List_PateintInformation'] = this.listPateintInformation; + data['List_PatientAdmissionInfo'] = this.listPatientAdmissionInfo; + data['List_PatientAdvanceBalanceAmount'] = + this.listPatientAdvanceBalanceAmount; + data['List_PatientCallBackLogs'] = this.listPatientCallBackLogs; + data['List_PatientCallBackToUpdateFromICServer'] = + this.listPatientCallBackToUpdateFromICServer; + data['List_PatientCount'] = this.listPatientCount; + data['List_PatientDashboard'] = this.listPatientDashboard; + data['List_PatientER_GetAdminClinicsModel'] = + this.listPatientERGetAdminClinicsModel; + data['List_PatientER_GetAdminProjectsModel'] = + this.listPatientERGetAdminProjectsModel; + data['List_PatientER_GetAllClinicsModel'] = + this.listPatientERGetAllClinicsModel; + data['List_PatientHISInvoices'] = this.listPatientHISInvoices; + data['List_PatientICProjects'] = this.listPatientICProjects; + data['List_PatientICProjectsByID'] = this.listPatientICProjectsByID; + data['List_PatientICProjectsTimings'] = this.listPatientICProjectsTimings; + data['List_PatientIDByUID'] = this.listPatientIDByUID; + data['List_PatientIDForSurveyResult'] = this.listPatientIDForSurveyResult; + data['List_PatientInfo'] = this.listPatientInfo; + data['List_PatientInfoForDDScreen'] = this.listPatientInfoForDDScreen; + data['List_PatientInfoForSickleaveReport'] = + this.listPatientInfoForSickleaveReport; + data['List_PatientInsuranceCard'] = this.listPatientInsuranceCard; + data['List_PatientInsuranceCardHistory'] = + this.listPatientInsuranceCardHistory; + data['List_PatientInsuranceDetails'] = this.listPatientInsuranceDetails; + data['List_PatientPHRInvoices'] = this.listPatientPHRInvoices; + data['List_PatientServicePoint'] = this.listPatientServicePoint; + data['List_PatientStatusCount'] = this.listPatientStatusCount; + data['List_Patient_ChatRequestMapModel'] = + this.listPatientChatRequestMapModel; + data['List_Patient_ChatRequestModel'] = this.listPatientChatRequestModel; + data['List_Patient_ChatRequestVCModel'] = + this.listPatientChatRequestVCModel; + data['List_PaymentMethods'] = this.listPaymentMethods; + data['List_PointServices'] = this.listPointServices; + data['List_PregnancyStagesInfo'] = this.listPregnancyStagesInfo; + data['List_ProjectAvgERWaitingTime'] = this.listProjectAvgERWaitingTime; + data['List_ProjectAvgERWaitingTimeHourly'] = + this.listProjectAvgERWaitingTimeHourly; + data['List_RadMedicalRecords'] = this.listRadMedicalRecords; + data['List_RadMedicalRecordsAPI'] = this.listRadMedicalRecordsAPI; + data['List_RadMedicalRecordsCVI'] = this.listRadMedicalRecordsCVI; + data['List_RadMedicalRecordsCVIAPI'] = this.listRadMedicalRecordsCVIAPI; + data['List_RadMedicalRecordsResults'] = this.listRadMedicalRecordsResults; + data['List_SickLeave'] = this.listSickLeave; + data['List_Transaction'] = this.listTransaction; + data['List_VideoConferenceSessions'] = this.listVideoConferenceSessions; + data['List_WeekBloodPressureResult'] = this.listWeekBloodPressureResult; + data['List_WeekBloodPressureResultAverage'] = + this.listWeekBloodPressureResultAverage; + data['List_WeekDiabtecPatientResult'] = this.listWeekDiabtecPatientResult; + data['List_WeekDiabtectResultAverage'] = this.listWeekDiabtectResultAverage; + data['List_WeekWeightMeasurementResult'] = + this.listWeekWeightMeasurementResult; + data['List_WeekWeightMeasurementResultAverage'] = + this.listWeekWeightMeasurementResultAverage; + data['List_YearBloodPressureResult'] = this.listYearBloodPressureResult; + data['List_YearBloodPressureResultAverage'] = + this.listYearBloodPressureResultAverage; + data['List_YearDiabtecPatientResult'] = this.listYearDiabtecPatientResult; + data['List_YearDiabtecResultAverage'] = this.listYearDiabtecResultAverage; + data['List_YearWeightMeasurementResult'] = + this.listYearWeightMeasurementResult; + data['List_YearWeightMeasurementResultAverage'] = + this.listYearWeightMeasurementResultAverage; + data['List_eInvoiceForDental'] = this.listEInvoiceForDental; + data['List_eInvoiceForOnlineCheckIn'] = this.listEInvoiceForOnlineCheckIn; + data['Med_GetActivitiesTransactionsStsList'] = + this.medGetActivitiesTransactionsStsList; + data['Med_GetAvgMonthTransactionsStsList'] = + this.medGetAvgMonthTransactionsStsList; + data['Med_GetAvgWeekTransactionsStsList'] = + this.medGetAvgWeekTransactionsStsList; + data['Med_GetCategoriesList'] = this.medGetCategoriesList; + data['Med_GetMonthActivitiesTransactionsStsList'] = + this.medGetMonthActivitiesTransactionsStsList; + data['Med_GetMonthStepsTransactionsStsList'] = + this.medGetMonthStepsTransactionsStsList; + data['Med_GetMonthTransactionsStsList'] = + this.medGetMonthTransactionsStsList; + data['Med_GetPatientLastRecordList'] = this.medGetPatientLastRecordList; + data['Med_GetSubCategoriesList'] = this.medGetSubCategoriesList; + data['Med_GetTransactionsAndActTransactionsResult'] = + this.medGetTransactionsAndActTransactionsResult; + data['Med_GetTransactionsList'] = this.medGetTransactionsList; + data['Med_GetWeekActivitiesTransactionsStsList'] = + this.medGetWeekActivitiesTransactionsStsList; + data['Med_GetWeekStepsTransactionsStsList'] = + this.medGetWeekStepsTransactionsStsList; + data['Med_GetWeekTransactionsStsList'] = this.medGetWeekTransactionsStsList; + data['Med_GetYearActivitiesTransactionsStsList'] = + this.medGetYearActivitiesTransactionsStsList; + data['Med_GetYearSleepTransactionsStsList'] = + this.medGetYearSleepTransactionsStsList; + data['Med_GetYearStepsTransactionsStsList'] = + this.medGetYearStepsTransactionsStsList; + data['Med_GetYearTransactionsStsList'] = this.medGetYearTransactionsStsList; + data['Med_InsertTransactionsOutputsList'] = + this.medInsertTransactionsOutputsList; + data['MedicalRecordImages'] = this.medicalRecordImages; + data['MedicalReportToRead'] = this.medicalReportToRead; + data['MedicalReportUnreadNo'] = this.medicalReportUnreadNo; + data['Missing_IDCardAttachment'] = this.missingIDCardAttachment; + data['Missing_InsuranceCardAttachment'] = + this.missingInsuranceCardAttachment; + data['Missing_MedicalReportAttachment'] = + this.missingMedicalReportAttachment; + data['Missing_OtherRelationship'] = this.missingOtherRelationship; + data['Missing_PatientContactNo'] = this.missingPatientContactNo; + data['Missing_PatientId'] = this.missingPatientId; + data['Missing_PatientIdentityNumber'] = this.missingPatientIdentityNumber; + data['Missing_PatientName'] = this.missingPatientName; + data['Missing_ReferralContactNo'] = this.missingReferralContactNo; + data['Missing_ReferralRelationship'] = this.missingReferralRelationship; + data['Missing_ReferralRequesterName'] = this.missingReferralRequesterName; + data['MobileNumber'] = this.mobileNumber; + data['NationalityNumber'] = this.nationalityNumber; + data['OnlineCheckInAppointments'] = this.onlineCheckInAppointments; + data['Opinion_UserAgreementContent'] = this.opinionUserAgreementContent; + data['OrderInsert'] = this.orderInsert; + data['PateintInfoForUpdateList'] = this.pateintInfoForUpdateList; + data['PateintUpatedList'] = this.pateintUpatedList; + data['PatientBirthdayCertificate'] = this.patientBirthdayCertificate; + data['PatientER_CMCRequestSummaryByProject'] = + this.patientERCMCRequestSummaryByProject; + data['PatientER_CMCRequestWithTotal'] = this.patientERCMCRequestWithTotal; + data['PatientER_CMC_GetAllServicesList'] = + this.patientERCMCGetAllServicesList; + data['PatientER_CMC_GetTransactionsForOrderList'] = + this.patientERCMCGetTransactionsForOrderList; + data['PatientER_Coordinates'] = this.patientERCoordinates; + data['PatientER_CountOrderList'] = this.patientERCountOrderList; + data['PatientER_CountsForApprovalOffice'] = + this.patientERCountsForApprovalOffice; + data['PatientER_DeleteOldCurrentDoctorsOutputsList'] = + this.patientERDeleteOldCurrentDoctorsOutputsList; + data['PatientER_Delivery_GetAllDeliverdOrderList'] = + this.patientERDeliveryGetAllDeliverdOrderList; + data['PatientER_Delivery_GetAllOrderList'] = + this.patientERDeliveryGetAllOrderList; + data['PatientER_Delivery_IsOrderInserted'] = + this.patientERDeliveryIsOrderInserted; + data['PatientER_Delivery_IsOrderUpdated'] = + this.patientERDeliveryIsOrderUpdated; + data['PatientER_Delivery_IsPausedChanged'] = + this.patientERDeliveryIsPausedChanged; + data['PatientER_Delivery_NextOrder'] = this.patientERDeliveryNextOrder; + data['PatientER_Delivery_OrderInsert'] = this.patientERDeliveryOrderInsert; + data['PatientER_Delivery_UpdateOrderStatus'] = + this.patientERDeliveryUpdateOrderStatus; + data['PatientER_DriverUpdate'] = this.patientERDriverUpdate; + data['PatientER_Exacart_CheckIsDispenseAccpetableList'] = + this.patientERExacartCheckIsDispenseAccpetableList; + data['PatientER_Exacart_GetDispenseQuantitiesByOrderIDList'] = + this.patientERExacartGetDispenseQuantitiesByOrderIDList; + data['PatientER_Exacart_GetOrderDetailsByePharmacyOrderNoList'] = + this.patientERExacartGetOrderDetailsByePharmacyOrderNoList; + data['PatientER_Exacart_GetOrderDetailsList'] = + this.patientERExacartGetOrderDetailsList; + data['PatientER_Exacart_GetTotalDispenseQuantitiesByPresNoList'] = + this.patientERExacartGetTotalDispenseQuantitiesByPresNoList; + data['PatientER_Exacart_IsDispenseAdded'] = + this.patientERExacartIsDispenseAdded; + data['PatientER_Exacart_IsDispenseAddedList'] = + this.patientERExacartIsDispenseAddedList; + data['PatientER_Exacart_IsOrderCompleted'] = + this.patientERExacartIsOrderCompleted; + data['PatientER_GetAdminByProjectAndRoleList'] = + this.patientERGetAdminByProjectAndRoleList; + data['PatientER_GetAdminProjectsList'] = this.patientERGetAdminProjectsList; + data['PatientER_GetAllDriversList'] = this.patientERGetAllDriversList; + data['PatientER_GetAllNeedAproveStatusList'] = + this.patientERGetAllNeedAproveStatusList; + data['PatientER_GetAllPresOrdersStatusList'] = + this.patientERGetAllPresOrdersStatusList; + data['PatientER_GetAllProjectsList'] = this.patientERGetAllProjectsList; + data['PatientER_GetArchiveInformation_List'] = + this.patientERGetArchiveInformationList; + data['PatientER_GetAskDoctorTotalByDateFilterList'] = + this.patientERGetAskDoctorTotalByDateFilterList; + data['PatientER_GetBookScheduleConfigsList'] = + this.patientERGetBookScheduleConfigsList; + data['PatientER_GetClinicAndTimeAndEpisodeForAppointmentList'] = + this.patientERGetClinicAndTimeAndEpisodeForAppointmentList; + data['PatientER_GetClinicAndTimeForDischargeList'] = + this.patientERGetClinicAndTimeForDischargeList; + data['PatientER_GetDashboardDataforApporvalSectionForAdminList'] = + this.patientERGetDashboardDataforApporvalSectionForAdminList; + data['PatientER_GetDashboardDataforApporvalSectionList'] = + this.patientERGetDashboardDataforApporvalSectionList; + data['PatientER_GetDashboardDataforHHCSectionForAdminList'] = + this.patientERGetDashboardDataforHHCSectionForAdminList; + data['PatientER_GetDashboardDataforHHCSectionList'] = + this.patientERGetDashboardDataforHHCSectionList; + data['PatientER_GetDashboardDataforPrescriptionSectionForAdminList'] = + this.patientERGetDashboardDataforPrescriptionSectionForAdminList; + data['PatientER_GetDashboardDataforPrescriptionSectionList'] = + this.patientERGetDashboardDataforPrescriptionSectionList; + data['PatientER_GetDoctorDashboardDataModelList'] = + this.patientERGetDoctorDashboardDataModelList; + data['PatientER_GetDriverLocationList'] = + this.patientERGetDriverLocationList; + data['PatientER_GetInsuranceCardRequestByDateFilterList'] = + this.patientERGetInsuranceCardRequestByDateFilterList; + data['PatientER_GetLiveCareSummaryBookedAppoinmentStatusList'] = + this.patientERGetLiveCareSummaryBookedAppoinmentStatusList; + data['PatientER_GetLiveCareSummaryCovidList'] = + this.patientERGetLiveCareSummaryCovidList; + data['PatientER_GetLiveCareSummaryForCMCList'] = + this.patientERGetLiveCareSummaryForCMCList; + data['PatientER_GetLiveCareSummaryForHHCList'] = + this.patientERGetLiveCareSummaryForHHCList; + data['PatientER_GetLiveCareSummaryForHomeDeliveryList'] = + this.patientERGetLiveCareSummaryForHomeDeliveryList; + data['PatientER_GetLiveCareSummaryForInsuranceCardRequestList'] = + this.patientERGetLiveCareSummaryForInsuranceCardRequestList; + data['PatientER_GetLiveCareSummaryForNewFilesList'] = + this.patientERGetLiveCareSummaryForNewFilesList; + data['PatientER_GetLiveCareSummaryForOnlinePaymetRequestList'] = + this.patientERGetLiveCareSummaryForOnlinePaymetRequestList; + data['PatientER_GetLiveCareSummaryForOnlinePharmacyOrdersList'] = + this.patientERGetLiveCareSummaryForOnlinePharmacyOrdersList; + data['PatientER_GetLiveCareSummaryForTrasnportationList'] = + this.patientERGetLiveCareSummaryForTrasnportationList; + data['PatientER_GetLiveCareSummaryLiveCareCountsList'] = + this.patientERGetLiveCareSummaryLiveCareCountsList; + data['PatientER_GetMedicalRequestTotalByDateFilterList'] = + this.patientERGetMedicalRequestTotalByDateFilterList; + data['PatientER_GetNearestPendingOrdersList'] = + this.patientERGetNearestPendingOrdersList; + data['PatientER_GetNeedAproveHistoryForOrderList'] = + this.patientERGetNeedAproveHistoryForOrderList; + data['PatientER_GetNeedAprovePendingOrdersList'] = + this.patientERGetNeedAprovePendingOrdersList; + data['PatientER_GetNeedAproveStatusStatisticsList'] = + this.patientERGetNeedAproveStatusStatisticsList; + data['PatientER_GetPatientAllPresOrdersList'] = + this.patientERGetPatientAllPresOrdersList; + data['PatientER_GetPendingPatientsCountList'] = + this.patientERGetPendingPatientsCountList; + data['PatientER_GetPresOrdersHistoryForAdminList'] = + this.patientERGetPresOrdersHistoryForAdminList; + data['PatientER_GetPresOrdersHistoryForOrderList'] = + this.patientERGetPresOrdersHistoryForOrderList; + data['PatientER_GetPresOrdersStatusStatisticsList'] = + this.patientERGetPresOrdersStatusStatisticsList; + data['PatientER_HHCRequest'] = this.patientERHHCRequest; + data['PatientER_HHCRequestSummaryByProject'] = + this.patientERHHCRequestSummaryByProject; + data['PatientER_HHCRequestWithTotal'] = this.patientERHHCRequestWithTotal; + data['PatientER_HHC_GetAllServicesList'] = + this.patientERHHCGetAllServicesList; + data['PatientER_HHC_GetTransactionsForOrderList'] = + this.patientERHHCGetTransactionsForOrderList; + data['PatientER_HomeDeliveryCounts'] = this.patientERHomeDeliveryCounts; + data['PatientER_InsertDriver'] = this.patientERInsertDriver; + data['PatientER_InsertNewCurrentDoctorsOutputsList'] = + this.patientERInsertNewCurrentDoctorsOutputsList; + data['PatientER_InsuranceStatusCountList'] = + this.patientERInsuranceStatusCountList; + data['PatientER_IsNearestProjectUpdated'] = + this.patientERIsNearestProjectUpdated; + data['PatientER_IsNeedAproveReturnedToQueue'] = + this.patientERIsNeedAproveReturnedToQueue; + data['PatientER_IsNeedAproveUpdated'] = this.patientERIsNeedAproveUpdated; + data['PatientER_IsOrderClientRequestUpdated'] = + this.patientERIsOrderClientRequestUpdated; + data['PatientER_IsOrderReturnedToQueue'] = + this.patientERIsOrderReturnedToQueue; + data['PatientER_IsPresOrderInserted'] = this.patientERIsPresOrderInserted; + data['PatientER_IsPresOrderUpdated'] = this.patientERIsPresOrderUpdated; + data['PatientER_IsProjectUpdated'] = this.patientERIsProjectUpdated; + data['PatientER_NotCompletedDetails'] = this.patientERNotCompletedDetails; + data['PatientER_PatientsCountByCallStatus'] = + this.patientERPatientsCountByCallStatus; + data['PatientER_PeakHourCounts'] = this.patientERPeakHourCounts; + data['PatientER_PresOrderInfo'] = this.patientERPresOrderInfo; + data['PatientER_PrescriptionCounts'] = this.patientERPrescriptionCounts; + data['PatientER_ProjectsContribution'] = this.patientERProjectsContribution; + data['PatientER_RRT_GetAllQuestionsList'] = + this.patientERRRTGetAllQuestionsList; + data['PatientER_RRT_GetAllTransportationMethodList'] = + this.patientERRRTGetAllTransportationMethodList; + data['PatientER_RRT_GetPickUpRequestByPresOrderIDList'] = + this.patientERRRTGetPickUpRequestByPresOrderIDList; + data['PatientER_RealRRT_GetAllServicesList'] = + this.patientERRealRRTGetAllServicesList; + data['PatientER_RealRRT_GetOrderDetailsList'] = + this.patientERRealRRTGetOrderDetailsList; + data['PatientER_RealRRT_GetTransactionsForOrderList'] = + this.patientERRealRRTGetTransactionsForOrderList; + data['PatientER_RealRRT_IsTransInserted'] = + this.patientERRealRRTIsTransInserted; + data['PatientER_RequestList'] = this.patientERRequestList; + data['PatientER_TransportationRequestWithTotal'] = + this.patientERTransportationRequestWithTotal; + data['PatientE_RealRRT_GetServicePriceList'] = + this.patientERealRRTGetServicePriceList; + data['PatientInfoByAdmissionNo_List'] = this.patientInfoByAdmissionNoList; + data['PatientMonitor_GetPatientHeartRate'] = + this.patientMonitorGetPatientHeartRate; + data['PatientNotServedCounts'] = this.patientNotServedCounts; + data['PatientPrescriptionList'] = this.patientPrescriptionList; + data['Patient_Allergies'] = this.patientAllergies; + data['Patient_CheckAppointmentValidationList'] = + this.patientCheckAppointmentValidationList; + data['Patient_LoginTokenList'] = this.patientLoginTokenList; + data['Patient_QRLoginInfoList'] = this.patientQRLoginInfoList; + data['Patient_SELECTDeviceIMEIbyIMEIList'] = + this.patientSELECTDeviceIMEIbyIMEIList; + data['PharmList'] = this.pharmList; + data['PrefLang'] = this.prefLang; + data['RadReportUnreadNo'] = this.radReportUnreadNo; + data['Rad_GetPatientRadOrdersForDental_List'] = + this.radGetPatientRadOrdersForDentalList; + data['ReferralNumber'] = this.referralNumber; + data['ReminderConfigurations'] = this.reminderConfigurations; + data['RequestNo'] = this.requestNo; + data['RowCount'] = this.rowCount; + data['ServicePrivilegeList'] = this.servicePrivilegeList; + data['ShareFamilyFileObj'] = this.shareFamilyFileObj; + data['Status'] = this.status; + data['SuccessCode'] = this.successCode; + data['SurveyRate'] = this.surveyRate; + data['SymptomChecker_ConditionList'] = this.symptomCheckerConditionList; + data['SymptomChecker_GetAllDefaultQuestionsList'] = + this.symptomCheckerGetAllDefaultQuestionsList; + data['SymptomChecker_GetBodyPartSymptomsList'] = + this.symptomCheckerGetBodyPartSymptomsList; + data['SymptomChecker_GetBodyPartsByCodeList'] = + this.symptomCheckerGetBodyPartsByCodeList; + data['SymptomChecker_GetBodyPartsList'] = + this.symptomCheckerGetBodyPartsList; + data['SymptomChecker_JsonResponseInString'] = + this.symptomCheckerJsonResponseInString; + data['TimerTime'] = this.timerTime; + data['TotalAdvanceBalanceAmount'] = this.totalAdvanceBalanceAmount; + data['TotalPatientsCount'] = this.totalPatientsCount; + data['TotalPendingApprovalCount'] = this.totalPendingApprovalCount; + data['TotalUnUsedCount'] = this.totalUnUsedCount; + data['TransactionNo'] = this.transactionNo; + data['UnReadCounts'] = this.unReadCounts; + data['UpdateStatus'] = this.updateStatus; + data['UserAgreementContent'] = this.userAgreementContent; + data['YahalaAccountNo'] = this.yahalaAccountNo; + data['check24HourComplaint'] = this.check24HourComplaint; + data['currency'] = this.currency; + data['message'] = this.message; + data['patientID'] = this.patientID; + data['returnValue'] = this.returnValue; + data['returnValueStr'] = this.returnValueStr; + data['statusCode'] = this.statusCode; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/pharmacies/LakumInquiryInformationObjVersion.dart b/lib/core/model/pharmacies/LakumInquiryInformationObjVersion.dart new file mode 100644 index 00000000..37f5c662 --- /dev/null +++ b/lib/core/model/pharmacies/LakumInquiryInformationObjVersion.dart @@ -0,0 +1,183 @@ +import 'PointsAmountPerYear.dart'; +import 'PointsDetails.dart'; + +class LakumInquiryInformationObjVersion { + num? accountNumber; + String? accountStatus; + String? barCode; + num? consumedPoints; + String? consumedPointsAmount; + List? consumedPointsAmountPerYear; + List? consumedPointsDetails; + String? createdDate; + num? expiredPoints; + String? expiryDate; + num? gainedPoints; + num? gainedPointsAmount; + List? gainedPointsAmountPerYear; + List? gainedPointsDetails; + String? lakumMessageStatus; + String? memberName; + String? memberUniversalId; + String? mobileNumber; + num? pointsBalance; + num? pointsBalanceAmount; + num? pointsWillBeExpired; + String? prefLang; + num? statusCode; + num? transferPoints; + List? transferPointsAmountPerYear; + List? transferPointsDetails; + dynamic waitingPoints; + dynamic loyalityAmount; + dynamic loyalityPoints; + num? purchaseRate; + + LakumInquiryInformationObjVersion( + {this.accountNumber, + this.accountStatus, + this.barCode, + this.consumedPoints, + this.consumedPointsAmount, + this.consumedPointsAmountPerYear, + this.consumedPointsDetails, + this.createdDate, + this.expiredPoints, + this.expiryDate, + this.gainedPoints, + this.gainedPointsAmount, + this.gainedPointsAmountPerYear, + this.gainedPointsDetails, + this.lakumMessageStatus, + this.memberName, + this.memberUniversalId, + this.mobileNumber, + this.pointsBalance, + this.pointsBalanceAmount, + this.pointsWillBeExpired, + this.prefLang, + this.statusCode, + this.transferPoints, + this.transferPointsAmountPerYear, + this.transferPointsDetails, + this.waitingPoints, + this.loyalityAmount, + this.loyalityPoints, + this.purchaseRate}); + + LakumInquiryInformationObjVersion.fromJson(Map json) { + accountNumber = json['AccountNumber']; + accountStatus = json['AccountStatus']; + barCode = json['BarCode']; + consumedPoints = json['ConsumedPoints']; + consumedPointsAmount = json['ConsumedPointsAmount']; + if (json['ConsumedPointsAmountPerYear'] != null) { + consumedPointsAmountPerYear = []; + json['ConsumedPointsAmountPerYear'].forEach((v) { + consumedPointsAmountPerYear!.add(PointsAmountPerYear.fromJson(v)); + }); + } + if (json['ConsumedPointsDetails'] != null) { + consumedPointsDetails = []; + json['ConsumedPointsDetails'].forEach((v) { + consumedPointsDetails!.add(PointsDetails.fromJson(v)); + }); + } + createdDate = json['CreatedDate']; + expiredPoints = json['ExpiredPoints']; + expiryDate = json['ExpiryDate']; + gainedPoints = json['GainedPoints']; + gainedPointsAmount = json['GainedPointsAmount']; + if (json['GainedPointsAmountPerYear'] != null) { + gainedPointsAmountPerYear = []; + json['GainedPointsAmountPerYear'].forEach((v) { + gainedPointsAmountPerYear!.add(PointsAmountPerYear.fromJson(v)); + }); + } + if (json['GainedPointsDetails'] != null) { + gainedPointsDetails = []; + json['GainedPointsDetails'].forEach((v) { + gainedPointsDetails!.add(PointsDetails.fromJson(v)); + }); + } + lakumMessageStatus = json['LakumMessageStatus']; + memberName = json['MemberName']; + memberUniversalId = json['MemberUniversalId']; + mobileNumber = json['MobileNumber']; + pointsBalance = json['PointsBalance']; + pointsBalanceAmount = json['PointsBalanceAmount']; + pointsWillBeExpired = json['PointsWillBeExpired']; + prefLang = json['PrefLang']; + statusCode = json['StatusCode']; + transferPoints = json['TransferPoints']; + if (json['TransferPointsAmountPerYear'] != null) { + transferPointsAmountPerYear = []; + json['TransferPointsAmountPerYear'].forEach((v) { + transferPointsAmountPerYear!.add(PointsAmountPerYear.fromJson(v)); + }); + } + if (json['TransferPointsDetails'] != null) { + transferPointsDetails = []; + json['TransferPointsDetails'].forEach((v) { + transferPointsDetails!.add(PointsDetails.fromJson(v)); + }); + } + waitingPoints = json['WaitingPoints']; + loyalityAmount = json['loyalityAmount']; + loyalityPoints = json['loyalityPoints']; + purchaseRate = json['purchaseRate']; + } + + Map toJson() { + final Map data = new Map(); + data['AccountNumber'] = this.accountNumber; + data['AccountStatus'] = this.accountStatus; + data['BarCode'] = this.barCode; + data['ConsumedPoints'] = this.consumedPoints; + data['ConsumedPointsAmount'] = this.consumedPointsAmount; + if (this.consumedPointsAmountPerYear != null) { + data['ConsumedPointsAmountPerYear'] = + this.consumedPointsAmountPerYear!.map((v) => v).toList(); + } + if (this.consumedPointsDetails != null) { + data['ConsumedPointsDetails'] = + this.consumedPointsDetails!.map((v) => v).toList(); + } + data['CreatedDate'] = this.createdDate; + data['ExpiredPoints'] = this.expiredPoints; + data['ExpiryDate'] = this.expiryDate; + data['GainedPoints'] = this.gainedPoints; + data['GainedPointsAmount'] = this.gainedPointsAmount; + if (this.gainedPointsAmountPerYear != null) { + data['GainedPointsAmountPerYear'] = + this.gainedPointsAmountPerYear!.map((v) => v).toList(); + } + if (this.gainedPointsDetails != null) { + data['GainedPointsDetails'] = + this.gainedPointsDetails!.map((v) => v).toList(); + } + data['LakumMessageStatus'] = this.lakumMessageStatus; + data['MemberName'] = this.memberName; + data['MemberUniversalId'] = this.memberUniversalId; + data['MobileNumber'] = this.mobileNumber; + data['PointsBalance'] = this.pointsBalance; + data['PointsBalanceAmount'] = this.pointsBalanceAmount; + data['PointsWillBeExpired'] = this.pointsWillBeExpired; + data['PrefLang'] = this.prefLang; + data['StatusCode'] = this.statusCode; + data['TransferPoints'] = this.transferPoints; + if (this.transferPointsAmountPerYear != null) { + data['TransferPointsAmountPerYear'] = + this.transferPointsAmountPerYear!.map((v) => v).toList(); + } + if (this.transferPointsDetails != null) { + data['TransferPointsDetails'] = + this.transferPointsDetails!.map((v) => v).toList(); + } + data['WaitingPoints'] = this.waitingPoints; + data['loyalityAmount'] = this.loyalityAmount; + data['loyalityPoints'] = this.loyalityPoints; + data['purchaseRate'] = this.purchaseRate; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/pharmacies/ListUserAgreement.dart b/lib/core/model/pharmacies/ListUserAgreement.dart new file mode 100644 index 00000000..3c2a6231 --- /dev/null +++ b/lib/core/model/pharmacies/ListUserAgreement.dart @@ -0,0 +1,28 @@ +class ListUserAgreement { + String? userAgreementLAKUM; + String? userAgreementLAKUMn; + String? userAgreementTxt; + String? userAgreementTxtn; + + ListUserAgreement( + {this.userAgreementLAKUM, + this.userAgreementLAKUMn, + this.userAgreementTxt, + this.userAgreementTxtn}); + + ListUserAgreement.fromJson(Map json) { + userAgreementLAKUM = json['UserAgreementLAKUM']; + userAgreementLAKUMn = json['UserAgreementLAKUMn']; + userAgreementTxt = json['UserAgreementTxt']; + userAgreementTxtn = json['UserAgreementTxtn']; + } + + Map toJson() { + final Map data = new Map(); + data['UserAgreementLAKUM'] = this.userAgreementLAKUM; + data['UserAgreementLAKUMn'] = this.userAgreementLAKUMn; + data['UserAgreementTxt'] = this.userAgreementTxt; + data['UserAgreementTxtn'] = this.userAgreementTxtn; + return data; + } +} diff --git a/lib/core/model/pharmacies/Manufacturer.dart b/lib/core/model/pharmacies/Manufacturer.dart new file mode 100644 index 00000000..543a1b43 --- /dev/null +++ b/lib/core/model/pharmacies/Manufacturer.dart @@ -0,0 +1,98 @@ +import 'PharmacyImageObject.dart'; + +class Manufacturer { + String? id; + String? name; + String? namen; + // List localizedNames; + String? description; + int? manufacturerTemplateId; + String? metaKeywords; + String? metaDescription; + String? metaTitle; + int? pageSize; + String? pageSizeOptions; + String? priceRanges; + bool? published; + bool? deleted; + int? displayOrder; + String? createdOnUtc; + String? updatedOnUtc; + PharmacyImageObject? image; + + Manufacturer( + {this.id, + this.name, + this.namen, + // this.localizedNames, + this.description, + this.manufacturerTemplateId, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.pageSize, + this.pageSizeOptions, + this.priceRanges, + this.published, + this.deleted, + this.displayOrder, + this.createdOnUtc, + this.updatedOnUtc, + this.image}); + + Manufacturer.fromJson(Map json) { + id = json['id']; + name = json['name']; + namen = json['namen']; + // if (json['localized_names'] != null) { + // localizedNames = new List(); + // json['localized_names'].forEach((v) { + // localizedNames.add(new LocalizedNames.fromJson(v)); + // }); + // } + description = json['description']; + manufacturerTemplateId = json['manufacturer_template_id']; + metaKeywords = json['meta_keywords']; + metaDescription = json['meta_description']; + metaTitle = json['meta_title']; + pageSize = json['page_size']; + pageSizeOptions = json['page_size_options']; + priceRanges = json['price_ranges']; + published = json['published']; + deleted = json['deleted']; + displayOrder = json['display_order']; + createdOnUtc = json['created_on_utc']; + updatedOnUtc = json['updated_on_utc']; + image = json['image'] != null + ? new PharmacyImageObject.fromJson(json['image']) + : null; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['name'] = this.name; + data['namen'] = this.namen; + // if (this.localizedNames != null) { + // data['localized_names'] = + // this.localizedNames.map((v) => v.toJson()).toList(); + // } + data['description'] = this.description; + data['manufacturer_template_id'] = this.manufacturerTemplateId; + data['meta_keywords'] = this.metaKeywords; + data['meta_description'] = this.metaDescription; + data['meta_title'] = this.metaTitle; + data['page_size'] = this.pageSize; + data['page_size_options'] = this.pageSizeOptions; + data['price_ranges'] = this.priceRanges; + data['published'] = this.published; + data['deleted'] = this.deleted; + data['display_order'] = this.displayOrder; + data['created_on_utc'] = this.createdOnUtc; + data['updated_on_utc'] = this.updatedOnUtc; + if (this.image != null) { + data['image'] = this.image!.toJson(); + } + return data; + } +} diff --git a/lib/core/model/pharmacies/PharmacyAddressesModel.dart b/lib/core/model/pharmacies/PharmacyAddressesModel.dart new file mode 100644 index 00000000..82d448ed --- /dev/null +++ b/lib/core/model/pharmacies/PharmacyAddressesModel.dart @@ -0,0 +1,170 @@ + +import 'dart:convert'; + +PharmacyAddressesModel pharmacyAddressesModelFromJson(String str) => PharmacyAddressesModel.fromJson(json.decode(str)); + +String pharmacyAddressesModelToJson(PharmacyAddressesModel data) => json.encode(data.toJson()); + +class PharmacyAddressesModel { + PharmacyAddressesModel({ + this.customers, + }); + + List? customers; + + factory PharmacyAddressesModel.fromJson(Map json) => PharmacyAddressesModel( + customers: List.from(json["customers"].map((x) => Customer.fromJson(x))), + ); + + Map toJson() => { + "customers": List.from(customers!.map((x) => x.toJson())), + }; +} + +class Customer { + Customer({ + this.addresses, + }); + + List
? addresses; + + factory Customer.fromJson(Map json) => Customer( + addresses: List
.from(json["addresses"].map((x) => Address.fromJson(x))), + ); + + Map toJson() => { + "addresses": List.from(addresses!.map((x) => x.toJson())), + }; +} + +class Address { + Address({ + this.id, + this.firstName, + this.lastName, + this.email, + this.company, + this.countryId, + this.country, + this.stateProvinceId, + this.city, + this.address1, + this.address2, + this.zipPostalCode, + this.phoneNumber, + this.faxNumber, + this.customerAttributes, + this.createdOnUtc, + this.province, + this.latLong, + }); + + String? id; + FirstName? firstName; + LastName? lastName; + Email? email; + dynamic company; + int? countryId; + Country? country; + dynamic stateProvinceId; + City? city; + String? address1; + String? address2; + String? zipPostalCode; + String? phoneNumber; + dynamic faxNumber; + String? customerAttributes; + DateTime? createdOnUtc; + dynamic province; + String? latLong; + + factory Address.fromJson(Map json) => Address( + id: json["id"], + firstName: firstNameValues.map![json["first_name"]], + lastName: lastNameValues.map![json["last_name"]], + email: emailValues.map![json["email"]], + company: json["company"], + countryId: json["country_id"], + country: countryValues.map![json["country"]], + stateProvinceId: json["state_province_id"], + city: cityValues.map![json["city"]], + address1: json["address1"], + address2: json["address2"], + zipPostalCode: json["zip_postal_code"], + phoneNumber: json["phone_number"], + faxNumber: json["fax_number"], + customerAttributes: json["customer_attributes"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + province: json["province"], + latLong: json["lat_long"], + ); + + Map toJson() => { + "id": id, + "first_name": firstNameValues.reverse[firstName], + "last_name": lastNameValues.reverse[lastName], + "email": emailValues.reverse[email], + "company": company, + "country_id": countryId, + "country": countryValues.reverse[country], + "state_province_id": stateProvinceId, + "city": cityValues.reverse[city], + "address1": address1, + "address2": address2, + "zip_postal_code": zipPostalCode, + "phone_number": phoneNumber, + "fax_number": faxNumber, + "customer_attributes": customerAttributes, + "created_on_utc": createdOnUtc!.toIso8601String(), + "province": province, + "lat_long": latLong, + }; +} + +enum City { RIYADH, AL_OYUN } + +final cityValues = EnumValues({ + "Al Oyun": City.AL_OYUN, + "Riyadh": City.RIYADH +}); + +enum Country { SAUDI_ARABIA } + +final countryValues = EnumValues({ + "Saudi Arabia": Country.SAUDI_ARABIA +}); + +enum Email { TAMER_FANASHEH_GMAIL_COM, TAMER_DASDASDAS_GMAIL_COM } + +final emailValues = EnumValues({ + "Tamer.dasdasdas@gmail.com": Email.TAMER_DASDASDAS_GMAIL_COM, + "Tamer.fanasheh@gmail.com": Email.TAMER_FANASHEH_GMAIL_COM +}); + +enum FirstName { TAMER, TAMER_FANASHEH } + +final firstNameValues = EnumValues({ + "TAMER": FirstName.TAMER, + "TAMER FANASHEH": FirstName.TAMER_FANASHEH +}); + +enum LastName { FANASHEH, MUSA } + +final lastNameValues = EnumValues({ + "FANASHEH": LastName.FANASHEH, + "MUSA": LastName.MUSA +}); + +class EnumValues { + Map? map; + Map? reverseMap; + + EnumValues(this.map); + + Map get reverse { + if (reverseMap == null) { + reverseMap = map!.map((k, v) => new MapEntry(v, k)); + } + return reverseMap!; + } +} diff --git a/lib/core/model/pharmacies/PharmacyImageObject.dart b/lib/core/model/pharmacies/PharmacyImageObject.dart new file mode 100644 index 00000000..2806551e --- /dev/null +++ b/lib/core/model/pharmacies/PharmacyImageObject.dart @@ -0,0 +1,27 @@ +class PharmacyImageObject { + int? id; + int? position; + String? src; + String? thumb; + String? attachment; + + PharmacyImageObject({this.id, this.position, this.src, this.thumb, this.attachment}); + + PharmacyImageObject.fromJson(Map json) { + id = json['id']; + position = json['position']; + src = json['src']; + thumb = json['thumb']; + attachment = json['attachment']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['position'] = this.position; + data['src'] = this.src; + data['thumb'] = this.thumb; + data['attachment'] = this.attachment; + return data; + } +} diff --git a/lib/core/model/pharmacies/PharmacyProduct.dart b/lib/core/model/pharmacies/PharmacyProduct.dart new file mode 100644 index 00000000..3656aac8 --- /dev/null +++ b/lib/core/model/pharmacies/PharmacyProduct.dart @@ -0,0 +1,537 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/Specifications.dart'; + +import 'PharmacyImageObject.dart'; +import 'Reviews.dart'; + +class PharmacyProduct { + dynamic id; + bool? visibleIndividually; + dynamic name; + dynamic namen; + dynamic shortDescription; + dynamic shortDescriptionn; + dynamic fullDescription; + dynamic fullDescriptionn; + bool? markasNew; + bool? showOnHomePage; + dynamic metaKeywords; + dynamic metaDescription; + dynamic metaTitle; + bool? allowCustomerReviews; + int? approvedRatingSum; + int? notApprovedRatingSum; + dynamic approvedTotalReviews; + int? notApprovedTotalReviews; + dynamic sku; + bool? isRx; + bool? prescriptionRequired; + dynamic rxMessage; + dynamic rxMessagen; + String? manufacturerPartNumber; + String? gtin; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; + int? maxNumberOfDownloads; + String? downloadExpirationDays; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; + int? recurringCycleLength; + int? recurringTotalCycles; + bool? isRental; + int? rentalPriceLength; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; + double? additionalShippingCharge; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; + int? manageInventoryMethodId; + int? stockQuantity; + String? stockAvailability; + String? stockAvailabilityn; + bool? displayStockAvailability; + bool? displayStockQuantity; + int? minStockQuantity; + int? notifyAdminForQuantityBelow; + bool? allowBackInStockSubscriptions; + int? orderMinimumQuantity; + int? orderMaximumQuantity; + String? allowedQuantities; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; + String? preOrderAvailabilityStartDateTimeUtc; + bool? callForPrice; + double? price; + double? oldPrice; + double? productCost; + String? specialPrice; + String? specialPriceStartDateTimeUtc; + String? specialPriceEndDateTimeUtc; + bool? customerEntersPrice; + double? minimumCustomerEnteredPrice; + double? maximumCustomerEnteredPrice; + bool? basepriceEnabled; + double? basepriceAmount; + double? basepriceBaseAmount; + bool? hasTierPrices; + bool? hasDiscountsApplied; + String? discountName; + String? discountNamen; + String? discountDescription; + String? discountDescriptionn; + String? discountPercentage; + String? currency; + String? currencyn; + double? weight; + double? length; + double? width; + double? height; + String? availableStartDateTimeUtc; + String? availableEndDateTimeUtc; + int? displayOrder; + bool? published; + bool? deleted; + String? createdOnUtc; + String? updatedOnUtc; + String? productType; + int? parentGroupedProductId; + List? roleIds; + List? discountIds; + List? storeIds; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + List? associatedProductIds; + List? tags; + int? vendorId; + String? seName; + + PharmacyProduct( + {this.id, + this.visibleIndividually, + this.name, + this.namen, + this.shortDescription, + this.shortDescriptionn, + this.fullDescription, + this.fullDescriptionn, + this.markasNew, + this.showOnHomePage, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.allowCustomerReviews, + this.approvedRatingSum, + this.notApprovedRatingSum, + this.approvedTotalReviews, + this.notApprovedTotalReviews, + this.sku, + this.isRx, + this.prescriptionRequired, + this.rxMessage, + this.rxMessagen, + this.manufacturerPartNumber, + this.gtin, + this.isGiftCard, + this.requireOtherProducts, + this.automaticallyAddRequiredProducts, + this.isDownload, + this.unlimitedDownloads, + this.maxNumberOfDownloads, + this.downloadExpirationDays, + this.hasSampleDownload, + this.hasUserAgreement, + this.isRecurring, + this.recurringCycleLength, + this.recurringTotalCycles, + this.isRental, + this.rentalPriceLength, + this.isShipEnabled, + this.isFreeShipping, + this.shipSeparately, + this.additionalShippingCharge, + this.isTaxExempt, + this.isTelecommunicationsOrBroadcastingOrElectronicServices, + this.useMultipleWarehouses, + this.manageInventoryMethodId, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.displayStockAvailability, + this.displayStockQuantity, + this.minStockQuantity, + this.notifyAdminForQuantityBelow, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, + this.allowedQuantities, + this.allowAddingOnlyExistingAttributeCombinations, + this.disableBuyButton, + this.disableWishlistButton, + this.availableForPreOrder, + this.preOrderAvailabilityStartDateTimeUtc, + this.callForPrice, + this.price, + this.oldPrice, + this.productCost, + this.specialPrice, + this.specialPriceStartDateTimeUtc, + this.specialPriceEndDateTimeUtc, + this.customerEntersPrice, + this.minimumCustomerEnteredPrice, + this.maximumCustomerEnteredPrice, + this.basepriceEnabled, + this.basepriceAmount, + this.basepriceBaseAmount, + this.hasTierPrices, + this.hasDiscountsApplied, + this.discountName, + this.discountNamen, + this.discountDescription, + this.discountDescriptionn, + this.discountPercentage, + this.currency, + this.currencyn, + this.weight, + this.length, + this.width, + this.height, + this.availableStartDateTimeUtc, + this.availableEndDateTimeUtc, + this.displayOrder, + this.published, + this.deleted, + this.createdOnUtc, + this.updatedOnUtc, + this.productType, + this.parentGroupedProductId, + this.roleIds, + this.discountIds, + this.storeIds, + this.manufacturerIds, + this.reviews, + this.images, + this.attributes, + this.specifications, + this.associatedProductIds, + this.tags, + this.vendorId, + this.seName}); + + PharmacyProduct.fromJson(Map json) { + id = json['id']; + visibleIndividually = json['visible_individually']; + name = json['name']; + namen = json['namen']; + shortDescription = json['short_description']; + shortDescriptionn = json['short_descriptionn']; + fullDescription = json['full_description']; + fullDescriptionn = json['full_descriptionn']; + markasNew = json['markas_new']; + showOnHomePage = json['show_on_home_page']; + metaKeywords = json['meta_keywords']; + metaDescription = json['meta_description']; + metaTitle = json['meta_title']; + allowCustomerReviews = json['allow_customer_reviews']; + approvedRatingSum = json['approved_rating_sum']; + notApprovedRatingSum = json['not_approved_rating_sum']; + approvedTotalReviews = json['approved_total_reviews']; + notApprovedTotalReviews = json['not_approved_total_reviews']; + sku = json['sku']; + isRx = json['is_rx']; + prescriptionRequired = json['prescription_required']; + rxMessage = json['rx_message']; + rxMessagen = json['rx_messagen']; + manufacturerPartNumber = json['manufacturer_part_number']; + gtin = json['gtin']; + isGiftCard = json['is_gift_card']; + requireOtherProducts = json['require_other_products']; + automaticallyAddRequiredProducts = + json['automatically_add_required_products']; + isDownload = json['is_download']; + unlimitedDownloads = json['unlimited_downloads']; + maxNumberOfDownloads = json['max_number_of_downloads']; + downloadExpirationDays = json['download_expiration_days']; + hasSampleDownload = json['has_sample_download']; + hasUserAgreement = json['has_user_agreement']; + isRecurring = json['is_recurring']; + recurringCycleLength = json['recurring_cycle_length']; + recurringTotalCycles = json['recurring_total_cycles']; + isRental = json['is_rental']; + rentalPriceLength = json['rental_price_length']; + isShipEnabled = json['is_ship_enabled']; + isFreeShipping = json['is_free_shipping']; + shipSeparately = json['ship_separately']; + additionalShippingCharge = json['additional_shipping_charge']; + isTaxExempt = json['is_tax_exempt']; + isTelecommunicationsOrBroadcastingOrElectronicServices = + json['is_telecommunications_or_broadcasting_or_electronic_services']; + useMultipleWarehouses = json['use_multiple_warehouses']; + manageInventoryMethodId = json['manage_inventory_method_id']; + stockQuantity = json['stock_quantity']; + stockAvailability = json['stock_availability']; + stockAvailabilityn = json['stock_availabilityn']; + displayStockAvailability = json['display_stock_availability']; + displayStockQuantity = json['display_stock_quantity']; + minStockQuantity = json['min_stock_quantity']; + notifyAdminForQuantityBelow = json['notify_admin_for_quantity_below']; + allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions']; + orderMinimumQuantity = json['order_minimum_quantity']; + orderMaximumQuantity = json['order_maximum_quantity']; + allowedQuantities = json['allowed_quantities']; + allowAddingOnlyExistingAttributeCombinations = + json['allow_adding_only_existing_attribute_combinations']; + disableBuyButton = json['disable_buy_button']; + disableWishlistButton = json['disable_wishlist_button']; + availableForPreOrder = json['available_for_pre_order']; + preOrderAvailabilityStartDateTimeUtc = + json['pre_order_availability_start_date_time_utc']; + callForPrice = json['call_for_price']; + price = json['price']; + oldPrice = json['old_price']; + productCost = json['product_cost']; + specialPrice = json['special_price']; + specialPriceStartDateTimeUtc = json['special_price_start_date_time_utc']; + specialPriceEndDateTimeUtc = json['special_price_end_date_time_utc']; + customerEntersPrice = json['customer_enters_price']; + minimumCustomerEnteredPrice = json['minimum_customer_entered_price']; + maximumCustomerEnteredPrice = json['maximum_customer_entered_price']; + basepriceEnabled = json['baseprice_enabled']; + basepriceAmount = json['baseprice_amount']; + basepriceBaseAmount = json['baseprice_base_amount']; + hasTierPrices = json['has_tier_prices']; + hasDiscountsApplied = json['has_discounts_applied']; + discountName = json['discount_name']; + discountNamen = json['discount_namen']; + discountDescription = json['discount_description']; + discountDescriptionn = json['discount_Descriptionn']; + discountPercentage = json['discount_percentage']; + currency = json['currency']; + currencyn = json['currencyn']; + weight = json['weight']; + length = json['length']; + width = json['width']; + height = json['height']; + availableStartDateTimeUtc = json['available_start_date_time_utc']; + availableEndDateTimeUtc = json['available_end_date_time_utc']; + displayOrder = json['display_order']; + published = json['published']; + deleted = json['deleted']; + createdOnUtc = json['created_on_utc']; + updatedOnUtc = json['updated_on_utc']; + productType = json['product_type']; + parentGroupedProductId = json['parent_grouped_product_id']; + if (json['role_ids'] != null) { + roleIds = []; + json['role_ids'].forEach((v) { + roleIds!.add(v); + }); + } + if (json['discount_ids'] != null) { + discountIds = []; + json['discount_ids'].forEach((v) { + discountIds!.add(v); + }); + } + if (json['store_ids'] != null) { + storeIds = []; + json['store_ids'].forEach((v) { + storeIds!.add(v); + }); + } + if (json['manufacturer_ids'] != null) { + manufacturerIds =[]; + json['manufacturer_ids'].forEach((v) { + manufacturerIds!.add(v); + }); + } + if (json['reviews'] != null) { + reviews = []; + json['reviews'].forEach((v) { + reviews!.add(new Reviews.fromJson(v)); + }); + } + if (json['images'] != null) { + images =[]; + json['images'].forEach((v) { + images!.add(new PharmacyImageObject.fromJson(v)); + }); + } + if (json['attributes'] != null) { + attributes = []; + json['attributes'].forEach((v) { + attributes!.add(v); + }); + } + if (json['specifications'] != null) { + specifications = []; + json['specifications'].forEach((v) { + specifications!.add(new Specifications.fromJson(v)); + }); + } + if (json['associated_product_ids'] != null) { + associatedProductIds =[]; + json['associated_product_ids'].forEach((v) { + associatedProductIds!.add(v); + }); + } + if (json['tags'] != null) { + tags = []; + json['tags'].forEach((v) { + tags!.add(v); + }); + } + vendorId = json['vendor_id']; + seName = json['se_name']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['visible_individually'] = this.visibleIndividually; + data['name'] = this.name; + data['namen'] = this.namen; + data['short_description'] = this.shortDescription; + data['short_descriptionn'] = this.shortDescriptionn; + data['full_description'] = this.fullDescription; + data['full_descriptionn'] = this.fullDescriptionn; + data['markas_new'] = this.markasNew; + data['show_on_home_page'] = this.showOnHomePage; + data['meta_keywords'] = this.metaKeywords; + data['meta_description'] = this.metaDescription; + data['meta_title'] = this.metaTitle; + data['allow_customer_reviews'] = this.allowCustomerReviews; + data['approved_rating_sum'] = this.approvedRatingSum; + data['not_approved_rating_sum'] = this.notApprovedRatingSum; + data['approved_total_reviews'] = this.approvedTotalReviews; + data['not_approved_total_reviews'] = this.notApprovedTotalReviews; + data['sku'] = this.sku; + data['is_rx'] = this.isRx; + data['prescription_required'] = this.prescriptionRequired; + data['rx_message'] = this.rxMessage; + data['rx_messagen'] = this.rxMessagen; + data['manufacturer_part_number'] = this.manufacturerPartNumber; + data['gtin'] = this.gtin; + data['is_gift_card'] = this.isGiftCard; + data['require_other_products'] = this.requireOtherProducts; + data['automatically_add_required_products'] = + this.automaticallyAddRequiredProducts; + data['is_download'] = this.isDownload; + data['unlimited_downloads'] = this.unlimitedDownloads; + data['max_number_of_downloads'] = this.maxNumberOfDownloads; + data['download_expiration_days'] = this.downloadExpirationDays; + data['has_sample_download'] = this.hasSampleDownload; + data['has_user_agreement'] = this.hasUserAgreement; + data['is_recurring'] = this.isRecurring; + data['recurring_cycle_length'] = this.recurringCycleLength; + data['recurring_total_cycles'] = this.recurringTotalCycles; + data['is_rental'] = this.isRental; + data['rental_price_length'] = this.rentalPriceLength; + data['is_ship_enabled'] = this.isShipEnabled; + data['is_free_shipping'] = this.isFreeShipping; + data['ship_separately'] = this.shipSeparately; + data['additional_shipping_charge'] = this.additionalShippingCharge; + data['is_tax_exempt'] = this.isTaxExempt; + data['is_telecommunications_or_broadcasting_or_electronic_services'] = + this.isTelecommunicationsOrBroadcastingOrElectronicServices; + data['use_multiple_warehouses'] = this.useMultipleWarehouses; + data['manage_inventory_method_id'] = this.manageInventoryMethodId; + data['stock_quantity'] = this.stockQuantity; + data['stock_availability'] = this.stockAvailability; + data['stock_availabilityn'] = this.stockAvailabilityn; + data['display_stock_availability'] = this.displayStockAvailability; + data['display_stock_quantity'] = this.displayStockQuantity; + data['min_stock_quantity'] = this.minStockQuantity; + data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow; + data['allow_back_in_stock_subscriptions'] = + this.allowBackInStockSubscriptions; + data['order_minimum_quantity'] = this.orderMinimumQuantity; + data['order_maximum_quantity'] = this.orderMaximumQuantity; + data['allowed_quantities'] = this.allowedQuantities; + data['allow_adding_only_existing_attribute_combinations'] = + this.allowAddingOnlyExistingAttributeCombinations; + data['disable_buy_button'] = this.disableBuyButton; + data['disable_wishlist_button'] = this.disableWishlistButton; + data['available_for_pre_order'] = this.availableForPreOrder; + data['pre_order_availability_start_date_time_utc'] = + this.preOrderAvailabilityStartDateTimeUtc; + data['call_for_price'] = this.callForPrice; + data['price'] = this.price; + data['old_price'] = this.oldPrice; + data['product_cost'] = this.productCost; + data['special_price'] = this.specialPrice; + data['special_price_start_date_time_utc'] = + this.specialPriceStartDateTimeUtc; + data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc; + data['customer_enters_price'] = this.customerEntersPrice; + data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice; + data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice; + data['baseprice_enabled'] = this.basepriceEnabled; + data['baseprice_amount'] = this.basepriceAmount; + data['baseprice_base_amount'] = this.basepriceBaseAmount; + data['has_tier_prices'] = this.hasTierPrices; + data['has_discounts_applied'] = this.hasDiscountsApplied; + data['discount_name'] = this.discountName; + data['discount_namen'] = this.discountNamen; + data['discount_description'] = this.discountDescription; + data['discount_Descriptionn'] = this.discountDescriptionn; + data['discount_percentage'] = this.discountPercentage; + data['currency'] = this.currency; + data['currencyn'] = this.currencyn; + data['weight'] = this.weight; + data['length'] = this.length; + data['width'] = this.width; + data['height'] = this.height; + data['available_start_date_time_utc'] = this.availableStartDateTimeUtc; + data['available_end_date_time_utc'] = this.availableEndDateTimeUtc; + data['display_order'] = this.displayOrder; + data['published'] = this.published; + data['deleted'] = this.deleted; + data['created_on_utc'] = this.createdOnUtc; + data['updated_on_utc'] = this.updatedOnUtc; + data['product_type'] = this.productType; + data['parent_grouped_product_id'] = this.parentGroupedProductId; + if (this.roleIds != null) { + data['role_ids'] = this.roleIds!.map((v) => v).toList(); + } + if (this.discountIds != null) { + data['discount_ids'] = this.discountIds!.map((v) => v).toList(); + } + if (this.storeIds != null) { + data['store_ids'] = this.storeIds!.map((v) => v).toList(); + } + data['manufacturer_ids'] = this.manufacturerIds; + if (this.reviews != null) { + data['reviews'] = this.reviews!.map((v) => v.toJson()).toList(); + } + if (this.images != null) { + data['images'] = this.images!.map((v) => v.toJson()).toList(); + } + if (this.attributes != null) { + data['attributes'] = this.attributes!.map((v) => v).toList(); + } + if (this.specifications != null) { + data['specifications'] = + this.specifications!.map((v) => v.toJson()).toList(); + } + if (this.associatedProductIds != null) { + data['associated_product_ids'] = + this.associatedProductIds!.map((v) => v).toList(); + } + if (this.tags != null) { + data['tags'] = this.tags!.map((v) => v).toList(); + } + data['vendor_id'] = this.vendorId; + data['se_name'] = this.seName; + return data; + } +} diff --git a/lib/core/model/pharmacies/PointsAmountPerMonth.dart b/lib/core/model/pharmacies/PointsAmountPerMonth.dart new file mode 100644 index 00000000..2504975c --- /dev/null +++ b/lib/core/model/pharmacies/PointsAmountPerMonth.dart @@ -0,0 +1,42 @@ +import 'PointsAmountPerday.dart'; + +class PointsAmountPerMonth { + num? amountPerMonth; + String? month; + num? monthNumber; + List? pointsAmountPerday; + num? pointsPerMonth; + + PointsAmountPerMonth( + {this.amountPerMonth, + this.month, + this.monthNumber, + this.pointsAmountPerday, + this.pointsPerMonth}); + + PointsAmountPerMonth.fromJson(Map json) { + amountPerMonth = json['AmountPerMonth']; + month = json['Month']; + monthNumber = json['MonthNumber']; + if (json['PointsAmountPerday'] != null) { + pointsAmountPerday = []; + json['PointsAmountPerday'].forEach((v) { + pointsAmountPerday!.add(new PointsAmountPerday.fromJson(v)); + }); + } + pointsPerMonth = json['PointsPerMonth']; + } + + Map toJson() { + final Map data = new Map(); + data['AmountPerMonth'] = this.amountPerMonth; + data['Month'] = this.month; + data['MonthNumber'] = this.monthNumber; + if (this.pointsAmountPerday != null) { + data['PointsAmountPerday'] = + this.pointsAmountPerday!.map((v) => v.toJson()).toList(); + } + data['PointsPerMonth'] = this.pointsPerMonth; + return data; + } +} diff --git a/lib/core/model/pharmacies/PointsAmountPerYear.dart b/lib/core/model/pharmacies/PointsAmountPerYear.dart new file mode 100644 index 00000000..3affcd65 --- /dev/null +++ b/lib/core/model/pharmacies/PointsAmountPerYear.dart @@ -0,0 +1,38 @@ +import 'PointsAmountPerMonth.dart'; + +class PointsAmountPerYear { + int? amountPerYear; + List? pointsAmountPerMonth; + int? pointsPerYear; + int? year; + + PointsAmountPerYear( + {this.amountPerYear, + this.pointsAmountPerMonth, + this.pointsPerYear, + this.year}); + + PointsAmountPerYear.fromJson(Map json) { + amountPerYear = json['AmountPerYear']; + if (json['PointsAmountPerMonth'] != null) { + pointsAmountPerMonth = []; + json['PointsAmountPerMonth'].forEach((v) { + pointsAmountPerMonth!.add(new PointsAmountPerMonth.fromJson(v)); + }); + } + pointsPerYear = json['PointsPerYear']; + year = json['Year']; + } + + Map toJson() { + final Map data = new Map(); + data['AmountPerYear'] = this.amountPerYear; + if (this.pointsAmountPerMonth != null) { + data['PointsAmountPerMonth'] = + this.pointsAmountPerMonth!.map((v) => v.toJson()).toList(); + } + data['PointsPerYear'] = this.pointsPerYear; + data['Year'] = this.year; + return data; + } +} diff --git a/lib/core/model/pharmacies/PointsAmountPerday.dart b/lib/core/model/pharmacies/PointsAmountPerday.dart new file mode 100644 index 00000000..28515bc6 --- /dev/null +++ b/lib/core/model/pharmacies/PointsAmountPerday.dart @@ -0,0 +1,42 @@ +import 'PointsDetails.dart'; + +class PointsAmountPerday { + num? amountPerDay; + String? day; + List? pointsDetails; + num? pointsPerDay; + String? transationDate; + + PointsAmountPerday( + {this.amountPerDay, + this.day, + this.pointsDetails, + this.pointsPerDay, + this.transationDate}); + + PointsAmountPerday.fromJson(Map json) { + amountPerDay = json['AmountPerDay']; + day = json['Day']; + if (json['PointsDetails'] != null) { + pointsDetails = []; + json['PointsDetails'].forEach((v) { + pointsDetails!.add(new PointsDetails.fromJson(v)); + }); + } + pointsPerDay = json['PointsPerDay']; + transationDate = json['TransationDate']; + } + + Map toJson() { + final Map data = new Map(); + data['AmountPerDay'] = this.amountPerDay; + data['Day'] = this.day; + if (this.pointsDetails != null) { + data['PointsDetails'] = + this.pointsDetails!.map((v) => v.toJson()).toList(); + } + data['PointsPerDay'] = this.pointsPerDay; + data['TransationDate'] = this.transationDate; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/pharmacies/PointsDetails.dart b/lib/core/model/pharmacies/PointsDetails.dart new file mode 100644 index 00000000..f3091b1d --- /dev/null +++ b/lib/core/model/pharmacies/PointsDetails.dart @@ -0,0 +1,57 @@ +class PointsDetails { + int? accNumber; + String? accountStatus; + num? amount; + int? lineItemNo; + String? operationType; + num? points; + num? purchasePoints; + int? subTransactionType; + String? subTransactionTypeDescription; + String? transactionDate; + + PointsDetails( + {this.accNumber, + this.accountStatus, + this.amount, + this.lineItemNo, + this.operationType, + this.points, + this.purchasePoints, + this.subTransactionType, + this.subTransactionTypeDescription, + this.transactionDate}); + + PointsDetails.fromJson(Map json) { + accNumber = json['AccNumber']; + accountStatus = json['AccountStatus']; + amount = json['Amount']; + lineItemNo = json['LineItemNo']; + operationType = json['OperationType']; + points = json['Points']; + var purchasePoints = json['PurchasePoints']; + if(purchasePoints is int){ + this.purchasePoints = (purchasePoints).roundToDouble(); + }else { + this.purchasePoints = purchasePoints; + } + subTransactionType = json['SubTransactionType']; + subTransactionTypeDescription = json['SubTransactionTypeDescription']; + transactionDate = json['TransactionDate']; + } + + Map toJson() { + final Map data = new Map(); + data['AccNumber'] = this.accNumber; + data['AccountStatus'] = this.accountStatus; + data['Amount'] = this.amount; + data['LineItemNo'] = this.lineItemNo; + data['OperationType'] = this.operationType; + data['Points'] = this.points; + data['PurchasePoints'] = this.purchasePoints; + data['SubTransactionType'] = this.subTransactionType; + data['SubTransactionTypeDescription'] = this.subTransactionTypeDescription; + data['TransactionDate'] = this.transactionDate; + return data; + } +} diff --git a/lib/core/model/pharmacies/Reviews.dart b/lib/core/model/pharmacies/Reviews.dart new file mode 100644 index 00000000..47975cdd --- /dev/null +++ b/lib/core/model/pharmacies/Reviews.dart @@ -0,0 +1,83 @@ +import '../pharmacies/Customer.dart'; + +class Reviews { + int? id; + int? position; + int? reviewId; + int? customerId; + int? productId; + int? storeId; + bool? isApproved; + String? title; + String? reviewText; + String? replyText; + int? rating; + int? helpfulYesTotal; + int? helpfulNoTotal; + String? createdOnUtc; + Customer? customer; + //dynamic product; + + Reviews( + {this.id, + this.position, + this.reviewId, + this.customerId, + this.productId, + this.storeId, + this.isApproved, + this.title, + this.reviewText, + this.replyText, + this.rating, + this.helpfulYesTotal, + this.helpfulNoTotal, + this.createdOnUtc, + this.customer, + // this.product + }); + + Reviews.fromJson(Map json) { + id = json['id']; + position = json['position']; + reviewId = json['review_id']; + customerId = json['customer_id']; + productId = json['product_id']; + storeId = json['store_id']; + isApproved = json['is_approved']; + title = json['title']; + reviewText = json['review_text']; + replyText = json['reply_text']; + rating = json['rating']; + helpfulYesTotal = json['helpful_yes_total']; + helpfulNoTotal = json['helpful_no_total']; + createdOnUtc = json['created_on_utc']; + customer = json['customer'] != null + ? new Customer.fromJson(json['customer']) + : null; + // product = json['product']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['position'] = this.position; + data['review_id'] = this.reviewId; + data['customer_id'] = this.customerId; + data['product_id'] = this.productId; + data['store_id'] = this.storeId; + data['is_approved'] = this.isApproved; + data['title'] = this.title; + data['review_text'] = this.reviewText; + data['reply_text'] = this.replyText; + data['rating'] = this.rating; + data['helpful_yes_total'] = this.helpfulYesTotal; + data['helpful_no_total'] = this.helpfulNoTotal; + data['created_on_utc'] = this.createdOnUtc; + if (this.customer != null) { + data['customer'] = this.customer!.toJson(); + } + // data['product'] = this.product; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/pharmacies/ShippingOption.dart b/lib/core/model/pharmacies/ShippingOption.dart new file mode 100644 index 00000000..4b161b4c --- /dev/null +++ b/lib/core/model/pharmacies/ShippingOption.dart @@ -0,0 +1,96 @@ +class ShippingOption { + String? shippingRateComputationMethodSystemName; + double? rate; + double? rateVat; + double? rateVatPercent; + String? name; + String? namen; + String? description; + String? descriptionn; + bool? allowShippingSunday; + bool? allowShippingMonday; + bool? allowShippingTuesday; + bool? allowShippingWednesday; + bool? allowShippingThursday; + bool? allowShippingFriday; + bool? allowShippingSaturday; + String? allowShippingTime1From; + String? allowShippingTime1To; + String? allowShippingTime2From; + String? allowShippingTime2To; + String? allowShippingNote; + String? allowShippingNoten; + + ShippingOption( + {this.shippingRateComputationMethodSystemName, + this.rate, + this.rateVat, + this.rateVatPercent, + this.name, + this.namen, + this.description, + this.descriptionn, + this.allowShippingSunday, + this.allowShippingMonday, + this.allowShippingTuesday, + this.allowShippingWednesday, + this.allowShippingThursday, + this.allowShippingFriday, + this.allowShippingSaturday, + this.allowShippingTime1From, + this.allowShippingTime1To, + this.allowShippingTime2From, + this.allowShippingTime2To, + this.allowShippingNote, + this.allowShippingNoten}); + + ShippingOption.fromJson(Map json) { + shippingRateComputationMethodSystemName = json['shipping_rate_computation_method_system_name']; + rate = json['rate']; + rateVat = json['rate_vat']; + rateVatPercent = json['rate_vat_percent']; + name = json['name']; + namen = json['namen']; + description = json['description']; + descriptionn = json['descriptionn']; + allowShippingSunday = json['AllowShippingSunday']; + allowShippingMonday = json['AllowShippingMonday']; + allowShippingTuesday = json['AllowShippingTuesday']; + allowShippingWednesday = json['AllowShippingWednesday']; + allowShippingThursday = json['AllowShippingThursday']; + allowShippingFriday = json['AllowShippingFriday']; + allowShippingSaturday = json['AllowShippingSaturday']; + allowShippingTime1From = json['AllowShippingTime1From']; + allowShippingTime1To = json['AllowShippingTime1To']; + allowShippingTime2From = json['AllowShippingTime2From']; + allowShippingTime2To = json['AllowShippingTime2To']; + allowShippingNote = json['AllowShippingNote']; + allowShippingNoten = json['AllowShippingNoten']; + } + + Map toJson() { + final Map data = new Map(); + data['shipping_rate_computation_method_system_name'] = this.shippingRateComputationMethodSystemName; + data['rate'] = this.rate; + data['rate_vat'] = this.rateVat; + data['rate_vat_percent'] = this.rateVatPercent; + data['name'] = this.name; + data['namen'] = this.namen; + data['description'] = this.description; + data['descriptionn'] = this.descriptionn; + data['AllowShippingSunday'] = this.allowShippingSunday; + data['AllowShippingMonday'] = this.allowShippingMonday; + data['AllowShippingTuesday'] = this.allowShippingTuesday; + data['AllowShippingWednesday'] = this.allowShippingWednesday; + data['AllowShippingThursday'] = this.allowShippingThursday; + data['AllowShippingFriday'] = this.allowShippingFriday; + data['AllowShippingSaturday'] = this.allowShippingSaturday; + data['AllowShippingTime1From'] = this.allowShippingTime1From; + data['AllowShippingTime1To'] = this.allowShippingTime1To; + data['AllowShippingTime2From'] = this.allowShippingTime2From; + data['AllowShippingTime2To'] = this.allowShippingTime2To; + data['AllowShippingNote'] = this.allowShippingNote; + data['AllowShippingNoten'] = this.allowShippingNoten; + return data; + } +} diff --git a/lib/core/model/pharmacies/ShoppingCart.dart b/lib/core/model/pharmacies/ShoppingCart.dart new file mode 100644 index 00000000..09629352 --- /dev/null +++ b/lib/core/model/pharmacies/ShoppingCart.dart @@ -0,0 +1,162 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/Customer.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; + +class ShoppingCart { + int? languageId; + String? id; + // List productAttributes; + double? customerEnteredPrice; + int? quantity; + dynamic discountAmountInclTax; + dynamic subtotal; + dynamic subtotalWithVat; + dynamic subtotalVatAmount; + dynamic subtotalVatRate; + dynamic currency; + dynamic currencyn; + dynamic rentalStartDateUtc; + dynamic rentalEndDateUtc; + dynamic createdOnUtc; + dynamic updatedOnUtc; + dynamic shoppingCartType; + int? productId; + PharmacyProduct? product; + int? customerId; + Customer? customer; + double? unitPriceInclTax; + double? unitPriceExclTax; + double? priceInclTax; + double? priceExclTax; + dynamic discountAmountExclTax; + double? originalProductCost; + String? attributeDescription; + int? downloadCount; + bool? isDownloadActivated; + int? licenseDownloadId; + double? itemWeight; + + ShoppingCart( + {this.languageId, + this.id, + // this.productAttributes, + this.customerEnteredPrice, + this.quantity, + this.discountAmountInclTax, + this.subtotal, + this.subtotalWithVat, + this.subtotalVatAmount, + this.subtotalVatRate, + this.currency, + this.currencyn, + this.rentalStartDateUtc, + this.rentalEndDateUtc, + this.createdOnUtc, + this.updatedOnUtc, + this.shoppingCartType, + this.productId, + this.product, + this.customerId, + this.customer, + this.unitPriceInclTax, + this.unitPriceExclTax, + this.priceInclTax, + this.priceExclTax, + this.discountAmountExclTax, + this.originalProductCost, + this.attributeDescription, + this.downloadCount, + this.isDownloadActivated, + this.licenseDownloadId, + this.itemWeight, + }); + + ShoppingCart.fromJson(Map json) { + languageId = json['language_id']; + id = json['id']; + /*if (json['product_attributes'] != null) { + productAttributes = new List(); + json['product_attributes'].forEach((v) { + productAttributes.add(new dynamic.fromJson(v)); + }); + }*/ + customerEnteredPrice = json['customer_entered_price']; + quantity = json['quantity']; + discountAmountInclTax = json['discount_amount_incl_tax']; + subtotal = json['subtotal']; + subtotalWithVat = json['subtotal_with_vat']; + subtotalVatAmount = json['subtotal_vat_amount']; + subtotalVatRate = json['subtotal_vat_rate']; + currency = json['currency']; + currencyn = json['currencyn']; + rentalStartDateUtc = json['rental_start_date_utc']; + rentalEndDateUtc = json['rental_end_date_utc']; + createdOnUtc = json['created_on_utc']; + updatedOnUtc = json['updated_on_utc']; + shoppingCartType = json['shopping_cart_type']; + productId = json['product_id']; + product = json['product'] != null + ? new PharmacyProduct.fromJson(json['product']) + : null; + customerId = json['customer_id']; + customer = json['customer'] != null + ? new Customer.fromJson(json['customer']) + : null; + + unitPriceInclTax = json['unit_price_incl_tax']; + unitPriceExclTax = json['unit_price_excl_tax']; + priceInclTax = json['price_incl_tax']; + priceExclTax = json['price_excl_tax']; + discountAmountExclTax = json['discount_amount_excl_tax']; + originalProductCost = json['original_product_cost']; + attributeDescription = json['attribute_description']; + downloadCount = json['download_count']; + isDownloadActivated = json['isDownload_activated']; + licenseDownloadId = json['license_download_id']; + itemWeight = json['item_weight']; + } + + Map toJson() { + final Map data = new Map(); + data['language_id'] = this.languageId; + data['id'] = this.id; + /*if (this.productAttributes != null) { + data['product_attributes'] = + this.productAttributes.map((v) => v.toJson()).toList(); + }*/ + data['customer_entered_price'] = this.customerEnteredPrice; + data['quantity'] = this.quantity; + data['discount_amount_incl_tax'] = this.discountAmountInclTax; + data['subtotal'] = this.subtotal; + data['subtotal_with_vat'] = this.subtotalWithVat; + data['subtotal_vat_amount'] = this.subtotalVatAmount; + data['subtotal_vat_rate'] = this.subtotalVatRate; + data['currency'] = this.currency; + data['currencyn'] = this.currencyn; + data['rental_start_date_utc'] = this.rentalStartDateUtc; + data['rental_end_date_utc'] = this.rentalEndDateUtc; + data['created_on_utc'] = this.createdOnUtc; + data['updated_on_utc'] = this.updatedOnUtc; + data['shopping_cart_type'] = this.shoppingCartType; + data['product_id'] = this.productId; + if (this.product != null) { + data['product'] = this.product!.toJson(); + } + data['customer_id'] = this.customerId; + if (this.customer != null) { + data['customer'] = this.customer!.toJson(); + } + data['unit_price_incl_tax'] = this.unitPriceInclTax; + data['unit_price_excl_tax'] = this.unitPriceExclTax; + data['price_incl_tax'] = this.priceInclTax; + data['price_excl_tax'] = this.priceExclTax; + data['discount_amount_excl_tax'] = this.discountAmountExclTax; + data['original_product_cost'] = this.originalProductCost; + data['attribute_description'] = this.attributeDescription; + data['download_count'] = this.downloadCount; + data['isDownload_activated'] = this.isDownloadActivated; + data['license_download_id'] = this.licenseDownloadId; + data['item_weight'] = this.itemWeight; + + return data; + } +} diff --git a/lib/core/model/pharmacies/ShoppingCartResponse.dart b/lib/core/model/pharmacies/ShoppingCartResponse.dart new file mode 100644 index 00000000..ff0ed1ae --- /dev/null +++ b/lib/core/model/pharmacies/ShoppingCartResponse.dart @@ -0,0 +1,55 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCart.dart'; +import 'package:flutter/material.dart'; + +class ShoppingCartResponse { + int? itemCount; + int? quantityCount; + double? subtotal; + double? subtotalWithVat; + double? subtotalVatAmount; + double? subtotalVatRate; + double? totalAmount; + List? shoppingCarts; + + ShoppingCartResponse( + {this.itemCount =0, + this.quantityCount =0, + this.subtotal=0.0, + this.subtotalWithVat = 0.0, + this.subtotalVatAmount = 0.0, + this.subtotalVatRate = 0.0, + this.totalAmount = 0.0, + this.shoppingCarts}); + + + + ShoppingCartResponse.fromJson(Map json) { + itemCount = json['item_count']; + quantityCount = json['quantity_count']; + subtotal = json['subtotal']; + subtotalWithVat = json['subtotal_with_vat']; + subtotalVatAmount = json['subtotal_vat_amount']; + subtotalVatRate = json['subtotal_vat_rate']; + if (json['shopping_carts'] != null) { + shoppingCarts = []; + json['shopping_carts'].forEach((v) { + shoppingCarts!.add(new ShoppingCart.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + data['item_count'] = this.itemCount; + data['quantity_count'] = this.quantityCount; + data['subtotal'] = this.subtotal; + data['subtotal_with_vat'] = this.subtotalWithVat; + data['subtotal_vat_amount'] = this.subtotalVatAmount; + data['subtotal_vat_rate'] = this.subtotalVatRate; + if (this.shoppingCarts != null) { + data['shopping_carts'] = + this.shoppingCarts!.map((v) => v.toJson()).toList(); + } + return data; + } +} diff --git a/lib/core/model/pharmacies/Specifications.dart b/lib/core/model/pharmacies/Specifications.dart new file mode 100644 index 00000000..30a4a7cd --- /dev/null +++ b/lib/core/model/pharmacies/Specifications.dart @@ -0,0 +1,36 @@ +class Specifications { + dynamic id; + dynamic displayOrder; + dynamic defaultValue; + dynamic defaultValuen; + dynamic name; + dynamic nameN; + + Specifications( + {this.id, + this.displayOrder, + this.defaultValue, + this.defaultValuen, + this.name, + this.nameN}); + + Specifications.fromJson(Map json) { + id = json['id']; + displayOrder = json['display_order']; + defaultValue = json['default_value']; + defaultValuen = json['default_valuen']; + name = json['name']; + nameN = json['nameN']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['display_order'] = this.displayOrder; + data['default_value'] = this.defaultValue; + data['default_valuen'] = this.defaultValuen; + data['name'] = this.name; + data['nameN'] = this.nameN; + return data; + } +} diff --git a/lib/core/model/pharmacies/order_detail.dart b/lib/core/model/pharmacies/order_detail.dart new file mode 100644 index 00000000..d6a6dd70 --- /dev/null +++ b/lib/core/model/pharmacies/order_detail.dart @@ -0,0 +1,292 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/BillingAddress.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Customer.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCart.dart'; + +class OrderDetailModel { + String? id; + int? storeId; + String? orderGuid; + bool? pickUpInStore; + String? paymentMethodSystemName; + String? paymentName; + String? paymentNamen; + String? customerCurrencyCode; + dynamic currencyRate; + dynamic customerTaxDisplayTypeId; + dynamic vatNumber; + double? orderSubtotalInclTax; + double? orderSubtotalExclTax; + dynamic orderSubTotalDiscountInclTax; + dynamic orderSubTotalDiscountExclTax; + double? orderShippingInclTax; + dynamic orderShippingExclTax; + dynamic paymentMethodAdditionalFeeInclTax; + dynamic paymentMethodAdditionalFeeExclTax; + String? taxRates; + double? orderTax; + dynamic orderDiscount; + dynamic productCount; + dynamic orderTotal; + dynamic refundedAmount; + dynamic rewardPointsWereAdded; + dynamic rxAttachments; + String? checkoutAttributeDescription; + int? customerLanguageId; + int? affiliateId; + String? customerIp; + dynamic authorizationTransactionId; + dynamic authorizationTransactionCode; + dynamic authorizationTransactionResult; + dynamic captureTransactionId; + dynamic captureTransactionResult; + dynamic subscriptionTransactionId; + dynamic paidDateUtc; + String? shippingMethod; + String? shippingRateComputationMethodSystemName; + String? customValuesXml; + bool? deleted; + String? createdOnUtc; + Customer? customer; + int? customerId; + BillingAddress? billingAddress; + BillingAddress? shippingAddress; + List? orderItems; + int? orderStatusId; + String? orderStatus; + String? orderStatusn; + int? paymentStatusId; + String? paymentStatus; + String? paymentStatusn; + String? shippingStatus; + String? shippingStatusn; + String? customerTaxDisplayType; + bool? canCancel; + bool? canRefund; + dynamic lakumAmount; + String? preferDeliveryDate; + String? preferDeliveryTime; + String? preferDeliveryTimen; + String? driverOTP; + String? driverID; + + OrderDetailModel({ + this.id, + this.storeId, + this.orderGuid, + this.pickUpInStore, + this.paymentMethodSystemName, + this.paymentName, + this.paymentNamen, + this.customerCurrencyCode, + this.currencyRate, + this.customerTaxDisplayTypeId, + this.vatNumber, + this.orderSubtotalInclTax, + this.orderSubtotalExclTax, + this.orderSubTotalDiscountInclTax, + this.orderSubTotalDiscountExclTax, + this.orderShippingInclTax, + this.orderShippingExclTax, + this.paymentMethodAdditionalFeeInclTax, + this.paymentMethodAdditionalFeeExclTax, + this.taxRates, + this.orderTax, + this.orderDiscount, + this.productCount, + this.orderTotal, + this.refundedAmount, + this.rewardPointsWereAdded, + this.rxAttachments, + this.checkoutAttributeDescription, + this.customerLanguageId, + this.affiliateId, + this.customerIp, + this.authorizationTransactionId, + this.authorizationTransactionCode, + this.authorizationTransactionResult, + this.captureTransactionId, + this.captureTransactionResult, + this.subscriptionTransactionId, + this.paidDateUtc, + this.shippingMethod, + this.shippingRateComputationMethodSystemName, + this.customValuesXml, + this.deleted, + this.createdOnUtc, + this.customer, + this.customerId, + this.billingAddress, + this.shippingAddress, + this.orderItems, + this.orderStatusId, + this.orderStatus, + this.orderStatusn, + this.paymentStatusId, + this.paymentStatus, + this.paymentStatusn, + this.shippingStatus, + this.shippingStatusn, + this.customerTaxDisplayType, + this.canCancel, + this.canRefund, + this.lakumAmount, + this.preferDeliveryDate, + this.preferDeliveryTime, + this.preferDeliveryTimen, + this.driverID, + this.driverOTP, + }); + + OrderDetailModel.fromJson(Map json) { + id = json['id']; + storeId = json['store_id']; + orderGuid = json['order_guid']; + pickUpInStore = json['pick_up_in_store']; + paymentMethodSystemName = json['payment_method_system_name']; + paymentName = json['payment_name']; + paymentNamen = json['payment_namen']; + customerCurrencyCode = json['customer_currency_code']; + currencyRate = json['currency_rate']; + customerTaxDisplayTypeId = json['customer_tax_display_type_id']; + vatNumber = json['vat_number']; + orderSubtotalInclTax = json['order_subtotal_incl_tax']; + orderSubtotalExclTax = json['order_subtotal_excl_tax']; + orderSubTotalDiscountInclTax = json['order_sub_total_discount_incl_tax']; + orderSubTotalDiscountExclTax = json['order_sub_total_discount_excl_tax']; + orderShippingInclTax = json['order_shipping_incl_tax']; + orderShippingExclTax = json['order_shipping_excl_tax']; + paymentMethodAdditionalFeeInclTax = json['payment_method_additional_fee_incl_tax']; + paymentMethodAdditionalFeeExclTax = json['payment_method_additional_fee_excl_tax']; + taxRates = json['tax_rates']; + orderTax = json['order_tax']; + orderDiscount = json['order_discount']; + productCount = json['product_count']; + orderTotal = json['order_total']; + refundedAmount = json['refunded_amount']; + rewardPointsWereAdded = json['reward_points_were_added']; + rxAttachments = json['rx_attachments']; + checkoutAttributeDescription = json['checkout_attribute_description']; + customerLanguageId = json['customer_language_id']; + affiliateId = json['affiliate_id']; + customerIp = json['customer_ip']; + authorizationTransactionId = json['authorization_transaction_id']; + authorizationTransactionCode = json['authorization_transaction_code']; + authorizationTransactionResult = json['authorization_transaction_result']; + captureTransactionId = json['capture_transaction_id']; + captureTransactionResult = json['capture_transaction_result']; + subscriptionTransactionId = json['subscription_transaction_id']; + paidDateUtc = json['paid_date_utc']; + shippingMethod = json['shipping_method']; + shippingRateComputationMethodSystemName = json['shipping_rate_computation_method_system_name']; + customValuesXml = json['custom_values_xml']; + deleted = json['deleted']; + createdOnUtc = json['created_on_utc']; + customer = json['customer'] != null ? new Customer.fromJson(json['customer']) : null; + customerId = json['customer_id']; + billingAddress = json['billing_address'] != null ? new BillingAddress.fromJson(json['billing_address']) : null; + shippingAddress = json['shipping_address'] != null ? new BillingAddress.fromJson(json['shipping_address']) : null; + if (json['order_items'] != null) { + orderItems = []; + json['order_items'].forEach((v) { + orderItems!.add(new ShoppingCart.fromJson(v)); + }); + } + orderStatusId = json['order_status_id']; + orderStatus = json['order_status']; + orderStatusn = json['order_statusn']; + paymentStatusId = json['payment_status_id']; + paymentStatus = json['payment_status']; + paymentStatusn = json['payment_statusn']; + shippingStatus = json['shipping_status']; + shippingStatusn = json['shipping_statusn']; + customerTaxDisplayType = json['customer_tax_display_type']; + canCancel = json['can_cancel']; + canRefund = json['can_refund']; + lakumAmount = json['lakum_amount']; + preferDeliveryDate = json['prefer_delivery_date']; + preferDeliveryTime = json['prefer_delivery_time']; + preferDeliveryTimen = json['prefer_delivery_timen']; + + // Driver Detail + driverID: + json["DriverID"]; + driverOTP: + json["DriverOTP"]; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['store_id'] = this.storeId; + data['order_guid'] = this.orderGuid; + data['pick_up_in_store'] = this.pickUpInStore; + data['payment_method_system_name'] = this.paymentMethodSystemName; + data['payment_name'] = this.paymentName; + data['payment_namen'] = this.paymentNamen; + data['customer_currency_code'] = this.customerCurrencyCode; + data['currency_rate'] = this.currencyRate; + data['customer_tax_display_type_id'] = this.customerTaxDisplayTypeId; + data['vat_number'] = this.vatNumber; + data['order_subtotal_incl_tax'] = this.orderSubtotalInclTax; + data['order_subtotal_excl_tax'] = this.orderSubtotalExclTax; + data['order_sub_total_discount_incl_tax'] = this.orderSubTotalDiscountInclTax; + data['order_sub_total_discount_excl_tax'] = this.orderSubTotalDiscountExclTax; + data['order_shipping_incl_tax'] = this.orderShippingInclTax; + data['order_shipping_excl_tax'] = this.orderShippingExclTax; + data['payment_method_additional_fee_incl_tax'] = this.paymentMethodAdditionalFeeInclTax; + data['payment_method_additional_fee_excl_tax'] = this.paymentMethodAdditionalFeeExclTax; + data['tax_rates'] = this.taxRates; + data['order_tax'] = this.orderTax; + data['order_discount'] = this.orderDiscount; + data['product_count'] = this.productCount; + data['order_total'] = this.orderTotal; + data['refunded_amount'] = this.refundedAmount; + data['reward_points_were_added'] = this.rewardPointsWereAdded; + data['rx_attachments'] = this.rxAttachments; + data['checkout_attribute_description'] = this.checkoutAttributeDescription; + data['customer_language_id'] = this.customerLanguageId; + data['affiliate_id'] = this.affiliateId; + data['customer_ip'] = this.customerIp; + data['authorization_transaction_id'] = this.authorizationTransactionId; + data['authorization_transaction_code'] = this.authorizationTransactionCode; + data['authorization_transaction_result'] = this.authorizationTransactionResult; + data['capture_transaction_id'] = this.captureTransactionId; + data['capture_transaction_result'] = this.captureTransactionResult; + data['subscription_transaction_id'] = this.subscriptionTransactionId; + data['paid_date_utc'] = this.paidDateUtc; + data['shipping_method'] = this.shippingMethod; + data['shipping_rate_computation_method_system_name'] = this.shippingRateComputationMethodSystemName; + data['custom_values_xml'] = this.customValuesXml; + data['deleted'] = this.deleted; + data['created_on_utc'] = this.createdOnUtc; + if (this.customer != null) { + data['customer'] = this.customer!.toJson(); + } + data['customer_id'] = this.customerId; + if (this.billingAddress != null) { + data['billing_address'] = this.billingAddress!.toJson(); + } + if (this.shippingAddress != null) { + data['shipping_address'] = this.shippingAddress!.toJson(); + } + if (this.orderItems != null) { + data['order_items'] = this.orderItems!.map((v) => v.toJson()).toList(); + } + data['order_status_id'] = this.orderStatusId; + data['order_status'] = this.orderStatus; + data['order_statusn'] = this.orderStatusn; + data['payment_status_id'] = this.paymentStatusId; + data['payment_status'] = this.paymentStatus; + data['payment_statusn'] = this.paymentStatusn; + data['shipping_status'] = this.shippingStatus; + data['shipping_statusn'] = this.shippingStatusn; + data['customer_tax_display_type'] = this.customerTaxDisplayType; + data['can_cancel'] = this.canCancel; + data['can_refund'] = this.canRefund; + data['lakum_amount'] = this.lakumAmount; + data['prefer_delivery_date'] = this.preferDeliveryDate; + data['prefer_delivery_time'] = this.preferDeliveryTime; + data['prefer_delivery_timen'] = this.preferDeliveryTimen; + return data; + } +} diff --git a/lib/core/model/pharmacies/order_model.dart b/lib/core/model/pharmacies/order_model.dart new file mode 100644 index 00000000..005d9337 --- /dev/null +++ b/lib/core/model/pharmacies/order_model.dart @@ -0,0 +1,1453 @@ +import 'dart:convert'; + +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; + +List orderModelFromJson(String str) => List.from(json.decode(str).map((x) => OrderModel.fromJson(x))); + +String orderModelToJson(List data) => json.encode(List.from(data.map((x) => x.toJson()))); + +class OrderModel { + String? id; + dynamic storeId; + String? orderGuid; + bool? pickUpInStore; + PaymentMethodSystemName? paymentMethodSystemName; + PaymentName? paymentName; + PaymentName? paymentNamen; + CustomerCurrencyCode? customerCurrencyCode; + dynamic currencyRate; + dynamic customerTaxDisplayTypeId; + dynamic vatNumber; + double? orderSubtotalInclTax; + double? orderSubtotalExclTax; + dynamic orderSubTotalDiscountInclTax; + dynamic orderSubTotalDiscountExclTax; + double? orderShippingInclTax; + dynamic orderShippingExclTax; + dynamic paymentMethodAdditionalFeeInclTax; + dynamic paymentMethodAdditionalFeeExclTax; + String? taxRates; + double? orderTax; + dynamic orderDiscount; + dynamic productCount; + double? orderTotal; + dynamic refundedAmount; + dynamic rewardPointsWereAdded; + String? rxAttachments; + CheckoutAttributeDescription? checkoutAttributeDescription; + dynamic customerLanguageId; + dynamic affiliateId; + CustomerIp? customerIp; + String? authorizationTransactionId; + dynamic authorizationTransactionCode; + dynamic authorizationTransactionResult; + dynamic captureTransactionId; + dynamic captureTransactionResult; + dynamic subscriptionTransactionId; + DateTime? paidDateUtc; + ShippingMethod? shippingMethod; + ShippingRateComputationMethodSystemName? shippingRateComputationMethodSystemName; + String? customValuesXml; + bool? deleted; + DateTime? createdOnUtc; + OrderModelCustomer? customer; + dynamic customerId; + IngAddress? billingAddress; + IngAddress? shippingAddress; + List? orderItems; + dynamic orderStatusId; + OrderStatus? orderStatus; + OrderStatusn? orderStatusn; + dynamic paymentStatusId; + PaymentStatus? paymentStatus; + PaymentStatusn? paymentStatusn; + ShippingStatus? shippingStatus; + ShippingStatusn? shippingStatusn; + CustomerTaxDisplayType? customerTaxDisplayType; + bool? canCancel; + bool? canRefund; + dynamic lakumAmount; + DateTime? preferDeliveryDate; + PreferDeliveryTime? preferDeliveryTime; + PreferDeliveryTimen? preferDeliveryTimen; + String? driverOTP; + String? driverID; + + OrderModel({ + this.id, + this.storeId, + this.orderGuid, + this.pickUpInStore, + this.paymentMethodSystemName, + this.paymentName, + this.paymentNamen, + this.customerCurrencyCode, + this.currencyRate, + this.customerTaxDisplayTypeId, + this.vatNumber, + this.orderSubtotalInclTax, + this.orderSubtotalExclTax, + this.orderSubTotalDiscountInclTax, + this.orderSubTotalDiscountExclTax, + this.orderShippingInclTax, + this.orderShippingExclTax, + this.paymentMethodAdditionalFeeInclTax, + this.paymentMethodAdditionalFeeExclTax, + this.taxRates, + this.orderTax, + this.orderDiscount, + this.productCount, + this.orderTotal, + this.refundedAmount, + this.rewardPointsWereAdded, + this.rxAttachments, + this.checkoutAttributeDescription, + this.customerLanguageId, + this.affiliateId, + this.customerIp, + this.authorizationTransactionId, + this.authorizationTransactionCode, + this.authorizationTransactionResult, + this.captureTransactionId, + this.captureTransactionResult, + this.subscriptionTransactionId, + this.paidDateUtc, + this.shippingMethod, + this.shippingRateComputationMethodSystemName, + this.customValuesXml, + this.deleted, + this.createdOnUtc, + this.customer, + this.customerId, + this.billingAddress, + this.shippingAddress, + this.orderItems, + this.orderStatusId, + this.orderStatus, + this.orderStatusn, + this.paymentStatusId, + this.paymentStatus, + this.paymentStatusn, + this.shippingStatus, + this.shippingStatusn, + this.customerTaxDisplayType, + this.canCancel, + this.canRefund, + this.lakumAmount, + this.preferDeliveryDate, + this.preferDeliveryTime, + this.preferDeliveryTimen, + this.driverID, + this.driverOTP, + }); + + factory OrderModel.fromJson(Map json) => OrderModel( + id: json["id"], + storeId: json["store_id"], + orderGuid: json["order_guid"], + pickUpInStore: json["pick_up_in_store"], + paymentMethodSystemName: paymentMethodSystemNameValues.map![json["payment_method_system_name"]], + paymentName: paymentNameValues.map![json["payment_name"]], + paymentNamen: paymentNameValues.map![json["payment_namen"]], + customerCurrencyCode: customerCurrencyCodeValues.map![json["customer_currency_code"]], + currencyRate: json["currency_rate"], + customerTaxDisplayTypeId: json["customer_tax_display_type_id"], + vatNumber: json["vat_number"], + orderSubtotalInclTax: json["order_subtotal_incl_tax"].toDouble(), + orderSubtotalExclTax: json["order_subtotal_excl_tax"].toDouble(), + orderSubTotalDiscountInclTax: json["order_sub_total_discount_incl_tax"], + orderSubTotalDiscountExclTax: json["order_sub_total_discount_excl_tax"], + orderShippingInclTax: json["order_shipping_incl_tax"].toDouble(), + orderShippingExclTax: json["order_shipping_excl_tax"], + paymentMethodAdditionalFeeInclTax: json["payment_method_additional_fee_incl_tax"], + paymentMethodAdditionalFeeExclTax: json["payment_method_additional_fee_excl_tax"], + taxRates: json["tax_rates"], + orderTax: json["order_tax"].toDouble(), + orderDiscount: json["order_discount"], + productCount: json["product_count"], + orderTotal: json["order_total"].toDouble(), + refundedAmount: json["refunded_amount"], + rewardPointsWereAdded: json["reward_points_were_added"], + rxAttachments: json["rx_attachments"] == null ? null : json["rx_attachments"], + checkoutAttributeDescription: checkoutAttributeDescriptionValues.map![json["checkout_attribute_description"]], + customerLanguageId: json["customer_language_id"], + affiliateId: json["affiliate_id"], + customerIp: customerIpValues.map![json["customer_ip"]], + authorizationTransactionId: json["authorization_transaction_id"] == null ? null : json["authorization_transaction_id"], + authorizationTransactionCode: json["authorization_transaction_code"], + authorizationTransactionResult: json["authorization_transaction_result"], + captureTransactionId: json["capture_transaction_id"], + captureTransactionResult: json["capture_transaction_result"], + subscriptionTransactionId: json["subscription_transaction_id"], + paidDateUtc: json["paid_date_utc"] == null ? null : DateTime.parse(json["paid_date_utc"]), + shippingMethod: shippingMethodValues.map![json["shipping_method"]], + shippingRateComputationMethodSystemName: shippingRateComputationMethodSystemNameValues.map![json["shipping_rate_computation_method_system_name"]], + customValuesXml: json["custom_values_xml"], + deleted: json["deleted"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + customer: OrderModelCustomer.fromJson(json["customer"]), + customerId: json["customer_id"], + billingAddress: IngAddress.fromJson(json["billing_address"]), + shippingAddress: IngAddress.fromJson(json["shipping_address"]), + orderItems: List.from(json["order_items"].map((x) => OrderItem.fromJson(x))), + orderStatusId: json["order_status_id"], + orderStatus: orderStatusValues.map![json["order_status"]], + orderStatusn: orderStatusnValues.map![json["order_statusn"]], + paymentStatusId: json["payment_status_id"], + paymentStatus: paymentStatusValues.map![json["payment_status"]], + paymentStatusn: paymentStatusnValues.map![json["payment_statusn"]], + shippingStatus: shippingStatusValues.map![json["shipping_status"]], + shippingStatusn: shippingStatusnValues.map![json["shipping_statusn"]], + customerTaxDisplayType: customerTaxDisplayTypeValues.map![json["customer_tax_display_type"]], + canCancel: json["can_cancel"], + canRefund: json["can_refund"], + lakumAmount: json["lakum_amount"], + preferDeliveryDate: json["prefer_delivery_date"] == null ? null : DateTime.parse(json["prefer_delivery_date"]), + preferDeliveryTime: json["prefer_delivery_time"] == null ? null : preferDeliveryTimeValues.map![json["prefer_delivery_time"]], + preferDeliveryTimen: json["prefer_delivery_timen"] == null ? null : preferDeliveryTimenValues.map![json["prefer_delivery_timen"]], + + // Driver Detail + driverID: json["DriverID"], + driverOTP: json["DriverOTP"], + ); + + Map toJson() => { + "id": id, + "store_id": storeId, + "order_guid": orderGuid, + "pick_up_in_store": pickUpInStore, + "payment_method_system_name": paymentMethodSystemNameValues.reverse[paymentMethodSystemName], + "payment_name": paymentNameValues.reverse[paymentName], + "payment_namen": paymentNameValues.reverse[paymentNamen], + "customer_currency_code": customerCurrencyCodeValues.reverse[customerCurrencyCode], + "currency_rate": currencyRate, + "customer_tax_display_type_id": customerTaxDisplayTypeId, + "vat_number": vatNumber, + "order_subtotal_incl_tax": orderSubtotalInclTax, + "order_subtotal_excl_tax": orderSubtotalExclTax, + "order_sub_total_discount_incl_tax": orderSubTotalDiscountInclTax, + "order_sub_total_discount_excl_tax": orderSubTotalDiscountExclTax, + "order_shipping_incl_tax": orderShippingInclTax, + "order_shipping_excl_tax": orderShippingExclTax, + "payment_method_additional_fee_incl_tax": paymentMethodAdditionalFeeInclTax, + "payment_method_additional_fee_excl_tax": paymentMethodAdditionalFeeExclTax, + "tax_rates": taxRates, + "order_tax": orderTax, + "order_discount": orderDiscount, + "order_total": orderTotal, + "refunded_amount": refundedAmount, + "reward_points_were_added": rewardPointsWereAdded, + "rx_attachments": rxAttachments == null ? null : rxAttachments, + "checkout_attribute_description": checkoutAttributeDescriptionValues.reverse[checkoutAttributeDescription], + "customer_language_id": customerLanguageId, + "affiliate_id": affiliateId, + "customer_ip": customerIpValues.reverse[customerIp], + "authorization_transaction_id": authorizationTransactionId == null ? null : authorizationTransactionId, + "authorization_transaction_code": authorizationTransactionCode, + "authorization_transaction_result": authorizationTransactionResult, + "capture_transaction_id": captureTransactionId, + "capture_transaction_result": captureTransactionResult, + "subscription_transaction_id": subscriptionTransactionId, + "paid_date_utc": paidDateUtc == null ? null : paidDateUtc!.toIso8601String(), + "shipping_method": shippingMethodValues.reverse[shippingMethod], + "shipping_rate_computation_method_system_name": shippingRateComputationMethodSystemNameValues.reverse[shippingRateComputationMethodSystemName], + "custom_values_xml": customValuesXml, + "deleted": deleted, + "created_on_utc": createdOnUtc!.toIso8601String(), + "customer": customer!.toJson(), + "customer_id": customerId, + "billing_address": billingAddress!.toJson(), + "shipping_address": shippingAddress!.toJson(), + "order_items": List.from(orderItems!.map((x) => x.toJson())), + "order_status_id": orderStatusId, + "order_status": orderStatusValues.reverse[orderStatus], + "order_statusn": orderStatusnValues.reverse[orderStatusn], + "payment_status_id": paymentStatusId, + "payment_status": paymentStatusValues.reverse[paymentStatus], + "payment_statusn": paymentStatusnValues.reverse[paymentStatusn], + "shipping_status": shippingStatusValues.reverse[shippingStatus], + "shipping_statusn": shippingStatusnValues.reverse[shippingStatusn], + "customer_tax_display_type": customerTaxDisplayTypeValues.reverse[customerTaxDisplayType], + "can_cancel": canCancel, + "can_refund": canRefund, + "lakum_amount": lakumAmount, + "prefer_delivery_date": preferDeliveryDate == null + ? null + : "${preferDeliveryDate!.year.toString().padLeft(4, '0')}-${preferDeliveryDate!.month.toString().padLeft(2, '0')}-${preferDeliveryDate!.day.toString().padLeft(2, '0')}", + "prefer_delivery_time": preferDeliveryTime == null ? null : preferDeliveryTimeValues.reverse[preferDeliveryTime], + "prefer_delivery_timen": preferDeliveryTimen == null ? null : preferDeliveryTimenValues.reverse[preferDeliveryTimen], + }; +} + +class IngAddress { + IngAddress({ + this.id, + this.firstName, + this.lastName, + this.email, + this.company, + this.countryId, + this.country, + this.stateProvinceId, + this.city, + this.address1, + this.address2, + this.zipPostalCode, + this.phoneNumber, + this.faxNumber, + this.customerAttributes, + this.createdOnUtc, + this.province, + this.latLong, + }); + + String? id; + FirstName? firstName; + LastName? lastName; + BillingAddressEmail? email; + dynamic company; + dynamic countryId; + Country? country; + dynamic stateProvinceId; + City? city; + Address1? address1; + Address2? address2; + String? zipPostalCode; + String? phoneNumber; + dynamic faxNumber; + String? customerAttributes; + DateTime? createdOnUtc; + dynamic province; + String? latLong; + + LatLng getLocation() { + if (latLong!.contains(',')) { + var parts = latLong!.trim().split(','); + if (parts.length == 2) { + var lat = double.tryParse(parts.first); + var lng = double.tryParse(parts.last); + if (lat != null || lng != null) { + var location = LatLng(lat!, lng!); + return location; + } + } + } + return LatLng(double.nan, double.nan); + //changed by Aamir + } + + factory IngAddress.fromJson(Map json) => IngAddress( + id: json["id"], + firstName: firstNameValues.map![json["first_name"]], + lastName: lastNameValues.map![json["last_name"]], + email: billingAddressEmailValues.map![json["email"]], + company: json["company"], + countryId: json["country_id"], + country: countryValues.map![json["country"]], + stateProvinceId: json["state_province_id"], + city: cityValues.map![json["city"]], + address1: address1Values.map![json["address1"]], + address2: address2Values.map![json["address2"]], + zipPostalCode: json["zip_postal_code"], + phoneNumber: json["phone_number"], + faxNumber: json["fax_number"], + customerAttributes: json["customer_attributes"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + province: json["province"], + latLong: json["lat_long"], + ); + + Map toJson() => { + "id": id, + "first_name": firstNameValues.reverse[firstName], + "last_name": lastNameValues.reverse[lastName], + "email": billingAddressEmailValues.reverse[email], + "company": company, + "country_id": countryId, + "country": countryValues.reverse[country], + "state_province_id": stateProvinceId, + "city": cityValues.reverse[city], + "address1": address1Values.reverse[address1], + "address2": address2Values.reverse[address2], + "zip_postal_code": zipPostalCode, + "phone_number": phoneNumber, + "fax_number": faxNumber, + "customer_attributes": customerAttributes, + "created_on_utc": createdOnUtc!.toIso8601String(), + "province": province, + "lat_long": latLong, + }; +} + +enum Address1 { + THE_7960_MOSAB_IBN_UMAIR_STREET_AL_RIYADH, + THE_6500_AL_AMEEN_ABDULLAH_AL_ALI_AL_NAEEM_STREET_AL_RIYADH, + THE_6603_IBRAHIM_IBN_AL_HAMASI_AR_RIYAD, + THE_9626_SALAH_AD_DIN_AL_AYYUBI_ROAD_AL_RIYADH, + THE_3075_PRINCE_MANSUR_BIN_ABDULAZIZ_STREET_AL_RIYADH, + THE_40, + THE_7801_AL_IHSA_AL_RIYADH +} + +final address1Values = EnumValues({ + "3075, Prince Mansur Bin Abdulaziz Street, Al Riyadh, ": Address1.THE_3075_PRINCE_MANSUR_BIN_ABDULAZIZ_STREET_AL_RIYADH, + "40,": Address1.THE_40, + "6500, Al Ameen Abdullah Al Ali Al Naeem Street, Al Riyadh, ": Address1.THE_6500_AL_AMEEN_ABDULLAH_AL_ALI_AL_NAEEM_STREET_AL_RIYADH, + "6603, Ibrahim Ibn Al Hamasi, Ar-Riyad, ": Address1.THE_6603_IBRAHIM_IBN_AL_HAMASI_AR_RIYAD, + "7801, Al Ihsa, Al Riyadh, ": Address1.THE_7801_AL_IHSA_AL_RIYADH, + "7960, Mosab Ibn Umair Street, Al Riyadh, ": Address1.THE_7960_MOSAB_IBN_UMAIR_STREET_AL_RIYADH, + "9626, Salah Ad Din Al Ayyubi Road, Al Riyadh, ": Address1.THE_9626_SALAH_AD_DIN_AL_AYYUBI_ROAD_AL_RIYADH +}); + +enum Address2 { + AL_MALAZ_RIYADH_PROVINCE_3460, + AL_MALAZ_RIYADH_PROVINCE_2817, + AR_RAHMANIYYAH_RIYADH_PROVINCE_3816, + AL_MALAZ_RIYADH_PROVINCE_3815, + AL_WIZARAT_RIYADH_PROVINCE_7039, + EASTERN_PROVINCE, + AL_MALAZ_RIYADH_PROVINCE_3084 +} + +final address2Values = EnumValues({ + "Al Malaz, Riyadh Province, 2817, ": Address2.AL_MALAZ_RIYADH_PROVINCE_2817, + "Al Malaz, Riyadh Province, 3084, ": Address2.AL_MALAZ_RIYADH_PROVINCE_3084, + "Al Malaz, Riyadh Province, 3460, ": Address2.AL_MALAZ_RIYADH_PROVINCE_3460, + "Al Malaz, Riyadh Province, 3815, ": Address2.AL_MALAZ_RIYADH_PROVINCE_3815, + "Al Wizarat, Riyadh Province, 7039, ": Address2.AL_WIZARAT_RIYADH_PROVINCE_7039, + "Ar Rahmaniyyah, Riyadh Province, 3816, ": Address2.AR_RAHMANIYYAH_RIYADH_PROVINCE_3816, + "Eastern Province,": Address2.EASTERN_PROVINCE +}); + +enum City { RIYADH, DAMMAM } + +final cityValues = EnumValues({"Dammam": City.DAMMAM, "Riyadh": City.RIYADH}); + +enum Country { SAUDI_ARABIA } + +final countryValues = EnumValues({"Saudi Arabia": Country.SAUDI_ARABIA}); + +enum BillingAddressEmail { TAMER_FANASHEH_GMAIL_COM, TAMER_DASDASDAS_GMAIL_COM, TAMER_FANASHEH_DRSULAIMANALHABIB_COM } + +final billingAddressEmailValues = EnumValues({ + "Tamer.dasdasdas@gmail.com": BillingAddressEmail.TAMER_DASDASDAS_GMAIL_COM, + "tamer.fanasheh@drsulaimanalhabib.com": BillingAddressEmail.TAMER_FANASHEH_DRSULAIMANALHABIB_COM, + "Tamer.fanasheh@gmail.com": BillingAddressEmail.TAMER_FANASHEH_GMAIL_COM +}); + +enum FirstName { TAMER, TAMER_FANASHEH, FIRST_NAME_TAMER } + +final firstNameValues = EnumValues({"tamer": FirstName.FIRST_NAME_TAMER, "TAMER": FirstName.TAMER, "TAMER FANASHEH": FirstName.TAMER_FANASHEH}); + +enum LastName { FANASHEH, MUSA, LAST_NAME_FANASHEH } + +final lastNameValues = EnumValues({"FANASHEH": LastName.FANASHEH, "Fanasheh": LastName.LAST_NAME_FANASHEH, "MUSA": LastName.MUSA}); + +enum LatLong { + THE_246784385694919524674091019299842, + THE_24664749106968054673501121876645, + THE_2470993657522702246664724647270134, + THE_246626170308533764673348444086107, + THE_24664875225999005467347443322574, + THE_24674331807435784671024726818286, + THE_263430228396836664991113909164471, + THE_246767400793488074673774399406786, + THE_24665374673515 +} + +final latLongValues = EnumValues({ + "24.662617030853376,46.73348444086107": LatLong.THE_246626170308533764673348444086107, + "24.66474910696805,46.73501121876645": LatLong.THE_24664749106968054673501121876645, + "24.664875225999005,46.7347443322574": LatLong.THE_24664875225999005467347443322574, + "24.66537,46.73515": LatLong.THE_24665374673515, + "24.67433180743578,46.71024726818286": LatLong.THE_24674331807435784671024726818286, + "24.676740079348807,46.73774399406786": LatLong.THE_246767400793488074673774399406786, + "24.678438569491952,46.74091019299842": LatLong.THE_246784385694919524674091019299842, + "24.709936575227022,46.664724647270134": LatLong.THE_2470993657522702246664724647270134, + "26.343022839683666, 49.91113909164471": LatLong.THE_263430228396836664991113909164471 +}); + +enum CheckoutAttributeDescription { EMPTY, CHECKOUT_ATTRIBUTE_DESCRIPTION } + +final checkoutAttributeDescriptionValues = EnumValues({"ارفاق وصفة: ": CheckoutAttributeDescription.CHECKOUT_ATTRIBUTE_DESCRIPTION, "": CheckoutAttributeDescription.EMPTY}); + +class OrderModelCustomer { + OrderModelCustomer({ + this.id, + this.username, + this.email, + this.firstName, + this.lastName, + this.languageId, + this.adminComment, + this.isTaxExempt, + this.hasShoppingCartItems, + this.active, + this.deleted, + this.isSystemAccount, + this.systemName, + this.lastIpAddress, + this.createdOnUtc, + this.lastLoginDateUtc, + this.lastActivityDateUtc, + this.registeredInStoreId, + this.roleIds, + }); + + String? id; + dynamic username; + dynamic email; + dynamic firstName; + dynamic lastName; + String? languageId; + dynamic adminComment; + bool? isTaxExempt; + bool? hasShoppingCartItems; + bool? active; + bool? deleted; + bool? isSystemAccount; + dynamic systemName; + dynamic lastIpAddress; + dynamic createdOnUtc; + dynamic lastLoginDateUtc; + dynamic lastActivityDateUtc; + dynamic registeredInStoreId; + List? roleIds; + + factory OrderModelCustomer.fromJson(Map json) => OrderModelCustomer( + id: json["id"], + username: usernameValues.map![json["username"]], + email: billingAddressEmailValues.map![json["email"]], + firstName: firstNameValues.map![json["first_name"]], + lastName: lastNameValues.map![json["last_name"]], + languageId: json["language_id"], + adminComment: json["admin_comment"], + isTaxExempt: json["is_tax_exempt"], + hasShoppingCartItems: json["has_shopping_cart_items"], + active: json["active"], + deleted: json["deleted"], + isSystemAccount: json["is_system_account"], + systemName: json["system_name"], + lastIpAddress: lastIpAddressValues.map![json["last_ip_address"]], + createdOnUtc: (json["created_on_utc"] != null) ? DateTime.parse(json["created_on_utc"]) : null, + lastLoginDateUtc: (json["created_on_utc"] != null) ? DateTime.parse(json["last_login_date_utc"]) : null, + lastActivityDateUtc: (json["created_on_utc"] != null) ? DateTime.parse(json["last_activity_date_utc"]) : null, + registeredInStoreId: json["registered_in_store_id"], + roleIds: List.from(json["role_ids"].map((x) => x)), + ); + + Map toJson() => { + "id": id, + "username": usernameValues.reverse[username], + "email": billingAddressEmailValues.reverse[email], + "first_name": firstNameValues.reverse[firstName], + "last_name": lastNameValues.reverse[lastName], + "language_id": languageId, + "admin_comment": adminComment, + "is_tax_exempt": isTaxExempt, + "has_shopping_cart_items": hasShoppingCartItems, + "active": active, + "deleted": deleted, + "is_system_account": isSystemAccount, + "system_name": systemName, + "last_ip_address": lastIpAddressValues.reverse[lastIpAddress], + "created_on_utc": createdOnUtc.toIso8601String(), + "last_login_date_utc": lastLoginDateUtc.toIso8601String(), + "last_activity_date_utc": lastActivityDateUtc.toIso8601String(), + "registered_in_store_id": registeredInStoreId, + "role_ids": List.from(roleIds!.map((x) => x)), + }; +} + +enum LastIpAddress { THE_1050220126 } + +final lastIpAddressValues = EnumValues({"10.50.220.126": LastIpAddress.THE_1050220126}); + +enum Username { TAMERF } + +final usernameValues = EnumValues({"tamerf": Username.TAMERF}); + +enum CustomerCurrencyCode { SAR } + +final customerCurrencyCodeValues = EnumValues({"SAR": CustomerCurrencyCode.SAR}); + +enum CustomerIp { THE_105010210, THE_127001, THE_1020200101, THE_102020041, THE_10501028, THE_102020033, THE_1020200170, THE_102020011 } + +final customerIpValues = EnumValues({ + "10.20.200.101": CustomerIp.THE_1020200101, + "10.20.200.11": CustomerIp.THE_102020011, + "10.20.200.170": CustomerIp.THE_1020200170, + "10.20.200.33": CustomerIp.THE_102020033, + "10.20.200.41": CustomerIp.THE_102020041, + "10.50.102.10": CustomerIp.THE_105010210, + "10.50.102.8": CustomerIp.THE_10501028, + "127.0.0.1": CustomerIp.THE_127001 +}); + +enum CustomerTaxDisplayType { EXCLUDING_TAX } + +final customerTaxDisplayTypeValues = EnumValues({"ExcludingTax": CustomerTaxDisplayType.EXCLUDING_TAX}); + +class OrderItem { + OrderItem({ + this.quantity, + this.unitPriceInclTax, + this.unitPriceExclTax, + this.priceInclTax, + this.priceExclTax, + this.discountAmountInclTax, + this.discountAmountExclTax, + this.originalProductCost, + this.attributeDescription, + this.downloadCount, + this.isDownloadActivated, + this.licenseDownloadId, + this.itemWeight, + this.rentalStartDateUtc, + this.rentalEndDateUtc, + this.product, + this.productId, + }); + + dynamic quantity; + double? unitPriceInclTax; + double? unitPriceExclTax; + double? priceInclTax; + double? priceExclTax; + double? discountAmountInclTax; + double? discountAmountExclTax; + double? originalProductCost; + String? attributeDescription; + dynamic downloadCount; + bool? isDownloadActivated; + dynamic licenseDownloadId; + double? itemWeight; + dynamic rentalStartDateUtc; + dynamic rentalEndDateUtc; + Product? product; + dynamic productId; + + factory OrderItem.fromJson(Map json) => OrderItem( + quantity: json["quantity"], + unitPriceInclTax: json["unit_price_incl_tax"].toDouble(), + unitPriceExclTax: json["unit_price_excl_tax"].toDouble(), + priceInclTax: json["price_incl_tax"].toDouble(), + priceExclTax: json["price_excl_tax"].toDouble(), + discountAmountInclTax: json["discount_amount_incl_tax"].toDouble(), + discountAmountExclTax: json["discount_amount_excl_tax"].toDouble(), + originalProductCost: json["original_product_cost"].toDouble(), + attributeDescription: json["attribute_description"], + downloadCount: json["download_count"], + isDownloadActivated: json["isDownload_activated"], + licenseDownloadId: json["license_download_id"], + itemWeight: json["item_weight"].toDouble(), + rentalStartDateUtc: json["rental_start_date_utc"], + rentalEndDateUtc: json["rental_end_date_utc"], + product: Product.fromJson(json["product"]), + productId: json["product_id"], + ); + + Map toJson() => { + "quantity": quantity, + "unit_price_incl_tax": unitPriceInclTax, + "unit_price_excl_tax": unitPriceExclTax, + "price_incl_tax": priceInclTax, + "price_excl_tax": priceExclTax, + "discount_amount_incl_tax": discountAmountInclTax, + "discount_amount_excl_tax": discountAmountExclTax, + "original_product_cost": originalProductCost, + "attribute_description": attributeDescription, + "download_count": downloadCount, + "isDownload_activated": isDownloadActivated, + "license_download_id": licenseDownloadId, + "item_weight": itemWeight, + "rental_start_date_utc": rentalStartDateUtc, + "rental_end_date_utc": rentalEndDateUtc, + "product": product!.toJson(), + "product_id": productId, + }; +} + +class Product { + Product({ + this.id, + this.visibleIndividually, + this.name, + this.namen, + this.localizedNames, + this.shortDescription, + this.shortDescriptionn, + this.fullDescription, + this.fullDescriptionn, + this.markasNew, + this.showOnHomePage, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.allowCustomerReviews, + this.approvedRatingSum, + this.notApprovedRatingSum, + this.approvedTotalReviews, + this.notApprovedTotalReviews, + this.sku, + this.isRx, + this.prescriptionRequired, + this.rxMessage, + this.rxMessagen, + this.manufacturerPartNumber, + this.gtin, + this.isGiftCard, + this.requireOtherProducts, + this.automaticallyAddRequiredProducts, + this.isDownload, + this.unlimitedDownloads, + this.maxNumberOfDownloads, + this.downloadExpirationDays, + this.hasSampleDownload, + this.hasUserAgreement, + this.isRecurring, + this.recurringCycleLength, + this.recurringTotalCycles, + this.isRental, + this.rentalPriceLength, + this.isShipEnabled, + this.isFreeShipping, + this.shipSeparately, + this.additionalShippingCharge, + this.isTaxExempt, + this.isTelecommunicationsOrBroadcastingOrElectronicServices, + this.useMultipleWarehouses, + this.manageInventoryMethodId, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.displayStockAvailability, + this.displayStockQuantity, + this.minStockQuantity, + this.notifyAdminForQuantityBelow, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, + this.allowedQuantities, + this.allowAddingOnlyExistingAttributeCombinations, + this.disableBuyButton, + this.disableWishlistButton, + this.availableForPreOrder, + this.preOrderAvailabilityStartDateTimeUtc, + this.callForPrice, + this.price, + this.oldPrice, + this.productCost, + this.specialPrice, + this.specialPriceStartDateTimeUtc, + this.specialPriceEndDateTimeUtc, + this.customerEntersPrice, + this.minimumCustomerEnteredPrice, + this.maximumCustomerEnteredPrice, + this.basepriceEnabled, + this.basepriceAmount, + this.basepriceBaseAmount, + this.hasTierPrices, + this.hasDiscountsApplied, + this.discountName, + this.discountNamen, + this.discountDescription, + this.discountDescriptionn, + this.discountPercentage, + this.currency, + this.currencyn, + this.weight, + this.length, + this.width, + this.height, + this.availableStartDateTimeUtc, + this.availableEndDateTimeUtc, + this.displayOrder, + this.published, + this.deleted, + this.createdOnUtc, + this.updatedOnUtc, + this.productType, + this.parentGroupedProductId, + this.roleIds, + this.discountIds, + this.storeIds, + this.manufacturerIds, + this.reviews, + this.images, + this.attributes, + this.specifications, + this.associatedProductIds, + this.tags, + this.vendorId, + this.seName, + }); + + String? id; + bool? visibleIndividually; + String? name; + String? namen; + dynamic localizedNames; + String? shortDescription; + String? shortDescriptionn; + String? fullDescription; + String? fullDescriptionn; + bool? markasNew; + bool? showOnHomePage; + String? metaKeywords; + String? metaDescription; + String? metaTitle; + bool? allowCustomerReviews; + dynamic approvedRatingSum; + dynamic notApprovedRatingSum; + dynamic approvedTotalReviews; + dynamic notApprovedTotalReviews; + String? sku; + bool? isRx; + bool? prescriptionRequired; + dynamic rxMessage; + dynamic rxMessagen; + dynamic manufacturerPartNumber; + dynamic gtin; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; + dynamic maxNumberOfDownloads; + dynamic downloadExpirationDays; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; + dynamic recurringCycleLength; + dynamic recurringTotalCycles; + bool? isRental; + dynamic rentalPriceLength; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; + dynamic additionalShippingCharge; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; + dynamic manageInventoryMethodId; + dynamic stockQuantity; + dynamic stockAvailability; + dynamic stockAvailabilityn; + bool? displayStockAvailability; + bool? displayStockQuantity; + dynamic minStockQuantity; + dynamic notifyAdminForQuantityBelow; + bool? allowBackInStockSubscriptions; + dynamic orderMinimumQuantity; + dynamic orderMaximumQuantity; + dynamic allowedQuantities; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; + dynamic preOrderAvailabilityStartDateTimeUtc; + bool? callForPrice; + double? price; + dynamic oldPrice; + double? productCost; + dynamic specialPrice; + dynamic specialPriceStartDateTimeUtc; + dynamic specialPriceEndDateTimeUtc; + bool? customerEntersPrice; + dynamic minimumCustomerEnteredPrice; + dynamic maximumCustomerEnteredPrice; + bool? basepriceEnabled; + dynamic basepriceAmount; + dynamic basepriceBaseAmount; + bool? hasTierPrices; + bool? hasDiscountsApplied; + dynamic discountName; + dynamic discountNamen; + dynamic discountDescription; + dynamic discountDescriptionn; + dynamic discountPercentage; + dynamic currency; + dynamic currencyn; + double? weight; + dynamic length; + dynamic width; + dynamic height; + dynamic availableStartDateTimeUtc; + dynamic availableEndDateTimeUtc; + dynamic displayOrder; + bool? published; + bool? deleted; + dynamic createdOnUtc; + dynamic updatedOnUtc; + dynamic productType; + dynamic parentGroupedProductId; + dynamic roleIds; + dynamic discountIds; + dynamic storeIds; + dynamic manufacturerIds; + List? reviews; + List? images; + dynamic attributes; + dynamic specifications; + dynamic associatedProductIds; + List? tags; + dynamic vendorId; + String? seName; + + factory Product.fromJson(Map json) => Product( + id: json["id"], + visibleIndividually: json["visible_individually"], + name: json["name"], + namen: json["namen"], + localizedNames: json["localized_names"], + shortDescription: json["short_description"] == null ? null : json["short_description"], + shortDescriptionn: json["short_descriptionn"] == null ? null : json["short_descriptionn"], + fullDescription: json["full_description"], + fullDescriptionn: json["full_descriptionn"], + markasNew: json["markas_new"], + showOnHomePage: json["show_on_home_page"], + metaKeywords: json["meta_keywords"] == null ? null : json["meta_keywords"], + metaDescription: json["meta_description"] == null ? null : json["meta_description"], + metaTitle: json["meta_title"] == null ? null : json["meta_title"], + allowCustomerReviews: json["allow_customer_reviews"], + approvedRatingSum: json["approved_rating_sum"], + notApprovedRatingSum: json["not_approved_rating_sum"], + approvedTotalReviews: json["approved_total_reviews"], + notApprovedTotalReviews: json["not_approved_total_reviews"], + sku: json["sku"], + isRx: json["is_rx"], + prescriptionRequired: json["prescription_required"], + rxMessage: json["rx_message"], + rxMessagen: json["rx_messagen"], + manufacturerPartNumber: json["manufacturer_part_number"], + gtin: json["gtin"], + isGiftCard: json["is_gift_card"], + requireOtherProducts: json["require_other_products"], + automaticallyAddRequiredProducts: json["automatically_add_required_products"], + isDownload: json["is_download"], + unlimitedDownloads: json["unlimited_downloads"], + maxNumberOfDownloads: json["max_number_of_downloads"], + downloadExpirationDays: json["download_expiration_days"], + hasSampleDownload: json["has_sample_download"], + hasUserAgreement: json["has_user_agreement"], + isRecurring: json["is_recurring"], + recurringCycleLength: json["recurring_cycle_length"], + recurringTotalCycles: json["recurring_total_cycles"], + isRental: json["is_rental"], + rentalPriceLength: json["rental_price_length"], + isShipEnabled: json["is_ship_enabled"], + isFreeShipping: json["is_free_shipping"], + shipSeparately: json["ship_separately"], + additionalShippingCharge: json["additional_shipping_charge"], + isTaxExempt: json["is_tax_exempt"], + isTelecommunicationsOrBroadcastingOrElectronicServices: json["is_telecommunications_or_broadcasting_or_electronic_services"], + useMultipleWarehouses: json["use_multiple_warehouses"], + manageInventoryMethodId: json["manage_inventory_method_id"], + stockQuantity: json["stock_quantity"], + stockAvailability: json["stock_availability"], + stockAvailabilityn: json["stock_availabilityn"], + displayStockAvailability: json["display_stock_availability"], + displayStockQuantity: json["display_stock_quantity"], + minStockQuantity: json["min_stock_quantity"], + notifyAdminForQuantityBelow: json["notify_admin_for_quantity_below"], + allowBackInStockSubscriptions: json["allow_back_in_stock_subscriptions"], + orderMinimumQuantity: json["order_minimum_quantity"], + orderMaximumQuantity: json["order_maximum_quantity"], + allowedQuantities: json["allowed_quantities"], + allowAddingOnlyExistingAttributeCombinations: json["allow_adding_only_existing_attribute_combinations"], + disableBuyButton: json["disable_buy_button"], + disableWishlistButton: json["disable_wishlist_button"], + availableForPreOrder: json["available_for_pre_order"], + preOrderAvailabilityStartDateTimeUtc: json["pre_order_availability_start_date_time_utc"], + callForPrice: json["call_for_price"], + price: json["price"].toDouble(), + oldPrice: json["old_price"], + productCost: json["product_cost"].toDouble(), + specialPrice: json["special_price"], + specialPriceStartDateTimeUtc: json["special_price_start_date_time_utc"], + specialPriceEndDateTimeUtc: json["special_price_end_date_time_utc"], + customerEntersPrice: json["customer_enters_price"], + minimumCustomerEnteredPrice: json["minimum_customer_entered_price"], + maximumCustomerEnteredPrice: json["maximum_customer_entered_price"], + basepriceEnabled: json["baseprice_enabled"], + basepriceAmount: json["baseprice_amount"], + basepriceBaseAmount: json["baseprice_base_amount"], + hasTierPrices: json["has_tier_prices"], + hasDiscountsApplied: json["has_discounts_applied"], + discountName: json["discount_name"], + discountNamen: json["discount_namen"], + discountDescription: json["discount_description"], + discountDescriptionn: json["discount_Descriptionn"], + discountPercentage: json["discount_percentage"], + currency: json["currency"], + currencyn: json["currencyn"], + weight: json["weight"].toDouble(), + length: json["length"], + width: json["width"], + height: json["height"], + availableStartDateTimeUtc: json["available_start_date_time_utc"], + availableEndDateTimeUtc: json["available_end_date_time_utc"], + displayOrder: json["display_order"], + published: json["published"], + deleted: json["deleted"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + updatedOnUtc: DateTime.parse(json["updated_on_utc"]), + productType: productTypeValues.map![json["product_type"]], + parentGroupedProductId: json["parent_grouped_product_id"], + roleIds: json["role_ids"], + discountIds: json["discount_ids"], + storeIds: json["store_ids"], + manufacturerIds: json["manufacturer_ids"], + reviews: List.from(json["reviews"].map((x) => Review.fromJson(x))), + images: List.from(json["images"].map((x) => PharmacyImageObject.fromJson(x))), + attributes: json["attributes"], + specifications: json["specifications"], + associatedProductIds: json["associated_product_ids"], + tags: List.from(json["tags"].map((x) => x)), + vendorId: json["vendor_id"], + seName: json["se_name"], + ); + + Map toJson() => { + "id": id, + "visible_individually": visibleIndividually, + "name": name, + "namen": namen, + "localized_names": localizedNames, + "short_description": shortDescription == null ? null : shortDescription, + "short_descriptionn": shortDescriptionn == null ? null : shortDescriptionn, + "full_description": fullDescription, + "full_descriptionn": fullDescriptionn, + "markas_new": markasNew, + "show_on_home_page": showOnHomePage, + "meta_keywords": metaKeywords == null ? null : metaKeywords, + "meta_description": metaDescription == null ? null : metaDescription, + "meta_title": metaTitle == null ? null : metaTitle, + "allow_customer_reviews": allowCustomerReviews, + "approved_rating_sum": approvedRatingSum, + "not_approved_rating_sum": notApprovedRatingSum, + "approved_total_reviews": approvedTotalReviews, + "not_approved_total_reviews": notApprovedTotalReviews, + "sku": sku, + "is_rx": isRx, + "prescription_required": prescriptionRequired, + "rx_message": rxMessage, + "rx_messagen": rxMessagen, + "manufacturer_part_number": manufacturerPartNumber, + "gtin": gtin, + "is_gift_card": isGiftCard, + "require_other_products": requireOtherProducts, + "automatically_add_required_products": automaticallyAddRequiredProducts, + "is_download": isDownload, + "unlimited_downloads": unlimitedDownloads, + "max_number_of_downloads": maxNumberOfDownloads, + "download_expiration_days": downloadExpirationDays, + "has_sample_download": hasSampleDownload, + "has_user_agreement": hasUserAgreement, + "is_recurring": isRecurring, + "recurring_cycle_length": recurringCycleLength, + "recurring_total_cycles": recurringTotalCycles, + "is_rental": isRental, + "rental_price_length": rentalPriceLength, + "is_ship_enabled": isShipEnabled, + "is_free_shipping": isFreeShipping, + "ship_separately": shipSeparately, + "additional_shipping_charge": additionalShippingCharge, + "is_tax_exempt": isTaxExempt, + "is_telecommunications_or_broadcasting_or_electronic_services": isTelecommunicationsOrBroadcastingOrElectronicServices, + "use_multiple_warehouses": useMultipleWarehouses, + "manage_inventory_method_id": manageInventoryMethodId, + "stock_quantity": stockQuantity, + "stock_availability": stockAvailability, + "stock_availabilityn": stockAvailabilityn, + "display_stock_availability": displayStockAvailability, + "display_stock_quantity": displayStockQuantity, + "min_stock_quantity": minStockQuantity, + "notify_admin_for_quantity_below": notifyAdminForQuantityBelow, + "allow_back_in_stock_subscriptions": allowBackInStockSubscriptions, + "order_minimum_quantity": orderMinimumQuantity, + "order_maximum_quantity": orderMaximumQuantity, + "allowed_quantities": allowedQuantities, + "allow_adding_only_existing_attribute_combinations": allowAddingOnlyExistingAttributeCombinations, + "disable_buy_button": disableBuyButton, + "disable_wishlist_button": disableWishlistButton, + "available_for_pre_order": availableForPreOrder, + "pre_order_availability_start_date_time_utc": preOrderAvailabilityStartDateTimeUtc, + "call_for_price": callForPrice, + "price": price, + "old_price": oldPrice, + "product_cost": productCost, + "special_price": specialPrice, + "special_price_start_date_time_utc": specialPriceStartDateTimeUtc, + "special_price_end_date_time_utc": specialPriceEndDateTimeUtc, + "customer_enters_price": customerEntersPrice, + "minimum_customer_entered_price": minimumCustomerEnteredPrice, + "maximum_customer_entered_price": maximumCustomerEnteredPrice, + "baseprice_enabled": basepriceEnabled, + "baseprice_amount": basepriceAmount, + "baseprice_base_amount": basepriceBaseAmount, + "has_tier_prices": hasTierPrices, + "has_discounts_applied": hasDiscountsApplied, + "discount_name": discountName, + "discount_namen": discountNamen, + "discount_description": discountDescription, + "discount_Descriptionn": discountDescriptionn, + "discount_percentage": discountPercentage, + "currency": currency, + "currencyn": currencyn, + "weight": weight, + "length": length, + "width": width, + "height": height, + "available_start_date_time_utc": availableStartDateTimeUtc, + "available_end_date_time_utc": availableEndDateTimeUtc, + "display_order": displayOrder, + "published": published, + "deleted": deleted, + "created_on_utc": createdOnUtc.toIso8601String(), + "updated_on_utc": updatedOnUtc.toIso8601String(), + "product_type": productTypeValues.reverse[productType], + "parent_grouped_product_id": parentGroupedProductId, + "role_ids": roleIds, + "discount_ids": discountIds, + "store_ids": storeIds, + "manufacturer_ids": manufacturerIds, + "reviews": List.from(reviews!.map((x) => x.toJson())), + "images": List.from(images!.map((x) => x.toJson())), + "attributes": attributes, + "specifications": specifications, + "associated_product_ids": associatedProductIds, + "tags": List.from(tags!.map((x) => x)), + "vendor_id": vendorId, + "se_name": seName, + }; +} + +enum ProductType { SIMPLE_PRODUCT } + +final productTypeValues = EnumValues({"SimpleProduct": ProductType.SIMPLE_PRODUCT}); + +class Review { + Review({ + this.id, + this.position, + this.reviewId, + this.customerId, + this.productId, + this.storeId, + this.isApproved, + this.title, + this.reviewText, + this.replyText, + this.rating, + this.helpfulYesTotal, + this.helpfulNoTotal, + this.createdOnUtc, + this.customer, + this.product, + }); + + dynamic id; + dynamic position; + dynamic reviewId; + dynamic customerId; + dynamic productId; + dynamic storeId; + bool? isApproved; + dynamic title; + dynamic reviewText; + dynamic replyText; + dynamic rating; + dynamic helpfulYesTotal; + dynamic helpfulNoTotal; + dynamic createdOnUtc; + dynamic customer; + dynamic product; + + factory Review.fromJson(Map json) => Review( + id: json["id"], + position: json["position"], + reviewId: json["review_id"], + customerId: json["customer_id"], + productId: json["product_id"], + storeId: json["store_id"], + isApproved: json["is_approved"], + title: titleValues.map![json["title"]], + reviewText: reviewTextValues.map![json["review_text"]], + replyText: json["reply_text"], + rating: json["rating"], + helpfulYesTotal: json["helpful_yes_total"], + helpfulNoTotal: json["helpful_no_total"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + customer: ReviewCustomer.fromJson(json["customer"]), + product: json["product"], + ); + + Map toJson() => { + "id": id, + "position": position, + "review_id": reviewId, + "customer_id": customerId, + "product_id": productId, + "store_id": storeId, + "is_approved": isApproved, + "title": titleValues.reverse[title], + "review_text": reviewTextValues.reverse[reviewText], + "reply_text": replyText, + "rating": rating, + "helpful_yes_total": helpfulYesTotal, + "helpful_no_total": helpfulNoTotal, + "created_on_utc": createdOnUtc.toIso8601String(), + "customer": customer.toJson(), + "product": product, + }; +} + +class ReviewCustomer { + ReviewCustomer({ + this.fileNumber, + this.iqamaNumber, + this.isOutSa, + this.patientType, + this.gender, + this.birthDate, + this.phone, + this.countryCode, + this.yahalaAccountno, + this.billingAddress, + this.shippingAddress, + this.addresses, + this.id, + this.username, + this.email, + this.firstName, + this.lastName, + this.languageId, + this.adminComment, + this.isTaxExempt, + this.hasShoppingCartItems, + this.active, + this.deleted, + this.isSystemAccount, + this.systemName, + this.lastIpAddress, + this.createdOnUtc, + this.lastLoginDateUtc, + this.lastActivityDateUtc, + this.registeredInStoreId, + this.roleIds, + }); + + dynamic fileNumber; + dynamic iqamaNumber; + dynamic isOutSa; + dynamic patientType; + dynamic gender; + dynamic birthDate; + dynamic phone; + dynamic countryCode; + dynamic yahalaAccountno; + dynamic billingAddress; + dynamic shippingAddress; + List? addresses; + String? id; + String? username; + dynamic email; + dynamic firstName; + dynamic lastName; + dynamic languageId; + dynamic adminComment; + dynamic isTaxExempt; + dynamic hasShoppingCartItems; + dynamic active; + dynamic deleted; + dynamic isSystemAccount; + dynamic systemName; + dynamic lastIpAddress; + dynamic createdOnUtc; + dynamic lastLoginDateUtc; + dynamic lastActivityDateUtc; + dynamic registeredInStoreId; + List? roleIds; + + factory ReviewCustomer.fromJson(Map json) => ReviewCustomer( + fileNumber: json["file_number"], + iqamaNumber: json["iqama_number"], + isOutSa: json["is_out_sa"], + patientType: json["patient_type"], + gender: json["gender"], + birthDate: DateTime.parse(json["birth_date"]), + phone: json["phone"], + countryCode: json["country_code"], + yahalaAccountno: json["yahala_accountno"], + billingAddress: json["billing_address"], + shippingAddress: json["shipping_address"], + addresses: List.from(json["addresses"].map((x) => x)), + id: json["id"], + username: json["username"], + email: purpleEmailValues.map![json["email"]], + firstName: json["first_name"], + lastName: json["last_name"], + languageId: json["language_id"], + adminComment: json["admin_comment"], + isTaxExempt: json["is_tax_exempt"], + hasShoppingCartItems: json["has_shopping_cart_items"], + active: json["active"], + deleted: json["deleted"], + isSystemAccount: json["is_system_account"], + systemName: json["system_name"], + lastIpAddress: json["last_ip_address"], + createdOnUtc: json["created_on_utc"], + lastLoginDateUtc: json["last_login_date_utc"], + lastActivityDateUtc: json["last_activity_date_utc"], + registeredInStoreId: json["registered_in_store_id"], + roleIds: List.from(json["role_ids"].map((x) => x)), + ); + + Map toJson() => { + "file_number": fileNumber, + "iqama_number": iqamaNumber, + "is_out_sa": isOutSa, + "patient_type": patientType, + "gender": gender, + "birth_date": birthDate.toIso8601String(), + "phone": phone, + "country_code": countryCode, + "yahala_accountno": yahalaAccountno, + "billing_address": billingAddress, + "shipping_address": shippingAddress, + "addresses": List.from(addresses!.map((x) => x)), + "id": id, + "username": username, + "email": purpleEmailValues.reverse[email], + "first_name": firstName, + "last_name": lastName, + "language_id": languageId, + "admin_comment": adminComment, + "is_tax_exempt": isTaxExempt, + "has_shopping_cart_items": hasShoppingCartItems, + "active": active, + "deleted": deleted, + "is_system_account": isSystemAccount, + "system_name": systemName, + "last_ip_address": lastIpAddress, + "created_on_utc": createdOnUtc, + "last_login_date_utc": lastLoginDateUtc, + "last_activity_date_utc": lastActivityDateUtc, + "registered_in_store_id": registeredInStoreId, + "role_ids": List.from(roleIds!.map((x) => x)), + }; +} + +enum PurpleEmail { STEVE_GATES_NOP_COMMERCE_COM, TAMER_FANASHEH_DRSULAIMANALHABIB_COM, ASIF_RAZA_DRSULAIMANALHABIB_COM, ABOSAMI_YMAIL_COM } + +final purpleEmailValues = EnumValues({ + "abosami@ymail.com": PurpleEmail.ABOSAMI_YMAIL_COM, + "asif.raza@drsulaimanalhabib.com": PurpleEmail.ASIF_RAZA_DRSULAIMANALHABIB_COM, + "steve_gates@nopCommerce.com": PurpleEmail.STEVE_GATES_NOP_COMMERCE_COM, + "tamer.fanasheh@drsulaimanalhabib.com": PurpleEmail.TAMER_FANASHEH_DRSULAIMANALHABIB_COM +}); + +enum ReviewText { GOOD, NICE_PRICE, GREAT, REVIEW_TEXT_GOOD, GG, ENAD_TEST_REVIEW_001, ENAD, ENADDD, ENAD_TEST_0001, PURPLE_GOOD, EMPTY } + +final reviewTextValues = EnumValues({ + "افضل علاج للزكام": ReviewText.EMPTY, + "ENAD ": ReviewText.ENAD, + "enaddd": ReviewText.ENADDD, + "ENAD TEST 0001": ReviewText.ENAD_TEST_0001, + "Enad Test Review 001": ReviewText.ENAD_TEST_REVIEW_001, + "gg": ReviewText.GG, + "good ": ReviewText.GOOD, + "great": ReviewText.GREAT, + "nice price": ReviewText.NICE_PRICE, + "Good": ReviewText.PURPLE_GOOD, + "good": ReviewText.REVIEW_TEXT_GOOD +}); + +enum Title { EMPTY, GOOD, TITLE } + +final titleValues = EnumValues({"": Title.EMPTY, "Good": Title.GOOD, "ممتاز": Title.TITLE}); + +enum OrderStatus { ORDER_SUBMITTED, PENDING, ORDER_IN_PROGRESS, ORDER_SENT_FOR_DELIVERY, ORDER_COMPLETED, CANCELLED, PROCESSING, ORDER_REFUNDED, COMPLETE } + +final orderStatusValues = EnumValues({ + "Cancelled": OrderStatus.CANCELLED, + "Complete": OrderStatus.COMPLETE, + "OrderCompleted": OrderStatus.ORDER_COMPLETED, + "OrderInProgress": OrderStatus.ORDER_IN_PROGRESS, + "OrderRefunded": OrderStatus.ORDER_REFUNDED, + "OrderSubmitted": OrderStatus.ORDER_SUBMITTED, + "Pending": OrderStatus.PENDING, + "Processing": OrderStatus.PROCESSING, + "orderSentForDelivery": OrderStatus.ORDER_SENT_FOR_DELIVERY +}); + +enum OrderStatusn { ORDER_SUBMITTED, EMPTY, ORDER_IN_PROGRESS, ORDER_COMPLETED, ORDER_STATUSN, PURPLE, FLUFFY, TENTACLED } + +final orderStatusnValues = EnumValues({ + "معلقة": OrderStatusn.EMPTY, + "تم ارجاع مبلغ الطلبية المدفوع للعميل": OrderStatusn.FLUFFY, + "Order Completed": OrderStatusn.ORDER_COMPLETED, + "Order In Progress": OrderStatusn.ORDER_IN_PROGRESS, + "ملغي": OrderStatusn.ORDER_STATUSN, + "Order Submitted": OrderStatusn.ORDER_SUBMITTED, + "قيد التنفيذ": OrderStatusn.PURPLE, + "مكتمل": OrderStatusn.TENTACLED, + "مكتمل": OrderStatusn.TENTACLED +}); + +enum PaymentMethodSystemName { PAYMENTS_PAY_FORT, PAYMENTS_CASH_ON_DELIVERY } + +final paymentMethodSystemNameValues = EnumValues({"Payments.CashOnDelivery": PaymentMethodSystemName.PAYMENTS_CASH_ON_DELIVERY, "Payments.PayFort": PaymentMethodSystemName.PAYMENTS_PAY_FORT}); + +enum PaymentName { CREDIT_DEBIT_CARD_PAYFORT, CASH_ON_DELIVERY_COD } + +final paymentNameValues = EnumValues({"Cash On Delivery (COD)": PaymentName.CASH_ON_DELIVERY_COD, "Credit / Debit Card Payfort": PaymentName.CREDIT_DEBIT_CARD_PAYFORT}); + +enum PaymentStatus { PAID, PENDING } + +final paymentStatusValues = EnumValues({"Paid": PaymentStatus.PAID, "Pending": PaymentStatus.PENDING}); + +enum PaymentStatusn { EMPTY, PAYMENT_STATUSN } + +final paymentStatusnValues = EnumValues({"تم الدفع": PaymentStatusn.EMPTY, "قيد الإنتظار": PaymentStatusn.PAYMENT_STATUSN}); + +enum PreferDeliveryTime { THE_1000_AM_330_PM, THE_530_PM_730_PM } + +final preferDeliveryTimeValues = EnumValues({"10:00 AM - 3:30 PM": PreferDeliveryTime.THE_1000_AM_330_PM, "5:30 PM - 7:30 PM": PreferDeliveryTime.THE_530_PM_730_PM}); + +enum PreferDeliveryTimen { THE_1000330, THE_530730 } + +final preferDeliveryTimenValues = EnumValues({"10:00 ص - 3:30 م": PreferDeliveryTimen.THE_1000330, "5:30 م - 7:30 م": PreferDeliveryTimen.THE_530730}); + +enum ShippingMethod { EMPTY, FIXED_PRICE } + +final shippingMethodValues = EnumValues({"سعر ثابت ": ShippingMethod.EMPTY, "Fixed Price": ShippingMethod.FIXED_PRICE}); + +enum ShippingRateComputationMethodSystemName { SHIPPING_FIXED_OR_BY_WEIGHT } + +final shippingRateComputationMethodSystemNameValues = EnumValues({"Shipping.FixedOrByWeight": ShippingRateComputationMethodSystemName.SHIPPING_FIXED_OR_BY_WEIGHT}); + +enum ShippingStatus { NOT_YET_SHIPPED } + +final shippingStatusValues = EnumValues({"NotYetShipped": ShippingStatus.NOT_YET_SHIPPED}); + +enum ShippingStatusn { EMPTY } + +final shippingStatusnValues = EnumValues({"لم يتم شحنها بعد": ShippingStatusn.EMPTY}); + +class EnumValues { + Map? map; + Map? reverseMap; + + EnumValues(this.map); + + Map get reverse { + if (reverseMap == null) { + reverseMap = map!.map((k, v) => new MapEntry(v, k)); + } + return reverseMap!; + } +} diff --git a/lib/core/model/pharmacies/orders_model.dart b/lib/core/model/pharmacies/orders_model.dart new file mode 100644 index 00000000..74caaf13 --- /dev/null +++ b/lib/core/model/pharmacies/orders_model.dart @@ -0,0 +1,93 @@ +class OrdersModel { + List? orders; + + OrdersModel({this.orders}); + + OrdersModel.fromJson(Map json) { + if (json['orders'] != null) { + orders = []; + json['orders'].forEach((v) { + orders!.add(new Orders.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + if (this.orders != null) { + data['orders'] = this.orders!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class Orders { + String? id; + int? productCount; + dynamic orderTotal; + String? createdOnUtc; + int? orderStatusId; + String? orderStatus; + String? orderStatusn; + bool? canCancel; + bool? canRefund; + String? orderGuid; + dynamic customerId; + dynamic orderSubtotalExclTax; + dynamic orderShippingExclTax; + dynamic orderTax; + + + Orders( + {this.id, + this.productCount, + this.orderTotal, + this.createdOnUtc, + this.orderStatusId, + this.orderStatus, + this.orderStatusn, + this.canCancel, + this.canRefund, + this.orderGuid, + this.customerId, + this.orderShippingExclTax, + this.orderSubtotalExclTax, + this.orderTax,}); + + Orders.fromJson(Map json) { + try { + id = json['id']; + productCount = json['product_count']; + orderTotal = json['order_total']; + createdOnUtc = json['created_on_utc']; + orderStatusId = json['order_status_id']; + orderStatus = json['order_status']; + orderStatusn = json['order_statusn']; + canCancel = json['can_cancel']; + canRefund = json['can_refund']; + orderGuid = json['order_guid']; + customerId = json['customer_id']; + orderSubtotalExclTax= json["order_subtotal_excl_tax"]; + orderShippingExclTax= json["order_shipping_excl_tax"]; + orderTax= json["order_tax"]; + }catch(e){ + print(e); + } + + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['product_count'] = this.productCount; + data['order_total'] = this.orderTotal; + data['created_on_utc'] = this.createdOnUtc; + data['order_status_id'] = this.orderStatusId; + data['order_status'] = this.orderStatus; + data['order_statusn'] = this.orderStatusn; + data ["order_subtotal_excl_tax"] = this.orderSubtotalExclTax; + data ["order_shipping_excl_tax"]= this.orderShippingExclTax; + data ["order_tax"]= this.orderTax; + return data; + } +} diff --git a/lib/core/model/pharmacies/payment-checkout-data.dart b/lib/core/model/pharmacies/payment-checkout-data.dart new file mode 100644 index 00000000..60cd7b23 --- /dev/null +++ b/lib/core/model/pharmacies/payment-checkout-data.dart @@ -0,0 +1,19 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'package:flutter/material.dart'; + +import 'ShippingOption.dart'; + +class PaymentCheckoutData { + Addresses? address; + PaymentOption? paymentOption; + LacumAccountInformation? lacumInformation; + bool? cartDataVisible; + ShippingOption? shippingOption; + num? usedLakumPoints; + + PaymentCheckoutData({this.address, this.paymentOption, this.lacumInformation, this.cartDataVisible = false, this.shippingOption, this.usedLakumPoints = 0}); + + +} diff --git a/lib/core/model/pharmacies/pharmacies_list_model.dart b/lib/core/model/pharmacies/pharmacies_list_model.dart new file mode 100644 index 00000000..1935be55 --- /dev/null +++ b/lib/core/model/pharmacies/pharmacies_list_model.dart @@ -0,0 +1,93 @@ +class PharmaciesListModel { + int? itemID; + int? patientTypeID; + int? languageID; + String? stamp; + String? iPAdress; + double? versionID; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + int? patientOutSA; + int? channel; + int? doctorID; + int? editedBy; + int? projectID; + int? clinicID; + double? price; + String? imageLocation; + String? desLocation; + String? itemDes; + String? phoneNumber; + String? longitude; + String? latitude; + + PharmaciesListModel( + {this.itemID, + this.patientTypeID, + this.languageID, + this.stamp, + this.iPAdress, + this.versionID, + this.tokenID, + this.sessionID, + this.isLoginForDoctorApp, + this.channel, + this.editedBy, + this.doctorID, + this.patientOutSA, + this.clinicID, + this.projectID, + this.price, + this.imageLocation, + this.desLocation, + this.itemDes, + this.phoneNumber, + this.longitude, + this.latitude}); + + PharmaciesListModel.fromJson(Map json) { + longitude = json['Longitude']; + latitude = json['Latitude']; + phoneNumber = json['PhoneNumber']; + itemDes = json['ItemDescription']; + desLocation = json['LocationDescription']; + imageLocation = json['ProjectImageURL']; + price = json['SellingPrice']; + itemID = json['ItemID']; + patientTypeID = json['PatientTypeID']; + languageID = json['LanguageID']; + stamp = json['stamp']; + iPAdress = json['IPAdress']; + versionID = json['VersionID']; + tokenID = json['TokenID']; + sessionID = json['SessionID']; + isLoginForDoctorApp = json['IsLoginForDoctorApp']; + patientOutSA = json['PatientOutSA']; + channel = json['Channel']; + doctorID = json['DoctorID']; + editedBy = json['EditedBy']; + projectID = json['ProjectID']; + clinicID = json['ClinicID']; + } + + Map toJson() { + final Map data = new Map(); + data['ItemID'] = this.itemID; + data['PatientTypeID'] = this.patientTypeID; + data['LanguageID'] = this.languageID; + data['stamp'] = this.stamp; + data['IPAdress'] = this.iPAdress; + data['VersionID'] = this.versionID; + data['TokenID'] = this.tokenID; + data['SessionID'] = this.sessionID; + data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; + data['PatientOutSA'] = this.patientOutSA; + data['Channel'] = this.channel; + data['DoctorID'] = this.doctorID; + data['EditedBy'] = this.editedBy; + data['ProjectID'] = this.projectID; + data['ClinicID'] = this.clinicID; + return data; + } +} diff --git a/lib/core/model/pharmacies/pharmacies_model.dart b/lib/core/model/pharmacies/pharmacies_model.dart new file mode 100644 index 00000000..e6b41f14 --- /dev/null +++ b/lib/core/model/pharmacies/pharmacies_model.dart @@ -0,0 +1,98 @@ +class PharmaciesModel { + String? pHRItemName; + int? pageIndex; + int? pageSize; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? doctorID; + int? editedBy; + int? projectID; + int? clinicID; + String? tokenID; + String? stamp; + bool? isLoginForDoctorApp; + String? itemDes; + String? productImage; + int? itemID; + + PharmaciesModel( + {this.pHRItemName, + this.pageIndex, + this.pageSize, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.doctorID, + this.editedBy, + this.projectID, + this.clinicID, + this.tokenID, + this.stamp, + this.itemDes, + this.productImage, + this.isLoginForDoctorApp, + this.itemID}); + + PharmaciesModel.fromJson(Map json) { + itemID = json['ItemID']; + + productImage = json['ProductImageBase64']; + itemDes = json['ItemDescription']; + pHRItemName = json['PHR_itemName']; + pageIndex = json['PageIndex']; + pageSize = json['PageSize']; + 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']; + doctorID = json['DoctorID']; + editedBy = json['EditedBy']; + projectID = json['ProjectID']; + clinicID = json['ClinicID']; + tokenID = json['TokenID']; + stamp = json['stamp']; + isLoginForDoctorApp = json['IsLoginForDoctorApp']; + } + + Map toJson() { + final Map data = new Map(); + data['PHR_itemName'] = this.pHRItemName; + data['PageIndex'] = this.pageIndex; + data['PageSize'] = this.pageSize; + 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['DoctorID'] = this.doctorID; + data['EditedBy'] = this.editedBy; + data['ProjectID'] = this.projectID; + data['ClinicID'] = this.clinicID; + data['TokenID'] = this.tokenID; + data['stamp'] = this.stamp; + data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; + return data; + } +} diff --git a/lib/core/model/pharmacies/recommendedProduct_model.dart b/lib/core/model/pharmacies/recommendedProduct_model.dart new file mode 100644 index 00000000..c8f39955 --- /dev/null +++ b/lib/core/model/pharmacies/recommendedProduct_model.dart @@ -0,0 +1,627 @@ +class RecommendedProductModel { + dynamic id; + bool? visibleIndividually; + dynamic name; + dynamic namen; + List? localizedNames; + dynamic shortDescription; + dynamic shortDescriptionn; + dynamic fullDescription; + dynamic fullDescriptionn; + bool? markasNew; + bool? showOnHomePage; +// dynamic metaKeywords; +// dynamic metaDescription; +// dynamic metaTitle; + bool? allowCustomerReviews; + dynamic approvedRatingSum; + dynamic notApprovedRatingSum; + dynamic approvedTotalReviews; + dynamic notApprovedTotalReviews; + dynamic sku; + bool? isRx; + bool? prescriptionRequired; + dynamic rxMessage; + dynamic rxMessagen; +// dynamic manufacturerPartNumber; +// dynamic gtin; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; + dynamic maxNumberOfDownloads; +// dynamic downloadExpirationDays; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; + dynamic recurringCycleLength; + dynamic recurringTotalCycles; + bool? isRental; + dynamic rentalPriceLength; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; + dynamic additionalShippingCharge; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; + dynamic manageInventoryMethodId; + dynamic stockQuantity; + dynamic stockAvailability; + dynamic stockAvailabilityn; + bool? displayStockAvailability; + bool? displayStockQuantity; + dynamic minStockQuantity; + dynamic notifyAdminForQuantityBelow; + bool? allowBackInStockSubscriptions; + dynamic orderMinimumQuantity; + dynamic orderMaximumQuantity; +// dynamic allowedQuantities; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; +// dynamic preOrderAvailabilityStartDateTimeUtc; + bool? callForPrice; + dynamic price; + dynamic oldPrice; + dynamic productCost; +// dynamic specialPrice; +// dynamic specialPriceStartDateTimeUtc; +// dynamic specialPriceEndDateTimeUtc; + bool? customerEntersPrice; + dynamic minimumCustomerEnteredPrice; + dynamic maximumCustomerEnteredPrice; + bool? basepriceEnabled; + dynamic basepriceAmount; + dynamic basepriceBaseAmount; + bool? hasTierPrices; + bool? hasDiscountsApplied; +// dynamic discountName; +// dynamic discountNamen; +// dynamic discountDescription; +// dynamic discountDescriptionn; +// dynamic discountPercentage; + dynamic currency; + dynamic currencyn; + dynamic weight; + dynamic length; + dynamic width; + dynamic height; +// dynamic availableStartDateTimeUtc; +// dynamic availableEndDateTimeUtc; + dynamic displayOrder; + bool? published; + bool? deleted; + dynamic createdOnUtc; + dynamic updatedOnUtc; + dynamic productType; + dynamic parentGroupedProductId; +// List roleIds; +// List discountIds; +// List storeIds; + List? manufacturerIds; +// List reviews; + List? images; +// List attributes; + List? specifications; +// List associatedProductIds; +// List tags; + dynamic vendorId; + dynamic seName; + bool? isinwishlist; + + RecommendedProductModel( + {this.id, + this.visibleIndividually, + this.name, + this.namen, + this.localizedNames, + this.shortDescription, + this.shortDescriptionn, + this.fullDescription, + this.fullDescriptionn, + this.markasNew, + this.showOnHomePage, +// this.metaKeywords, +// this.metaDescription, +// this.metaTitle, + this.allowCustomerReviews, + this.approvedRatingSum, + this.notApprovedRatingSum, + this.approvedTotalReviews, + this.notApprovedTotalReviews, + this.sku, + this.isRx, + this.prescriptionRequired, + this.rxMessage, + this.rxMessagen, +// this.manufacturerPartNumber, +// this.gtin, + this.isGiftCard, + this.requireOtherProducts, + this.automaticallyAddRequiredProducts, + this.isDownload, + this.unlimitedDownloads, + this.maxNumberOfDownloads, +// this.downloadExpirationDays, + this.hasSampleDownload, + this.hasUserAgreement, + this.isRecurring, + this.recurringCycleLength, + this.recurringTotalCycles, + this.isRental, + this.rentalPriceLength, + this.isShipEnabled, + this.isFreeShipping, + this.shipSeparately, + this.additionalShippingCharge, + this.isTaxExempt, + this.isTelecommunicationsOrBroadcastingOrElectronicServices, + this.useMultipleWarehouses, + this.manageInventoryMethodId, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.displayStockAvailability, + this.displayStockQuantity, + this.minStockQuantity, + this.notifyAdminForQuantityBelow, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, +// this.allowedQuantities, + this.allowAddingOnlyExistingAttributeCombinations, + this.disableBuyButton, + this.disableWishlistButton, + this.availableForPreOrder, +// this.preOrderAvailabilityStartDateTimeUtc, + this.callForPrice, + this.price, + this.oldPrice, + this.productCost, +// this.specialPrice, +// this.specialPriceStartDateTimeUtc, +// this.specialPriceEndDateTimeUtc, + this.customerEntersPrice, + this.minimumCustomerEnteredPrice, + this.maximumCustomerEnteredPrice, + this.basepriceEnabled, + this.basepriceAmount, + this.basepriceBaseAmount, + this.hasTierPrices, + this.hasDiscountsApplied, +// this.discountName, +// this.discountNamen, +// this.discountDescription, +// this.discountDescriptionn, +// this.discountPercentage, + this.currency, + this.currencyn, + this.weight, + this.length, + this.width, + this.height, +// this.availableStartDateTimeUtc, +// this.availableEndDateTimeUtc, + this.displayOrder, + this.published, + this.deleted, + this.createdOnUtc, + this.updatedOnUtc, + this.productType, + this.parentGroupedProductId, +// this.roleIds, +// this.discountIds, +// this.storeIds, + this.manufacturerIds, +// this.reviews, + this.images, +// this.attributes, + this.specifications, +// this.associatedProductIds, +// this.tags, + this.vendorId, + this.seName, + this.isinwishlist}); + + RecommendedProductModel.fromJson(Map json) { + id = json['id']; + visibleIndividually = json['visible_individually']; + name = json['name']; + namen = json['namen']; + if (json['localized_names'] != null) { + localizedNames = []; + json['localized_names'].forEach((v) { + localizedNames!.add(new LocalizedNames.fromJson(v)); + }); + } + shortDescription = json['short_description']; + shortDescriptionn = json['short_descriptionn']; + fullDescription = json['full_description']; + fullDescriptionn = json['full_descriptionn']; + markasNew = json['markas_new']; + showOnHomePage = json['show_on_home_page']; +// metaKeywords = json['meta_keywords']; +// metaDescription = json['meta_description']; +// metaTitle = json['meta_title']; + allowCustomerReviews = json['allow_customer_reviews']; + approvedRatingSum = json['approved_rating_sum']; + notApprovedRatingSum = json['not_approved_rating_sum']; + approvedTotalReviews = json['approved_total_reviews']; + notApprovedTotalReviews = json['not_approved_total_reviews']; + sku = json['sku']; + isRx = json['is_rx']; + prescriptionRequired = json['prescription_required']; + rxMessage = json['rx_message']; + rxMessagen = json['rx_messagen']; +// manufacturerPartNumber = json['manufacturer_part_number']; +// gtin = json['gtin']; + isGiftCard = json['is_gift_card']; + requireOtherProducts = json['require_other_products']; + automaticallyAddRequiredProducts = + json['automatically_add_required_products']; + isDownload = json['is_download']; + unlimitedDownloads = json['unlimited_downloads']; + maxNumberOfDownloads = json['max_number_of_downloads']; +// downloadExpirationDays = json['download_expiration_days']; + hasSampleDownload = json['has_sample_download']; + hasUserAgreement = json['has_user_agreement']; + isRecurring = json['is_recurring']; + recurringCycleLength = json['recurring_cycle_length']; + recurringTotalCycles = json['recurring_total_cycles']; + isRental = json['is_rental']; + rentalPriceLength = json['rental_price_length']; + isShipEnabled = json['is_ship_enabled']; + isFreeShipping = json['is_free_shipping']; + shipSeparately = json['ship_separately']; + additionalShippingCharge = json['additional_shipping_charge']; + isTaxExempt = json['is_tax_exempt']; + isTelecommunicationsOrBroadcastingOrElectronicServices = + json['is_telecommunications_or_broadcasting_or_electronic_services']; + useMultipleWarehouses = json['use_multiple_warehouses']; + manageInventoryMethodId = json['manage_inventory_method_id']; + stockQuantity = json['stock_quantity']; + stockAvailability = json['stock_availability']; + stockAvailabilityn = json['stock_availabilityn']; + displayStockAvailability = json['display_stock_availability']; + displayStockQuantity = json['display_stock_quantity']; + minStockQuantity = json['min_stock_quantity']; + notifyAdminForQuantityBelow = json['notify_admin_for_quantity_below']; + allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions']; + orderMinimumQuantity = json['order_minimum_quantity']; + orderMaximumQuantity = json['order_maximum_quantity']; +// allowedQuantities = json['allowed_quantities']; + allowAddingOnlyExistingAttributeCombinations = + json['allow_adding_only_existing_attribute_combinations']; + disableBuyButton = json['disable_buy_button']; + disableWishlistButton = json['disable_wishlist_button']; + availableForPreOrder = json['available_for_pre_order']; +// preOrderAvailabilityStartDateTimeUtc = +// json['pre_order_availability_start_date_time_utc']; + callForPrice = json['call_for_price']; + price = json['price']; + oldPrice = json['old_price']; + productCost = json['product_cost']; +// specialPrice = json['special_price']; +// specialPriceStartDateTimeUtc = json['special_price_start_date_time_utc']; +// specialPriceEndDateTimeUtc = json['special_price_end_date_time_utc']; + customerEntersPrice = json['customer_enters_price']; + minimumCustomerEnteredPrice = json['minimum_customer_entered_price']; + maximumCustomerEnteredPrice = json['maximum_customer_entered_price']; + basepriceEnabled = json['baseprice_enabled']; + basepriceAmount = json['baseprice_amount']; + basepriceBaseAmount = json['baseprice_base_amount']; + hasTierPrices = json['has_tier_prices']; + hasDiscountsApplied = json['has_discounts_applied']; +// discountName = json['discount_name']; +// discountNamen = json['discount_namen']; +// discountDescription = json['discount_description']; +// discountDescriptionn = json['discount_Descriptionn']; +// discountPercentage = json['discount_percentage']; + currency = json['currency']; + currencyn = json['currencyn']; + weight = json['weight']; + length = json['length']; + width = json['width']; + height = json['height']; +// availableStartDateTimeUtc = json['available_start_date_time_utc']; +// availableEndDateTimeUtc = json['available_end_date_time_utc']; + displayOrder = json['display_order']; + published = json['published']; + deleted = json['deleted']; + createdOnUtc = json['created_on_utc']; + updatedOnUtc = json['updated_on_utc']; + productType = json['product_type']; + parentGroupedProductId = json['parent_grouped_product_id']; +// if (json['role_ids'] != null) { +// roleIds = new List(); +// json['role_ids'].forEach((v) { +// roleIds.add(new dynamic.fromJson(v)); +// }); +// } +// if (json['discount_ids'] != null) { +// discountIds = new List(); +// json['discount_ids'].forEach((v) { +// discountIds.add(new dynamic.fromJson(v)); +// }); +// } +// if (json['store_ids'] != null) { +// storeIds = new List(); +// json['store_ids'].forEach((v) { +// storeIds.add(new dynamic.fromJson(v)); +// }); +// } + manufacturerIds = json['manufacturer_ids'].cast(); +// if (json['reviews'] != null) { +// reviews = new List(); +// json['reviews'].forEach((v) { +// reviews.add(new dynamic.fromJson(v)); +// }); +// } + if (json['images'] != null) { + images = []; + json['images'].forEach((v) { + images!.add(new Images.fromJson(v)); + }); + } +// if (json['attributes'] != null) { +// attributes = new List(); +// json['attributes'].forEach((v) { +// attributes.add(new dynamic.fromJson(v)); +// }); +// } + if (json['specifications'] != null) { + specifications = []; + json['specifications'].forEach((v) { + specifications!.add(new Specifications.fromJson(v)); + }); + } +// if (json['associated_product_ids'] != null) { +// associatedProductIds = new List(); +// json['associated_product_ids'].forEach((v) { +// associatedProductIds.add(new dynamic.fromJson(v)); +// }); +// } +// if (json['tags'] != null) { +// tags = new List(); +// json['tags'].forEach((v) { +// tags.add(new dynamic.fromJson(v)); +// }); +// } + vendorId = json['vendor_id']; + seName = json['se_name']; + isinwishlist = json['isinwishlist']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['visible_individually'] = this.visibleIndividually; + data['name'] = this.name; + data['namen'] = this.namen; + if (this.localizedNames != null) { + data['localized_names'] = + this.localizedNames!.map((v) => v.toJson()).toList(); + } + data['short_description'] = this.shortDescription; + data['short_descriptionn'] = this.shortDescriptionn; + data['full_description'] = this.fullDescription; + data['full_descriptionn'] = this.fullDescriptionn; + data['markas_new'] = this.markasNew; + data['show_on_home_page'] = this.showOnHomePage; +// data['meta_keywords'] = this.metaKeywords; +// data['meta_description'] = this.metaDescription; +// data['meta_title'] = this.metaTitle; + data['allow_customer_reviews'] = this.allowCustomerReviews; + data['approved_rating_sum'] = this.approvedRatingSum; + data['not_approved_rating_sum'] = this.notApprovedRatingSum; + data['approved_total_reviews'] = this.approvedTotalReviews; + data['not_approved_total_reviews'] = this.notApprovedTotalReviews; + data['sku'] = this.sku; + data['is_rx'] = this.isRx; + data['prescription_required'] = this.prescriptionRequired; + data['rx_message'] = this.rxMessage; + data['rx_messagen'] = this.rxMessagen; +// data['manufacturer_part_number'] = this.manufacturerPartNumber; +// data['gtin'] = this.gtin; + data['is_gift_card'] = this.isGiftCard; + data['require_other_products'] = this.requireOtherProducts; + data['automatically_add_required_products'] = + this.automaticallyAddRequiredProducts; + data['is_download'] = this.isDownload; + data['unlimited_downloads'] = this.unlimitedDownloads; + data['max_number_of_downloads'] = this.maxNumberOfDownloads; +// data['download_expiration_days'] = this.downloadExpirationDays; + data['has_sample_download'] = this.hasSampleDownload; + data['has_user_agreement'] = this.hasUserAgreement; + data['is_recurring'] = this.isRecurring; + data['recurring_cycle_length'] = this.recurringCycleLength; + data['recurring_total_cycles'] = this.recurringTotalCycles; + data['is_rental'] = this.isRental; + data['rental_price_length'] = this.rentalPriceLength; + data['is_ship_enabled'] = this.isShipEnabled; + data['is_free_shipping'] = this.isFreeShipping; + data['ship_separately'] = this.shipSeparately; + data['additional_shipping_charge'] = this.additionalShippingCharge; + data['is_tax_exempt'] = this.isTaxExempt; + data['is_telecommunications_or_broadcasting_or_electronic_services'] = + this.isTelecommunicationsOrBroadcastingOrElectronicServices; + data['use_multiple_warehouses'] = this.useMultipleWarehouses; + data['manage_inventory_method_id'] = this.manageInventoryMethodId; + data['stock_quantity'] = this.stockQuantity; + data['stock_availability'] = this.stockAvailability; + data['stock_availabilityn'] = this.stockAvailabilityn; + data['display_stock_availability'] = this.displayStockAvailability; + data['display_stock_quantity'] = this.displayStockQuantity; + data['min_stock_quantity'] = this.minStockQuantity; + data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow; + data['allow_back_in_stock_subscriptions'] = + this.allowBackInStockSubscriptions; + data['order_minimum_quantity'] = this.orderMinimumQuantity; + data['order_maximum_quantity'] = this.orderMaximumQuantity; +// data['allowed_quantities'] = this.allowedQuantities; + data['allow_adding_only_existing_attribute_combinations'] = + this.allowAddingOnlyExistingAttributeCombinations; + data['disable_buy_button'] = this.disableBuyButton; + data['disable_wishlist_button'] = this.disableWishlistButton; + data['available_for_pre_order'] = this.availableForPreOrder; +// data['pre_order_availability_start_date_time_utc'] = +// this.preOrderAvailabilityStartDateTimeUtc; + data['call_for_price'] = this.callForPrice; + data['price'] = this.price; + data['old_price'] = this.oldPrice; + data['product_cost'] = this.productCost; +// data['special_price'] = this.specialPrice; +// data['special_price_start_date_time_utc'] = +// this.specialPriceStartDateTimeUtc; +// data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc; + data['customer_enters_price'] = this.customerEntersPrice; + data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice; + data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice; + data['baseprice_enabled'] = this.basepriceEnabled; + data['baseprice_amount'] = this.basepriceAmount; + data['baseprice_base_amount'] = this.basepriceBaseAmount; + data['has_tier_prices'] = this.hasTierPrices; + data['has_discounts_applied'] = this.hasDiscountsApplied; +// data['discount_name'] = this.discountName; +// data['discount_namen'] = this.discountNamen; +// data['discount_description'] = this.discountDescription; +// data['discount_Descriptionn'] = this.discountDescriptionn; +// data['discount_percentage'] = this.discountPercentage; + data['currency'] = this.currency; + data['currencyn'] = this.currencyn; + data['weight'] = this.weight; + data['length'] = this.length; + data['width'] = this.width; + data['height'] = this.height; +// data['available_start_date_time_utc'] = this.availableStartDateTimeUtc; +// data['available_end_date_time_utc'] = this.availableEndDateTimeUtc; + data['display_order'] = this.displayOrder; + data['published'] = this.published; + data['deleted'] = this.deleted; + data['created_on_utc'] = this.createdOnUtc; + data['updated_on_utc'] = this.updatedOnUtc; + data['product_type'] = this.productType; + data['parent_grouped_product_id'] = this.parentGroupedProductId; +// if (this.roleIds != null) { +// data['role_ids'] = this.roleIds.map((v) => v.toJson()).toList(); +// } +// if (this.discountIds != null) { +// data['discount_ids'] = this.discountIds.map((v) => v.toJson()).toList(); +// } +// if (this.storeIds != null) { +// data['store_ids'] = this.storeIds.map((v) => v.toJson()).toList(); +// } + data['manufacturer_ids'] = this.manufacturerIds; +// if (this.reviews != null) { +// data['reviews'] = this.reviews.map((v) => v.toJson()).toList(); +// } + if (this.images != null) { + data['images'] = this.images!.map((v) => v.toJson()).toList(); + } +// if (this.attributes != null) { +// data['attributes'] = this.attributes.map((v) => v.toJson()).toList(); +// } + if (this.specifications != null) { + data['specifications'] = + this.specifications!.map((v) => v.toJson()).toList(); + } +// if (this.associatedProductIds != null) { +// data['associated_product_ids'] = +// this.associatedProductIds.map((v) => v.toJson()).toList(); +// } +// if (this.tags != null) { +// data['tags'] = this.tags.map((v) => v.toJson()).toList(); +// } + data['vendor_id'] = this.vendorId; + data['se_name'] = this.seName; + data['isinwishlist'] = this.isinwishlist; + return data; + } +} + +class LocalizedNames { + dynamic languageId; + String? localizedName; + + LocalizedNames({this.languageId, this.localizedName}); + + LocalizedNames.fromJson(Map json) { + languageId = json['language_id']; + localizedName = json['localized_name']; + } + + Map toJson() { + final Map data = new Map(); + data['language_id'] = this.languageId; + data['localized_name'] = this.localizedName; + return data; + } +} + +class Images { + dynamic id; + dynamic position; + String? src; + String? thumb; + String? attachment; + + Images({this.id, this.position, this.src, this.thumb, this.attachment}); + + Images.fromJson(Map json) { + id = json['id']; + position = json['position']; + src = json['src']; + thumb = json['thumb']; + attachment = json['attachment']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['position'] = this.position; + data['src'] = this.src; + data['thumb'] = this.thumb; + data['attachment'] = this.attachment; + return data; + } +} + +class Specifications { + dynamic id; + dynamic displayOrder; + String? defaultValue; + String? defaultValuen; + String? name; + String? nameN; + + Specifications( + {this.id, + this.displayOrder, + this.defaultValue, + this.defaultValuen, + this.name, + this.nameN}); + + Specifications.fromJson(Map json) { + id = json['id']; + displayOrder = json['display_order']; + defaultValue = json['default_value']; + defaultValuen = json['default_valuen']; + name = json['name']; + nameN = json['nameN']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['display_order'] = this.displayOrder; + data['default_value'] = this.defaultValue; + data['default_valuen'] = this.defaultValuen; + data['name'] = this.name; + data['nameN'] = this.nameN; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/pharmacy/brands_model.dart b/lib/core/model/pharmacy/brands_model.dart new file mode 100644 index 00000000..9747012f --- /dev/null +++ b/lib/core/model/pharmacy/brands_model.dart @@ -0,0 +1,24 @@ +class BrandsModel { + String? id; + String? name; + String? namen; + dynamic image; + + BrandsModel({this.id, this.name, this.namen, this.image}); + + BrandsModel.fromJson(Map json) { + id = json['id']; + name = json['name']; + namen = json['namen']; + image = json['image']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['name'] = this.name; + data['namen'] = this.namen; + data['image'] = this.image; + return data; + } +} diff --git a/lib/core/model/pharmacy/categorise_parent_model.dart b/lib/core/model/pharmacy/categorise_parent_model.dart new file mode 100644 index 00000000..de67df68 --- /dev/null +++ b/lib/core/model/pharmacy/categorise_parent_model.dart @@ -0,0 +1,75 @@ +class CategoriseParentModel { + String? id; + String? name; + String? namen; + List? localizedNames; + dynamic description; + int? parentCategoryId; + int? displayOrder; + dynamic image; + bool? isLeaf; + + CategoriseParentModel( + {this.id, + this.name, + this.namen, + this.localizedNames, + this.description, + this.parentCategoryId, + this.displayOrder, + this.image, + this.isLeaf}); + + CategoriseParentModel.fromJson(Map json) { + id = json['id']; + name = json['name']; + namen = json['namen']; + if (json['localized_names'] != null) { + localizedNames = []; + json['localized_names'].forEach((v) { + localizedNames!.add(new LocalizedNames.fromJson(v)); + }); + } + description = json['description']; + parentCategoryId = json['parent_category_id']; + displayOrder = json['display_order']; + image = json['image']; + isLeaf = json['is_leaf']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['name'] = this.name; + data['namen'] = this.namen; + if (this.localizedNames != null) { + data['localized_names'] = + this.localizedNames!.map((v) => v.toJson()).toList(); + } + data['description'] = this.description; + data['parent_category_id'] = this.parentCategoryId; + data['display_order'] = this.displayOrder; + data['image'] = this.image; + data['is_leaf'] = this.isLeaf; + return data; + } +} + +class LocalizedNames { + int? languageId; + String? localizedName; + + LocalizedNames({this.languageId, this.localizedName}); + + LocalizedNames.fromJson(Map json) { + languageId = json['language_id']; + localizedName = json['localized_name']; + } + + Map toJson() { + final Map data = new Map(); + data['language_id'] = this.languageId; + data['localized_name'] = this.localizedName; + return data; + } +} diff --git a/lib/core/model/pharmacy/final_products_model.dart b/lib/core/model/pharmacy/final_products_model.dart new file mode 100644 index 00000000..d2d0ccae --- /dev/null +++ b/lib/core/model/pharmacy/final_products_model.dart @@ -0,0 +1,184 @@ +class FinalProductsModel { + String? id; + String? name; + String? namen; + List? localizedNames; + String? shortDescription; + String? fullDescription; + String? fullDescriptionn; + dynamic approvedRatingSum; + dynamic approvedTotalReviews; + String? sku; + bool? isRx; + dynamic rxMessage; + dynamic rxMessagen; + dynamic stockQuantity; + String? stockAvailability; + String? stockAvailabilityn; + bool? allowBackInStockSubscriptions; + dynamic orderMinimumQuantity; + dynamic orderMaximumQuantity; + dynamic price; + dynamic oldPrice; + dynamic discountName; + dynamic discountNamen; + dynamic discountPercentage; + dynamic displayOrder; + List? discountIds; + List? reviews; + List? images; + + FinalProductsModel( + {this.id, + this.name, + this.namen, + this.localizedNames, + this.shortDescription, + this.fullDescription, + this.fullDescriptionn, + this.approvedRatingSum, + this.approvedTotalReviews, + this.sku, + this.isRx, + this.rxMessage, + this.rxMessagen, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, + this.price, + this.oldPrice, + this.discountName, + this.discountNamen, + this.discountPercentage, + this.displayOrder, + this.discountIds, + this.reviews, + this.images}); + + FinalProductsModel.fromJson(Map json) { + id = json['id']; + name = json['name']; + if (json['images'] != null) { + images = []; + json['images'].forEach((v) { + images!.add(new Images.fromJson(v)); + }); + } + namen = json['namen']; + if (json['localized_names'] != null) { + localizedNames = []; + json['localized_names'].forEach((v) { + localizedNames!.add(new LocalizedNames.fromJson(v)); + }); + } + shortDescription = json['short_description']; + fullDescription = json['full_description']; + fullDescriptionn = json['full_descriptionn']; + approvedRatingSum = json['approved_rating_sum']; + approvedTotalReviews = json['approved_total_reviews']; + sku = json['sku']; + isRx = json['is_rx']; + rxMessage = json['rx_message']; + rxMessagen = json['rx_messagen']; + stockQuantity = json['stock_quantity']; + stockAvailability = json['stock_availability']; + stockAvailabilityn = json['stock_availabilityn']; + allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions']; + orderMinimumQuantity = json['order_minimum_quantity']; + orderMaximumQuantity = json['order_maximum_quantity']; + price = json['price']; + oldPrice = json['old_price']; + discountName = json['discount_name']; + discountNamen = json['discount_namen']; + discountPercentage = json['discount_percentage']; + displayOrder = json['display_order']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['name'] = this.name; + data['namen'] = this.namen; + if (this.localizedNames != null) { + data['localized_names'] = + this.localizedNames!.map((v) => v.toJson()).toList(); + } + data['short_description'] = this.shortDescription; + data['full_description'] = this.fullDescription; + data['full_descriptionn'] = this.fullDescriptionn; + data['approved_rating_sum'] = this.approvedRatingSum; + data['approved_total_reviews'] = this.approvedTotalReviews; + data['sku'] = this.sku; + data['is_rx'] = this.isRx; + data['rx_message'] = this.rxMessage; + data['rx_messagen'] = this.rxMessagen; + data['stock_quantity'] = this.stockQuantity; + data['stock_availability'] = this.stockAvailability; + data['stock_availabilityn'] = this.stockAvailabilityn; + data['allow_back_in_stock_subscriptions'] = + this.allowBackInStockSubscriptions; + data['order_minimum_quantity'] = this.orderMinimumQuantity; + data['order_maximum_quantity'] = this.orderMaximumQuantity; + data['price'] = this.price; + data['old_price'] = this.oldPrice; + data['discount_name'] = this.discountName; + data['discount_namen'] = this.discountNamen; + data['discount_percentage'] = this.discountPercentage; + data['display_order'] = this.displayOrder; + + if (this.images != null) { + data['images'] = this.images!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class LocalizedNames { + int? languageId; + String? localizedName; + + LocalizedNames({this.languageId, this.localizedName}); + + LocalizedNames.fromJson(Map json) { + languageId = json['language_id']; + localizedName = json['localized_name']; + } + + Map toJson() { + final Map data = new Map(); + data['language_id'] = this.languageId; + data['localized_name'] = this.localizedName; + return data; + } +} + +class Images { + int? id; + int? position; + String? src; + String? thumb; + String? attachment; + + Images({this.id, this.position, this.src, this.thumb, this.attachment}); + + Images.fromJson(Map json) { + id = json['id']; + position = json['position']; + src = json['src']; + thumb = json['thumb']; + attachment = json['attachment']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['position'] = this.position; + data['src'] = this.src; + data['thumb'] = this.thumb; + data['attachment'] = this.attachment; + return data; + } +} diff --git a/lib/core/model/pharmacy/offer_products_model.dart b/lib/core/model/pharmacy/offer_products_model.dart new file mode 100644 index 00000000..52520e39 --- /dev/null +++ b/lib/core/model/pharmacy/offer_products_model.dart @@ -0,0 +1,579 @@ +class OfferProductsModel { + String? id; + bool? visibleIndividually; + String? name; + String? namen; + List? localizedNames; + String? shortDescription; + String? shortDescriptionn; + String? fullDescription; + String? fullDescriptionn; + bool? markasNew; + bool? showOnHomePage; + dynamic metaKeywords; + dynamic metaDescription; + dynamic metaTitle; + bool? allowCustomerReviews; + dynamic approvedRatingSum; + dynamic notApprovedRatingSum; + dynamic approvedTotalReviews; + dynamic notApprovedTotalReviews; + String? sku; + bool? isRx; + bool? prescriptionRequired; + dynamic rxMessage; + dynamic rxMessagen; + dynamic manufacturerPartNumber; + dynamic gtin; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; + dynamic maxNumberOfDownloads; + dynamic downloadExpirationDays; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; + dynamic recurringCycleLength; + dynamic recurringTotalCycles; + bool? isRental; + dynamic rentalPriceLength; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; + dynamic additionalShippingCharge; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; + dynamic manageInventoryMethodId; + dynamic stockQuantity; + String? stockAvailability; + String? stockAvailabilityn; + bool? displayStockAvailability; + bool? displayStockQuantity; + dynamic minStockQuantity; + dynamic notifyAdminForQuantityBelow; + bool? allowBackInStockSubscriptions; + dynamic orderMinimumQuantity; + dynamic orderMaximumQuantity; + dynamic allowedQuantities; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; + dynamic preOrderAvailabilityStartDateTimeUtc; + bool? callForPrice; + dynamic price; + dynamic oldPrice; + dynamic productCost; + dynamic specialPrice; + dynamic specialPriceStartDateTimeUtc; + dynamic specialPriceEndDateTimeUtc; + bool? customerEntersPrice; + dynamic minimumCustomerEnteredPrice; + dynamic maximumCustomerEnteredPrice; + bool? basepriceEnabled; + dynamic basepriceAmount; + dynamic basepriceBaseAmount; + bool? hasTierPrices; + bool? hasDiscountsApplied; + String? discountName; + String? discountNamen; + String? discountDescription; + String? discountDescriptionn; + dynamic discountPercentage; + String? currency; + String? currencyn; + dynamic weight; + dynamic length; + dynamic width; + dynamic height; + dynamic availableStartDateTimeUtc; + dynamic availableEndDateTimeUtc; + dynamic displayOrder; + bool? published; + bool? deleted; + String? createdOnUtc; + String? updatedOnUtc; + String? productType; + dynamic parentGroupedProductId; + List? roleIds; + List? discountIds; + List? storeIds; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + List? associatedProductIds; + List? tags; + dynamic vendorId; + String? seName; + + OfferProductsModel( + {this.id, + this.visibleIndividually, + this.name, + this.namen, + this.localizedNames, + this.shortDescription, + this.shortDescriptionn, + this.fullDescription, + this.fullDescriptionn, + this.markasNew, + this.showOnHomePage, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.allowCustomerReviews, + this.approvedRatingSum, + this.notApprovedRatingSum, + this.approvedTotalReviews, + this.notApprovedTotalReviews, + this.sku, + this.isRx, + this.prescriptionRequired, + this.rxMessage, + this.rxMessagen, + this.manufacturerPartNumber, + this.gtin, + this.isGiftCard, + this.requireOtherProducts, + this.automaticallyAddRequiredProducts, + this.isDownload, + this.unlimitedDownloads, + this.maxNumberOfDownloads, + this.downloadExpirationDays, + this.hasSampleDownload, + this.hasUserAgreement, + this.isRecurring, + this.recurringCycleLength, + this.recurringTotalCycles, + this.isRental, + this.rentalPriceLength, + this.isShipEnabled, + this.isFreeShipping, + this.shipSeparately, + this.additionalShippingCharge, + this.isTaxExempt, + this.isTelecommunicationsOrBroadcastingOrElectronicServices, + this.useMultipleWarehouses, + this.manageInventoryMethodId, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.displayStockAvailability, + this.displayStockQuantity, + this.minStockQuantity, + this.notifyAdminForQuantityBelow, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, + this.allowedQuantities, + this.allowAddingOnlyExistingAttributeCombinations, + this.disableBuyButton, + this.disableWishlistButton, + this.availableForPreOrder, + this.preOrderAvailabilityStartDateTimeUtc, + this.callForPrice, + this.price, + this.oldPrice, + this.productCost, + this.specialPrice, + this.specialPriceStartDateTimeUtc, + this.specialPriceEndDateTimeUtc, + this.customerEntersPrice, + this.minimumCustomerEnteredPrice, + this.maximumCustomerEnteredPrice, + this.basepriceEnabled, + this.basepriceAmount, + this.basepriceBaseAmount, + this.hasTierPrices, + this.hasDiscountsApplied, + this.discountName, + this.discountNamen, + this.discountDescription, + this.discountDescriptionn, + this.discountPercentage, + this.currency, + this.currencyn, + this.weight, + this.length, + this.width, + this.height, + this.availableStartDateTimeUtc, + this.availableEndDateTimeUtc, + this.displayOrder, + this.published, + this.deleted, + this.createdOnUtc, + this.updatedOnUtc, + this.productType, + this.parentGroupedProductId, + this.roleIds, + this.discountIds, + this.storeIds, + this.manufacturerIds, + this.reviews, + this.images, + this.attributes, + this.specifications, + this.associatedProductIds, + this.tags, + this.vendorId, + this.seName}); + + OfferProductsModel.fromJson(Map json) { + id = json['id']; + visibleIndividually = json['visible_individually']; + name = json['name']; + namen = json['namen']; + if (json['localized_names'] != null) { + localizedNames = []; + json['localized_names'].forEach((v) { + localizedNames!.add(new LocalizedNames.fromJson(v)); + }); + } + shortDescription = json['short_description']; + shortDescriptionn = json['short_descriptionn']; + fullDescription = json['full_description']; + fullDescriptionn = json['full_descriptionn']; + markasNew = json['markas_new']; + showOnHomePage = json['show_on_home_page']; + metaKeywords = json['meta_keywords']; + metaDescription = json['meta_description']; + metaTitle = json['meta_title']; + allowCustomerReviews = json['allow_customer_reviews']; + approvedRatingSum = json['approved_rating_sum']; + notApprovedRatingSum = json['not_approved_rating_sum']; + approvedTotalReviews = json['approved_total_reviews']; + notApprovedTotalReviews = json['not_approved_total_reviews']; + sku = json['sku']; + isRx = json['is_rx']; + prescriptionRequired = json['prescription_required']; + rxMessage = json['rx_message']; + rxMessagen = json['rx_messagen']; + manufacturerPartNumber = json['manufacturer_part_number']; + gtin = json['gtin']; + isGiftCard = json['is_gift_card']; + requireOtherProducts = json['require_other_products']; + automaticallyAddRequiredProducts = + json['automatically_add_required_products']; + isDownload = json['is_download']; + unlimitedDownloads = json['unlimited_downloads']; + maxNumberOfDownloads = json['max_number_of_downloads']; + downloadExpirationDays = json['download_expiration_days']; + hasSampleDownload = json['has_sample_download']; + hasUserAgreement = json['has_user_agreement']; + isRecurring = json['is_recurring']; + recurringCycleLength = json['recurring_cycle_length']; + recurringTotalCycles = json['recurring_total_cycles']; + isRental = json['is_rental']; + rentalPriceLength = json['rental_price_length']; + isShipEnabled = json['is_ship_enabled']; + isFreeShipping = json['is_free_shipping']; + shipSeparately = json['ship_separately']; + additionalShippingCharge = json['additional_shipping_charge']; + isTaxExempt = json['is_tax_exempt']; + isTelecommunicationsOrBroadcastingOrElectronicServices = + json['is_telecommunications_or_broadcasting_or_electronic_services']; + useMultipleWarehouses = json['use_multiple_warehouses']; + manageInventoryMethodId = json['manage_inventory_method_id']; + stockQuantity = json['stock_quantity']; + stockAvailability = json['stock_availability']; + stockAvailabilityn = json['stock_availabilityn']; + displayStockAvailability = json['display_stock_availability']; + displayStockQuantity = json['display_stock_quantity']; + minStockQuantity = json['min_stock_quantity']; + notifyAdminForQuantityBelow = json['notify_admin_for_quantity_below']; + allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions']; + orderMinimumQuantity = json['order_minimum_quantity']; + orderMaximumQuantity = json['order_maximum_quantity']; + allowedQuantities = json['allowed_quantities']; + allowAddingOnlyExistingAttributeCombinations = + json['allow_adding_only_existing_attribute_combinations']; + disableBuyButton = json['disable_buy_button']; + disableWishlistButton = json['disable_wishlist_button']; + availableForPreOrder = json['available_for_pre_order']; + preOrderAvailabilityStartDateTimeUtc = + json['pre_order_availability_start_date_time_utc']; + callForPrice = json['call_for_price']; + price = json['price']; + oldPrice = json['old_price']; + productCost = json['product_cost']; + specialPrice = json['special_price']; + specialPriceStartDateTimeUtc = json['special_price_start_date_time_utc']; + specialPriceEndDateTimeUtc = json['special_price_end_date_time_utc']; + customerEntersPrice = json['customer_enters_price']; + minimumCustomerEnteredPrice = json['minimum_customer_entered_price']; + maximumCustomerEnteredPrice = json['maximum_customer_entered_price']; + basepriceEnabled = json['baseprice_enabled']; + basepriceAmount = json['baseprice_amount']; + basepriceBaseAmount = json['baseprice_base_amount']; + hasTierPrices = json['has_tier_prices']; + hasDiscountsApplied = json['has_discounts_applied']; + discountName = json['discount_name']; + discountNamen = json['discount_namen']; + discountDescription = json['discount_description']; + discountDescriptionn = json['discount_Descriptionn']; + discountPercentage = json['discount_percentage']; + currency = json['currency']; + currencyn = json['currencyn']; + weight = json['weight']; + length = json['length']; + width = json['width']; + height = json['height']; + availableStartDateTimeUtc = json['available_start_date_time_utc']; + availableEndDateTimeUtc = json['available_end_date_time_utc']; + displayOrder = json['display_order']; + published = json['published']; + deleted = json['deleted']; + createdOnUtc = json['created_on_utc']; + updatedOnUtc = json['updated_on_utc']; + productType = json['product_type']; + parentGroupedProductId = json['parent_grouped_product_id']; + + discountIds = json['discount_ids'].cast(); + + if (json['images'] != null) { + images = []; + json['images'].forEach((v) { + images!.add(new Images.fromJson(v)); + }); + } + + vendorId = json['vendor_id']; + seName = json['se_name']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['visible_individually'] = this.visibleIndividually; + data['name'] = this.name; + data['namen'] = this.namen; + if (this.localizedNames != null) { + data['localized_names'] = + this.localizedNames!.map((v) => v.toJson()).toList(); + } + data['short_description'] = this.shortDescription; + data['short_descriptionn'] = this.shortDescriptionn; + data['full_description'] = this.fullDescription; + data['full_descriptionn'] = this.fullDescriptionn; + data['markas_new'] = this.markasNew; + data['show_on_home_page'] = this.showOnHomePage; + data['meta_keywords'] = this.metaKeywords; + data['meta_description'] = this.metaDescription; + data['meta_title'] = this.metaTitle; + data['allow_customer_reviews'] = this.allowCustomerReviews; + data['approved_rating_sum'] = this.approvedRatingSum; + data['not_approved_rating_sum'] = this.notApprovedRatingSum; + data['approved_total_reviews'] = this.approvedTotalReviews; + data['not_approved_total_reviews'] = this.notApprovedTotalReviews; + data['sku'] = this.sku; + data['is_rx'] = this.isRx; + data['prescription_required'] = this.prescriptionRequired; + data['rx_message'] = this.rxMessage; + data['rx_messagen'] = this.rxMessagen; + data['manufacturer_part_number'] = this.manufacturerPartNumber; + data['gtin'] = this.gtin; + data['is_gift_card'] = this.isGiftCard; + data['require_other_products'] = this.requireOtherProducts; + data['automatically_add_required_products'] = + this.automaticallyAddRequiredProducts; + data['is_download'] = this.isDownload; + data['unlimited_downloads'] = this.unlimitedDownloads; + data['max_number_of_downloads'] = this.maxNumberOfDownloads; + data['download_expiration_days'] = this.downloadExpirationDays; + data['has_sample_download'] = this.hasSampleDownload; + data['has_user_agreement'] = this.hasUserAgreement; + data['is_recurring'] = this.isRecurring; + data['recurring_cycle_length'] = this.recurringCycleLength; + data['recurring_total_cycles'] = this.recurringTotalCycles; + data['is_rental'] = this.isRental; + data['rental_price_length'] = this.rentalPriceLength; + data['is_ship_enabled'] = this.isShipEnabled; + data['is_free_shipping'] = this.isFreeShipping; + data['ship_separately'] = this.shipSeparately; + data['additional_shipping_charge'] = this.additionalShippingCharge; + data['is_tax_exempt'] = this.isTaxExempt; + data['is_telecommunications_or_broadcasting_or_electronic_services'] = + this.isTelecommunicationsOrBroadcastingOrElectronicServices; + data['use_multiple_warehouses'] = this.useMultipleWarehouses; + data['manage_inventory_method_id'] = this.manageInventoryMethodId; + data['stock_quantity'] = this.stockQuantity; + data['stock_availability'] = this.stockAvailability; + data['stock_availabilityn'] = this.stockAvailabilityn; + data['display_stock_availability'] = this.displayStockAvailability; + data['display_stock_quantity'] = this.displayStockQuantity; + data['min_stock_quantity'] = this.minStockQuantity; + data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow; + data['allow_back_in_stock_subscriptions'] = + this.allowBackInStockSubscriptions; + data['order_minimum_quantity'] = this.orderMinimumQuantity; + data['order_maximum_quantity'] = this.orderMaximumQuantity; + data['allowed_quantities'] = this.allowedQuantities; + data['allow_adding_only_existing_attribute_combinations'] = + this.allowAddingOnlyExistingAttributeCombinations; + data['disable_buy_button'] = this.disableBuyButton; + data['disable_wishlist_button'] = this.disableWishlistButton; + data['available_for_pre_order'] = this.availableForPreOrder; + data['pre_order_availability_start_date_time_utc'] = + this.preOrderAvailabilityStartDateTimeUtc; + data['call_for_price'] = this.callForPrice; + data['price'] = this.price; + data['old_price'] = this.oldPrice; + data['product_cost'] = this.productCost; + data['special_price'] = this.specialPrice; + data['special_price_start_date_time_utc'] = + this.specialPriceStartDateTimeUtc; + data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc; + data['customer_enters_price'] = this.customerEntersPrice; + data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice; + data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice; + data['baseprice_enabled'] = this.basepriceEnabled; + data['baseprice_amount'] = this.basepriceAmount; + data['baseprice_base_amount'] = this.basepriceBaseAmount; + data['has_tier_prices'] = this.hasTierPrices; + data['has_discounts_applied'] = this.hasDiscountsApplied; + data['discount_name'] = this.discountName; + data['discount_namen'] = this.discountNamen; + data['discount_description'] = this.discountDescription; + data['discount_Descriptionn'] = this.discountDescriptionn; + data['discount_percentage'] = this.discountPercentage; + data['currency'] = this.currency; + data['currencyn'] = this.currencyn; + data['weight'] = this.weight; + data['length'] = this.length; + data['width'] = this.width; + data['height'] = this.height; + data['available_start_date_time_utc'] = this.availableStartDateTimeUtc; + data['available_end_date_time_utc'] = this.availableEndDateTimeUtc; + data['display_order'] = this.displayOrder; + data['published'] = this.published; + data['deleted'] = this.deleted; + data['created_on_utc'] = this.createdOnUtc; + data['updated_on_utc'] = this.updatedOnUtc; + data['product_type'] = this.productType; + data['parent_grouped_product_id'] = this.parentGroupedProductId; + if (this.roleIds != null) { + data['role_ids'] = this.roleIds!.map((v) => v.toJson()).toList(); + } + data['discount_ids'] = this.discountIds; + if (this.storeIds != null) { + data['store_ids'] = this.storeIds!.map((v) => v.toJson()).toList(); + } + if (this.manufacturerIds != null) { + data['manufacturer_ids'] = + this.manufacturerIds!.map((v) => v.toJson()).toList(); + } + if (this.reviews != null) { + data['reviews'] = this.reviews!.map((v) => v.toJson()).toList(); + } + if (this.images != null) { + data['images'] = this.images!.map((v) => v.toJson()).toList(); + } + if (this.attributes != null) { + data['attributes'] = this.attributes!.map((v) => v.toJson()).toList(); + } + if (this.specifications != null) { + data['specifications'] = + this.specifications!.map((v) => v.toJson()).toList(); + } + if (this.associatedProductIds != null) { + data['associated_product_ids'] = + this.associatedProductIds!.map((v) => v.toJson()).toList(); + } + if (this.tags != null) { + data['tags'] = this.tags!.map((v) => v.toJson()).toList(); + } + data['vendor_id'] = this.vendorId; + data['se_name'] = this.seName; + return data; + } +} + +class LocalizedNames { + int? languageId; + String? localizedName; + + LocalizedNames({this.languageId, this.localizedName}); + + LocalizedNames.fromJson(Map json) { + languageId = json['language_id']; + localizedName = json['localized_name']; + } + + Map toJson() { + final Map data = new Map(); + data['language_id'] = this.languageId; + data['localized_name'] = this.localizedName; + return data; + } +} + +class Images { + int? id; + int? position; + String? src; + String? thumb; + String? attachment; + + Images({this.id, this.position, this.src, this.thumb, this.attachment}); + + Images.fromJson(Map json) { + id = json['id']; + position = json['position']; + src = json['src']; + thumb = json['thumb']; + attachment = json['attachment']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['position'] = this.position; + data['src'] = this.src; + data['thumb'] = this.thumb; + data['attachment'] = this.attachment; + return data; + } +} + +class Specifications { + int? id; + int? displayOrder; + String? defaultValue; + String? defaultValuen; + String? name; + String? nameN; + + Specifications( + {this.id, + this.displayOrder, + this.defaultValue, + this.defaultValuen, + this.name, + this.nameN}); + + Specifications.fromJson(Map json) { + id = json['id']; + displayOrder = json['display_order']; + defaultValue = json['default_value']; + defaultValuen = json['default_valuen']; + name = json['name']; + nameN = json['nameN']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['display_order'] = this.displayOrder; + data['default_value'] = this.defaultValue; + data['default_valuen'] = this.defaultValuen; + data['name'] = this.name; + data['nameN'] = this.nameN; + return data; + } +} diff --git a/lib/core/model/pharmacy/offers_model.dart b/lib/core/model/pharmacy/offers_model.dart new file mode 100644 index 00000000..99d31135 --- /dev/null +++ b/lib/core/model/pharmacy/offers_model.dart @@ -0,0 +1,175 @@ +class OffersModel { + String? id; + String? name; + String? namen; + List? localizedNames; + dynamic description; + int? categoryTemplateId; + String? metaKeywords; + String? metaDescription; + String? metaTitle; + int? parentCategoryId; + int? pageSize; + String? pageSizeOptions; + dynamic priceRanges; + bool? showOnHomePage; + bool? includeInTopMenu; + dynamic hasDiscountsApplied; + bool? published; + bool? deleted; + int? displayOrder; + String? createdOnUtc; + String? updatedOnUtc; + List? roleIds; + List? discountIds; + List? storeIds; + Image? image; + String? seName; + bool? isLeaf; + + OffersModel( + {this.id, + this.name, + this.namen, + this.localizedNames, + this.description, + this.categoryTemplateId, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.parentCategoryId, + this.pageSize, + this.pageSizeOptions, + this.priceRanges, + this.showOnHomePage, + this.includeInTopMenu, + this.hasDiscountsApplied, + this.published, + this.deleted, + this.displayOrder, + this.createdOnUtc, + this.updatedOnUtc, + this.roleIds, + this.discountIds, + this.storeIds, + this.image, + this.seName, + this.isLeaf}); + + OffersModel.fromJson(Map json) { + id = json['id']; + name = json['name']; + namen = json['namen']; + if (json['localized_names'] != null) { + localizedNames =[]; + json['localized_names'].forEach((v) { + localizedNames!.add(new LocalizedNames.fromJson(v)); + }); + } + description = json['description']; + categoryTemplateId = json['category_template_id']; + metaKeywords = json['meta_keywords']; + metaDescription = json['meta_description']; + metaTitle = json['meta_title']; + parentCategoryId = json['parent_category_id']; + pageSize = json['page_size']; + pageSizeOptions = json['page_size_options']; + priceRanges = json['price_ranges']; + showOnHomePage = json['show_on_home_page']; + includeInTopMenu = json['include_in_top_menu']; + hasDiscountsApplied = json['has_discounts_applied']; + published = json['published']; + deleted = json['deleted']; + displayOrder = json['display_order']; + createdOnUtc = json['created_on_utc']; + updatedOnUtc = json['updated_on_utc']; + + image = json['image'] != null ? new Image.fromJson(json['image']) : null; + seName = json['se_name']; + isLeaf = json['is_leaf']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['name'] = this.name; + data['namen'] = this.namen; + if (this.localizedNames != null) { + data['localized_names'] = + this.localizedNames!.map((v) => v.toJson()).toList(); + } + data['description'] = this.description; + data['category_template_id'] = this.categoryTemplateId; + data['meta_keywords'] = this.metaKeywords; + data['meta_description'] = this.metaDescription; + data['meta_title'] = this.metaTitle; + data['parent_category_id'] = this.parentCategoryId; + data['page_size'] = this.pageSize; + data['page_size_options'] = this.pageSizeOptions; + data['price_ranges'] = this.priceRanges; + data['show_on_home_page'] = this.showOnHomePage; + data['include_in_top_menu'] = this.includeInTopMenu; + data['has_discounts_applied'] = this.hasDiscountsApplied; + data['published'] = this.published; + data['deleted'] = this.deleted; + data['display_order'] = this.displayOrder; + data['created_on_utc'] = this.createdOnUtc; + data['updated_on_utc'] = this.updatedOnUtc; + if (this.roleIds != null) { + data['role_ids'] = this.roleIds!.map((v) => v.toJson()).toList(); + } + if (this.discountIds != null) { + data['discount_ids'] = this.discountIds!.map((v) => v.toJson()).toList(); + } + if (this.storeIds != null) { + data['store_ids'] = this.storeIds!.map((v) => v.toJson()).toList(); + } + if (this.image != null) { + data['image'] = this.image!.toJson(); + } + data['se_name'] = this.seName; + data['is_leaf'] = this.isLeaf; + return data; + } +} + +class LocalizedNames { + int? languageId; + String? localizedName; + + LocalizedNames({this.languageId, this.localizedName}); + + LocalizedNames.fromJson(Map json) { + languageId = json['language_id']; + localizedName = json['localized_name']; + } + + Map toJson() { + final Map data = new Map(); + data['language_id'] = this.languageId; + data['localized_name'] = this.localizedName; + return data; + } +} + +class Image { + String? src; + dynamic thumb; + dynamic attachment; + + Image({this.src, this.thumb, this.attachment}); + + Image.fromJson(Map json) { + src = json['src']; + thumb = json['thumb']; + attachment = json['attachment']; + } + + Map toJson() { + final Map data = new Map(); + data['src'] = this.src; + data['thumb'] = this.thumb; + data['attachment'] = this.attachment; + return data; + } +} diff --git a/lib/core/model/pharmacy/parent_products_model.dart b/lib/core/model/pharmacy/parent_products_model.dart new file mode 100644 index 00000000..14d4f03d --- /dev/null +++ b/lib/core/model/pharmacy/parent_products_model.dart @@ -0,0 +1,548 @@ +class ParentProductsModel { + dynamic id; + dynamic visibleIndividually; + dynamic name; + dynamic namen; + List? localizedNames; + dynamic shortDescription; + dynamic shortDescriptionn; + dynamic fullDescription; + dynamic fullDescriptionn; + dynamic markasNew; + dynamic showOnHomePage; + dynamic metaKeywords; + dynamic metaDescription; + dynamic metaTitle; + dynamic allowCustomerReviews; + dynamic approvedRatingSum; + dynamic notApprovedRatingSum; + dynamic approvedTotalReviews; + dynamic notApprovedTotalReviews; + dynamic sku; + dynamic isRx; + dynamic prescriptionRequired; + dynamic rxMessage; + dynamic rxMessagen; + dynamic manufacturerPartNumber; + dynamic gtin; + dynamic isGiftCard; + dynamic requireOtherProducts; + dynamic automaticallyAddRequiredProducts; + dynamic isDownload; + dynamic unlimitedDownloads; + dynamic maxNumberOfDownloads; + dynamic downloadExpirationDays; + dynamic hasSampleDownload; + dynamic hasUserAgreement; + dynamic isRecurring; + dynamic recurringCycleLength; + dynamic recurringTotalCycles; + dynamic isRental; + dynamic rentalPriceLength; + dynamic isShipEnabled; + dynamic isFreeShipping; + dynamic shipSeparately; + dynamic additionalShippingCharge; + dynamic isTaxExempt; + dynamic isTelecommunicationsOrBroadcastingOrElectronicServices; + dynamic useMultipleWarehouses; + dynamic manageInventoryMethodId; + dynamic stockQuantity; + dynamic stockAvailability; + dynamic stockAvailabilityn; + dynamic displayStockAvailability; + dynamic displayStockQuantity; + dynamic minStockQuantity; + dynamic notifyAdminForQuantityBelow; + dynamic allowBackInStockSubscriptions; + dynamic orderMinimumQuantity; + dynamic orderMaximumQuantity; + dynamic allowedQuantities; + dynamic allowAddingOnlyExistingAttributeCombinations; + dynamic disableBuyButton; + dynamic disableWishlistButton; + dynamic availableForPreOrder; + dynamic preOrderAvailabilityStartDateTimeUtc; + dynamic callForPrice; + dynamic price; + dynamic oldPrice; + dynamic productCost; + dynamic specialPrice; + dynamic specialPriceStartDateTimeUtc; + dynamic specialPriceEndDateTimeUtc; + dynamic customerEntersPrice; + dynamic minimumCustomerEnteredPrice; + dynamic maximumCustomerEnteredPrice; + dynamic basepriceEnabled; + dynamic basepriceAmount; + dynamic basepriceBaseAmount; + dynamic hasTierPrices; + dynamic hasDiscountsApplied; + dynamic discountName; + dynamic discountNamen; + dynamic discountDescription; + dynamic discountDescriptionn; + dynamic discountPercentage; + dynamic currency; + dynamic currencyn; + dynamic weight; + dynamic length; + dynamic width; + dynamic height; + dynamic availableStartDateTimeUtc; + dynamic availableEndDateTimeUtc; + dynamic displayOrder; + dynamic published; + dynamic deleted; + dynamic createdOnUtc; + dynamic updatedOnUtc; + dynamic productType; + dynamic parentGroupedProductId; + List? roleIds; + List? discountIds; + List? storeIds; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + List? associatedProductIds; + List? tags; + dynamic vendorId; + String? seName; + + ParentProductsModel( + {this.id, + this.visibleIndividually, + this.name, + this.namen, + this.localizedNames, + this.shortDescription, + this.shortDescriptionn, + this.fullDescription, + this.fullDescriptionn, + this.markasNew, + this.showOnHomePage, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.allowCustomerReviews, + this.approvedRatingSum, + this.notApprovedRatingSum, + this.approvedTotalReviews, + this.notApprovedTotalReviews, + this.sku, + this.isRx, + this.prescriptionRequired, + this.rxMessage, + this.rxMessagen, + this.manufacturerPartNumber, + this.gtin, + this.isGiftCard, + this.requireOtherProducts, + this.automaticallyAddRequiredProducts, + this.isDownload, + this.unlimitedDownloads, + this.maxNumberOfDownloads, + this.downloadExpirationDays, + this.hasSampleDownload, + this.hasUserAgreement, + this.isRecurring, + this.recurringCycleLength, + this.recurringTotalCycles, + this.isRental, + this.rentalPriceLength, + this.isShipEnabled, + this.isFreeShipping, + this.shipSeparately, + this.additionalShippingCharge, + this.isTaxExempt, + this.isTelecommunicationsOrBroadcastingOrElectronicServices, + this.useMultipleWarehouses, + this.manageInventoryMethodId, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.displayStockAvailability, + this.displayStockQuantity, + this.minStockQuantity, + this.notifyAdminForQuantityBelow, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, + this.allowedQuantities, + this.allowAddingOnlyExistingAttributeCombinations, + this.disableBuyButton, + this.disableWishlistButton, + this.availableForPreOrder, + this.preOrderAvailabilityStartDateTimeUtc, + this.callForPrice, + this.price, + this.oldPrice, + this.productCost, + this.specialPrice, + this.specialPriceStartDateTimeUtc, + this.specialPriceEndDateTimeUtc, + this.customerEntersPrice, + this.minimumCustomerEnteredPrice, + this.maximumCustomerEnteredPrice, + this.basepriceEnabled, + this.basepriceAmount, + this.basepriceBaseAmount, + this.hasTierPrices, + this.hasDiscountsApplied, + this.discountName, + this.discountNamen, + this.discountDescription, + this.discountDescriptionn, + this.discountPercentage, + this.currency, + this.currencyn, + this.weight, + this.length, + this.width, + this.height, + this.availableStartDateTimeUtc, + this.availableEndDateTimeUtc, + this.displayOrder, + this.published, + this.deleted, + this.createdOnUtc, + this.updatedOnUtc, + this.productType, + this.parentGroupedProductId, + this.roleIds, + this.discountIds, + this.storeIds, + this.manufacturerIds, + this.reviews, + this.images, + this.attributes, + this.specifications, + this.associatedProductIds, + this.tags, + this.vendorId, + this.seName}); + + ParentProductsModel.fromJson(Map json) { + id = json['id']; + visibleIndividually = json['visible_individually']; + name = json['name']; + if (json['images'] != null) { + images = []; + json['images'].forEach((v) { + images!.add(new Images.fromJson(v)); + }); + } + namen = json['namen']; + if (json['localized_names'] != null) { + localizedNames = []; + json['localized_names'].forEach((v) { + localizedNames!.add(new LocalizedNames.fromJson(v)); + }); + } + shortDescription = json['short_description']; + shortDescriptionn = json['short_descriptionn']; + fullDescription = json['full_description']; + fullDescriptionn = json['full_descriptionn']; + markasNew = json['markas_new']; + showOnHomePage = json['show_on_home_page']; + metaKeywords = json['meta_keywords']; + metaDescription = json['meta_description']; + metaTitle = json['meta_title']; + allowCustomerReviews = json['allow_customer_reviews']; + approvedRatingSum = json['approved_rating_sum']; + notApprovedRatingSum = json['not_approved_rating_sum']; + approvedTotalReviews = json['approved_total_reviews']; + notApprovedTotalReviews = json['not_approved_total_reviews']; + sku = json['sku']; + isRx = json['is_rx']; + prescriptionRequired = json['prescription_required']; + rxMessage = json['rx_message']; + rxMessagen = json['rx_messagen']; + manufacturerPartNumber = json['manufacturer_part_number']; + gtin = json['gtin']; + isGiftCard = json['is_gift_card']; + requireOtherProducts = json['require_other_products']; + automaticallyAddRequiredProducts = json['automatically_add_required_products']; + isDownload = json['is_download']; + unlimitedDownloads = json['unlimited_downloads']; + maxNumberOfDownloads = json['max_number_of_downloads']; + downloadExpirationDays = json['download_expiration_days']; + hasSampleDownload = json['has_sample_download']; + hasUserAgreement = json['has_user_agreement']; + isRecurring = json['is_recurring']; + recurringCycleLength = json['recurring_cycle_length']; + recurringTotalCycles = json['recurring_total_cycles']; + isRental = json['is_rental']; + rentalPriceLength = json['rental_price_length']; + isShipEnabled = json['is_ship_enabled']; + isFreeShipping = json['is_free_shipping']; + shipSeparately = json['ship_separately']; + additionalShippingCharge = json['additional_shipping_charge']; + isTaxExempt = json['is_tax_exempt']; + isTelecommunicationsOrBroadcastingOrElectronicServices = json['is_telecommunications_or_broadcasting_or_electronic_services']; + useMultipleWarehouses = json['use_multiple_warehouses']; + manageInventoryMethodId = json['manage_inventory_method_id']; + stockQuantity = json['stock_quantity']; + stockAvailability = json['stock_availability']; + stockAvailabilityn = json['stock_availabilityn']; + displayStockAvailability = json['display_stock_availability']; + displayStockQuantity = json['display_stock_quantity']; + minStockQuantity = json['min_stock_quantity']; + notifyAdminForQuantityBelow = json['notify_admin_for_quantity_below']; + allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions']; + orderMinimumQuantity = json['order_minimum_quantity']; + orderMaximumQuantity = json['order_maximum_quantity']; + allowedQuantities = json['allowed_quantities']; + allowAddingOnlyExistingAttributeCombinations = json['allow_adding_only_existing_attribute_combinations']; + disableBuyButton = json['disable_buy_button']; + disableWishlistButton = json['disable_wishlist_button']; + availableForPreOrder = json['available_for_pre_order']; + preOrderAvailabilityStartDateTimeUtc = json['pre_order_availability_start_date_time_utc']; + callForPrice = json['call_for_price']; + price = json['price']; + oldPrice = json['old_price']; + productCost = json['product_cost']; + specialPrice = json['special_price']; + specialPriceStartDateTimeUtc = json['special_price_start_date_time_utc']; + specialPriceEndDateTimeUtc = json['special_price_end_date_time_utc']; + customerEntersPrice = json['customer_enters_price']; + minimumCustomerEnteredPrice = json['minimum_customer_entered_price']; + maximumCustomerEnteredPrice = json['maximum_customer_entered_price']; + basepriceEnabled = json['baseprice_enabled']; + basepriceAmount = json['baseprice_amount']; + basepriceBaseAmount = json['baseprice_base_amount']; + hasTierPrices = json['has_tier_prices']; + hasDiscountsApplied = json['has_discounts_applied']; + discountName = json['discount_name']; + discountNamen = json['discount_namen']; + discountDescription = json['discount_description']; + discountDescriptionn = json['discount_Descriptionn']; + discountPercentage = json['discount_percentage']; + currency = json['currency']; + currencyn = json['currencyn']; + weight = json['weight']; + length = json['length']; + width = json['width']; + height = json['height']; + availableStartDateTimeUtc = json['available_start_date_time_utc']; + availableEndDateTimeUtc = json['available_end_date_time_utc']; + displayOrder = json['display_order']; + published = json['published']; + deleted = json['deleted']; + createdOnUtc = json['created_on_utc']; + updatedOnUtc = json['updated_on_utc']; + productType = json['product_type']; + parentGroupedProductId = json['parent_grouped_product_id']; + + manufacturerIds = json['manufacturer_ids'].cast(); + + if (json['specifications'] != null) { + specifications = []; + json['specifications'].forEach((v) { + specifications!.add(new Specifications.fromJson(v)); + }); + } + + vendorId = json['vendor_id']; + seName = json['se_name']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['visible_individually'] = this.visibleIndividually; + data['name'] = this.name; + data['namen'] = this.namen; + if (this.localizedNames != null) { + data['localized_names'] = this.localizedNames!.map((v) => v.toJson()).toList(); + } + data['short_description'] = this.shortDescription; + data['short_descriptionn'] = this.shortDescriptionn; + data['full_description'] = this.fullDescription; + data['full_descriptionn'] = this.fullDescriptionn; + data['markas_new'] = this.markasNew; + data['show_on_home_page'] = this.showOnHomePage; + data['meta_keywords'] = this.metaKeywords; + data['meta_description'] = this.metaDescription; + data['meta_title'] = this.metaTitle; + data['allow_customer_reviews'] = this.allowCustomerReviews; + data['approved_rating_sum'] = this.approvedRatingSum; + data['not_approved_rating_sum'] = this.notApprovedRatingSum; + data['approved_total_reviews'] = this.approvedTotalReviews; + data['not_approved_total_reviews'] = this.notApprovedTotalReviews; + data['sku'] = this.sku; + data['is_rx'] = this.isRx; + data['prescription_required'] = this.prescriptionRequired; + data['rx_message'] = this.rxMessage; + data['rx_messagen'] = this.rxMessagen; + data['manufacturer_part_number'] = this.manufacturerPartNumber; + data['gtin'] = this.gtin; + data['is_gift_card'] = this.isGiftCard; + data['require_other_products'] = this.requireOtherProducts; + data['automatically_add_required_products'] = this.automaticallyAddRequiredProducts; + data['is_download'] = this.isDownload; + data['unlimited_downloads'] = this.unlimitedDownloads; + data['max_number_of_downloads'] = this.maxNumberOfDownloads; + data['download_expiration_days'] = this.downloadExpirationDays; + data['has_sample_download'] = this.hasSampleDownload; + data['has_user_agreement'] = this.hasUserAgreement; + data['is_recurring'] = this.isRecurring; + data['recurring_cycle_length'] = this.recurringCycleLength; + data['recurring_total_cycles'] = this.recurringTotalCycles; + data['is_rental'] = this.isRental; + data['rental_price_length'] = this.rentalPriceLength; + data['is_ship_enabled'] = this.isShipEnabled; + data['is_free_shipping'] = this.isFreeShipping; + data['ship_separately'] = this.shipSeparately; + data['additional_shipping_charge'] = this.additionalShippingCharge; + data['is_tax_exempt'] = this.isTaxExempt; + data['is_telecommunications_or_broadcasting_or_electronic_services'] = this.isTelecommunicationsOrBroadcastingOrElectronicServices; + data['use_multiple_warehouses'] = this.useMultipleWarehouses; + data['manage_inventory_method_id'] = this.manageInventoryMethodId; + data['stock_quantity'] = this.stockQuantity; + data['stock_availability'] = this.stockAvailability; + data['stock_availabilityn'] = this.stockAvailabilityn; + data['display_stock_availability'] = this.displayStockAvailability; + data['display_stock_quantity'] = this.displayStockQuantity; + data['min_stock_quantity'] = this.minStockQuantity; + data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow; + data['allow_back_in_stock_subscriptions'] = this.allowBackInStockSubscriptions; + data['order_minimum_quantity'] = this.orderMinimumQuantity; + data['order_maximum_quantity'] = this.orderMaximumQuantity; + data['allowed_quantities'] = this.allowedQuantities; + data['allow_adding_only_existing_attribute_combinations'] = this.allowAddingOnlyExistingAttributeCombinations; + data['disable_buy_button'] = this.disableBuyButton; + data['disable_wishlist_button'] = this.disableWishlistButton; + data['available_for_pre_order'] = this.availableForPreOrder; + data['pre_order_availability_start_date_time_utc'] = this.preOrderAvailabilityStartDateTimeUtc; + data['call_for_price'] = this.callForPrice; + data['price'] = this.price; + data['old_price'] = this.oldPrice; + data['product_cost'] = this.productCost; + data['special_price'] = this.specialPrice; + data['special_price_start_date_time_utc'] = this.specialPriceStartDateTimeUtc; + data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc; + data['customer_enters_price'] = this.customerEntersPrice; + data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice; + data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice; + data['baseprice_enabled'] = this.basepriceEnabled; + data['baseprice_amount'] = this.basepriceAmount; + data['baseprice_base_amount'] = this.basepriceBaseAmount; + data['has_tier_prices'] = this.hasTierPrices; + data['has_discounts_applied'] = this.hasDiscountsApplied; + data['discount_name'] = this.discountName; + data['discount_namen'] = this.discountNamen; + data['discount_description'] = this.discountDescription; + data['discount_Descriptionn'] = this.discountDescriptionn; + data['discount_percentage'] = this.discountPercentage; + data['currency'] = this.currency; + data['currencyn'] = this.currencyn; + data['weight'] = this.weight; + data['length'] = this.length; + data['width'] = this.width; + data['height'] = this.height; + data['available_start_date_time_utc'] = this.availableStartDateTimeUtc; + data['available_end_date_time_utc'] = this.availableEndDateTimeUtc; + data['display_order'] = this.displayOrder; + data['published'] = this.published; + data['deleted'] = this.deleted; + data['created_on_utc'] = this.createdOnUtc; + data['updated_on_utc'] = this.updatedOnUtc; + data['product_type'] = this.productType; + data['parent_grouped_product_id'] = this.parentGroupedProductId; + + data['manufacturer_ids'] = this.manufacturerIds; + + if (this.images != null) { + data['images'] = this.images!.map((v) => v.toJson()).toList(); + } + + if (this.specifications != null) { + data['specifications'] = this.specifications!.map((v) => v.toJson()).toList(); + } + + data['vendor_id'] = this.vendorId; + data['se_name'] = this.seName; + return data; + } +} + +class LocalizedNames { + int? languageId; + String? localizedName; + + LocalizedNames({this.languageId, this.localizedName}); + + LocalizedNames.fromJson(Map json) { + languageId = json['language_id']; + localizedName = json['localized_name']; + } + + Map toJson() { + final Map data = new Map(); + data['language_id'] = this.languageId; + data['localized_name'] = this.localizedName; + return data; + } +} + +class Images { + int? id; + int? position; + String? src; + String? thumb; + String? attachment; + + Images({this.id, this.position, this.src, this.thumb, this.attachment}); + + Images.fromJson(Map json) { + id = json['id']; + position = json['position']; + src = json['src']; + thumb = json['thumb']; + attachment = json['attachment']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['position'] = this.position; + data['src'] = this.src; + data['thumb'] = this.thumb; + data['attachment'] = this.attachment; + return data; + } +} + +class Specifications { + int? id; + int? displayOrder; + String? defaultValue; + String? defaultValuen; + String? name; + String? nameN; + + Specifications({this.id, this.displayOrder, this.defaultValue, this.defaultValuen, this.name, this.nameN}); + + Specifications.fromJson(Map json) { + id = json['id']; + displayOrder = json['display_order']; + defaultValue = json['default_value']; + defaultValuen = json['default_valuen']; + name = json['name']; + nameN = json['nameN']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['display_order'] = this.displayOrder; + data['default_value'] = this.defaultValue; + data['default_valuen'] = this.defaultValuen; + data['name'] = this.name; + data['nameN'] = this.nameN; + return data; + } +} diff --git a/lib/core/model/pharmacy/pharmacy_categorise.dart b/lib/core/model/pharmacy/pharmacy_categorise.dart new file mode 100644 index 00000000..7b0762e9 --- /dev/null +++ b/lib/core/model/pharmacy/pharmacy_categorise.dart @@ -0,0 +1,93 @@ +class PharmacyCategorise { + dynamic id; + String? name; + dynamic namen; + List? localizedNames; + dynamic description; + dynamic parentCategoryId; + dynamic displayOrder; + dynamic image; + dynamic isLeaf; + + PharmacyCategorise({this.id, this.name, this.namen, this.localizedNames, this.description, this.parentCategoryId, this.displayOrder, this.image, this.isLeaf}); + + PharmacyCategorise.fromJson(Map json) { + try { + id = json['id']; + name = json['name']; + namen = json['namen']; + if (json['localized_names'] != null) { + localizedNames = []; + json['localized_names'].forEach((v) { + localizedNames!.add(new LocalizedNames.fromJson(v)); + }); + } + description = json['description']; + parentCategoryId = json['parent_category_id']; + displayOrder = json['display_order']; + image = json['image'] != null ? new Image.fromJson(json['image']) : null; + isLeaf = json['is_leaf']; + } catch (e) { + print(e); + } + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['name'] = this.name; + data['namen'] = this.namen; + if (this.localizedNames != null) { + data['localized_names'] = this.localizedNames!.map((v) => v.toJson()).toList(); + } + data['description'] = this.description; + data['parent_category_id'] = this.parentCategoryId; + data['display_order'] = this.displayOrder; + if (this.image != null) { + data['image'] = this.image.toJson(); + } + data['is_leaf'] = this.isLeaf; + return data; + } +} + +class LocalizedNames { + int? languageId; + String? localizedName; + + LocalizedNames({this.languageId, this.localizedName}); + + LocalizedNames.fromJson(Map json) { + languageId = json['language_id']; + localizedName = json['localized_name']; + } + + Map toJson() { + final Map data = new Map(); + data['language_id'] = this.languageId; + data['localized_name'] = this.localizedName; + return data; + } +} + +class Image { + String? src; + dynamic thumb; + dynamic attachment; + + Image({this.src, this.thumb, this.attachment}); + + Image.fromJson(Map json) { + src = json['src']; + thumb = json['thumb']; + attachment = json['attachment']; + } + + Map toJson() { + final Map data = new Map(); + data['src'] = this.src; + data['thumb'] = this.thumb; + data['attachment'] = this.attachment; + return data; + } +} diff --git a/lib/core/model/pharmacy/scan_qr_model.dart b/lib/core/model/pharmacy/scan_qr_model.dart new file mode 100644 index 00000000..3adcba75 --- /dev/null +++ b/lib/core/model/pharmacy/scan_qr_model.dart @@ -0,0 +1,566 @@ +class ScanQrModel { + String? id; + bool? visibleIndividually; + String? name; + String? namen; + List? localizedNames; + String? shortDescription; + String? shortDescriptionn; + String? fullDescription; + String? fullDescriptionn; + bool? markasNew; + bool? showOnHomePage; + dynamic metaKeywords; + dynamic metaDescription; + dynamic metaTitle; + bool? allowCustomerReviews; + dynamic approvedRatingSum; + dynamic notApprovedRatingSum; + dynamic approvedTotalReviews; + dynamic notApprovedTotalReviews; + String? sku; + bool? isRx; + bool? prescriptionRequired; + dynamic rxMessage; + dynamic rxMessagen; + dynamic manufacturerPartNumber; + dynamic gtin; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; + dynamic maxNumberOfDownloads; + dynamic downloadExpirationDays; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; + dynamic recurringCycleLength; + dynamic recurringTotalCycles; + bool? isRental; + dynamic rentalPriceLength; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; + dynamic additionalShippingCharge; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; + dynamic manageInventoryMethodId; + dynamic stockQuantity; + String? stockAvailability; + String? stockAvailabilityn; + bool? displayStockAvailability; + bool? displayStockQuantity; + dynamic minStockQuantity; + dynamic notifyAdminForQuantityBelow; + bool? allowBackInStockSubscriptions; + dynamic orderMinimumQuantity; + dynamic orderMaximumQuantity; + dynamic allowedQuantities; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; + dynamic preOrderAvailabilityStartDateTimeUtc; + bool? callForPrice; + dynamic price; + dynamic oldPrice; + dynamic productCost; + dynamic specialPrice; + dynamic specialPriceStartDateTimeUtc; + dynamic specialPriceEndDateTimeUtc; + bool? customerEntersPrice; + dynamic minimumCustomerEnteredPrice; + dynamic maximumCustomerEnteredPrice; + bool? basepriceEnabled; + dynamic basepriceAmount; + dynamic basepriceBaseAmount; + bool? hasTierPrices; + bool? hasDiscountsApplied; + dynamic discountName; + dynamic discountNamen; + dynamic discountDescription; + dynamic discountDescriptionn; + dynamic discountPercentage; + String? currency; + String? currencyn; + double? weight; + dynamic length; + dynamic width; + dynamic height; + dynamic availableStartDateTimeUtc; + dynamic availableEndDateTimeUtc; + dynamic displayOrder; + bool? published; + bool? deleted; + String? createdOnUtc; + String? updatedOnUtc; + String? productType; + dynamic parentGroupedProductId; + List? roleIds; + List? discountIds; + List? storeIds; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + List? associatedProductIds; + List? tags; + dynamic vendorId; + String? seName; + + ScanQrModel( + {this.id, + this.visibleIndividually, + this.name, + this.namen, + this.localizedNames, + this.shortDescription, + this.shortDescriptionn, + this.fullDescription, + this.fullDescriptionn, + this.markasNew, + this.showOnHomePage, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.allowCustomerReviews, + this.approvedRatingSum, + this.notApprovedRatingSum, + this.approvedTotalReviews, + this.notApprovedTotalReviews, + this.sku, + this.isRx, + this.prescriptionRequired, + this.rxMessage, + this.rxMessagen, + this.manufacturerPartNumber, + this.gtin, + this.isGiftCard, + this.requireOtherProducts, + this.automaticallyAddRequiredProducts, + this.isDownload, + this.unlimitedDownloads, + this.maxNumberOfDownloads, + this.downloadExpirationDays, + this.hasSampleDownload, + this.hasUserAgreement, + this.isRecurring, + this.recurringCycleLength, + this.recurringTotalCycles, + this.isRental, + this.rentalPriceLength, + this.isShipEnabled, + this.isFreeShipping, + this.shipSeparately, + this.additionalShippingCharge, + this.isTaxExempt, + this.isTelecommunicationsOrBroadcastingOrElectronicServices, + this.useMultipleWarehouses, + this.manageInventoryMethodId, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.displayStockAvailability, + this.displayStockQuantity, + this.minStockQuantity, + this.notifyAdminForQuantityBelow, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, + this.allowedQuantities, + this.allowAddingOnlyExistingAttributeCombinations, + this.disableBuyButton, + this.disableWishlistButton, + this.availableForPreOrder, + this.preOrderAvailabilityStartDateTimeUtc, + this.callForPrice, + this.price, + this.oldPrice, + this.productCost, + this.specialPrice, + this.specialPriceStartDateTimeUtc, + this.specialPriceEndDateTimeUtc, + this.customerEntersPrice, + this.minimumCustomerEnteredPrice, + this.maximumCustomerEnteredPrice, + this.basepriceEnabled, + this.basepriceAmount, + this.basepriceBaseAmount, + this.hasTierPrices, + this.hasDiscountsApplied, + this.discountName, + this.discountNamen, + this.discountDescription, + this.discountDescriptionn, + this.discountPercentage, + this.currency, + this.currencyn, + this.weight, + this.length, + this.width, + this.height, + this.availableStartDateTimeUtc, + this.availableEndDateTimeUtc, + this.displayOrder, + this.published, + this.deleted, + this.createdOnUtc, + this.updatedOnUtc, + this.productType, + this.parentGroupedProductId, + this.roleIds, + this.discountIds, + this.storeIds, + this.manufacturerIds, + this.reviews, + this.images, + this.attributes, + this.specifications, + this.associatedProductIds, + this.tags, + this.vendorId, + this.seName}); + + ScanQrModel.fromJson(Map json) { + id = json['id']; + visibleIndividually = json['visible_individually']; + name = json['name']; + namen = json['namen']; + if (json['localized_names'] != null) { + localizedNames = []; + json['localized_names'].forEach((v) { + localizedNames!.add(new LocalizedNames.fromJson(v)); + }); + } + shortDescription = json['short_description']; + shortDescriptionn = json['short_descriptionn']; + fullDescription = json['full_description']; + fullDescriptionn = json['full_descriptionn']; + markasNew = json['markas_new']; + showOnHomePage = json['show_on_home_page']; + metaKeywords = json['meta_keywords']; + metaDescription = json['meta_description']; + metaTitle = json['meta_title']; + allowCustomerReviews = json['allow_customer_reviews']; + approvedRatingSum = json['approved_rating_sum']; + notApprovedRatingSum = json['not_approved_rating_sum']; + approvedTotalReviews = json['approved_total_reviews']; + notApprovedTotalReviews = json['not_approved_total_reviews']; + sku = json['sku']; + isRx = json['is_rx']; + prescriptionRequired = json['prescription_required']; + rxMessage = json['rx_message']; + rxMessagen = json['rx_messagen']; + manufacturerPartNumber = json['manufacturer_part_number']; + gtin = json['gtin']; + isGiftCard = json['is_gift_card']; + requireOtherProducts = json['require_other_products']; + automaticallyAddRequiredProducts = json['automatically_add_required_products']; + isDownload = json['is_download']; + unlimitedDownloads = json['unlimited_downloads']; + maxNumberOfDownloads = json['max_number_of_downloads']; + downloadExpirationDays = json['download_expiration_days']; + hasSampleDownload = json['has_sample_download']; + hasUserAgreement = json['has_user_agreement']; + isRecurring = json['is_recurring']; + recurringCycleLength = json['recurring_cycle_length']; + recurringTotalCycles = json['recurring_total_cycles']; + isRental = json['is_rental']; + rentalPriceLength = json['rental_price_length']; + isShipEnabled = json['is_ship_enabled']; + isFreeShipping = json['is_free_shipping']; + shipSeparately = json['ship_separately']; + additionalShippingCharge = json['additional_shipping_charge']; + isTaxExempt = json['is_tax_exempt']; + isTelecommunicationsOrBroadcastingOrElectronicServices = json['is_telecommunications_or_broadcasting_or_electronic_services']; + useMultipleWarehouses = json['use_multiple_warehouses']; + manageInventoryMethodId = json['manage_inventory_method_id']; + stockQuantity = json['stock_quantity']; + stockAvailability = json['stock_availability']; + stockAvailabilityn = json['stock_availabilityn']; + displayStockAvailability = json['display_stock_availability']; + displayStockQuantity = json['display_stock_quantity']; + minStockQuantity = json['min_stock_quantity']; + notifyAdminForQuantityBelow = json['notify_admin_for_quantity_below']; + allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions']; + orderMinimumQuantity = json['order_minimum_quantity']; + orderMaximumQuantity = json['order_maximum_quantity']; + allowedQuantities = json['allowed_quantities']; + allowAddingOnlyExistingAttributeCombinations = json['allow_adding_only_existing_attribute_combinations']; + disableBuyButton = json['disable_buy_button']; + disableWishlistButton = json['disable_wishlist_button']; + availableForPreOrder = json['available_for_pre_order']; + preOrderAvailabilityStartDateTimeUtc = json['pre_order_availability_start_date_time_utc']; + callForPrice = json['call_for_price']; + price = json['price']; + oldPrice = json['old_price']; + productCost = json['product_cost']; + specialPrice = json['special_price']; + specialPriceStartDateTimeUtc = json['special_price_start_date_time_utc']; + specialPriceEndDateTimeUtc = json['special_price_end_date_time_utc']; + customerEntersPrice = json['customer_enters_price']; + minimumCustomerEnteredPrice = json['minimum_customer_entered_price']; + maximumCustomerEnteredPrice = json['maximum_customer_entered_price']; + basepriceEnabled = json['baseprice_enabled']; + basepriceAmount = json['baseprice_amount']; + basepriceBaseAmount = json['baseprice_base_amount']; + hasTierPrices = json['has_tier_prices']; + hasDiscountsApplied = json['has_discounts_applied']; + discountName = json['discount_name']; + discountNamen = json['discount_namen']; + discountDescription = json['discount_description']; + discountDescriptionn = json['discount_Descriptionn']; + discountPercentage = json['discount_percentage']; + currency = json['currency']; + currencyn = json['currencyn']; + weight = json['weight']; + length = json['length']; + width = json['width']; + height = json['height']; + availableStartDateTimeUtc = json['available_start_date_time_utc']; + availableEndDateTimeUtc = json['available_end_date_time_utc']; + displayOrder = json['display_order']; + published = json['published']; + deleted = json['deleted']; + createdOnUtc = json['created_on_utc']; + updatedOnUtc = json['updated_on_utc']; + productType = json['product_type']; + parentGroupedProductId = json['parent_grouped_product_id']; + if (json['role_ids'] != null) { + roleIds = []; + } + if (json['discount_ids'] != null) { + discountIds = []; + } + if (json['store_ids'] != null) { + storeIds = []; + } + manufacturerIds = json['manufacturer_ids'].cast(); + if (json['reviews'] != null) { + reviews = []; + } + if (json['images'] != null) { + images = []; + json['images'].forEach((v) { + images!.add(new Images.fromJson(v)); + }); + } + if (json['attributes'] != null) { + attributes = []; + } + if (json['specifications'] != null) { + specifications = []; + json['specifications'].forEach((v) { + specifications!.add(new Specifications.fromJson(v)); + }); + } + if (json['associated_product_ids'] != null) { + associatedProductIds = []; + } + if (json['tags'] != null) { + tags = []; + } + vendorId = json['vendor_id']; + seName = json['se_name']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['visible_individually'] = this.visibleIndividually; + data['name'] = this.name; + data['namen'] = this.namen; + if (this.localizedNames != null) { + data['localized_names'] = this.localizedNames!.map((v) => v.toJson()).toList(); + } + data['short_description'] = this.shortDescription; + data['short_descriptionn'] = this.shortDescriptionn; + data['full_description'] = this.fullDescription; + data['full_descriptionn'] = this.fullDescriptionn; + data['markas_new'] = this.markasNew; + data['show_on_home_page'] = this.showOnHomePage; + data['meta_keywords'] = this.metaKeywords; + data['meta_description'] = this.metaDescription; + data['meta_title'] = this.metaTitle; + data['allow_customer_reviews'] = this.allowCustomerReviews; + data['approved_rating_sum'] = this.approvedRatingSum; + data['not_approved_rating_sum'] = this.notApprovedRatingSum; + data['approved_total_reviews'] = this.approvedTotalReviews; + data['not_approved_total_reviews'] = this.notApprovedTotalReviews; + data['sku'] = this.sku; + data['is_rx'] = this.isRx; + data['prescription_required'] = this.prescriptionRequired; + data['rx_message'] = this.rxMessage; + data['rx_messagen'] = this.rxMessagen; + data['manufacturer_part_number'] = this.manufacturerPartNumber; + data['gtin'] = this.gtin; + data['is_gift_card'] = this.isGiftCard; + data['require_other_products'] = this.requireOtherProducts; + data['automatically_add_required_products'] = this.automaticallyAddRequiredProducts; + data['is_download'] = this.isDownload; + data['unlimited_downloads'] = this.unlimitedDownloads; + data['max_number_of_downloads'] = this.maxNumberOfDownloads; + data['download_expiration_days'] = this.downloadExpirationDays; + data['has_sample_download'] = this.hasSampleDownload; + data['has_user_agreement'] = this.hasUserAgreement; + data['is_recurring'] = this.isRecurring; + data['recurring_cycle_length'] = this.recurringCycleLength; + data['recurring_total_cycles'] = this.recurringTotalCycles; + data['is_rental'] = this.isRental; + data['rental_price_length'] = this.rentalPriceLength; + data['is_ship_enabled'] = this.isShipEnabled; + data['is_free_shipping'] = this.isFreeShipping; + data['ship_separately'] = this.shipSeparately; + data['additional_shipping_charge'] = this.additionalShippingCharge; + data['is_tax_exempt'] = this.isTaxExempt; + data['is_telecommunications_or_broadcasting_or_electronic_services'] = this.isTelecommunicationsOrBroadcastingOrElectronicServices; + data['use_multiple_warehouses'] = this.useMultipleWarehouses; + data['manage_inventory_method_id'] = this.manageInventoryMethodId; + data['stock_quantity'] = this.stockQuantity; + data['stock_availability'] = this.stockAvailability; + data['stock_availabilityn'] = this.stockAvailabilityn; + data['display_stock_availability'] = this.displayStockAvailability; + data['display_stock_quantity'] = this.displayStockQuantity; + data['min_stock_quantity'] = this.minStockQuantity; + data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow; + data['allow_back_in_stock_subscriptions'] = this.allowBackInStockSubscriptions; + data['order_minimum_quantity'] = this.orderMinimumQuantity; + data['order_maximum_quantity'] = this.orderMaximumQuantity; + data['allowed_quantities'] = this.allowedQuantities; + data['allow_adding_only_existing_attribute_combinations'] = this.allowAddingOnlyExistingAttributeCombinations; + data['disable_buy_button'] = this.disableBuyButton; + data['disable_wishlist_button'] = this.disableWishlistButton; + data['available_for_pre_order'] = this.availableForPreOrder; + data['pre_order_availability_start_date_time_utc'] = this.preOrderAvailabilityStartDateTimeUtc; + data['call_for_price'] = this.callForPrice; + data['price'] = this.price; + data['old_price'] = this.oldPrice; + data['product_cost'] = this.productCost; + data['special_price'] = this.specialPrice; + data['special_price_start_date_time_utc'] = this.specialPriceStartDateTimeUtc; + data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc; + data['customer_enters_price'] = this.customerEntersPrice; + data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice; + data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice; + data['baseprice_enabled'] = this.basepriceEnabled; + data['baseprice_amount'] = this.basepriceAmount; + data['baseprice_base_amount'] = this.basepriceBaseAmount; + data['has_tier_prices'] = this.hasTierPrices; + data['has_discounts_applied'] = this.hasDiscountsApplied; + data['discount_name'] = this.discountName; + data['discount_namen'] = this.discountNamen; + data['discount_description'] = this.discountDescription; + data['discount_Descriptionn'] = this.discountDescriptionn; + data['discount_percentage'] = this.discountPercentage; + data['currency'] = this.currency; + data['currencyn'] = this.currencyn; + data['weight'] = this.weight; + data['length'] = this.length; + data['width'] = this.width; + data['height'] = this.height; + data['available_start_date_time_utc'] = this.availableStartDateTimeUtc; + data['available_end_date_time_utc'] = this.availableEndDateTimeUtc; + data['display_order'] = this.displayOrder; + data['published'] = this.published; + data['deleted'] = this.deleted; + data['created_on_utc'] = this.createdOnUtc; + data['updated_on_utc'] = this.updatedOnUtc; + data['product_type'] = this.productType; + data['parent_grouped_product_id'] = this.parentGroupedProductId; + + data['manufacturer_ids'] = this.manufacturerIds; + + if (this.images != null) { + data['images'] = this.images!.map((v) => v.toJson()).toList(); + } + + if (this.specifications != null) { + data['specifications'] = this.specifications!.map((v) => v.toJson()).toList(); + } + + data['vendor_id'] = this.vendorId; + data['se_name'] = this.seName; + return data; + } +} + +class LocalizedNames { + int? languageId; + String? localizedName; + + LocalizedNames({this.languageId, this.localizedName}); + + LocalizedNames.fromJson(Map json) { + languageId = json['language_id']; + localizedName = json['localized_name']; + } + + Map toJson() { + final Map data = new Map(); + data['language_id'] = this.languageId; + data['localized_name'] = this.localizedName; + return data; + } +} + +class Images { + int? id; + int? position; + String? src; + String? thumb; + String? attachment; + + Images({this.id, this.position, this.src, this.thumb, this.attachment}); + + Images.fromJson(Map json) { + id = json['id']; + position = json['position']; + src = json['src']; + thumb = json['thumb']; + attachment = json['attachment']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['position'] = this.position; + data['src'] = this.src; + data['thumb'] = this.thumb; + data['attachment'] = this.attachment; + return data; + } +} + +class Specifications { + int? id; + int? displayOrder; + String? defaultValue; + String? defaultValuen; + String? name; + String? nameN; + + Specifications({this.id, this.displayOrder, this.defaultValue, this.defaultValuen, this.name, this.nameN}); + + Specifications.fromJson(Map json) { + id = json['id']; + displayOrder = json['display_order']; + defaultValue = json['default_value']; + defaultValuen = json['default_valuen']; + name = json['name']; + nameN = json['nameN']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['display_order'] = this.displayOrder; + data['default_value'] = this.defaultValue; + data['default_valuen'] = this.defaultValuen; + data['name'] = this.name; + data['nameN'] = this.nameN; + return data; + } +} diff --git a/lib/core/model/pharmacy/sub_categories_model.dart b/lib/core/model/pharmacy/sub_categories_model.dart new file mode 100644 index 00000000..cbaf4b16 --- /dev/null +++ b/lib/core/model/pharmacy/sub_categories_model.dart @@ -0,0 +1,75 @@ +class SubCategoriesModel { + String? id; + String? name; + String? namen; + List? localizedNames; + String? description; + int? parentCategoryId; + int? displayOrder; + dynamic image; + bool? isLeaf; + + SubCategoriesModel( + {this.id, + this.name, + this.namen, + this.localizedNames, + this.description, + this.parentCategoryId, + this.displayOrder, + this.image, + this.isLeaf}); + + SubCategoriesModel.fromJson(Map json) { + id = json['id']; + name = json['name']; + namen = json['namen']; + if (json['localized_names'] != null) { + localizedNames = []; + json['localized_names'].forEach((v) { + localizedNames!.add(new LocalizedNames.fromJson(v)); + }); + } + description = json['description']; + parentCategoryId = json['parent_category_id']; + displayOrder = json['display_order']; + image = json['image']; + isLeaf = json['is_leaf']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['name'] = this.name; + data['namen'] = this.namen; + if (this.localizedNames != null) { + data['localized_names'] = + this.localizedNames!.map((v) => v.toJson()).toList(); + } + data['description'] = this.description; + data['parent_category_id'] = this.parentCategoryId; + data['display_order'] = this.displayOrder; + data['image'] = this.image; + data['is_leaf'] = this.isLeaf; + return data; + } +} + +class LocalizedNames { + int? languageId; + String? localizedName; + + LocalizedNames({this.languageId, this.localizedName}); + + LocalizedNames.fromJson(Map json) { + languageId = json['language_id']; + localizedName = json['localized_name']; + } + + Map toJson() { + final Map data = new Map(); + data['language_id'] = this.languageId; + data['localized_name'] = this.localizedName; + return data; + } +} diff --git a/lib/core/model/pharmacy/sub_products_model.dart b/lib/core/model/pharmacy/sub_products_model.dart new file mode 100644 index 00000000..fe5c8dd1 --- /dev/null +++ b/lib/core/model/pharmacy/sub_products_model.dart @@ -0,0 +1,562 @@ +class SubProductsModel { + String? id; + bool? visibleIndividually; + String? name; + String? namen; + List? localizedNames; + String? shortDescription; + String? shortDescriptionn; + String? fullDescription; + String? fullDescriptionn; + bool? markasNew; + bool? showOnHomePage; + dynamic metaKeywords; + dynamic metaDescription; + dynamic metaTitle; + bool? allowCustomerReviews; + dynamic approvedRatingSum; + dynamic notApprovedRatingSum; + dynamic approvedTotalReviews; + dynamic notApprovedTotalReviews; + String? sku; + bool? isRx; + bool? prescriptionRequired; + dynamic rxMessage; + dynamic rxMessagen; + dynamic manufacturerPartNumber; + dynamic gtin; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; + dynamic maxNumberOfDownloads; + dynamic downloadExpirationDays; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; + dynamic recurringCycleLength; + dynamic recurringTotalCycles; + bool? isRental; + dynamic rentalPriceLength; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; + dynamic additionalShippingCharge; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; + dynamic manageInventoryMethodId; + dynamic stockQuantity; + String? stockAvailability; + String? stockAvailabilityn; + bool? displayStockAvailability; + bool? displayStockQuantity; + dynamic minStockQuantity; + dynamic notifyAdminForQuantityBelow; + bool? allowBackInStockSubscriptions; + dynamic orderMinimumQuantity; + dynamic orderMaximumQuantity; + dynamic allowedQuantities; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; + dynamic preOrderAvailabilityStartDateTimeUtc; + bool? callForPrice; + dynamic price; + dynamic oldPrice; + dynamic productCost; + dynamic specialPrice; + dynamic specialPriceStartDateTimeUtc; + dynamic specialPriceEndDateTimeUtc; + bool? customerEntersPrice; + dynamic minimumCustomerEnteredPrice; + dynamic maximumCustomerEnteredPrice; + bool? basepriceEnabled; + dynamic basepriceAmount; + dynamic basepriceBaseAmount; + bool? hasTierPrices; + bool? hasDiscountsApplied; + dynamic discountName; + dynamic discountNamen; + dynamic discountDescription; + dynamic discountDescriptionn; + dynamic discountPercentage; + String? currency; + String? currencyn; + double? weight; + dynamic length; + dynamic width; + dynamic height; + dynamic availableStartDateTimeUtc; + dynamic availableEndDateTimeUtc; + dynamic displayOrder; + bool? published; + bool? deleted; + String? createdOnUtc; + String? updatedOnUtc; + String? productType; + dynamic parentGroupedProductId; + List? roleIds; + List? discountIds; + List? storeIds; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + List? associatedProductIds; + List? tags; + dynamic vendorId; + String? seName; + + SubProductsModel( + {this.id, + this.visibleIndividually, + this.name, + this.namen, + this.localizedNames, + this.shortDescription, + this.shortDescriptionn, + this.fullDescription, + this.fullDescriptionn, + this.markasNew, + this.showOnHomePage, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.allowCustomerReviews, + this.approvedRatingSum, + this.notApprovedRatingSum, + this.approvedTotalReviews, + this.notApprovedTotalReviews, + this.sku, + this.isRx, + this.prescriptionRequired, + this.rxMessage, + this.rxMessagen, + this.manufacturerPartNumber, + this.gtin, + this.isGiftCard, + this.requireOtherProducts, + this.automaticallyAddRequiredProducts, + this.isDownload, + this.unlimitedDownloads, + this.maxNumberOfDownloads, + this.downloadExpirationDays, + this.hasSampleDownload, + this.hasUserAgreement, + this.isRecurring, + this.recurringCycleLength, + this.recurringTotalCycles, + this.isRental, + this.rentalPriceLength, + this.isShipEnabled, + this.isFreeShipping, + this.shipSeparately, + this.additionalShippingCharge, + this.isTaxExempt, + this.isTelecommunicationsOrBroadcastingOrElectronicServices, + this.useMultipleWarehouses, + this.manageInventoryMethodId, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.displayStockAvailability, + this.displayStockQuantity, + this.minStockQuantity, + this.notifyAdminForQuantityBelow, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, + this.allowedQuantities, + this.allowAddingOnlyExistingAttributeCombinations, + this.disableBuyButton, + this.disableWishlistButton, + this.availableForPreOrder, + this.preOrderAvailabilityStartDateTimeUtc, + this.callForPrice, + this.price, + this.oldPrice, + this.productCost, + this.specialPrice, + this.specialPriceStartDateTimeUtc, + this.specialPriceEndDateTimeUtc, + this.customerEntersPrice, + this.minimumCustomerEnteredPrice, + this.maximumCustomerEnteredPrice, + this.basepriceEnabled, + this.basepriceAmount, + this.basepriceBaseAmount, + this.hasTierPrices, + this.hasDiscountsApplied, + this.discountName, + this.discountNamen, + this.discountDescription, + this.discountDescriptionn, + this.discountPercentage, + this.currency, + this.currencyn, + this.weight, + this.length, + this.width, + this.height, + this.availableStartDateTimeUtc, + this.availableEndDateTimeUtc, + this.displayOrder, + this.published, + this.deleted, + this.createdOnUtc, + this.updatedOnUtc, + this.productType, + this.parentGroupedProductId, + this.roleIds, + this.discountIds, + this.storeIds, + this.manufacturerIds, + this.reviews, + this.images, + this.attributes, + this.specifications, + this.associatedProductIds, + this.tags, + this.vendorId, + this.seName}); + + SubProductsModel.fromJson(Map json) { + id = json['id']; + visibleIndividually = json['visible_individually']; + name = json['name']; + if (json['images'] != null) { + images = []; + json['images'].forEach((v) { + images!.add(new Images.fromJson(v)); + }); + } + namen = json['namen']; + if (json['localized_names'] != null) { + localizedNames = []; + json['localized_names'].forEach((v) { + localizedNames!.add(new LocalizedNames.fromJson(v)); + }); + } + shortDescription = json['short_description']; + shortDescriptionn = json['short_descriptionn']; + fullDescription = json['full_description']; + fullDescriptionn = json['full_descriptionn']; + markasNew = json['markas_new']; + showOnHomePage = json['show_on_home_page']; + metaKeywords = json['meta_keywords']; + metaDescription = json['meta_description']; + metaTitle = json['meta_title']; + allowCustomerReviews = json['allow_customer_reviews']; + approvedRatingSum = json['approved_rating_sum']; + notApprovedRatingSum = json['not_approved_rating_sum']; + approvedTotalReviews = json['approved_total_reviews']; + notApprovedTotalReviews = json['not_approved_total_reviews']; + sku = json['sku']; + isRx = json['is_rx']; + prescriptionRequired = json['prescription_required']; + rxMessage = json['rx_message']; + rxMessagen = json['rx_messagen']; + manufacturerPartNumber = json['manufacturer_part_number']; + gtin = json['gtin']; + isGiftCard = json['is_gift_card']; + requireOtherProducts = json['require_other_products']; + automaticallyAddRequiredProducts = + json['automatically_add_required_products']; + isDownload = json['is_download']; + unlimitedDownloads = json['unlimited_downloads']; + maxNumberOfDownloads = json['max_number_of_downloads']; + downloadExpirationDays = json['download_expiration_days']; + hasSampleDownload = json['has_sample_download']; + hasUserAgreement = json['has_user_agreement']; + isRecurring = json['is_recurring']; + recurringCycleLength = json['recurring_cycle_length']; + recurringTotalCycles = json['recurring_total_cycles']; + isRental = json['is_rental']; + rentalPriceLength = json['rental_price_length']; + isShipEnabled = json['is_ship_enabled']; + isFreeShipping = json['is_free_shipping']; + shipSeparately = json['ship_separately']; + additionalShippingCharge = json['additional_shipping_charge']; + isTaxExempt = json['is_tax_exempt']; + isTelecommunicationsOrBroadcastingOrElectronicServices = + json['is_telecommunications_or_broadcasting_or_electronic_services']; + useMultipleWarehouses = json['use_multiple_warehouses']; + manageInventoryMethodId = json['manage_inventory_method_id']; + stockQuantity = json['stock_quantity']; + stockAvailability = json['stock_availability']; + stockAvailabilityn = json['stock_availabilityn']; + displayStockAvailability = json['display_stock_availability']; + displayStockQuantity = json['display_stock_quantity']; + minStockQuantity = json['min_stock_quantity']; + notifyAdminForQuantityBelow = json['notify_admin_for_quantity_below']; + allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions']; + orderMinimumQuantity = json['order_minimum_quantity']; + orderMaximumQuantity = json['order_maximum_quantity']; + allowedQuantities = json['allowed_quantities']; + allowAddingOnlyExistingAttributeCombinations = + json['allow_adding_only_existing_attribute_combinations']; + disableBuyButton = json['disable_buy_button']; + disableWishlistButton = json['disable_wishlist_button']; + availableForPreOrder = json['available_for_pre_order']; + preOrderAvailabilityStartDateTimeUtc = + json['pre_order_availability_start_date_time_utc']; + callForPrice = json['call_for_price']; + price = json['price']; + oldPrice = json['old_price']; + productCost = json['product_cost']; + specialPrice = json['special_price']; + specialPriceStartDateTimeUtc = json['special_price_start_date_time_utc']; + specialPriceEndDateTimeUtc = json['special_price_end_date_time_utc']; + customerEntersPrice = json['customer_enters_price']; + minimumCustomerEnteredPrice = json['minimum_customer_entered_price']; + maximumCustomerEnteredPrice = json['maximum_customer_entered_price']; + basepriceEnabled = json['baseprice_enabled']; + basepriceAmount = json['baseprice_amount']; + basepriceBaseAmount = json['baseprice_base_amount']; + hasTierPrices = json['has_tier_prices']; + hasDiscountsApplied = json['has_discounts_applied']; + discountName = json['discount_name']; + discountNamen = json['discount_namen']; + discountDescription = json['discount_description']; + discountDescriptionn = json['discount_Descriptionn']; + discountPercentage = json['discount_percentage']; + currency = json['currency']; + currencyn = json['currencyn']; + weight = json['weight']; + length = json['length']; + width = json['width']; + height = json['height']; + availableStartDateTimeUtc = json['available_start_date_time_utc']; + availableEndDateTimeUtc = json['available_end_date_time_utc']; + displayOrder = json['display_order']; + published = json['published']; + deleted = json['deleted']; + createdOnUtc = json['created_on_utc']; + updatedOnUtc = json['updated_on_utc']; + productType = json['product_type']; + parentGroupedProductId = json['parent_grouped_product_id']; + + manufacturerIds = json['manufacturer_ids'].cast(); + + if (json['specifications'] != null) { + specifications = []; + json['specifications'].forEach((v) { + specifications!.add(new Specifications.fromJson(v)); + }); + } + + vendorId = json['vendor_id']; + seName = json['se_name']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['visible_individually'] = this.visibleIndividually; + data['name'] = this.name; + data['namen'] = this.namen; + if (this.localizedNames != null) { + data['localized_names'] = + this.localizedNames!.map((v) => v.toJson()).toList(); + } + data['short_description'] = this.shortDescription; + data['short_descriptionn'] = this.shortDescriptionn; + data['full_description'] = this.fullDescription; + data['full_descriptionn'] = this.fullDescriptionn; + data['markas_new'] = this.markasNew; + data['show_on_home_page'] = this.showOnHomePage; + data['meta_keywords'] = this.metaKeywords; + data['meta_description'] = this.metaDescription; + data['meta_title'] = this.metaTitle; + data['allow_customer_reviews'] = this.allowCustomerReviews; + data['approved_rating_sum'] = this.approvedRatingSum; + data['not_approved_rating_sum'] = this.notApprovedRatingSum; + data['approved_total_reviews'] = this.approvedTotalReviews; + data['not_approved_total_reviews'] = this.notApprovedTotalReviews; + data['sku'] = this.sku; + data['is_rx'] = this.isRx; + data['prescription_required'] = this.prescriptionRequired; + data['rx_message'] = this.rxMessage; + data['rx_messagen'] = this.rxMessagen; + data['manufacturer_part_number'] = this.manufacturerPartNumber; + data['gtin'] = this.gtin; + data['is_gift_card'] = this.isGiftCard; + data['require_other_products'] = this.requireOtherProducts; + data['automatically_add_required_products'] = + this.automaticallyAddRequiredProducts; + data['is_download'] = this.isDownload; + data['unlimited_downloads'] = this.unlimitedDownloads; + data['max_number_of_downloads'] = this.maxNumberOfDownloads; + data['download_expiration_days'] = this.downloadExpirationDays; + data['has_sample_download'] = this.hasSampleDownload; + data['has_user_agreement'] = this.hasUserAgreement; + data['is_recurring'] = this.isRecurring; + data['recurring_cycle_length'] = this.recurringCycleLength; + data['recurring_total_cycles'] = this.recurringTotalCycles; + data['is_rental'] = this.isRental; + data['rental_price_length'] = this.rentalPriceLength; + data['is_ship_enabled'] = this.isShipEnabled; + data['is_free_shipping'] = this.isFreeShipping; + data['ship_separately'] = this.shipSeparately; + data['additional_shipping_charge'] = this.additionalShippingCharge; + data['is_tax_exempt'] = this.isTaxExempt; + data['is_telecommunications_or_broadcasting_or_electronic_services'] = + this.isTelecommunicationsOrBroadcastingOrElectronicServices; + data['use_multiple_warehouses'] = this.useMultipleWarehouses; + data['manage_inventory_method_id'] = this.manageInventoryMethodId; + data['stock_quantity'] = this.stockQuantity; + data['stock_availability'] = this.stockAvailability; + data['stock_availabilityn'] = this.stockAvailabilityn; + data['display_stock_availability'] = this.displayStockAvailability; + data['display_stock_quantity'] = this.displayStockQuantity; + data['min_stock_quantity'] = this.minStockQuantity; + data['notify_admin_for_quantity_below'] = this.notifyAdminForQuantityBelow; + data['allow_back_in_stock_subscriptions'] = + this.allowBackInStockSubscriptions; + data['order_minimum_quantity'] = this.orderMinimumQuantity; + data['order_maximum_quantity'] = this.orderMaximumQuantity; + data['allowed_quantities'] = this.allowedQuantities; + data['allow_adding_only_existing_attribute_combinations'] = + this.allowAddingOnlyExistingAttributeCombinations; + data['disable_buy_button'] = this.disableBuyButton; + data['disable_wishlist_button'] = this.disableWishlistButton; + data['available_for_pre_order'] = this.availableForPreOrder; + data['pre_order_availability_start_date_time_utc'] = + this.preOrderAvailabilityStartDateTimeUtc; + data['call_for_price'] = this.callForPrice; + data['price'] = this.price; + data['old_price'] = this.oldPrice; + data['product_cost'] = this.productCost; + data['special_price'] = this.specialPrice; + data['special_price_start_date_time_utc'] = + this.specialPriceStartDateTimeUtc; + data['special_price_end_date_time_utc'] = this.specialPriceEndDateTimeUtc; + data['customer_enters_price'] = this.customerEntersPrice; + data['minimum_customer_entered_price'] = this.minimumCustomerEnteredPrice; + data['maximum_customer_entered_price'] = this.maximumCustomerEnteredPrice; + data['baseprice_enabled'] = this.basepriceEnabled; + data['baseprice_amount'] = this.basepriceAmount; + data['baseprice_base_amount'] = this.basepriceBaseAmount; + data['has_tier_prices'] = this.hasTierPrices; + data['has_discounts_applied'] = this.hasDiscountsApplied; + data['discount_name'] = this.discountName; + data['discount_namen'] = this.discountNamen; + data['discount_description'] = this.discountDescription; + data['discount_Descriptionn'] = this.discountDescriptionn; + data['discount_percentage'] = this.discountPercentage; + data['currency'] = this.currency; + data['currencyn'] = this.currencyn; + data['weight'] = this.weight; + data['length'] = this.length; + data['width'] = this.width; + data['height'] = this.height; + data['available_start_date_time_utc'] = this.availableStartDateTimeUtc; + data['available_end_date_time_utc'] = this.availableEndDateTimeUtc; + data['display_order'] = this.displayOrder; + data['published'] = this.published; + data['deleted'] = this.deleted; + data['created_on_utc'] = this.createdOnUtc; + data['updated_on_utc'] = this.updatedOnUtc; + data['product_type'] = this.productType; + data['parent_grouped_product_id'] = this.parentGroupedProductId; + + data['manufacturer_ids'] = this.manufacturerIds; + + if (this.specifications != null) { + data['specifications'] = + this.specifications!.map((v) => v.toJson()).toList(); + } + + data['vendor_id'] = this.vendorId; + data['se_name'] = this.seName; + return data; + } +} + +class LocalizedNames { + int? languageId; + String? localizedName; + + LocalizedNames({this.languageId, this.localizedName}); + + LocalizedNames.fromJson(Map json) { + languageId = json['language_id']; + localizedName = json['localized_name']; + } + + Map toJson() { + final Map data = new Map(); + data['language_id'] = this.languageId; + data['localized_name'] = this.localizedName; + return data; + } +} + +class Images { + int? id; + int? position; + String? src; + String? thumb; + String? attachment; + + Images({this.id, this.position, this.src, this.thumb, this.attachment}); + + Images.fromJson(Map json) { + id = json['id']; + position = json['position']; + src = json['src']; + thumb = json['thumb']; + attachment = json['attachment']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['position'] = this.position; + data['src'] = this.src; + data['thumb'] = this.thumb; + data['attachment'] = this.attachment; + return data; + } +} + +class Specifications { + int? id; + int? displayOrder; + String? defaultValue; + String? defaultValuen; + String? name; + String? nameN; + + Specifications( + {this.id, + this.displayOrder, + this.defaultValue, + this.defaultValuen, + this.name, + this.nameN}); + + Specifications.fromJson(Map json) { + id = json['id']; + displayOrder = json['display_order']; + defaultValue = json['default_value']; + defaultValuen = json['default_valuen']; + name = json['name']; + nameN = json['nameN']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['display_order'] = this.displayOrder; + data['default_value'] = this.defaultValue; + data['default_valuen'] = this.defaultValuen; + data['name'] = this.name; + data['nameN'] = this.nameN; + return data; + } +} diff --git a/lib/core/model/prescriptions/Prescriptions.dart b/lib/core/model/prescriptions/Prescriptions.dart new file mode 100644 index 00000000..6e63bdad --- /dev/null +++ b/lib/core/model/prescriptions/Prescriptions.dart @@ -0,0 +1,158 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class Prescriptions { + String? setupID; + int? projectID; + int? patientID; + int? appointmentNo; + String? appointmentDate; + String? doctorName; + String? clinicDescription; + String? name; + int? episodeID; + int? actualDoctorRate; + int? admission; + int? clinicID; + String? companyName; + String? despensedStatus; + DateTime? dischargeDate; + int? dischargeNo; + int? doctorID; + String? doctorImageURL; + int? doctorRate; + String? doctorTitle; + int? gender; + String? genderDescription; + bool? isActiveDoctorProfile; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + bool? isInOutPatient; + bool? isLiveCareAppointment; + String? isInOutPatientDescription; + String? isInOutPatientDescriptionN; + bool? isInsurancePatient; + String? nationalityFlagURL; + int? noOfPatientsRate; + String? qR; + List? speciality; + + Prescriptions( + {this.setupID, + this.projectID, + this.patientID, + this.appointmentNo, + this.appointmentDate, + this.doctorName, + this.clinicDescription, + this.name, + this.episodeID, + this.actualDoctorRate, + this.admission, + this.clinicID, + this.companyName, + this.despensedStatus, + this.dischargeDate, + this.dischargeNo, + this.doctorID, + this.doctorImageURL, + this.doctorRate, + this.doctorTitle, + this.gender, + this.genderDescription, + this.isActiveDoctorProfile, + this.isDoctorAllowVedioCall, + this.isExecludeDoctor, + this.isInOutPatient, + this.isInOutPatientDescription, + this.isInOutPatientDescriptionN, + this.isInsurancePatient, + this.nationalityFlagURL, + this.noOfPatientsRate, + this.qR, + this.speciality,this.isLiveCareAppointment}); + + Prescriptions.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + patientID = json['PatientID']; + appointmentNo = json['AppointmentNo']; + appointmentDate = json['AppointmentDate']; + doctorName = json['DoctorName']; + clinicDescription = json['ClinicDescription']; + name = json['Name']; + episodeID = json['EpisodeID']; + actualDoctorRate = json['ActualDoctorRate']; + admission = json['Admission']; + clinicID = json['ClinicID']; + companyName = json['CompanyName']; + despensedStatus = json['Despensed_Status']; + dischargeDate = DateUtil.convertStringToDate(json['DischargeDate']); + dischargeNo = json['DischargeNo']; + doctorID = json['DoctorID']; + doctorImageURL = json['DoctorImageURL']; + doctorRate = json['DoctorRate']; + doctorTitle = json['DoctorTitle']; + gender = json['Gender']; + genderDescription = json['GenderDescription']; + isActiveDoctorProfile = json['IsActiveDoctorProfile']; + isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; + isExecludeDoctor = json['IsExecludeDoctor']; + isInOutPatient = json['IsInOutPatient']; + isInOutPatientDescription = json['IsInOutPatientDescription']; + isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN']; + isInsurancePatient = json['IsInsurancePatient']; + nationalityFlagURL = json['NationalityFlagURL']; + noOfPatientsRate = json['NoOfPatientsRate']; + qR = json['QR']; + isLiveCareAppointment = json['IsLiveCareAppointment']; + // speciality = json['Speciality'].cast(); + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['AppointmentNo'] = this.appointmentNo; + data['AppointmentDate'] = this.appointmentDate; + data['DoctorName'] = this.doctorName; + data['ClinicDescription'] = this.clinicDescription; + data['Name'] = this.name; + data['EpisodeID'] = this.episodeID; + data['ActualDoctorRate'] = this.actualDoctorRate; + data['Admission'] = this.admission; + data['ClinicID'] = this.clinicID; + data['CompanyName'] = this.companyName; + data['Despensed_Status'] = this.despensedStatus; + data['DischargeDate'] = this.dischargeDate; + data['DischargeNo'] = this.dischargeNo; + data['DoctorID'] = this.doctorID; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorRate'] = this.doctorRate; + data['DoctorTitle'] = this.doctorTitle; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile; + data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; + data['IsExecludeDoctor'] = this.isExecludeDoctor; + data['IsInOutPatient'] = this.isInOutPatient; + data['IsInOutPatientDescription'] = this.isInOutPatientDescription; + data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN; + data['IsInsurancePatient'] = this.isInsurancePatient; + data['NationalityFlagURL'] = this.nationalityFlagURL; + data['NoOfPatientsRate'] = this.noOfPatientsRate; + data['QR'] = this.qR; + data['Speciality'] = this.speciality; + data['IsLiveCareAppointment'] = this.isLiveCareAppointment; + return data; + } +} + +class PrescriptionsList { + String? filterName = ""; + List? prescriptionsList = []; + + PrescriptionsList({this.filterName, Prescriptions? prescriptions}) { + prescriptionsList!.add(prescriptions!); + } +} diff --git a/lib/core/model/prescriptions/perscription_pharmacy.dart b/lib/core/model/prescriptions/perscription_pharmacy.dart new file mode 100644 index 00000000..5207ab4f --- /dev/null +++ b/lib/core/model/prescriptions/perscription_pharmacy.dart @@ -0,0 +1,108 @@ +class PharmacyPrescriptions { + String? expiryDate; + dynamic sellingPrice; + int? quantity; + int? itemID; + int? locationID; + int? projectID; + String? setupID; + String? locationDescription; + dynamic locationDescriptionN; + String? itemDescription; + dynamic itemDescriptionN; + String? alias; + int? locationTypeID; + int? barcode; + dynamic companybarcode; + int? cityID; + String? cityName; + dynamic distanceInKilometers; + String? latitude; + int? locationType; + String? longitude; + String? phoneNumber; + String? projectImageURL; + dynamic sortOrder; + + PharmacyPrescriptions( + {this.expiryDate, + this.sellingPrice, + this.quantity, + this.itemID, + this.locationID, + this.projectID, + this.setupID, + this.locationDescription, + this.locationDescriptionN, + this.itemDescription, + this.itemDescriptionN, + this.alias, + this.locationTypeID, + this.barcode, + this.companybarcode, + this.cityID, + this.cityName, + this.distanceInKilometers, + this.latitude, + this.locationType, + this.longitude, + this.phoneNumber, + this.projectImageURL, + this.sortOrder}); + + PharmacyPrescriptions.fromJson(Map json) { + expiryDate = json['ExpiryDate']; + sellingPrice = json['SellingPrice']; + quantity = json['Quantity']; + itemID = json['ItemID']; + locationID = json['LocationID']; + projectID = json['ProjectID']; + setupID = json['SetupID']; + locationDescription = json['LocationDescription']; + locationDescriptionN = json['LocationDescriptionN']; + itemDescription = json['ItemDescription']; + itemDescriptionN = json['ItemDescriptionN']; + alias = json['Alias']; + locationTypeID = json['LocationTypeID']; + barcode = json['Barcode']; + companybarcode = json['Companybarcode']; + cityID = json['CityID']; + cityName = json['CityName']; + distanceInKilometers = json['DistanceInKilometers']; + latitude = json['Latitude']; + locationType = json['LocationType']; + longitude = json['Longitude']; + phoneNumber = json['PhoneNumber']; + projectImageURL = json['ProjectImageURL']; + sortOrder = json['SortOrder']; + } + + Map toJson() { + final Map data = new Map(); + data['ExpiryDate'] = this.expiryDate; + data['SellingPrice'] = this.sellingPrice; + data['Quantity'] = this.quantity; + data['ItemID'] = this.itemID; + data['LocationID'] = this.locationID; + data['ProjectID'] = this.projectID; + data['SetupID'] = this.setupID; + data['LocationDescription'] = this.locationDescription; + data['LocationDescriptionN'] = this.locationDescriptionN; + data['ItemDescription'] = this.itemDescription; + data['ItemDescriptionN'] = this.itemDescriptionN; + data['Alias'] = this.alias; + data['LocationTypeID'] = this.locationTypeID; + data['Barcode'] = this.barcode; + data['Companybarcode'] = this.companybarcode; + data['CityID'] = this.cityID; + data['CityName'] = this.cityName; + data['DistanceInKilometers'] = this.distanceInKilometers; + data['Latitude'] = this.latitude; + data['LocationType'] = this.locationType; + data['Longitude'] = this.longitude; + data['PhoneNumber'] = this.phoneNumber; + data['ProjectImageURL'] = this.projectImageURL; + data['SortOrder'] = this.sortOrder; + return data; + } +} diff --git a/lib/core/model/prescriptions/prescription_info_rc_model.dart b/lib/core/model/prescriptions/prescription_info_rc_model.dart new file mode 100644 index 00000000..fffb9bdd --- /dev/null +++ b/lib/core/model/prescriptions/prescription_info_rc_model.dart @@ -0,0 +1,52 @@ +class PrescriptionInfoRCModel { + String? itemDescription; + String? image; + String? sKU; + dynamic productId; + dynamic productName; + int? quantity; + int? orderId; + int? totalPrice; + int? dispenseQuantity; + dynamic itemhand; + + PrescriptionInfoRCModel( + {this.itemDescription, + this.image, + this.sKU, + this.productId, + this.productName, + this.quantity, + this.orderId, + this.totalPrice, + this.dispenseQuantity, + this.itemhand}); + + PrescriptionInfoRCModel.fromJson(Map json) { + itemDescription = json['ItemDescription']; + image = json['image']; + sKU = json['SKU']; + productId = json['ProductId']; + productName = json['ProductName']; + quantity = json['Quantity']; + orderId = json['OrderId']; + totalPrice = json['TotalPrice']; + dispenseQuantity = json['DispenseQuantity']; + itemhand = json['itemhand']; + } + + Map toJson() { + final Map data = new Map(); + data['ItemDescription'] = this.itemDescription; + data['image'] = this.image; + data['SKU'] = this.sKU; + data['ProductId'] = this.productId; + data['ProductName'] = this.productName; + data['Quantity'] = this.quantity; + data['OrderId'] = this.orderId; + data['TotalPrice'] = this.totalPrice; + data['DispenseQuantity'] = this.dispenseQuantity; + data['itemhand'] = this.itemhand; + return data; + } +} diff --git a/lib/core/model/prescriptions/prescription_report.dart b/lib/core/model/prescriptions/prescription_report.dart new file mode 100644 index 00000000..b4a3e0b7 --- /dev/null +++ b/lib/core/model/prescriptions/prescription_report.dart @@ -0,0 +1,193 @@ + + +class PrescriptionReport { + String? address; + int? appointmentNo; + String? clinic; + String? companyName; + int? days; + String? doctorName; + num? doseDailyQuantity; + String? frequency; + int? frequencyNumber; + String? image; + String? imageExtension; + String? imageSRCUrl; + String? imageString; + String? imageThumbUrl; + String? isCovered; + String? itemDescription; + int? itemID; + String? orderDate; + int? patientID; + String? patientName; + String? phoneOffice1; + String? prescriptionQR; + num? prescriptionTimes; + String? productImage; + String? productImageBase64; + String? productImageString; + int? projectID; + String? projectName; + String? remarks; + String? route; + String? sKU; + int? scaleOffset; + String? startDate; + + String? patientAge; + String? patientGender; + String? phoneOffice; + int? doseTimingID; + int? frequencyID; + int? routeID; + String? name; + String? itemDescriptionN; + String? routeN; + String? frequencyN; + + PrescriptionReport({ + 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.patientAge, + this.patientGender, + this.phoneOffice, + this.doseTimingID, + this.frequencyID, + this.routeID, + this.name, + this.itemDescriptionN, + this.routeN, + this.frequencyN, + }); + + PrescriptionReport.fromJson(Map json) { + address = json['Address']; + appointmentNo = json['AppointmentNo']; + clinic = json['Clinic']; + companyName = json['CompanyName']; + days = json['Days']; + doctorName = json['DoctorName']; + doseDailyQuantity = json['DoseDailyQuantity']; + frequency = json['Frequency']; + frequencyNumber = json['FrequencyNumber']; + image = json['Image']; + imageExtension = json['ImageExtension']; + imageSRCUrl = json['ImageSRCUrl']; + imageString = json['ImageString']; + imageThumbUrl = json['ImageThumbUrl']; + isCovered = json['IsCovered']; + itemDescription = json['ItemDescription']; + itemID = json['ItemID']; + orderDate = json['OrderDate']; + patientID = json['PatientID']; + patientName = json['PatientName']; + phoneOffice1 = json['PhoneOffice1']; + prescriptionQR = json['PrescriptionQR']; + prescriptionTimes = json['PrescriptionTimes']; + productImage = json['ProductImage']; + productImageBase64 = json['ProductImageBase64']; + productImageString = json['ProductImageString']; + projectID = json['ProjectID']; + projectName = json['ProjectName']; + remarks = json['Remarks']; + route = json['Route']; + sKU = json['SKU']; + scaleOffset = json['ScaleOffset']; + startDate = json['StartDate']; + + patientAge = json['patientAge']; + patientGender = json['patientGender']; + phoneOffice = json['phoneOffice']; + doseTimingID = json['doseTimingID']; + frequencyID = json['frequencyID']; + routeID = json['routeID']; + name = json['name']; + itemDescriptionN = json['ItemDescriptionN']; + routeN = json['routeN']; + frequencyN = json['frequencyN']; + } + + Map toJson() { + final Map data = new Map(); + + data['Address'] = this.address; + data['AppointmentNo'] = this.appointmentNo; + data['Clinic'] = this.clinic; + data['CompanyName'] = this.companyName; + data['Days'] = this.days; + data['DoctorName'] = this.doctorName; + data['DoseDailyQuantity'] = this.doseDailyQuantity; + data['Frequency'] = this.frequency; + data['FrequencyNumber'] = this.frequencyNumber; + data['Image'] = this.image; + data['ImageExtension'] = this.imageExtension; + data['ImageSRCUrl'] = this.imageSRCUrl; + data['ImageString'] = this.imageString; + data['ImageThumbUrl'] = this.imageThumbUrl; + data['IsCovered'] = this.isCovered; + data['ItemDescription'] = this.itemDescription; + data['ItemID'] = this.itemID; + data['OrderDate'] = this.orderDate; + data['PatientID'] = this.patientID; + data['PatientName'] = this.patientName; + data['PhoneOffice1'] = this.phoneOffice1; + data['PrescriptionQR'] = this.prescriptionQR; + data['PrescriptionTimes'] = this.prescriptionTimes; + data['ProductImage'] = this.productImage; + data['ProductImageBase64'] = this.productImageBase64; + data['ProductImageString'] = this.productImageString; + data['ProjectID'] = this.projectID; + data['ProjectName'] = this.projectName; + data['Remarks'] = this.remarks; + data['Route'] = this.route; + data['SKU'] = this.sKU; + data['ScaleOffset'] = this.scaleOffset; + data['StartDate'] = this.startDate; + + data['PatientAge'] = this.patientAge; + data['PatientGender'] = this.patientGender; + data['PhoneOffice'] = this.phoneOffice; + data['DoseTimingID'] = this.doseTimingID; + data['FrequencyID'] = this.frequencyID; + data['RouteID'] = this.routeID; + data['Name'] = this.name; + data['ItemDescriptionN'] = this.itemDescriptionN; + data['RouteN'] = this.routeN; + data['FrequencyN'] = this.frequencyN; + data['hasPlan'] = false; + + return data; + } +} diff --git a/lib/core/model/prescriptions/prescription_report_enh.dart b/lib/core/model/prescriptions/prescription_report_enh.dart new file mode 100644 index 00000000..15fad569 --- /dev/null +++ b/lib/core/model/prescriptions/prescription_report_enh.dart @@ -0,0 +1,148 @@ +class PrescriptionReportEnh { + String? address; + int? appointmentNo; + String? clinic; + dynamic companyName; + int? days; + String? doctorName; + num? doseDailyQuantity; + String? frequency; + int? frequencyNumber; + dynamic image; + dynamic imageExtension; + String? imageSRCUrl; + dynamic imageString; + String? imageThumbUrl; + String? isCovered; + String? itemDescription; + String? itemDescriptionN; + int? itemID; + String? orderDate; + int? patientID; + String? patientName; + String? phoneOffice1; + dynamic prescriptionQR; + num? prescriptionTimes; + dynamic productImage; + dynamic productImageBase64; + String? productImageString; + int? projectID; + String? projectName; + String? remarks; + String? route; + String? sKU; + int? scaleOffset; + String? startDate; + + 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.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']; + appointmentNo = json['AppointmentNo']; + clinic = json['Clinic']; + companyName = json['CompanyName']; + days = json['Days']; + doctorName = json['DoctorName']; + doseDailyQuantity = json['DoseDailyQuantity']; + frequency = json['Frequency']; + frequencyNumber = json['FrequencyNumber']; + image = json['Image']; + imageExtension = json['ImageExtension']; + imageSRCUrl = json['ImageSRCUrl']; + imageString = json['ImageString']; + imageThumbUrl = json['ImageThumbUrl']; + isCovered = json['IsCovered']; + itemDescription = json['ItemDescription']; + itemDescriptionN = json['ItemDescriptionN']; + itemID = json['ItemID']; + orderDate = json['OrderDate']; + patientID = json['PatientID']; + patientName = json['PatientName']; + phoneOffice1 = json['PhoneOffice1']; + prescriptionQR = json['PrescriptionQR']; + prescriptionTimes = json['PrescriptionTimes']; + productImage = json['ProductImage']; + productImageBase64 = json['ProductImageBase64']; + productImageString = json['ProductImageString']; + projectID = json['ProjectID']; + projectName = json['ProjectName']; + remarks = json['Remarks']; + route = json['Route']; + sKU = json['SKU']; + scaleOffset = json['ScaleOffset']; + startDate = json['StartDate']; + } + + Map toJson() { + final Map data = new Map(); + data['Address'] = this.address; + data['AppointmentNo'] = this.appointmentNo; + data['Clinic'] = this.clinic; + data['CompanyName'] = this.companyName; + data['Days'] = this.days; + data['DoctorName'] = this.doctorName; + data['DoseDailyQuantity'] = this.doseDailyQuantity; + data['Frequency'] = this.frequency; + data['FrequencyNumber'] = this.frequencyNumber; + data['Image'] = this.image; + data['ImageExtension'] = this.imageExtension; + data['ImageSRCUrl'] = this.imageSRCUrl; + data['ImageString'] = this.imageString; + 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; + data['PatientName'] = this.patientName; + data['PhoneOffice1'] = this.phoneOffice1; + data['PrescriptionQR'] = this.prescriptionQR; + data['PrescriptionTimes'] = this.prescriptionTimes; + data['ProductImage'] = this.productImage; + data['ProductImageBase64'] = this.productImageBase64; + data['ProductImageString'] = this.productImageString; + data['ProjectID'] = this.projectID; + data['ProjectName'] = this.projectName; + data['Remarks'] = this.remarks; + data['Route'] = this.route; + data['SKU'] = this.sKU; + data['ScaleOffset'] = this.scaleOffset; + data['StartDate'] = this.startDate; + return data; + } +} 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..24fd8d24 --- /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; + num? doseDailyQuantity; + int? itemID; + dynamic 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/prescriptions_order.dart b/lib/core/model/prescriptions/prescriptions_order.dart new file mode 100644 index 00000000..1241ea15 --- /dev/null +++ b/lib/core/model/prescriptions/prescriptions_order.dart @@ -0,0 +1,149 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; + +class PrescriptionsOrder { + int? iD; + dynamic patientID; + bool? patientOutSA; + bool? isOutPatient; + int? projectID; + int? nearestProjectID; + double? longitude; + double? latitude; + dynamic appointmentNo; + dynamic dischargeID; + int? lineItemNo; + int? status; + dynamic description; + dynamic descriptionN; + DateTime? createdOn; + int? serviceID; + int? createdBy; + DateTime? editedOn; + int? editedBy; + int? channel; + dynamic clientRequestID; + bool? returnedToQueue; + dynamic pickupDateTime; + dynamic pickupLocationName; + dynamic dropoffLocationName; + int? realRRTHaveTransactions; + dynamic nearestProjectDescription; + dynamic nearestProjectDescriptionN; + dynamic projectDescription; + dynamic projectDescriptionN; + + String getNearestProjectDescription(){ + return isAppArabic ? nearestProjectDescriptionN : nearestProjectDescription; + } + String getStatusName(TranslationBase localize){ + if(status == 1) + return localize.pending; + else if(status == 3) + return localize.completed; + return '$status'; + } + + String getFormattedDateTime()=> DateUtil.getWeekDayMonthDayYearDateFormatted(createdOn!, isAppArabic ? 'ar' : 'en'); + + PrescriptionsOrder( + {this.iD, + this.patientID, + this.patientOutSA, + this.isOutPatient, + this.projectID, + this.nearestProjectID, + this.longitude, + this.latitude, + this.appointmentNo, + this.dischargeID, + this.lineItemNo, + this.status, + this.description, + this.descriptionN, + this.createdOn, + this.serviceID, + this.createdBy, + this.editedOn, + this.editedBy, + this.channel, + this.clientRequestID, + this.returnedToQueue, + this.pickupDateTime, + this.pickupLocationName, + this.dropoffLocationName, + this.realRRTHaveTransactions, + this.nearestProjectDescription, + this.nearestProjectDescriptionN, + this.projectDescription, + this.projectDescriptionN}); + + PrescriptionsOrder.fromJson(Map json) { + iD = json['ID']; + patientID = json['PatientID']; + patientOutSA = json['PatientOutSA']; + isOutPatient = json['IsOutPatient']; + projectID = json['ProjectID']; + nearestProjectID = json['NearestProjectID']; + longitude = json['Longitude']; + latitude = json['Latitude']; + appointmentNo = json['AppointmentNo']; + dischargeID = json['DischargeID']; + lineItemNo = json['LineItemNo']; + status = json['Status']; + description = json['Description']; + descriptionN = json['DescriptionN']; + createdOn = DateUtil.convertStringToDate(json['CreatedOn']); + serviceID = json['ServiceID']; + createdBy = json['CreatedBy']; + editedOn = DateUtil.convertStringToDate(json['EditedOn']); + editedBy = json['EditedBy']; + channel = json['Channel']; + clientRequestID = json['ClientRequestID']; + returnedToQueue = json['ReturnedToQueue']; + pickupDateTime = json['PickupDateTime']; + pickupLocationName = json['PickupLocationName']; + dropoffLocationName = json['DropoffLocationName']; + realRRTHaveTransactions = json['RealRRT_HaveTransactions']; + nearestProjectDescription = json['NearestProjectDescription']; + nearestProjectDescriptionN = json['NearestProjectDescriptionN']; + projectDescription = json['ProjectDescription']; + projectDescriptionN = json['ProjectDescriptionN']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['PatientID'] = this.patientID; + data['PatientOutSA'] = this.patientOutSA; + data['IsOutPatient'] = this.isOutPatient; + data['ProjectID'] = this.projectID; + data['NearestProjectID'] = this.nearestProjectID; + data['Longitude'] = this.longitude; + data['Latitude'] = this.latitude; + data['AppointmentNo'] = this.appointmentNo; + data['DischargeID'] = this.dischargeID; + data['LineItemNo'] = this.lineItemNo; + data['Status'] = this.status; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + data['CreatedOn'] = this.createdOn; + data['ServiceID'] = this.serviceID; + data['CreatedBy'] = this.createdBy; + data['EditedOn'] = this.editedOn; + data['EditedBy'] = this.editedBy; + data['Channel'] = this.channel; + data['ClientRequestID'] = this.clientRequestID; + data['ReturnedToQueue'] = this.returnedToQueue; + data['PickupDateTime'] = this.pickupDateTime; + data['PickupLocationName'] = this.pickupLocationName; + data['DropoffLocationName'] = this.dropoffLocationName; + data['RealRRT_HaveTransactions'] = this.realRRTHaveTransactions; + data['NearestProjectDescription'] = this.nearestProjectDescription; + data['NearestProjectDescriptionN'] = this.nearestProjectDescriptionN; + data['ProjectDescription'] = this.projectDescription; + data['ProjectDescriptionN'] = this.projectDescriptionN; + return data; + } +} diff --git a/lib/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart b/lib/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart new file mode 100644 index 00000000..b870a617 --- /dev/null +++ b/lib/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart @@ -0,0 +1,60 @@ +class RequestGetListPharmacyForPrescriptions { + dynamic latitude; + dynamic longitude; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? itemID; + + RequestGetListPharmacyForPrescriptions( + {this.latitude, + this.longitude, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.itemID}); + + RequestGetListPharmacyForPrescriptions.fromJson(Map json) { + latitude = json['Latitude']; + longitude = json['Longitude']; + 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']; + itemID = json['ItemID']; + } + + Map toJson() { + final Map data = new Map(); + data['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + 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['ItemID'] = this.itemID; + return data; + } +} diff --git a/lib/core/model/prescriptions/request_prescription_report.dart b/lib/core/model/prescriptions/request_prescription_report.dart new file mode 100644 index 00000000..73b6655c --- /dev/null +++ b/lib/core/model/prescriptions/request_prescription_report.dart @@ -0,0 +1,88 @@ +class RequestPrescriptionReport { + 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? appointmentNo; + String? setupID; + int? episodeID; + int? clinicID; + int? projectID; + int? dischargeNo; + + RequestPrescriptionReport( + {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.appointmentNo, + this.setupID, + this.episodeID, + this.clinicID, + this.projectID, + this.dischargeNo}); + + RequestPrescriptionReport.fromJson(Map json) { + 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']; + appointmentNo = json['AppointmentNo']; + setupID = json['SetupID']; + episodeID = json['EpisodeID']; + clinicID = json['ClinicID']; + projectID = json['ProjectID']; + dischargeNo = json['DischargeNo']; + } + + 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['PatientType'] = this.patientType; + data['AppointmentNo'] = this.appointmentNo; + data['SetupID'] = this.setupID; + data['EpisodeID'] = this.episodeID; + data['ClinicID'] = this.clinicID; + data['ProjectID'] = this.projectID; + data['DischargeNo'] = this.dischargeNo; + return data; + } +} diff --git a/lib/core/model/prescriptions/request_prescription_report_enh.dart b/lib/core/model/prescriptions/request_prescription_report_enh.dart new file mode 100644 index 00000000..81cdeae3 --- /dev/null +++ b/lib/core/model/prescriptions/request_prescription_report_enh.dart @@ -0,0 +1,86 @@ +class RequestPrescriptionReportEnh { + 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? appointmentNo; + String? setupID; + int? dischargeNo; + int? episodeID; + int? clinicID; + int? projectID; + + RequestPrescriptionReportEnh( + {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.appointmentNo, + this.setupID, + this.episodeID, + this.clinicID, + this.projectID,this.dischargeNo}); + + RequestPrescriptionReportEnh.fromJson(Map json) { + 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']; + appointmentNo = json['AppointmentNo']; + setupID = json['SetupID']; + episodeID = json['EpisodeID']; + clinicID = json['ClinicID']; + projectID = json['ProjectID']; + } + + 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['PatientType'] = this.patientType; + data['AppointmentNo'] = this.appointmentNo; + data['SetupID'] = this.setupID; + data['EpisodeID'] = this.episodeID; + data['ClinicID'] = this.clinicID; + data['ProjectID'] = this.projectID; + data['DischargeNo'] = this.dischargeNo; + return data; + } +} diff --git a/lib/core/model/prescriptions/request_prescriptions.dart b/lib/core/model/prescriptions/request_prescriptions.dart new file mode 100644 index 00000000..605ba800 --- /dev/null +++ b/lib/core/model/prescriptions/request_prescriptions.dart @@ -0,0 +1,64 @@ +class RequestPrescriptions { + 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; + + RequestPrescriptions( + {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}); + + RequestPrescriptions.fromJson(Map json) { + 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']; + } + + 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['PatientType'] = this.patientType; + return data; + } +} diff --git a/lib/core/model/prescriptions/request_prescriptions_orders.dart b/lib/core/model/prescriptions/request_prescriptions_orders.dart new file mode 100644 index 00000000..73b877b4 --- /dev/null +++ b/lib/core/model/prescriptions/request_prescriptions_orders.dart @@ -0,0 +1,52 @@ +class RequestPrescriptionsOrders { + int? patientID; + int? patientOutSA; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + + RequestPrescriptionsOrders( + {this.patientID, + this.patientOutSA, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID}); + + RequestPrescriptionsOrders.fromJson(Map json) { + patientID = json['PatientID']; + patientOutSA = json['PatientOutSA']; + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + sessionID = json['SessionID']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; + deviceTypeID = json['DeviceTypeID']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientID'] = this.patientID; + data['PatientOutSA'] = this.patientOutSA; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['SessionID'] = this.sessionID; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['DeviceTypeID'] = this.deviceTypeID; + return data; + } +} diff --git a/lib/core/model/prescriptions/request_send_prescription_email.dart b/lib/core/model/prescriptions/request_send_prescription_email.dart new file mode 100644 index 00000000..ccb522cf --- /dev/null +++ b/lib/core/model/prescriptions/request_send_prescription_email.dart @@ -0,0 +1,122 @@ +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart'; + +class RequestSendPrescriptionEmail { + String? appointmentDate; + 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; + String? to; + String? dateofBirth; + String? patientIditificationNum; + String? patientMobileNumber; + String? patientName; + String? setupID; + String? clinicName; + String? doctorName; + int? doctorID; + int? projectID; + List? listPrescriptions; + List? listPrescriptionsINP; + bool? isDownload; + + RequestSendPrescriptionEmail( + {this.appointmentDate, + 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.to, + this.dateofBirth, + this.patientIditificationNum, + this.patientMobileNumber, + this.patientName, + this.setupID, + this.clinicName, + this.doctorName, + this.projectID, + this.doctorID, + this.isDownload}); + + RequestSendPrescriptionEmail.fromJson(Map json) { + appointmentDate = json['AppointmentDate']; + 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']; + to = json['To']; + dateofBirth = json['DateofBirth']; + patientIditificationNum = json['PatientIditificationNum']; + patientMobileNumber = json['PatientMobileNumber']; + patientName = json['PatientName']; + setupID = json['SetupID']; + clinicName = json['ClinicName']; + doctorName = json['DoctorName']; + projectID = json['ProjectID']; + doctorID = json['DoctorID']; + } + + Map toJson() { + final Map data = new Map(); + data['AppointmentDate'] = this.appointmentDate; + 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['PatientType'] = this.patientType; + data['To'] = this.to; + data['DateofBirth'] = this.dateofBirth; + data['PatientIditificationNum'] = this.patientIditificationNum; + data['PatientMobileNumber'] = this.patientMobileNumber; + data['PatientName'] = this.patientName; + data['SetupID'] = this.setupID; + if (this.listPrescriptions != null && this.listPrescriptions!.isNotEmpty) { + data['ListPrescriptions'] = this.listPrescriptions!.map((v) => v.toJson()).toList(); + } + if (this.listPrescriptionsINP != null && this.listPrescriptionsINP!.isNotEmpty) { + data['ListPrescriptions'] = this.listPrescriptionsINP!.map((v) => v.toJson()).toList(); + } + data['ClinicName'] = this.clinicName; + data['DoctorName'] = this.doctorName; + data['ProjectID'] = this.projectID; + data['DoctorID'] = this.doctorID; + data['IsDownload'] = this.isDownload; + return data; + } +} diff --git a/lib/core/model/privilege/HMCProjectListModel.dart b/lib/core/model/privilege/HMCProjectListModel.dart new file mode 100644 index 00000000..6af7bfbb --- /dev/null +++ b/lib/core/model/privilege/HMCProjectListModel.dart @@ -0,0 +1,15 @@ +class HMCProjectListModel { + int? projectID; + + HMCProjectListModel({this.projectID}); + + HMCProjectListModel.fromJson(Map json) { + projectID = json['ProjectID']; + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + return data; + } +} diff --git a/lib/core/model/privilege/PrivilegeModel.dart b/lib/core/model/privilege/PrivilegeModel.dart new file mode 100644 index 00000000..587490b7 --- /dev/null +++ b/lib/core/model/privilege/PrivilegeModel.dart @@ -0,0 +1,24 @@ +class PrivilegeModel { + int? iD; + String? serviceName; + bool? privilege; + dynamic region; + + PrivilegeModel({this.iD, this.serviceName, this.privilege, this.region}); + + PrivilegeModel.fromJson(Map json) { + iD = json['ID']; + serviceName = json['ServiceName']; + privilege = json['Previlege']; + region = json['Region']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['ServiceName'] = this.serviceName; + data['Previlege'] = this.privilege; + data['Region'] = this.region; + return data; + } +} diff --git a/lib/core/model/privilege/ProjectDetailListModel.dart b/lib/core/model/privilege/ProjectDetailListModel.dart new file mode 100644 index 00000000..782c376b --- /dev/null +++ b/lib/core/model/privilege/ProjectDetailListModel.dart @@ -0,0 +1,32 @@ +class ProjectDetailListModel { + int? projectID; + String? latitude; + String? longitude; + int? geofenceRadius; + String? checkInQrCode; + + ProjectDetailListModel( + {this.projectID, + this.latitude, + this.longitude, + this.geofenceRadius, + this.checkInQrCode}); + + ProjectDetailListModel.fromJson(Map json) { + projectID = json['ProjectID']; + latitude = json['Latitude']; + longitude = json['Longitude']; + geofenceRadius = json['GeofenceRadius']; + checkInQrCode = json['CheckInQrCode']; + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + data['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + data['GeofenceRadius'] = this.geofenceRadius; + data['CheckInQrCode'] = this.checkInQrCode; + return data; + } +} diff --git a/lib/core/model/privilege/VidaPlusProjectListModel.dart b/lib/core/model/privilege/VidaPlusProjectListModel.dart new file mode 100644 index 00000000..75978110 --- /dev/null +++ b/lib/core/model/privilege/VidaPlusProjectListModel.dart @@ -0,0 +1,15 @@ +class VidaPlusProjectListModel { + int? projectID; + + VidaPlusProjectListModel({this.projectID}); + + VidaPlusProjectListModel.fromJson(Map json) { + projectID = json['ProjectID']; + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + return data; + } +} diff --git a/lib/core/model/qr/qr_parking_model.dart b/lib/core/model/qr/qr_parking_model.dart new file mode 100644 index 00000000..8311ac3a --- /dev/null +++ b/lib/core/model/qr/qr_parking_model.dart @@ -0,0 +1,172 @@ +class QRParkingModel { + dynamic totalRecords; + dynamic nRowID; + int? qRParkingID; + String? description; + String? descriptionN; + dynamic qRCompare; + dynamic qRValue; + String? imagePath; + bool? isActive; + int? parkingID; + int? branchID; + int? companyID; + int? buildingID; + int? rowID; + int? gateID; + int? floorID; + dynamic imagePath1; + int? createdBy; + String? createdOn; + dynamic editedBy; + dynamic editedOn; + String? parkingDescription; + String? parkingDescriptionN; + String? gateDescription; + String? gateDescriptionN; + String? branchDescription; + String? branchDescriptionN; + String? companyDescription; + String? companyDescriptionN; + String? rowDescription; + String? rowDescriptionN; + String? floorDescription; + String? floorDescriptionN; + String? buildingDescription; + String? buildingDescriptionN; + String? qRParkingCode; + String? parkingCode; + double? latitude; + double? longitude; + String? qRImageStr; + + QRParkingModel( + {this.totalRecords, + this.nRowID, + this.qRParkingID, + this.description, + this.descriptionN, + this.qRCompare, + this.qRValue, + this.imagePath, + this.isActive, + this.parkingID, + this.branchID, + this.companyID, + this.buildingID, + this.rowID, + this.gateID, + this.floorID, + this.imagePath1, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn, + this.parkingDescription, + this.parkingDescriptionN, + this.gateDescription, + this.gateDescriptionN, + this.branchDescription, + this.branchDescriptionN, + this.companyDescription, + this.companyDescriptionN, + this.rowDescription, + this.rowDescriptionN, + this.floorDescription, + this.floorDescriptionN, + this.buildingDescription, + this.buildingDescriptionN, + this.qRParkingCode, + this.parkingCode, + this.latitude, + this.longitude, + this.qRImageStr}); + + QRParkingModel.fromJson(Map json) { + totalRecords = json['TotalRecords']; + nRowID = json['nRowID']; + qRParkingID = json['QRParkingID']; + description = json['Description']; + descriptionN = json['DescriptionN']; + qRCompare = json['QRCompare']; + qRValue = json['QRValue']; + imagePath = json['ImagePath']; + isActive = json['IsActive']; + parkingID = json['ParkingID']; + branchID = json['BranchID']; + companyID = json['CompanyID']; + buildingID = json['BuildingID']; + rowID = json['RowID']; + gateID = json['GateID']; + floorID = json['FloorID']; + imagePath1 = json['ImagePath1']; + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + parkingDescription = json['ParkingDescription']; + parkingDescriptionN = json['ParkingDescriptionN']; + gateDescription = json['GateDescription']; + gateDescriptionN = json['GateDescriptionN']; + branchDescription = json['BranchDescription']; + branchDescriptionN = json['BranchDescriptionN']; + companyDescription = json['CompanyDescription']; + companyDescriptionN = json['CompanyDescriptionN']; + rowDescription = json['RowDescription']; + rowDescriptionN = json['RowDescriptionN']; + floorDescription = json['FloorDescription']; + floorDescriptionN = json['FloorDescriptionN']; + buildingDescription = json['BuildingDescription']; + buildingDescriptionN = json['BuildingDescriptionN']; + qRParkingCode = json['QRParkingCode']; + parkingCode = json['ParkingCode']; + latitude = json['Latitude']; + longitude = json['Longitude']; + qRImageStr = json['QRImageStr']; + } + + Map toJson() { + final Map data = new Map(); + data['TotalRecords'] = this.totalRecords; + data['nRowID'] = this.nRowID; + data['QRParkingID'] = this.qRParkingID; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + data['QRCompare'] = this.qRCompare; + data['QRValue'] = this.qRValue; + data['ImagePath'] = this.imagePath; + data['IsActive'] = this.isActive; + data['ParkingID'] = this.parkingID; + data['BranchID'] = this.branchID; + data['CompanyID'] = this.companyID; + data['BuildingID'] = this.buildingID; + data['RowID'] = this.rowID; + data['GateID'] = this.gateID; + data['FloorID'] = this.floorID; + data['ImagePath1'] = this.imagePath1; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + data['ParkingDescription'] = this.parkingDescription; + data['ParkingDescriptionN'] = this.parkingDescriptionN; + data['GateDescription'] = this.gateDescription; + data['GateDescriptionN'] = this.gateDescriptionN; + data['BranchDescription'] = this.branchDescription; + data['BranchDescriptionN'] = this.branchDescriptionN; + data['CompanyDescription'] = this.companyDescription; + data['CompanyDescriptionN'] = this.companyDescriptionN; + data['RowDescription'] = this.rowDescription; + data['RowDescriptionN'] = this.rowDescriptionN; + data['FloorDescription'] = this.floorDescription; + data['FloorDescriptionN'] = this.floorDescriptionN; + data['BuildingDescription'] = this.buildingDescription; + data['BuildingDescriptionN'] = this.buildingDescriptionN; + data['QRParkingCode'] = this.qRParkingCode; + data['ParkingCode'] = this.parkingCode; + data['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + data['QRImageStr'] = this.qRImageStr; + return data; + } +} diff --git a/lib/core/model/radiology/final_radiology.dart b/lib/core/model/radiology/final_radiology.dart new file mode 100644 index 00000000..44a5883f --- /dev/null +++ b/lib/core/model/radiology/final_radiology.dart @@ -0,0 +1,199 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class FinalRadiology { + String? setupID; + int? projectID; + dynamic patientID; + int? invoiceLineItemNo; + int? invoiceNo; + dynamic invoiceNo_VP; + String? invoiceType; + int? doctorID; + int? clinicID; + DateTime? orderDate; + String? reportData; + String? imageURL; + String? procedureID; + int? appointmentNo; + dynamic dIAPacsURL; + bool? isRead; + String? readOn; + var admissionNo; + bool? isInOutPatient; + int? actualDoctorRate; + String? clinicDescription; + String? dIAPACSURL; + String? doctorImageURL; + String? doctorName; + int? doctorRate; + String? doctorTitle; + int? gender; + String? genderDescription; + bool? isActiveDoctorProfile; + bool? isExecludeDoctor; + String? isInOutPatientDescription; + String? isInOutPatientDescriptionN; + String? nationalityFlagURL; + int? noOfPatientsRate; + int? orderNo; + String? projectName; + String? qR; + String? reportDataHTML; + String? reportDataTextString; + List? speciality; + bool? isCVI; + bool? isRadMedicalReport; + bool? isLiveCareAppointment; + + FinalRadiology( + {this.setupID, + this.projectID, + this.patientID, + this.invoiceLineItemNo, + this.invoiceNo, + this.invoiceNo_VP, + this.invoiceType, + this.doctorID, + this.clinicID, + this.orderDate, + this.reportData, + this.imageURL, + this.procedureID, + this.appointmentNo, + this.dIAPacsURL, + this.isRead, + this.readOn, + this.admissionNo, + this.isInOutPatient, + this.actualDoctorRate, + this.clinicDescription, + this.dIAPACSURL, + this.doctorImageURL, + this.doctorName, + this.doctorRate, + this.doctorTitle, + this.gender, + this.genderDescription, + this.isActiveDoctorProfile, + this.isExecludeDoctor, + this.isInOutPatientDescription, + this.isInOutPatientDescriptionN, + this.nationalityFlagURL, + this.noOfPatientsRate, + this.orderNo, + this.projectName, + this.qR, + this.reportDataHTML, + this.reportDataTextString, + this.speciality, + this.isCVI, + this.isRadMedicalReport, + this.isLiveCareAppointment}); + + FinalRadiology.fromJson(Map json) { + try { + setupID = json['SetupID']; + projectID = json['ProjectID']; + patientID = json['PatientID']; + invoiceLineItemNo = json['InvoiceLineItemNo']; + invoiceNo = json['InvoiceNo']; + invoiceNo_VP = json['InvoiceNo_VP']; + invoiceType = json['InvoiceType']; + doctorID = json['DoctorID']; + clinicID = json['ClinicID']; + orderDate = DateUtil.convertStringToDate(json['OrderDate']); + reportData = json['ReportData']; + imageURL = json['ImageURL']; + procedureID = json['ProcedureID']; + appointmentNo = json['AppointmentNo']; + dIAPacsURL = json['DIAPacsURL']; + isRead = json['IsRead']; + readOn = json['ReadOn']; + admissionNo = json['AdmissionNo']; + isInOutPatient = json['IsInOutPatient']; + actualDoctorRate = json['ActualDoctorRate']; + clinicDescription = json['ClinicDescription']; + dIAPACSURL = json['DIA_PACS_URL']; + doctorImageURL = json['DoctorImageURL']; + doctorName = json['DoctorName']; + doctorRate = json['DoctorRate']; + doctorTitle = json['DoctorTitle']; + gender = json['Gender']; + genderDescription = json['GenderDescription']; + isActiveDoctorProfile = json['IsActiveDoctorProfile']; + isExecludeDoctor = json['IsExecludeDoctor']; + isInOutPatientDescription = json['IsInOutPatientDescription']; + isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN']; + nationalityFlagURL = json['NationalityFlagURL']; + noOfPatientsRate = json['NoOfPatientsRate']; + orderNo = json['OrderNo']; + projectName = json['ProjectName']; + qR = json['QR']; + isLiveCareAppointment = json['IsLiveCareAppointment']; + reportDataHTML = json['ReportDataHTML']; + reportDataTextString = json['ReportDataTextString']; + // speciality = json['Speciality'].cast(); + isCVI = json['isCVI']; + isRadMedicalReport = json['isRadMedicalReport']; + } catch (e) { + print(e); + } + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['InvoiceLineItemNo'] = this.invoiceLineItemNo; + data['InvoiceNo'] = this.invoiceNo; + data['InvoiceNo_VP'] = this.invoiceNo_VP; + data['InvoiceType'] = this.invoiceType; + data['DoctorID'] = this.doctorID; + data['ClinicID'] = this.clinicID; + data['OrderDate'] = this.orderDate; + data['ReportData'] = this.reportData; + data['ImageURL'] = this.imageURL; + data['ProcedureID'] = this.procedureID; + data['AppointmentNo'] = this.appointmentNo; + data['DIAPacsURL'] = this.dIAPacsURL; + data['IsRead'] = this.isRead; + data['ReadOn'] = this.readOn; + data['AdmissionNo'] = this.admissionNo; + data['IsInOutPatient'] = this.isInOutPatient; + data['ActualDoctorRate'] = this.actualDoctorRate; + data['ClinicDescription'] = this.clinicDescription; + data['DIA_PACS_URL'] = this.dIAPACSURL; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorName'] = this.doctorName; + 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['IsInOutPatientDescription'] = this.isInOutPatientDescription; + data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN; + data['NationalityFlagURL'] = this.nationalityFlagURL; + data['NoOfPatientsRate'] = this.noOfPatientsRate; + data['OrderNo'] = this.orderNo; + data['ProjectName'] = this.projectName; + data['QR'] = this.qR; + data['ReportDataHTML'] = this.reportDataHTML; + data['ReportDataTextString'] = this.reportDataTextString; + data['Speciality'] = this.speciality; + data['isCVI'] = this.isCVI; + data['isRadMedicalReport'] = this.isRadMedicalReport; + return data; + } +} + +class FinalRadiologyList { + String? filterName = ""; + List? finalRadiologyList = []; + + FinalRadiologyList({this.filterName, this.finalRadiologyList}); +// { +// finalRadiologyList.add(finalRadiology); +// } +} diff --git a/lib/core/model/radiology/request_patient_rad_orders_details.dart b/lib/core/model/radiology/request_patient_rad_orders_details.dart new file mode 100644 index 00000000..bd90193b --- /dev/null +++ b/lib/core/model/radiology/request_patient_rad_orders_details.dart @@ -0,0 +1,92 @@ +class RequestPatientRadOrdersDetails { + int? projectID; + int? orderNo; + int? invoiceNo; + String? setupID; + String? procedureID; + bool? isMedicalReport; + bool? isCVI; + 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; + + RequestPatientRadOrdersDetails( + {this.projectID, + this.orderNo, + this.invoiceNo, + this.setupID, + this.procedureID, + this.isMedicalReport, + this.isCVI, + 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}); + + RequestPatientRadOrdersDetails.fromJson(Map json) { + projectID = json['ProjectID']; + orderNo = json['OrderNo']; + invoiceNo = json['InvoiceNo']; + setupID = json['SetupID']; + procedureID = json['ProcedureID']; + isMedicalReport = json['IsMedicalReport']; + isCVI = json['isCVI']; + 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']; + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + data['OrderNo'] = this.orderNo; + data['InvoiceNo'] = this.invoiceNo; + data['SetupID'] = this.setupID; + data['ProcedureID'] = this.procedureID; + data['IsMedicalReport'] = this.isMedicalReport; + data['isCVI'] = this.isCVI; + 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['PatientType'] = this.patientType; + return data; + } +} diff --git a/lib/core/model/radiology/request_send_rad_report_email.dart b/lib/core/model/radiology/request_send_rad_report_email.dart new file mode 100644 index 00000000..9cc39a0d --- /dev/null +++ b/lib/core/model/radiology/request_send_rad_report_email.dart @@ -0,0 +1,129 @@ +class RequestSendRadReportEmail { + int? channel; + String? clinicName; + String? dateofBirth; + int? deviceTypeID; + String? doctorName; + String? generalid; + int? invoiceNo; + int? invoiceNo_VP; + String? invoiceType; + String? iPAdress; + bool? isDentalAllowedBackend; + int? languageID; + String? orderDate; + int? patientID; + String? patientIditificationNum; + String? patientMobileNumber; + String? patientName; + int? patientOutSA; + int? patientType; + int? patientTypeID; + int? projectID; + String? projectName; + String? radResult; + String? sessionID; + String? setupID; + String? to; + String? tokenID; + double? versionID; + int? invoiceLineItemNo; + bool? isDownload; + + RequestSendRadReportEmail( + {this.channel, + this.clinicName, + this.dateofBirth, + this.deviceTypeID, + this.doctorName, + this.generalid, + this.invoiceNo, + this.invoiceNo_VP, + this.invoiceType, + this.iPAdress, + this.isDentalAllowedBackend, + this.languageID, + this.orderDate, + this.patientID, + this.patientIditificationNum, + this.patientMobileNumber, + this.patientName, + this.patientOutSA, + this.patientType, + this.patientTypeID, + this.projectID, + this.projectName, + this.radResult, + this.sessionID, + this.setupID, + this.to, + this.tokenID, + this.versionID, this.isDownload}); + + RequestSendRadReportEmail.fromJson(Map json) { + channel = json['Channel']; + clinicName = json['ClinicName']; + dateofBirth = json['DateofBirth']; + deviceTypeID = json['DeviceTypeID']; + doctorName = json['DoctorName']; + generalid = json['generalid']; + invoiceNo = json['InvoiceNo']; + invoiceNo_VP = json['InvoiceNo_VP']; + invoiceType = json['InvoiceType']; + iPAdress = json['IPAdress']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; + languageID = json['LanguageID']; + orderDate = json['OrderDate']; + patientID = json['PatientID']; + patientIditificationNum = json['PatientIditificationNum']; + patientMobileNumber = json['PatientMobileNumber']; + patientName = json['PatientName']; + patientOutSA = json['PatientOutSA']; + patientType = json['PatientType']; + patientTypeID = json['PatientTypeID']; + projectID = json['ProjectID']; + projectName = json['ProjectName']; + radResult = json['RadResult']; + sessionID = json['SessionID']; + setupID = json['SetupID']; + to = json['To']; + tokenID = json['TokenID']; + versionID = json['VersionID']; + invoiceLineItemNo = json['InvoiceLineItemNo']; + } + + Map toJson() { + final Map data = new Map(); + data['Channel'] = this.channel; + data['ClinicName'] = this.clinicName; + data['DateofBirth'] = this.dateofBirth; + data['DeviceTypeID'] = this.deviceTypeID; + data['DoctorName'] = this.doctorName; + data['generalid'] = this.generalid; + data['InvoiceNo'] = this.invoiceNo; + data['InvoiceNo_VP'] = this.invoiceNo_VP; + data['InvoiceType'] = this.invoiceType; + data['IPAdress'] = this.iPAdress; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['LanguageID'] = this.languageID; + data['OrderDate'] = this.orderDate; + data['PatientID'] = this.patientID; + data['PatientIditificationNum'] = this.patientIditificationNum; + data['PatientMobileNumber'] = this.patientMobileNumber; + data['PatientName'] = this.patientName; + data['PatientOutSA'] = this.patientOutSA; + data['PatientType'] = this.patientType; + data['PatientTypeID'] = this.patientTypeID; + data['ProjectID'] = this.projectID; + data['ProjectName'] = this.projectName; + data['RadResult'] = this.radResult; + data['SessionID'] = this.sessionID; + data['SetupID'] = this.setupID; + data['To'] = this.to; + data['TokenID'] = this.tokenID; + data['VersionID'] = this.versionID; + data['InvoiceLineItemNo'] = this.invoiceLineItemNo; + data['IsDownload'] = this.isDownload; + return data; + } +} diff --git a/lib/core/model/rate/appointment_details.dart b/lib/core/model/rate/appointment_details.dart new file mode 100644 index 00000000..2900bced --- /dev/null +++ b/lib/core/model/rate/appointment_details.dart @@ -0,0 +1,64 @@ +class AppointmentDetails { + String? setupID; + int? projectID; + int? patientID; + int? appointmentNo; + int? clinicID; + int? doctorID; + dynamic startTime; + dynamic endTime; + dynamic appointmentDate; + dynamic clinicName; + dynamic doctorImageURL; + dynamic doctorName; + dynamic projectName; + + AppointmentDetails( + {this.setupID, + this.projectID, + this.patientID, + this.appointmentNo, + this.clinicID, + this.doctorID, + this.startTime, + this.endTime, + this.appointmentDate, + this.clinicName, + this.doctorImageURL, + this.doctorName, + this.projectName}); + + AppointmentDetails.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + patientID = json['PatientID']; + appointmentNo = json['AppointmentNo']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + startTime = json['StartTime']; + endTime = json['EndTime']; + appointmentDate = json['AppointmentDate']; + clinicName = json['ClinicName']; + doctorImageURL = json['DoctorImageURL']; + doctorName = json['DoctorName']; + projectName = json['ProjectName']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['AppointmentNo'] = this.appointmentNo; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['StartTime'] = this.startTime; + data['EndTime'] = this.endTime; + data['AppointmentDate'] = this.appointmentDate; + data['ClinicName'] = this.clinicName; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorName'] = this.doctorName; + data['ProjectName'] = this.projectName; + return data; + } +} diff --git a/lib/core/model/rate/appointment_rate.dart b/lib/core/model/rate/appointment_rate.dart new file mode 100644 index 00000000..91070f29 --- /dev/null +++ b/lib/core/model/rate/appointment_rate.dart @@ -0,0 +1,100 @@ +class AppointmentRate { + int? rate; + int? appointmentNo; + int? projectID; + int? doctorID; + int? clinicID; + String? note; + String? mobileNumber; + int? createdBy; + int? editedBy; + 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; + + AppointmentRate( + {this.rate, + this.appointmentNo, + this.projectID, + this.doctorID, + this.clinicID, + this.note, + this.mobileNumber, + this.createdBy, + this.editedBy, + 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}); + + AppointmentRate.fromJson(Map json) { + rate = json['Rate']; + appointmentNo = json['AppointmentNo']; + projectID = json['ProjectID']; + doctorID = json['DoctorID']; + clinicID = json['ClinicID']; + note = json['Note']; + mobileNumber = json['MobileNumber']; + createdBy = json['CreatedBy']; + editedBy = json['EditedBy']; + 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']; + } + + Map toJson() { + final Map data = new Map(); + data['Rate'] = this.rate; + data['AppointmentNo'] = this.appointmentNo; + data['ProjectID'] = this.projectID; + data['DoctorID'] = this.doctorID; + data['ClinicID'] = this.clinicID; + data['Note'] = this.note; + data['MobileNumber'] = this.mobileNumber; + data['CreatedBy'] = this.createdBy; + data['EditedBy'] = this.editedBy; + 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['PatientType'] = this.patientType; + return data; + } +} diff --git a/lib/core/model/rate/appoitment_rated.dart b/lib/core/model/rate/appoitment_rated.dart new file mode 100644 index 00000000..64c0f579 --- /dev/null +++ b/lib/core/model/rate/appoitment_rated.dart @@ -0,0 +1,160 @@ +class AppoitmentRated { + String? setupID; + int? projectID; + int? appointmentNo; + String? appointmentDate; + String? appointmentDateN; + int? appointmentType; + String? bookDate; + int? patientType; + int? patientID; + int? clinicID; + int? doctorID; + String? endDate; + String? startTime; + String? endTime; + int? status; + int? visitType; + int? visitFor; + int? patientStatusType; + int? companyID; + int? bookedBy; + String? bookedOn; + int? confirmedBy; + String? confirmedOn; + int? arrivalChangedBy; + String? arrivedOn; + int? editedBy; + String? editedOn; + dynamic doctorName; + String? doctorNameN; + String? statusDesc; + String? statusDescN; + bool? vitalStatus; + dynamic vitalSignAppointmentNo; + int? episodeID; + String? doctorTitle; + bool? isAppoitmentLiveCare; + + AppoitmentRated( + {this.setupID, + this.projectID, + this.appointmentNo, + this.appointmentDate, + this.appointmentDateN, + this.appointmentType, + this.bookDate, + this.patientType, + this.patientID, + this.clinicID, + this.doctorID, + this.endDate, + this.startTime, + this.endTime, + this.status, + this.visitType, + this.visitFor, + this.patientStatusType, + this.companyID, + this.bookedBy, + this.bookedOn, + this.confirmedBy, + this.confirmedOn, + this.arrivalChangedBy, + this.arrivedOn, + this.editedBy, + this.editedOn, + this.doctorName, + this.doctorNameN, + this.statusDesc, + this.statusDescN, + this.vitalStatus, + this.vitalSignAppointmentNo, + this.episodeID, + this.doctorTitle, + this.isAppoitmentLiveCare}); + + AppoitmentRated.fromJson(Map json) { + try { + setupID = json['SetupID']; + projectID = json['ProjectID']; + appointmentNo = json['AppointmentNo']; + appointmentDate = json['AppointmentDate']; + appointmentDateN = json['AppointmentDateN']; + appointmentType = json['AppointmentType']; + bookDate = json['BookDate']; + patientType = json['PatientType']; + patientID = json['PatientID']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + endDate = json['EndDate']; + startTime = json['StartTime']; + endTime = json['EndTime']; + status = json['Status']; + visitType = json['VisitType']; + visitFor = json['VisitFor']; + patientStatusType = json['PatientStatusType']; + companyID = json['CompanyID']; + bookedBy = json['BookedBy']; + bookedOn = json['BookedOn']; + confirmedBy = json['ConfirmedBy']; + confirmedOn = json['ConfirmedOn']; + arrivalChangedBy = json['ArrivalChangedBy']; + arrivedOn = json['ArrivedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + doctorName = json['DoctorName']; + doctorNameN = json['DoctorNameN']; + statusDesc = json['StatusDesc']; + statusDescN = json['StatusDescN']; + vitalStatus = json['VitalStatus']; + vitalSignAppointmentNo = json['VitalSignAppointmentNo']; + episodeID = json['EpisodeID']; + doctorTitle = json['DoctorTitle']; + isAppoitmentLiveCare = json['IsAppoitmentLiveCare']; + } catch (e) { + print(e); + } + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['AppointmentNo'] = this.appointmentNo; + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentDateN'] = this.appointmentDateN; + data['AppointmentType'] = this.appointmentType; + data['BookDate'] = this.bookDate; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['EndDate'] = this.endDate; + data['StartTime'] = this.startTime; + data['EndTime'] = this.endTime; + data['Status'] = this.status; + data['VisitType'] = this.visitType; + data['VisitFor'] = this.visitFor; + data['PatientStatusType'] = this.patientStatusType; + data['CompanyID'] = this.companyID; + data['BookedBy'] = this.bookedBy; + data['BookedOn'] = this.bookedOn; + data['ConfirmedBy'] = this.confirmedBy; + data['ConfirmedOn'] = this.confirmedOn; + data['ArrivalChangedBy'] = this.arrivalChangedBy; + data['ArrivedOn'] = this.arrivedOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + data['DoctorName'] = this.doctorName; + data['DoctorNameN'] = this.doctorNameN; + data['StatusDesc'] = this.statusDesc; + data['StatusDescN'] = this.statusDescN; + data['VitalStatus'] = this.vitalStatus; + data['VitalSignAppointmentNo'] = this.vitalSignAppointmentNo; + data['EpisodeID'] = this.episodeID; + data['DoctorTitle'] = this.doctorTitle; + data['IsAppoitmentLiveCare'] = this.isAppoitmentLiveCare; + return data; + } +} diff --git a/lib/core/model/reports/Reports.dart b/lib/core/model/reports/Reports.dart new file mode 100644 index 00000000..9e3d59f0 --- /dev/null +++ b/lib/core/model/reports/Reports.dart @@ -0,0 +1,144 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class Reports { + int? status; + DateTime? encounterDate; + int? projectID; + int? invoiceNo; + dynamic invoiceNo_VP; + int? encounterNo; + String? procedureId; + int? requestType; + String? setupId; + int? patientID; + int? doctorID; + dynamic clinicID; + DateTime? requestDate; + bool? isRead; + DateTime? isReadOn; + int? actualDoctorRate; + String? clinicDescription; + dynamic clinicDescriptionN; + String? docName; + dynamic docNameN; + String? doctorImageURL; + dynamic doctorName; + dynamic doctorNameN; + int? doctorRate; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + int? noOfPatientsRate; + String? projectName; + dynamic projectNameN; + + Reports( + {this.status, + this.encounterDate, + this.projectID, + this.invoiceNo, + this.invoiceNo_VP, + this.encounterNo, + this.procedureId, + this.requestType, + this.setupId, + this.patientID, + this.doctorID, + this.clinicID, + this.requestDate, + this.isRead, + this.isReadOn, + this.actualDoctorRate, + this.clinicDescription, + this.clinicDescriptionN, + this.docName, + this.docNameN, + this.doctorImageURL, + this.doctorName, + this.doctorNameN, + this.doctorRate, + this.isDoctorAllowVedioCall, + this.isExecludeDoctor, + this.noOfPatientsRate, + this.projectName, + this.projectNameN}); + + Reports.fromJson(Map json) { + try { + status = json['Status']; + encounterDate = DateUtil.convertStringToDate(json['EncounterDate']); //json['EncounterDate']; + projectID = json['ProjectID']; + invoiceNo = json['InvoiceNo']; + invoiceNo_VP = json['InvoiceNo_VP']; + encounterNo = json['EncounterNo']; + procedureId = json['ProcedureId']; + requestType = json['RequestType']; + setupId = json['SetupId']; + patientID = json['PatientID']; + doctorID = json['DoctorID']; + clinicID = json['ClinicID']; + requestDate = DateUtil.convertStringToDate(json['RequestDate']); //json['RequestDate']; + isRead = json['IsRead']; + isReadOn = DateUtil.convertStringToDate(json['IsReadOn']); //json['IsReadOn']; + actualDoctorRate = json['ActualDoctorRate']; + clinicDescription = json['ClinicDescription']; + clinicDescriptionN = json['ClinicDescriptionN']; + docName = json['DocName']; + docNameN = json['DocNameN']; + doctorImageURL = json['DoctorImageURL']; + doctorName = json['DoctorName']; + doctorNameN = json['DoctorNameN']; + doctorRate = json['DoctorRate']; + isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; + isExecludeDoctor = json['IsExecludeDoctor']; + noOfPatientsRate = json['NoOfPatientsRate']; + projectName = json['ProjectName']; + projectNameN = json['ProjectNameN']; + } catch (e) { + print(e); + } + } + + Map toJson() { + final Map data = new Map(); + data['Status'] = this.status; + data['EncounterDate'] = this.encounterDate; + data['ProjectID'] = this.projectID; + data['InvoiceNo'] = this.invoiceNo; + data['InvoiceNo_VP'] = this.invoiceNo_VP; + data['EncounterNo'] = this.encounterNo; + data['ProcedureId'] = this.procedureId; + data['RequestType'] = this.requestType; + data['SetupId'] = this.setupId; + data['PatientID'] = this.patientID; + data['DoctorID'] = this.doctorID; + data['ClinicID'] = this.clinicID; + data['RequestDate'] = this.requestDate; + data['IsRead'] = this.isRead; + data['IsReadOn'] = this.isReadOn; + data['ActualDoctorRate'] = this.actualDoctorRate; + data['ClinicDescription'] = this.clinicDescription; + data['ClinicDescriptionN'] = this.clinicDescriptionN; + data['DocName'] = this.docName; + data['DocNameN'] = this.docNameN; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorName'] = this.doctorName; + data['DoctorNameN'] = this.doctorNameN; + data['DoctorRate'] = this.doctorRate; + data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; + data['IsExecludeDoctor'] = this.isExecludeDoctor; + data['NoOfPatientsRate'] = this.noOfPatientsRate; + data['ProjectName'] = this.projectName; + data['ProjectNameN'] = this.projectNameN; + return data; + } +} + +class ReportsList { + String? filterName = ""; + + List reportsList = []; + + ReportsList({this.filterName, Reports? reports}) { + reportsList.add(reports!); + } +} diff --git a/lib/core/model/reports/admission_for_medical_report.dart b/lib/core/model/reports/admission_for_medical_report.dart new file mode 100644 index 00000000..a807b2fe --- /dev/null +++ b/lib/core/model/reports/admission_for_medical_report.dart @@ -0,0 +1,228 @@ +class AdmissionMedicalReport { + int? rowID; + String? setupID; + int? projectID; + int? admissionNo; + String? admissionDate; + int? admissionRequestNo; + int? admissionType; + int? patientType; + int? patientID; + int? clinicID; + int? doctorID; + int? admittingClinicID; + int? admittingDoctorID; + int? categoryID; + String? roomID; + String? bedID; + String? dischargeDate; + int? approvalNo; + dynamic relativeID; + String? registrationDate; + String? firstName; + String? middleName; + String? lastName; + String? firstNameN; + String? middleNameN; + String? lastNameN; + int? patientCategory; + int? gender; + String? dateofBirth; + String? dateofBirthN; + String? nationalityID; + String? firstVisit; + String? lastVisit; + int? noOfVisit; + String? mobileNumber; + String? patientIdentificationNo; + int? sTATUS; + int? admissionStatus; + int? buildingID; + String? buildingDescription; + String? buildingDescriptionN; + int? floorID; + int? bedGender; + int? tariffType; + dynamic cRSVerificationStatus; + String? nursingStationID; + String? description; + String? clinicName; + String? doctorNameObj; + int? patientDataVerified; + String? projectName; + dynamic projectNameN; + String? statusDescription; + String? statusDescriptionN; + + AdmissionMedicalReport( + {this.rowID, + this.setupID, + this.projectID, + this.admissionNo, + this.admissionDate, + this.admissionRequestNo, + this.admissionType, + this.patientType, + this.patientID, + this.clinicID, + this.doctorID, + this.admittingClinicID, + this.admittingDoctorID, + this.categoryID, + this.roomID, + this.bedID, + this.dischargeDate, + this.approvalNo, + this.relativeID, + this.registrationDate, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.patientCategory, + this.gender, + this.dateofBirth, + this.dateofBirthN, + this.nationalityID, + this.firstVisit, + this.lastVisit, + this.noOfVisit, + this.mobileNumber, + this.patientIdentificationNo, + this.sTATUS, + this.admissionStatus, + this.buildingID, + this.buildingDescription, + this.buildingDescriptionN, + this.floorID, + this.bedGender, + this.tariffType, + this.cRSVerificationStatus, + this.nursingStationID, + this.description, + this.clinicName, + this.doctorNameObj, + this.patientDataVerified, + this.projectName, + this.projectNameN, + this.statusDescription, + this.statusDescriptionN}); + + AdmissionMedicalReport.fromJson(Map json) { + rowID = json['RowID']; + setupID = json['SetupID']; + projectID = json['ProjectID']; + admissionNo = json['AdmissionNo']; + admissionDate = json['AdmissionDate']; + admissionRequestNo = json['AdmissionRequestNo']; + admissionType = json['AdmissionType']; + patientType = json['PatientType']; + patientID = json['PatientID']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + admittingClinicID = json['AdmittingClinicID']; + admittingDoctorID = json['AdmittingDoctorID']; + categoryID = json['CategoryID']; + roomID = json['RoomID']; + bedID = json['BedID']; + dischargeDate = json['DischargeDate']; + approvalNo = json['ApprovalNo']; + relativeID = json['RelativeID']; + registrationDate = json['RegistrationDate']; + firstName = json['FirstName']; + middleName = json['MiddleName']; + lastName = json['LastName']; + firstNameN = json['FirstNameN']; + middleNameN = json['MiddleNameN']; + lastNameN = json['LastNameN']; + patientCategory = json['PatientCategory']; + gender = json['Gender']; + dateofBirth = json['DateofBirth']; + dateofBirthN = json['DateofBirthN']; + nationalityID = json['NationalityID']; + firstVisit = json['FirstVisit']; + lastVisit = json['LastVisit']; + noOfVisit = json['NoOfVisit']; + mobileNumber = json['MobileNumber']; + patientIdentificationNo = json['PatientIdentificationNo']; + sTATUS = json['STATUS']; + admissionStatus = json['AdmissionStatus']; + buildingID = json['BuildingID']; + buildingDescription = json['BuildingDescription']; + buildingDescriptionN = json['BuildingDescriptionN']; + floorID = json['FloorID']; + bedGender = json['BedGender']; + tariffType = json['TariffType']; + cRSVerificationStatus = json['CRSVerificationStatus']; + nursingStationID = json['NursingStationID']; + description = json['Description']; + clinicName = json['ClinicName']; + doctorNameObj = json['DoctorNameObj']; + patientDataVerified = json['PatientDataVerified']; + projectName = json['ProjectName']; + projectNameN = json['ProjectNameN']; + statusDescription = json['StatusDescription']; + statusDescriptionN = json['StatusDescriptionN']; + } + + Map toJson() { + final Map data = new Map(); + data['RowID'] = this.rowID; + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['AdmissionNo'] = this.admissionNo; + data['AdmissionDate'] = this.admissionDate; + data['AdmissionRequestNo'] = this.admissionRequestNo; + data['AdmissionType'] = this.admissionType; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['AdmittingClinicID'] = this.admittingClinicID; + data['AdmittingDoctorID'] = this.admittingDoctorID; + data['CategoryID'] = this.categoryID; + data['RoomID'] = this.roomID; + data['BedID'] = this.bedID; + data['DischargeDate'] = this.dischargeDate; + data['ApprovalNo'] = this.approvalNo; + data['RelativeID'] = this.relativeID; + data['RegistrationDate'] = this.registrationDate; + data['FirstName'] = this.firstName; + data['MiddleName'] = this.middleName; + data['LastName'] = this.lastName; + data['FirstNameN'] = this.firstNameN; + data['MiddleNameN'] = this.middleNameN; + data['LastNameN'] = this.lastNameN; + data['PatientCategory'] = this.patientCategory; + data['Gender'] = this.gender; + data['DateofBirth'] = this.dateofBirth; + data['DateofBirthN'] = this.dateofBirthN; + data['NationalityID'] = this.nationalityID; + data['FirstVisit'] = this.firstVisit; + data['LastVisit'] = this.lastVisit; + data['NoOfVisit'] = this.noOfVisit; + data['MobileNumber'] = this.mobileNumber; + data['PatientIdentificationNo'] = this.patientIdentificationNo; + data['STATUS'] = this.sTATUS; + data['AdmissionStatus'] = this.admissionStatus; + data['BuildingID'] = this.buildingID; + data['BuildingDescription'] = this.buildingDescription; + data['BuildingDescriptionN'] = this.buildingDescriptionN; + data['FloorID'] = this.floorID; + data['BedGender'] = this.bedGender; + data['TariffType'] = this.tariffType; + data['CRSVerificationStatus'] = this.cRSVerificationStatus; + data['NursingStationID'] = this.nursingStationID; + data['Description'] = this.description; + data['ClinicName'] = this.clinicName; + data['DoctorNameObj'] = this.doctorNameObj; + data['PatientDataVerified'] = this.patientDataVerified; + data['ProjectName'] = this.projectName; + data['ProjectNameN'] = this.projectNameN; + data['StatusDescription'] = this.statusDescription; + data['StatusDescriptionN'] = this.statusDescriptionN; + return data; + } +} diff --git a/lib/core/model/reports/request_report_history.dart b/lib/core/model/reports/request_report_history.dart new file mode 100644 index 00000000..d3bf22cf --- /dev/null +++ b/lib/core/model/reports/request_report_history.dart @@ -0,0 +1,76 @@ +class RequestReportHistory { + int? projectID; + int? clinicID; + bool? isForMedicalReport; + 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; + + RequestReportHistory( + {this.projectID, + this.clinicID, + this.isForMedicalReport, + 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}); + + RequestReportHistory.fromJson(Map json) { + projectID = json['ProjectID']; + clinicID = json['ClinicID']; + isForMedicalReport = json['IsForMedicalReport']; + 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']; + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + data['ClinicID'] = this.clinicID; + data['IsForMedicalReport'] = this.isForMedicalReport; + 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['PatientType'] = this.patientType; + return data; + } +} diff --git a/lib/core/model/reports/request_reports.dart b/lib/core/model/reports/request_reports.dart new file mode 100644 index 00000000..045f76b6 --- /dev/null +++ b/lib/core/model/reports/request_reports.dart @@ -0,0 +1,80 @@ +class RequestReports { + bool? isReport; + int? encounterType; + int? requestType; + 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? projectID; + + RequestReports( + {this.isReport, + this.encounterType, + this.requestType, + 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.projectID}); + + RequestReports.fromJson(Map json) { + isReport = json['IsReport']; + encounterType = json['EncounterType']; + requestType = json['RequestType']; + 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']; + projectID = json['ProjectID']; + } + + Map toJson() { + final Map data = new Map(); + data['IsReport'] = this.isReport; + data['EncounterType'] = this.encounterType; + data['RequestType'] = this.requestType; + 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['PatientType'] = this.patientType; + data['ProjectID'] = this.projectID; + return data; + } +} diff --git a/lib/core/model/search_products_model.dart b/lib/core/model/search_products_model.dart new file mode 100644 index 00000000..30444e56 --- /dev/null +++ b/lib/core/model/search_products_model.dart @@ -0,0 +1,183 @@ +class SearchProductsModel { + String? id; + String? name; + String? namen; + List? localizedNames; + String? shortDescription; + String? fullDescription; + String? fullDescriptionn; + dynamic approvedRatingSum; + dynamic approvedTotalReviews; + String? sku; + bool? isRx; + dynamic rxMessage; + dynamic rxMessagen; + dynamic stockQuantity; + String? stockAvailability; + String? stockAvailabilityn; + bool? allowBackInStockSubscriptions; + dynamic orderMinimumQuantity; + dynamic orderMaximumQuantity; + double? price; + dynamic oldPrice; + dynamic discountName; + dynamic discountNamen; + dynamic discountPercentage; + dynamic displayOrder; + List? discountIds; + List? reviews; + List? images; + + SearchProductsModel( + {this.id, + this.name, + this.namen, + this.localizedNames, + this.shortDescription, + this.fullDescription, + this.fullDescriptionn, + this.approvedRatingSum, + this.approvedTotalReviews, + this.sku, + this.isRx, + this.rxMessage, + this.rxMessagen, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, + this.price, + this.oldPrice, + this.discountName, + this.discountNamen, + this.discountPercentage, + this.displayOrder, + this.discountIds, + this.reviews, + this.images}); + + SearchProductsModel.fromJson(Map json) { + id = json['id']; + name = json['name']; + namen = json['namen']; + if (json['localized_names'] != null) { + localizedNames = []; + json['localized_names'].forEach((v) { + localizedNames!.add(new LocalizedNames.fromJson(v)); + }); + } + shortDescription = json['short_description']; + fullDescription = json['full_description']; + fullDescriptionn = json['full_descriptionn']; + approvedRatingSum = json['approved_rating_sum']; + approvedTotalReviews = json['approved_total_reviews']; + sku = json['sku']; + isRx = json['is_rx']; + rxMessage = json['rx_message']; + rxMessagen = json['rx_messagen']; + stockQuantity = json['stock_quantity']; + stockAvailability = json['stock_availability']; + stockAvailabilityn = json['stock_availabilityn']; + allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions']; + orderMinimumQuantity = json['order_minimum_quantity']; + orderMaximumQuantity = json['order_maximum_quantity']; + price = json['price']; + oldPrice = json['old_price']; + discountName = json['discount_name']; + discountNamen = json['discount_namen']; + discountPercentage = json['discount_percentage']; + displayOrder = json['display_order']; + + if (json['images'] != null) { + images = []; + json['images'].forEach((v) { + images!.add(new Images.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['name'] = this.name; + data['namen'] = this.namen; + if (this.localizedNames != null) { + data['localized_names'] = this.localizedNames!.map((v) => v.toJson()).toList(); + } + data['short_description'] = this.shortDescription; + data['full_description'] = this.fullDescription; + data['full_descriptionn'] = this.fullDescriptionn; + data['approved_rating_sum'] = this.approvedRatingSum; + data['approved_total_reviews'] = this.approvedTotalReviews; + data['sku'] = this.sku; + data['is_rx'] = this.isRx; + data['rx_message'] = this.rxMessage; + data['rx_messagen'] = this.rxMessagen; + data['stock_quantity'] = this.stockQuantity; + data['stock_availability'] = this.stockAvailability; + data['stock_availabilityn'] = this.stockAvailabilityn; + data['allow_back_in_stock_subscriptions'] = this.allowBackInStockSubscriptions; + data['order_minimum_quantity'] = this.orderMinimumQuantity; + data['order_maximum_quantity'] = this.orderMaximumQuantity; + data['price'] = this.price; + data['old_price'] = this.oldPrice; + data['discount_name'] = this.discountName; + data['discount_namen'] = this.discountNamen; + data['discount_percentage'] = this.discountPercentage; + data['display_order'] = this.displayOrder; + + if (this.images != null) { + data['images'] = this.images!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class LocalizedNames { + int? languageId; + String? localizedName; + + LocalizedNames({this.languageId, this.localizedName}); + + LocalizedNames.fromJson(Map json) { + languageId = json['language_id']; + localizedName = json['localized_name']; + } + + Map toJson() { + final Map data = new Map(); + data['language_id'] = this.languageId; + data['localized_name'] = this.localizedName; + return data; + } +} + +class Images { + int? id; + int? position; + String? src; + String? thumb; + String? attachment; + + Images({this.id, this.position, this.src, this.thumb, this.attachment}); + + Images.fromJson(Map json) { + id = json['id']; + position = json['position']; + src = json['src']; + thumb = json['thumb']; + attachment = json['attachment']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['position'] = this.position; + data['src'] = this.src; + data['thumb'] = this.thumb; + data['attachment'] = this.attachment; + return data; + } +} diff --git a/lib/core/model/sick_leave/admission_status_for_sick_leave.dart b/lib/core/model/sick_leave/admission_status_for_sick_leave.dart new file mode 100644 index 00000000..9532a5dd --- /dev/null +++ b/lib/core/model/sick_leave/admission_status_for_sick_leave.dart @@ -0,0 +1,64 @@ +class AdmissionStatusForSickLeave { + String? setupID; + int? projectID; + int? patientID; + int? patientType; + int? requestNo; + String? requestDate; + int? sickLeaveDays; + int? appointmentNo; + int? admissionNo; + String? reportDate; + String? placeOfWork; + int? status; + dynamic dischargeDate; + + AdmissionStatusForSickLeave( + {this.setupID, + this.projectID, + this.patientID, + this.patientType, + this.requestNo, + this.requestDate, + this.sickLeaveDays, + this.appointmentNo, + this.admissionNo, + this.reportDate, + this.placeOfWork, + this.status, + this.dischargeDate}); + + AdmissionStatusForSickLeave.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + patientID = json['PatientID']; + patientType = json['PatientType']; + requestNo = json['RequestNo']; + requestDate = json['RequestDate']; + sickLeaveDays = json['SickLeaveDays']; + appointmentNo = json['AppointmentNo']; + admissionNo = json['AdmissionNo']; + reportDate = json['ReportDate']; + placeOfWork = json['PlaceOfWork']; + status = json['Status']; + dischargeDate = json['DischargeDate']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['PatientType'] = this.patientType; + data['RequestNo'] = this.requestNo; + data['RequestDate'] = this.requestDate; + data['SickLeaveDays'] = this.sickLeaveDays; + data['AppointmentNo'] = this.appointmentNo; + data['AdmissionNo'] = this.admissionNo; + data['ReportDate'] = this.reportDate; + data['PlaceOfWork'] = this.placeOfWork; + data['Status'] = this.status; + data['DischargeDate'] = this.dischargeDate; + return data; + } +} diff --git a/lib/core/model/sick_leave/sick_leave.dart b/lib/core/model/sick_leave/sick_leave.dart new file mode 100644 index 00000000..d089366f --- /dev/null +++ b/lib/core/model/sick_leave/sick_leave.dart @@ -0,0 +1,144 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class SickLeave { + String? setupID; + int? projectID; + int? patientID; + int? patientType; + int? clinicID; + int? doctorID; + int? requestNo; + DateTime? requestDate; + int? sickLeaveDays; + int? appointmentNo; + int? admissionNo; + int? actualDoctorRate; + DateTime? appointmentDate; + String? clinicName; + String? doctorImageURL; + String? doctorName; + int? doctorRate; + String? doctorTitle; + int? gender; + String? genderDescription; + bool? isActiveDoctorProfile; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + bool? isInOutPatient; + String? isInOutPatientDescription; + String? isInOutPatientDescriptionN; + int? noOfPatientsRate; + dynamic patientName; + String? projectName; + String? qR; + List? speciality; + bool? isLiveCareAppointment; + int? status; + + SickLeave( + {this.setupID, + this.projectID, + this.patientID, + this.patientType, + this.clinicID, + this.doctorID, + this.requestNo, + this.requestDate, + this.sickLeaveDays, + this.appointmentNo, + this.admissionNo, + this.actualDoctorRate, + this.appointmentDate, + this.clinicName, + this.doctorImageURL, + this.doctorName, + this.doctorRate, + this.doctorTitle, + this.gender, + this.genderDescription, + this.isActiveDoctorProfile, + this.isDoctorAllowVedioCall, + this.isExecludeDoctor, + this.isInOutPatient, + this.isInOutPatientDescription, + this.isInOutPatientDescriptionN, + this.noOfPatientsRate, + this.patientName, + this.projectName, + this.qR, + this.speciality,this.isLiveCareAppointment, this.status}); + + SickLeave.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + patientID = json['PatientID']; + patientType = json['PatientType']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + requestNo = json['RequestNo']; + requestDate = DateUtil.convertStringToDate(json['RequestDate']); + sickLeaveDays = json['SickLeaveDays']; + appointmentNo = json['AppointmentNo']; + admissionNo = json['AdmissionNo']; + actualDoctorRate = json['ActualDoctorRate']; + appointmentDate = DateUtil.convertStringToDate(json['AppointmentDate']); + clinicName = json['ClinicName']; + doctorImageURL = json['DoctorImageURL']; + doctorName = json['DoctorName']; + doctorRate = json['DoctorRate']; + doctorTitle = json['DoctorTitle']; + gender = json['Gender']; + genderDescription = json['GenderDescription']; + isActiveDoctorProfile = json['IsActiveDoctorProfile']; + isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; + isExecludeDoctor = json['IsExecludeDoctor']; + isInOutPatient = json['IsInOutPatient']; + isInOutPatientDescription = json['IsInOutPatientDescription']; + isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN']; + noOfPatientsRate = json['NoOfPatientsRate']; + patientName = json['PatientName']; + projectName = json['ProjectName']; + qR = json['QR']; + status = json['Status']; + isLiveCareAppointment = json['IsLiveCareAppointment']; + if(json['Speciality']!=null) + speciality = json['Speciality'].cast(); + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['PatientType'] = this.patientType; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['RequestNo'] = this.requestNo; + data['RequestDate'] = DateUtil.convertDateToString(requestDate!); + data['SickLeaveDays'] = this.sickLeaveDays; + data['AppointmentNo'] = this.appointmentNo; + data['AdmissionNo'] = this.admissionNo; + data['ActualDoctorRate'] = this.actualDoctorRate; + data['AppointmentDate'] = this.appointmentDate; + data['ClinicName'] = this.clinicName; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorName'] = this.doctorName; + data['DoctorRate'] = this.doctorRate; + data['DoctorTitle'] = this.doctorTitle; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile; + data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; + data['IsExecludeDoctor'] = this.isExecludeDoctor; + data['IsInOutPatient'] = this.isInOutPatient; + data['IsInOutPatientDescription'] = this.isInOutPatientDescription; + data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN; + data['NoOfPatientsRate'] = this.noOfPatientsRate; + data['PatientName'] = this.patientName; + data['ProjectName'] = this.projectName; + data['QR'] = this.qR; + data['Status'] = this.status; + data['Speciality'] = this.speciality; + return data; + } +} diff --git a/lib/core/model/vaccine/my_vaccine.dart b/lib/core/model/vaccine/my_vaccine.dart new file mode 100644 index 00000000..0c55bf55 --- /dev/null +++ b/lib/core/model/vaccine/my_vaccine.dart @@ -0,0 +1,152 @@ +class VaccineModel { + String? setupID; + int? projectID; + int? patientID; + int? invoiceNo; + String? procedureID; + String? vaccineName; + dynamic vaccineNameN; + String? invoiceDate; + int? doctorID; + int? clinicID; + String? firstName; + String? middleName; + String? lastName; + dynamic firstNameN; + dynamic middleNameN; + dynamic lastNameN; + String? dateofBirth; + int? actualDoctorRate; + String? age; + String? clinicName; + String? doctorImageURL; + String? doctorName; + int? doctorRate; + String? doctorTitle; + int? gender; + String? genderDescription; + bool? isActiveDoctorProfile; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + int? noOfPatientsRate; + String? patientName; + String? projectName; + String? qR; + List? speciality; + String? vaccinationDate; + + VaccineModel( + {this.setupID, + this.projectID, + this.patientID, + this.invoiceNo, + this.procedureID, + this.vaccineName, + this.vaccineNameN, + this.invoiceDate, + this.doctorID, + this.clinicID, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.dateofBirth, + this.actualDoctorRate, + this.age, + this.clinicName, + this.doctorImageURL, + this.doctorName, + this.doctorRate, + this.doctorTitle, + this.gender, + this.genderDescription, + this.isActiveDoctorProfile, + this.isDoctorAllowVedioCall, + this.isExecludeDoctor, + this.noOfPatientsRate, + this.patientName, + this.projectName, + this.qR, + this.speciality, + this.vaccinationDate}); + + VaccineModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + patientID = json['PatientID']; + invoiceNo = json['InvoiceNo']; + procedureID = json['ProcedureID']; + vaccineName = json['VaccineName']; + vaccineNameN = json['VaccineNameN']; + invoiceDate = json['InvoiceDate']; + doctorID = json['DoctorID']; + clinicID = json['ClinicID']; + firstName = json['FirstName']; + middleName = json['MiddleName']; + lastName = json['LastName']; + firstNameN = json['FirstNameN']; + middleNameN = json['MiddleNameN']; + lastNameN = json['LastNameN']; + dateofBirth = json['DateofBirth']; + actualDoctorRate = json['ActualDoctorRate']; + age = json['Age']; + clinicName = json['ClinicName']; + doctorImageURL = json['DoctorImageURL']; + doctorName = json['DoctorName']; + doctorRate = json['DoctorRate']; + doctorTitle = json['DoctorTitle']; + gender = json['Gender']; + genderDescription = json['GenderDescription']; + isActiveDoctorProfile = json['IsActiveDoctorProfile']; + isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; + isExecludeDoctor = json['IsExecludeDoctor']; + noOfPatientsRate = json['NoOfPatientsRate']; + patientName = json['PatientName']; + projectName = json['ProjectName']; + qR = json['QR']; + speciality = json['Speciality'] != null ? json['Speciality'].cast() : []; + vaccinationDate = json['VaccinationDate']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['InvoiceNo'] = this.invoiceNo; + data['ProcedureID'] = this.procedureID; + data['VaccineName'] = this.vaccineName; + data['VaccineNameN'] = this.vaccineNameN; + data['InvoiceDate'] = this.invoiceDate; + data['DoctorID'] = this.doctorID; + data['ClinicID'] = this.clinicID; + data['FirstName'] = this.firstName; + data['MiddleName'] = this.middleName; + data['LastName'] = this.lastName; + data['FirstNameN'] = this.firstNameN; + data['MiddleNameN'] = this.middleNameN; + data['LastNameN'] = this.lastNameN; + data['DateofBirth'] = this.dateofBirth; + data['ActualDoctorRate'] = this.actualDoctorRate; + data['Age'] = this.age; + data['ClinicName'] = this.clinicName; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorName'] = this.doctorName; + data['DoctorRate'] = this.doctorRate; + data['DoctorTitle'] = this.doctorTitle; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile; + data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; + data['IsExecludeDoctor'] = this.isExecludeDoctor; + data['NoOfPatientsRate'] = this.noOfPatientsRate; + data['PatientName'] = this.patientName; + data['ProjectName'] = this.projectName; + data['QR'] = this.qR; + data['Speciality'] = this.speciality; + data['VaccinationDate'] = this.vaccinationDate; + return data; + } +} diff --git a/lib/core/model/vaccine/vaccination_item.dart b/lib/core/model/vaccine/vaccination_item.dart new file mode 100644 index 00000000..63201361 --- /dev/null +++ b/lib/core/model/vaccine/vaccination_item.dart @@ -0,0 +1,18 @@ +class VaccinationItem { + String? dESCRIPTION; + String? iTEMCODE; + + VaccinationItem({this.dESCRIPTION, this.iTEMCODE}); + + VaccinationItem.fromJson(Map json) { + dESCRIPTION = json['DESCRIPTION']; + iTEMCODE = json['ITEM_CODE']; + } + + Map toJson() { + final Map data = new Map(); + data['DESCRIPTION'] = this.dESCRIPTION; + data['ITEM_CODE'] = this.iTEMCODE; + return data; + } +} diff --git a/lib/core/model/vaccine/vaccination_on_hand.dart b/lib/core/model/vaccine/vaccination_on_hand.dart new file mode 100644 index 00000000..18571a73 --- /dev/null +++ b/lib/core/model/vaccine/vaccination_on_hand.dart @@ -0,0 +1,44 @@ +class VaccinationOnHand { + int? distanceInKilometers; + int? iTEMONHAND; + bool? isThereItems; + String? oRGANIZATIONCODE; + String? oRGANIZATIONNAME; + String? projectAlias; + int? projectID; + String? projectName; + + VaccinationOnHand( + {this.distanceInKilometers, + this.iTEMONHAND, + this.isThereItems, + this.oRGANIZATIONCODE, + this.oRGANIZATIONNAME, + this.projectAlias, + this.projectID, + this.projectName}); + + VaccinationOnHand.fromJson(Map json) { + distanceInKilometers = json['DistanceInKilometers']; + iTEMONHAND = json['ITEM_ONHAND']; + isThereItems = json['IsThereItems']; + oRGANIZATIONCODE = json['ORGANIZATION_CODE']; + oRGANIZATIONNAME = json['ORGANIZATION_NAME']; + projectAlias = json['ProjectAlias']; + projectID = json['ProjectID']; + projectName = json['ProjectName']; + } + + Map toJson() { + final Map data = new Map(); + data['DistanceInKilometers'] = this.distanceInKilometers; + data['ITEM_ONHAND'] = this.iTEMONHAND; + data['IsThereItems'] = this.isThereItems; + data['ORGANIZATION_CODE'] = this.oRGANIZATIONCODE; + data['ORGANIZATION_NAME'] = this.oRGANIZATIONNAME; + data['ProjectAlias'] = this.projectAlias; + data['ProjectID'] = this.projectID; + data['ProjectName'] = this.projectName; + return data; + } +} diff --git a/lib/core/model/vital_sign/vital_sign_req_model.dart b/lib/core/model/vital_sign/vital_sign_req_model.dart new file mode 100644 index 00000000..f39566aa --- /dev/null +++ b/lib/core/model/vital_sign/vital_sign_req_model.dart @@ -0,0 +1,69 @@ +class VitalSignReqModel { + int? patientID; + int? projectID; + int? patientTypeID; + int? inOutpatientType; + int? transNo; + int? languageID; + String? stamp ; + String? iPAdress; + double? versionID; + int? channel; + String? tokenID; + String? sessionID; + bool? isLoginForDoctorApp; + bool? patientOutSA; + + VitalSignReqModel( + {this.patientID, + this.projectID, + this.inOutpatientType, + this.transNo, + this.languageID, + this.tokenID, + this.stamp = '2020-04-26T09:32:18.317Z', + this.iPAdress='11.11.11.11', + this.versionID=1.2, + this.channel=9, + this.sessionID='E2bsEeYEJo', + this.isLoginForDoctorApp=true, + this.patientTypeID, + this.patientOutSA=false}); + + VitalSignReqModel.fromJson(Map json) { + projectID = json['ProjectID']; + patientID = json['PatientID']; + languageID = json['LanguageID']; + inOutpatientType = json['InOutpatientType']; + transNo = json['TransNo']; + stamp = json['stamp']; + iPAdress = json['IPAdress']; + versionID = json['VersionID']; + channel = json['Channel']; + tokenID = json['TokenID']; + sessionID = json['SessionID']; + isLoginForDoctorApp = json['IsLoginForDoctorApp']; + patientOutSA = json['PatientOutSA']; + patientTypeID = json['PatientTypeID']; + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['InOutPatientType'] = this.inOutpatientType; + data['TransNo'] = this.transNo; + data['LanguageID'] = this.languageID; + data['stamp'] = this.stamp; + data['IPAdress'] = this.iPAdress; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['TokenID'] = this.tokenID; + data['SessionID'] = this.sessionID; + data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp; + data['PatientOutSA'] = this.patientOutSA; + data['PatientTypeID'] = this.patientTypeID; + return data; + } + +} diff --git a/lib/core/model/vital_sign/vital_sign_res_model.dart b/lib/core/model/vital_sign/vital_sign_res_model.dart new file mode 100644 index 00000000..53b385fe --- /dev/null +++ b/lib/core/model/vital_sign/vital_sign_res_model.dart @@ -0,0 +1,259 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class VitalSignResModel { + var transNo; + var projectID; + var weightKg; + var heightCm; + var temperatureCelcius; + var pulseBeatPerMinute; + var respirationBeatPerMinute; + var bloodPressureLower; + var bloodPressureHigher; + var sAO2; + var fIO2; + var painScore; + var bodyMassIndex; + var headCircumCm; + var leanBodyWeightLbs; + var idealBodyWeightLbs; + var temperatureCelciusMethod; + var pulseRhythm; + var respirationPattern; + var bloodPressureCuffLocation; + var bloodPressureCuffSize; + var bloodPressurePatientPosition; + var painLocation; + var painDuration; + var painCharacter; + var painFrequency; + bool? isPainManagementDone; + var status; + bool? isVitalsRequired; + var patientID; + var createdOn; + var doctorID; + var clinicID; + var triageCategory; + var gCScore; + var lineItemNo; + DateTime? vitalSignDate; + var actualTimeTaken; + var sugarLevel; + var fBS; + var rBS; + var observationType; + var heartRate; + var muscleTone; + var reflexIrritability; + var bodyColor; + var isFirstAssessment; + var dateofBirth; + var timeOfBirth; + var bloodPressure; + var bloodPressureCuffLocationDesc; + var bloodPressureCuffSizeDesc; + var bloodPressurePatientPositionDesc; + var clinicName; + var doctorImageURL; + var doctorName; + var painScoreDesc; + var pulseRhythmDesc; + var respirationPatternDesc; + var temperatureCelciusMethodDesc; + var time; + + VitalSignResModel( + {this.transNo, + this.projectID, + this.weightKg, + this.heightCm, + this.temperatureCelcius, + this.pulseBeatPerMinute, + this.respirationBeatPerMinute, + this.bloodPressureLower, + this.bloodPressureHigher, + this.sAO2, + this.fIO2, + this.painScore, + this.bodyMassIndex, + this.headCircumCm, + this.leanBodyWeightLbs, + this.idealBodyWeightLbs, + this.temperatureCelciusMethod, + this.pulseRhythm, + this.respirationPattern, + this.bloodPressureCuffLocation, + this.bloodPressureCuffSize, + this.bloodPressurePatientPosition, + this.painLocation, + this.painDuration, + this.painCharacter, + this.painFrequency, + this.isPainManagementDone, + this.status, + this.isVitalsRequired, + this.patientID, + this.createdOn, + this.doctorID, + this.clinicID, + this.triageCategory, + this.gCScore, + this.lineItemNo, + this.vitalSignDate, + this.actualTimeTaken, + this.sugarLevel, + this.fBS, + this.rBS, + this.observationType, + this.heartRate, + this.muscleTone, + this.reflexIrritability, + this.bodyColor, + this.isFirstAssessment, + this.dateofBirth, + this.timeOfBirth, + this.bloodPressure, + this.bloodPressureCuffLocationDesc, + this.bloodPressureCuffSizeDesc, + this.bloodPressurePatientPositionDesc, + this.clinicName, + this.doctorImageURL, + this.doctorName, + this.painScoreDesc, + this.pulseRhythmDesc, + this.respirationPatternDesc, + this.temperatureCelciusMethodDesc, + this.time}); + + VitalSignResModel.fromJson(Map json) { + transNo = json['TransNo']; + projectID = json['ProjectID']; + weightKg = json['WeightKg']; + heightCm = json['HeightCm']; + temperatureCelcius = json['TemperatureCelcius']; + pulseBeatPerMinute = json['PulseBeatPerMinute']; + respirationBeatPerMinute = json['RespirationBeatPerMinute']; + bloodPressureLower = json['BloodPressureLower']; + bloodPressureHigher = json['BloodPressureHigher']; + sAO2 = json['SAO2']; + fIO2 = json['FIO2']; + painScore = json['PainScore']; + bodyMassIndex = json['BodyMassIndex']; + headCircumCm = json['HeadCircumCm']; + leanBodyWeightLbs = json['LeanBodyWeightLbs']; + idealBodyWeightLbs = json['IdealBodyWeightLbs']; + temperatureCelciusMethod = json['TemperatureCelciusMethod']; + pulseRhythm = json['PulseRhythm']; + respirationPattern = json['RespirationPattern']; + bloodPressureCuffLocation = json['BloodPressureCuffLocation']; + bloodPressureCuffSize = json['BloodPressureCuffSize']; + bloodPressurePatientPosition = json['BloodPressurePatientPosition']; + painLocation = json['PainLocation']; + painDuration = json['PainDuration']; + painCharacter = json['PainCharacter']; + painFrequency = json['PainFrequency']; + isPainManagementDone = json['IsPainManagementDone']; + status = json['Status']; + isVitalsRequired = json['IsVitalsRequired']; + patientID = json['PatientID']; + createdOn = json['CreatedOn']; + doctorID = json['DoctorID']; + clinicID = json['ClinicID']; + triageCategory = json['TriageCategory']; + gCScore = json['GCScore']; + lineItemNo = json['LineItemNo']; + vitalSignDate = DateUtil.convertStringToDate(json['CreatedOn']); + actualTimeTaken = json['ActualTimeTaken']; + sugarLevel = json['SugarLevel']; + fBS = json['FBS']; + rBS = json['RBS']; + observationType = json['ObservationType']; + heartRate = json['HeartRate']; + muscleTone = json['MuscleTone']; + reflexIrritability = json['ReflexIrritability']; + bodyColor = json['BodyColor']; + isFirstAssessment = json['IsFirstAssessment']; + dateofBirth = json['DateofBirth']; + timeOfBirth = json['TimeOfBirth']; + bloodPressure = json['BloodPressure']; + bloodPressureCuffLocationDesc = json['BloodPressureCuffLocationDesc']; + bloodPressureCuffSizeDesc = json['BloodPressureCuffSizeDesc']; + bloodPressurePatientPositionDesc = json['BloodPressurePatientPositionDesc']; + clinicName = json['ClinicName']; + doctorImageURL = json['DoctorImageURL']; + doctorName = json['DoctorName']; + painScoreDesc = json['PainScoreDesc']; + pulseRhythmDesc = json['PulseRhythmDesc']; + respirationPatternDesc = json['RespirationPatternDesc']; + temperatureCelciusMethodDesc = json['TemperatureCelciusMethodDesc']; + time = json['Time']; + } + + Map toJson() { + final Map data = new Map(); + data['TransNo'] = this.transNo; + data['ProjectID'] = this.projectID; + data['WeightKg'] = this.weightKg; + data['HeightCm'] = this.heightCm; + data['TemperatureCelcius'] = this.temperatureCelcius; + data['PulseBeatPerMinute'] = this.pulseBeatPerMinute; + data['RespirationBeatPerMinute'] = this.respirationBeatPerMinute; + data['BloodPressureLower'] = this.bloodPressureLower; + data['BloodPressureHigher'] = this.bloodPressureHigher; + data['SAO2'] = this.sAO2; + data['FIO2'] = this.fIO2; + data['PainScore'] = this.painScore; + data['BodyMassIndex'] = this.bodyMassIndex; + data['HeadCircumCm'] = this.headCircumCm; + data['LeanBodyWeightLbs'] = this.leanBodyWeightLbs; + data['IdealBodyWeightLbs'] = this.idealBodyWeightLbs; + data['TemperatureCelciusMethod'] = this.temperatureCelciusMethod; + data['PulseRhythm'] = this.pulseRhythm; + data['RespirationPattern'] = this.respirationPattern; + data['BloodPressureCuffLocation'] = this.bloodPressureCuffLocation; + data['BloodPressureCuffSize'] = this.bloodPressureCuffSize; + data['BloodPressurePatientPosition'] = this.bloodPressurePatientPosition; + data['PainLocation'] = this.painLocation; + data['PainDuration'] = this.painDuration; + data['PainCharacter'] = this.painCharacter; + data['PainFrequency'] = this.painFrequency; + data['IsPainManagementDone'] = this.isPainManagementDone; + data['Status'] = this.status; + data['IsVitalsRequired'] = this.isVitalsRequired; + data['PatientID'] = this.patientID; + data['CreatedOn'] = this.createdOn; + data['DoctorID'] = this.doctorID; + data['ClinicID'] = this.clinicID; + data['TriageCategory'] = this.triageCategory; + data['GCScore'] = this.gCScore; + data['LineItemNo'] = this.lineItemNo; + data['VitalSignDate'] = this.vitalSignDate; + data['ActualTimeTaken'] = this.actualTimeTaken; + data['SugarLevel'] = this.sugarLevel; + data['FBS'] = this.fBS; + data['RBS'] = this.rBS; + data['ObservationType'] = this.observationType; + data['HeartRate'] = this.heartRate; + data['MuscleTone'] = this.muscleTone; + data['ReflexIrritability'] = this.reflexIrritability; + data['BodyColor'] = this.bodyColor; + data['IsFirstAssessment'] = this.isFirstAssessment; + data['DateofBirth'] = this.dateofBirth; + data['TimeOfBirth'] = this.timeOfBirth; + data['BloodPressure'] = this.bloodPressure; + data['BloodPressureCuffLocationDesc'] = this.bloodPressureCuffLocationDesc; + data['BloodPressureCuffSizeDesc'] = this.bloodPressureCuffSizeDesc; + data['BloodPressurePatientPositionDesc'] = + this.bloodPressurePatientPositionDesc; + data['ClinicName'] = this.clinicName; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorName'] = this.doctorName; + data['PainScoreDesc'] = this.painScoreDesc; + data['PulseRhythmDesc'] = this.pulseRhythmDesc; + data['RespirationPatternDesc'] = this.respirationPatternDesc; + data['TemperatureCelciusMethodDesc'] = this.temperatureCelciusMethodDesc; + data['Time'] = this.time; + return data; + } +} diff --git a/lib/core/model/weahter/weather_model.dart b/lib/core/model/weahter/weather_model.dart new file mode 100644 index 00000000..ddef871c --- /dev/null +++ b/lib/core/model/weahter/weather_model.dart @@ -0,0 +1,267 @@ +class WeatherIndicatorModel { + dynamic date; + int? languageID; + int? serviceName; + dynamic time; + dynamic androidLink; + dynamic authenticationTokenID; + dynamic data; + bool? dataw; + int? dietType; + dynamic errorCode; + dynamic errorEndUserMessage; + dynamic errorEndUserMessageN; + dynamic errorMessage; + int? errorType; + int? foodCategory; + dynamic iOSLink; + bool? isAuthenticated; + int? mealOrderStatus; + int? mealType; + int? messageStatus; + int? numberOfResultRecords; + dynamic patientBlodType; + dynamic successMsg; + dynamic successMsgN; + dynamic citiesList; + dynamic cityName; + dynamic get5DaysWeatherForecastList; + List? getCityInfoList; + dynamic getTodayWeatherForecastList; + dynamic iniciesList; + + WeatherIndicatorModel( + {this.date, + this.languageID, + this.serviceName, + this.time, + this.androidLink, + this.authenticationTokenID, + this.data, + this.dataw, + this.dietType, + this.errorCode, + this.errorEndUserMessage, + this.errorEndUserMessageN, + this.errorMessage, + this.errorType, + this.foodCategory, + this.iOSLink, + this.isAuthenticated, + this.mealOrderStatus, + this.mealType, + this.messageStatus, + this.numberOfResultRecords, + this.patientBlodType, + this.successMsg, + this.successMsgN, + this.citiesList, + this.cityName, + this.get5DaysWeatherForecastList, + this.getCityInfoList, + this.getTodayWeatherForecastList, + this.iniciesList}); + + WeatherIndicatorModel.fromJson(Map json) { + date = json['Date']; + languageID = json['LanguageID']; + serviceName = json['ServiceName']; + time = json['Time']; + androidLink = json['AndroidLink']; + authenticationTokenID = json['AuthenticationTokenID']; + data = json['Data']; + dataw = json['Dataw']; + dietType = json['DietType']; + errorCode = json['ErrorCode']; + errorEndUserMessage = json['ErrorEndUserMessage']; + errorEndUserMessageN = json['ErrorEndUserMessageN']; + errorMessage = json['ErrorMessage']; + errorType = json['ErrorType']; + foodCategory = json['FoodCategory']; + iOSLink = json['IOSLink']; + isAuthenticated = json['IsAuthenticated']; + mealOrderStatus = json['MealOrderStatus']; + mealType = json['MealType']; + messageStatus = json['MessageStatus']; + numberOfResultRecords = json['NumberOfResultRecords']; + patientBlodType = json['PatientBlodType']; + successMsg = json['SuccessMsg']; + successMsgN = json['SuccessMsgN']; + citiesList = json['CitiesList']; + cityName = json['CityName']; + get5DaysWeatherForecastList = json['Get5DaysWeatherForecastList']; + if (json['GetCityInfo_List'] != null) { + getCityInfoList = []; + json['GetCityInfo_List'].forEach((v) { + getCityInfoList!.add(new GetCityInfoList.fromJson(v)); + }); + } + getTodayWeatherForecastList = json['GetTodayWeatherForecastList']; + iniciesList = json['IniciesList']; + } + + Map toJson() { + final Map data = new Map(); + data['Date'] = this.date; + data['LanguageID'] = this.languageID; + data['ServiceName'] = this.serviceName; + data['Time'] = this.time; + data['AndroidLink'] = this.androidLink; + data['AuthenticationTokenID'] = this.authenticationTokenID; + data['Data'] = this.data; + data['Dataw'] = this.dataw; + data['DietType'] = this.dietType; + data['ErrorCode'] = this.errorCode; + data['ErrorEndUserMessage'] = this.errorEndUserMessage; + data['ErrorEndUserMessageN'] = this.errorEndUserMessageN; + data['ErrorMessage'] = this.errorMessage; + data['ErrorType'] = this.errorType; + data['FoodCategory'] = this.foodCategory; + data['IOSLink'] = this.iOSLink; + data['IsAuthenticated'] = this.isAuthenticated; + data['MealOrderStatus'] = this.mealOrderStatus; + data['MealType'] = this.mealType; + data['MessageStatus'] = this.messageStatus; + data['NumberOfResultRecords'] = this.numberOfResultRecords; + data['PatientBlodType'] = this.patientBlodType; + data['SuccessMsg'] = this.successMsg; + data['SuccessMsgN'] = this.successMsgN; + data['CitiesList'] = this.citiesList; + data['CityName'] = this.cityName; + data['Get5DaysWeatherForecastList'] = this.get5DaysWeatherForecastList; + if (this.getCityInfoList != null) { + data['GetCityInfo_List'] = + this.getCityInfoList!.map((v) => v.toJson()).toList(); + } + data['GetTodayWeatherForecastList'] = this.getTodayWeatherForecastList; + data['IniciesList'] = this.iniciesList; + return data; + } +} + +class GetCityInfoList { + CategoriesNames? categoriesNames; + String? category; + String? categoryValue; + int? cityID; + String? cityName; + String? cityNameN; + String? colorName; + String? createdOn; + String? iD; + int? iniceID; + bool? isOrderEmpty; + bool? isValuesReversed; + bool? language; + double? latitude; + double? longitude; + String? name; + int? orderNum; + double? temperature; + String? value; + + GetCityInfoList( + {this.categoriesNames, + this.category, + this.categoryValue, + this.cityID, + this.cityName, + this.cityNameN, + this.colorName, + this.createdOn, + this.iD, + this.iniceID, + this.isOrderEmpty, + this.isValuesReversed, + this.language, + this.latitude, + this.longitude, + this.name, + this.orderNum, + this.temperature, + this.value}); + + GetCityInfoList.fromJson(Map json) { + categoriesNames = json['CategoriesNames'] != null + ? new CategoriesNames.fromJson(json['CategoriesNames']) + : null; + category = json['Category']; + categoryValue = json['CategoryValue']; + cityID = json['CityID']; + cityName = json['CityName']; + cityNameN = json['CityNameN']; + colorName = json['ColorName']; + createdOn = json['CreatedOn']; + iD = json['ID']; + iniceID = json['IniceID']; + isOrderEmpty = json['IsOrderEmpty']; + isValuesReversed = json['IsValuesReversed']; + language = json['Language']; + latitude = json['Latitude']; + longitude = json['Longitude']; + name = json['Name']; + orderNum = json['OrderNum']; + temperature = json['Temperature']; + value = json['Value']; + } + + Map toJson() { + final Map data = new Map(); + if (this.categoriesNames != null) { + data['CategoriesNames'] = this.categoriesNames!.toJson(); + } + data['Category'] = this.category; + data['CategoryValue'] = this.categoryValue; + data['CityID'] = this.cityID; + data['CityName'] = this.cityName; + data['CityNameN'] = this.cityNameN; + data['ColorName'] = this.colorName; + data['CreatedOn'] = this.createdOn; + data['ID'] = this.iD; + data['IniceID'] = this.iniceID; + data['IsOrderEmpty'] = this.isOrderEmpty; + data['IsValuesReversed'] = this.isValuesReversed; + data['Language'] = this.language; + data['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + data['Name'] = this.name; + data['OrderNum'] = this.orderNum; + data['Temperature'] = this.temperature; + data['Value'] = this.value; + return data; + } +} + +class CategoriesNames { + String? category1; + String? category2; + String? category3; + String? category4; + String? category5; + + CategoriesNames( + {this.category1, + this.category2, + this.category3, + this.category4, + this.category5}); + + CategoriesNames.fromJson(Map json) { + category1 = json['Category1']; + category2 = json['Category2']; + category3 = json['Category3']; + category4 = json['Category4']; + category5 = json['Category5']; + } + + Map toJson() { + final Map data = new Map(); + data['Category1'] = this.category1; + data['Category2'] = this.category2; + data['Category3'] = this.category3; + data['Category4'] = this.category4; + data['Category5'] = this.category5; + return data; + } +} + diff --git a/lib/core/service/AlHabibMedicalService/H2O_service.dart b/lib/core/service/AlHabibMedicalService/H2O_service.dart new file mode 100644 index 00000000..6c17a750 --- /dev/null +++ b/lib/core/service/AlHabibMedicalService/H2O_service.dart @@ -0,0 +1,160 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_month_data_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_today_data_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_week_data_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_request_model.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class H2OService extends BaseService { + List userProgressForTodayDataList = []; + List userProgressForWeekDataList = []; + List userProgressForMonthDataList = []; + UserProgressRequestModel userProgressRequestModel = UserProgressRequestModel(); + + UserDetailModel userDetailModel = UserDetailModel(); + + Future getUserDetail() async { + userProgressRequestModel.progress = 1; + userProgressRequestModel.mobileNumber = user.mobileNumber!.substring(1); + userProgressRequestModel.identificationNo = user.patientIdentificationNo; + + hasError = false; + await baseAppClient.post(H2O_GET_USER_DETAIL, onSuccess: (dynamic response, int statusCode) { + if (response["UserDetailData_New"] != null) { + userDetailModel = UserDetailModel.fromJson(response["UserDetailData_New"]); + } else { + userDetailModel = UserDetailModel(); + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: userProgressRequestModel.toJson()); + } + + Future updateUserDetail(UserDetailModel userDetail) async { + userProgressRequestModel.progress = 1; + userProgressRequestModel.mobileNumber = user.mobileNumber!.substring(1); + userProgressRequestModel.identificationNo = user.patientIdentificationNo; + + UserDetailRequestModel _requestModel = UserDetailRequestModel(); + + _requestModel.activityID = userDetail.activityID.toString(); + _requestModel.channel = userProgressRequestModel.channel; + _requestModel.dOB = userDetail.dOB; + _requestModel.deviceTypeID = userProgressRequestModel.deviceTypeID; + _requestModel.email = userDetail.emailID; + _requestModel.firstName = userDetail.firstName; + _requestModel.gender = userDetail.gender; + _requestModel.height = userDetail.height; + _requestModel.iPAdress = userProgressRequestModel.iPAdress; + _requestModel.identificationNo = userProgressRequestModel.identificationNo; + _requestModel.isHeightInCM = userDetail.isHeightInCM; + _requestModel.isWeightInKG = userDetail.isWeightInKG; + _requestModel.languageID = userProgressRequestModel.languageID; + _requestModel.mobileNumber = userProgressRequestModel.mobileNumber; + _requestModel.patientID = userProgressRequestModel.patientID; + _requestModel.patientOutSA = userProgressRequestModel.patientOutSA; + _requestModel.patientType = userProgressRequestModel.patientType; + _requestModel.patientTypeID = userProgressRequestModel.patientOutSA; + _requestModel.sessionID = userProgressRequestModel.sessionID; + _requestModel.tokenID = userProgressRequestModel.tokenID; + _requestModel.versionID = userProgressRequestModel.versionID; + _requestModel.zipCode = userDetail.zipCode; + _requestModel.weight = userDetail.weight; + _requestModel.generalid = userProgressRequestModel.generalid; + _requestModel.isDentalAllowedBackend = userProgressRequestModel.isDentalAllowedBackend; + _requestModel.isNotificationOn = userDetail.isNotificationON; + + hasError = false; + await baseAppClient.post(H2O_UPDATE_USER_DETAIL, onSuccess: (dynamic response, int statusCode) { + userDetailModel = userDetail; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _requestModel.toJson()); + } + + Future getUserProgressForTodayData() async { + userProgressRequestModel.progress = 1; + userProgressRequestModel.mobileNumber = user.mobileNumber!.substring(1); + userProgressRequestModel.identificationNo = user.patientIdentificationNo; + + hasError = false; + await baseAppClient.post(H2O_GET_USER_PROGRESS, onSuccess: (dynamic response, int statusCode) { + userProgressForTodayDataList.clear(); + response['UserProgressForTodayData'].forEach((progressData) { + userProgressForTodayDataList.add(UserProgressForTodayDataModel.fromJson(progressData)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: userProgressRequestModel.toJson()); + } + + Future getUserProgressForWeekData() async { + userProgressRequestModel.progress = 2; + userProgressRequestModel.mobileNumber = super.user.mobileNumber!.substring(1); + userProgressRequestModel.identificationNo = super.user.patientIdentificationNo; + + hasError = false; + await baseAppClient.post(H2O_GET_USER_PROGRESS, onSuccess: (dynamic response, int statusCode) { + userProgressForWeekDataList.clear(); + response['UserProgressForWeekData'].forEach((hospital) { + userProgressForWeekDataList.add(UserProgressForWeekDataModel.fromJson(hospital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: userProgressRequestModel.toJson()); + } + + Future getUserProgressForMonthData() async { + userProgressRequestModel.progress = 3; + userProgressRequestModel.mobileNumber = super.user.mobileNumber!.substring(1); + userProgressRequestModel.identificationNo = super.user.patientIdentificationNo; + + hasError = false; + await baseAppClient.post(H2O_GET_USER_PROGRESS, onSuccess: (dynamic response, int statusCode) { + userProgressForMonthDataList.clear(); + response['UserProgressForMonthData'].forEach((hospital) { + userProgressForMonthDataList.add(UserProgressForMonthDataModel.fromJson(hospital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: userProgressRequestModel.toJson()); + } + + Future insertUserActivity(InsertUserActivityRequestModel insertUserActivityRequestModel) async { + hasError = false; + await baseAppClient.post(H2O_INSERT_USER_ACTIVITY, onSuccess: (dynamic response, int statusCode) { + userProgressForTodayDataList.clear(); + response['UserProgressForTodayData'].forEach((progressData) { + userProgressForTodayDataList.add(UserProgressForTodayDataModel.fromJson(progressData)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: insertUserActivityRequestModel.toJson()); + } + + Future undoUserActivity() async { + userProgressRequestModel.progress = 1; + userProgressRequestModel.mobileNumber = user.mobileNumber!.substring(1); + userProgressRequestModel.identificationNo = user.patientIdentificationNo; + + hasError = false; + await baseAppClient.post(H2O_UNDO_USER_ACTIVITY, onSuccess: (dynamic response, int statusCode) { + userProgressForTodayDataList.clear(); + response['UserProgressForTodayData'].forEach((progressData) { + userProgressForTodayDataList.add(UserProgressForTodayDataModel.fromJson(progressData)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: userProgressRequestModel.toJson()); + } +} diff --git a/lib/core/service/AlHabibMedicalService/cmc_service.dart b/lib/core/service/AlHabibMedicalService/cmc_service.dart new file mode 100644 index 00000000..4def8cb1 --- /dev/null +++ b/lib/core/service/AlHabibMedicalService/cmc_service.dart @@ -0,0 +1,161 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hHC_all_pres_orders_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; + +import '../base_service.dart'; + +class CMCService extends BaseService { + List cmcAllServicesList = []; + List cmcAllPresOrdersList = []; + + List cmcAllOrderDetail = []; + List checkupItemsList = []; + + bool? isOrderUpdated; + + Future getCMCAllServices() async { + GetCMCServicesRequestModel getCMCServicesRequestModel = + GetCMCServicesRequestModel(genderID: authenticatedUserObject.user.gender, identificationNo: authenticatedUserObject.user.patientIdentificationNo); + hasError = false; + + // RC IMPLEMENTATION + await baseAppClient.post(GET_ALL_CMC_SERVICES_RC + "?patientID=" + authenticatedUserObject.user.patientID.toString(), isRCService: true, isAllowAny: true, + onSuccess: (dynamic response, int statusCode) { + cmcAllServicesList.clear(); + response['response'].forEach((data) { + cmcAllServicesList.add(GetCMCServicesResponseModel.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: {}); + + // await baseAppClient.post(HHC_GET_ALL_CMC_SERVICES, onSuccess: (dynamic response, int statusCode) { + // cmcAllServicesList.clear(); + // response['PatientER_CMC_GetAllServicesList'].forEach((data) { + // cmcAllServicesList.add(GetCMCServicesResponseModel.fromJson(data)); + // }); + // }, onFailure: (String error, int statusCode) { + // hasError = true; + // super.error = error; + // }, body: getCMCServicesRequestModel.toJson()); + } + + Future getCmcAllPresOrders() async { + GetHHCAllPresOrdersRequestModel getHHCAllPresOrdersRequestModel = GetHHCAllPresOrdersRequestModel(); + hasError = false; + await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS, onSuccess: (dynamic response, int statusCode) { + cmcAllPresOrdersList.clear(); + cmcAllOrderDetail.clear(); + response['response'].forEach((data) { + if (data['ServiceID'] == OrderService.Comprehensive_Medical_Checkup.getIdOrderService()) cmcAllPresOrdersList.add(GetCMCAllOrdersResponseModel.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: getHHCAllPresOrdersRequestModel.toJson()); + } + + Future getCmcAllPresOrdersRC() async { + GetHHCAllPresOrdersRequestModel getHHCAllPresOrdersRequestModel = GetHHCAllPresOrdersRequestModel(); + hasError = false; + await baseAppClient.post(GET_ALL_CMC_ORDERS_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) { + cmcAllPresOrdersList.clear(); + cmcAllOrderDetail.clear(); + + response['response'].forEach((data) { + cmcAllPresOrdersList.add(GetCMCAllOrdersResponseModel.fromJson(data)); + }); + + // response['PatientER_GetPatientAllPresOrdersList'].forEach((data) { + // if (data['ServiceID'] == OrderService.Comprehensive_Medical_Checkup.getIdOrderService()) cmcAllPresOrdersList.add(GetHHCAllPresOrdersResponseModel.fromJson(data)); + // }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: getHHCAllPresOrdersRequestModel.toJson()); + } + + Future getOrderDetailByOrderID(GetOrderDetailByOrderIDRequestModel getOrderDetailByOrderIDRequestModel) async { + hasError = false; + await baseAppClient.post(GET_CMC_ORDER_DETAIL_BY_ID, onSuccess: (dynamic response, int statusCode) { + cmcAllOrderDetail.clear(); + response['PatientER_CMC_GetTransactionsForOrderList'].forEach((data) { + cmcAllOrderDetail.add(GetOrderDetailByOrderIDResponseModel.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: getOrderDetailByOrderIDRequestModel.toJson()); + } + + Future getCheckupItems(CMCGetItemsRequestModel cMCGetItemsRequestModel) async { + hasError = false; + await baseAppClient.post(GET_CHECK_UP_ITEMS, onSuccess: (dynamic response, int statusCode) { + checkupItemsList.clear(); + response['GetCheckUpItemsList'].forEach((data) { + checkupItemsList.add(CMCGetItemsResponseModel.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: cMCGetItemsRequestModel.toJson()); + } + + Future updateCmcPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async { + hasError = false; + await baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER, onSuccess: (dynamic response, int statusCode) { + isOrderUpdated = true; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: updatePresOrderRequestModel.toJson()); + } + + Future updateCmcPresOrderRC(UpdatePresOrderRequestModel updatePresOrderRequestModel) async { + hasError = false; + await baseAppClient.post(UPDATE_CMC_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) { + isOrderUpdated = true; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: updatePresOrderRequestModel.toJson()); + } + + Future insertCMCOrderRC({CMCInsertPresOrderRequestModel? order}) async { + hasError = false; + String reqId = ""; + order!.latitude = 0.0; + order.longitude = 0.0; + await baseAppClient.post(ADD_CMC_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) { + isOrderUpdated = true; + reqId = response['response'].toString(); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: order.toJson()); + return reqId; + } + + Future insertPresPresOrder({CMCInsertPresOrderRequestModel? order}) async { + hasError = false; + String reqId = ""; + await baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER, onSuccess: (dynamic response, int statusCode) { + isOrderUpdated = true; + reqId = response['RequestNo'].toString(); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: order!.toJson()); + return reqId; + } +} diff --git a/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart b/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart new file mode 100644 index 00000000..7f8a92a9 --- /dev/null +++ b/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart @@ -0,0 +1,184 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:intl/intl.dart'; + +import '../base_service.dart'; + +class CustomerAddressesService extends BaseService { + List addressesList = []; + CustomerInfo customerInfo = new CustomerInfo(); + + Future addAddressInfo({AddNewAddressRequestModel? addNewAddressRequestModel}) async { + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + addNewAddressRequestModel!.customer!.email = addNewAddressRequestModel.customer!.addresses![0].email; + addNewAddressRequestModel.customer!.id = customerId; + addNewAddressRequestModel.customer!.roleIds = [3]; + addNewAddressRequestModel.customer!.addresses![0].phoneNumber = addNewAddressRequestModel.customer!.addresses![0].phoneNumber; + addNewAddressRequestModel.customer!.addresses![0].firstName = authenticatedUserObject.user!.firstName; + addNewAddressRequestModel.customer!.addresses![0].lastName = authenticatedUserObject.user!.lastName; + addNewAddressRequestModel.customer!.addresses![0].countryId = 69; + + var f = DateFormat('E, d MMM yyyy HH:mm:ss'); + var date = f.format(DateTime.now().toUtc()) + " GMT"; + addNewAddressRequestModel.customer!.addresses![0].createdOnUtc = date; + hasError = false; + await baseAppClient.postPharmacy(ADD_ADDRESS_INFO, onSuccess: (dynamic response, int statusCode) { + addressesList.clear(); + response["customers"][0]["addresses"].forEach((data) { + addressesList.add(AddressInfo.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = false; + // super.error = error; + }, body: addNewAddressRequestModel.toJson(), isAllowAny: true); + } + + Future getCustomerAddresses() async { + Map queryParams = {'fields': 'addresses'}; + hasError = false; + var customerID = await sharedPref.getObject(PHARMACY_CUSTOMER_ID); + var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); + await baseAppClient.getPharmacy("$BASE_PHARMACY_URL$GET_CUSTOMER_ADDRESSES$customerID/$customerGUID", onSuccess: (dynamic response, int statusCode) { + addressesList.clear(); + response["customers"][0]["addresses"].forEach((data) { + addressesList.add(AddressInfo.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams, isExternal: true); + } + + Future getCustomerInfo() async { + Map queryParams = {'FileNumber': '${authenticatedUserObject.user!.patientID}'}; + + hasError = false; + await baseAppClient.getPharmacy(BASE_PHARMACY_URL + GET_CUSTOMER_INFO, onSuccess: (dynamic response, int statusCode) { + customerInfo = CustomerInfo.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams, isExternal: true); + } +} + +class CustomerInfo { + bool? isRegistered; + dynamic userName; + dynamic password; + dynamic email; + dynamic errorMessage; + dynamic mobileNumber; + dynamic customerId; + + CustomerInfo({this.isRegistered, this.userName, this.password, this.email, this.errorMessage, this.mobileNumber, this.customerId}); + + CustomerInfo.fromJson(Map json) { + isRegistered = json['IsRegistered']; + userName = json['UserName']; + password = json['Password']; + email = json['Email']; + errorMessage = json['ErrorMessage']; + mobileNumber = json['MobileNumber']; + customerId = json['CustomerId']; + } + + Map toJson() { + final Map data = new Map(); + data['IsRegistered'] = this.isRegistered; + data['UserName'] = this.userName; + data['Password'] = this.password; + data['Email'] = this.email; + data['ErrorMessage'] = this.errorMessage; + data['MobileNumber'] = this.mobileNumber; + data['CustomerId'] = this.customerId; + return data; + } +} + +class AddressInfo { + String? id; + String? firstName; + String? lastName; + String? email; + dynamic company; + dynamic countryId; + String? country; + dynamic stateProvinceId; + String? city; + String? address1; + String? address2; + String? zipPostalCode; + String? phoneNumber; + dynamic faxNumber; + String? customerAttributes; + String? createdOnUtc; + dynamic province; + String? latLong; + + AddressInfo( + {this.id, + this.firstName, + this.lastName, + this.email, + this.company, + this.countryId, + this.country, + this.stateProvinceId, + this.city, + this.address1, + this.address2, + this.zipPostalCode, + this.phoneNumber, + this.faxNumber, + this.customerAttributes, + this.createdOnUtc, + this.province, + this.latLong}); + + AddressInfo.fromJson(Map json) { + id = json['id']; + firstName = json['first_name']; + lastName = json['last_name']; + email = json['email']; + company = json['company']; + countryId = json['country_id']; + country = json['country']; + stateProvinceId = json['state_province_id']; + city = json['city']; + address1 = json['address1']; + address2 = json['address2']; + zipPostalCode = json['zip_postal_code']; + phoneNumber = json['phone_number']; + faxNumber = json['fax_number']; + customerAttributes = json['customer_attributes']; + createdOnUtc = json['created_on_utc']; + province = json['province']; + latLong = json['lat_long']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['first_name'] = this.firstName; + data['last_name'] = this.lastName; + data['email'] = this.email; + data['company'] = this.company; + data['country_id'] = this.countryId; + data['country'] = this.country; + data['state_province_id'] = this.stateProvinceId; + data['city'] = this.city; + data['address1'] = this.address1; + data['address2'] = this.address2; + data['zip_postal_code'] = this.zipPostalCode; + data['phone_number'] = this.phoneNumber; + data['fax_number'] = this.faxNumber; + data['customer_attributes'] = this.customerAttributes; + data['created_on_utc'] = this.createdOnUtc; + data['province'] = this.province; + data['lat_long'] = this.latLong; + return data; + } +} diff --git a/lib/core/service/AlHabibMedicalService/e_referral_service.dart b/lib/core/service/AlHabibMedicalService/e_referral_service.dart new file mode 100644 index 00000000..ba488d14 --- /dev/null +++ b/lib/core/service/AlHabibMedicalService/e_referral_service.dart @@ -0,0 +1,137 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/check_activation_code_for_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_relationship_types_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/send_activation_code_for_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:flutter/material.dart'; + +class EReferralService extends BaseService { + List _relationTypes =[]; + + List get relationTypes => _relationTypes; + List _allCities = []; + + List get allCities => _allCities; + + List _allReferral = []; + + List get allReferral => _allReferral; + String? _activationCode; + String? _logInTokenID; + String? _referralNumber; + + String get activationCode => _activationCode!; + + String get referralNumber => _referralNumber!; + + bool _isActivationCodeValid = false; + + bool get isActivationCodeValid => _isActivationCodeValid; + + Future getRelationTypes() async { + await baseAppClient.post(GET_ALL_RELATIONSHIP_TYPES, + onSuccess: (dynamic response, int statusCode) { + _relationTypes.clear(); + response['List_EReferralResult'].forEach((relation) { + _relationTypes + .add(GetAllRelationshipTypeResponseModel.fromJson(relation)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: {}); + } + + Future getProjectsList(context) async { + Map request; + request = {}; + + dynamic localRes; + + await baseAppClient.post(GET_PROJECTS_LIST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getAllCities() async { + await baseAppClient.post(GET_ALL_CITIES, + onSuccess: (dynamic response, int statusCode) { + _allCities.clear(); + response['ListCities'].forEach((city) { + _allCities.add(GetAllCitiesResponseModel.fromJson(city)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: {}); + } + + Future sendActivationCodeForEReferral( + SendActivationCodeForEReferralRequestModel + sendActivationCodeForEReferralRequestModel) async { + hasError = false; + await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_E_REFERRAL, + onSuccess: (dynamic response, int statusCode) { + _activationCode = response["VerificationCode"]; + _logInTokenID = response["LogInTokenID"]; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: sendActivationCodeForEReferralRequestModel.toJson()); + } + + Future checkActivationCodeForEReferral( + CheckActivationCodeForEReferralResponseModel + checkActivationCodeForEReferralRequestModel) async { + checkActivationCodeForEReferralRequestModel.isDentalAllowedBackend = false; + checkActivationCodeForEReferralRequestModel.logInTokenID = _logInTokenID; + hasError = false; + await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_E_REFERRAL, + onSuccess: (dynamic response, int statusCode) { + _isActivationCodeValid = true; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: checkActivationCodeForEReferralRequestModel.toJson()); + } + + Future createEReferral( + CreateEReferralRequestModel createEReferralRequestModel) async { + hasError = false; + await baseAppClient.post( + CREATE_E_REFERRAL /*'Services/Patients.svc/REST/CreateEReferral'*/, + onSuccess: (dynamic response, int statusCode) { + // TODO Waiting for fix service + _referralNumber = response['ReferralNumber'].toString(); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: createEReferralRequestModel.toJson()); + } + + Future getEReferrals( + SearchEReferralRequestModel searchEReferralRequestModel) async { + _allReferral.clear(); + hasError = false; + + // TODO return this code when the fix the server + await baseAppClient.post(GET_E_REFERRALS, + onSuccess: (dynamic response, int statusCode) { + _allReferral.clear(); + response['List_EReferrals'].forEach((referral) { + _allReferral + .add(SearchEReferralResponseModel.fromJson(referral)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: searchEReferralRequestModel.toJson()); + } +} diff --git a/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart b/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart new file mode 100644 index 00000000..336a632d --- /dev/null +++ b/lib/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart @@ -0,0 +1,138 @@ +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_list_calcolation_model.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:flutter/cupertino.dart'; + +import '../../../../uitl/app_toast.dart'; + +class BariatricsService extends BaseService { + List clinicCategoryList = []; + List diseasesList = []; + List doctorList = []; + List doctorListByTime = []; + + double? lat; + double? long; + + Future getClinicCategory() async { + hasError = false; + Map body = Map(); + 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) { + clinicCategoryList.clear(); + if (response['ClinicCategoryList'] != null) + response['ClinicCategoryList'].forEach((city) { + clinicCategoryList.add(ClinicCategory.fromJson(city)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getDiseaseByClinicId() async { + hasError = false; + 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) { + diseasesList.clear(); + if (response['DiseasesByClinicList'] != null) + response['DiseasesByClinicList'].forEach((city) { + diseasesList.add(DiseasesByClinic.fromJson(city)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future searchDoctorsByTime(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['DiseaseID'] = disease.diseasesID; + body['IsGetNearAppointment'] = false; + body['IsSearchAppointmnetByClinicID'] = true; + body['LanguageID'] = languageID == 'ar' ? 1 : 2; + body['Latitude'] = 0; + body['License'] = true; + body['Longitude'] = 0; + body['isDentalAllowedBackend'] = false; + + 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; + }, body: body); + } + + Future getCalculationDoctors({required int calculationID}) async { + + if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { + lat = await this.sharedPref.getDouble(USER_LAT); + long = await this.sharedPref.getDouble(USER_LONG); + } + + hasError = false; + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + + Map body = Map(); + body['CalculationID'] = calculationID; // hint: it is static depend on IONIC project + body['LanguageID'] = languageID == 'ar' ? 1 : 2; + body['Latitude'] = lat != null ? lat.toString() : 0; + body['Longitude'] = long != null ? long.toString() : 0; + + dynamic localRes; + + await baseAppClient.post(GET_DOCTOR_LIST_CALCULATION, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + AppToast.showErrorToast(message: error); + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } +} diff --git a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart new file mode 100644 index 00000000..41418060 --- /dev/null +++ b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart @@ -0,0 +1,139 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hHC_all_pres_orders_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/main.dart'; + +import '../base_service.dart'; + +class HomeHealthCareService extends BaseService { + List hhcAllServicesList = []; + List hhcAllPresOrdersList = []; + + List hhcAllOrderDetail = []; + List addressesList = []; + dynamic hhcResponse; + bool? isOrderUpdated; + CustomerInfo? customerInfo; + int? requestNo; + + Future getHHCAllServices(HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel) async { + hasError = false; + await baseAppClient.post(HHC_GET_ALL_SERVICES, onSuccess: (dynamic response, int statusCode) { + hhcAllServicesList.clear(); + response['PatientER_HHC_GetAllServicesList'].forEach((data) { + hhcAllServicesList.add(HHCGetAllServicesResponseModel.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: hHCGetAllServicesRequestModel.toJson()); + } + + Future getHHCAllServicesRC(HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel) async { + hasError = false; + await baseAppClient.post(HHC_GET_ALL_SERVICES_RC + "?PatientID=" + user.patientID.toString(), isRCService: true, onSuccess: (dynamic response, int statusCode) { + hhcAllServicesList.clear(); + response['response'].forEach((data) { + hhcAllServicesList.add(HHCGetAllServicesResponseModel.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: hHCGetAllServicesRequestModel.toJson()); + } + + Future getHHCAllPresOrdersRC() async { + GetHHCAllPresOrdersRequestModel getHHCAllPresOrdersRequestModel = GetHHCAllPresOrdersRequestModel(); + hasError = false; + await baseAppClient.post(GET_ALL_HHC_ORDERS_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) { + hhcAllPresOrdersList.clear(); + hhcAllOrderDetail.clear(); + response['response'].forEach((data) { + hhcAllPresOrdersList.add(GetCMCAllOrdersResponseModel.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: getHHCAllPresOrdersRequestModel.toJson()); + } + + Future getHHCAllPresOrders() async { + GetHHCAllPresOrdersRequestModel getHHCAllPresOrdersRequestModel = GetHHCAllPresOrdersRequestModel(); + hasError = false; + await baseAppClient.post(GET_PATIENT_ALL_PRES_ORD, onSuccess: (dynamic response, int statusCode) { + hhcAllPresOrdersList.clear(); + // response['PatientER_GetPatientAllPresOrdersList'].forEach((data) { + // if (data['ServiceID'] == OrderService.HOME_HEALTH_CARE.getIdOrderService()) hhcAllPresOrdersList.add(GetHHCAllPresOrdersResponseModel.fromJson(data)); + // }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: getHHCAllPresOrdersRequestModel.toJson()); + } + + Future getOrderDetailByOrderID(int presOrderID) async { + hasError = false; + Map body = Map(); + body['PresOrderID'] = presOrderID; + body['isDentalAllowedBackend'] = false; + await baseAppClient.post(GET_ORDER_DETAIL_BY_ID, onSuccess: (dynamic response, int statusCode) { + hhcAllOrderDetail.clear(); + response['PatientER_HHC_GetTransactionsForOrderList'].forEach((data) { + hhcAllOrderDetail.add(GetOrderDetailByOrderIDResponseModel.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future updateHHCPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async { + hasError = false; + await baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER, onSuccess: (dynamic response, int statusCode) { + isOrderUpdated = true; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: updatePresOrderRequestModel.toJson()); + } + + Future updateHHCPresOrderRC(UpdatePresOrderRequestModel updatePresOrderRequestModel) async { + hasError = false; + await baseAppClient.post(UPDATE_HHC_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) { + isOrderUpdated = true; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: updatePresOrderRequestModel.toJson()); + } + + Future insertPresPresOrder({PatientERInsertPresOrderRequestModel? order}) async { + hasError = false; + await baseAppClient.post(INSERT_ER_INERT_PRES_ORDER, onSuccess: (dynamic response, int statusCode) { + hhcResponse = response; + requestNo = response['RequestNo']; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: order!.toJson()); + } + + Future insertHHCOrderRC({PatientERInsertPresOrderRequestModel? order}) async { + hasError = false; + await baseAppClient.post(ADD_HHC_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) { + hhcResponse = response; + requestNo = response["response"]; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: order!.toJson()); + } +} diff --git a/lib/core/service/AuthenticatedUserObject.dart b/lib/core/service/AuthenticatedUserObject.dart new file mode 100644 index 00000000..5f73c5e8 --- /dev/null +++ b/lib/core/service/AuthenticatedUserObject.dart @@ -0,0 +1,34 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; + +class AuthenticatedUserObject { + AuthenticatedUser user = AuthenticatedUser(); + AppSharedPreferences sharedPref = AppSharedPreferences(); + bool isLogin = false; + + AuthenticatedUserObject() { + getUser(); + } + + Future getUser({bool getUser = false}) async { + if (getUser) { + var userData = await sharedPref.getObject(USER_PROFILE); + if (userData != null) { + user = AuthenticatedUser.fromJson(userData); + } + } else if (user == null) { + var userData = await sharedPref.getObject(USER_PROFILE); + if (userData != null) { + // user = AuthenticatedUser.fromJson(userData); + user = AuthenticatedUser( + patientID: 1, + ); + } + } + } + + void logout() { + isLogin = false; + } +} diff --git a/lib/core/service/PrescriptionDeliveryService.dart b/lib/core/service/PrescriptionDeliveryService.dart new file mode 100644 index 00000000..15825de4 --- /dev/null +++ b/lib/core/service/PrescriptionDeliveryService.dart @@ -0,0 +1,39 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class PrescriptionDeliveryService extends BaseService { + Future insertDeliveryOrder({int? lineItemNo, double? latitude, double? longitude, int? appointmentNo, int? createdBy, int? dischargeID}) async { + hasError = false; + Map body = Map(); + body['LineItemNo'] = lineItemNo; + body['Latitude'] = latitude; + body['Longitude'] = longitude; + body['AppointmentNo'] = appointmentNo; + body['CreatedBy'] = createdBy; + body['DischargeID'] = dischargeID; + await baseAppClient.post(INSERT_ER_INERT_PRES_ORDER, onSuccess: (dynamic response, int statusCode) { + var asd = ""; + }, onFailure: (String error, int statusCode) { + hasError = true; + print(error); + super.error = error; + }, body: body); + } + + Future insertDeliveryOrderRC({double? latitude, double? longitude, int? appointmentNo, int? createdBy, int? dischargeID, int? projectID}) async { + hasError = false; + Map body = Map(); + body['latitude'] = latitude; + body['longitude'] = longitude; + body['AppointmentNo'] = appointmentNo.toString(); + // body['CreatedBy'] = createdBy; + body['DischargeID'] = dischargeID.toString(); + body['ProjectID'] = projectID; + await baseAppClient.post(ADD_PRESCRIPTION_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) { + }, onFailure: (String error, int statusCode) { + hasError = true; + print(error); + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/ancillary_orders_service.dart b/lib/core/service/ancillary_orders_service.dart new file mode 100644 index 00000000..99babdfd --- /dev/null +++ b/lib/core/service/ancillary_orders_service.dart @@ -0,0 +1,78 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_list_model.dart'; +import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart'; + +class AncillaryOrdersService extends BaseService { + List _ancillaryLists =[]; + + List get ancillaryLists => _ancillaryLists; + List _ancillaryProcLists =[]; + + List get ancillaryProcLists => _ancillaryProcLists; + + String _insuranceCompanyName = ""; + + String get insuranceCompanyName => _insuranceCompanyName; + String _insurancePolicyNumber = ""; + + String get insurancePolicyNumber => _insurancePolicyNumber; + + Future getOrders() async { + Map body = Map(); + + hasError = false; + + await baseAppClient.post(GET_ANCILLARY_ORDERS, onSuccess: (dynamic response, int statusCode) { + _ancillaryLists = []; + response['AncillaryOrderList'].forEach((item) { + ancillaryLists.add(AncillaryOrdersListModel.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getOrdersMyAppo() async { + Map body = Map(); + + hasError = false; + + dynamic localRes; + + await baseAppClient.post(GET_ANCILLARY_ORDERS, onSuccess: (dynamic response, int statusCode) { + _ancillaryLists = []; + localRes = response; + response['AncillaryOrderList'].forEach((item) { + ancillaryLists.add(AncillaryOrdersListModel.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } + + Future getOrdersDetails(appointmentNo, orderNo, projectID) async { + Map body = Map(); + body['AppointmentNo_Vida'] = appointmentNo; + body['OrderNo'] = orderNo; + body['ProjectID'] = projectID; + hasError = false; + + dynamic localRes; + + await baseAppClient.post(GET_ANCILLARY_ORDERS_DETAILS, onSuccess: (dynamic response, int statusCode) { + localRes = response; + _ancillaryProcLists = []; + response['AncillaryOrderProcList'].forEach((item) { + ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } +} diff --git a/lib/core/service/appointment_rate_service.dart b/lib/core/service/appointment_rate_service.dart new file mode 100644 index 00000000..0f14a038 --- /dev/null +++ b/lib/core/service/appointment_rate_service.dart @@ -0,0 +1,96 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/rate/appointment_details.dart'; +import 'package:diplomaticquarterapp/core/model/rate/appointment_rate.dart'; +import 'package:diplomaticquarterapp/core/model/rate/appoitment_rated.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class AppointmentRateService extends BaseService { + List appointmentRatedList =[]; + AppointmentDetails? appointmentDetails; + + Future getIsLastAppointmentRatedList(int languageID) async { + hasError = false; + Map bodyData = Map(); + bodyData['LanguageID'] = languageID; + await baseAppClient.post(IS_LAST_APPOITMENT_RATED, onSuccess: (dynamic response, int statusCode) { + appointmentRatedList.clear(); + response['IsLastAppoitmentRatedList'].forEach((appoint) { + appointmentRatedList.add(AppoitmentRated.fromJson(appoint)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: bodyData); + } + + Future getAppointmentDetails() async { + hasError = false; + Map bodyData = Map(); + bodyData['AppointmentNumber'] = appointmentRatedList[0].appointmentNo; + bodyData['ProjectID'] = appointmentRatedList[0].projectID; + await baseAppClient.post(GET_APPOINTMENT_DETAILS_BY_NO, onSuccess: (dynamic response, int statusCode) { + if (response['AppointmentDetails'] != null) appointmentDetails = AppointmentDetails.fromJson(response['AppointmentDetails']); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: bodyData); + } + + Future sendAppointmentRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note, int languageID) async { + hasError = false; + AppointmentRate appointmentRate = AppointmentRate(); + appointmentRate.rate = rate; + appointmentRate.appointmentNo = appointmentNo; + appointmentRate.projectID = projectID; + appointmentRate.doctorID = doctorID; + appointmentRate.clinicID = clinicID; + appointmentRate.note = note; + appointmentRate.createdBy = 2; + appointmentRate.editedBy = 2; + appointmentRate.languageID = languageID; + + await baseAppClient.post(NEW_RATE_APPOINTMENT_URL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: appointmentRate.toJson()); + } + + Future sendDoctorRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note, String appoDate, String docName, String projectName, String clinicName) async { + Map request; + hasError = false; + request = { + "DoctorID": doctorID, + "Rate": rate, + "ClinicID": clinicID, + "ProjectID": projectID, + "AppointmentNo": appointmentNo, + "Note": note, + "MobileNumber": authenticatedUserObject.user!.mobileNumber, + "AppointmentDate": appoDate, + "DoctorName": docName, + "ProjectName": projectName, + "COCTypeName": 1, + "PatientName": authenticatedUserObject.user!.firstName! + " " + authenticatedUserObject.user!.lastName!, + "PatientOutSA": authenticatedUserObject.user!.outSA, + "PatientTypeID": authenticatedUserObject.user!.patientType, + "ClinicName": clinicName, + "PatientIdentificationID": authenticatedUserObject.user!.patientIdentificationNo + }; + + await baseAppClient.post(NEW_RATE_DOCTOR_URL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: request); + } + + AppoitmentRated get lastAppointmentRated { + if (appointmentRatedList.length > 0) return appointmentRatedList[appointmentRatedList.length - 1]; + return AppoitmentRated(); + } + + deleteAppointmentRated(AppoitmentRated appointmentRated) { + appointmentRatedList.remove(appointmentRated); + } + + deleteAllAppAppointmentRate() => appointmentRatedList.clear(); +} diff --git a/lib/core/service/base_service.dart b/lib/core/service/base_service.dart new file mode 100644 index 00000000..2b8ec3d3 --- /dev/null +++ b/lib/core/service/base_service.dart @@ -0,0 +1,31 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; + +import 'AuthenticatedUserObject.dart'; +import 'client/base_app_client.dart'; + +class BaseService { + String? error; + bool hasError = false; + BaseAppClient baseAppClient = BaseAppClient(); + AuthenticatedUser user = new AuthenticatedUser(); + + AuthenticatedUserObject authenticatedUserObject = locator(); + + AppSharedPreferences sharedPref = AppSharedPreferences(); + + BaseService() { + authenticatedUserObject.getUser(); + user = authenticatedUserObject.user; + // getUser(); + } + + getUser() async { + // if (user==null) { + var userData = await sharedPref.getObject(USER_PROFILE); + if (userData != null) user = AuthenticatedUser.fromJson(userData); + // } + } +} diff --git a/lib/core/service/blood/blood_details_servies.dart b/lib/core/service/blood/blood_details_servies.dart new file mode 100644 index 00000000..eb490086 --- /dev/null +++ b/lib/core/service/blood/blood_details_servies.dart @@ -0,0 +1,31 @@ + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart'; + +import '../base_service.dart'; + +class BloodDetailsService extends BaseService{ + + // List CitiesModelList =[]; + // Map body = Map(); + + List BloodModelList =[]; + Map body = Map(); + Future getAllBloodOrders() async { + hasError = false; + body['List_BloodGroupDetails'] = false; + await baseAppClient.post(GET_BLOOD_REQUEST, + onSuccess: (dynamic response, int statusCode) { + BloodModelList.clear(); + + response['List_BloodGroupDetails'].forEach((vital) { + BloodModelList.add(List_BloodGroupDetailsModel.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + // hasError = true; + super.error = error; + }, body: body); + } + + +} \ No newline at end of file diff --git a/lib/core/service/blood/blood_donation_service.dart b/lib/core/service/blood/blood_donation_service.dart new file mode 100644 index 00000000..39c776b6 --- /dev/null +++ b/lib/core/service/blood/blood_donation_service.dart @@ -0,0 +1,100 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; + +import '../base_service.dart'; + +class BloodDonationService extends BaseService { + //List LivechatModelList =[]; + +// Map body = Map(); + + List CitiesModelList =[]; + Map body = Map(); + + Future getAllCitiesOrders() async { + hasError = false; + body['ListCities'] = false; + body["IsPublicRequest"] = true; + await baseAppClient.post(GET_CITIES_REQUEST, onSuccess: (dynamic response, int statusCode) { + CitiesModelList.clear(); + response['ListCities'].forEach((vital) { + CitiesModelList.add(CitiesModel.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future bloodDonationSave(request) async { + var localRes; + try { + await baseAppClient.post(SAVE_BLOOD_REQUEST, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: request); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + Future getAgreement() async { + var localRes; + try { + await baseAppClient.post(GET_BLOOD_AGREEMENT, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: {}); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + Future saveAgreement(request) async { + var localRes; + try { + await baseAppClient.post(SAVE_BLOOD_AGREEMENT, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: request); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + Future getBloodDonationProjectsList() async { + Map request; + request = {}; + dynamic localRes; + await baseAppClient.post(GET_BLOOD_DONATION_PROJECTS_LIST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + + Future getBloodDonationFreeSlots(int clinicID, int projectID) async { + Map request; + request = {"ClinicID": clinicID, "ProjectID": projectID}; + dynamic localRes; + await baseAppClient.post(GET_BLOOD_DONATION_FREE_SLOTS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + +} diff --git a/lib/core/service/childvaccines/add_new_child_service.dart b/lib/core/service/childvaccines/add_new_child_service.dart new file mode 100644 index 00000000..98cf9638 --- /dev/null +++ b/lib/core/service/childvaccines/add_new_child_service.dart @@ -0,0 +1,42 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; + +import '../base_service.dart'; + +class CreteNewBabyService extends BaseService { + List createNewBabyModelList =[]; + List userModelList =[]; + List newUserModelList =[]; + + + + Future getCreateNewBabyOrders({CreateNewBaby? newChild,int? userID}) async { + hasError = false; + await getUser(); + Map body = Map.from(newChild!.toJson()); + body['CreatedBy'] = 102; + body['EditedBy'] = 102; + body['UserID'] = userID; + body['AlertBy'] = 2; + body['EmailAddress'] = user.emailAddress; + body['IsLogin'] = true; + body['LogInTokenID'] = await sharedPref.getString(TOKEN); + body['MobileNumber'] = user.mobileNumber; + body['NationalID'] = user.nationalityID; + body['ZipCode'] = user.zipCode; + + body['isDentalAllowedBackend'] = false; + + await baseAppClient.post(GET_NEWCHILD_REQUEST, + onSuccess: (dynamic response, int statusCode) { + var asd =""; + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/childvaccines/child_vaccines_service.dart b/lib/core/service/childvaccines/child_vaccines_service.dart new file mode 100644 index 00000000..df3934df --- /dev/null +++ b/lib/core/service/childvaccines/child_vaccines_service.dart @@ -0,0 +1,56 @@ + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; + +import '../base_service.dart'; + +class ChildVaccinesService extends BaseService { + List babyInformationModelList =[]; + List userInformationModelList =[]; + int userID = 0; + + Future getAllBabyInformationOrders() async { + Map body = Map(); + hasError = false; + body['isDentalAllowedBackend'] = false; + body['IsLogin'] = true; + body['UserID'] = userID; + await baseAppClient.post(GET_BABY_BY_USER_ID, + onSuccess: (dynamic response, int statusCode) { + babyInformationModelList.clear(); + response['List_BabyInformationModel'].forEach((vital) { + babyInformationModelList.add(List_BabyInformationModel.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getNewUserOrders() async { + Map body = Map(); + hasError = false; + await getUser(); + body['CreatedBy'] = 102; + body['EditedBy'] = 102; + body['UserID'] = userID; + body['AlertBy'] = 2; + body['EmailAddress'] = user.emailAddress; + body['IsLogin'] = true; + body['LogInTokenID'] = await sharedPref.getString(TOKEN); + body['MobileNumber'] = user.mobileNumber; + body['NationalID'] = user.nationalityID; + body['ZipCode'] = user.zipCode; + body['isDentalAllowedBackend'] = false; + + await baseAppClient.post(GET_NEW_USER_REQUEST, + onSuccess: (dynamic response, int statusCode) { + userID = response['UserID']; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/childvaccines/delete_baby_service.dart b/lib/core/service/childvaccines/delete_baby_service.dart new file mode 100644 index 00000000..494c92fc --- /dev/null +++ b/lib/core/service/childvaccines/delete_baby_service.dart @@ -0,0 +1,76 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; + +import '../base_service.dart'; + + + +class DeleteBabyService extends BaseService{ + + List createNewBabyModelList =[]; + List userModelList =[]; + List newUserModelList =[]; + + List deleteBabyModelList=[]; + + + Future getDeleteBabyOrder({DeleteBaby? deleteChild,int? babyID}) async { + hasError = false; + await getUser(); + Map body = Map.from(deleteChild!.toJson()); + // body['CreatedBy'] = 102; + body['EditedBy'] = 102; + //body['BabyID'] = babyID; + //body['BabyID'] = createNewBabyModelList ; + // body['AlertBy'] = 2; + // body['EmailAddress'] = user.emailAddress; + body['IsLogin'] = true; + body['LogInTokenID'] = await sharedPref.getString(TOKEN); + body['MobileNumber'] = user.mobileNumber; + body['NationalID'] = user.nationalityID; + body['ZipCode'] = user.zipCode; + + body['isDentalAllowedBackend'] = false; + + await baseAppClient.post(DELETE_CHILD_REQUEST, + onSuccess: (dynamic response, int statusCode) { + var asd =""; + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + // Future getCreateNewBabyOrders({CreateNewBaby newChild,int userID}) async { + // hasError = false; + // await getUser(); + // Map body = Map.from(newChild.toJson()); + // body['CreatedBy'] = 102; + // body['EditedBy'] = 102; + // body['UserID'] = userID; + // body['AlertBy'] = 2; + // body['EmailAddress'] = user.emailAddress; + // body['IsLogin'] = true; + // body['LogInTokenID'] = await sharedPref.getString(TOKEN); + // body['MobileNumber'] = user.mobileNumber; + // body['NationalID'] = user.nationalityID; + // body['ZipCode'] = user.zipCode; + // + // body['isDentalAllowedBackend'] = false; + // + // await baseAppClient.post(GET_NEWCHILD_REQUEST, + // onSuccess: (dynamic response, int statusCode) { + // var asd =""; + // }, + // onFailure: (String error, int statusCode) { + // hasError = true; + // super.error = error; + // }, body: body); + // } + +} \ No newline at end of file diff --git a/lib/core/service/childvaccines/get_vaccinations_item_services.dart b/lib/core/service/childvaccines/get_vaccinations_item_services.dart new file mode 100644 index 00000000..0cf19e9d --- /dev/null +++ b/lib/core/service/childvaccines/get_vaccinations_item_services.dart @@ -0,0 +1,27 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/get_vacainations_itemsmodel.dart'; + +import '../base_service.dart'; + +class GetVccinationsItemsService extends BaseService { + List getVaccinationsItemModelList =[]; + Map body = Map(); + + + + Future getaccinationsitemOrders() async { + hasError = false; + await baseAppClient.post(GET_TABLE_REQUEST, + onSuccess: (dynamic response, int statusCode) { + getVaccinationsItemModelList.clear(); + response['List_CreateVaccinationTableModel'].forEach((vital) { + getVaccinationsItemModelList.add( + GET_VACCINATIONS_ITEMSMODEL.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + +} \ No newline at end of file diff --git a/lib/core/service/childvaccines/user_information_service.dart b/lib/core/service/childvaccines/user_information_service.dart new file mode 100644 index 00000000..bdb086d8 --- /dev/null +++ b/lib/core/service/childvaccines/user_information_service.dart @@ -0,0 +1,36 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; + +import '../base_service.dart'; + +class UserInformationService extends BaseService { + List userInformationModelList =[]; + Map body = Map(); + + Future getUserInformationOrders() async { + hasError = false; + await getUser(); + body['CreatedBy'] = 102; + body['EditedBy'] = 102; + body['EmailAddress'] = user.emailAddress; + body['IsLogin'] = true; + body['LogInTokenID'] = await sharedPref.getString(TOKEN); + body['MobileNumber'] = user.mobileNumber; + body['NationalID'] = user.nationalityID; + body['ZipCode'] = user.zipCode; + body['isDentalAllowedBackend'] = false; + + await baseAppClient.post(GET_USERINFORMATION_REQUEST, + onSuccess: (dynamic response, int statusCode) { + userInformationModelList.clear(); + + response['List_UserInformationModel_New'].forEach((vital) { + userInformationModelList.add(List_UserInformationModel.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/childvaccines/vaccination_table_service.dart b/lib/core/service/childvaccines/vaccination_table_service.dart new file mode 100644 index 00000000..330384a9 --- /dev/null +++ b/lib/core/service/childvaccines/vaccination_table_service.dart @@ -0,0 +1,39 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/create_vaccination_table.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +import '../base_service.dart'; + +class VaccinationTableService extends BaseService { + List createVaccinationTableModelList =[]; + Map body = Map(); + + + + Future getCreateVaccinationTableOrders(List_BabyInformationModel babyInfo, bool sendEmail) async { + String babyBDFormatted = "${DateUtil.convertDateToString(babyInfo.dOB!)}/"; + + hasError = false; + await getUser(); + body['BabyName']= babyInfo.babyName; + body['DOB'] = babyBDFormatted; + body['EmailAddress'] = user.emailAddress; + body['isDentalAllowedBackend'] = false; + body['SendEmail'] = sendEmail; + body['IsLogin'] =true; + + await baseAppClient.post(GET_TABLE_REQUEST, + onSuccess: (dynamic response, int statusCode) { + createVaccinationTableModelList.clear(); + response['List_CreateVaccinationTableModel'].forEach((vital) { + createVaccinationTableModelList.add( + CreateVaccinationTable.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + +} \ No newline at end of file diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart new file mode 100644 index 00000000..805a8bd3 --- /dev/null +++ b/lib/core/service/client/base_app_client.dart @@ -0,0 +1,962 @@ +import 'dart:async'; +import 'dart:convert'; +import 'dart:io' show Platform; + +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; +import 'package:diplomaticquarterapp/core/service/packages_offers/PackagesOffersServices.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:flutter/material.dart'; +import 'package:http/http.dart' as http; +import 'package:provider/provider.dart'; + +import '../../../locator.dart'; +import '../../../routes.dart'; +import '../AuthenticatedUserObject.dart'; + +AppSharedPreferences sharedPref = new AppSharedPreferences(); + +///Example +///await BaseAppClient.post('', +/// onSuccess: (dynamic response, int statusCode) {}, +/// onFailure: (String error, int statusCode) {}, +/// body: Map(); +/// +AuthenticatedUserObject authenticatedUserObject = locator(); +VitalSignService _vitalSignService = locator(); + +class BaseAppClient { + final _analytics = locator(); + + var sampleNHICResponse = + '{"Date":null,"LanguageID":0,"ServiceName":0,"Time":null,"AndroidLink":null,"AuthenticationTokenID":null,"Data":null,"Dataw":false,"DietType":0,"DietTypeID":0,"ErrorCode":null,"ErrorEndUserMessage":null,"ErrorEndUserMessageN":null,"ErrorMessage":null,"ErrorStatusCode":0,"ErrorType":0,"FoodCategory":0,"IOSLink":null,"IsAuthenticated":false,"MealOrderStatus":0,"MealType":0,"MessageStatus":1,"NumberOfResultRecords":0,"PatientBlodType":null,"SuccessMsg":null,"SuccessMsgN":null,"VidaUpdatedResponse":null,"AccessTokenObject":null,"Age":23,"ClientIdentifierId":null,"CreatedBy":0,"DateOfBirth":"05\/20\/2001","FirstNameAr":"عميرخان","FirstNameEn":"UMAIR KHAN","Gender":"M","GenderAr":null,"GenderEn":null,"HealthId":"30000411002276","IdNumber":"2188030163","IdType":"Iqama","IsHijri":false,"IsInstertedOrUpdated":0,"IsNull":0,"IsPatientExistNHIC":0,"IsRecordLockedByCurrentUser":false,"LastNameAr":"خان","LastNameEn":"KHAN","List_ActiveAccessToken":null,"MaritalStatus":"غير معروف","MaritalStatusCode":"U","NationalDateOfBirth":"26\/02\/1422","Nationality":"باكستان","NationalityCode":"PAK","Occupation":"-","PCDTransactionDataResultList":null,"PCD_GetVidaPatientForManualVerificationList":null,"PCD_NHIC_HMG_PatientDetailsMatchCalulationList":null,"PCD_ReturnValue":0,"PatientStatus":"-","PlaceofBirth":"-","PractitionerStatusCode":null,"PractitionerStatusDescAr":null,"PractitionerStatusDescEn":null,"RowCount":0,"SecondNameAr":"عظيم","SecondNameEn":"AZEEM","ThirdNameAr":"خان عمر","ThirdNameEn":"KHAN UMAR","YakeenDoctorData_GetSourceList":null,"YakeenVidaPatientDataStatisticsByPatientIdList":null,"YakeenVidaPatientDataStatisticsList":null,"YakeenVidaPatientDataStatisticsPrefferedList":null,"accessToken":null,"categoryCode":0,"categoryNameAr":null,"categoryNameEn":null,"constraintCode":0,"constraintNameAr":null,"constraintNameEn":null,"content":null,"errorList":null,"licenseExpiryDate":null,"licenseIssuedDate":null,"licenseStatusCode":null,"licenseStatusDescAr":null,"licenseStatusDescEn":null,"organizations":null,"registrationNumber":null,"specialtyCode":0,"specialtyNameAr":null,"specialtyNameEn":null}'; + + post(String endPoint, + {required Map body, + required Function(dynamic response, int statusCode) onSuccess, + required Function(String error, int statusCode) onFailure, + bool isAllowAny = false, + bool isExternal = false, + bool isRCService = false, + bool bypassConnectionCheck = false}) async { + String url; + if (isExternal) { + url = endPoint; + } else { + if (isRCService) + url = RC_BASE_URL + endPoint; + else + url = BASE_URL + endPoint; + } + try { + String? pharmacyToken = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); + var user = await sharedPref.getObject(USER_PROFILE); + Map headers = {'Content-Type': 'application/json', 'Accept': 'application/json'}; + if (!isExternal) { + String? token = await sharedPref.getString(TOKEN); + String? languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + if (endPoint == SEND_ACTIVATION_CODE) { + languageID = 'en'; + } + if (body.containsKey('SetupID')) { + body['SetupID'] = body.containsKey('SetupID') + ? body['SetupID'] != null + ? body['SetupID'] + : SETUP_ID + : SETUP_ID; + } + + body['VersionID'] = VERSION_ID; + body['Channel'] = CHANNEL; + + if (body.containsKey('LanguageID')) { + if (body['LanguageID'] != null) { + //change this line because language issue happened on dental + body['LanguageID'] = body['LanguageID'] == 'ar' + ? 1 + : body['LanguageID'] == 'en' + ? 2 + : body['LanguageID']; + } else { + body['LanguageID'] = Provider.of(AppGlobal.context, listen: false).isArabic ? 1 : 2; + } + } else { + // body['LanguageID'] = (languageID.toString().toLowerCase() == 'ar' ? 1 : 2); + body['LanguageID'] = Provider.of(AppGlobal.context, listen: false).isArabic ? 1 : 2; + } + // } else { + // // body['LanguageID'] = (languageID.toString().toLowerCase() == 'ar' ? 1 : 2); + // body['LanguageID'] = + // Provider.of(AppGlobal.context, listen: false) + // .isArabic + // ? 1 + // : 2; + // } + + // body['LanguageID'] = Provider.of(AppGlobal.context, listen: false).isArabic ? 1 : 2; + + body['IPAdress'] = IP_ADDRESS; + body['generalid'] = GENERAL_ID; + // body['isVidaPlus'] = true; + + double lat = await AppSharedPreferences().getDouble(USER_LAT) ?? 0.0; + double long = await AppSharedPreferences().getDouble(USER_LONG) ?? 0.0; + + body['Latitude'] = lat; + body['Longitude'] = long; + + if (body.containsKey('isDentalAllowedBackend')) { + body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend') + ? body['isDentalAllowedBackend'] != null + ? body['isDentalAllowedBackend'] + : IS_DENTAL_ALLOWED_BACKEND + : IS_DENTAL_ALLOWED_BACKEND; + } + + body['DeviceTypeID'] = Platform.isIOS + ? 1 + : await Utils.isGoogleServicesAvailable() + ? 2 + : 3; + + if (!body.containsKey('IsPublicRequest')) { + // if (!body.containsKey('PatientType')) { + if (user != null && user['PatientType'] != null) { + body['PatientType'] = user['PatientType']; + } else { + body['PatientType'] = PATIENT_TYPE; + } + // } + + // body['PatientType'] = body.containsKey('PatientType') + // ? body['PatientType'] != null + // ? body['PatientType'] + // : user['PatientType'] != null + // ? user['PatientType'] + // : PATIENT_TYPE + // : PATIENT_TYPE; + + // if (!body.containsKey('PatientTypeID')) { + if (user != null && user['PatientType'] != null) { + body['PatientTypeID'] = user['PatientType']; + } else { + body['PatientType'] = PATIENT_TYPE_ID; + } + // } + + // body['PatientTypeID'] = body.containsKey('PatientTypeID') + // ? body['PatientTypeID'] != null + // ? body['PatientTypeID'] + // : user['PatientType'] != null + // ? user['PatientType'] + // : PATIENT_TYPE_ID + // : PATIENT_TYPE_ID; + + if (user != null) { + body['TokenID'] = body['TokenID'] != null ? body['TokenID'] : token; + body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID']; + + body['PatientOutSA'] = body.containsKey('PatientOutSA') + ? body['PatientOutSA'] != null + ? body['PatientOutSA'] + : user['OutSA'] + : user['OutSA']; + body['SessionID'] = getSessionId(body['TokenID'] != null ? body['TokenID'] : ""); //getSe + // body['SessionID'] = body['TokenID']; //getSe + + // headers = { + // 'Content-Type': 'application/json', + // 'Accept': 'application/json', + // 'Authorization': pharmacyToken, + // 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "", + // 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', + // 'Username': user['PatientID'].toString(), + // }; + } + } + } + + // body['IdentificationNo'] = 1023854217; + // body['MobileNo'] = "531940021"; //0560717232 + // body['PatientID'] = 3628599; //4609100 + // body['TokenID'] = "@dm!n"; + + // Patient ID: 3027574 + // Mobile no.: 0502303285 + // ID: 119116817 + + body.removeWhere((key, value) => key == null || value == null); + + // if (url == 'https://uat.hmgwebservices.com/Services/NHIC.svc/REST/GetPatientInfo') { + // url = "https://hmgwebservices.com/Services/NHIC.svc/REST/GetPatientInfo"; + // body['TokenID'] = "@dm!n"; + // } + + // if (AppGlobal.isNetworkDebugEnabled) { + debugPrint("URL : $url"); + final jsonBody = json.encode(body); + debugPrint(jsonBody); + // } + + if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { + final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); + final int statusCode = response.statusCode; + if (statusCode < 200 || statusCode >= 400 || json == null) { + onFailure('Error While Fetching data', statusCode); + logApiEndpointError(endPoint, 'Error While Fetching data', statusCode); + } else { + // var decoded = utf8.decode(response.bodyBytes); + var parsed; + // if (url.contains('Services/NHIC.svc/REST/GetPatientInfo')) { + // parsed = json.decode(sampleNHICResponse); + // } else { + parsed = json.decode(utf8.decode(response.bodyBytes)); + // } + + // print("Response: $parsed"); + + if (isAllowAny) { + onSuccess(parsed, statusCode); + } else { + if (parsed['Response_Message'] != null) { + onSuccess(parsed, statusCode); + } else { + if (parsed['ErrorType'] == 4) { + navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']); + logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + } + if (parsed['ErrorType'] == 2) { + await logout(); + logApiEndpointError(endPoint, "session logged out", statusCode); + } + if (isAllowAny) { + onSuccess(parsed, statusCode); + } else if (parsed['IsAuthenticated'] == null) { + if (parsed['isSMSSent'] == true) { + onSuccess(parsed, statusCode); + } else if (parsed['MessageStatus'] == 1) { + onSuccess(parsed, statusCode); + } else if (parsed['Result'] == 'OK') { + onSuccess(parsed, statusCode); + } else { + // if (parsed != null) { + // onSuccess(parsed, statusCode); + // } else { + onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + // logout(); + // } + } + } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { + onSuccess(parsed, statusCode); + } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) { + if (parsed['SameClinicApptList'] != null) { + onSuccess(parsed, statusCode); + } else { + if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) { + if (parsed['ErrorSearchMsg'] == null) { + onFailure("Server Error found with no available message", statusCode); + logApiEndpointError(endPoint, "Server Error found with no available message", statusCode); + } else { + onFailure(parsed['ErrorSearchMsg'], statusCode); + logApiEndpointError(endPoint, parsed['ErrorSearchMsg'], statusCode); + } + } else { + onFailure(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + logApiEndpointError(endPoint, parsed['message'] ?? parsed['message'], statusCode); + } + } + } + // else if (!parsed['IsAuthenticated']) { + // await logout(); + // } + else { + if (parsed['SameClinicApptList'] != null) { + onSuccess(parsed, statusCode); + } else { + if (parsed['message'] != null) { + onFailure(parsed['message'] ?? parsed['message'], statusCode); + logApiEndpointError(endPoint, parsed['message'] ?? parsed['message'], statusCode); + } else { + onFailure(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + } + } + } + } + } + } + } else { + onFailure('Please Check The Internet Connection', -1); + _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); + } + } catch (e) { + print(e); + onFailure(e.toString(), -1); + _analytics.errorTracking.log(endPoint, error: "api exception: $e - API Path: $url"); + } + } + + postPharmacy(String endPoint, + {Map? body, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, bool isAllowAny = false, bool isExternal = false}) async { + var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); + var user = await sharedPref.getObject(USER_PROFILE); + String url; + if (isExternal) { + url = endPoint; + } else { + url = PHARMACY_BASE_URL + endPoint; + } + try { + //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', + 'Authorization': pharmacyToken ?? '', + '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'); + + // if (body.containsKey('SetupID')) { + // body['SetupID'] = body.containsKey('SetupID') + // ? body['SetupID'] != null + // ? body['SetupID'] + // : SETUP_ID + // : SETUP_ID; + // } + // + // body['VersionID'] = VERSION_ID; + // body['Channel'] = CHANNEL; + // 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['DeviceTypeID'] = Platform.isAndroid ? 1 : 2; + // + // if (!body.containsKey('IsPublicRequest')) { + // body['PatientType'] = body.containsKey('PatientType') + // ? body['PatientType'] != null + // ? body['PatientType'] + // : user['PatientType'] != null + // ? user['PatientType'] + // : PATIENT_TYPE + // : PATIENT_TYPE; + // + // body['PatientTypeID'] = body.containsKey('PatientTypeID') + // ? body['PatientTypeID'] != null + // ? body['PatientTypeID'] + // : user['PatientType'] != null + // ? user['PatientType'] + // : PATIENT_TYPE_ID + // : PATIENT_TYPE_ID; + // if (user != null) { + // body['TokenID'] = token; + // body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID']; + // body['PatientOutSA'] = user['OutSA']; + // body['SessionID'] = SESSION_ID; //getSe + // } + // } + } + + print("URL : $url"); + print("Body : ${json.encode(body)}"); + print("Headers : ${json.encode(headers)}"); + + if (await Utils.checkConnection()) { + final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); + final int statusCode = response.statusCode; + // print("statusCode :$statusCode"); + if (statusCode < 200 || statusCode >= 400 || json == null) { + onFailure!('Error While Fetching data', statusCode); + logApiEndpointError(endPoint, 'Error While Fetching data', statusCode); + } else { + // var parsed = json.decode(response.body.toString()); + var parsed = json.decode(utf8.decode(response.bodyBytes)); + if (parsed['Response_Message'] != null) { + onSuccess!(parsed, statusCode); + } else { + if (parsed['ErrorType'] == 4) { + navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']); + logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + } + if (isAllowAny) { + onSuccess!(parsed, statusCode); + } else if (parsed['IsAuthenticated'] == null) { + if (parsed['isSMSSent'] == true) { + onSuccess!(parsed, statusCode); + } else if (parsed['MessageStatus'] == 1) { + onSuccess!(parsed, statusCode); + } else if (parsed['Result'] == 'OK') { + onSuccess!(parsed, statusCode); + } else { + if (parsed != null) { + onSuccess!(parsed, statusCode); + } else { + onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + logApiEndpointError(endPoint, 'session logged out', statusCode); + logout(); + } + } + } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { + onSuccess!(parsed, statusCode); + } else if (parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']) { + if (parsed['SameClinicApptList'] != null) { + onSuccess!(parsed, statusCode); + } else { + if (parsed['message'] == null && parsed['ErrorEndUserMessage'] == null) { + if (parsed['ErrorSearchMsg'] == null) { + onFailure!("Server Error found with no available message", statusCode); + logApiEndpointError(endPoint, "Server Error found with no available message", statusCode); + } else { + onFailure!(parsed['ErrorSearchMsg'], statusCode); + logApiEndpointError(endPoint, parsed['ErrorSearchMsg'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + } + } else { + onFailure!(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + logApiEndpointError(endPoint, parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + } + } + } else if (!parsed['IsAuthenticated']) { + await logout(); + + //helpers.showErrorToast('Your session expired Please login agian'); + } else { + if (parsed['SameClinicApptList'] != null) { + onSuccess!(parsed, statusCode); + } else { + if (parsed['message'] != null) { + onFailure!(parsed['message'] ?? parsed['message'], statusCode); + logApiEndpointError(endPoint, parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + } else { + onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + } + } + } + } + } + } else { + onFailure!('Please Check The Internet Connection', -1); + _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); + } + } catch (e) { + print(e); + onFailure!(e.toString(), -1); + _analytics.errorTracking.log(endPoint, error: "api exception: $e"); + } + } + + Future navigateToAppUpdate(context, String text) async { + Navigator.pushAndRemoveUntil( + locator().navigatorKey.currentContext!, + MaterialPageRoute(builder: (context) => AppUpdatePage(appUpdateText: text)), + (Route route) => false, + ); + } + + get(String endPoint, + {required Function(dynamic response, int statusCode) onSuccess, + required Function(String error, int statusCode) onFailure, + Map? queryParams, + bool isExternal = false, + bool isRCService = false}) async { + String url; + if (isExternal) { + url = endPoint; + } else { + if (isRCService) + url = RC_BASE_URL + endPoint; + else + url = BASE_URL + endPoint; + } + if (queryParams != null) { + String queryString = Uri(queryParameters: queryParams).query; + url += '?' + queryString; + } + + debugPrint("URL : $url"); + // print("Body : ${json.encode(body)}"); + + if (await Utils.checkConnection()) { + final response = await http.get( + Uri.parse(url.trim()), + headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}, + ); + final int statusCode = response.statusCode; + // print("statusCode :$statusCode"); + + if (statusCode < 200 || statusCode >= 400 || json == null) { + onFailure!('Error While Fetching data', statusCode); + logApiEndpointError(endPoint, 'Error While Fetching data', statusCode); + } else { + var parsed = json.decode(utf8.decode(response.bodyBytes)); + onSuccess!(parsed, statusCode); + } + } else { + onFailure!('Please Check The Internet Connection', -1); + _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); + } + } + + getPharmacy(String endPoint, + {required Function(dynamic response, int statusCode) onSuccess, + required Function(String error, int statusCode) onFailure, + bool isAllowAny = false, + bool isExternal = false, + Map? queryParams}) async { + var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); + var user = await sharedPref.getObject(USER_PROFILE); + + String url; + if (isExternal) { + url = endPoint; + } else { + url = PHARMACY_BASE_URL + endPoint; + } + if (queryParams != null) { + String queryString = Uri(queryParameters: queryParams).query; + url += '?' + queryString; + } + + print("URL : $url"); + var ss = json.encode(queryParams); + + if (await Utils.checkConnection()) { + final response = await http.get(Uri.parse(url.trim()), headers: { + 'Content-Type': 'text/html; charset=utf-8', + 'Accept': 'application/json', + 'Authorization': token ?? '', + 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "", + 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', + 'Username': user != null ? user['PatientID'].toString() : "", + // 'Host': "mdlaboratories.com", + }); + final int statusCode = response.statusCode; + // print("statusCode :$statusCode"); + + if (statusCode < 200 || statusCode >= 400 || json == null) { + if (statusCode == 401) { + onFailure!(TranslationBase.of(AppGlobal.context).pharmacyRelogin, statusCode); + logApiEndpointError(endPoint, TranslationBase.of(AppGlobal.context).pharmacyRelogin, statusCode); + Navigator.of(AppGlobal.context).pushNamed(HOME); + } else { + var bodyUtf = json.decode(utf8.decode(response.bodyBytes)); + // print(bodyUtf); + onFailure!(bodyUtf['error']['ErrorEndUserMsg'], statusCode); + logApiEndpointError(endPoint, bodyUtf['error']['ErrorEndUserMsg'], statusCode); + } + } else { + // var parsed = json.decode(response.body.toString()); + var bodyUtf = json.decode(utf8.decode(response.bodyBytes)); + onSuccess!(bodyUtf, statusCode); + } + } else { + onFailure!('Please Check The Internet Connection', -1); + _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); + } + } + + simplePost( + String fullUrl, { + required Map body, + required Map headers, + required Function(dynamic response, int statusCode) onSuccess, + required Function(String error, int statusCode) onFailure, + }) async { + String url = fullUrl; + // print("URL Query String: $url"); + // print("body: $body"); + + if (await Utils.checkConnection()) { + headers!.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); + final response = await http.post( + Uri.parse(url.trim()), + body: json.encode(body), + headers: headers, + ); + final int statusCode = response.statusCode; + // print("statusCode :$statusCode"); + if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simplePost(fullUrl, onFailure: onFailure, onSuccess: onSuccess, body: body, headers: headers); + + // print(response.body.toString()); + + if (statusCode < 200 || statusCode >= 400 || json == null) { + onFailure!('Error While Fetching data', statusCode); + logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode); + } else { + onSuccess!(response.body.toString(), statusCode); + } + } else { + onFailure!('Please Check The Internet Connection', -1); + _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); + } + } + + simpleGet(String fullUrl, + {Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, Map? queryParams, Map? headers}) async { + headers = headers ?? {}; + String url = fullUrl; + + var haveParams = (queryParams != null); + if (haveParams) { + String queryString = Uri(queryParameters: queryParams).query; + url += '?' + queryString; + // print("URL Query String: $url"); + } + + if (await Utils.checkConnection()) { + headers.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); + final response = await http.get( + Uri.parse(url.trim()), + headers: headers, + ); + + final int statusCode = response.statusCode; + // print("statusCode :$statusCode"); + if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simpleGet(fullUrl, onFailure: onFailure, onSuccess: onSuccess, headers: headers, queryParams: queryParams); + + if (statusCode < 200 || statusCode >= 400 || json == null) { + onFailure!('Error While Fetching data', statusCode); + logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode); + } else { + onSuccess!(response.body.toString(), statusCode); + } + } else { + onFailure!('Please Check The Internet Connection', -1); + _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); + } + } + + simplePut(String fullUrl, + {Map? body, Map? headers, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure}) async { + String url = fullUrl; + // print("URL Query String: $url"); + + if (await Utils.checkConnection()) { + headers!.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); + final response = await http.put( + Uri.parse(url.trim()), + body: json.encode(body), + headers: headers, + ); + + final int statusCode = response.statusCode; + // print("statusCode :$statusCode"); + if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simplePut(fullUrl, onFailure: onFailure, onSuccess: onSuccess, headers: headers, body: body); + + if (statusCode < 200 || statusCode >= 400 || json == null) { + onFailure!('Error While Fetching data', statusCode); + logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode); + } else { + onSuccess!(response.body.toString(), statusCode); + } + } else { + onFailure!('Please Check The Internet Connection', -1); + _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); + } + } + + simpleDelete(String fullUrl, + {Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, Map? queryParams, Map? headers}) async { + String url = fullUrl; + // print("URL Query String: $url"); + + var haveParams = (queryParams != null); + if (haveParams) { + String queryString = Uri(queryParameters: queryParams).query; + url += '?' + queryString; + // print("URL Query String: $url"); + } + + if (await Utils.checkConnection()) { + headers!.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); + final response = await http.delete( + Uri.parse(url.trim()), + headers: headers, + ); + + final int statusCode = response.statusCode; + // print("statusCode :$statusCode"); + if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simpleDelete(fullUrl, onFailure: onFailure, onSuccess: onSuccess, queryParams: queryParams, headers: headers); + + if (statusCode < 200 || statusCode >= 400 || json == null) { + onFailure!('Error While Fetching data', statusCode); + logApiFullUrlError(fullUrl, 'Error While Fetching data', statusCode); + } else { + onSuccess!(response.body.toString(), statusCode); + } + } else { + onFailure!('Please Check The Internet Connection', -1); + _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); + } + } + + Future handleUnauthorized(int statusCode, {required String forUrl}) async { + if (forUrl.startsWith(EXA_CART_API_BASE_URL) && statusCode == 401) { + final token = await generatePackagesToken(); + packagesAuthHeader['Authorization'] = 'Bearer $token'; + return token != null && (token is String); + } + return false; + } + + logout() async { + 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); + _vitalSignService.weightKg = ""; + _vitalSignService.heightCm = ""; + model.setState(0, 0, false, null); + Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); + } + + String getSessionId(String id) { + ///return id.replaceAll(RegExp('/[^\w\s]/'), ''); + // if (id != null) return id.replaceAll(RegExp('/[^a-zA-Z]'), ''); + return id.replaceAll(RegExp('/[^a-zA-Z]'), ''); + } + + static defaultHttpParameters() async { + String token = await sharedPref.getString(TOKEN); + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + var user = await sharedPref.getObject(USER_PROFILE); + var params = {}; + if (user != null) { + params['TokenID'] = token; + params['PatientID'] = user['PatientID']; + params['PatientOutSA'] = user['OutSA']; + params['SessionID'] = SESSION_ID; //getSessionId(token); + } + + params['IPAdress'] = IP_ADDRESS; + params['generalid'] = GENERAL_ID; + params['VersionID'] = VERSION_ID; + params['Channel'] = CHANNEL; + params['LanguageID'] = languageID == 'ar' ? 1 : 2; + + return params; + } + + pharmacyPost(String endPoint, + {Map? body, Function(dynamic response, int statusCode)? onSuccess, Function(String error, int statusCode)? onFailure, bool isAllowAny = false, bool isExternal = false}) async { + var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); + var user = await sharedPref.getObject(USER_PROFILE); + String url; + if (isExternal) { + url = endPoint; + } else { + url = BASE_PHARMACY_URL + endPoint; + } + try { + if (isExternal) { + String token = await sharedPref.getString(TOKEN); + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + var user = await sharedPref.getObject(USER_PROFILE); + if (body!.containsKey('SetupID')) { + body['SetupID'] = body.containsKey('SetupID') + ? body['SetupID'] != null + ? body['SetupID'] + : SETUP_ID + : SETUP_ID; + } + + body['VersionID'] = VERSION_ID; + body['Channel'] = CHANNEL; + body['LanguageID'] = languageID == 'ar' ? 1 : 2; + + body['IPAdress'] = IP_ADDRESS; + body['generalid'] = GENERAL_ID; + body['PatientOutSA'] = body.containsKey('PatientOutSA') + ? body['PatientOutSA'] != null + ? body['PatientOutSA'] + : user['OutSA'] + : user['OutSA']; + + if (body.containsKey('isDentalAllowedBackend')) { + body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend') + ? body['isDentalAllowedBackend'] != null + ? body['isDentalAllowedBackend'] + : IS_DENTAL_ALLOWED_BACKEND + : IS_DENTAL_ALLOWED_BACKEND; + } + + body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2; + + if (!body.containsKey('IsPublicRequest')) { + body['PatientType'] = body.containsKey('PatientType') + ? body['PatientType'] != null + ? body['PatientType'] + : user['PatientType'] != null + ? user['PatientType'] + : user['PatientType'] + : user['PatientType']; + + body['PatientTypeID'] = body.containsKey('PatientTypeID') + ? body['PatientTypeID'] != null + ? body['PatientTypeID'] + : user['PatientType'] != null + ? user['PatientType'] + : user['PatientType'] + : user['PatientType']; + if (user != null) { + body['TokenID'] = token; + body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID']; + body['PatientOutSA'] = user['OutSA']; + // body['SessionID'] = SESSION_ID; //getSessionId(token); + } + } + } + + // print("URL : $url"); + // print("Body : ${json.encode(body)}"); + var ss = json.encode(body); + + if (await Utils.checkConnection()) { + final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: { + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'Authorization': token ?? '', + 'Mobilenumber': user != null ? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString()) : "", + 'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9', + 'Username': user != null ? user['PatientID'].toString() : "", + }); + final int statusCode = response.statusCode; + // print("statusCode :$statusCode"); + if (statusCode < 200 || statusCode >= 400 || json == null) { + var parsed = json.decode(utf8.decode(response.bodyBytes)); + onFailure!(parsed['error']['ErrorEndUserMsgN'] ?? 'Error While Fetching data', statusCode); + logApiEndpointError(endPoint, parsed['error']['ErrorEndUserMsgN'] ?? 'Error While Fetching data', statusCode); + } else { + // var parsed = json.decode(response.body.toString()); + var parsed = json.decode(utf8.decode(response.bodyBytes)); + if (parsed['Response_Message'] != null) { + onSuccess!(parsed, statusCode); + } else { + if (parsed['ErrorType'] == 4) { + navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']); + } + if (isAllowAny) { + onSuccess!(parsed, statusCode); + } else if (parsed['IsAuthenticated'] == null) { + if (parsed['isSMSSent'] == true) { + onSuccess!(parsed, statusCode); + } else if (parsed['MessageStatus'] == 1) { + onSuccess!(parsed, statusCode); + } else if (parsed['Result'] == 'OK') { + onSuccess!(parsed, statusCode); + } else { + if (parsed != null) { + onSuccess!(parsed, statusCode); + } else { + onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + logout(); + } + } + } 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) { + if (parsed['ErrorSearchMsg'] == null) { + onFailure!("Server Error found with no available message", statusCode); + logApiEndpointError(endPoint, "Server Error found with no available message", statusCode); + } else { + onFailure!(parsed['ErrorSearchMsg'], statusCode); + logApiEndpointError(endPoint, parsed['ErrorSearchMsg'], statusCode); + } + } else { + onFailure!(parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + logApiEndpointError(endPoint, parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + } + } else if (!parsed['IsAuthenticated']) { + await logout(); + + //helpers.showErrorToast('Your session expired Please login agian'); + } else { + if (parsed['SameClinicApptList'] != null) { + onSuccess!(parsed, statusCode); + } else { + if (parsed['message'] != null) { + onFailure!(parsed['message'] ?? parsed['message'], statusCode); + logApiEndpointError(endPoint, parsed['message'] ?? parsed['message'], statusCode); + } else { + onFailure!(parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + logApiEndpointError(endPoint, parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); + } + } + } + } + } + } else { + onFailure!('Please Check The Internet Connection', -1); + _analytics.errorTracking.log("internet_connectivity", error: "no internet available"); + } + } catch (e) { + print(e); + onFailure!(e.toString(), -1); + logApiEndpointError(endPoint, e.toString(), -1); + } + } + + Future generatePackagesToken() async { + var url = EXA_CART_API_BASE_URL + PACKAGES_TOKEN; + var body = { + "api_client": {"client_id": "a4ab6be4-424f-4836-b032-46caed88e184", "client_secret": "3c1a3e07-4a40-4510-9fb0-ee5f0a72752c"} + }; + String? token; + final completer = Completer(); + simplePost(url, body: body, headers: {}, onSuccess: (dynamic stringResponse, int statusCode) { + if (statusCode == 200) { + var jsonResponse = json.decode(stringResponse); + token = jsonResponse['auth_token']; + completer.complete(); + } + }, onFailure: (String error, int statusCode) { + completer.complete(); + logApiFullUrlError(url, error, statusCode); + }); + await completer.future; + return token!; + } + + logApiFullUrlError(String fullUrl, error, code) { + final endpoint = Uri.parse(fullUrl).pathSegments.last; + logApiEndpointError(endpoint, error, code); + } + + logApiEndpointError(String endPoint, error, code) { + _analytics.errorTracking.log(endPoint, error: error); + } +} diff --git a/lib/core/service/contactus/finadus_service.dart b/lib/core/service/contactus/finadus_service.dart new file mode 100644 index 00000000..4c3f5877 --- /dev/null +++ b/lib/core/service/contactus/finadus_service.dart @@ -0,0 +1,42 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; + +import '../base_service.dart'; + +class FindusService extends BaseService { + + + List FindusModelList =[]; + List FindusHospitalModelList =[]; + List FindusPharmaciesModelList =[]; + Map body = Map(); + + Future getAllFindUsOrders() async { + hasError = false; + + var lat = await sharedPref.getDouble(USER_LAT); + var long = await sharedPref.getDouble(USER_LONG); + body['Latitude'] = lat ?? 0; + body['Longitude'] = long ?? 0; + + await baseAppClient.post(GET_FINDUS_REQUEST, + onSuccess: (dynamic response, int statusCode) { + FindusModelList.clear(); + FindusHospitalModelList.clear(); + FindusPharmaciesModelList.clear(); + + response['ListHMGLocation'].forEach((vital) { + if (GetHMGLocationsModel.fromJson(vital).locationType == 1) { + FindusHospitalModelList.add(GetHMGLocationsModel.fromJson(vital)); + } else { + FindusPharmaciesModelList.add(GetHMGLocationsModel.fromJson(vital)); + } + + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/contactus/livechat_service.dart b/lib/core/service/contactus/livechat_service.dart new file mode 100644 index 00000000..0b8402af --- /dev/null +++ b/lib/core/service/contactus/livechat_service.dart @@ -0,0 +1,31 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/contactus/get_patientI_cprojects.dart'; + +import '../base_service.dart'; + +class LiveChatService extends BaseService { + List LivechatModelList =[]; + + Map body = Map(); + // body['body'] + + Future getAllLiveChatOrders() async { + hasError = false; + body['List_PatientICProjects'] = false; + body['Latitude'] = await this.sharedPref.getDouble(USER_LAT); + body['Longitude'] = await this.sharedPref.getDouble(USER_LONG); + + await baseAppClient.post(GET_LIVECHAT_REQUEST, + onSuccess: (dynamic response, int statusCode) { + LivechatModelList.clear(); + + response['List_PatientICProjects'].forEach((vital) { + LivechatModelList.add(GetPatientICProjectsModel.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/dashboard_service.dart b/lib/core/service/dashboard_service.dart new file mode 100644 index 00000000..4db1fd6a --- /dev/null +++ b/lib/core/service/dashboard_service.dart @@ -0,0 +1,5 @@ +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class DashboardService extends BaseService { + +} diff --git a/lib/core/service/er/EdOnlineServices.dart b/lib/core/service/er/EdOnlineServices.dart new file mode 100644 index 00000000..71beec0b --- /dev/null +++ b/lib/core/service/er/EdOnlineServices.dart @@ -0,0 +1,79 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/er/ErPatientShareModel.dart'; +import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:flutter/cupertino.dart'; + +class EdOnlineServices extends BaseService { + List triageQuestionsModelList =[]; + ErPatientShareModel? erPatientShareModel; + + Future getQuestions() async { + hasError = false; + triageQuestionsModelList.clear(); + Map body = Map(); + body['ProjectID'] = 15; + await baseAppClient.post(ER_GET_VISUAL_TRIAGE_QUESTIONS, onSuccess: (dynamic response, int statusCode) { + triageQuestionsModelList.clear(); + response['ER_TriageQuestionsList'].forEach((questions) { + triageQuestionsModelList.add(TriageQuestionsModel.fromJson(questions)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getPatientPaymentInformation({var id}) async { + hasError = false; + await baseAppClient.post(ER_GetPatientPaymentInformationForERClinic, onSuccess: (dynamic response, int statusCode) { + erPatientShareModel = ErPatientShareModel.fromJson(response['ER_PatientShare']); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map.from({"ProjectID": 15, "ClinicID": 10})); + } + + Future saveQuestionsInformation({String? notes, String? chiefComplaint, int? projectId, DateTime? selectedTime, List? selectedQuestions}) async { + AppSharedPreferences sharedPref = AppSharedPreferences(); + hasError = false; + Map body = Map(); + List checklist =[]; + + body['ProjectID'] = 15; + body['ProjectId'] = projectId; + int riskScore = 0; + + if (user.age! > 14) { + selectedQuestions!.forEach((element) { + int score = int.parse((element.adultPoints! != "" ? element.adultPoints! : "0")); + riskScore += score; + checklist.add(Map.from({"IsSelected": 1, "ParameterCode": element.parameterCode, "ParameterGroup": element.parameterGroup, "ParameterType": element.parameterType, "Score": score})); + }); + } else { + selectedQuestions!.forEach((element) { + int score = int.parse(element.pediaPoints!); + riskScore += score; + checklist.add(Map.from({"IsSelected": 1, "ParameterCode": element.parameterCode, "ParameterGroup": element.parameterGroup, "ParameterType": element.parameterType, "Score": score})); + }); + } + + body['ERTriageInformation'] = { + "Notes": notes, + "ChiefComplaint": chiefComplaint, + "PatientId": user.patientID, + "ProjectId": projectId, + "RiskScore": riskScore, + "checklist": checklist.map((e) => e).toList() + }; + + sharedPref.setInt(ER_CHECKIN_RISK_SCORE, riskScore); + + await baseAppClient.post(ER_SAVE_TRIAGE_INFORMATION, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/er/am_service.dart b/lib/core/service/er/am_service.dart new file mode 100644 index 00000000..69c494d2 --- /dev/null +++ b/lib/core/service/er/am_service.dart @@ -0,0 +1,147 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; +import 'package:diplomaticquarterapp/core/model/er/AmbulanceRequestOrdersModel.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; +import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart'; +import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; +import 'package:flutter/cupertino.dart'; + +import '../base_service.dart'; + +class AmService extends BaseService { + List amModelList =[]; + List patientAllPresOrdersList =[]; + + List patientAmbulanceRequestOrdersList =[]; + + bool hasPendingOrder = false; + int pendingOrderID = 0; + String pendingOrderStatus = ""; + String pendingOrderStatusAR = ""; + PickUpRequestPresOrder? pickUpRequestPresOrder; + + AmbulanceRequestOrdersModel? pendingAmbulanceRequestOrder; + + Future getAllTransportationOrders() async { + hasError = false; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + body['IdentificationNo'] = user.patientIdentificationNo; + await baseAppClient.get(GET_ALL_TRANSPORTATIONS_RC + "?patientID=" + user.patientID.toString(), isRCService: true, isExternal: false, onSuccess: (dynamic response, int statusCode) { + amModelList.clear(); + response['response']['transportationservices'].forEach((item) { + amModelList.add(PatientERTransportationMethod.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } + + Future getPatientAllPresOrdersList() async { + hasError = false; + hasPendingOrder = false; + pickUpRequestPresOrder = null; + await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS, onSuccess: (dynamic response, int statusCode) { + patientAllPresOrdersList.clear(); + response['PatientER_GetPatientAllPresOrdersList'].forEach((item) { + if (item['ServiceID'] == OrderService.AMBULANCE.getIdOrderService()) { + var order = PatientAllPresOrders.fromJson(item); + patientAllPresOrdersList.add(order); + if (order.status == 1) { + hasPendingOrder = true; + pendingOrderID = order.iD!; + pendingOrderStatus = order.description!; + pendingOrderStatusAR = order.descriptionN!; + } + } + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map()); + } + + Future getPatientAllPresOrdersListRC(dynamic patientID) async { + hasError = false; + hasPendingOrder = false; + pickUpRequestPresOrder = null; + + Map body = Map(); + body['patientId'] = patientID; + body['PatientID'] = patientID; + + await baseAppClient.post(GET_ALL_TRANSPORTATIONS_ORDERS, isRCService: true, onSuccess: (dynamic response, int statusCode) { + patientAmbulanceRequestOrdersList.clear(); + hasPendingOrder = false; + pendingOrderID = 0; + pendingAmbulanceRequestOrder = null; + + response['response'].forEach((item) { + patientAmbulanceRequestOrdersList.add(AmbulanceRequestOrdersModel.fromJson(item)); + if (item['StatusId'] == 1) { + hasPendingOrder = true; + pendingOrderID = item['orderpayment']['id']; + pendingOrderStatus = item['statusText']; + pendingOrderStatusAR = item['statusText']; + pendingAmbulanceRequestOrder = AmbulanceRequestOrdersModel.fromJson(item); + } + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getOrderDetails() async { + hasError = false; + Map body = Map(); + body['PresOrderID'] = pendingOrderID; + body['isDentalAllowedBackend'] = false; + await baseAppClient.post(GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID, onSuccess: (dynamic response, int statusCode) { + response['PatientER_RRT_GetPickUpRequestByPresOrderIDList'].forEach((item) { + pickUpRequestPresOrder = PickUpRequestPresOrder.fromJson(item); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future updatePressOrder({required int presOrderID}) async { + hasError = false; + Map body = Map(); + body['PresOrderID'] = presOrderID; + body['EditedBy'] = 3; + body['RejectionReason'] = ''; + body['PresOrderStatus'] = OrderService.AMBULANCE.getIdOrderService(); + 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); + } + + Future updatePressOrderRC({required int presOrderID, required int patientID}) async { + hasError = false; + Map body = Map(); + body['Id'] = presOrderID; + body['StatusId'] = 6; + body['ClickButton'] = 14; + body['PatientID'] = patientID; + await baseAppClient.post(CANCEL_AMBULANCE_REQUEST, isRCService: true, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future insertERPressOrder({required PatientER_RC patientER}) async { + hasError = false; + var body = patientER.toJson(); + await baseAppClient.post(INSERT_TRANSPORTATION_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/er/er_service.dart b/lib/core/service/er/er_service.dart new file mode 100644 index 00000000..f1aa6c3c --- /dev/null +++ b/lib/core/service/er/er_service.dart @@ -0,0 +1,36 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart'; + +import '../base_service.dart'; + +class ErService extends BaseService { + List projectAvgERWaitingTimeModelList =[]; + + Map body = Map(); + + Future getProjectAvgERWaitingTimeOrders({int? id, int? projectID}) async { + hasError = false; + + if (id != null && projectID != null) { + body['ID'] = id; + body['ProjectID'] = projectID; + } + var lat = await sharedPref.getDouble(USER_LAT); + var long = await sharedPref.getDouble(USER_LONG); + body['Latitude'] = lat ?? 0; + body['Longitude'] = long ?? 0; + body['IsForER'] = true; + + dynamic localRes; + + await baseAppClient.post(GET_NEAREST_HOSPITAL, + onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } +} diff --git a/lib/core/service/feedback/feedback_service.dart b/lib/core/service/feedback/feedback_service.dart new file mode 100644 index 00000000..a6ca0cb0 --- /dev/null +++ b/lib/core/service/feedback/feedback_service.dart @@ -0,0 +1,133 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; +import 'package:diplomaticquarterapp/core/model/feedback/request_insert_coc_item.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; + +class FeedbackService extends BaseService { + List cOCItemList =[]; + RequestInsertCOCItem _requestInsertCOCItem = RequestInsertCOCItem(); + List appointHistoryList =[]; + + Future sendCOCItem({String? title, String? details, String? cOCTypeName, String? attachment, AppoitmentAllHistoryResultList? appointHistory}) async { + hasError = false; + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + + _requestInsertCOCItem.attachment = attachment; + _requestInsertCOCItem.title = title; + _requestInsertCOCItem.details = details; + _requestInsertCOCItem.cOCTypeName = cOCTypeName; + _requestInsertCOCItem.formTypeID = cOCTypeName; + _requestInsertCOCItem.mobileNo = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber!); + _requestInsertCOCItem.isUserLoggedIn = true; + _requestInsertCOCItem.projectID = user.projectID; + _requestInsertCOCItem.patientName = user.firstName! + " " + user.lastName!; + _requestInsertCOCItem.fileName = ""; + _requestInsertCOCItem.appVersion = VERSION_ID; + _requestInsertCOCItem.uILanguage = languageID; //TODO Change it to be dynamic + _requestInsertCOCItem.browserInfo = Platform.localHostname; + _requestInsertCOCItem.deviceInfo = Platform.localHostname; + _requestInsertCOCItem.resolution = "400x847"; + _requestInsertCOCItem.projectID = 0; + _requestInsertCOCItem.tokenID = "C0c@@dm!n?T&A&A@Barcha202029582948"; + _requestInsertCOCItem.identificationNo = int.parse(user.patientIdentificationNo!); + if (BASE_URL.contains('uat')) { + _requestInsertCOCItem.forDemo = true; + } else { + _requestInsertCOCItem.forDemo = false; + } + final Map body = _requestInsertCOCItem.toJson(); + + if (appointHistory != null) { + body['AppoinmentNo'] = appointHistory.appointmentNo; + body['AppointmentDate'] = appointHistory.appointmentDate; + body['ClinicID'] = appointHistory.clinicID; + body['ClinicName'] = appointHistory.clinicName; + body['DoctorID'] = appointHistory.doctorID; + body['DoctorName'] = appointHistory.doctorNameObj; + body['ProjectName'] = appointHistory.projectName; + } + + await baseAppClient.post(SEND_FEEDBACK, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getStatusCOC() async { + hasError = false; + Map body = new Map(); + body['IdentificationNo'] = user.patientIdentificationNo; + body['MobileNo'] = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber!); + body['Searching_type'] = 1; + + if (BASE_URL.contains('uat')) { + body['ForDemo'] = true; + } + await baseAppClient.post(GET_STATUS_FOR_COCO, onSuccess: (dynamic response, int statusCode) { + cOCItemList = []; + response['ListCOCItems'].forEach((cOC) { + cOCItemList.add(COCItem.fromJson(cOC)); + }); + cOCItemList = cOCItemList.reversed.toList(); // Sort list in desc order + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future searchFeedback(String countryCode, String phoneNumber, int type, String idNumber) async { + hasError = false; + Map body = new Map(); + if (type == 1) { + body['IdentificationNo'] = 0; + body['PatientID'] = num.tryParse(idNumber); + body['ItemID'] = 0; + } else if (type == 2) { + body['IdentificationNo'] = idNumber; + body['PatientID'] = 0; + body['ItemID'] = 0; + } else { + body['IdentificationNo'] = 0; + body['PatientID'] = 0; + body['ItemID'] = idNumber; + } + + body['PatientOutSA'] = countryCode.contains("966") ? 0 : 1; + + body['MobileNo'] = countryCode + Utils.getPhoneNumberWithoutZero(phoneNumber); + body['Searching_type'] = type; + if (BASE_URL.contains('uat')) { + body['ForDemo'] = true; + } + await baseAppClient.post(GET_STATUS_FOR_COCO, onSuccess: (dynamic response, int statusCode) { + cOCItemList = []; + response['ListCOCItems'].forEach((cOC) { + cOCItemList.add(COCItem.fromJson(cOC)); + }); + cOCItemList = cOCItemList.reversed.toList(); // Sort list in desc order + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getPatentAppointmentHistory() async { + hasError = false; + Map body = new Map(); + body['IsComingFromCOC'] = true; + baseAppClient.post(GET_PATIENT_AppointmentHistory, onSuccess: (dynamic response, int statusCode) { + appointHistoryList = []; + response['AppoimentAllHistoryResultList'].forEach((appoint) { + appointHistoryList.add(AppoitmentAllHistoryResultList.fromJson(appoint)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/geofencing/GeofencingServices.dart b/lib/core/service/geofencing/GeofencingServices.dart new file mode 100644 index 00000000..ef565ac6 --- /dev/null +++ b/lib/core/service/geofencing/GeofencingServices.dart @@ -0,0 +1,52 @@ +import 'dart:convert'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/geofencing/requests/GeoZonesRequestModel.dart'; +import 'package:diplomaticquarterapp/core/model/geofencing/requests/LogGeoZoneRequestModel.dart'; +import 'package:diplomaticquarterapp/core/model/geofencing/responses/GeoZonesResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/geofencing/responses/LogGeoZoneResponseModel.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:flutter/foundation.dart'; + +class GeofencingServices extends BaseService { + List geoZones =[]; + bool testZones = true; + + Future> getAllGeoZones(GeoZonesRequestModel request) async { + hasError = false; + + var _zonesJsonString; + await baseAppClient.post(GET_GEO_ZONES, onSuccess: (dynamic response, int statusCode) { + var zones = response['GeoF_PointsList']; + zones.forEach((json) { + geoZones.add(GeoZonesResponseModel().fromJson(json)); + }); + + _zonesJsonString = json.encode(zones); + }, onFailure: (String error, int statusCode) { + hasError = true; + return Future.error(error); + }, body: request.toFlatMap()); + + AppSharedPreferences pref = AppSharedPreferences(); + await pref.setString(HMG_GEOFENCES, _zonesJsonString); + var res = await sharedPref.getStringWithDefaultValue(HMG_GEOFENCES, "[]"); + print("-------GEO ZONES----------: $res"); + return geoZones; + } + + LogGeoZoneResponseModel? logResponse; + + Future logGeoZone(LogGeoZoneRequestModel request) async { + hasError = false; + await baseAppClient.post(LOG_GEO_ZONES, onSuccess: (dynamic response, int statusCode) { + logResponse = LogGeoZoneResponseModel().fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + return Future.error(error); + }, body: request.toFlatMap()); + return logResponse!; + } +} diff --git a/lib/core/service/health-weather/health_weather_indicator.dart b/lib/core/service/health-weather/health_weather_indicator.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/core/service/hospital_service.dart b/lib/core/service/hospital_service.dart new file mode 100644 index 00000000..7d724e54 --- /dev/null +++ b/lib/core/service/hospital_service.dart @@ -0,0 +1,73 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:flutter/material.dart'; +import 'package:geolocator/geolocator.dart'; + +class HospitalService extends BaseService { + List _hospitals =[]; + + List get hospitals => _hospitals; + + double? _latitude; + double? _longitude; + + _getCurrentLocation() async { + if (await PermissionService.isLocationEnabled()) { + Geolocator.getLastKnownPosition().then((value) { + _latitude = value!.latitude; + _longitude = value.longitude; + }).catchError((e) { + _longitude = 0; + _latitude = 0; + }); + } else { + if (Platform.isAndroid) { + Utils.showPermissionConsentDialog(AppGlobal.context, TranslationBase.of(AppGlobal.context).locationPermissionDialog, () { + Geolocator.getLastKnownPosition().then((value) { + _latitude = value!.latitude; + _longitude = value.longitude; + }).catchError((e) { + _longitude = 0; + _latitude = 0; + }); + }); + } else { + Geolocator.getLastKnownPosition().then((value) { + _latitude = value!.latitude; + _longitude = value.longitude; + }).catchError((e) { + _longitude = 0; + _latitude = 0; + }); + } + } + } + + Future getHospitals(int languageID, {bool isResBasedOnLoc = true, bool isAdvancePayment = false}) async { + if (isResBasedOnLoc) await _getCurrentLocation(); + Map body = Map(); + body['Latitude'] = await this.sharedPref.getDouble(USER_LAT); + body['Longitude'] = await this.sharedPref.getDouble(USER_LONG); + body['IsOnlineCheckIn'] = isResBasedOnLoc; + body['IsAdvancePayment'] = isAdvancePayment; + body['LanguageID'] = languageID; + body['IsForER'] = true; + + await baseAppClient.post(GET_PROJECT, onSuccess: (dynamic response, int statusCode) { + _hospitals.clear(); + response['ListProject'].forEach((hospital) { + _hospitals.add(HospitalsModel.fromJson(hospital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/insurance_service.dart b/lib/core/service/insurance_service.dart new file mode 100644 index 00000000..9920f8f4 --- /dev/null +++ b/lib/core/service/insurance_service.dart @@ -0,0 +1,254 @@ +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/insuranceManualUpdateRequest.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'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart'; +import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/material.dart'; + +class InsuranceCardService extends BaseService { + List _cardList =[]; + List _cardUpdated =[]; + List _insuranceApproval =[]; + + List get cardList => _cardList; + + List get updatedCard => _cardUpdated; + + List get insuranceApproval => _insuranceApproval; + + InsuranceCardDetailsModel? insuranceCardDetails; + List insuranceCardDetailsList =[]; + bool isHaveInsuranceCard = false; + + GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse(); + + clearInsuranceCard() { + _cardList.clear(); + } + + clearUpdatedList() { + _cardUpdated.clear(); + } + + 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) { + response['List_PatientInsuranceCard'].forEach((item) { + _cardList.add(InsuranceCardModel.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map()); + } + + Future getInsuranceUpdate() async { + hasError = false; + _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)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map()); + } + + Future getInsuranceApproval({int? appointmentNo}) async { + hasError = false; + if (appointmentNo != null) { + _requestInsuranceApprovalModel.appointmentNo = appointmentNo; + _requestInsuranceApprovalModel.eXuldAPPNO = 0; + _requestInsuranceApprovalModel.projectID = 0; + } else { + _requestInsuranceApprovalModel.appointmentNo = 0; + _requestInsuranceApprovalModel.eXuldAPPNO = 0; + _requestInsuranceApprovalModel.projectID = 0; + } + _insuranceApproval.clear(); + _insuranceApproval.length = 0; + + await baseAppClient.post(GET_PAtIENTS_INSURANCE_APPROVALS, onSuccess: (dynamic response, int statusCode) { + response['HIS_Approval_List'].forEach((item) { + _insuranceApproval.add(InsuranceApprovalModel.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _requestInsuranceApprovalModel.toJson()); + } + + Future getFamilyFiles() async { + var myFamily = await sharedPref.getObject(FAMILY_FILE); + if (myFamily != null) { + getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(myFamily); + } else { + getSharedRecordByStatus(); + } + } + + Future getSharedRecordByStatus() async { + var myFamily = await sharedPref.getObject(FAMILY_FILE); + if (myFamily != null) { + getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(myFamily); + return Future.value(GetAllSharedRecordsByStatusResponse.fromJson(myFamily)); + } else { + try { + dynamic localRes; + var request = GetAllSharedRecordsByStatusReq(); + request.status = 0; + 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); + } catch (error) { + print("------------"+error.toString()); + throw error; + } + } + } + + 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}, + ); + return Future.value(localRes); + } + + Future getPatientInsuranceDetails({String? setupID, int? projectID, String? patientIdentificationID, int? patientID, bool? isFamily, int parentID = 0}) 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, + 'IsFamily': isFamily, + 'ParentID': parentID + }, + ); + } + + Future getInsuranceSchemes(int projectID, int companyID) async { + dynamic localRes; + await baseAppClient.post( + INSURANCE_SCHEMES, + onSuccess: (dynamic response, int statusCode) { + localRes = response['PatientER_SchemesOfAactiveCompaniesGetList']; + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: {'CompanyID': companyID, 'ProjectID': projectID}, + ); + return Future.value(localRes); + } + + Future submitManualInsuranceUpdateRequest(InsuranceManualUpdateRequest insuranceManualUpdateRequest) async { + dynamic localRes; + await baseAppClient.post( + UPDATE_MANUAL_INSURANCE, + onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: insuranceManualUpdateRequest.toJson(), + ); + return Future.value(localRes); + } + + Future getInsuranceCompanies() async { + dynamic localRes; + await baseAppClient.post( + INSURANCE_COMPANIES, + onSuccess: (dynamic response, int statusCode) { + localRes = response['PatientER_InsuranceCompanyGetList']; + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: {}, + ); + return Future.value(localRes); + } + + Future uploadInsuranceCard(BuildContext context, {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; + + dynamic localRes; + + await baseAppClient.post( + UPLOAD_INSURANCE_CARD, + onSuccess: (dynamic response, int statusCode) { + print(response); + if (response['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: TranslationBase.of(context).requestSent); + } else { + AppToast.showErrorToast(message: response['ErrorEndUserMessage']); + } + localRes = response; + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + throw error; + }, + body: body, + ); + return Future.value(localRes); + } +} diff --git a/lib/core/service/medical/ActiveMedicationsService.dart b/lib/core/service/medical/ActiveMedicationsService.dart new file mode 100644 index 00000000..eac538bf --- /dev/null +++ b/lib/core/service/medical/ActiveMedicationsService.dart @@ -0,0 +1,28 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/active_medications/ActivePrescriptionReport.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class ActiveMedicationsService extends BaseService{ + + List activePrescriptionReport =[]; + + getActiveMedication() async { + hasError = false; + super.error = ""; + Map body = Map(); + // body['isDentalAllowedBackend'] = false; + // body['PatientID'] = 1298851; + await baseAppClient.post(ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID, + onSuccess: (response, statusCode) async { + activePrescriptionReport.clear(); + response['List_ActiveGetPrescriptionReportByPatientID'].forEach((appoitment) { + activePrescriptionReport + .add(ActivePrescriptionReport.fromJson(appoitment)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + +} \ No newline at end of file diff --git a/lib/core/service/medical/AllergiesService.dart b/lib/core/service/medical/AllergiesService.dart new file mode 100644 index 00000000..698f2f48 --- /dev/null +++ b/lib/core/service/medical/AllergiesService.dart @@ -0,0 +1,25 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/Allergy/Allergy.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class AllergiesService extends BaseService { + List allergies =[]; + + getAllergies() async { + hasError = false; + super.error = ""; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + body['OutSA'] = 0; + await baseAppClient.post(GET_PATIENT_ALLERGIES, + onSuccess: (response, statusCode) async { + allergies.clear(); + response['Patient_Allergies'].forEach((allergy) { + allergies.add(Allergy.fromJson(allergy)); + }); + }, 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 new file mode 100644 index 00000000..33a0beeb --- /dev/null +++ b/lib/core/service/medical/BloodPressureService.dart @@ -0,0 +1,151 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/BloodPressureResult.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/MonthBloodPressureResultAverage.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/WeekBloodPressureResultAverage.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/YearBloodPressureResultAverage.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class BloodPressureService extends BaseService { + List monthDiabtectResultAverageList =[]; + List weekDiabtectResultAverageList =[]; + List yearDiabtecResultAverageList =[]; + + ///Result + List monthDiabtecPatientResult =[]; + List weekDiabtecPatientResult =[]; + List yearDiabtecPatientResult =[]; + + Future getBloodSugar() async { + hasError = false; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + await baseAppClient.post(GET_BLOOD_PRESSURE_RESULT_AVERAGE, + onSuccess: (dynamic response, int statusCode) { + monthDiabtectResultAverageList.clear(); + weekDiabtectResultAverageList.clear(); + yearDiabtecResultAverageList.clear(); + + response['List_MonthBloodPressureResultAverage'].forEach((item) { + monthDiabtectResultAverageList + .add(MonthBloodPressureResultAverage.fromJson(item)); + }); + + response['List_WeekBloodPressureResultAverage'].forEach((item) { + weekDiabtectResultAverageList + .add(WeekBloodPressureResultAverage.fromJson(item)); + }); + + response['List_YearBloodPressureResultAverage'].forEach((item) { + yearDiabtecResultAverageList + .add(YearBloodPressureResultAverage.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getDiabtecResults() async { + hasError = false; + await baseAppClient.post(GET_BLOOD_PRESSURE_RESULT, + onSuccess: (dynamic response, int statusCode) { + monthDiabtecPatientResult.clear(); + weekDiabtecPatientResult.clear(); + yearDiabtecPatientResult.clear(); + + response['List_WeekBloodPressureResult'].forEach((item) { + weekDiabtecPatientResult.add(BloodPressureResult.fromJson(item)); + }); + + response['List_MonthBloodPressureResult'].forEach((item) { + monthDiabtecPatientResult.add(BloodPressureResult.fromJson(item)); + }); + + response['List_YearBloodPressureResult'].forEach((item) { + yearDiabtecPatientResult.add(BloodPressureResult.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map()); + } + Future sendReportByEmail() async { + hasError = false; + super.error = ""; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + body['To'] = user.emailAddress; + await baseAppClient.post(SEND_AVERAGE_BLOOD_PRESSURE_REPORT, + onSuccess: (response, statusCode) async {}, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + addDiabtecResult( + {String? bloodPressureDate, + String? diastolicPressure, + String? systolicePressure, + int? measuredArm}) async { + hasError = false; + super.error = ""; + + Map body = Map(); + body['BloodPressureDate'] = bloodPressureDate; + body['DiastolicPressure'] = diastolicPressure; + body['SystolicePressure'] = systolicePressure; + body['MeasuredArm'] = measuredArm; + body['isDentalAllowedBackend'] = false; + + await baseAppClient.post(ADD_BLOOD_PRESSURE_RESULT, + onSuccess: (response, statusCode) async { + + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + updateDiabtecResult( + {String? bloodPressureDate, + String? diastolicPressure, + String? systolicePressure, + int? lineItemNo, + int? measuredArm}) async { + hasError = false; + super.error = ""; + + Map body = Map(); + body['BloodPressureDate'] = bloodPressureDate; + body['DiastolicPressure'] = diastolicPressure; + body['SystolicePressure'] = systolicePressure; + body['MeasuredArm'] ='$measuredArm'; + body['LineItemNo'] = lineItemNo; + body['isDentalAllowedBackend'] = false; + + await baseAppClient.post(UPDATE_BLOOD_PRESSURE_RESULT, + onSuccess: (response, statusCode) async { + + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future deactivateDiabeticStatus({int? lineItemNo }) async { + hasError = false; + super.error = ""; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + body['LineItemNo'] =lineItemNo; + await baseAppClient.post(DEACTIVATE_BLOOD_PRESSURES_STATUS, + onSuccess: (response, statusCode) async {}, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/medical/BloodSugarService.dart b/lib/core/service/medical/BloodSugarService.dart new file mode 100644 index 00000000..2cdae441 --- /dev/null +++ b/lib/core/service/medical/BloodSugarService.dart @@ -0,0 +1,124 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/MonthDiabtectResultAverage.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/WeekDiabtectResultAverage.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/YearDiabtecResultAverage.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class BloodSugarService extends BaseService { + List monthDiabtectResultAverageList =[]; + List weekDiabtectResultAverageList =[]; + List yearDiabtecResultAverageList =[]; + + ///Result + List monthDiabtecPatientResult =[]; + List weekDiabtecPatientResult =[]; + List yearDiabtecPatientResult =[]; + + Future getBloodSugar() async { + hasError = false; + Map body = Map(); + monthDiabtectResultAverageList.clear(); + weekDiabtectResultAverageList.clear(); + yearDiabtecResultAverageList.clear(); + monthDiabtecPatientResult.clear(); + weekDiabtecPatientResult.clear(); + yearDiabtecPatientResult.clear(); + body['isDentalAllowedBackend'] = false; + await baseAppClient.post(GET_DIABETIC_RESULT_AVERAGE, onSuccess: (dynamic response, int statusCode) { + + response['List_MonthDiabtectResultAverage'].forEach((item) { + monthDiabtectResultAverageList.add(MonthDiabtectResultAverage.fromJson(item)); + }); + + response['List_WeekDiabtectResultAverage'].forEach((item) { + weekDiabtectResultAverageList.add(WeekDiabtectResultAverage.fromJson(item)); + }); + + response['List_YearDiabtecResultAverage'].forEach((item) { + yearDiabtecResultAverageList.add(YearDiabtecResultAverage.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getDiabtecResults() async { + hasError = false; + monthDiabtecPatientResult.clear(); + weekDiabtecPatientResult.clear(); + yearDiabtecPatientResult.clear(); + await baseAppClient.post(GET_DIABTEC_RESULT, onSuccess: (dynamic response, int statusCode) { + + response['List_MonthDiabtecPatientResult'].forEach((item) { + monthDiabtecPatientResult.add(DiabtecPatientResult.fromJson(item)); + }); + + response['List_WeekDiabtecPatientResult'].forEach((item) { + weekDiabtecPatientResult.add(DiabtecPatientResult.fromJson(item)); + }); + + response['List_YearDiabtecPatientResult'].forEach((item) { + yearDiabtecPatientResult.add(DiabtecPatientResult.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + super.error = error; + }, body: Map()); + } + + addDiabtecResult({String? bloodSugerDateChart, String? bloodSugerResult, String? diabtecUnit, int? measuredTime}) async { + hasError = false; + super.error = ""; + Map body = Map(); + body['BloodSugerDateChart'] = bloodSugerDateChart; + body['BloodSugerResult'] = bloodSugerResult; + body['DiabtecUnit'] = diabtecUnit; + body['MeasuredTime'] = measuredTime! + 1; + body['isDentalAllowedBackend'] = false; + await baseAppClient.post(ADD_DIABTEC_RESULT, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + updateDiabtecResult({DateTime? month, DateTime? hour, String? bloodSugerResult, String? diabtecUnit, int? measuredTime, int? lineItemNo}) async { + hasError = false; + super.error = ""; + Map body = Map(); + body['BloodSugerResult'] = bloodSugerResult; + body['DiabtecUnit'] = diabtecUnit; + body['BloodSugerDateChart'] = '${month!.year}-${month.month}-${month.day} ${hour!.hour}:${hour.minute}:00'; + body['isDentalAllowedBackend'] = false; + body['MeasuredTime'] = measuredTime! + 1; + body['LineItemNo'] = lineItemNo; + await baseAppClient.post(UPDATE_DIABETIC_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_SUGAR_REPORT, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future deactivateDiabeticStatus({int? lineItemNo}) async { + hasError = false; + super.error = ""; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + body['LineItemNo'] = lineItemNo; + await baseAppClient.post(DEACTIVATE_DIABETIC_STATUS, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/medical/EyeService.dart b/lib/core/service/medical/EyeService.dart new file mode 100644 index 00000000..40ae1b08 --- /dev/null +++ b/lib/core/service/medical/EyeService.dart @@ -0,0 +1,68 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; + +class EyeService extends BaseService { + List appoimentAllHistoryResultList = []; + + getEyeMeasurement() async { + hasError = false; + super.error = ""; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + body['IsIrisPrescription'] = true; + await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async { + appoimentAllHistoryResultList.clear(); + response['AppoimentAllHistoryResultList'].forEach((appoitment) { + appoimentAllHistoryResultList.add(AppoimentAllHistoryResultList.fromJson(appoitment)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + sendGlassesPrescriptionEmail({int? appointmentNo, String? projectName, int? projectID}) async { + hasError = false; + super.error = ""; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + body['PatientIditificationNum'] = user.patientIdentificationNo; + body['PatientName'] = user.firstName! + " " + user.lastName!; + body['To'] = user.emailAddress; + body['SetupID'] = user.setupID; + body['DateofBirth'] = user.dateofBirth; + body['ProjectID'] = projectID; + body['AppointmentNo'] = appointmentNo; + body['ProjectName'] = projectName; + body['PatientID'] = user.patientID; + body['PatientMobileNumber'] = Utils.getPhoneNumberWithoutZero(user.mobileNumber!); + await baseAppClient.post(SEND_REPORT_EYE_EMAIL, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + sendContactLensPrescriptionEmail({int? appointmentNo, String? projectName, int? projectID}) async { + hasError = false; + super.error = ""; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + body['AppointmentNo'] = appointmentNo; + body['PatientIditificationNum'] = user.patientIdentificationNo; + body['PatientName'] = user.firstName! + " " + user.lastName!; + body['To'] = user.emailAddress; + body['SetupID'] = user.setupID; + body['DateofBirth'] = user.dateofBirth; + body['ProjectID'] = projectID; + body['AppointmentNo'] = appointmentNo; + body['ProjectName'] = projectName; + body['PatientID'] = user.patientID; + body['PatientMobileNumber'] = Utils.getPhoneNumberWithoutZero(user.mobileNumber!); + await baseAppClient.post(SEND_CONTACT_LENS_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/medical/PatientSickLeaveService.dart b/lib/core/service/medical/PatientSickLeaveService.dart new file mode 100644 index 00000000..0b177ec7 --- /dev/null +++ b/lib/core/service/medical/PatientSickLeaveService.dart @@ -0,0 +1,50 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class PatientSickLeaveService extends BaseService { + List sickLeaveList = []; + + String sickLeavePDF = ""; + + getSickLeave() async { + hasError = false; + super.error = ""; + await baseAppClient.post(GET_PATIENT_SICK_LEAVE_STATUS, onSuccess: (response, statusCode) async { + sickLeaveList.clear(); + if (response['List_SickLeave'] != null && response['List_SickLeave'].length != 0) { + response['List_SickLeave'].forEach((sickLeave) { + sickLeaveList.add(SickLeave.fromJson(sickLeave)); + }); + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map()); + } + + sendSickLeaveEmail({required int requestNo, required String projectName, required String doctorName, required int projectID, required String setupID, required bool isDownload}) async { + hasError = false; + super.error = ""; + Map body = Map(); + body['RequestNo'] = requestNo; + body['To'] = user.emailAddress; + body['DateofBirth'] = user.dateofBirth; + body['PatientIditificationNum'] = user.patientIdentificationNo; + body['PatientMobileNumber'] = user.mobileNumber; + body['PatientName'] = user.firstName! + " " + user.firstName!; + body['ProjectName'] = projectName; + body['DoctorName'] = doctorName; + body['ProjectID'] = projectID; + body['SetupID'] = setupID; + body['IsDownload'] = isDownload; + await baseAppClient.post(SendSickLeaveEmail, onSuccess: (response, statusCode) async { + if(isDownload) { + sickLeavePDF = response['Base64Data']; + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/medical/WeightPressureService.dart b/lib/core/service/medical/WeightPressureService.dart new file mode 100644 index 00000000..7246bfbe --- /dev/null +++ b/lib/core/service/medical/WeightPressureService.dart @@ -0,0 +1,130 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/weight/MonthWeightMeasurementResultAverage.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeekWeightMeasurementResultAverage.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeightMeasurementResult.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/weight/YearWeightMeasurementResultAverage.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class WeightService extends BaseService { + ///Average + List monthWeightMeasurementResultAverage =[]; + List weekWeightMeasurementResultAverage =[]; + List yearWeightMeasurementResultAverage =[]; + + ///Result + List monthWeightMeasurementResult =[]; + List weekWeightMeasurementResult =[]; + List yearWeightMeasurementResult =[]; + + Future getWeightAverage() async { + hasError = false; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + monthWeightMeasurementResultAverage.clear(); + weekWeightMeasurementResultAverage.clear(); + yearWeightMeasurementResultAverage.clear(); + await baseAppClient.post(GET_WEIGHT_PRESSURE_RESULT_AVERAGE, onSuccess: (dynamic response, int statusCode) { + response['List_MonthWeightMeasurementResultAverage'].forEach((item) { + monthWeightMeasurementResultAverage.add(MonthWeightMeasurementResultAverage.fromJson(item)); + }); + + response['List_WeekWeightMeasurementResultAverage'].forEach((item) { + weekWeightMeasurementResultAverage.add(WeekWeightMeasurementResultAverage.fromJson(item)); + }); + + response['List_YearWeightMeasurementResultAverage'].forEach((item) { + yearWeightMeasurementResultAverage.add(YearWeightMeasurementResultAverage.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getWeightMeasurementResult() async { + hasError = false; + monthWeightMeasurementResult.clear(); + weekWeightMeasurementResult.clear(); + yearWeightMeasurementResult.clear(); + await baseAppClient.post(GET_WEIGHT_PRESSURE_RESULT, onSuccess: (dynamic response, int statusCode) { + + response['List_WeekWeightMeasurementResult'].forEach((item) { + weekWeightMeasurementResult.add(WeightMeasurementResult.fromJson(item)); + }); + + response['List_MonthWeightMeasurementResult'].forEach((item) { + monthWeightMeasurementResult.add(WeightMeasurementResult.fromJson(item)); + }); + + response['List_YearWeightMeasurementResult'].forEach((item) { + yearWeightMeasurementResult.add(WeightMeasurementResult.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map()); + } + + addWeightResult({required String weightDate, required String weightMeasured, required int weightUnit}) async { + hasError = false; + super.error = ""; + + Map body = Map(); + body['WeightDate'] = weightDate; + body['WeightMeasured'] = weightMeasured; + body['weightUnit'] = weightUnit; + body['isDentalAllowedBackend'] = false; + + await baseAppClient.post(ADD_WEIGHT_PRESSURE_RESULT, onSuccess: (response, statusCode) async {}, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + updateWeightResult({required int lineItemNo, required int weightUnit, required String weightMeasured, required String weightDate}) async { + hasError = false; + super.error = ""; + Map body = Map(); + body['LineItemNo'] = lineItemNo; + body['weightUnit'] = '$weightUnit'; + body['WeightMeasured'] = weightMeasured; + body['WeightDate'] = weightDate; + body['isDentalAllowedBackend'] = false; + + 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 {}, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + deleteWeightResult({ + required 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 {}, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/medical/ask_doctor_services.dart b/lib/core/service/medical/ask_doctor_services.dart new file mode 100644 index 00000000..95597955 --- /dev/null +++ b/lib/core/service/medical/ask_doctor_services.dart @@ -0,0 +1,171 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/ask_doctor/AskDoctorReqTypes.dart'; +import 'package:diplomaticquarterapp/core/model/ask_doctor/DoctorResponse.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class AskDoctorService extends BaseService { + List askDoctorReqTypes =[]; + List doctorResponseList =[]; + + Future getCallInfoHoursResult({int? projectId, int? doctorId}) async { + hasError = false; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + body['DoctorID'] = doctorId; + body['ProjectID'] = projectId; + + dynamic localRes; + + await baseAppClient.post(GET_CALL_INFO_HOURS_RESULT, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } + + Future isDoctorAvailable({int? projectId, int? doctorId, int? clinicId}) async { + hasError = false; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + body['DoctorID'] = doctorId; + body['ProjectID'] = projectId; + body['ClinicID'] = clinicId; + + dynamic localRes; + + await baseAppClient.post(IS_DOCTOR_AVAILABLE_BY_CALENDAR_SCHEDULE, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } + + Future getCallRequestTypeLOV() async { + hasError = false; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + await baseAppClient.post(GET_CALL_REQUEST_TYPE_LOV, onSuccess: (dynamic response, int statusCode) { + askDoctorReqTypes.clear(); + response['ListReqTypes'].forEach((reqType) { + askDoctorReqTypes.add(AskDoctorReqTypes.fromJson(reqType)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getQuestionTypes() async { + hasError = false; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + await baseAppClient.post(GET_QUESTION_TYPES, onSuccess: (dynamic response, int statusCode) { + askDoctorReqTypes.clear(); + response['QuestionsTypes'].forEach((reqType) { + askDoctorReqTypes.add(AskDoctorReqTypes.fromJson(reqType)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getDoctorResponse() async { + hasError = false; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + body['from'] = "${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day} 00:00:00"; + body['from'] = "${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day} ${DateTime.now().hour}:${DateTime.now().minute}:00"; + await baseAppClient.post(GET_DOCTOR_RESPONSE, onSuccess: (dynamic response, int statusCode) { + doctorResponseList.clear(); + response['List_DoctorResponse'].forEach((reqType) { + doctorResponseList.add(DoctorResponse.fromJson(reqType)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future updateReadStatus({int? transactionNo}) async { + hasError = false; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + body['TransactionNo'] = transactionNo; + await baseAppClient.post(UPDATE_READ_STATUS, onSuccess: (dynamic response, int statusCode) { + //TODO fix it + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future sendRequestLOV({DoctorList? doctorList, String? requestType, String? remark}) async { + hasError = false; + Map body = Map(); + body['ProjectID'] = doctorList!.projectID; + body['SetupID'] = doctorList.setupID; + body['DoctorID'] = doctorList.doctorID; + body['PatientMobileNumber'] = user.mobileNumber; + body['IsMessageSent'] = false; + body['RequestDate'] = DateUtil.convertDateToString(DateTime.now()); + body['RequestTime'] = DateUtil.convertDateToString(DateTime.now()); + body['Remarks'] = remark; + body['Status'] = 2; // 4 for testing only.."cancelled status insert" else should be changed to 1 in live version + body['CreatedBy'] = 102; + body['CreatedOn'] = DateUtil.convertDateToString(DateTime.now()); + body['EditedBy'] = 102; + body['EditedOn'] = DateUtil.convertDateToString(DateTime.now()); + body['isDentalAllowedBackend'] = false; + body['AppointmentNo'] = doctorList.appointmentNo; + body['ClinicID'] = doctorList.clinicID; + body['QuestionType'] = num.parse(requestType!); + body['RequestType'] = num.parse(requestType); + body['RequestTypeID'] = num.parse(requestType); + + await baseAppClient.post(INSERT_CALL_INFO, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future rateDoctorResponse({int? transactionNo, int? questionType, int? rate, String? notes, String? mobileNo, String? idNo, String? patientName, int? projectID, String? language}) async { + hasError = false; + dynamic localRes; + Map body = Map(); + body['MobileNo'] = mobileNo; + body['IdentificationNo'] = idNo; + body['PatientName'] = patientName; + body['IsUserLoggedIn'] = true; + body['ProjectID'] = projectID; + body['UILanguage'] = language; + body['BrowserInfo'] = Platform.localHostname; + body['COCTypeName'] = 3; + body['FormTypeID'] = 3; + body['DeviceInfo'] = Platform.localHostname; + body['Resolution'] = "400x847"; + body['AppVersion'] = VERSION_ID; + body['ForDemo'] = false; + body['isVidaPlus'] = false; + body['TransactionNo'] = transactionNo; + body['QuestionType'] = questionType; + body['Rate'] = rate; + body['Notes'] = notes; + await baseAppClient.post(RATE_DOCTOR_RESPONSE, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } + +} diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart new file mode 100644 index 00000000..3f83a493 --- /dev/null +++ b/lib/core/service/medical/labs_service.dart @@ -0,0 +1,243 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart'; +import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart'; +import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; +import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart'; +import 'package:diplomaticquarterapp/core/model/labs/request_patient_lab_special_result.dart'; +import 'package:diplomaticquarterapp/core/model/labs/request_send_lab_report_email.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; + +class LabsService extends BaseService { + List patientLabOrdersList = []; + + String labReportPDF = ""; + + Future getPatientLabOrdersList() async { + hasError = false; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + await baseAppClient.post(GET_Patient_LAB_ORDERS, onSuccess: (dynamic response, int statusCode) { + patientLabOrdersList.clear(); + response['ListPLO'].forEach((hospital) { + patientLabOrdersList.add(PatientLabOrders.fromJson(hospital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + RequestPatientLabSpecialResult _requestPatientLabSpecialResult = RequestPatientLabSpecialResult(); + + List patientLabSpecialResult = []; + List labResultList = []; + List labOrdersResultsList = []; + + Future getLaboratoryResult({String? projectID, int? clinicID, String? invoiceNo, String? invoiceType, String? orderNo, String? setupID, bool? isVidaPlus}) async { + hasError = false; + _requestPatientLabSpecialResult.projectID = projectID; + _requestPatientLabSpecialResult.clinicID = clinicID; + + _requestPatientLabSpecialResult.invoiceNo = isVidaPlus! ? "0" : invoiceNo; + _requestPatientLabSpecialResult.invoiceNoVP = isVidaPlus ? invoiceNo : "0"; + + _requestPatientLabSpecialResult.invoiceType = invoiceType ?? ""; + + _requestPatientLabSpecialResult.orderNo = orderNo; + _requestPatientLabSpecialResult.setupID = setupID; + + await baseAppClient.post(GET_Patient_LAB_SPECIAL_RESULT, onSuccess: (dynamic response, int statusCode) { + patientLabSpecialResult.clear(); + response['ListPLSR'].forEach((hospital) { + patientLabSpecialResult.add(PatientLabSpecialResult.fromJson(hospital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _requestPatientLabSpecialResult.toJson()); + } + + Future getPatientLabResult({PatientLabOrders? patientLabOrder, bool? isVidaPlus}) async { + hasError = false; + Map body = Map(); + body['InvoiceNo_VP'] = isVidaPlus! ? patientLabOrder!.invoiceNo : "0"; + body['InvoiceNo'] = isVidaPlus ? "0" : patientLabOrder!.invoiceNo; + body['InvoiceType'] = patientLabOrder!.invoiceType; + body['OrderNo'] = patientLabOrder!.orderNo; + body['isDentalAllowedBackend'] = false; + body['SetupID'] = patientLabOrder.setupID; + body['ProjectID'] = patientLabOrder.projectID; + body['ClinicID'] = patientLabOrder.clinicID; + await baseAppClient.post(GET_Patient_LAB_RESULT, onSuccess: (dynamic response, int statusCode) { + patientLabSpecialResult.clear(); + labResultList.clear(); + response['ListPLR'].forEach((lab) { + labResultList.add(LabResult.fromJson(lab)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future generateCovidLabReport(LabResult covidLabResult, String isOutsideKSA) async { + hasError = false; + Map body = Map(); + + body['To'] = user.emailAddress; + body['OrderNo'] = covidLabResult.orderNo; + body['OrderLineItemNo'] = covidLabResult.orderLineItemNo; + body['LineItemNo'] = covidLabResult.resultValueBasedLineItemNo; + body['CertificateFormat'] = 5; + body['GeneratedBy'] = 102; + body['ShowPassportNumber'] = isOutsideKSA; + body['isDentalAllowedBackend'] = false; + body['SetupID'] = covidLabResult.setupID; + body['ProjectID'] = covidLabResult.projectID; + + dynamic localRes; + + await baseAppClient.post(SEND_COVID_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } + + Future updateCovidPassportNumber(String passportNumber) async { + hasError = false; + Map body = Map(); + + body['PassportNo'] = passportNumber; + + dynamic localRes; + + await baseAppClient.post(COVID_PASSPORT_UPDATE, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } + + Future updateWorkplaceName(String workplaceName, String workplaceNameAR, String occupation, String occupationAR, int requestNumber, String setupID, int projectID) async { + // Future updateWorkplaceName(String workplaceName, String workplaceNameAR, int requestNumber, String setupID, int projectID) async { + hasError = false; + Map body = Map(); + + body['Placeofwork'] = workplaceName; + body['PlaceofworkAr'] = workplaceNameAR; + body['Occupation'] = occupation; + body['OccupationAr'] = occupationAR; + body['Req_ID'] = requestNumber; + body['TargetSetupID'] = setupID; + body['ProjectID'] = projectID; + body['UserID'] = 102; + body['RequestType'] = 1; + + dynamic localRes; + + await baseAppClient.post(UPDATE_WORKPLACE_NAME, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } + + Future getCovidPassportNumber() async { + hasError = false; + Map body = Map(); + + dynamic localRes; + + await baseAppClient.post(GET_PATIENT_PASSPORT_NUMBER, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } + + Future getSickLeaveStatusByAdmissionNo(int projectID, int admissionNo) async { + hasError = false; + Map body = Map(); + + body['AdmissionNo'] = admissionNo; + body['ProjectID'] = projectID; + + dynamic localRes; + + await baseAppClient.post(GET_SICKLEAVE_STATUS_ADMISSION_NO, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return Future.value(localRes); + } + + Future getPatientLabOrdersResults({PatientLabOrders? patientLabOrder, String? procedure, bool isVidaPlus = false}) async { + hasError = false; + Map body = Map(); + body['InvoiceNo_VP'] = isVidaPlus ? patientLabOrder!.invoiceNo : "0"; + body['InvoiceNo'] = isVidaPlus ? "0" : patientLabOrder!.invoiceNo; + body['OrderNo'] = patientLabOrder!.orderNo; + body['isDentalAllowedBackend'] = false; + body['SetupID'] = patientLabOrder!.setupID; + body['ProjectID'] = patientLabOrder.projectID; + body['ClinicID'] = patientLabOrder.clinicID; + body['Procedure'] = procedure; + body['Procedure'] = procedure; + body['LanguageID'] = 1; + await baseAppClient.post(GET_Patient_LAB_ORDERS_RESULT, onSuccess: (dynamic response, int statusCode) { + labOrdersResultsList.clear(); + response['ListPLR'].forEach((lab) { + labOrdersResultsList.add(LabOrderResult.fromJson(lab)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + RequestSendLabReportEmail _requestSendLabReportEmail = RequestSendLabReportEmail(); + + Future sendLabReportEmail({PatientLabOrders? patientLabOrder, AuthenticatedUser? userObj, bool isVidaPlus = false, bool isDownload = false, int languageID = 1}) async { + _requestSendLabReportEmail.projectID = patientLabOrder!.projectID; + _requestSendLabReportEmail.invoiceNo = isVidaPlus ? "0" : patientLabOrder.invoiceNo; + _requestSendLabReportEmail.invoiceNoVP = isVidaPlus ? patientLabOrder.invoiceNo : "0"; + _requestSendLabReportEmail.invoiceType = patientLabOrder.invoiceType; + _requestSendLabReportEmail.doctorName = patientLabOrder.doctorName; + _requestSendLabReportEmail.clinicName = patientLabOrder.clinicDescription; + _requestSendLabReportEmail.patientName = userObj!.firstName! + " " + userObj.lastName!; + _requestSendLabReportEmail.patientIditificationNum = userObj.patientIdentificationNo; + _requestSendLabReportEmail.dateofBirth = userObj.dateofBirth; + _requestSendLabReportEmail.to = userObj.emailAddress; + _requestSendLabReportEmail.orderDate = '${patientLabOrder.orderDate!.year}-${patientLabOrder.orderDate!.month}-${patientLabOrder.orderDate!.day}'; + _requestSendLabReportEmail.patientMobileNumber = userObj.mobileNumber; + _requestSendLabReportEmail.projectName = patientLabOrder.projectName; + _requestSendLabReportEmail.setupID = patientLabOrder.setupID; + _requestSendLabReportEmail.orderNo = patientLabOrder.orderNo; + _requestSendLabReportEmail.orderNo = patientLabOrder.orderNo; + _requestSendLabReportEmail.isDownload = isDownload; + _requestSendLabReportEmail.doctorID = patientLabOrder.doctorID; + _requestSendLabReportEmail.languageID = languageID; + + // await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(isVidaPlus ? SEND_LAB_RESULT_EMAIL : SEND_LAB_RESULT_EMAIL_NEW, onSuccess: (dynamic response, int statusCode) { + if (isDownload) { + labReportPDF = isVidaPlus ? response['LabReportsPDFContent'] : response['PdfContent']; + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _requestSendLabReportEmail.toJson()); + } +} diff --git a/lib/core/service/medical/medical_service.dart b/lib/core/service/medical/medical_service.dart new file mode 100644 index 00000000..445f5ab6 --- /dev/null +++ b/lib/core/service/medical/medical_service.dart @@ -0,0 +1,87 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart'; +import 'package:flutter/cupertino.dart'; + +class MedicalService extends BaseService { + List appoitmentAllHistoryResultList =[]; + List doctorScheduleResponse =[]; + List freeSlots = []; + getAppointmentHistory({bool isActiveAppointment = false, bool isForTimeLine = false}) async { + hasError = false; + super.error = ""; + Map body = Map(); + if (isActiveAppointment) { + body['IsActiveAppointment'] = true; + body['isDentalAllowedBackend'] = false; + } + body['IsForTimeLine'] = isForTimeLine; + var appoHistory = await sharedPref.getObject(APPOINTMENT_HISTORY_MEDICAL); + if (appoHistory != null) { + appoitmentAllHistoryResultList.clear(); + appoHistory.forEach((appoitment) { + appoitmentAllHistoryResultList.add(AppoitmentAllHistoryResultList.fromJson(appoitment)); + }); + } else { + await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async { + appoitmentAllHistoryResultList.clear(); + response['AppoimentAllHistoryResultList'].forEach((appoitment) { + appoitmentAllHistoryResultList.add(AppoitmentAllHistoryResultList.fromJson(appoitment)); + }); + sharedPref.setObject(APPOINTMENT_HISTORY_MEDICAL, response['AppoimentAllHistoryResultList']); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + } + + addAmbulanceRequest({required PatientER patientER}) async { + hasError = false; + super.error = ""; + Map body = Map(); + body['RequesterFileNo'] = user.patientID; + body['RequesterMobileNo'] = user.mobileNumber; + body['RequesterIsOutSA'] = user.outSA; + await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + getSchedule(DoctorList doctorRequest) async { + Map request; + request = {'DoctorID': doctorRequest.doctorID, 'ProjectID': doctorRequest.projectID, 'ClinicID': doctorRequest.clinicID, 'DoctorWorkingHoursDays': 7}; + dynamic localRes; + await baseAppClient.post(DOCTOR_SCHEDULE_URL, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + doctorScheduleResponse.clear(); + localRes['List_DoctorWorkingHoursTable'].forEach((item) => {doctorScheduleResponse.add(DoctorScheduleResponse.fromJson(item))}); + } + + getFreeSlot(DoctorList doctorRequest) async { + Map request; + request = {'DoctorID': doctorRequest.doctorID, 'ProjectID': doctorRequest.projectID, 'ClinicID': doctorRequest.clinicID, 'DoctorWorkingHoursDays': 7}; + dynamic localRes; + await baseAppClient.post(GET_DOCTOR_FREE_SLOTS, onSuccess: (response, statusCode) async { + localRes = response; + freeSlots.clear(); + localRes['FreeTimeSlots'].forEach((item) => freeSlots.add(item)); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + // throw error; + }, body: request); + // freeSlots.clear(); + // localRes['FreeTimeSlots'].forEach((item) => freeSlots.add(item)); + // localRes['List_DoctorWorkingHoursTable'].forEach((item) => + // {doctorScheduleResponse.add(DoctorScheduleResponse.fromJson(item))}); + } +} diff --git a/lib/core/service/medical/my_balance_service.dart b/lib/core/service/medical/my_balance_service.dart new file mode 100644 index 00000000..e3b44586 --- /dev/null +++ b/lib/core/service/medical/my_balance_service.dart @@ -0,0 +1,203 @@ + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_advance_balance_amount.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart'; +import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; + +class MyBalanceService extends BaseService { + List patientAdvanceBalanceAmountList =[]; + dynamic totalAdvanceBalanceAmount; + List patientInfoList =[]; + GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = + GetAllSharedRecordsByStatusResponse(); + PatientInfoAndMobileNumber? patientInfoAndMobileNumber; + String? logInTokenID; + String? verificationCode; + String updatedRegisterBloodMessage = ""; + AuthenticatedUserObject authenticatedUserObject = + locator(); + + // MyBalanceService() { + // // getFamilyFiles(); + // } + + getPatientAdvanceBalanceAmount() async { + hasError = false; + super.error = ""; + await baseAppClient.post(GET_PATIENT_AdVANCE_BALANCE_AMOUNT, + onSuccess: (response, statusCode) async { + patientAdvanceBalanceAmountList.clear(); + response['List_PatientAdvanceBalanceAmount'].forEach((item) { + patientAdvanceBalanceAmountList + .add(PatientAdvanceBalanceAmount.fromJson(item)); + }); + totalAdvanceBalanceAmount = response['TotalAdvanceBalanceAmount']; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map()); + } + + getPatientInfoByPatientID({required String id}) async { + hasError = false; + super.error = ""; + Map body = Map(); + body['SearchPatientID'] = int.parse(id); + body['isDentalAllowedBackend'] = false; + await baseAppClient.post(GET_PATIENT_INFO_BY_ID, + onSuccess: (response, statusCode) async { + patientInfoList.clear(); + response['GetPatientInfoByPatientIDList'].forEach((item) { + patientInfoList.add(PatientInfo.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + getPatientInfoByPatientIDAndMobileNumber(AdvanceModel advanceModel) async { + hasError = false; + super.error = ""; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + body['MobileNo'] = advanceModel.mobileNumber; + body['ProjectID'] = advanceModel.hospitalsModel!.iD; + body['PatientID'] = advanceModel.fileNumber; + + await baseAppClient.post(GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER, + onSuccess: (response, statusCode) async { + response['List_PatientInfo'].forEach((item) { + patientInfoAndMobileNumber = PatientInfoAndMobileNumber.fromJson(item); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + super.error = error; + }, body: body); + } + + sendActivationCodeForAdvancePayment({required int patientID, required int projectID}) async { + hasError = false; + super.error = ""; + Map body = Map(); + body['PatientID'] = patientID; + body['ProjectID'] = projectID; + body['isDentalAllowedBackend'] = false; + + await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT, + onSuccess: (response, statusCode) async { + logInTokenID = response['LogInTokenID']; + verificationCode = response['VerificationCode']; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + super.error = error; + }, body: body); + } + + checkActivationCodeForAdvancePayment({required String activationCode}) async { + hasError = false; + super.error = ""; + Map body = Map(); + body['activationCode'] = activationCode; + body['PatientMobileNumber'] = 'XXXXXXXXXX'; + body['isDentalAllowedBackend'] = false; + body['LogInTokenID'] = logInTokenID; + + await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT, + onSuccess: (response, statusCode) async {}, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + super.error = error; + }, body: body); + } + + getSharedRecordByStatus() async { + try { + var request = GetAllSharedRecordsByStatusReq(); + request.status = 0; + await baseAppClient.post(GET_SHARED_RECORD_BY_STATUS, + onSuccess: (dynamic response, int statusCode) { + sharedPref.setObject(FAMILY_FILE, response); + getAllSharedRecordsByStatusResponse = + GetAllSharedRecordsByStatusResponse.fromJson(response); + }, onFailure: (String error, int statusCode) { + AppToast.showErrorToast(message: error); + hasError = true; + super.error = error; + }, body: request.toJson()); + } catch (error) { + print(error); + hasError = true; + super.error = error.toString(); + } + } + + getFamilyFiles() async { + if (await sharedPref.getObject(FAMILY_FILE) != null) { + getAllSharedRecordsByStatusResponse = + GetAllSharedRecordsByStatusResponse.fromJson( + await sharedPref.getObject(FAMILY_FILE)); + return getAllSharedRecordsByStatusResponse; + } else { + return await getSharedRecordByStatus(); + } + } + + Future updateBloodGroup(List_BloodGroupDetailsModel detailsModel) async { + hasError = false; + await getUser(); + var languageID = + await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + Map body = Map(); + body['City'] = detailsModel.city; + body['cityCode'] = detailsModel.cityCode; + body['Gender'] = detailsModel.gender; + body['BloodGroup'] = detailsModel.bloodGroup; + body['CellNumber'] = user.mobileNumber; + body['LanguageID'] = languageID; + body['NationalID'] = user.nationalityID; + body['ZipCode'] = user.zipCode ?? "+966"; + body['isDentalAllowedBackend'] = false; + + await baseAppClient.post(BLOOD_DONATION_REGISTER_BLOOD_TYPE, + onSuccess: (dynamic response, int statusCode) { + updatedRegisterBloodMessage = response['ErrorEndUserMessage']; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + if(error == null){ + super.error = "Something went wrong"; + } + }, body: body); + } + + Future addUserAgreementForBloodDonation() async { + hasError = false; + var languageID = + await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + Map body = Map(); + body['IsAgreed'] = true; + body['LanguageID'] = languageID; + body['isDentalAllowedBackend'] = false; + + await baseAppClient.post(ADD_USER_AGREEMENT_FOR_BLOOD_DONATION, + onSuccess: (dynamic response, int statusCode) { + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/medical/my_doctor_service.dart b/lib/core/service/medical/my_doctor_service.dart new file mode 100644 index 00000000..2f08f07c --- /dev/null +++ b/lib/core/service/medical/my_doctor_service.dart @@ -0,0 +1,81 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/doctor/doctor_profile.dart'; +import 'package:diplomaticquarterapp/core/model/doctor/doctor_rating.dart'; +import 'package:diplomaticquarterapp/core/model/doctor/reques_patient_doctor_appointmentt.dart'; +import 'package:diplomaticquarterapp/core/model/doctor/request_doctor_profile.dart'; +import 'package:diplomaticquarterapp/core/model/doctor/request_doctor_rating.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; + +class MyDoctorService extends BaseService { + List patientDoctorAppointmentList =[]; + DoctorProfile? doctorProfile; + DoctorList? doctorList; + DoctorRating doctorRating = DoctorRating(); + + RequestPatientDoctorAppointment patientDoctorAppointmentRequest = + RequestPatientDoctorAppointment( + isDentalAllowedBackend: false, + ); + + RequestDoctorRating _requestDoctorRating = RequestDoctorRating( + channel: 3, + deviceTypeID: 2, + doctorID: 2477, + isDentalAllowedBackend: false); + + Future getPatientDoctorAppointmentList({int top = 0, int beforeDays = 0,int exludType=4}) async { + hasError = false; + patientDoctorAppointmentRequest.top = top; + patientDoctorAppointmentRequest.beforeDays = beforeDays; + patientDoctorAppointmentRequest.exludType = exludType; + + await baseAppClient.post(GET_MY_DOCTOR, + onSuccess: (dynamic response, int statusCode) { + patientDoctorAppointmentList.clear(); + response['PatientDoctorAppointmentResultList'].forEach((hospital) { + patientDoctorAppointmentList + .add(DoctorList.fromJson(hospital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: patientDoctorAppointmentRequest.toJson()); + } + + RequestDoctorProfile _requestDoctorProfile = RequestDoctorProfile( + license: true, + isRegistered: true, + ); + + Future getDoctorProfileAndRating( + {required int doctorId, required int clinicID, required int projectID}) async { + ///GET DOCTOR PROFILE + _requestDoctorProfile.doctorID = doctorId; + _requestDoctorProfile.clinicID = clinicID; + _requestDoctorProfile.projectID = projectID; + hasError = false; + await baseAppClient.post(GET_DOCTOR_PROFILE, + onSuccess: (dynamic response, int statusCode) { + doctorProfile = DoctorProfile.fromJson(response['DoctorProfileList'][0]); + doctorList = DoctorList.fromJson(response['DoctorProfileList'][0]); + doctorList!.clinicName = doctorProfile!.clinicDescription!; + doctorList!.doctorTitle = doctorProfile!.doctorTitleForProfile!; + doctorList!.name = doctorProfile!.doctorName!; + doctorList!.projectName = doctorProfile!.projectName!; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _requestDoctorProfile.toJson()); + + ///GET DOCTOR RATING + _requestDoctorRating.doctorID = doctorId; + await baseAppClient.post(GET_DOCTOR_RATING, + onSuccess: (dynamic response, int statusCode) { + doctorRating = DoctorRating.fromJson(response['AvgDoctorRatingList'][0]); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _requestDoctorRating.toJson()); + } +} diff --git a/lib/core/service/medical/prescriptions_service.dart b/lib/core/service/medical/prescriptions_service.dart new file mode 100644 index 00000000..8becfb7e --- /dev/null +++ b/lib/core/service/medical/prescriptions_service.dart @@ -0,0 +1,262 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.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_info_rc_model.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/request_get_list_pharmacy_for_prescriptions.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescription_report.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/request_prescription_report_enh.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/request_send_prescription_email.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:flutter/cupertino.dart'; + +class PrescriptionsService extends BaseService { + List prescriptionsList = []; + List prescriptionReportListINP = []; + List prescriptionsOrderList = []; + List prescriptionsOrderListRC = []; + var isMedDeliveryAllowed; + + String prescriptionReportPDF = ""; + + Future getPrescriptions() async { + hasError = false; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + await baseAppClient.post(PRESCRIPTIONS, onSuccess: (dynamic response, int statusCode) { + prescriptionsList.clear(); + response['PatientPrescriptionList'].forEach((prescriptions) { + prescriptionsList.add(Prescriptions.fromJson(prescriptions)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getPrescriptionsOrders() async { + prescriptionsOrderList.clear(); + Map body = Map(); + // body['isDentalAllowedBackend'] = false; + await baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, onSuccess: (dynamic response, int statusCode) { + response['PatientER_GetPatientAllPresOrdersList'].forEach((prescriptionsOrder) { + // prescriptionsOrderList.add(PrescriptionsOrder.fromJson(prescriptionsOrder)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getPrescriptionsInfoRC(int orderID, dynamic patientID) async { + prescriptionsOrderListRC.clear(); + Map body = Map(); + body['ID'] = orderID; + await baseAppClient.post(GET_ALL_PRESCRIPTION_INFO_RC + "?PatientId=" + patientID.toString(), isRCService: true, onSuccess: (dynamic response, int statusCode) { + response['response']['report'].forEach((prescriptionsOrder) { + prescriptionsOrderListRC.add(PrescriptionInfoRCModel.fromJson(prescriptionsOrder)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getPrescriptionsOrdersRC() async { + prescriptionsOrderList.clear(); + Map body = Map(); + // body['isDentalAllowedBackend'] = false; + await baseAppClient.post(GET_ALL_PRESCRIPTION_ORDERS_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) { + response['response'].forEach((prescriptionsOrder) { + prescriptionsOrderList.add(GetCMCAllOrdersResponseModel.fromJson(prescriptionsOrder)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + RequestPrescriptionReport _requestPrescriptionReport = RequestPrescriptionReport(appointmentNo: 0, isDentalAllowedBackend: false); + List prescriptionReportList = []; + + Future getPrescriptionReport({required Prescriptions prescriptions}) async { + hasError = false; + 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, onSuccess: (dynamic response, int statusCode) { + prescriptionReportList.clear(); + prescriptionReportEnhList.clear(); + prescriptionReportListINP.clear(); + isMedDeliveryAllowed = response['IsHomeMedicineDeliverySupported']; + if (prescriptions.isInOutPatient!) { + response['ListPRM'].forEach((prescriptions) { + prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions)); + prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions)); + }); + } else { + prescriptionReportListINP.clear(); + response['INP_GetPrescriptionReport_List'].forEach((prescriptions) { + prescriptionReportListINP.add(PrescriptionReportINP.fromJson(prescriptions)); + }); + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _requestPrescriptionReport.toJson()); + } + + RequestSendPrescriptionEmail _requestSendPrescriptionEmail = RequestSendPrescriptionEmail( + isDentalAllowedBackend: false, + ); + + Future sendPrescriptionEmail(String appointmentDate, int patientID, String clinicName, String doctorName, int doctorID, int projectID, bool isInOutPatient, bool isDownload) async { + _requestSendPrescriptionEmail.listPrescriptions = prescriptionReportList; + _requestSendPrescriptionEmail.listPrescriptionsINP = prescriptionReportListINP; + _requestSendPrescriptionEmail.appointmentDate = appointmentDate; + _requestSendPrescriptionEmail.patientID = patientID; + _requestSendPrescriptionEmail.clinicName = clinicName; + _requestSendPrescriptionEmail.doctorName = doctorName; + _requestSendPrescriptionEmail.projectID = projectID; + _requestSendPrescriptionEmail.to = user.emailAddress; + _requestSendPrescriptionEmail.dateofBirth = user.dateofBirth; + _requestSendPrescriptionEmail.patientIditificationNum = user.patientIdentificationNo; + _requestSendPrescriptionEmail.patientMobileNumber = user.mobileNumber; + _requestSendPrescriptionEmail.doctorID = doctorID; + _requestSendPrescriptionEmail.patientName = user.firstName! + " " + user.lastName!; + _requestSendPrescriptionEmail.setupID = user.setupID; + _requestSendPrescriptionEmail.to = user.emailAddress; + _requestSendPrescriptionEmail.isDownload = isDownload; + hasError = false; + await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) { + if (isDownload) { + prescriptionReportPDF = response["Base64Data"]; + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _requestSendPrescriptionEmail.toJson()); + } + + RequestGetListPharmacyForPrescriptions requestGetListPharmacyForPrescriptions = RequestGetListPharmacyForPrescriptions( + latitude: 0, + longitude: 0, + isDentalAllowedBackend: false, + ); + List pharmacyPrescriptionsList = []; + + Future getListPharmacyForPrescriptions({required int itemId}) async { + hasError = false; + requestGetListPharmacyForPrescriptions.itemID = itemId; + + requestGetListPharmacyForPrescriptions.latitude = await sharedPref.getDouble(USER_LAT); + requestGetListPharmacyForPrescriptions.longitude = await sharedPref.getDouble(USER_LONG); + + // requestGetListPharmacyForPrescriptions.latitude = 24.709863; + // requestGetListPharmacyForPrescriptions.longitude = 46.668348; + + pharmacyPrescriptionsList.clear(); + await baseAppClient.post(GET_PHARMACY_LIST, onSuccess: (dynamic response, int statusCode) { + pharmacyPrescriptionsList.clear(); + response['PharmList'].forEach((prescriptions) { + pharmacyPrescriptionsList.add(PharmacyPrescriptions.fromJson(prescriptions)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: requestGetListPharmacyForPrescriptions.toJson()); + } + + RequestPrescriptionReportEnh _requestPrescriptionReportEnh = RequestPrescriptionReportEnh( + isDentalAllowedBackend: false, + ); + + List prescriptionReportEnhList = []; + + Future getPrescriptionReportEnh({required PrescriptionsOrder prescriptionsOrder}) async { + 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; + _requestPrescriptionReportEnh.episodeID = element.episodeID; + _requestPrescriptionReportEnh.setupID = element.setupID; + _requestPrescriptionReportEnh.dischargeNo = element.dischargeNo; + isInPatient = element.isInOutPatient!; + } + } else { + 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!; + } + } + }); + + hasError = false; + + await baseAppClient.post(isInPatient ? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT, onSuccess: (dynamic response, int statusCode) { + prescriptionReportEnhList.clear(); + + if (isInPatient) { + response['ListPRM'].forEach((prescriptions) { + prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions)); + }); + } else { + response['INP_GetPrescriptionReport_List'].forEach((prescriptions) { + 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 updatePressOrderRC({required int presOrderID}) async { + hasError = false; + Map body = Map(); + body['Id'] = presOrderID; + body['StatusId'] = 6; + body['ClickButton'] = 14; + await baseAppClient.post(UPDATE_PRESCRIPTION_ORDER_RC, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future updatePressOrder({required int presOrderID}) async { + hasError = false; + Map body = Map(); + body['PresOrderID'] = presOrderID; + body['EditedBy'] = user.patientID; + body['RejectionReason'] = ''; + 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); + } +} diff --git a/lib/core/service/medical/radiology_service.dart b/lib/core/service/medical/radiology_service.dart new file mode 100644 index 00000000..05016b17 --- /dev/null +++ b/lib/core/service/medical/radiology_service.dart @@ -0,0 +1,98 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; +import 'package:diplomaticquarterapp/core/model/radiology/request_send_rad_report_email.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; + +class RadiologyService extends BaseService { + List finalRadiologyList = []; + String url = ''; + + bool isRadiologyVIDAPlus = false; + + String radReportPDF = ""; + + Future getRadImageURL({int? invoiceNo, String? invoiceType, int? lineItem, int? projectId, bool? isVidaPlus}) async { + hasError = false; + final Map body = new Map(); + body['InvoiceNo'] = isVidaPlus! ? "0" : invoiceNo; + body['InvoiceNo_VP'] = isVidaPlus ? invoiceNo : "0"; + body['LineItemNo'] = lineItem; + body['ProjectID'] = projectId; + body['InvoiceType'] = invoiceType; + + await baseAppClient.post(GET_RAD_IMAGE_URL, isAllowAny: true, onSuccess: (dynamic response, int statusCode) { + url = response['Data']; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getPatientRadOrders() async { + hasError = false; + await baseAppClient.post(GET_PATIENT_ORDERS, onSuccess: (dynamic response, int statusCode) { + finalRadiologyList.clear(); + // response['FinalRadiologyList'].forEach((radiology) { + if (response['FinalRadiologyList'] != null && response['FinalRadiologyList'].length != 0) { + isRadiologyVIDAPlus = false; + response['FinalRadiologyList'].forEach((radiology) { + finalRadiologyList.add(FinalRadiology.fromJson(radiology)); + }); + } else { + isRadiologyVIDAPlus = true; + response['FinalRadiologyListAPI'].forEach((radiology) { + finalRadiologyList.add(FinalRadiology.fromJson(radiology)); + }); + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map()); + } + + Future getPatientRadOrdersDetails() async { + hasError = false; + await baseAppClient.post(GET_PATIENT_ORDERS, onSuccess: (dynamic response, int statusCode) { + finalRadiologyList.clear(); + response['FinalRadiologyList'].forEach((radiology) { + finalRadiologyList.add(FinalRadiology.fromJson(radiology)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map()); + } + + RequestSendRadReportEmail _requestSendRadReportEmail = RequestSendRadReportEmail(); + + Future sendRadReportEmail({FinalRadiology? finalRadiology, AuthenticatedUser? userObj, required bool isDownload}) async { + _requestSendRadReportEmail.projectID = finalRadiology!.projectID; + _requestSendRadReportEmail.clinicName = finalRadiology.clinicDescription; + _requestSendRadReportEmail.invoiceNo = finalRadiology.invoiceNo; + _requestSendRadReportEmail.invoiceNo_VP = finalRadiology.invoiceNo_VP; + _requestSendRadReportEmail.invoiceLineItemNo = finalRadiology.invoiceLineItemNo; + _requestSendRadReportEmail.setupID = finalRadiology.setupID; + _requestSendRadReportEmail.doctorName = finalRadiology.doctorName; + _requestSendRadReportEmail.orderDate = '${finalRadiology.orderDate!.year}-${finalRadiology.orderDate!.month}-${finalRadiology.orderDate!.day}'; + _requestSendRadReportEmail.patientIditificationNum = userObj!.patientIdentificationNo; + _requestSendRadReportEmail.patientMobileNumber = userObj.mobileNumber; + _requestSendRadReportEmail.patientName = userObj.firstName! + " " + userObj.lastName!; + _requestSendRadReportEmail.projectName = finalRadiology.projectName; + _requestSendRadReportEmail.radResult = finalRadiology.reportData; + _requestSendRadReportEmail.to = userObj.emailAddress; + _requestSendRadReportEmail.dateofBirth = userObj.dateofBirth; + _requestSendRadReportEmail.invoiceType = finalRadiology.invoiceType; + _requestSendRadReportEmail.isDownload = isDownload; + + hasError = false; + await baseAppClient.post(SEND_RAD_REPORT_EMAIL, isAllowAny: true, onSuccess: (dynamic response, int statusCode) { + if(isDownload) { + radReportPDF = response["Base64Data"]; + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _requestSendRadReportEmail.toJson()); + } +} diff --git a/lib/core/service/medical/reports_monthly_service.dart b/lib/core/service/medical/reports_monthly_service.dart new file mode 100644 index 00000000..280a2246 --- /dev/null +++ b/lib/core/service/medical/reports_monthly_service.dart @@ -0,0 +1,72 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/reports/Reports.dart'; +import 'package:diplomaticquarterapp/core/model/reports/request_reports.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; + +class ReportsMonthlyService extends BaseService { + List reportsList =[]; + List appointHistoryList =[]; + + RequestReports _requestReports = RequestReports( + isReport: true, + encounterType: 1, + requestType: 1, + isDentalAllowedBackend: false, + ); + + Future getReports() async { + hasError = false; + await baseAppClient.post(REPORTS, + onSuccess: (dynamic response, int statusCode) { + reportsList.clear(); + response['GetPatientMedicalStatus'].forEach((reports) { + reportsList.add(Reports.fromJson(reports)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _requestReports.toJson()); + } + + Future getPatentAppointmentHistory() async { + hasError = false; + Map body = new Map(); + body['IsForMedicalReport'] = true; + await baseAppClient.post(GET_PATIENT_AppointmentHistory, + onSuccess: (dynamic response, int statusCode) { + appointHistoryList = []; + response['AppoimentAllHistoryResultList'].forEach((appoint) { + appointHistoryList.add(AppointmentHistory.fromJson(appoint)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future insertRequestForMedicalReport( + AppointmentHistory appointmentHistory) async { + Map body = new Map(); + body['ClinicID'] = appointmentHistory.clinicID; + body['DoctorID'] = appointmentHistory.doctorID; + body['SetupID'] = appointmentHistory.setupID; + body['EncounterNo'] = appointmentHistory.appointmentNo; + body['EncounterType'] = 1;// appointmentHistory.appointmentType; + body['IsActive'] = appointmentHistory.isActiveDoctor; + body['ProjectID'] = appointmentHistory.projectID; + body['Remarks'] = ""; + body['ProcedureId'] = ""; + body['RequestType'] = 1; + body['Source'] = 2; + body['Status'] = 1; + body['CreatedBy'] = 102; + hasError = false; + await baseAppClient.post(INSERT_REQUEST_FOR_MEDICAL_REPORT, + onSuccess: (dynamic response, int statusCode) {}, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/medical/reports_service.dart b/lib/core/service/medical/reports_service.dart new file mode 100644 index 00000000..bd0b2027 --- /dev/null +++ b/lib/core/service/medical/reports_service.dart @@ -0,0 +1,212 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/reports/Reports.dart'; +import 'package:diplomaticquarterapp/core/model/reports/admission_for_medical_report.dart'; +import 'package:diplomaticquarterapp/core/model/reports/request_reports.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; + +class ReportsService extends BaseService { + List reportsList = []; + List inpatientReportsList =[]; + List appointHistoryList =[]; + + List admissionsMedicalReport = []; + + String userAgreementContent = ""; + RequestReports _requestReports = RequestReports(isReport: true, encounterType: 1, requestType: 1, projectID: 0); + + Future getReports() async { + hasError = false; + await baseAppClient.post(REPORTS, onSuccess: (dynamic response, int statusCode) { + reportsList.clear(); + response['GetPatientMedicalStatus'].forEach((reports) { + reportsList.add(Reports.fromJson(reports)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _requestReports.toJson()); + } + + Future getInPatientReports() async { + RequestReports _requestReportsInpatient = RequestReports(isReport: true, encounterType: 2, requestType: 1, patientOutSA: 0, projectID: 0); + hasError = false; + await baseAppClient.post(REPORTS, onSuccess: (dynamic response, int statusCode) { + inpatientReportsList.clear(); + response['GetPatientMedicalStatus'].forEach((reports) { + inpatientReportsList.add(Reports.fromJson(reports)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: _requestReportsInpatient.toJson()); + } + + Future getInpatientAdmissionsList(int languageID) async { + Map body = new Map(); + body['IsForMedicalReport'] = true; + body['LanguageID'] = languageID; + hasError = false; + await baseAppClient.post(GET_INPATIENT_ADMISSIONS, onSuccess: (dynamic response, int statusCode) { + admissionsMedicalReport.clear(); + print(response['AdmissionsForMedicalReport']); + response['AdmissionsForMedicalReport'].forEach((reports) { + admissionsMedicalReport.add(AdmissionMedicalReport.fromJson(reports)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getPatentAppointmentHistory() async { + hasError = false; + Map body = new Map(); + body['IsForMedicalReport'] = true; + await baseAppClient.post(GET_PATIENT_AppointmentHistory, onSuccess: (dynamic response, int statusCode) { + appointHistoryList = []; + response['AppoimentAllHistoryResultList'].forEach((appoint) { + appointHistoryList.add(AppointmentHistory.fromJson(appoint)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getUserTermsAndConditions() async { + hasError = false; + await baseAppClient.post(GET_USER_TERMS, onSuccess: (dynamic response, int statusCode) { + userAgreementContent = response['UserAgreementContent']; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map()); + } + + Future updatePatientHealthSummaryReport({required bool isSummary}) async { + Map body = Map(); + body['RSummaryReport'] = isSummary; + hasError = false; + await baseAppClient.post(UPDATE_HEALTH_TERMS, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future updateEmail({required String email}) async { + Map body = Map(); + body['EmailAddress'] = email; + body['isDentalAllowedBackend'] = false; + hasError = false; + await baseAppClient.post(UPDATE_PATENT_EMAIL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future insertRequestForMedicalReport(AppointmentHistory appointmentHistory) async { + Map body = new Map(); + body['ClinicID'] = appointmentHistory.clinicID; + body['DoctorID'] = appointmentHistory.doctorID; + body['SetupID'] = appointmentHistory.setupID; + body['EncounterNo'] = appointmentHistory.appointmentNo; + body['EncounterType'] = 1; // appointmentHistory.appointmentType; + body['IsActive'] = appointmentHistory.isActiveDoctor; + body['ProjectID'] = appointmentHistory.projectID; + body['Remarks'] = ""; + body['ProcedureId'] = ""; + body['RequestType'] = 1; + body['Source'] = 2; + body['Status'] = 1; + body['CreatedBy'] = 102; + hasError = false; + await baseAppClient.post(INSERT_REQUEST_FOR_MEDICAL_REPORT, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future insertRequestForInPatientMedicalReport(int clinicID, int doctorID, String setupID, int admissionNo, int projectID) async { + Map body = new Map(); + body['ClinicID'] = clinicID; + body['DoctorID'] = doctorID; + body['SetupID'] = setupID; + body['EncounterNo'] = admissionNo; + body['EncounterType'] = 2; // appointmentHistory.appointmentType; + body['IsActive'] = true; + body['ProjectID'] = projectID; + body['Remarks'] = ""; + body['ProcedureId'] = ""; + body['RequestType'] = 1; + body['Source'] = 2; + body['Status'] = 1; + body['CreatedBy'] = 102; + hasError = false; + await baseAppClient.post(INSERT_REQUEST_FOR_MEDICAL_REPORT, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future sendEmailForMedicalReport(String projectName, String clinicName, String doctorName, String requestDate, String invoiceNo, int projectID, String stamp, String setupID) async { + Map body = new Map(); + body['SetupID'] = setupID; + body['PrintDate'] = requestDate; + body['ProcedureID'] = "05005009"; + body['Reporttype'] = "MEDICAL REPORT"; + body['stamp'] = stamp; + body['To'] = user.emailAddress; + body['DateofBirth'] = user.dateofBirth; + body['PatientIditificationNum'] = user.patientIdentificationNo; + body['PatientMobileNumber'] = user.mobileNumber; + body['PatientName'] = user.firstName! + " " + user.lastName!; + body['ProjectName'] = projectName; + body['ClinicName'] = clinicName; + body['ProjectID'] = projectID; + body['InvoiceNo'] = invoiceNo; + body['PrintedByName'] = user.firstName! + " " + user.lastName!; + + dynamic response; + + hasError = false; + await baseAppClient.post(SEND_MEDICAL_REPORT_EMAIL, onSuccess: (dynamic res, int statusCode) { + response = res; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return response; + } + + Future getMedicalReportPDF(String projectName, String clinicName, String doctorName, String requestDate, String invoiceNo, int projectID, String stamp, String setupID) async { + Map body = new Map(); + body['SetupID'] = setupID; + body['PrintDate'] = requestDate; + body['ProcedureID'] = "05005009"; + body['Reporttype'] = "MEDICAL REPORT"; + body['stamp'] = stamp; + body['To'] = user.emailAddress; + body['DateofBirth'] = user.dateofBirth; + body['PatientIditificationNum'] = user.patientIdentificationNo; + body['PatientMobileNumber'] = user.mobileNumber; + body['PatientName'] = user.firstName! + " " + user.lastName!; + body['ProjectName'] = projectName; + body['ClinicName'] = clinicName; + body['ProjectID'] = projectID; + body['InvoiceNo'] = invoiceNo; + body['InvoiceNo_VP'] = invoiceNo; + body['PrintedByName'] = user.firstName! + " " + user.lastName!; + + dynamic response; + + hasError = false; + await baseAppClient.post(GET_MEDICAL_REPORT_PDF, onSuccess: (dynamic res, int statusCode) { + response = res; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + return response; + } +} diff --git a/lib/core/service/medical/vital_sign_service.dart b/lib/core/service/medical/vital_sign_service.dart new file mode 100644 index 00000000..054843de --- /dev/null +++ b/lib/core/service/medical/vital_sign_service.dart @@ -0,0 +1,44 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart'; + +import '../base_service.dart'; + +class VitalSignService extends BaseService { + List vitalSignResModelList =[]; + + String weightKg = ""; + String heightCm = ""; + String bloadType = ""; + + Future getPatientRadOrders({ int? appointmentNo, int? projectID}) async { + hasError = false; + Map body = Map(); + if (appointmentNo != null && projectID != null) { + body['TransNo'] = appointmentNo; + body['ProjectID'] = projectID; + } + + await baseAppClient.post(GET_PATIENT_VITAL_SIGN, + onSuccess: (dynamic response, int statusCode) { + vitalSignResModelList.clear(); + response['List_DoctorPatientVitalSign'].forEach((vital) { + vitalSignResModelList.add(VitalSignResModel.fromJson(vital)); + }); + bool isHaveWeight = false; + bool isHaveHeight = false; + vitalSignResModelList.forEach((element) { + if (element.weightKg != 0 && !isHaveWeight) { + weightKg = '${element.weightKg}'; + isHaveWeight = true; + } + if (element.heightCm != 0 && !isHaveHeight) { + heightCm = '${element.heightCm}'; + isHaveHeight = true; + } + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/notifications_service.dart b/lib/core/service/notifications_service.dart new file mode 100644 index 00000000..ad6cbce1 --- /dev/null +++ b/lib/core/service/notifications_service.dart @@ -0,0 +1,40 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/notifications/mark_message_as_read_request_model.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class NotificationService extends BaseService { + List notificationsList =[]; + + Future getAllNotifications(GetNotificationsRequestModel getNotificationsRequestModel ) async { + hasError = false; + await baseAppClient.post(PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS, + onSuccess: (dynamic response, int statusCode) { + if(getNotificationsRequestModel.currentPage ==0) + notificationsList.clear(); + response['List_GetAllNotificationsFromPool'].forEach((appoint) { + notificationsList.add(GetNotificationsResponseModel.fromJson(appoint)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: getNotificationsRequestModel.toJson()); + } + Future markAsRead(MarkMessageAsReadRequestModel markMessageAsReadRequestModel ) async { + hasError = false; + await baseAppClient.post(PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ, + onSuccess: (dynamic response, int statusCode) { + updateNotification(markMessageAsReadRequestModel.notificationPoolID); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: markMessageAsReadRequestModel.toJson()); + } + + updateNotification(id) { + int index = notificationsList.indexWhere((element) => element.id == id); + notificationsList[index].isRead = true; + + } +} diff --git a/lib/core/service/offers_service.dart b/lib/core/service/offers_service.dart new file mode 100644 index 00000000..19b68707 --- /dev/null +++ b/lib/core/service/offers_service.dart @@ -0,0 +1,56 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/offer_products_model.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/offers_model.dart'; + +import 'base_service.dart'; + +class OffersCategoriseService extends BaseService { + List _offersList =[]; + List get offersList => _offersList; + List _offerProducts =[]; + List get offersProducts => _offerProducts; + + clearCategorise() { + _offerProducts.clear(); + } + + // clearCategorise2() { + // _offersList.clear(); + // } + + Future getOffersCategorise() async { + hasError = false; + _offersList.clear(); + await baseAppClient.getPharmacy( + GET_OFFERS_CATEGORISE, + onSuccess: (dynamic response, int statusCode) { + response['categories'].forEach((item) { + _offersList.add(OffersModel.fromJson(item)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } + + Future getOffersProducts({required String id}) async { + hasError = false; + _offerProducts.clear(); + String endPoint = + id != null ? GET_OFFERS_PRODUCTS + "$id" : GET_OFFERS_PRODUCTS + "1"; + await baseAppClient.getPharmacy( + endPoint, + onSuccess: (dynamic response, int statusCode) { + response['products'].forEach((item) { + _offerProducts.add(OfferProductsModel.fromJson(item)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } +} diff --git a/lib/core/service/packages_offers/PackagesOffersServices.dart b/lib/core/service/packages_offers/PackagesOffersServices.dart new file mode 100644 index 00000000..5ee27ad1 --- /dev/null +++ b/lib/core/service/packages_offers/PackagesOffersServices.dart @@ -0,0 +1,447 @@ +import 'dart:convert'; +import 'dart:developer'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/ResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/requests/AddProductToCartRequestModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/requests/CreateCustomerRequestModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersProductsRequestModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCartItemsResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCustomerResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/offers_stores_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/order_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/tamara_payment_option.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:flutter/cupertino.dart'; + +Map packagesAuthHeader = {}; + +class OffersAndPackagesServices extends BaseService { + AuthenticatedUser? patientUser; + List categoryList = []; + List projectsList = []; + List productList = []; + List latestOffersList = []; + List tamaraPaymentOptions = []; + List bestSellerList = []; + List bannersList = []; + List ordersHistory = []; + List cartItemList = []; + List _hospitals = []; + + List get hospitals => _hospitals; + String cartItemCount = ""; + + PackagesCustomerResponseModel? customer; + + Future> getAllCategories(OffersCategoriesRequestModel request) async { + if (categoryList.isNotEmpty) return categoryList; + + var url = EXA_CART_API_BASE_URL + PACKAGES_CATEGORIES; + await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { + if (statusCode == 200) { + var jsonResponse = json.decode(stringResponse); + jsonResponse['categories'].forEach((json) { + categoryList.add(PackagesCategoriesResponseModel().fromJson(json)); + }); + } + }, onFailure: (String error, int statusCode) {}, queryParams: request.toFlatMap()); + + return categoryList; + } + + Future> getAllStores() async { + if (projectsList.isNotEmpty) return projectsList; + + var url = EXA_CART_API_BASE_URL + PACKAGES_STORES; + await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { + if (statusCode == 200) { + var jsonResponse = json.decode(stringResponse); + final response = OfferProjectsResponseModel.fromJson(jsonResponse); + projectsList = response.project!; + } + }, onFailure: (String error, int statusCode) { + throw error; + }, queryParams: {'fields': 'id,name'}); + + return projectsList; + } + + Future> getAllProducts({required OffersProductsRequestModel request, BuildContext? context, bool showLoading = true, bool byOffset = true}) async { + Future errorThrow; + productList = []; + var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS; + await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { + if (statusCode == 200) { + var jsonResponse = json.decode(stringResponse); + jsonResponse['products'].forEach((json) { + productList.add(PackagesResponseModel().fromJson(json)); + }); + } + }, onFailure: (String error, int statusCode) {}, queryParams: request.toFlatMap()); + + return productList; + } + + Future> getTamaraOptions({required BuildContext context, bool showLoading = true}) async { + if (tamaraPaymentOptions != null && tamaraPaymentOptions.isNotEmpty) return tamaraPaymentOptions; + + tamaraPaymentOptions.clear(); + var url = EXA_CART_API_BASE_URL + PACKAGES_TAMARA_OPT; + await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { + if (statusCode == 200) { + var jsonResponse = json.decode(stringResponse); + jsonResponse['payment_option'].forEach((json) { + tamaraPaymentOptions.add(TamaraPaymentOption.fromJson(json)); + }); + } + }, onFailure: (String error, int statusCode) { + log(error); + }); + + return tamaraPaymentOptions; + } + + Future> getLatestOffers({required OffersProductsRequestModel request, required BuildContext context, bool showLoading = true}) async { + var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS; + await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { + latestOffersList.clear(); + if (statusCode == 200) { + var jsonResponse = json.decode(stringResponse); + jsonResponse['products'].forEach((json) { + latestOffersList.add(PackagesResponseModel().fromJson(json)); + }); + } + }, onFailure: (String error, int statusCode) { + log(error); + }, queryParams: request.toFlatMap()); + + return latestOffersList; + } + + Future> getBestSellers({required OffersProductsRequestModel request, required BuildContext context, bool showLoading = true}) async { + var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS; + await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { + bestSellerList.clear(); + if (statusCode == 200) { + var jsonResponse = json.decode(stringResponse); + jsonResponse['products'].forEach((json) { + bestSellerList.add(PackagesResponseModel().fromJson(json)); + }); + } + }, onFailure: (String error, int statusCode) { + log(error); + }, queryParams: request.toFlatMap()); + + return bestSellerList; + } + + Future> getBanners({required OffersProductsRequestModel request, required BuildContext context, bool showLoading = true}) async { + var url = EXA_CART_API_BASE_URL + PACKAGES_PRODUCTS; + await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { + if (statusCode == 200) { + var jsonResponse = json.decode(stringResponse); + jsonResponse['products'].forEach((json) { + bannersList.add(PackagesResponseModel().fromJson(json)); + }); + } + }, onFailure: (String error, int statusCode) { + log(error); + }, queryParams: request.toFlatMap()); + + return bannersList; + } + + Future loadOffersPackagesDataForMainPage({required BuildContext context, bool showLoading = true, required Function completion}) async { + var finished = 0; + var totalCalls = 2; + + completedAll() { + finished++; + if (completion != null && finished == totalCalls) { + _hideLoading(context, showLoading); + completion(); + } + } + + _showLoading(context, showLoading); + + final auth_token = await baseAppClient.generatePackagesToken(); + if (auth_token == null) { + throw 'Something went wrong while authentication, Please try again letter'; + } + packagesAuthHeader["Authorization"] = 'Bearer $auth_token'; + + // Check and Create Customer + if (patientUser != null) { + customer = await getCurrentCustomer(context: context, showLoading: showLoading); + if (customer == null) { + createCustomer(PackagesCustomerRequestModel.fromUser(patientUser!), context: context); + } + } + + // Performing Parallel Request on same time + // # 1 + getBestSellers(request: OffersProductsRequestModel(), context: context, showLoading: false).then((value) { + completedAll(); + }); + + // # 2 + getLatestOffers(request: OffersProductsRequestModel(), context: context, showLoading: false).then((value) { + completedAll(); + }); + + // # 3 + // getBanners( + // request: OffersProductsRequestModel(), + // context: context, + // showLoading: false) + // .then((value) { + // completedAll(); + // }); + } + + // -------------------- + // Create Customer + // -------------------- + Future createCustomer(PackagesCustomerRequestModel request, {required BuildContext context, bool showLoading = true, Function(bool)? completion}) async { + if (customer != null) return Future.value(customer); + + customer = null; + Future? errorThrow; + + _showLoading(context, showLoading); + var url = EXA_CART_API_BASE_URL + PACKAGES_CUSTOMER; + await baseAppClient.simplePost(url, headers: packagesAuthHeader, body: request.json(), onSuccess: (dynamic stringResponse, int statusCode) { + var jsonResponse = json.decode(stringResponse); + var customerJson = jsonResponse['customers'].first; + customer = PackagesCustomerResponseModel.fromJson(customerJson); + }, onFailure: (String error, int statusCode) { + errorThrow = Future.error(error); + log(error); + }); + + _hideLoading(context, showLoading); + await Future.delayed(Duration(seconds: 1)); + + return errorThrow ?? customer; + } + + Future getCurrentCustomer({required BuildContext context, bool showLoading = true}) async { + if (customer != null) return Future.value(customer); + + _showLoading(context, showLoading); + var url = EXA_CART_API_BASE_URL + PACKAGES_CUSTOMER + "/username/${patientUser!.patientID}"; + await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { + var jsonResponse = json.decode(stringResponse); + var customerJson = jsonResponse['customers'].first; + customer = PackagesCustomerResponseModel.fromJson(customerJson); + }, onFailure: (String error, int statusCode) { + log(error); + }); + + _hideLoading(context, showLoading); + return customer!; + } + + // -------------------- + // Shopping Cart + // -------------------- + Future?> cartItems({required BuildContext context, bool showLoading = true}) async { + Future errorThrow; + + cartItemList.clear(); + _showLoading(context, showLoading); + var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART + '/${customer!.id}'; + Map jsonResponse; + await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { + _hideLoading(context, showLoading); + + jsonResponse = json.decode(stringResponse); + jsonResponse['shopping_carts'].forEach((json) { + cartItemList.add(PackagesCartItemsResponseModel.fromJson(json)); + }); + return jsonResponse; + }, onFailure: (String error, int statusCode) { + _hideLoading(context, showLoading); + log(error); + errorThrow = Future.error({"error": error, "statusCode": statusCode}); + return errorThrow; + }, queryParams: Map()); + } + + Future?> addProductToCart(AddProductToCartRequestModel request, {required BuildContext context, bool showLoading = true}) async { + Future errorThrow; + ResponseModel response; + + request.customer_id = customer!.id; + + _showLoading(context, showLoading); + var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART; + await baseAppClient.simplePost(url, headers: packagesAuthHeader, body: request.json(), onSuccess: (dynamic stringResponse, int statusCode) { + _hideLoading(context, showLoading); + + var jsonResponse = json.decode(stringResponse); + var jsonCartItem = jsonResponse["shopping_carts"][0]; + response = ResponseModel(status: true, data: PackagesCartItemsResponseModel.fromJson(jsonCartItem), error: null); + cartItemCount = (jsonResponse['count'] ?? 0).toString(); + return response; + }, onFailure: (String error, int statusCode) { + _hideLoading(context, showLoading); + errorThrow = Future.error(ResponseModel(status: true, data: null, error: error)); + return errorThrow; + }); + } + + Future updateProductToCart(int cartItemID, {UpdateProductToCartRequestModel? request, required BuildContext context, bool showLoading = true}) async { + Future errorThrow; + + _showLoading(context, showLoading); + var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART + '/$cartItemID'; + await baseAppClient.simplePut(url, headers: packagesAuthHeader, body: request!.json(), onSuccess: (dynamic stringResponse, int statusCode) { + _hideLoading(context, showLoading); + var jsonResponse = json.decode(stringResponse); + return jsonResponse; + }, onFailure: (String error, int statusCode) { + _hideLoading(context, showLoading); + log(error); + errorThrow = Future.error({"error": error, "statusCode": statusCode}); + return errorThrow; + }); + } + + Future deleteProductFromCart(int cartItemID, {required BuildContext context, bool showLoading = true}) async { + Future errorThrow; + + _showLoading(context, showLoading); + var url = EXA_CART_API_BASE_URL + PACKAGES_SHOPPING_CART + '/$cartItemID'; + await baseAppClient.simpleDelete(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { + _hideLoading(context, showLoading); + return true; + }, onFailure: (String error, int statusCode) { + _hideLoading(context, showLoading); + log(error); + errorThrow = Future.error({"error": error, "statusCode": statusCode}); + return errorThrow; + }); + } + + // -------------------- + // Place Order + // -------------------- + Future placeOrder({required Map paymentParams, required int projectID, required BuildContext context, bool showLoading = true}) async { + Future errorThrow; + + Map jsonBody = { + "customer_id": customer!.id, + "project_id": projectID, + "billing_address": {"email": patientUser!.emailAddress, "phone_number": patientUser!.mobileNumber}, + }; + jsonBody.addAll(paymentParams); + jsonBody = {'order': jsonBody}; + + print(jsonBody); + + int order_id; + _showLoading(context, showLoading); + var url = EXA_CART_API_BASE_URL + PACKAGES_ORDERS; + await baseAppClient.simplePost(url, headers: packagesAuthHeader, body: jsonBody, onSuccess: (dynamic stringResponse, int statusCode) { + _hideLoading(context, showLoading); + + var jsonResponse = json.decode(stringResponse); + order_id = jsonResponse['orders'][0]['id']; + return order_id; + }, onFailure: (String error, int statusCode) { + _hideLoading(context, showLoading); + log(error); + errorThrow = Future.error(error); + return errorThrow; + }); + } + + // -------------------- + // Order History + // -------------------- + Future?> orderHistory({required BuildContext context, bool showLoading = true}) async { + // if(ordersHistory.isNotEmpty) + // return ordersHistory; + + Future errorThrow; + // https://mdlaboratories.com/offersdiscounts/api/orders/items/0535256053?fields=id,product,utilize_by_vida,valid_until_date_utc,order_id&page=1&limit=100 + Map queryParams = {}; + queryParams['fields'] = 'id,product,utilize_by_vida,valid_until_date_utc,order_id'; + queryParams['page'] = "1"; + queryParams['limit'] = "100"; + print(queryParams); + + _showLoading(context, showLoading); + var url = EXA_CART_API_BASE_URL + PACKAGES_ORDER_HISTORY + "/${user.mobileNumber}"; + + await baseAppClient.simpleGet(url, headers: packagesAuthHeader, queryParams: queryParams, onSuccess: (dynamic stringResponse, int statusCode) { + _hideLoading(context, showLoading); + var jsonResponse = json.decode(stringResponse); + final order_items = jsonResponse["order_items"] as List; + ordersHistory = order_items.map((e) => PackagesResponseModel().fromJson(e['product'])).toList(); + print(ordersHistory); + return ordersHistory; + }, onFailure: (String error, int statusCode) { + _hideLoading(context, showLoading); + log(error); + errorThrow = Future.error(error); + return errorThrow; + }); + } + + Future?> getOrderById(int id, {required BuildContext context, bool showLoading = true}) async { + Future errorThrow; + ResponseModel response; + + _showLoading(context, showLoading); + var url = EXA_CART_API_BASE_URL + PACKAGES_ORDERS + '/$id'; + await baseAppClient.simpleGet(url, headers: packagesAuthHeader, onSuccess: (dynamic stringResponse, int statusCode) { + _hideLoading(context, showLoading); + + var jsonResponse = json.decode(stringResponse); + var jsonOrder = jsonResponse['orders'][0]; + response = ResponseModel(status: true, data: PackagesOrderResponseModel.fromJson(jsonOrder)); + return response; + }, onFailure: (String error, int statusCode) { + _hideLoading(context, showLoading); + errorThrow = Future.error(ResponseModel(status: false, error: error)); + return errorThrow; + }, queryParams: Map()); + } + + Future getHospitals({bool isResBasedOnLoc = true}) async { + Map body = Map(); + body['Latitude'] = await this.sharedPref.getDouble(USER_LAT); + body['Longitude'] = await this.sharedPref.getDouble(USER_LONG); + body['IsOnlineCheckIn'] = isResBasedOnLoc; + body['PatientOutSA'] = 0; + + await baseAppClient.post(GET_PROJECT, onSuccess: (dynamic response, int statusCode) { + _hospitals.clear(); + response['ListProject'].forEach((hospital) { + _hospitals.add(HospitalsModel.fromJson(hospital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} + +_showLoading(BuildContext context, bool flag) { + if (flag) GifLoaderDialogUtils.showMyDialog(context); +} + +_hideLoading(BuildContext context, bool flag) { + if (flag) GifLoaderDialogUtils.hideDialog(context); +} diff --git a/lib/core/service/parmacyModule/lacum-registration-service.dart b/lib/core/service/parmacyModule/lacum-registration-service.dart new file mode 100644 index 00000000..8686a9e6 --- /dev/null +++ b/lib/core/service/parmacyModule/lacum-registration-service.dart @@ -0,0 +1,50 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/ListUserAgreement.dart'; + +import 'lacum-service.dart'; + +class LacumRegistrationService extends LacumService{ + + ListUserAgreement? listUserAgreement; + + Future getLacumAccountInformationById(String patientIdentificationNo) async { + hasError = false; + super.error = ""; + + Map body = Map(); + body['IdentificationNo'] = patientIdentificationNo; + + try { + await baseAppClient.post(GET_LACUM_ACCOUNT_INFORMATION, + onSuccess: (response, statusCode) async { + lacumInformation = LacumAccountInformation.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } catch (error) { + throw error; + } + } + + Future getUserTermsAndConditionsForEPharmcy() async { + hasError = false; + super.error = ""; + + Map body = Map(); + + try { + await baseAppClient.post(LAKUM_GET_USER_TERMS_AND_CONDITIONS, + onSuccess: (response, statusCode) async { + listUserAgreement = ListUserAgreement.fromJson(response['ListUserAgreement'][0]); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } catch (error) { + throw error; + } + } + +} \ No newline at end of file diff --git a/lib/core/service/parmacyModule/lacum-service.dart b/lib/core/service/parmacyModule/lacum-service.dart new file mode 100644 index 00000000..980ed030 --- /dev/null +++ b/lib/core/service/parmacyModule/lacum-service.dart @@ -0,0 +1,133 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class LacumService extends BaseService{ + bool isFinished = true; + bool hasError = false; + String errorMsg = ''; + String successMsg = ''; + + LacumAccountInformation? lacumInformation; + LacumAccountInformation? lacumGroupInformation; + + Future getLacumAccountInformation(String identificationNo) async { + hasError = false; + super.error = ""; + + Map body = Map(); + body['IdentificationNo'] = identificationNo; + + try { + await baseAppClient.post(GET_LACUM_ACCOUNT_INFORMATION, + onSuccess: (response, statusCode) async { + lacumInformation = LacumAccountInformation.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } catch (error) { + throw error; + } + } + + Future getLacumGroupInformation(String identificationNo) async { + hasError = false; + super.error = ""; + + Map body = Map(); + body['IdentificationNo'] = identificationNo; + body['AccountNumber'] = "${lacumInformation!.yahalaAccountNo}"; + body['IsDetailsRequired'] = true; + + try { + await baseAppClient.post(GET_LACUM_GROUP_INFORMATION, + onSuccess: (response, statusCode) async { + lacumGroupInformation = LacumAccountInformation.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } catch (error) { + throw error; + } + } + + Future makeAccountActivate() async { + hasError = false; + super.error = ""; + int? yahalaAccountNo = lacumInformation?.yahalaAccountNo; + + Map body = Map(); + body['CreatedBy'] = 103; + body['YahalaAccountNumber'] = yahalaAccountNo; + + try { + await baseAppClient.post(LACUM_ACCOUNT_ACTIVATE, + onSuccess: (response, statusCode) async { + // lacumInformation = LacumAccountInformation.fromJson(response); + // lacumInformation.yahalaAccountNo = yahalaAccountNo; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } catch (error) { + throw error; + } + } + + Future makeAccountDeactivate() async { + hasError = false; + super.error = ""; + int? yahalaAccountNo = lacumInformation?.yahalaAccountNo; + + Map body = Map(); + body['CreatedBy'] = 103; + body['YahalaAccountNumber'] = yahalaAccountNo; + + try { + await baseAppClient.post(LACUM_ACCOUNT_DEACTIVATE, + onSuccess: (response, statusCode) async { + // lacumInformation = LacumAccountInformation.fromJson(response); + // lacumInformation.yahalaAccountNo = yahalaAccountNo; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } catch (error) { + throw error; + } + } + + Future createLakumAccount(String name, String phone, int accountID, String patientIdentificationID, var prefLang) async { + hasError = false; + super.error = ""; + if(prefLang == null){ + var languageID = + await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'en'); + prefLang = languageID == 'ar' ? 1 : 2; + } + + + Map body = Map(); + body['PrefLang'] = prefLang; + body['AccountID'] = accountID; + body['FullName'] = name; + body['MobileNo'] = phone; + body['PatientIdentificationID'] = patientIdentificationID; + body['PatientID'] = user.patientID; + + try { + await baseAppClient.post(CREATE_LAKUM_ACCOUNT, + onSuccess: (response, statusCode) async { + successMsg = LacumAccountInformation.fromJson(response).message!; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } catch (error) { + throw error; + } + } +} \ No newline at end of file diff --git a/lib/core/service/parmacyModule/lacum-transfer-service.dart b/lib/core/service/parmacyModule/lacum-transfer-service.dart new file mode 100644 index 00000000..c66f5efe --- /dev/null +++ b/lib/core/service/parmacyModule/lacum-transfer-service.dart @@ -0,0 +1,58 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; + +import 'lacum-service.dart'; + +class LacumTransferService extends LacumService{ + + LacumAccountInformation ?lacumReceiverInformation; + + Future getLacumGroupDataBuAccountId(String accountId) async { + hasError = false; + super.error = ""; + + Map body = Map(); + body['IdentificationNo'] = user.patientIdentificationNo; + body['AccountNumber'] = accountId; + + try { + await baseAppClient.post(GET_LACUM_GROUP_INFORMATION, + onSuccess: (response, statusCode) async { + lacumReceiverInformation = LacumAccountInformation.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + return null; + }, body: body); + } catch (error) { + throw error; + } + } + + Future transferYaHalaLoyaltyPoints(String points) async { + hasError = false; + super.error = ""; + + Map body = Map(); + body['MobileNo'] = lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber; + body['UserName'] = lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName; + body['YaHalaSenderAccNumber'] = lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountNumber; + body['Yahala_IdentificationNo'] = lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberUniversalId; + body['YaHalaPointsToTransfer'] = points; + body['YaHalaReceiverAccNumber'] = lacumReceiverInformation!.lakumInquiryInformationObjVersion!.accountNumber; + body['YaHalaReceiverMobileNumber'] = lacumReceiverInformation!.lakumInquiryInformationObjVersion!.mobileNumber; + body['YaHalaReceiverName'] = lacumReceiverInformation!.lakumInquiryInformationObjVersion!.memberName; + + try { + await baseAppClient.post(TRANSFER_YAHALA_LOYALITY_POINTS, + onSuccess: (response, statusCode) async { + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } catch (error) { + throw error; + } + } + +} \ No newline at end of file diff --git a/lib/core/service/parmacyModule/order-preview-service.dart b/lib/core/service/parmacyModule/order-preview-service.dart new file mode 100644 index 00000000..f205e61b --- /dev/null +++ b/lib/core/service/parmacyModule/order-preview-service.dart @@ -0,0 +1,279 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCart.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/payment-checkout-data.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; + +class OrderPreviewService extends BaseService { + bool isFinished = true; + bool hasError = false; + String errorMsg = ''; + + List addresses = []; + LacumAccountInformation? lacumInformation; + LacumAccountInformation? lacumGroupInformation; + List orderList = []; + + Future getAddresses() async { + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + var customerGUID = await sharedPref.getString(PHARMACY_CUSTOMER_GUID); + Map queryParams = {'fields': 'addresses'}; + hasError = false; + try { + await baseAppClient.getPharmacy("$GET_CUSTOMERS_ADDRESSES$customerId/$customerGUID", onSuccess: (dynamic response, int statusCode) { + addresses.clear(); + response['customers'][0]['addresses'].forEach((item) { + addresses.add(Addresses.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + } catch (error) { + throw error; + } + } + + Future getShippingOption(Addresses selectedAddress) async { + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + Map queryParams = Map(); + dynamic localRes; + hasError = false; + try { + await baseAppClient.getPharmacy("$GET_SHIPPING_OPTIONS$customerId/${selectedAddress.id}", onSuccess: (dynamic response, int statusCode) { + localRes = response['shipping_option'][0]; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + } catch (error) { + throw error; + } + return Future.value(localRes); + } + + Future getShoppingCart() async { + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); + + if (customerId == null) return Map(); + + Map queryParams = {'shopping_cart_type': '1'}; + dynamic localRes; + hasError = false; + try { + await baseAppClient.getPharmacy("$GET_SHOPPING_CART$customerId/$customerGUID", onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + } catch (error) { + throw error; + } + return Future.value(localRes); + } + + Future changeProductQuantity(String productId, ShoppingCart product) async { + hasError = false; + super.error = ""; + dynamic localRes; + Map choppingCartObject = Map(); + choppingCartObject['id'] = product.id; + choppingCartObject['quantity'] = product.quantity; + choppingCartObject['shopping_cart_type'] = "1"; + choppingCartObject['product_id'] = product.productId; + choppingCartObject['customer_id'] = product.customerId; + + Map body = Map(); + body["shopping_cart_item"] = choppingCartObject; + + await baseAppClient.pharmacyPost("$GET_SHOPPING_CART$productId", isExternal: false, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + + return Future.value(localRes); + } + + Future deleteProduct(String productId) async { + hasError = false; + super.error = ""; + dynamic localRes; + + Map body = Map(); + + await baseAppClient.pharmacyPost("$DELETE_SHOPPING_CART$productId", isExternal: false, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + + return Future.value(localRes); + } + + Future deleteShoppingCart() async { + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + + hasError = false; + super.error = ""; + dynamic localRes; + + await baseAppClient.getPharmacy("$DELETE_SHOPPING_CART_ALL$customerId/ShoppingCart", onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + + return Future.value(localRes); + } + + Future getLacumAccountInformation(String identificationNo) async { + hasError = false; + super.error = ""; + + Map body = Map(); + body['IdentificationNo'] = identificationNo; + + try { + await baseAppClient.post(GET_LACUM_ACCOUNT_INFORMATION, onSuccess: (response, statusCode) async { + lacumInformation = LacumAccountInformation.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } catch (error) { + throw error; + } + } + + Future getLacumGroupInformation(String identificationNo) async { + hasError = false; + super.error = ""; + + Map body = Map(); + body['IdentificationNo'] = identificationNo; + body['AccountNumber'] = "${lacumInformation!.yahalaAccountNo}"; + + try { + await baseAppClient.post(GET_LACUM_GROUP_INFORMATION, onSuccess: (response, statusCode) async { + lacumGroupInformation = LacumAccountInformation.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } catch (error) { + throw error; + } + } + + Future makeOrder(PaymentCheckoutData paymentCheckoutData, List shoppingCarts, bool isLakumEnabled) async { + paymentCheckoutData.address!.isChecked = true; + hasError = false; + super.error = ""; + + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'en'); + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + + Map orderBody = Map(); + orderBody['rx_attachments'] = ""; + orderBody['customer_language_id'] = languageID == 'ar' ? 2 : 1; + orderBody['billing_address'] = paymentCheckoutData.address; + orderBody['pick_up_in_store'] = false; + orderBody['payment_method_system_name'] = "Payments.PayFort"; + + if (paymentCheckoutData.shippingOption!.shippingRateComputationMethodSystemName == "Shipping.Aramex") + orderBody['shipping_method'] = "Aramex Domestic"; + else + orderBody['shipping_method'] = "Fixed Price"; + + orderBody['shipping_rate_computation_method_system_name'] = paymentCheckoutData.shippingOption!.shippingRateComputationMethodSystemName; + orderBody['customer_id'] = int.parse(customerId); + orderBody['custom_values_xml'] = "PaymentOption:${getPaymentOptionName(paymentCheckoutData.paymentOption!)}"; + orderBody['shippingOption'] = paymentCheckoutData.shippingOption; + orderBody['shipping_address'] = paymentCheckoutData.address; + orderBody['lakum_amount'] = isLakumEnabled ? paymentCheckoutData.usedLakumPoints : 0; + + List> itemsList = []; + shoppingCarts.forEach((item) { + Map orderItemsBody = Map(); + orderItemsBody['product_id'] = item.product!.id; + orderItemsBody['quantity'] = item.quantity; + itemsList.add(orderItemsBody); + }); + orderBody['order_items'] = itemsList; + + Map body = Map(); + body['order'] = orderBody; + + try { + await baseAppClient.pharmacyPost(ORDER_SHOPPING_CART, isExternal: false, isAllowAny: true, onSuccess: (response, statusCode) async { + orderList.clear(); + response['orders'].forEach((item) { + orderList.add(OrderDetailModel.fromJson(item)); + print(response); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } catch (error) { + throw error; + } + } + + String getPaymentOptionName(PaymentOption paymentOption) { + switch (paymentOption.index) { + case 0: + return "MADA"; + break; + case 1: + return "SADAD"; + break; + case 2: + return "VISA"; + break; + case 3: + return "MASTERCARD"; + break; + case 4: + return "INSTALLMENT"; + break; + case 5: + return "ApplePay"; + break; + default: + return ""; + } + } + + Future getDriverLocation(dynamic driverId) async { + Map jsonBody = Map(); + jsonBody['DriverID'] = driverId; + + LatLng coordinates; + await baseAppClient.post(DRIVER_LOCATION, onSuccess: (response, statusCode) async { + if (statusCode == 200) { + dynamic locationObject = response['PatientER_GetDriverLocationList'][0]; + double lat = locationObject['Latitude']; + double lon = locationObject['Longitude']; + if (lat != null && lon != null) { + coordinates = LatLng(lat, lon); + return coordinates; + } + } + }, onFailure: (String error, int statusCode) { + return LatLng(double.nan, double.nan); + //added by Amir + }, body: jsonBody); + } +} diff --git a/lib/core/service/parmacyModule/parmacy_module_service.dart b/lib/core/service/parmacyModule/parmacy_module_service.dart new file mode 100644 index 00000000..2490f231 --- /dev/null +++ b/lib/core/service/parmacyModule/parmacy_module_service.dart @@ -0,0 +1,199 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; + +class PharmacyModuleService extends BaseService { + final AppSharedPreferences sharedPref = AppSharedPreferences(); + bool isFinished = true; + String errorMsg = ''; + String url = ""; + CustomerInfo? customerInfo; + + List bannerItems =[]; + List manufacturerList =[]; + List bestSellerProducts =[]; + List lastVisitedProducts =[]; + List mostViewedProducts =[]; + + Future makeVerifyCustomer(dynamic data) async { + Map queryParams = {'FileNumber': data['PatientID'].toString()}; + hasError = false; + try { + await baseAppClient.getPharmacy(PHARMACY_VERIFY_CUSTOMER, onSuccess: (dynamic response, int statusCode) async { + if (response['UserName'] != null) { + sharedPref.setString(PHARMACY_CUSTOMER_ID, response['CustomerId'].toString()); + } else { + await createUser(); + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + } catch (error) { + throw error; + } + } + + Future createUser() async { + var data = await sharedPref.getObject(USER_PROFILE); + var languageID = await sharedPref.getString(APP_LANGUAGE); + Map queryParams = { + 'Phone': Utils.getPhoneNumberWithoutZero(data['MobileNumber']), + 'FileNumber': data['PatientID'].toString(), + 'Language': languageID.toString() == 'en' ? '2' : '1', + 'Iqama': data['PatientIdentificationNo'], + 'CountryCode': data['ZipCode'] ?? '966', + }; + hasError = false; + try { + await baseAppClient.getPharmacy(PHARMACY_CREATE_CUSTOMER, onSuccess: (dynamic response, int statusCode) async { + if (!response['IsRegistered']) { + } else { + customerInfo = CustomerInfo.fromJson(response); + await sharedPref.setObject(PHARMACY_CUSTOMER_ID, customerInfo!.customerId); + await sharedPref.setObject(PHARMACY_CUSTOMER_GUID, response['customerDto']['customerGuid']); + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + } catch (error) { + throw error; + } + return Future.value(1); + } + + Future generatePharmacyToken() async { + await getUser(); + Map queryParams = { + 'Filenumber': user.patientID.toString(), + 'MobileNumber': Utils.getPhoneNumberWithoutZero(user.mobileNumber!), + }; + hasError = false; + try { + await baseAppClient.getPharmacy(PHARMACY_AUTORZIE_CUSTOMER, onSuccess: (dynamic response, int statusCode) async { + if (response['Status'] == 200) { + await sharedPref.setString(PHARMACY_AUTORZIE_TOKEN, response['token'].toString()); + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + } catch (error) { + throw error; + } + } + + Future getBannerListList() async { + hasError = false; + try { + await baseAppClient.getPharmacy(GET_PHARMACY_BANNER, onSuccess: (dynamic response, int statusCode) { + bannerItems.clear(); + response['images'].forEach((item) { + bannerItems.add(PharmacyImageObject.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } catch (error) { + throw error; + } + } + + Future getTopManufacturerList() async { + if (manufacturerList.isNotEmpty) return; + Map queryParams = {'page': '1', 'limit': '8'}; + try { + await baseAppClient.getPharmacy(GET_PHARMACY_TOP_MANUFACTURER, onSuccess: (dynamic response, int statusCode) { + manufacturerList.clear(); + response['manufacturer'].forEach((item) { + Manufacturer manufacturer = Manufacturer.fromJson(item); + // if (manufacturer.image != null) { + manufacturerList.add(Manufacturer.fromJson(item)); + // } + }); + hasError = false; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + } catch (error) { + throw error; + } + } + + Future getBestSellerProducts() async { + if (bestSellerProducts.isNotEmpty) return; + + Map queryParams = { + 'fields': + 'id,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,reviews,specifications', + }; + try { + await baseAppClient.getPharmacy(GET_PHARMACY_BEST_SELLER_PRODUCT, onSuccess: (dynamic response, int statusCode) { + bestSellerProducts.clear(); + response['products'].forEach((item) { + bestSellerProducts.add(PharmacyProduct.fromJson(item)); + }); + hasError = false; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + } catch (error) { + throw error; + } + } + + Future getLastVisitedProducts() async { + String lastVisited = ""; + if (await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS) != null) { + lastVisited = await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS); + // lastVisited = "2458,4561"; + try { + await baseAppClient.getPharmacy("$GET_PHARMACY_PRODUCTs_BY_IDS$lastVisited", onSuccess: (dynamic response, int statusCode) { + lastVisitedProducts.clear(); + response['products'].forEach((item) { + lastVisitedProducts.add(PharmacyProduct.fromJson(item)); + }); + hasError = false; + }, onFailure: (String error, int statusCode) { + hasError = true; // sharedPref.setString(PHARMACY_LAST_VISITED_PRODUCTS, ""); + super.error = error; + }); + } catch (error) { + throw error; + } + } + } + + Future getMostViewedProducts() async { + hasError = false; + Map queryParams = { + 'fields': + 'id,discount_ids,name,reviews,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,specifications', + }; + try { + await baseAppClient.getPharmacy(GET_MOST_VIEWED_PRODUCTS, onSuccess: (dynamic response, int statusCode) { + mostViewedProducts.clear(); + response['products'].forEach((item) { + mostViewedProducts.add(PharmacyProduct.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + } catch (error) { + hasError = true; + super.error = error.toString(); + // throw error; + } + } +} diff --git a/lib/core/service/parmacyModule/prescription_service.dart b/lib/core/service/parmacyModule/prescription_service.dart new file mode 100644 index 00000000..ecad3b77 --- /dev/null +++ b/lib/core/service/parmacyModule/prescription_service.dart @@ -0,0 +1,30 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; + +class PrescriptionService extends BaseService { + final AppSharedPreferences sharedPref = AppSharedPreferences(); + bool isFinished = true; + bool hasError = false; + String errorMsg = ''; + + List _prescriptionsList =[]; + + List get prescriptionsList => _prescriptionsList; + + Future getPrescription() async { + hasError = false; + Map body = Map(); + body['isDentalAllowedBackend'] = false; + await baseAppClient.post(PRESCRIPTION, onSuccess: (dynamic response, int statusCode) { + _prescriptionsList.clear(); + response['PatientPrescriptionList'].forEach((prescriptions) { + _prescriptionsList.add(Prescriptions.fromJson(prescriptions)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/parmacyModule/terms-condition-service.dart b/lib/core/service/parmacyModule/terms-condition-service.dart new file mode 100644 index 00000000..7d03c5dc --- /dev/null +++ b/lib/core/service/parmacyModule/terms-condition-service.dart @@ -0,0 +1,33 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/ListUserAgreement.dart'; + +import '../base_service.dart'; + +class TermsConditionService extends BaseService{ + bool isFinished = true; + bool hasError = false; + String errorMsg = ''; + String successMsg = ''; + + ListUserAgreement? listUserAgreement; + + Future getUserTermsAndConditionsForEPharmcy() async { + hasError = false; + super.error = ""; + + Map body = Map(); + + try { + await baseAppClient.post(LAKUM_GET_USER_TERMS_AND_CONDITIONS, + onSuccess: (response, statusCode) async { + listUserAgreement = ListUserAgreement.fromJson(response['ListUserAgreement'][0]); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } catch (error) { + throw error; + } + } + +} \ No newline at end of file diff --git a/lib/core/service/pharmacies_service.dart b/lib/core/service/pharmacies_service.dart new file mode 100644 index 00000000..88235c0e --- /dev/null +++ b/lib/core/service/pharmacies_service.dart @@ -0,0 +1,121 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_list_model.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:geolocator/geolocator.dart'; + +class PharmacyService extends BaseService { + List _medicineItem =[]; + List _pharmaciesList =[]; + + List get medicineItem => _medicineItem; + List get pharmaciesList => _pharmaciesList; + + bool isFinished = true; + bool hasError = false; + String errorMsg = ''; + + void clearMedicineList() { + _medicineItem.clear(); + } + + void clearPharmaciesList() { + _pharmaciesList.clear(); + } + + PharmaciesModel _requestGetPharmaciesModel = PharmaciesModel( + channel: 3, + clinicID: 1, + deviceTypeID: 2, + doctorID: 1485, + editedBy: 1485, + generalid: "Cs2020@2016\$2958", + iPAdress: "11.11.11.11", + isDentalAllowedBackend: false, + isLoginForDoctorApp: true, + languageID: 2, + pageIndex: 0, + pageSize: 20, + patientOutSA: 0, + pHRItemName: "panadol", + projectID: 15, + sessionID: "BlUSkYymTt", + stamp: "2020-04-27T12:17:17.721Z", + tokenID: "6EfeKCLRu0GPdFutIt3m7Q==", + versionID: 8.3); + + PharmaciesListModel _pharmaciesListModel = PharmaciesListModel( + patientTypeID: 1, + languageID: 2, + stamp: '2020-04-23T21:01:21.492Z', + iPAdress: '11.11.11.11', + versionID: 8.3, + sessionID: 'e29zoooEJ4', + isLoginForDoctorApp: true, + channel: 9, + editedBy: 1485, + doctorID: 1485, + patientOutSA: 0, + clinicID: 1, + projectID: 15, + ); + + double _latitude=0; + double _longitude=0; + + _getCurrentLocation() async { + await Geolocator.getLastKnownPosition().then((value) { + _latitude = value!.latitude; + _longitude = value.longitude; + }).catchError((e) { + _longitude = 0; + _latitude = 0; + }); + } + + Future getMedicineList({required String drugName}) async { + hasError = false; + await _getCurrentLocation(); + Map body = Map(); + body['PHR_itemName'] = drugName.trim(); + body['isLoginForDoctorApp'] = true; + body['isDentalAllowedBackend'] = true; + body['PageSize'] = 25; + body['Latitude'] = _latitude; + body['Longitude'] = _longitude; + + await baseAppClient.post(GET_PHARMCY_ITEMS, + onSuccess: (dynamic response, int statusCode) { + _medicineItem.clear(); + response['ListPharmcy_Region'].forEach((item) { + _medicineItem.add(PharmaciesModel.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + + } + + Future getPharmaciesList({required int itemID}) async { + + await _getCurrentLocation(); + Map body = Map(); + body['ItemID'] = itemID; + body['Latitude'] = _latitude; + body['Longitude'] = _longitude; + + await baseAppClient.post(GET_PHARMACY_LIST, + onSuccess: (dynamic response, int statusCode) { + _pharmaciesList.clear(); + response['PharmList'].forEach((item) { + _pharmaciesList.add(PharmaciesListModel.fromJson(item)); + hasError = false; + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body:body); + + } +} diff --git a/lib/core/service/pharmacy_categorise_service.dart b/lib/core/service/pharmacy_categorise_service.dart new file mode 100644 index 00000000..736c2788 --- /dev/null +++ b/lib/core/service/pharmacy_categorise_service.dart @@ -0,0 +1,400 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/final_products_model.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/pharmacy_categorise.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/scan_qr_model.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/validators.dart'; + +import 'base_service.dart'; + +class PharmacyCategoriseService extends BaseService { + //service one + List _categoriseList =[]; + List get categoriseList => _categoriseList; + + //service two + List _parentCategoriseList =[]; + List get parentCategoriseList => _parentCategoriseList; + + //service three + List _parentProductsList =[]; + List get parentProductsList => _parentProductsList; + + //service four + List _subCategoriseList =[]; + List get subCategoriseList => _subCategoriseList; + + //service five + List _subProductsList =[]; + List get subProductsList => _subProductsList; + + //service six + List _finalProducts =[]; + List get finalProducts => _finalProducts; + + //service 7 + + List _brandsList =[]; + List get brandsList => _brandsList; + + // service 8 + + List _searchList =[]; + List get searchList => _searchList; + + List _scanList =[]; + List get scanList => _scanList; + + List manufacturerProducts =[]; + + clearSearchList() { + _searchList.clear(); + } + + Future getCategorise() async { + hasError = false; + _categoriseList.clear(); + await baseAppClient.getPharmacy( + GET_PHARMACY_CATEGORISE, + onSuccess: (dynamic response, int statusCode) { + response['categories'].forEach((item) { + _categoriseList.add(PharmacyCategorise.fromJson(item)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } + + Future scanQr({required String id}) async { + hasError = false; + _scanList.clear(); + String endPoint = id != null ? SCAN_QR_CODE + "$id" : SCAN_QR_CODE + ""; + await baseAppClient.getPharmacy( + endPoint, + onSuccess: (dynamic response, int statusCode) { + response['products'].forEach((item) { + _scanList.add(ScanQrModel.fromJson(item)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } + + Future searchProducts({required String productName}) async { + hasError = false; + _searchList.clear(); + // the language ID in pharmacy is different not same in patient app, en == 1 , ar == 2 + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + var languageId = languageID == 'ar' ? 2 : 1; + String endPoint = productName != null + ? GET_SEARCH_PRODUCTS + "$productName" + '&language_id=' + "$languageId" + : GET_SEARCH_PRODUCTS + ""; + await baseAppClient.getPharmacy( + endPoint, + onSuccess: (dynamic response, int statusCode) { + response['products'].forEach((item) { + _searchList.add(PharmacyProduct.fromJson(item)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } + + Future getBrands({required String id}) async { + hasError = false; + _brandsList.clear(); + await baseAppClient.getPharmacy( + GET_BRANDS_LIST + "$id" + "&fields=id,name,image,namen", + onSuccess: (dynamic response, int statusCode) { + response['manufacturer'].forEach((item) { + _brandsList.add(CategoriseParentModel.fromJson(item)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } + + Future getCategoriseParent({required String id}) async { + hasError = false; + _parentCategoriseList.clear(); + String endPoint = + id != null ? GET_CATEGORISE_PARENT + "$id" : GET_CATEGORISE_PARENT + ""; + await baseAppClient.getPharmacy( + endPoint, + onSuccess: (dynamic response, int statusCode) { + response['categories'].forEach((item) { + _parentCategoriseList.add(CategoriseParentModel.fromJson(item)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } + + Future getParentProducts( + {String? id, int? pageNumber, bool isLoading = false}) async { + hasError = false; + if (isLoading == false) { + _parentProductsList.clear(); + } + String endPoint = id != null + ? GET_PARENT_PRODUCTS + "$id" + '&page=' + '$pageNumber' + '&limit=24' + : GET_PARENT_PRODUCTS + ""; + await baseAppClient.getPharmacy( + endPoint, + onSuccess: (dynamic response, int statusCode) { + response['products'].forEach((item) { + _parentProductsList.add(PharmacyProduct.fromJson(item)); + }); + //pageNumber++; + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } + + Future getSubCategorise({required String id}) async { + hasError = false; + _subCategoriseList.clear(); + + String endPoint = + id != null ? GET_SUB_CATEGORISE + "$id" : GET_SUB_CATEGORISE + ""; + await baseAppClient.getPharmacy( + endPoint, + onSuccess: (dynamic response, int statusCode) { + response['categories'].forEach((item) { + _subCategoriseList.add(CategoriseParentModel.fromJson(item)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } + + Future getSubProducts( + {String? id, int? pageIndex, bool isLoading = false}) async { + hasError = false; + if (isLoading == false) { + _subProductsList.clear(); + } + String endPoint = id != null + ? GET_SUB_PRODUCTS + "$id" + '&page=' + '$pageIndex' + '&limit=24' + : GET_SUB_PRODUCTS + ""; + await baseAppClient.getPharmacy( + endPoint, + onSuccess: (dynamic response, int statusCode) { + response['products'].forEach((item) { + _subProductsList.add(PharmacyProduct.fromJson(item)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } + + Future getFinalProducts({required String id}) async { + hasError = false; + _finalProducts.clear(); + String endPoint = + id != null ? GET_FINAL_PRODUCTS + "$id" : GET_FINAL_PRODUCTS + ""; + await baseAppClient.getPharmacy( + endPoint, + onSuccess: (dynamic response, int statusCode) { + response['products'].forEach((item) { + _finalProducts.add(PharmacyProduct.fromJson(item)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } + + Future getManufacturerProducts(String id) async { + hasError = false; + Map queryParams = {'ManufacturerId': id}; + + _finalProducts.clear(); + await baseAppClient.getPharmacy( + GET_BRAND_ITEMS, + onSuccess: (dynamic response, int statusCode) { + response['products'].forEach((item) { + _finalProducts.add(PharmacyProduct.fromJson(item)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + queryParams: queryParams, + ); + } + + Future getLastVisitedProducts() async { + String lastVisited = ""; + _finalProducts.clear(); + if (await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS) != + null) { + lastVisited = + await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS); + try { + await baseAppClient + .getPharmacy("$GET_PHARMACY_PRODUCTs_BY_IDS$lastVisited", + onSuccess: (dynamic response, int statusCode) { + _finalProducts.clear(); + response['products'].forEach((item) { + _finalProducts.add(PharmacyProduct.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } catch (error) { + throw error; + } + } + } + + Future getBestSellerProducts() async { + Map queryParams = { + 'fields': + 'id,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,reviews,specifications', + }; + try { + await baseAppClient.getPharmacy(GET_PHARMACY_BEST_SELLER_PRODUCT, + onSuccess: (dynamic response, int statusCode) { + _finalProducts.clear(); + response['products'].forEach((item) { + _finalProducts.add(PharmacyProduct.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + } catch (error) { + throw error; + } + } + + Future getFilteredProducts( + {String? categoryId, String? brandId, String? min, String? max}) async { + hasError = false; + String endPoint; + + _parentProductsList.clear(); + endPoint = FILTERED_PRODUCTS + + "$categoryId" + + "$brandId" + + "$min" + + "$max&page=1&limit=50"; + await baseAppClient.getPharmacy( + endPoint, + onSuccess: (dynamic response, int statusCode) { + response['products'].forEach((item) { + _parentProductsList.add(PharmacyProduct.fromJson(item)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } + + Future getFilteredSubProducts( + {String? categoryId, String? brandId, String? min, String? max}) async { + hasError = false; + String endPoint; + + _subProductsList.clear(); + endPoint = FILTERED_PRODUCTS + + "$categoryId" + + "$brandId" + + "$min" + + "$max&page=1&limit=50"; + await baseAppClient.getPharmacy( + endPoint, + onSuccess: (dynamic response, int statusCode) { + response['products'].forEach((item) { + _subProductsList.add(PharmacyProduct.fromJson(item)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } + + Future getMostViewedProducts() async { + hasError = false; + Map queryParams = { + 'fields': + 'mostview?fields=id,discount_ids,name,reviews,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,specifications', + }; + try { + await baseAppClient.getPharmacy(GET_MOST_VIEWED_PRODUCTS, + onSuccess: (dynamic response, int statusCode) { + _finalProducts.clear(); + response['products'].forEach((item) { + _finalProducts.add(PharmacyProduct.fromJson(item)); + }); + print("most viewed products ---------"); + print(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + } catch (error) { + hasError = true; + super.error = error.toString(); + // throw error; + } + } + + Future getNewProducts() async { + Map queryParams = { + 'fields': + 'Id,name,namen,localized_names,price,images,sku,stock_availability,published', + }; + try { + await baseAppClient.getPharmacy(GET_NEW_PRODUCTS, + onSuccess: (dynamic response, int statusCode) { + _finalProducts.clear(); + response['products'].forEach((item) { + _finalProducts.add(PharmacyProduct.fromJson(item)); + }); + print("new products ---------"); + print(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + } catch (error) { + throw error; + } + } +} diff --git a/lib/core/service/privilege_service.dart b/lib/core/service/privilege_service.dart new file mode 100644 index 00000000..b8b7b771 --- /dev/null +++ b/lib/core/service/privilege_service.dart @@ -0,0 +1,46 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/privilege/HMCProjectListModel.dart'; +import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart'; +import 'package:diplomaticquarterapp/core/model/privilege/ProjectDetailListModel.dart'; +import 'package:diplomaticquarterapp/core/model/privilege/VidaPlusProjectListModel.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/main.dart'; + +class PrivilegeService extends BaseService { + List privilegeModelList = []; + List vidaPlusProjectListModel = []; + List hMCProjectListModel = []; + List projectDetailListModel = []; + + Future getPrivilege() async { + Map body = Map(); + body['PatientType'] = 4; + body['LanguageID'] = 1; + await baseAppClient.post(GET_PRIVILEGE, onSuccess: (dynamic response, int statusCode) { + response['ServicePrivilegeList'].forEach((item) { + privilegeModelList.add(PrivilegeModel.fromJson(item)); + }); + + if (response['ProjectListVidaPlus'].length != 0) { + response['ProjectListVidaPlus'].forEach((item) { + vidaPlusProjectListModel.add(VidaPlusProjectListModel.fromJson(item)); + }); + } + + if (response['HMCProjectList'].length != 0) { + response['HMCProjectList'].forEach((item) { + hMCProjectListModel.add(HMCProjectListModel.fromJson(item)); + }); + } + + if (response['ProjectDetailList'].length != 0) { + response['ProjectDetailList'].forEach((item) { + projectDetailListModel.add(ProjectDetailListModel.fromJson(item)); + }); + } + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/qr_service.dart b/lib/core/service/qr_service.dart new file mode 100644 index 00000000..5d87a7aa --- /dev/null +++ b/lib/core/service/qr_service.dart @@ -0,0 +1,21 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/qr/qr_parking_model.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class QrService extends BaseService { + List qRParkingList =[]; + + Future getQRParkingByID(int qRParkingID) async { + Map body = Map(); + body['QRParkingID'] = qRParkingID; + await baseAppClient.post(GET_QR_PARKING, + onSuccess: (dynamic response, int statusCode) { + response['List_SWP_QRParkingModel'].forEach((item) { + qRParkingList.add(QRParkingModel.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/termsConditionsService.dart b/lib/core/service/termsConditionsService.dart new file mode 100644 index 00000000..1f806e22 --- /dev/null +++ b/lib/core/service/termsConditionsService.dart @@ -0,0 +1,18 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class TermsConditionsService extends BaseService { + + String userAgreementContent = ""; + + Future getUserTermsAndConditions() async { + hasError = false; + await baseAppClient.post(GET_USER_TERMS, + onSuccess: (dynamic response, int statusCode) { + userAgreementContent = response['UserAgreementContent']; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map()); + } +} \ No newline at end of file diff --git a/lib/core/service/vaccine_service.dart b/lib/core/service/vaccine_service.dart new file mode 100644 index 00000000..30cff48d --- /dev/null +++ b/lib/core/service/vaccine_service.dart @@ -0,0 +1,76 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/vaccine/my_vaccine.dart'; +import 'package:diplomaticquarterapp/core/model/vaccine/vaccination_item.dart'; +import 'package:diplomaticquarterapp/core/model/vaccine/vaccination_on_hand.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class VaccineService extends BaseService { + List _vaccineList =[]; + List vaccinationItemList =[]; + List vaccinationOnHandList =[]; + + List get vaccineList => _vaccineList; + + Future getMyVaccine() async { + Map body = Map(); + body['To'] = "0"; + body['From'] = "0"; + + hasError = false; + _vaccineList.clear(); + await baseAppClient.post(GET_VACCINES, + onSuccess: (dynamic response, int statusCode) { + response['List_DoneVaccines'].forEach((item) { + _vaccineList.add(VaccineModel.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future sendEmail() async { + Map body = Map(); + body['ListVaccines'] = vaccineList.map((v) => v.toJson()).toList(); + body['To'] = user.emailAddress; + body['DateofBirth'] = user.dateofBirth; + body['PatientIditificationNum'] = user.patientIdentificationNo; + body['PatientMobileNumber'] = user.mobileNumber; + body['PatientName'] = user.firstName! + " " + user.lastName!; + + hasError = false; + + await baseAppClient.post(GET_VACCINES_EMAIL, + onSuccess: (dynamic response, int statusCode) {}, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future getMyVaccinationItem() async { + await baseAppClient.post(GET_VACCINATIONS_ITEMS, + onSuccess: (dynamic response, int statusCode) { + response['GetVaccinationsList'].forEach((item) { + vaccinationItemList.add(VaccinationItem.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map()); + } + + Future getMyVaccinationOnHand({required String pItemCode}) async { + Map body = Map(); + body['P_ITEM_CODE'] = pItemCode; + await baseAppClient.post(GET_VACCINATION_ONHAND, + onSuccess: (dynamic response, int statusCode) { + response['GetVaccinationOnHandList'].forEach((item) { + vaccinationOnHandList.add(VaccinationOnHand.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} diff --git a/lib/core/service/weather_service.dart b/lib/core/service/weather_service.dart new file mode 100644 index 00000000..a94dd9e1 --- /dev/null +++ b/lib/core/service/weather_service.dart @@ -0,0 +1,34 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/weahter/weather_model.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class WeatherService extends BaseService { + List weatherIndicatorData =[]; + + Map body = Map(); + String Latitude = ""; + String Longitude = ""; + String PhoneNumber = ""; + + Future getWeatherData() async { + hasError = false; + + var lat = await sharedPref.getDouble(USER_LAT); + var long = await sharedPref.getDouble(USER_LONG); + body['Latitude'] = lat ?? 0; + body['Longitude'] = long ?? 0; + weatherIndicatorData = []; + await baseAppClient.post(WEATHER_INDICATOR, + onSuccess: (dynamic response, int statusCode) { + response['GetCityInfo_List'].forEach((data) { + weatherIndicatorData.add(GetCityInfoList.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + await this.sharedPref.setObject(WEATHER, weatherIndicatorData[0]); + return Future.value(weatherIndicatorData[0]); + } +} diff --git a/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart new file mode 100644 index 00000000..d7df4773 --- /dev/null +++ b/lib/core/viewModels/AlHabibMedicalService/H2O_view_model.dart @@ -0,0 +1,186 @@ +import 'dart:math' as math; + +import 'package:flutter_charts/flutter_charts.dart' as Charts; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_month_data_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_today_data_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_progress_for_week_data_model.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/widgets/charts/custom_line_chart.dart'; + +import '../../../locator.dart'; + +class H2OViewModel extends BaseViewModel { + H2OService _h2OService = locator(); + + // + // List userProgressForWeekDataSeries; + List? userProgressForWeekDataSeries; + List? userProgressForMonthDataSeries; + + // List userProgressForMonthDataSeries; + + UserDetailModel get userDetail => _h2OService.userDetailModel; + + UserProgressForTodayDataModel get userProgressData { + if (_h2OService.userProgressForTodayDataList.length != 0) return _h2OService.userProgressForTodayDataList[0]; + return UserProgressForTodayDataModel(); + } + + Future getUserDetail() async { + // if(_h2OService.userProgressForTodayDataList.length==0){ + setState(ViewState.Busy); + await _h2OService.getUserDetail(); + if (_h2OService.hasError) { + error = _h2OService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future updateUserDetail(UserDetailModel userDetailModel, Function(bool) onResponse) async { + setState(ViewState.Busy); + + await _h2OService.updateUserDetail(userDetailModel); + if (_h2OService.hasError) { + error = _h2OService.error!; + setState(ViewState.Error); + onResponse(false); + } else { + _h2OService.userDetailModel = userDetailModel; + setState(ViewState.Idle); + onResponse(true); + } + } + + Future getUserProgressForTodayData() async { + // if(_h2OService.userProgressForTodayDataList.length==0){ + setState(ViewState.Busy); + await _h2OService.getUserProgressForTodayData(); + if (_h2OService.hasError) { + error = _h2OService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getUserProgressForWeekData() async { + setState(ViewState.Busy); + await _h2OService.getUserProgressForWeekData(); + if (_h2OService.hasError) { + error = _h2OService.error!; + setState(ViewState.Error); + } else { + // userProgressForWeekDataSeries = createUserProgressForWeekDataSeries(); + userProgressForWeekDataSeries = createUserProgressForWeekDataSeriesNew(); + setState(ViewState.Idle); + } + } + + Future getUserProgressForMonthData() async { + setState(ViewState.Busy); + await _h2OService.getUserProgressForMonthData(); + if (_h2OService.hasError) { + error = _h2OService.error!; + setState(ViewState.Error); + } else { + userProgressForMonthDataSeries = createUserProgressForMonthDataSeriesNew(); + setState(ViewState.Idle); + } + } + + // List> createUserProgressForWeekDataSeries() { + // List globalData = []; + // _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 [ + // 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, + // ), + // ]; + // } + + List createUserProgressForWeekDataSeriesNew() { + List list = []; + + _h2OService.userProgressForWeekDataList.forEach((UserProgressForWeekDataModel data) { + list.add(new LineChartModel(data.dayName!, data.percentageConsumed!)); + }); + return list; + } + + List createUserProgressForMonthDataSeriesNew() { + List list = []; + _h2OService.userProgressForMonthDataList.forEach((UserProgressForMonthDataModel data) { + list.add(new LineChartModel(data.monthName!, data.percentageConsumed!)); + }); + return list; + } + + // List> createUserProgressForMonthDataSeries() { + // List globalData = []; + // _h2OService.userProgressForMonthDataList.forEach((UserProgressForMonthDataModel data) { + // globalData.add(new ChartSeries(data.monthName!, data.percentageConsumed!)); + // }); + // return [ + // new charts.Series( + // id: 'Global Revenue', + // domainFn: (ChartSeries sales, _) => sales.y, + // measureFn: (ChartSeries sales, _) => sales.x, + // data: globalData, + // ), + // ]; + // } + + Future insertUserActivity(InsertUserActivityRequestModel insertUserActivityRequestModel) async { + setState(ViewState.BusyLocal); + insertUserActivityRequestModel.mobileNumber = user!.mobileNumber!.substring(1); + insertUserActivityRequestModel.identificationNo = user!.patientIdentificationNo; + + await _h2OService.insertUserActivity(insertUserActivityRequestModel); + if (_h2OService.hasError) { + error = _h2OService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future undoUserActivity() async { + setState(ViewState.BusyLocal); + await _h2OService.undoUserActivity(); + if (_h2OService.hasError) { + error = _h2OService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } +} + +/// Sample ordinal data type. +class ChartSeries { + final String y; + final int x; + + ChartSeries(this.y, this.x); +} diff --git a/lib/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart b/lib/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart new file mode 100644 index 00000000..af040cb6 --- /dev/null +++ b/lib/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart @@ -0,0 +1,136 @@ +class AddNewAddressRequestModel { + Customer? customer; + + AddNewAddressRequestModel({this.customer}); + + AddNewAddressRequestModel.fromJson(Map json) { + customer = json['customer'] != null + ? new Customer.fromJson(json['customer']) + : null; + } + + Map toJson() { + final Map data = new Map(); + if (this.customer != null) { + data['customer'] = this.customer!.toJson(); + } + return data; + } +} + +class Customer { + List? addresses; + String? id; + String? email; + List? roleIds; + + Customer({this.addresses, this.id, this.email, this.roleIds}); + + Customer.fromJson(Map json) { + if (json['addresses'] != null) { + addresses = []; + json['addresses'].forEach((v) { + addresses!.add(new Addresses.fromJson(v)); + }); + } + id = json['id']; + email = json['email']; + roleIds = json['role_ids'].cast(); + } + + Map toJson() { + final Map data = new Map(); + if (this.addresses != null) { + data['addresses'] = this.addresses!.map((v) => v.toJson()).toList(); + } + data['id'] = this.id; + data['email'] = this.email; + data['role_ids'] = this.roleIds; + return data; + } +} + +class Addresses { + String? id; + String? firstName; + String? lastName; + String? email; + dynamic company; + int? countryId; + String? country; + dynamic stateProvinceId; + String? city; + String? address1; + String? address2; + String? zipPostalCode; + String? phoneNumber; + dynamic faxNumber; + String? customerAttributes; + String? createdOnUtc; + dynamic province; + String? latLong; + + Addresses( + {this.id, + this.firstName, + this.lastName, + this.email, + this.company, + this.countryId, + this.country, + this.stateProvinceId, + this.city, + this.address1, + this.address2, + this.zipPostalCode, + this.phoneNumber, + this.faxNumber, + this.customerAttributes, + this.createdOnUtc, + this.province, + this.latLong}); + + Addresses.fromJson(Map json) { + id = json['id']; + firstName = json['first_name']; + lastName = json['last_name']; + email = json['email']; + company = json['company']; + countryId = json['country_id']; + country = json['country']; + stateProvinceId = json['state_province_id']; + city = json['city']; + address1 = json['address1']; + address2 = json['address2']; + zipPostalCode = json['zip_postal_code']; + phoneNumber = json['phone_number']; + faxNumber = json['fax_number']; + customerAttributes = json['customer_attributes']; + createdOnUtc = json['created_on_utc']; + province = json['province']; + latLong = json['lat_long']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['first_name'] = this.firstName; + data['last_name'] = this.lastName; + data['email'] = this.email; + data['company'] = this.company; + data['country_id'] = this.countryId; + data['country'] = this.country; + data['state_province_id'] = this.stateProvinceId; + data['city'] = this.city; + data['address1'] = this.address1; + data['address2'] = this.address2; + data['zip_postal_code'] = this.zipPostalCode; + data['phone_number'] = this.phoneNumber; + data['fax_number'] = this.faxNumber; + data['customer_attributes'] = this.customerAttributes; + data['created_on_utc'] = this.createdOnUtc; + data['province'] = this.province; + data['lat_long'] = this.latLong; + return data; + } +} diff --git a/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart new file mode 100644 index 00000000..629f2918 --- /dev/null +++ b/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart @@ -0,0 +1,159 @@ +import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/get_cmc_service_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/cmc_service.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/main.dart'; + +import '../../../locator.dart'; +import 'add_new_address_Request_Model.dart'; + +class CMCViewModel extends BaseViewModel { + CMCService _cMCService = locator(); + CustomerAddressesService _customerAddressesService = locator(); + + List get addressesList => _customerAddressesService.addressesList; + + List get cmcAllServicesList => _cMCService.cmcAllServicesList; + + List get cmcAllPresOrders => _cMCService.cmcAllPresOrdersList; + + List get cmcAllOrderDetail => _cMCService.cmcAllOrderDetail; + + List get checkupItems => _cMCService.checkupItemsList; + + PharmacyModuleService _pharmacyModuleService = locator(); + + GetCMCAllOrdersResponseModel? pendingOrder; + + bool? get isOrderUpdated => _cMCService.isOrderUpdated; + + Future getCMCAllServices() async { + await _cMCService.getCMCAllServices(); + if (_cMCService.hasError) { + error = _cMCService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getCheckupItems({CMCGetItemsRequestModel? cMCGetItemsRequestModel, bool isFirst = false}) async { + if (!isFirst) setState(ViewState.Busy); + await _cMCService.getCheckupItems(cMCGetItemsRequestModel!); + if (_cMCService.hasError) { + error = _cMCService.error!; + setState(ViewState.Error); + } + if (!isFirst) setState(ViewState.Idle); + } + + Future getCmcAllPresOrders() async { + setState(ViewState.Busy); + // await _cMCService.getCmcAllPresOrders(); + await _cMCService.getCmcAllPresOrdersRC(); + if (_cMCService.hasError) { + error = _cMCService.error!; + setState(ViewState.Error); + } else { + pendingOrder = _cMCService.cmcAllPresOrdersList.firstWhere((element) => element.statusId == 1 || element.statusId == 2, orElse: () => GetCMCAllOrdersResponseModel()); + if (pendingOrder != null && pendingOrder!.serviceText != null) { + // await getOrderDetailByOrderID(pendingOrder); + setState(ViewState.Idle); + } else { + getCMCAllServices(); + } + } + } + + Future updateCmcPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async { + setState(ViewState.BusyLocal); + // await _cMCService.updateCmcPresOrder(updatePresOrderRequestModel); + await _cMCService.updateCmcPresOrderRC(updatePresOrderRequestModel); + if (_cMCService.hasError) { + error = _cMCService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future getOrderDetailByOrderID(GetCMCAllOrdersResponseModel order) async { + GetOrderDetailByOrderIDRequestModel getOrderDetailByOrderIDRequestModel = GetOrderDetailByOrderIDRequestModel(presOrderID: order.iD); + await _cMCService.getOrderDetailByOrderID(getOrderDetailByOrderIDRequestModel); + } + + Future insertPresPresOrder({required CMCInsertPresOrderRequestModel order}) async { + setState(ViewState.Busy); + order.createdBy = user.patientID; + order.orderServiceID = OrderService.Comprehensive_Medical_Checkup.getIdOrderService(); + String requestId = await _cMCService.insertPresPresOrder(order: order); + if (_cMCService.hasError) { + error = _cMCService.error!; + setState(ViewState.ErrorLocal); + } else { + getCmcAllPresOrders(); + } + return requestId; + } + + Future insertCMCOrderRC({required CMCInsertPresOrderRequestModel order}) async { + setState(ViewState.Busy); + order.createdBy = user.patientID; + order.orderServiceID = OrderService.Comprehensive_Medical_Checkup.getIdOrderService(); + String requestId = await _cMCService.insertCMCOrderRC(order: order); + if (_cMCService.hasError) { + error = _cMCService.error!; + setState(ViewState.ErrorLocal); + } else { + getCmcAllPresOrders(); + } + return requestId; + } + + Future getCustomerAddresses() async { + setState(ViewState.Busy); + await _customerAddressesService.getCustomerAddresses(); + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future getCustomerInfo() async { + setState(ViewState.Busy); + await _pharmacyModuleService.generatePharmacyToken(); + + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error!; + await _pharmacyModuleService.createUser(); + setState(ViewState.ErrorLocal); + } else { + await _pharmacyModuleService.createUser(); + await getCustomerAddresses(); + } + } + + Future addAddressInfo({required AddNewAddressRequestModel addNewAddressRequestModel}) async { + setState(ViewState.Busy); + await _customerAddressesService.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel); + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart b/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart new file mode 100644 index 00000000..f545caff --- /dev/null +++ b/lib/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart @@ -0,0 +1,77 @@ +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/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'; + +class BariatricsViewModel extends BaseViewModel { + BariatricsService _service = locator(); + + List get clinicCategoryList => _service.clinicCategoryList; + + List get diseasesList => _service.diseasesList; + List get doctorList => _service.doctorList; + List get doctorListByTime => _service.doctorListByTime; + List doctorLists =[]; + + void getClinicCategory() async { + setState(ViewState.Busy); + await _service.getClinicCategory(); + if (_service.hasError) { + error = _service.error!; + setState(ViewState.Error); + } else { + getDiseaseByClinicId(); + } + } + + void getDiseaseByClinicId() async { + setState(ViewState.Busy); + await _service.getDiseaseByClinicId(); + if (_service.hasError) { + error = _service.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future searchDoctorsByTime(DiseasesByClinic disease) async { + setState(ViewState.Busy); + await _service.searchDoctorsByTime(disease); + if (_service.hasError) { + error = _service.error!; + setState(ViewState.ErrorLocal); + } else { + 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/AlHabibMedicalService/home_health_care_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart new file mode 100644 index 00000000..0d617b6a --- /dev/null +++ b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart @@ -0,0 +1,288 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/home_health_care_service.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../../locator.dart'; +import 'add_new_address_Request_Model.dart'; + +class HomeHealthCareViewModel extends BaseViewModel { + HomeHealthCareService _homeHealthCareService = locator(); + + CustomerAddressesService _customerAddressesService = locator(); + + List get hhcAllServicesList => _homeHealthCareService.hhcAllServicesList; + + List get addressesList => _customerAddressesService.addressesList; + + List get hhcAllPresOrders => _homeHealthCareService.hhcAllPresOrdersList; + + List get hhcAllOrderDetail => _homeHealthCareService.hhcAllOrderDetail; + + PharmacyModuleService _pharmacyModuleService = locator(); + + bool get isOrderUpdated => _homeHealthCareService.isOrderUpdated ?? false; + + int get orderId => _homeHealthCareService.requestNo ?? 0; + late GetCMCAllOrdersResponseModel pendingOrder; + + List patientERHHCInsertServicesList = []; + + dynamic get hhcResponse => _homeHealthCareService.hhcResponse; + + Future getHHCAllServices() async { + HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel = new HHCGetAllServicesRequestModel(); + // await _homeHealthCareService.getHHCAllServices(hHCGetAllServicesRequestModel); + await _homeHealthCareService.getHHCAllServicesRC(hHCGetAllServicesRequestModel); + if (_homeHealthCareService.hasError) { + error = _homeHealthCareService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getHHCAllPresOrders() async { + pendingOrder = GetCMCAllOrdersResponseModel(); + setState(ViewState.Busy); + await _homeHealthCareService.getHHCAllPresOrdersRC(); + if (_homeHealthCareService.hasError) { + error = _homeHealthCareService.error!; + setState(ViewState.Error); + } else { + pendingOrder = _homeHealthCareService.hhcAllPresOrdersList.firstWhere((element) => element.statusId == 1 || element.statusId == 2, orElse: () => GetCMCAllOrdersResponseModel()); + if (pendingOrder != null && pendingOrder.serviceText != null) { + // await _homeHealthCareService.getOrderDetailByOrderID(pendingOrder.iD); + setState(ViewState.Idle); + } else { + getHHCAllServices(); + } + } + } + + Future updateHHCPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async { + setState(ViewState.Busy); + // await _homeHealthCareService.updateHHCPresOrder(updatePresOrderRequestModel); + await _homeHealthCareService.updateHHCPresOrderRC(updatePresOrderRequestModel); + if (_homeHealthCareService.hasError) { + error = _homeHealthCareService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future insertPresPresOrder({PatientERInsertPresOrderRequestModel? order}) async { + setState(ViewState.Busy); + order!.createdBy = user.patientID; + order.orderServiceID = OrderService.HOME_HEALTH_CARE.getIdOrderService(); + // await _homeHealthCareService.insertPresPresOrder(order: order); + await _homeHealthCareService.insertHHCOrderRC(order: order); + if (_homeHealthCareService.hasError) { + error = _homeHealthCareService.error!; + setState(ViewState.ErrorLocal); + } else { + getHHCAllPresOrders(); + } + } + + Future getCustomerAddresses() async { + setState(ViewState.Busy); + await _customerAddressesService.getCustomerAddresses(); + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future getCustomerInfo() async { + setState(ViewState.Busy); + await _pharmacyModuleService.generatePharmacyToken(); + + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error!; + await _pharmacyModuleService.createUser(); + setState(ViewState.ErrorLocal); + } else { + await _pharmacyModuleService.createUser().then((value) async { + if (!_pharmacyModuleService.hasError) await getCustomerAddresses(); + setState(ViewState.Idle); + }).catchError((err) {}); + } + return Future.value(1); + } + + Future addAddressInfo({AddNewAddressRequestModel? addNewAddressRequestModel}) async { + setState(ViewState.Busy); + + // await _pharmacyModuleService.generatePharmacyToken().then((value) async { + await _customerAddressesService.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel); + // }); + + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } +} + +// import 'dart:async'; +// +// import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; +// import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +// import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; +// import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart'; +// import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart'; +// import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart'; +// import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart'; +// import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; +// import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; +// import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +// import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/home_health_care_service.dart'; +// import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; +// import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +// import 'package:diplomaticquarterapp/main.dart'; +// +// import '../../../locator.dart'; +// import 'add_new_address_Request_Model.dart'; +// +// class HomeHealthCareViewModel extends BaseViewModel { +// HomeHealthCareService _homeHealthCareService = locator(); +// +// CustomerAddressesService _customerAddressesService = locator(); +// +// List get hhcAllServicesList => _homeHealthCareService.hhcAllServicesList; +// +// List get addressesList => _customerAddressesService.addressesList; +// +// List get hhcAllPresOrders => _homeHealthCareService.hhcAllPresOrdersList; +// +// List get hhcAllOrderDetail => _homeHealthCareService.hhcAllOrderDetail; +// +// PharmacyModuleService _pharmacyModuleService = locator(); +// +// bool get isOrderUpdated => _homeHealthCareService.isOrderUpdated!; +// +// int get orderId => _homeHealthCareService.requestNo!; +// late GetCMCAllOrdersResponseModel pendingOrder; +// +// List patientERHHCInsertServicesList =[]; +// +// dynamic get hhcResponse => _homeHealthCareService.hhcResponse; +// +// Future getHHCAllServices() async { +// HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel = new HHCGetAllServicesRequestModel(); +// // await _homeHealthCareService.getHHCAllServices(hHCGetAllServicesRequestModel); +// await _homeHealthCareService.getHHCAllServicesRC(hHCGetAllServicesRequestModel); +// +// if (_homeHealthCareService.hasError) { +// error = _homeHealthCareService.error!; +// setState(ViewState.Error); +// } else { +// setState(ViewState.Idle); +// } +// } +// +// Future getHHCAllPresOrders() async { +// pendingOrder = GetCMCAllOrdersResponseModel(); +// setState(ViewState.Busy); +// await _homeHealthCareService.getHHCAllPresOrdersRC(); +// if (_homeHealthCareService.hasError) { +// error = _homeHealthCareService.error!; +// setState(ViewState.Error); +// } else { +// pendingOrder = _homeHealthCareService.hhcAllPresOrdersList.firstWhere((element) => element.statusId == 1 || element.statusId == 2, orElse: () => GetCMCAllOrdersResponseModel()); +// if (pendingOrder != null) { +// logger.d(pendingOrder); +// // await _homeHealthCareService.getOrderDetailByOrderID(pendingOrder.iD); +// setState(ViewState.Idle); +// } else { +// getHHCAllServices(); +// } +// } +// } +// +// Future updateHHCPresOrder(UpdatePresOrderRequestModel updatePresOrderRequestModel) async { +// setState(ViewState.Busy); +// // await _homeHealthCareService.updateHHCPresOrder(updatePresOrderRequestModel); +// await _homeHealthCareService.updateHHCPresOrderRC(updatePresOrderRequestModel); +// if (_homeHealthCareService.hasError) { +// error = _homeHealthCareService.error!; +// setState(ViewState.ErrorLocal); +// } else { +// setState(ViewState.Idle); +// } +// } +// +// Future insertPresPresOrder({required PatientERInsertPresOrderRequestModel order}) async { +// setState(ViewState.Busy); +// order.createdBy = user!.patientID; +// order.orderServiceID = OrderService.HOME_HEALTH_CARE.getIdOrderService(); +// // await _homeHealthCareService.insertPresPresOrder(order: order); +// await _homeHealthCareService.insertHHCOrderRC(order: order); +// if (_homeHealthCareService.hasError) { +// error = _homeHealthCareService.error!; +// setState(ViewState.ErrorLocal); +// } else { +// getHHCAllPresOrders(); +// } +// } +// +// Future getCustomerAddresses() async { +// setState(ViewState.Busy); +// await _customerAddressesService.getCustomerAddresses(); +// if (_customerAddressesService.hasError) { +// error = _customerAddressesService.error!; +// setState(ViewState.ErrorLocal); +// } else { +// setState(ViewState.Idle); +// } +// } +// +// Future getCustomerInfo() async { +// setState(ViewState.Busy); +// await _pharmacyModuleService.generatePharmacyToken(); +// +// if (_customerAddressesService.hasError) { +// error = _customerAddressesService.error!; +// await _pharmacyModuleService.createUser(); +// setState(ViewState.ErrorLocal); +// } else { +// await _pharmacyModuleService.createUser().then((value) async { +// if (!_pharmacyModuleService.hasError) await getCustomerAddresses(); +// setState(ViewState.Idle); +// }).catchError((err) {}); +// } +// return Future.value(1); +// } +// +// Future addAddressInfo({required AddNewAddressRequestModel addNewAddressRequestModel}) async { +// setState(ViewState.Busy); +// +// // await _pharmacyModuleService.generatePharmacyToken().then((value) async { +// await _customerAddressesService.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel); +// // }); +// +// if (_customerAddressesService.hasError) { +// error = _customerAddressesService.error!; +// setState(ViewState.ErrorLocal); +// } else { +// setState(ViewState.Idle); +// } +// } +// } diff --git a/lib/core/viewModels/PharmacyPagesViewModel.dart b/lib/core/viewModels/PharmacyPagesViewModel.dart new file mode 100644 index 00000000..7d26fbcf --- /dev/null +++ b/lib/core/viewModels/PharmacyPagesViewModel.dart @@ -0,0 +1,17 @@ +import 'package:flutter/cupertino.dart'; + +class PharmacyPagesViewModel with ChangeNotifier { + int currentTab = 0; + PageController? pageController; + + PharmacyPagesViewModel() { + pageController = PageController(keepPage: true); + } + changeCurrentTab(int tab) { + if (pageController!.hasClients) { + currentTab = tab; + pageController!.jumpToPage(tab); + notifyListeners(); + } + } +} diff --git a/lib/core/viewModels/TermsConditionsViewModel.dart b/lib/core/viewModels/TermsConditionsViewModel.dart new file mode 100644 index 00000000..f458ce9f --- /dev/null +++ b/lib/core/viewModels/TermsConditionsViewModel.dart @@ -0,0 +1,29 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/service/termsConditionsService.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../locator.dart'; + +class TermsConditionsViewModel extends BaseViewModel{ + + TermsConditionsService _service = locator(); + + String get userAgreementContent => _service.userAgreementContent; + + getUserTermsAndConditions() async { + setState(ViewState.Busy); + await _service.getUserTermsAndConditions(); + if (_service.hasError) { + error = _service.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + @override + void dispose() { + super.dispose(); + } + +} \ No newline at end of file diff --git a/lib/core/viewModels/all_habib_medical_services/e_referral_view_model.dart b/lib/core/viewModels/all_habib_medical_services/e_referral_view_model.dart new file mode 100644 index 00000000..5e25e3e8 --- /dev/null +++ b/lib/core/viewModels/all_habib_medical_services/e_referral_view_model.dart @@ -0,0 +1,95 @@ +import 'dart:core'; + +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/check_activation_code_for_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_relationship_types_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/send_activation_code_for_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/e_referral_service.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class EReferralViewModel extends BaseViewModel { + EReferralService _eReferralService = locator(); + + List get relationTypes => + _eReferralService.relationTypes; + List get allCities => _eReferralService.allCities; + List get allReferral => _eReferralService.allReferral; + + String get referralNumber => _eReferralService.referralNumber; + + void getRelationTypes() async { + setState(ViewState.Busy); + await _eReferralService.getRelationTypes(); + if (_eReferralService.hasError) { + error = _eReferralService.error!; + setState(ViewState.Error); + } else{ + setState(ViewState.Idle); + } + } + void getAllCities() async { + setState(ViewState.Busy); + await _eReferralService.getAllCities(); + if (_eReferralService.hasError) { + error = _eReferralService.error!; + setState(ViewState.Error); + } else{ + setState(ViewState.Idle); + } + } + + void getAllProjects() async { + + } +//Changed By Aamir into Future + Future sendActivationCodeForEReferral(SendActivationCodeForEReferralRequestModel sendActivationCodeForEReferralRequestModel) async { + setState(ViewState.BusyLocal); + await _eReferralService.sendActivationCodeForEReferral(sendActivationCodeForEReferralRequestModel); + if (_eReferralService.hasError) { + error = _eReferralService.error!; + setState(ViewState.ErrorLocal); + } else{ + setState(ViewState.Idle); + } + } + + checkActivationCodeForEReferral(CheckActivationCodeForEReferralResponseModel checkActivationCodeForEReferralRequestModel) async { + setState(ViewState.BusyLocal); + await _eReferralService.checkActivationCodeForEReferral(checkActivationCodeForEReferralRequestModel); + if (_eReferralService.hasError) { + error = _eReferralService.error!; + setState(ViewState.ErrorLocal); + } else{ + setState(ViewState.Idle); + } + } +//Changed by Aamir to Future + Future createEReferral( + CreateEReferralRequestModel createEReferralRequestModel) async { + setState(ViewState.BusyLocal); + await _eReferralService.createEReferral(createEReferralRequestModel); + if (_eReferralService.hasError) { + error = _eReferralService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + getEReferrals(SearchEReferralRequestModel searchEReferralRequestModel) async { + setState(ViewState.BusyLocal); + await _eReferralService.getEReferrals(searchEReferralRequestModel); + if (_eReferralService.hasError) { + error = _eReferralService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModels/ancillary_orders_view_model.dart b/lib/core/viewModels/ancillary_orders_view_model.dart new file mode 100644 index 00000000..51b12087 --- /dev/null +++ b/lib/core/viewModels/ancillary_orders_view_model.dart @@ -0,0 +1,39 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/service/ancillary_orders_service.dart'; +import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_list_model.dart'; +import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart'; + +import '../../locator.dart'; +import 'base_view_model.dart'; + +class AnciallryOrdersViewModel extends BaseViewModel { + bool hasError = false; + + AncillaryOrdersService _ancillaryService = locator(); + + List get ancillaryLists => _ancillaryService.ancillaryLists; + + List get ancillaryListsDetails => _ancillaryService.ancillaryProcLists; + + Future getOrders() async { + hasError = false; + setState(ViewState.Busy); + await _ancillaryService.getOrders(); + if (_ancillaryService.hasError) { + error = _ancillaryService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future getOrdersDetails(appointmentNo, orderNo, projectID) async { + hasError = false; + setState(ViewState.Busy); + await _ancillaryService.getOrdersDetails(appointmentNo, orderNo, projectID); + if (_ancillaryService.hasError) { + error = _ancillaryService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/core/viewModels/appointment_rate_view_model.dart b/lib/core/viewModels/appointment_rate_view_model.dart new file mode 100644 index 00000000..b3cb666c --- /dev/null +++ b/lib/core/viewModels/appointment_rate_view_model.dart @@ -0,0 +1,72 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/rate/appointment_details.dart'; +import 'package:diplomaticquarterapp/core/model/rate/appoitment_rated.dart'; +import 'package:diplomaticquarterapp/core/service/appointment_rate_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../locator.dart'; + +class AppointmentRateViewModel extends BaseViewModel { + AppointmentRateService _appointmentRateService = locator(); + bool isHaveAppointmentNotRate = false; + + AppointmentDetails get appointmentDetails => _appointmentRateService.appointmentDetails!; + + Future getIsLastAppointmentRatedList(int languageID) async { + isHaveAppointmentNotRate = false; + setState(ViewState.Busy); + await _appointmentRateService.getIsLastAppointmentRatedList(languageID); + if (_appointmentRateService.hasError) { + error = _appointmentRateService.error!; + setState(ViewState.Error); + } else { + if (_appointmentRateService.appointmentRatedList.length > 0) await getAppointmentDetails(); + } + } + + getAppointmentDetails() async { + await _appointmentRateService.getAppointmentDetails(); + if (_appointmentRateService.hasError) { + error = _appointmentRateService.error!; + setState(ViewState.Error); + } else { + if (_appointmentRateService.appointmentDetails != null) isHaveAppointmentNotRate = true; + setState(ViewState.Idle); + } + } + + Future sendAppointmentRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note, int languageID) async { + setState(ViewState.Busy); + await _appointmentRateService.sendAppointmentRate(rate, appointmentNo, projectID, doctorID, clinicID, note, languageID); + if (_appointmentRateService.hasError) { + error = _appointmentRateService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + _appointmentRateService.deleteAllAppAppointmentRate(); + } + } + + Future sendDoctorRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note, String appoDate, String docName, String projectName, String clinicName) async { + setState(ViewState.Busy); + await _appointmentRateService.sendDoctorRate(rate, appointmentNo, projectID, doctorID, clinicID, note, appoDate, docName, projectName, clinicName); + if (_appointmentRateService.hasError) { + error = _appointmentRateService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + _appointmentRateService.deleteAllAppAppointmentRate(); + } + } + + AppoitmentRated get lastAppointmentRated => _appointmentRateService.lastAppointmentRated; + + deleteAppointmentRated(AppoitmentRated appointmentRated) => _appointmentRateService.deleteAppointmentRated(appointmentRated); + + deleteAppAppointmentRate() => _appointmentRateService.deleteAllAppAppointmentRate(); + + setIsRated(bool isRated) { + this.isHaveAppointmentNotRate = isRated; + notifyListeners(); + } +} diff --git a/lib/core/viewModels/base_view_model.dart b/lib/core/viewModels/base_view_model.dart new file mode 100644 index 00000000..2efae385 --- /dev/null +++ b/lib/core/viewModels/base_view_model.dart @@ -0,0 +1,62 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:flutter/material.dart'; + +import '../../locator.dart'; + +class BaseViewModel extends ChangeNotifier { + ViewState _state = ViewState.Idle; + bool isInternetConnection = true; + bool isLogin = false; + + ViewState get state => _state; + + String error = ""; + String languageID = "en"; + + late AuthenticatedUser user; + AppSharedPreferences sharedPref = AppSharedPreferences(); + AuthenticatedUserObject authenticatedUserObject = locator(); + + void setState(ViewState viewState) { + _state = viewState; + + if (viewState == ViewState.Busy || viewState == ViewState.BusyLocal) error = ""; + + if (hasListeners) notifyListeners(); + } + + setUser(AuthenticatedUser user) { + this.user = user; + notifyListeners(); + } + + BaseViewModel() { + //authenticatedUserObject.getUser(); + user = authenticatedUserObject.user!; + this.isLogin = authenticatedUserObject.isLogin; + } + + _getUser() async { + var userData = await sharedPref.getObject(USER_PROFILE); + if (userData != null) user = AuthenticatedUser.fromJson(userData); + + var isLogin = await sharedPref.getString(LOGIN_TOKEN_ID); + this.isLogin = isLogin != null; + + notifyListeners(); + } + + Future getSavedLanguage() async { + languageID = await sharedPref.getString(APP_LANGUAGE); + } + + @override + void dispose() { + removeListener(() {}); + super.dispose(); + } +} diff --git a/lib/core/viewModels/blooddonation/blood_details_view_model.dart b/lib/core/viewModels/blooddonation/blood_details_view_model.dart new file mode 100644 index 00000000..028be89a --- /dev/null +++ b/lib/core/viewModels/blooddonation/blood_details_view_model.dart @@ -0,0 +1,28 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart'; +import 'package:diplomaticquarterapp/core/service/blood/blood_details_servies.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class BloodDeatailsViewModel extends BaseViewModel{ + + + BloodDetailsService _bloodDetailsService =locator(); + List get BloodDetailsModelList => _bloodDetailsService.BloodModelList;//_bloodDonationService.CitiesModelList; + + + Future getBlood() async { + setState(ViewState.Busy); + await _bloodDetailsService .getAllBloodOrders();; + + if (_bloodDetailsService.hasError) { + error = _bloodDetailsService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + + +} \ No newline at end of file diff --git a/lib/core/viewModels/blooddonation/booddonation_view_model.dart b/lib/core/viewModels/blooddonation/booddonation_view_model.dart new file mode 100644 index 00000000..9c765d3e --- /dev/null +++ b/lib/core/viewModels/blooddonation/booddonation_view_model.dart @@ -0,0 +1,24 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; +import 'package:diplomaticquarterapp/core/service/blood/blood_donation_service.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class BloodDonationViewModel extends BaseViewModel{ + + + + BloodDonationService _bloodDonationService =locator(); + List get CitiesModelList => _bloodDonationService.CitiesModelList; + Future getCities() async { + setState(ViewState.Busy); + await _bloodDonationService.getAllCitiesOrders(); + // getHospitals(); + if (_bloodDonationService.hasError) { + error = _bloodDonationService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } +} \ No newline at end of file diff --git a/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart b/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart new file mode 100644 index 00000000..c8068a5d --- /dev/null +++ b/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart @@ -0,0 +1,40 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; +import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart'; +import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + + +class AddNewChildViewModel extends BaseViewModel { + + CreteNewBabyService _creteNewBabyService = locator(); + ChildVaccinesService _childVaccinesService = locator(); + // DeleteBabyService _deleteBabyService = locator(); + bool isAdded = false; + ///create new baby + createNewBabyOrders({ required CreateNewBaby newChild}) async { + setState(ViewState.Busy); + await _creteNewBabyService.getCreateNewBabyOrders(newChild: newChild, userID: _childVaccinesService.userID); + if (_creteNewBabyService.hasError) { + error = _creteNewBabyService.error!; + setState(ViewState.Error); + } else { + isAdded = true; + setState(ViewState.Idle); + await _childVaccinesService.getAllBabyInformationOrders(); + if (_childVaccinesService.hasError) { + error = _childVaccinesService.error!; + setState(ViewState.Error); + } else{ + + } + } + } + + + + + +} diff --git a/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart b/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart new file mode 100644 index 00000000..6c9aad1b --- /dev/null +++ b/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart @@ -0,0 +1,71 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart'; +//======== +import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart'; +import 'package:diplomaticquarterapp/core/service/childvaccines/child_vaccines_service.dart'; +import 'package:diplomaticquarterapp/core/service/childvaccines/delete_baby_service.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class ChildVaccinesViewModel extends BaseViewModel{ + ChildVaccinesService _childVaccinesService = locator(); + + List get babyInformationModelList=> _childVaccinesService.babyInformationModelList; + + +//=========== + CreteNewBabyService _creteNewBabyService = locator(); + + DeleteBabyService _deleteBabyService = locator(); + bool isAdded = false; + bool isDeleted = false; + //============ + + + getNewUserOrders() async { + setState(ViewState.Busy); + await _childVaccinesService.getNewUserOrders(); + if (_childVaccinesService.hasError) { + error = _childVaccinesService.error!; + setState(ViewState.Error); + } else + getBabyInformatioRequestOrders(); + } + + getBabyInformatioRequestOrders() async { + await _childVaccinesService.getAllBabyInformationOrders(); + if (_childVaccinesService.hasError) { + error = _childVaccinesService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + + + ///delete baby + deleteBabyOrders({ required DeleteBaby newChild}) async { + setState(ViewState.Busy); + //await _creteNewBabyService.getCreateNewBabyOrders(newChild: newChild, userID: _childVaccinesService.userID); + await _deleteBabyService.getDeleteBabyOrder(deleteChild: newChild,babyID: newChild.babyID); + //getDeleteBabyOrder(deleteChild: newChild,); + // getDeleteBabyOrder + if (_creteNewBabyService.hasError) { + error = _creteNewBabyService.error!; + setState(ViewState.Error); + } else { + isDeleted = true; + setState(ViewState.Idle); + await _childVaccinesService.getAllBabyInformationOrders(); + if (_childVaccinesService.hasError) { + error = _childVaccinesService.error!; + setState(ViewState.Error); + } else{ + + } + } + } + +} \ No newline at end of file diff --git a/lib/core/viewModels/child_vaccines/user_information_view_model.dart b/lib/core/viewModels/child_vaccines/user_information_view_model.dart new file mode 100644 index 00000000..43bbde60 --- /dev/null +++ b/lib/core/viewModels/child_vaccines/user_information_view_model.dart @@ -0,0 +1,24 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; +import 'package:diplomaticquarterapp/core/service/childvaccines/user_information_service.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class UserInformationViewModel extends BaseViewModel { + UserInformationService _userInformationService = + locator(); + + List get userInformationModelList => + _userInformationService.userInformationModelList; + + getUserInformationRequestOrders() async { + setState(ViewState.Busy); + await _userInformationService.getUserInformationOrders(); + if (_userInformationService.hasError) { + error = _userInformationService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart b/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart new file mode 100644 index 00000000..f1af0baf --- /dev/null +++ b/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart @@ -0,0 +1,27 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/create_vaccination_table.dart'; +import 'package:diplomaticquarterapp/core/service/childvaccines/vaccination_table_service.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + + +class VaccinationTableViewModel extends BaseViewModel{ + + VaccinationTableService _creteVaccinationTableService = locator(); + List get creteVaccinationTableModelList=> _creteVaccinationTableService.createVaccinationTableModelList; + + getCreateVaccinationTable(List_BabyInformationModel babyInfo, bool sendEmail) async { + setState(ViewState.Busy); + + await _creteVaccinationTableService.getCreateVaccinationTableOrders(babyInfo, sendEmail);//getCreateNewBabyOrders(); + + if ( _creteVaccinationTableService.hasError) { + error = _creteVaccinationTableService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + +} diff --git a/lib/core/viewModels/contactus/findus_view_model.dart b/lib/core/viewModels/contactus/findus_view_model.dart new file mode 100644 index 00000000..f6e1754f --- /dev/null +++ b/lib/core/viewModels/contactus/findus_view_model.dart @@ -0,0 +1,31 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; +import 'package:diplomaticquarterapp/core/service/contactus/finadus_service.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class FindusViewModel extends BaseViewModel { + FindusService _findusService = locator(); + + List get FindusModelList => + _findusService.FindusModelList; + + List get FindusHospitalModelList=> + _findusService.FindusHospitalModelList; + + List get FindusPharmaciesModelList=> + _findusService.FindusPharmaciesModelList; + + getFindUsRequestOrders() async { + setState(ViewState.Busy); + + await _findusService.getAllFindUsOrders(); + + if (_findusService.hasError) { + error = _findusService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/core/viewModels/contactus/livechat_view_model.dart b/lib/core/viewModels/contactus/livechat_view_model.dart new file mode 100644 index 00000000..76b70ab5 --- /dev/null +++ b/lib/core/viewModels/contactus/livechat_view_model.dart @@ -0,0 +1,34 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/contactus/get_patientI_cprojects.dart'; +import 'package:diplomaticquarterapp/core/service/contactus/livechat_service.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + + +class LiveChatViewModel extends BaseViewModel{ + + + + LiveChatService _liveChatService =locator(); + + List get LiveChatModelList=> + + _liveChatService.LivechatModelList; + + + getLiveChatRequestOrders() async { + setState(ViewState.Busy); + + await _liveChatService.getAllLiveChatOrders(); + + if (_liveChatService.hasError) { + error = _liveChatService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + + +} \ No newline at end of file diff --git a/lib/core/viewModels/dashboard_view_model.dart b/lib/core/viewModels/dashboard_view_model.dart new file mode 100644 index 00000000..b3b85269 --- /dev/null +++ b/lib/core/viewModels/dashboard_view_model.dart @@ -0,0 +1,35 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../locator.dart'; + +class DashboardViewModel extends BaseViewModel { + VitalSignService _vitalSignService = locator(); + + String get weightKg => _vitalSignService.weightKg; + + String get heightCm => _vitalSignService.heightCm; + String booldType = "-"; + + DashboardViewModel() { + // this.getPatientRadOrders(); + } + + getPatientRadOrders() async { + if (isLogin && _vitalSignService.weightKg.isEmpty) { + setState(ViewState.Busy); + await _vitalSignService.getPatientRadOrders(); + booldType = await sharedPref.getString(BLOOD_TYPE) ?? "-"; + + if (_vitalSignService.hasError) { + error = _vitalSignService.error!; + setState(ViewState.ErrorLocal); + } else { + booldType = await sharedPref.getString(BLOOD_TYPE) ?? "-"; + setState(ViewState.Idle); + } + } + } +} diff --git a/lib/core/viewModels/er/EdOnlineViewModel.dart b/lib/core/viewModels/er/EdOnlineViewModel.dart new file mode 100644 index 00000000..015d97f4 --- /dev/null +++ b/lib/core/viewModels/er/EdOnlineViewModel.dart @@ -0,0 +1,65 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/er/ErPatientShareModel.dart'; +import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/service/er/EdOnlineServices.dart'; +import 'package:diplomaticquarterapp/core/service/hospital_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../../locator.dart'; + +class EdOnlineViewModel extends BaseViewModel { + HospitalService _hospitalService = locator(); + + EdOnlineServices _edOnlineServices = locator(); + + List get hospitals => _hospitalService.hospitals; + + List get triageQuestionsModelList => _edOnlineServices.triageQuestionsModelList; + + ErPatientShareModel? get erPatientShareModel => _edOnlineServices.erPatientShareModel; + + Future getHospitals(int languageID) async { + if(_hospitalService.hospitals.isEmpty){ + setState(ViewState.Busy); + await _hospitalService.getHospitals(languageID); + if (_hospitalService.hasError) { + error = _hospitalService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + } + + Future getQuestions() async { + if (_edOnlineServices.triageQuestionsModelList.isEmpty) { + setState(ViewState.Busy); + await _edOnlineServices.getQuestions(); + if (_edOnlineServices.hasError) { + error = _edOnlineServices!.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + } + + Future getPatientPaymentInformation({var id}) async { + setState(ViewState.Busy); + await _edOnlineServices.getPatientPaymentInformation(); + if (_edOnlineServices.hasError) { + error = _edOnlineServices.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + Future saveQuestionsInformation({String? notes, String? chiefComplaint, int? projectId, DateTime? selectedTime, List? selectedQuestions}) async { + setState(ViewState.BusyLocal); + await _edOnlineServices.saveQuestionsInformation(notes: notes, projectId: projectId, chiefComplaint: chiefComplaint, selectedTime: selectedTime, selectedQuestions: selectedQuestions); + if (_edOnlineServices.hasError) { + error = _edOnlineServices.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/core/viewModels/er/am_request_view_model.dart b/lib/core/viewModels/er/am_request_view_model.dart new file mode 100644 index 00000000..aa2a01b2 --- /dev/null +++ b/lib/core/viewModels/er/am_request_view_model.dart @@ -0,0 +1,124 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/er/AmbulanceRequestOrdersModel.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; +import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart'; +import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/service/er/am_service.dart'; +import 'package:diplomaticquarterapp/core/service/hospital_service.dart'; +import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:flutter/cupertino.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class AmRequestViewModel extends BaseViewModel { + AmService _amService = locator(); + HospitalService _hospitalService = locator(); + MedicalService _medicalService = locator(); + + List get amRequestModeList => _amService.amModelList; + + List get patientAllPresOrdersList => _amService.patientAllPresOrdersList; + + List get appoitmentAllHistoryResultList => _medicalService.appoitmentAllHistoryResultList; + + List get patientAmbulanceRequestOrdersList => _amService.patientAmbulanceRequestOrdersList; + + List get hospitals => _hospitalService.hospitals; + + bool get hasPendingOrder => _amService.hasPendingOrder; + + PickUpRequestPresOrder? get pickUpRequestPresOrder => _amService.pickUpRequestPresOrder; + + AmbulanceRequestOrdersModel? get pendingAmbulanceRequestOrder => _amService.pendingAmbulanceRequestOrder; + + Future getAppointmentHistory() async { + setState(ViewState.BusyLocal); + await _medicalService.getAppointmentHistory(isActiveAppointment: true); + if (_medicalService.hasError) { + error = _medicalService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future getAmRequestOrders(int languageID) async { + setState(ViewState.Busy); + await _amService.getAllTransportationOrders(); + if (_amService.hasError) { + error = _amService.error!; + setState(ViewState.Error); + } else + getHospitals(languageID); + } + + Future getHospitals(int languageID) async { + setState(ViewState.Busy); + await _hospitalService.getHospitals(languageID, isResBasedOnLoc: false); + if (_hospitalService.hasError) { + error = _hospitalService.error!; + setState(ViewState.Error); + } else + // getPatientAllPresOrdersList(); + await getPatientAllPresOrdersListRC(); + } + + Future getPatientAllPresOrdersListRC() async { + setState(ViewState.Busy); + await _amService.getPatientAllPresOrdersListRC(authenticatedUserObject.user!.patientID); + if (_hospitalService.hasError) { + error = _hospitalService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + Future getPatientAllPresOrdersList() async { + setState(ViewState.Busy); + await _amService.getPatientAllPresOrdersList(); + if (_hospitalService.hasError) { + error = _hospitalService.error!; + setState(ViewState.Error); + } else if (_amService.hasPendingOrder) { + getOrderDetails(); + } else + setState(ViewState.Idle); + } + + Future getOrderDetails() async { + setState(ViewState.Busy); + await _amService.getOrderDetails(); + if (_amService.hasError) { + error = _amService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + Future updatePressOrder({required int presOrderID}) async { + setState(ViewState.Busy); + // await _amService.updatePressOrder(presOrderID: presOrderID); + await _amService.updatePressOrderRC(presOrderID: presOrderID, patientID: authenticatedUserObject.user!.patientID!); + if (_amService.hasError) { + error = _amService.error!; + setState(ViewState.Error); + } else + getPatientAllPresOrdersListRC(); + } + + Future insertERPressOrder({required PatientER_RC patientER}) async { + setState(ViewState.Busy); + await _amService.insertERPressOrder(patientER: patientER); + if (_amService.hasError) { + error = _amService.error!; + setState(ViewState.ErrorLocal); + } else + // getAmRequestOrders(); + + await getPatientAllPresOrdersListRC(); + } +} diff --git a/lib/core/viewModels/er/near_hospital_view_model.dart b/lib/core/viewModels/er/near_hospital_view_model.dart new file mode 100644 index 00000000..2f597568 --- /dev/null +++ b/lib/core/viewModels/er/near_hospital_view_model.dart @@ -0,0 +1,29 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart'; +import 'package:diplomaticquarterapp/core/service/er/er_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../../locator.dart'; + +class NearHospitalViewModel extends BaseViewModel { + ErService _erService = locator(); + + List get ProjectAvgERWaitingTimeModeList => + _erService.projectAvgERWaitingTimeModelList; + + getProjectAvgERWaitingTimeOrders({int? id, int? projectID}) async { + setState(ViewState.Busy); + + if (id != null && projectID != null) { + await _erService.getProjectAvgERWaitingTimeOrders( + id: id, projectID: projectID); + } else { + await _erService.getProjectAvgERWaitingTimeOrders(); + } + if (_erService.hasError) { + error = _erService.error!; + setState(ViewState.Error); + } else + 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..96c0436d --- /dev/null +++ b/lib/core/viewModels/er/rrt-view-model.dart @@ -0,0 +1,253 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/rrt/RRTProcedureList.dart'; +import 'package:diplomaticquarterapp/models/rrt/service_price.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/pharmacyAddress_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; + +import '../base_view_model.dart'; + +class RRTService extends BaseService {} + +class _RRTServiceData { + List pendingOrders = []; + List completedOrders = []; + ServicePrice servicePrice = ServicePrice(); + +// RRTProcedureList rrtProcedureList; +} + +class RRTViewModel extends BaseViewModel { + var _service = RRTService(); + late int createdRequestNo; + var _pharmacy_service = locator(); + var _pharmacy_address_service = locator(); + CustomerAddressesService _customerAddressesService = locator(); + List rrtProcedureList = []; + + List get addressesList => _customerAddressesService.addressesList; + + _RRTServiceData rrtServiceData = _RRTServiceData(); + + Future<_RRTServiceData> loadRequiredData(int languageID) async { + // await getServicePrice(); + // await getAllOrders(); + await getProcedureDetails(languageID); + await getAllOrdersRC(); + // getProcedureDetails(); + return rrtServiceData; + } + + Future createOrder(Map body) async { + body['IdentificationNo'] = user!.patientIdentificationNo; + body['NationalityID'] = user!.nationalityID; + body['CreatedBy'] = user!.patientIdentificationType; + body['OrderServiceID'] = 5; + var localRes; + int requestNo; + await _service.baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER, body: body, onSuccess: (response, statusCode) { + requestNo = response['RequestNo']; + return requestNo; + }, onFailure: (error, statusCode) { + AppToast.showErrorToast(message: error); + return error; + }); + } + + Future createOrderRC(Map body) async { + // body['IdentificationNo'] = user.patientIdentificationNo; + // body['NationalityID'] = user.nationalityID; + // body['CreatedBy'] = user.patientIdentificationType; + // body['OrderServiceID'] = 5; + var localRes; + + await _service.baseAppClient.post(ADD_RRT_ORDER_RC, isRCService: true, body: body, onSuccess: (response, statusCode) { + createdRequestNo = response['response']; + Future.value(createdRequestNo); + }, onFailure: (error, statusCode) { + AppToast.showErrorToast(message: error); + return error; + }); + } + + // Service ID: 4 == RRT + Future<_RRTServiceData> getAllOrders() async { + await _service.baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, body: {}, onSuccess: (response, statusCode) { + var data = response["PatientER_GetPatientAllPresOrdersList"]; + rrtServiceData.completedOrders.clear(); + rrtServiceData.pendingOrders.clear(); + if (data != null && data is List) { + data.forEach((json) { + if (json["ServiceID"] == 5) { + if (json["Status"] == 1 || json["Status"] == 2) { + // Pending + rrtServiceData.pendingOrders.add(GetCMCAllOrdersResponseModel.fromJson(json)); + } + rrtServiceData.completedOrders.add(GetCMCAllOrdersResponseModel.fromJson(json)); + } + }); + } + }, onFailure: (error, statusCode) { + AppToast.showErrorToast(message: error); + }); + return rrtServiceData; + } + + Future<_RRTServiceData> getAllOrdersRC() async { + await _service.baseAppClient.post(GET_ALL_RRT_ORDERS_RC, isRCService: true, body: {}, onSuccess: (response, statusCode) { + var data = response["response"]; + rrtServiceData.completedOrders.clear(); + rrtServiceData.pendingOrders.clear(); + if (data != null && data is List) { + data.forEach((json) { + if (json["StatusId"] == 1 || json["StatusId"] == 2) { + // Pending + rrtServiceData.pendingOrders.add(GetCMCAllOrdersResponseModel.fromJson(json)); + } + rrtServiceData.completedOrders.add(GetCMCAllOrdersResponseModel.fromJson(json)); + }); + } + }, onFailure: (error, statusCode) { + AppToast.showErrorToast(message: error); + }); + return rrtServiceData; + } + + Future<_RRTServiceData> getProcedureDetails(int languageID) async { + DoctorsListService service = new DoctorsListService(); + await service.getRRTProcedures(15, languageID).then((res) { + rrtProcedureList.clear(); + var data = res["Vida_ProcedureList"]; + data.forEach((json) { + rrtProcedureList.add(VidaProcedureList.fromJson(json)); + }); + print(rrtProcedureList.length); + }).catchError((err) { + AppToast.showErrorToast(message: err); + print(err); + }); + return rrtServiceData; + } + + Future getOrderDetails() async { + return null; + } + + Future getAllQuestions() async { + dynamic response_; + await _service.baseAppClient.post(GET_ALL_RRT_QUESTIONS, body: {}, onSuccess: (response, statusCode) { + response_ = response; + }, onFailure: (error, statusCode) { + AppToast.showErrorToast(message: error); + }); + return response_; + } + + Future getServicePrice() async { + Map body = {"IdentificationNo": user!.patientIdentificationNo}; + ServicePrice servicePrice; + await _service.baseAppClient.post(GET_RRT_SERVICE_PRICE, body: body, onSuccess: (response, statusCode) { + var data = response['PatientE_RealRRT_GetServicePriceList']; + if (data != null && data is List) { + var priceData = data.first; + if (priceData != null) { + servicePrice = ServicePrice.fromJson(priceData); + rrtServiceData.servicePrice = servicePrice; + return servicePrice; + } + } + + }, onFailure: (error, statusCode) { + AppToast.showErrorToast(message: error); + return error; + }); + } + + Future cancelOrder(PrescriptionsOrder order, {String reason = ""}) async { + var body = {"PresOrderID": order.iD, "PresOrderStatus": 4, "EditedBy": 3, "RejectionReason": reason}; + var success = false; + await _service.baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER, body: body, onSuccess: (response, statusCode) { + success = true; + rrtServiceData.pendingOrders.remove(order); + }, onFailure: (error, statusCode) { + AppToast.showErrorToast(message: error); + success = false; + }); + return Future.value(success); + } + + Future cancelOrderRC(GetCMCAllOrdersResponseModel order, {String reason = ""}) async { + Map body = {"Id": order.iD, "ClickButton": 14}; + var success = false; + await _service.baseAppClient.post(UPDATE_RRT_ORDER_RC, isRCService: true, body: body, onSuccess: (response, statusCode) { + success = true; + rrtServiceData.pendingOrders.remove(order); + }, onFailure: (error, statusCode) { + AppToast.showErrorToast(message: error); + success = false; + }); + return Future.value(success); + } + + Future?> getAddresses() async { + Object error; + try { + var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN); + if (token == null) await _pharmacy_service.generatePharmacyToken(); + + await _pharmacy_service.makeVerifyCustomer({'PatientID': user!.patientID.toString()}); + await _pharmacy_address_service.getAddresses(); + return _pharmacy_address_service.addresses; + } catch (e) { + error = e; + } + Future.error(error); + } + + Future getCustomerAddresses() async { + setState(ViewState.Busy); + await _customerAddressesService.getCustomerAddresses(); + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future getCustomerInfo() async { + setState(ViewState.Busy); + await _pharmacy_service.generatePharmacyToken(); + + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error!; + await _pharmacy_service.createUser(); + setState(ViewState.ErrorLocal); + } else { + await _pharmacy_service.createUser(); + if (!_pharmacy_service.hasError) await getCustomerAddresses(); + } + + // setState(ViewState.Busy); + // await _pharmacy_service.generatePharmacyToken(); + // if (_customerAddressesService.hasError) { + // error = _customerAddressesService.error; + // await _pharmacy_service.createUser(); + // await getCustomerAddresses(); + // setState(ViewState.ErrorLocal); + // } else { + // await _customerAddressesService.getCustomerInfo(); + // await getCustomerAddresses(); + // } + } +} diff --git a/lib/core/viewModels/feedback/feedback_view_model.dart b/lib/core/viewModels/feedback/feedback_view_model.dart new file mode 100644 index 00000000..a064b5ea --- /dev/null +++ b/lib/core/viewModels/feedback/feedback_view_model.dart @@ -0,0 +1,63 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; +import 'package:diplomaticquarterapp/core/service/feedback/feedback_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; + +import '../../../locator.dart'; + +enum MessageType { ComplaintOnAnAppointment, ComplaintWithoutAppointment, Question, Compliment, Suggestion, NON } + +class FeedbackViewModel extends BaseViewModel { + FeedbackService _feedbackService = locator(); + + List get cOCItemList => _feedbackService.cOCItemList; + + List get appointHistoryList => _feedbackService.appointHistoryList; + + Future sendCOCItem({String? title, String? details, String? cOCTypeName, String? attachment, AppoitmentAllHistoryResultList? appointHistory}) async { + setState(ViewState.BusyLocal); + await _feedbackService.sendCOCItem(title: title, details: details, cOCTypeName: cOCTypeName, attachment: attachment, appointHistory: appointHistory); + if (_feedbackService.hasError) { + error = _feedbackService.error!; + setState(ViewState.ErrorLocal); + return false; + } else { + setState(ViewState.Idle); + return true; + } + } + + getCOC() async { + setState(ViewState.Busy); + await _feedbackService.getStatusCOC(); + if (_feedbackService.hasError) { + error = _feedbackService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + searchFeedback(String countryCode, String phoneNumber, int type, String idNumber) async { + setState(ViewState.Busy); + await _feedbackService.searchFeedback(countryCode, phoneNumber, type, idNumber); + if (_feedbackService.hasError) { + error = _feedbackService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getPatentAppointmentHistory() async { + setState(ViewState.Busy); + await _feedbackService.getPatentAppointmentHistory(); + if (_feedbackService.hasError) { + error = _feedbackService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModels/hospital_view_model.dart b/lib/core/viewModels/hospital_view_model.dart new file mode 100644 index 00000000..61957bbd --- /dev/null +++ b/lib/core/viewModels/hospital_view_model.dart @@ -0,0 +1,22 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/service/hospital_service.dart'; + +import '../../locator.dart'; +import 'base_view_model.dart'; + +class HospitalViewModel extends BaseViewModel { + HospitalService _hospitalService = locator(); + + List get hospitals => _hospitalService.hospitals; + + Future getHospitals(int languageID) async { + setState(ViewState.Busy); + await _hospitalService.getHospitals(languageID); + if (_hospitalService.hasError) { + error = _hospitalService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/core/viewModels/insurance_card_View_model.dart b/lib/core/viewModels/insurance_card_View_model.dart new file mode 100644 index 00000000..00997eb5 --- /dev/null +++ b/lib/core/viewModels/insurance_card_View_model.dart @@ -0,0 +1,86 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.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'; +import 'package:diplomaticquarterapp/core/service/insurance_service.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:flutter/material.dart'; + +import '../../locator.dart'; +import 'base_view_model.dart'; + +class InsuranceViewModel extends BaseViewModel { + bool hasError = false; + + InsuranceCardService _insuranceCardService = locator(); + + List get insurance => _insuranceCardService.cardList; + + List get insuranceUpdate => + _insuranceCardService.updatedCard; + + List get insuranceApproval => + _insuranceCardService.insuranceApproval; + + GetAllSharedRecordsByStatusResponse get getAllSharedRecordsByStatusResponse => + _insuranceCardService.getAllSharedRecordsByStatusResponse; + + Future getInsurance() async { + hasError = false; + _insuranceCardService.clearInsuranceCard(); + setState(ViewState.Busy); + await _insuranceCardService.getInsurance(); + if (_insuranceCardService.hasError) { + error = _insuranceCardService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future getInsuranceUpdated() async { + hasError = false; + //_insuranceCardService.clearInsuranceCard(); + setState(ViewState.Busy); + await _insuranceCardService.getInsuranceUpdate(); + if (_insuranceCardService.hasError) { + error = _insuranceCardService.error!; + setState(ViewState.ErrorLocal); + } else + getFamilyFiles(); + } + + Future getInsuranceApproval({ int? appointmentNo}) async { + hasError = false; + //_insuranceCardService.clearInsuranceCard(); + setState(ViewState.Busy); + if (appointmentNo != null) + await _insuranceCardService.getInsuranceApproval( + appointmentNo: appointmentNo); + else + await _insuranceCardService.getInsuranceApproval(); + if (_insuranceCardService.hasError) { + error = _insuranceCardService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future getFamilyFiles() async { + await _insuranceCardService.getSharedRecordByStatus(); + if (_insuranceCardService.hasError) { + error = _insuranceCardService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + Future uploadInsuranceCard(BuildContext context, {String? patientIdentificationID, int? patientID,String image =""}) async { + setState(ViewState.BusyLocal); + await _insuranceCardService.uploadInsuranceCard(context, patientIdentificationID: patientIdentificationID,patientID: patientID,image: image); + if (_insuranceCardService.hasError) { + error = _insuranceCardService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + +} diff --git a/lib/core/viewModels/medical/ActiveMedicationsViewModel.dart b/lib/core/viewModels/medical/ActiveMedicationsViewModel.dart new file mode 100644 index 00000000..23a6a33e --- /dev/null +++ b/lib/core/viewModels/medical/ActiveMedicationsViewModel.dart @@ -0,0 +1,28 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/active_medications/ActivePrescriptionReport.dart'; +import 'package:diplomaticquarterapp/core/service/medical/ActiveMedicationsService.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; + +class ActiveMedicationsViewModel extends BaseViewModel { + ActiveMedicationsService _activeMedicationsService = + locator(); + + List get activePrescriptionReport => + _activeMedicationsService.activePrescriptionReport; + + getActiveMedication() async { + setState(ViewState.Busy); + await _activeMedicationsService.getActiveMedication(); + if (_activeMedicationsService.hasError) { + error = _activeMedicationsService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + + + +} diff --git a/lib/core/viewModels/medical/AllergiesViewModel.dart b/lib/core/viewModels/medical/AllergiesViewModel.dart new file mode 100644 index 00000000..f3b19a2c --- /dev/null +++ b/lib/core/viewModels/medical/AllergiesViewModel.dart @@ -0,0 +1,22 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/Allergy/Allergy.dart'; +import 'package:diplomaticquarterapp/core/service/medical/AllergiesService.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../../locator.dart'; + +class AllergiesViewModel extends BaseViewModel { + AllergiesService _allergiesService = locator(); + List get allergies => _allergiesService.allergies; + + getAllergies() async { + setState(ViewState.Busy); + await _allergiesService.getAllergies(); + if (_allergiesService.hasError) { + error = _allergiesService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModels/medical/EyeViewModel.dart b/lib/core/viewModels/medical/EyeViewModel.dart new file mode 100644 index 00000000..4c5af31d --- /dev/null +++ b/lib/core/viewModels/medical/EyeViewModel.dart @@ -0,0 +1,80 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart'; +import 'package:diplomaticquarterapp/core/model/eye/AppointmentFilter.dart'; +import 'package:diplomaticquarterapp/core/service/medical/EyeService.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; + +class EyeViewModel extends BaseViewModel { + EyeService _eyeService = locator(); + + List get appoimentAllHistoryResultList => + _eyeService.appoimentAllHistoryResultList; + + List appointmentFilter =[]; + + getEyeMeasurement() async { + setState(ViewState.Busy); + await _eyeService.getEyeMeasurement(); + if (_eyeService.hasError) { + error = _eyeService.error!; + setState(ViewState.Error); + } else { + if (_eyeService.appoimentAllHistoryResultList.length == 0) { + new AppToast().backWithEmpty(); + } else { + _eyeService.appoimentAllHistoryResultList.forEach((element) { + List _appointmentFilter = appointmentFilter + .where( + (elementFilter) => + elementFilter.filterName == element.projectName, + ) + .toList(); + + if (_appointmentFilter.length != 0) { + appointmentFilter[appointmentFilter.indexOf(_appointmentFilter[0])] + .appointmentAllHistoryResultList + .add(element); + } else { + appointmentFilter.add(AppointmentFilter( + element, + element.projectName!, + )); + } + }); + } + setState(ViewState.Idle); + } + } + + sendGlassesPrescriptionEmail( + {required int appointmentNo, required String projectName, required int projectID}) async { + setState(ViewState.Busy); + await _eyeService.sendGlassesPrescriptionEmail( + appointmentNo: appointmentNo, + projectID: projectID, + projectName: projectName); + if (_eyeService.hasError) { + error = _eyeService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + sendContactLensPrescriptionEmail( + {required int appointmentNo, required String projectName, required int projectID}) async { + setState(ViewState.Busy); + await _eyeService.sendContactLensPrescriptionEmail( + appointmentNo: appointmentNo, + projectID: projectID, + projectName: projectName); + if (_eyeService.hasError) { + error = _eyeService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModels/medical/PrescriptionDeliveryViewModel.dart b/lib/core/viewModels/medical/PrescriptionDeliveryViewModel.dart new file mode 100644 index 00000000..d8b59ef7 --- /dev/null +++ b/lib/core/viewModels/medical/PrescriptionDeliveryViewModel.dart @@ -0,0 +1,55 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/service/PrescriptionDeliveryService.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../../locator.dart'; + +class PrescriptionDeliveryViewModel extends BaseViewModel { + CustomerAddressesService _customerAddressesService = locator(); + PharmacyModuleService _pharmacyModuleService = locator(); + PrescriptionDeliveryService _prescriptionDeliveryService = locator(); + + List get addressesList => _customerAddressesService.addressesList; + + Future getCustomerInfo() async { + setState(ViewState.Busy); + await _pharmacyModuleService.generatePharmacyToken().then((value) async { + // await _customerAddressesService.getCustomerInfo(); + // await _customerAddressesService.getCustomerInfo(); + await _pharmacyModuleService.createUser().then((value) async { + await getCustomerAddresses(); + }); + }); + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error!; + setState(ViewState.ErrorLocal); + } else {} + } + + Future insertDeliveryOrder({int? lineItemNo, double? latitude, double? longitude, int? appointmentNo, int? createdBy, int? dischargeID, int? projectID}) async { + setState(ViewState.BusyLocal); + // await _prescriptionDeliveryService.insertDeliveryOrder( + // lineItemNo: lineItemNo, latitude: latitude, longitude: longitude, appointmentNo: appointmentNo, createdBy: createdBy, dischargeID: dischargeID); + await _prescriptionDeliveryService.insertDeliveryOrderRC( + latitude: latitude, longitude: longitude, appointmentNo: appointmentNo, createdBy: createdBy, dischargeID: dischargeID, projectID: projectID); + if (_prescriptionDeliveryService.hasError) { + error = _prescriptionDeliveryService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future getCustomerAddresses() async { + setState(ViewState.Busy); + await _customerAddressesService.getCustomerAddresses(); + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModels/medical/ask_doctor_view_model.dart b/lib/core/viewModels/medical/ask_doctor_view_model.dart new file mode 100644 index 00000000..f254c915 --- /dev/null +++ b/lib/core/viewModels/medical/ask_doctor_view_model.dart @@ -0,0 +1,110 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/ask_doctor/AskDoctorReqTypes.dart'; +import 'package:diplomaticquarterapp/core/model/ask_doctor/DoctorResponse.dart'; +import 'package:diplomaticquarterapp/core/service/medical/ask_doctor_services.dart'; +import 'package:diplomaticquarterapp/core/service/medical/my_doctor_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; + +class AskDoctorViewModel extends BaseViewModel { + AskDoctorService _askDoctorService = locator(); + MyDoctorService _myDoctorService = locator(); + + List patientDoctorAppointmentListHospital = []; + + List get askDoctorReqTypes => _askDoctorService.askDoctorReqTypes; + + List get doctorResponseList => _askDoctorService.doctorResponseList; + + Future getMyDoctor() async { + setState(ViewState.Busy); + await _myDoctorService.getPatientDoctorAppointmentList(top: 25, beforeDays: 15); + if (_myDoctorService.hasError) { + error = _myDoctorService.error!; + setState(ViewState.Error); + } else if (_myDoctorService.patientDoctorAppointmentList.length != 0) { + _myDoctorService.patientDoctorAppointmentList.forEach((element) { + if (!element.isLiveCareClinic!) { + List doctorByClinic = patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.projectName).toList(); + + if (doctorByClinic.length != 0) { + patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByClinic[0])].patientDoctorAppointmentList!.add(element); + } else { + patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(filterName: element.projectName, patientDoctorAppointment: element)); + } + } + setState(ViewState.Idle); + }); + } else { + setState(ViewState.Idle); + // AppToast.showErrorToast(message: TranslationBase.of(AppGlobal.context).askDocEmpty); + } + } + + Future getCallRequestTypeLOVs() async { + setState(ViewState.Busy); + await _askDoctorService.getCallRequestTypeLOV(); + if (_askDoctorService.hasError) { + error = _askDoctorService.error!; + setState(ViewState.ErrorLocal); + AppToast.showErrorToast(message: error); + } else + setState(ViewState.Idle); + } + + Future getQuestionTypes() async { + setState(ViewState.Busy); + await _askDoctorService.getQuestionTypes(); + if (_askDoctorService.hasError) { + error = _askDoctorService.error!; + setState(ViewState.ErrorLocal); + AppToast.showErrorToast(message: error); + } else + setState(ViewState.Idle); + } + + Future getCallInfoHoursResult({required int projectId, required int doctorId}) async { + setState(ViewState.Busy); + await _askDoctorService.getCallInfoHoursResult(projectId: projectId, doctorId: doctorId); + if (_askDoctorService.hasError) { + error = _askDoctorService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + getDoctorResponse() async { + setState(ViewState.Busy); + await _askDoctorService.getDoctorResponse(); + if (_askDoctorService.hasError) { + error = _askDoctorService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + Future updateReadStatus({required int transactionNo}) async { + setState(ViewState.Busy); + await _askDoctorService.updateReadStatus(transactionNo: transactionNo); + if (_askDoctorService.hasError) { + error = _askDoctorService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + Future sendRequestLOV({required DoctorList doctorList, required String requestType, required String remark}) async { + setState(ViewState.BusyLocal); + await _askDoctorService.sendRequestLOV(doctorList: doctorList, requestType: requestType, remark: remark); + if (_askDoctorService.hasError) { + error = _askDoctorService.error!; + setState(ViewState.ErrorLocal); + AppToast.showErrorToast(message: error); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/core/viewModels/medical/blood_pressure_view_model.dart b/lib/core/viewModels/medical/blood_pressure_view_model.dart new file mode 100644 index 00000000..b3c0f8a9 --- /dev/null +++ b/lib/core/viewModels/medical/blood_pressure_view_model.dart @@ -0,0 +1,109 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/blood_pressur/BloodPressureResult.dart'; +import 'package:diplomaticquarterapp/core/service/medical/BloodPressureService.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; + +import '../../../core/viewModels/base_view_model.dart'; + +class BloodPressureViewMode extends BaseViewModel { + BloodPressureService bloodPressureService = locator(); + + List get monthDiabtecPatientResult => bloodPressureService.monthDiabtecPatientResult; + + List get weekDiabtecPatientResult => bloodPressureService.weekDiabtecPatientResult; + + List get yearDiabtecPatientResult => bloodPressureService.yearDiabtecPatientResult; + + List weightWeekTimeSeriesDataTop = []; + List weightWeekTimeSeriesDataLow = []; + + List weighMonthTimeSeriesDataTop = []; + List weighMonthTimeSeriesDataLow = []; + + List weightYearTimeSeriesDataTop = []; + List weightYearTimeSeriesDataLow = []; + + Future getBloodPressure() async { + setState(ViewState.Busy); + await bloodPressureService.getBloodSugar(); + await bloodPressureService.getDiabtecResults(); + if (bloodPressureService.hasError) { + error = bloodPressureService.error!; + setState(ViewState.ErrorLocal); + } else { + clearDate(); + bloodPressureService.weekDiabtectResultAverageList.forEach((element) { + 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("Week " + (index + 1).toString(), bloodPressureService.monthDiabtectResultAverageList[index].weekDiastolicPressureAverageResult.toDouble())); + // weighMonthTimeSeriesDataLow.add(TimeSeriesSales3("Week " + (index + 1).toString(), bloodPressureService.monthDiabtectResultAverageList[index].weekSystolicePressureAverageResult.toDouble())); + weighMonthTimeSeriesDataTop.add(TimeSeriesSales3( + bloodPressureService.monthDiabtectResultAverageList[index].weekDesc, bloodPressureService.monthDiabtectResultAverageList[index].weekDiastolicPressureAverageResult!.toDouble())); + weighMonthTimeSeriesDataLow.add(TimeSeriesSales3( + bloodPressureService.monthDiabtectResultAverageList[index].weekDesc, bloodPressureService.monthDiabtectResultAverageList[index].weekSystolicePressureAverageResult!.toDouble())); + } + + bloodPressureService.yearDiabtecResultAverageList.forEach((element) { + weightYearTimeSeriesDataTop.add(TimeSeriesSales2(element.date!, element.monthSystolicePressureAverageResult!.toDouble())); + + weightYearTimeSeriesDataLow.add(TimeSeriesSales2(element.date!, element.monthDiastolicPressureAverageResult!.toDouble())); + }); + + setState(ViewState.Idle); + } + } + + void clearDate() { + weightWeekTimeSeriesDataTop.clear(); + weightWeekTimeSeriesDataLow.clear(); + weighMonthTimeSeriesDataTop.clear(); + weighMonthTimeSeriesDataLow.clear(); + weightYearTimeSeriesDataTop.clear(); + weightYearTimeSeriesDataLow.clear(); + } + + Future sendReportByEmail() async { + setState(ViewState.BusyLocal); + + await bloodPressureService.sendReportByEmail(); + if (bloodPressureService.hasError) { + error = bloodPressureService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future addORUpdateDiabtecResult({String? bloodPressureDate, String? diastolicPressure, String? systolicePressure, int? measuredArm, int? lineItemNo, bool isUpdate = false}) async { + setState(ViewState.BusyLocal); + 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, lineItemNo: lineItemNo); + if (bloodPressureService.hasError) { + error = bloodPressureService.error!; + setState(ViewState.ErrorLocal); + } else { + // await getBloodPressure(); + setState(ViewState.Idle); + } + } + + Future deactivateDiabeticStatus({required int lineItemNo}) async { + setState(ViewState.BusyLocal); + + await bloodPressureService.deactivateDiabeticStatus(lineItemNo: lineItemNo); + if (bloodPressureService.hasError) { + error = bloodPressureService.error!; + setState(ViewState.ErrorLocal); + } else { + await getBloodPressure(); + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModels/medical/blood_sugar_view_model.dart b/lib/core/viewModels/medical/blood_sugar_view_model.dart new file mode 100644 index 00000000..5b9c4077 --- /dev/null +++ b/lib/core/viewModels/medical/blood_sugar_view_model.dart @@ -0,0 +1,134 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; +import 'package:diplomaticquarterapp/core/service/medical/BloodSugarService.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; + +import '../../../core/viewModels/base_view_model.dart'; + +class BloodSugarViewMode extends BaseViewModel { + BloodSugarService bloodSugarService = locator(); + + List get monthDiabtecPatientResult => + bloodSugarService.monthDiabtecPatientResult; + + List get weekDiabtecPatientResult => + bloodSugarService.weekDiabtecPatientResult; + + List get yearDiabtecPatientResult => + bloodSugarService.yearDiabtecPatientResult; + + List bloodWeekTimeSeriesData = []; + List yearTimeSeriesData = []; + List monthTimeSeriesData = []; + + Future getBloodSugar() async { + setState(ViewState.Busy); + await bloodSugarService.getBloodSugar(); + await bloodSugarService.getDiabtecResults(); + if (bloodSugarService.hasError) { + error = bloodSugarService.error!; + setState(ViewState.Error); + } else { + bloodSugarService.weekDiabtectResultAverageList.forEach((element) { + bloodWeekTimeSeriesData.add(TimeSeriesSales2( + element.dateChart!, + element.dailyAverageResult.toDouble(), + )); + }); + if (bloodWeekTimeSeriesData.isEmpty) { + bloodWeekTimeSeriesData.add(TimeSeriesSales2(DateTime.now(), 0)); + } + + for (int index = 0; + index < bloodSugarService.monthDiabtectResultAverageList.length; + index++) { + monthTimeSeriesData.add(TimeSeriesSales3( + index, + bloodSugarService + .monthDiabtectResultAverageList[index].weekAverageResult + .toDouble(), + )); + } + + bloodSugarService.yearDiabtecResultAverageList.forEach((element) { + yearTimeSeriesData.add(TimeSeriesSales2( + element.date!, + element.monthAverageResult.toDouble(), + )); + }); + + setState(ViewState.Idle); + } + } + + Future addDiabtecResult( + {String? bloodSugerDateChart, + String? bloodSugerResult, + String? diabtecUnit, + int? measuredTime}) async { + setState(ViewState.BusyLocal); + await bloodSugarService.addDiabtecResult( + bloodSugerDateChart: bloodSugerDateChart, + bloodSugerResult: bloodSugerResult, + diabtecUnit: diabtecUnit, + measuredTime: measuredTime); + if (bloodSugarService.hasError) { + error = bloodSugarService.error!; + setState(ViewState.Error); + } else { + await getBloodSugar(); + setState(ViewState.Idle); + } + } + + Future updateDiabtecResult( + {DateTime? month, + DateTime? hour, + String? bloodSugerResult, + String? diabtecUnit, + int? measuredTime, + int? lineItemNo}) async { + setState(ViewState.BusyLocal); + + await bloodSugarService.updateDiabtecResult( + bloodSugerResult: bloodSugerResult, + diabtecUnit: diabtecUnit, + hour: hour, + measuredTime: measuredTime, + lineItemNo: lineItemNo, + month: month); + if (bloodSugarService.hasError) { + error = bloodSugarService.error!; + setState(ViewState.ErrorLocal); + } else { + await getBloodSugar(); + setState(ViewState.Idle); + } + } + + Future sendReportByEmail() async { + setState(ViewState.BusyLocal); + + await bloodSugarService.sendReportByEmail(); + if (bloodSugarService.hasError) { + error = bloodSugarService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future deactivateDiabeticStatus({required int lineItemNo}) async { + setState(ViewState.BusyLocal); + + await bloodSugarService.deactivateDiabeticStatus(lineItemNo: lineItemNo); + if (bloodSugarService.hasError) { + error = bloodSugarService.error!; + setState(ViewState.ErrorLocal); + } else { + await getBloodSugar(); + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart new file mode 100644 index 00000000..ea45a312 --- /dev/null +++ b/lib/core/viewModels/medical/labs_view_model.dart @@ -0,0 +1,180 @@ +import 'dart:convert'; +import 'dart:io'; +import 'dart:typed_data'; + +import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/labs/LabOrderResult.dart'; +import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart'; +import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; +import 'package:diplomaticquarterapp/core/model/labs/patient_lab_special_result.dart'; +import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:open_filex/open_filex.dart'; +import 'package:path_provider/path_provider.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class LabsViewModel extends BaseViewModel { + FilterType filterType = FilterType.Clinic; + LabsService _labsService = locator(); + + List get labOrdersResultsList => _labsService.labOrdersResultsList; + List timeSeries = []; + + String get labReportPDF => _labsService.labReportPDF; + + List _patientLabOrdersListClinic = []; + List _patientLabOrdersListHospital = []; + + List get patientLabOrdersList => filterType == FilterType.Clinic ? _patientLabOrdersListClinic : _patientLabOrdersListHospital; + + void getLabs() async { + if (authenticatedUserObject.isLogin) { + setState(ViewState.Busy); + await _labsService.getPatientLabOrdersList(); + if (_labsService.hasError) { + error = _labsService.error!; + setState(ViewState.Error); + } else { + _labsService.patientLabOrdersList.forEach((element) { + List patientLabOrdersClinic = _patientLabOrdersListClinic.where((elementClinic) => elementClinic.filterName == element.clinicDescription).toList(); + + if (patientLabOrdersClinic.length != 0) { + _patientLabOrdersListClinic[_patientLabOrdersListClinic.indexOf(patientLabOrdersClinic[0])].patientLabOrdersList.add(element); + } else { + _patientLabOrdersListClinic.add(PatientLabOrdersList(filterName: element.clinicDescription ?? element.projectName, patientDoctorAppointment: element)); + } + + // doctor list sort via project + List patientLabOrdersHospital = _patientLabOrdersListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (patientLabOrdersHospital.length != 0) { + _patientLabOrdersListHospital[_patientLabOrdersListHospital.indexOf(patientLabOrdersHospital[0])].patientLabOrdersList.add(element); + } else { + _patientLabOrdersListHospital.add(PatientLabOrdersList(filterName: element.projectName ?? element.clinicDescription, patientDoctorAppointment: element)); + } + }); + + setState(ViewState.Idle); + } + } + } + + setFilterType(FilterType filterType) { + this.filterType = filterType; + notifyListeners(); + } + + List get patientLabSpecialResult => _labsService.patientLabSpecialResult; + + List get labResultList => _labsService.labResultList; + + List labResultLists = []; + + getLaboratoryResult({String? projectID, int? clinicID, String? invoiceNo, String? invoiceType, String? orderNo, String? setupID, bool? isVidaPlus}) async { + setState(ViewState.Busy); + await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, invoiceType: invoiceType, orderNo: orderNo, projectID: projectID, clinicID: clinicID, setupID: setupID, isVidaPlus: isVidaPlus); + if (_labsService.hasError) { + error = _labsService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + getPatientLabResult({required PatientLabOrders patientLabOrder, required bool isVidaPlus}) async { + setState(ViewState.Busy); + await _labsService.getPatientLabResult(patientLabOrder: patientLabOrder, isVidaPlus: isVidaPlus); + if (_labsService.hasError) { + error = _labsService.error!; + setState(ViewState.Error); + } else { + _labsService.labResultList.forEach((element) { + List patientLabOrdersClinic = labResultLists.where((elementClinic) => elementClinic.filterName == element.testCode).toList(); + + if (patientLabOrdersClinic.length != 0) { + // var value = labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])] + // .patientLabResultList! + // .where((e) { + // return 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)); + } + }); + setState(ViewState.Idle); + } + } + + getPatientLabOrdersResults({PatientLabOrders? patientLabOrder, String? procedure, bool? isVidaPlus}) async { + setState(ViewState.Busy); + await _labsService.getPatientLabOrdersResults( + patientLabOrder: patientLabOrder, + procedure: procedure, + isVidaPlus: isVidaPlus!, + ); + if (_labsService.hasError) { + error = _labsService.error!; + setState(ViewState.Error); + } else { + /// 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(); + + _labsService.labOrdersResultsList.forEach((element) { + try { + timeSeries.add(new TimeSeriesSales2(DateUtil.convertStringToDate(element.verifiedOnDateTime!), double.parse(element.resultValue!))); + } catch (e) {} + }); + setState(ViewState.Idle); + } + } + + sendLabReportEmail({PatientLabOrders? patientLabOrder, String? mes, AuthenticatedUser? userObj, required bool isVidaPlus, bool isDownload = false, int languageID = 1}) async { + await _labsService.sendLabReportEmail(patientLabOrder: patientLabOrder, userObj: userObj, isVidaPlus: isVidaPlus, isDownload: isDownload, languageID: languageID); + if (_labsService.hasError) { + error = _labsService.error!; + } else { + if (isDownload) { + if (labReportPDF.isNotEmpty) { + String path = await _createFileFromString(labReportPDF, "pdf"); + try { + OpenFilex.open(path); + } catch (ex) { + AppToast.showErrorToast(message: "Cannot open file."); + } + } + } else { + AppToast.showSuccessToast(message: mes!); + } + } + } + + Future _createFileFromString(String encodedStr, String ext) async { + Uint8List bytes = base64.decode(encodedStr); + String dir = (await getApplicationDocumentsDirectory()).path; + File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext); + await file.writeAsBytes(bytes); + return file.path; + } +} diff --git a/lib/core/viewModels/medical/medical_view_model.dart b/lib/core/viewModels/medical/medical_view_model.dart new file mode 100644 index 00000000..a111b6a5 --- /dev/null +++ b/lib/core/viewModels/medical/medical_view_model.dart @@ -0,0 +1,53 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart'; + +class MedicalViewModel extends BaseViewModel { + MedicalService _medicalService = locator(); + + List get appoitmentAllHistoryResultList => _medicalService.appoitmentAllHistoryResultList; + + List get getDoctorScheduleList => _medicalService.doctorScheduleResponse; + + List get freeSlots => _medicalService.freeSlots; + + getAppointmentHistory({bool isForTimeLine = false}) async { + if (authenticatedUserObject.isLogin) { + setState(ViewState.Busy); + await _medicalService.getAppointmentHistory(isForTimeLine: isForTimeLine); + if (_medicalService.hasError) { + error = _medicalService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + } + + getDoctorSchedule(DoctorList doctorRequest) async { + //if (authenticatedUserObject.isLogin) { + setState(ViewState.Busy); + await _medicalService.getSchedule(doctorRequest); + if (_medicalService.hasError) { + error = _medicalService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + //} + } + + getFreeSlots(DoctorList doctorRequest) async { + //if (authenticatedUserObject.isLogin) { + setState(ViewState.Busy); + await _medicalService.getFreeSlot(doctorRequest); + if (_medicalService.hasError) { + error = _medicalService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } +//} +} diff --git a/lib/core/viewModels/medical/my_balance_view_model.dart b/lib/core/viewModels/medical/my_balance_view_model.dart new file mode 100644 index 00000000..24e01d18 --- /dev/null +++ b/lib/core/viewModels/medical/my_balance_view_model.dart @@ -0,0 +1,181 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/blood_groub_details.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_advance_balance_amount.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; +import 'package:diplomaticquarterapp/core/service/blood/blood_details_servies.dart'; +import 'package:diplomaticquarterapp/core/service/blood/blood_donation_service.dart'; +import 'package:diplomaticquarterapp/core/service/hospital_service.dart'; +import 'package:diplomaticquarterapp/core/service/medical/my_balance_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; + +class MyBalanceViewModel extends BaseViewModel { + MyBalanceService _myBalanceService = locator(); + + HospitalService _hospitalService = locator(); + + List get hospitals => _hospitalService.hospitals; + + List get patientAdvanceBalanceAmountList => + _myBalanceService.patientAdvanceBalanceAmountList; + + //======================== + BloodDonationService _bloodDonationService = locator(); + + List get CitiesModelList => + _bloodDonationService.CitiesModelList; + BloodDetailsService _bloodDetailsService = locator(); + + List get bloodDetailsModelList => + _bloodDetailsService + .BloodModelList; //_bloodDonationService.CitiesModelList; + + //=========================== + + dynamic get totalAdvanceBalanceAmount => + _myBalanceService.totalAdvanceBalanceAmount; + + String get updatedRegisterBloodMessage => + _myBalanceService.updatedRegisterBloodMessage; + + GetAllSharedRecordsByStatusResponse get getAllSharedRecordsByStatusResponse => + _myBalanceService.getAllSharedRecordsByStatusResponse; + + List get patientInfoList => _myBalanceService.patientInfoList; + + PatientInfoAndMobileNumber get patientInfoAndMobileNumber => + _myBalanceService.patientInfoAndMobileNumber!; + + List get bloodModelList => + _bloodDetailsService.BloodModelList; + + String get logInTokenID => _myBalanceService.logInTokenID!; + + String get verificationCode => _myBalanceService.verificationCode!; + + getPatientAdvanceBalanceAmount() async { + setState(ViewState.Busy); + await _myBalanceService.getPatientAdvanceBalanceAmount(); + if (_myBalanceService.hasError) { + error = _myBalanceService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getHospitals(int languageID, {bool isAdvancePayment = false}) async { + setState(ViewState.Busy); + await _hospitalService.getHospitals(languageID, isAdvancePayment: isAdvancePayment); + if (_hospitalService.hasError) { + error = _hospitalService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + Future getCities() async { + if(isLogin) { + setState(ViewState.Busy); + await _bloodDonationService.getAllCitiesOrders(); + if (_bloodDonationService.hasError) { + error = _bloodDonationService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + } + + Future getBlood() async { + setState(ViewState.Busy); + await _bloodDetailsService.getAllBloodOrders(); + if (_bloodDetailsService.hasError) { + error = _bloodDetailsService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + Future getPatientInfoByPatientID({required String id}) async { + setState(ViewState.Busy); + await _myBalanceService.getPatientInfoByPatientID(id: id); + if (_myBalanceService.hasError) { + error = _myBalanceService.error!; + setState(ViewState.ErrorLocal); + AppToast.showErrorToast(message: error); + } else { + setState(ViewState.Idle); + } + } + + Future getPatientInfoByPatientIDAndMobileNumber( + AdvanceModel advanceModel) async { + setState(ViewState.Busy); + await _myBalanceService + .getPatientInfoByPatientIDAndMobileNumber(advanceModel); + if (_myBalanceService.hasError) { + error = _myBalanceService.error!; + setState(ViewState.ErrorLocal); + AppToast.showErrorToast(message: error); + } else { + setState(ViewState.Idle); + } + } + + Future sendActivationCodeForAdvancePayment( + {required int patientID, required int projectID}) async { + setState(ViewState.Busy); + await _myBalanceService.sendActivationCodeForAdvancePayment( + patientID: patientID, projectID: projectID); + if (_myBalanceService.hasError) { + error = _myBalanceService.error!; + setState(ViewState.ErrorLocal); + AppToast.showErrorToast(message: error); + } else { + setState(ViewState.Idle); + } + } + + Future checkActivationCodeForAdvancePayment( + {required String activationCode, String? patientMobileNumber}) async { + setState(ViewState.Busy); + await _myBalanceService.checkActivationCodeForAdvancePayment( + activationCode: activationCode); + if (_myBalanceService.hasError) { + error = _myBalanceService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future getFamilyFiles() async { + setState(ViewState.Busy); + await _myBalanceService.getFamilyFiles(); + if (_myBalanceService.hasError) { + error = _myBalanceService.error!; + setState(ViewState.ErrorLocal); + AppToast.showErrorToast(message: error); + } else { + setState(ViewState.Idle); + } + } + + Future updateBloodGroup(List_BloodGroupDetailsModel detailsModel) async { + setState(ViewState.Busy); + await _myBalanceService.updateBloodGroup(detailsModel); + if (_myBalanceService.hasError) { + error = _myBalanceService.error!; + setState(ViewState.ErrorLocal); + } else { + await _myBalanceService.addUserAgreementForBloodDonation(); + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModels/medical/my_doctor_view_model.dart b/lib/core/viewModels/medical/my_doctor_view_model.dart new file mode 100644 index 00000000..da070d17 --- /dev/null +++ b/lib/core/viewModels/medical/my_doctor_view_model.dart @@ -0,0 +1,98 @@ +import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/doctor/doctor_profile.dart'; +import 'package:diplomaticquarterapp/core/model/doctor/doctor_rating.dart'; +import 'package:diplomaticquarterapp/core/service/medical/my_doctor_service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class MyDoctorViewModel extends BaseViewModel { + FilterType filterType = FilterType.Clinic; + MyDoctorService _myDoctorService = locator(); + + List _patientDoctorAppointmentListClinic = + []; + List _patientDoctorAppointmentListHospital = + []; + + List get patientDoctorAppointmentList => + filterType == FilterType.Clinic + ? _patientDoctorAppointmentListClinic + : _patientDoctorAppointmentListHospital; + + DoctorList get doctorList=> _myDoctorService.doctorList!; + + + DoctorProfile get doctorProfile => _myDoctorService.doctorProfile!; + DoctorRating get doctorRating => _myDoctorService.doctorRating; + + void getMyDoctor() async { + setState(ViewState.Busy); + await _myDoctorService.getPatientDoctorAppointmentList(); + if (_myDoctorService.hasError) { + error = _myDoctorService.error!; + setState(ViewState.Error); + } else { + _myDoctorService.patientDoctorAppointmentList.forEach((element) { + List doctorByClinic = + _patientDoctorAppointmentListClinic + .where((elementClinic) => + elementClinic.filterName == element.clinicName) + .toList(); + + if (doctorByClinic.length != 0) { + _patientDoctorAppointmentListClinic[ + _patientDoctorAppointmentListClinic + .indexOf(doctorByClinic[0])] + .patientDoctorAppointmentList! + .add(element); + } else { + _patientDoctorAppointmentListClinic.add(PatientDoctorAppointmentList( + filterName: element.clinicName, + patientDoctorAppointment: element)); + } + + // doctor list sort via project + List doctorByHospital = + _patientDoctorAppointmentListHospital + .where( + (elementClinic) => + elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])] + .patientDoctorAppointmentList! + .add(element); + } else { + _patientDoctorAppointmentListHospital.add( + PatientDoctorAppointmentList( + filterName: element.projectName, + patientDoctorAppointment: element)); + } + }); + + setState(ViewState.Idle); + } + } + + setFilterType(FilterType filterType) { + this.filterType = filterType; + notifyListeners(); + } + + Future getDoctorProfileAndRating({required int doctorId,required int clinicID,required int projectID }) async { + setState(ViewState.Busy); + await _myDoctorService.getDoctorProfileAndRating(doctorId: doctorId,clinicID: clinicID,projectID: projectID); + if (_myDoctorService.hasError) { + error = _myDoctorService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + +} diff --git a/lib/core/viewModels/medical/patient_sick_leave_view_model.dart b/lib/core/viewModels/medical/patient_sick_leave_view_model.dart new file mode 100644 index 00000000..d0390f88 --- /dev/null +++ b/lib/core/viewModels/medical/patient_sick_leave_view_model.dart @@ -0,0 +1,64 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart'; +import 'package:diplomaticquarterapp/core/service/medical/PatientSickLeaveService.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; + +import 'dart:convert'; +import 'dart:io'; +import 'dart:typed_data'; +import 'package:open_filex/open_filex.dart'; +import 'package:path_provider/path_provider.dart'; + +class PatientSickLeaveViewMode extends BaseViewModel { + PatientSickLeaveService _patientSickLeaveService = locator(); + + List get sickLeaveList => _patientSickLeaveService.sickLeaveList; + + String get sickLeavePDF => _patientSickLeaveService.sickLeavePDF; + + getSickLeave() async { + setState(ViewState.Busy); + await _patientSickLeaveService.getSickLeave(); + if (_patientSickLeaveService.hasError) { + error = _patientSickLeaveService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future sendSickLeaveEmail( + {required String message, required int requestNo, required String projectName, required String doctorName, required int projectID, required String setupID, required bool isDownload}) async { + setState(ViewState.Busy); + await _patientSickLeaveService.sendSickLeaveEmail(requestNo: requestNo, projectName: projectName, doctorName: doctorName, projectID: projectID, setupID: setupID, isDownload: isDownload); + if (_patientSickLeaveService.hasError) { + error = _patientSickLeaveService.error!; + setState(ViewState.ErrorLocal); + AppToast.showErrorToast(message: error); + } else { + if (isDownload) { + if (sickLeavePDF.isNotEmpty) { + String path = await _createFileFromString(sickLeavePDF, "pdf"); + try { + OpenFilex.open(path); + } catch (ex) { + AppToast.showErrorToast(message: "Cannot open file."); + } + } + } else { + AppToast.showSuccessToast(message: message); + } + setState(ViewState.Idle); + } + } + + Future _createFileFromString(String encodedStr, String ext) async { + Uint8List bytes = base64.decode(encodedStr); + String dir = (await getApplicationDocumentsDirectory()).path; + File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext); + await file.writeAsBytes(bytes); + return file.path; + } +} diff --git a/lib/core/viewModels/medical/prescriptions_view_model.dart b/lib/core/viewModels/medical/prescriptions_view_model.dart new file mode 100644 index 00000000..82c0282e --- /dev/null +++ b/lib/core/viewModels/medical/prescriptions_view_model.dart @@ -0,0 +1,210 @@ +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/perscription_pharmacy.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_info_rc_model.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:open_filex/open_filex.dart'; + +import '../../../core/enum/filter_type.dart'; +import '../../../core/enum/viewstate.dart'; +import '../../../core/model/prescriptions/Prescriptions.dart'; +import '../../../core/service/medical/prescriptions_service.dart'; +import '../../../locator.dart'; +import '../base_view_model.dart'; + +import 'dart:convert'; +import 'dart:io'; +import 'dart:typed_data'; +import 'package:path_provider/path_provider.dart'; + +class PrescriptionsViewModel extends BaseViewModel { + FilterType filterType = FilterType.Clinic; + PrescriptionsService _prescriptionsService = locator(); + + List _prescriptionsOrderListClinic = []; + List _prescriptionsOrderListHospital = []; + + 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 prescriptionReportEnhList => _prescriptionsService.prescriptionReportEnhList; + + List get prescriptionsOrderListRC => _prescriptionsService.prescriptionsOrderListRC; + + List get prescriptionsOrderList => filterType == FilterType.Clinic ? _prescriptionsOrderListClinic : _prescriptionsOrderListHospital; + + List prescriptionsOrderListByValue(filterValue) { + return filterValue == FilterType.Clinic ? _prescriptionsOrderListClinic : _prescriptionsOrderListHospital; + } + + get isMedDeliveryAllowed => _prescriptionsService.isMedDeliveryAllowed; + + String get prescriptionReportPDF => _prescriptionsService.prescriptionReportPDF; + + getPrescriptions() async { + setState(ViewState.Busy); + await _prescriptionsService.getPrescriptions(); + if (_prescriptionsService.hasError) { + error = _prescriptionsService.error!; + setState(ViewState.Error); + } else { + _filterList(); +// await getPrescriptionsOrders(); + setState(ViewState.Idle); + } + } + + void _filterList() { + _prescriptionsService.prescriptionsList.forEach((element) { + /// PrescriptionsList list sort clinic + List prescriptionsByClinic = _prescriptionsOrderListClinic.where((elementClinic) => elementClinic.filterName == element.clinicDescription).toList(); + + if (prescriptionsByClinic.length != 0) { + _prescriptionsOrderListClinic[_prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])].prescriptionsList!.add(element); + } else { + _prescriptionsOrderListClinic.add(PrescriptionsList(filterName: element.clinicDescription, prescriptions: element)); + } + + /// PrescriptionsList list sort via hospital + List prescriptionsByHospital = _prescriptionsOrderListHospital + .where( + (elementClinic) => elementClinic.filterName == element.name, + ) + .toList(); + + if (prescriptionsByHospital.length != 0) { + _prescriptionsOrderListHospital[_prescriptionsOrderListHospital.indexOf(prescriptionsByHospital[0])].prescriptionsList!.add(element); + } else { + _prescriptionsOrderListHospital.add(PrescriptionsList(filterName: element.name, prescriptions: element)); + } + }); + } + + getPrescriptionsOrders({bool showLoading = false}) async { + setState(ViewState.Busy); + Future.delayed(new Duration(milliseconds: 300)).then((value) async { + // await _prescriptionsService.getPrescriptionsOrders(); + await _prescriptionsService.getPrescriptionsOrdersRC(); + if (_prescriptionsService.hasError) { + error = _prescriptionsService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + }); + } + + setFilterType(FilterType filterType) { + this.filterType = filterType; + notifyListeners(); + } + + getPrescriptionReport({required Prescriptions prescriptions}) async { + setState(ViewState.Busy); + await _prescriptionsService.getPrescriptionReport(prescriptions: prescriptions); + if (_prescriptionsService.hasError) { + error = _prescriptionsService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + sendPrescriptionEmail( + {required String appointmentDate, + required int patientID, + required String clinicName, + required String doctorName, + required int doctorID, + required String mes, + required int projectID, + required bool isInOutPatient, + required bool isDownload}) async { + setState(ViewState.BusyLocal); + await _prescriptionsService.sendPrescriptionEmail(appointmentDate, patientID, clinicName, doctorName, doctorID, projectID, isInOutPatient, isDownload); + if (_prescriptionsService.hasError) { + error = _prescriptionsService.error!; + setState(ViewState.ErrorLocal); + AppToast.showErrorToast(message: error); + } else { + if (isDownload) { + if (prescriptionReportPDF.isNotEmpty) { + String path = await _createFileFromString(prescriptionReportPDF, "pdf"); + try { + OpenFilex.open(path); + } catch (ex) { + AppToast.showErrorToast(message: "Cannot open file."); + } + } + } else { + AppToast.showSuccessToast(message: mes); + } + // AppToast.showSuccessToast(message: mes); + setState(ViewState.Idle); + } + } + + getListPharmacyForPrescriptions({required int itemId}) async { + setState(ViewState.Busy); + await _prescriptionsService.getListPharmacyForPrescriptions(itemId: itemId); + if (_prescriptionsService.hasError) { + error = _prescriptionsService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + getPrescriptionReportEnh({required PrescriptionsOrder prescriptionsOrder}) async { + setState(ViewState.Busy); + await _prescriptionsService.getPrescriptionReportEnh(prescriptionsOrder: prescriptionsOrder); + if (_prescriptionsService.hasError) { + error = _prescriptionsService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + getPrescriptionReportDetailsRC(int orderID, dynamic patientID) async { + setState(ViewState.Busy); + await _prescriptionsService.getPrescriptionsInfoRC(orderID, patientID); + if (_prescriptionsService.hasError) { + error = _prescriptionsService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future _createFileFromString(String encodedStr, String ext) async { + Uint8List bytes = base64.decode(encodedStr); + String dir = (await getApplicationDocumentsDirectory()).path; + File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext); + await file.writeAsBytes(bytes); + return file.path; + } + + Future updatePressOrder({required int presOrderID}) async { + setState(ViewState.Busy); + // await _prescriptionsService.updatePressOrder(presOrderID: presOrderID); + await _prescriptionsService.updatePressOrderRC(presOrderID: presOrderID); + if (_prescriptionsService.hasError) { + error = _prescriptionsService.error!; + setState(ViewState.Error); + } else { + await getPrescriptions(); + } + } +} diff --git a/lib/core/viewModels/medical/radiology_view_model.dart b/lib/core/viewModels/medical/radiology_view_model.dart new file mode 100644 index 00000000..f64f6937 --- /dev/null +++ b/lib/core/viewModels/medical/radiology_view_model.dart @@ -0,0 +1,105 @@ +import "package:collection/collection.dart"; +import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; +import 'package:diplomaticquarterapp/core/service/medical/radiology_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +import 'dart:convert'; +import 'dart:io'; +import 'dart:typed_data'; +import 'package:open_filex/open_filex.dart'; +import 'package:path_provider/path_provider.dart'; + +class RadiologyViewModel extends BaseViewModel { + FilterType filterType = FilterType.Clinic; + RadiologyService _radiologyService = locator(); + + List _finalRadiologyListClinic = []; + List _finalRadiologyListHospital = []; + + List get finalRadiologyList => filterType == FilterType.Clinic ? _finalRadiologyListClinic : _finalRadiologyListHospital; + + bool _isRadiologyVIDAPlus = false; + + bool get isRadiologyVIDAPlus => _isRadiologyVIDAPlus; + + String get radReportPDF => _radiologyService.radReportPDF; + + void getPatientRadOrders() async { + setState(ViewState.Busy); + await _radiologyService.getPatientRadOrders(); + _isRadiologyVIDAPlus = _radiologyService.isRadiologyVIDAPlus; + if (_radiologyService.hasError) { + error = _radiologyService.error!; + setState(ViewState.Error); + } else { + //Clinic Sorting + var clinicMap = groupBy(_radiologyService.finalRadiologyList, (FinalRadiology obj) => obj.clinicDescription); + clinicMap.forEach((key, value) { + _finalRadiologyListClinic.add(FinalRadiologyList(filterName: key, finalRadiologyList: value.toList())); + }); + + //Hospital Sorting + var hospitalMap = groupBy(_radiologyService.finalRadiologyList, (FinalRadiology obj) => obj.projectName); + hospitalMap.forEach((key, value) { + _finalRadiologyListHospital.add(FinalRadiologyList(filterName: key, finalRadiologyList: value.toList())); + }); + + setState(ViewState.Idle); + } + } + + String get radImageURL => _radiologyService.url; + + getRadImageURL({required int invoiceNo, String? invoiceType, required int lineItem, required int projectId, required bool isVidaPlus}) async { + setState(ViewState.Busy); + await _radiologyService.getRadImageURL(invoiceNo: invoiceNo, invoiceType: invoiceType, lineItem: lineItem, projectId: projectId, isVidaPlus: isVidaPlus); + if (_radiologyService.hasError) { + error = _radiologyService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + sendRadReportEmail({required FinalRadiology finalRadiology, required String mes, required AuthenticatedUser userObj, required isDownload}) async { + setState(ViewState.BusyLocal); + await _radiologyService.sendRadReportEmail(finalRadiology: finalRadiology, userObj: userObj, isDownload: isDownload); + if (_radiologyService.hasError) { + error = _radiologyService.error!; + AppToast.showErrorToast(message: error); + } else { + if (isDownload) { + if (radReportPDF.isNotEmpty) { + String path = await _createFileFromString(radReportPDF, "pdf"); + try { + OpenFilex.open(path); + } catch (ex) { + AppToast.showErrorToast(message: "Cannot open file."); + } + } + } else { + AppToast.showSuccessToast(message: mes); + } + // AppToast.showSuccessToast(message: mes); + } + setState(ViewState.Idle); + } + + Future _createFileFromString(String encodedStr, String ext) async { + Uint8List bytes = base64.decode(encodedStr); + String dir = (await getApplicationDocumentsDirectory()).path; + File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext); + await file.writeAsBytes(bytes); + return file.path; + } + + setFilterType(FilterType filterType) { + this.filterType = filterType; + notifyListeners(); + } +} diff --git a/lib/core/viewModels/medical/reports_monthly_view_model.dart b/lib/core/viewModels/medical/reports_monthly_view_model.dart new file mode 100644 index 00000000..bbd6916e --- /dev/null +++ b/lib/core/viewModels/medical/reports_monthly_view_model.dart @@ -0,0 +1,55 @@ +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; + +import '../../../core/enum/reportfilter_type.dart'; +import '../../../core/enum/viewstate.dart'; +import '../../../core/service/medical/reports_service.dart'; +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class ReportsMonthlyViewModel extends BaseViewModel { + ReportFilterType filterType = ReportFilterType.Requested; + + 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); + await _reportsService.getUserTermsAndConditions(); + if (_reportsService.hasError) { + error = _reportsService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + updatePatientHealthSummaryReport({required String message, required bool isSummary, bool isUpdateEmail = false, String? email}) async { + setState(ViewState.BusyLocal); + await _reportsService.updatePatientHealthSummaryReport(isSummary: isSummary); + if (_reportsService.hasError) { + error = _reportsService.error!; + AppToast.showErrorToast(message: error); + setState(ViewState.ErrorLocal); + } else { + if (isUpdateEmail) { + await _reportsService.updateEmail(email: email!); + if (_reportsService.hasError) { + error = _reportsService.error!; + AppToast.showErrorToast(message: error); + setState(ViewState.ErrorLocal); + } else { + AppToast.showSuccessToast(message: message); + setState(ViewState.Idle); + } + } else { + AppToast.showSuccessToast(message: message); + setState(ViewState.Idle); + } + } + } +} diff --git a/lib/core/viewModels/medical/reports_view_model.dart b/lib/core/viewModels/medical/reports_view_model.dart new file mode 100644 index 00000000..04f701c5 --- /dev/null +++ b/lib/core/viewModels/medical/reports_view_model.dart @@ -0,0 +1,132 @@ +import 'package:diplomaticquarterapp/core/model/reports/admission_for_medical_report.dart'; +import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; + +import '../../../core/enum/reportfilter_type.dart'; +import '../../../core/enum/viewstate.dart'; +import '../../../core/model/reports/Reports.dart'; +import '../../../core/service/medical/reports_service.dart'; +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class ReportsViewModel extends BaseViewModel { + ReportFilterType filterType = ReportFilterType.Requested; + + ReportsService _reportsService = locator(); + + List reportsOrderRequestList =[]; + List reportsOrderReadyList =[]; + List reportsOrderCanceledList =[]; + + List reportsInPatientOrderRequestList =[]; + List reportsInPatientOrderReadyList =[]; + List reportsInPatientOrderCanceledList =[]; + + List get appointHistoryList => _reportsService.appointHistoryList; + + List get admissionsMedicalReportList => _reportsService.admissionsMedicalReport; + + getReports(int languageID) async { + setState(ViewState.Busy); + reportsOrderRequestList.clear(); + reportsOrderReadyList.clear(); + reportsOrderCanceledList.clear(); + await _reportsService.getReports(); + if (_reportsService.hasError) { + error = _reportsService.error!; + setState(ViewState.Error); + } else { + _filterList(); + await _reportsService.getInpatientAdmissionsList(languageID); + setState(ViewState.Idle); + } + } + + getInPatientReports() async { + setState(ViewState.Busy); + reportsInPatientOrderRequestList.clear(); + reportsInPatientOrderReadyList.clear(); + reportsInPatientOrderCanceledList.clear(); + await _reportsService.getInPatientReports(); + if (_reportsService.hasError) { + error = _reportsService.error!; + setState(ViewState.Error); + } else { + _filterInPatientList(); + setState(ViewState.Idle); + } + } + + getPatentAppointmentHistory() async { + setState(ViewState.Busy); + await _reportsService.getPatentAppointmentHistory(); + if (_reportsService.hasError) { + error = _reportsService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + void _filterInPatientList() { + _reportsService.inpatientReportsList.forEach((report) { + switch (report.status) { + case 1: + reportsInPatientOrderRequestList.add(report); + break; + case 2: + reportsInPatientOrderReadyList.add(report); + break; + case 4: + reportsInPatientOrderCanceledList.add(report); + break; + default: + } + }); + } + + void _filterList() { + _reportsService.reportsList.forEach((report) { + switch (report.status) { + case 1: + reportsOrderRequestList.add(report); + break; + case 2: + reportsOrderReadyList.add(report); + break; + case 4: + reportsOrderCanceledList.add(report); + break; + default: + } + }); + } + + insertRequestForMedicalReport(AppointmentHistory appointmentHistory, String mes) async { + setState(ViewState.Busy); + await _reportsService.insertRequestForMedicalReport(appointmentHistory); + if (_reportsService.hasError) { + error = _reportsService.error!; + AppToast.showErrorToast(message: error); + setState(ViewState.ErrorLocal); + } else { + AppToast.showSuccessToast(message: mes); + getInPatientReports(); + setState(ViewState.Idle); + } + } + + insertRequestForInPatientMedicalReport(int clinicID, int doctorID, String setupID, int admissionNo, int projectID, String mes) async { + setState(ViewState.Busy); + await _reportsService.insertRequestForInPatientMedicalReport(clinicID, doctorID, setupID, admissionNo, projectID); + if (_reportsService.hasError) { + error = _reportsService.error!; + AppToast.showErrorToast(message: error); + setState(ViewState.ErrorLocal); + } else { + AppToast.showSuccessToast(message: mes); + setState(ViewState.Idle); + } + } + +} diff --git a/lib/core/viewModels/medical/vital_sign_view_model.dart b/lib/core/viewModels/medical/vital_sign_view_model.dart new file mode 100644 index 00000000..232246d4 --- /dev/null +++ b/lib/core/viewModels/medical/vital_sign_view_model.dart @@ -0,0 +1,71 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart'; +import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../../locator.dart'; + +class VitalSignViewModel extends BaseViewModel { + VitalSignService _vitalSignService = locator(); + + List get vitalSignResModelList => + _vitalSignService.vitalSignResModelList; + + String heightCm = "0"; + String weightKg = "0"; + String bodyMax = "0"; + String temperatureCelcius = "0"; + String hartRat = "0"; + String respirationBeatPerMinute = "0"; + String bloodPressure = "0 / 0"; + + getPatientVitalSign({int? appointmentNo, int? projectID}) async { + setState(ViewState.Busy); + + if (appointmentNo != null && projectID != null) { + await _vitalSignService.getPatientRadOrders( + appointmentNo: appointmentNo, projectID: projectID); + } else { + await _vitalSignService.getPatientRadOrders(); + } + if (_vitalSignService.hasError) { + error = _vitalSignService.error!; + setState(ViewState.Error); + } else { + _vitalSignService.vitalSignResModelList.forEach((element) { + if (heightCm == "0" || heightCm == null || heightCm == 'null') { + heightCm = element.heightCm.toString(); + } + if (weightKg == "0" || weightKg == null || weightKg == 'null') { + weightKg = element.weightKg.toString(); + } + if (bodyMax == "0" || + bodyMax == null || + bodyMax == 'null') { + bodyMax = element.bodyMassIndex.toString(); + } + if (temperatureCelcius == "0" || + temperatureCelcius == null || + temperatureCelcius == 'null') { + temperatureCelcius = element.temperatureCelcius.toString(); + } + if (hartRat == "0" || hartRat == null || hartRat == 'null') { + hartRat = element.pulseBeatPerMinute.toString(); + } + if (respirationBeatPerMinute == "0" || + respirationBeatPerMinute == null || + respirationBeatPerMinute == 'null') { + respirationBeatPerMinute = + element.respirationBeatPerMinute.toString(); + } + if (bloodPressure == "0 / 0" || + bloodPressure == null || + bloodPressure == 'null') { + bloodPressure = element.bloodPressure.toString(); + } + }); + + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModels/medical/weight_pressure_view_model.dart b/lib/core/viewModels/medical/weight_pressure_view_model.dart new file mode 100644 index 00000000..8a689786 --- /dev/null +++ b/lib/core/viewModels/medical/weight_pressure_view_model.dart @@ -0,0 +1,110 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/weight/WeightMeasurementResult.dart'; +import 'package:diplomaticquarterapp/core/service/medical/WeightPressureService.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; + +import '../../../core/viewModels/base_view_model.dart'; + +class WeightPressureViewModel extends BaseViewModel { + WeightService weightService = locator(); + + List get monthWeightMeasurementResult => weightService.monthWeightMeasurementResult; + + List get weekWeightMeasurementResult => weightService.weekWeightMeasurementResult; + + List get yearWeightMeasurementResult => weightService.yearWeightMeasurementResult; + + List weightWeekTimeSeriesData = []; + List weighMonthTimeSeriesData = []; + List weightYearTimeSeriesData = []; + + Future getWeight() async { + setState(ViewState.Busy); + await weightService.getWeightAverage(); + await weightService.getWeightMeasurementResult(); + if (weightService.hasError) { + error = weightService.error!; + setState(ViewState.ErrorLocal); + } else { + weightService.weekWeightMeasurementResultAverage.forEach((element) { + weightWeekTimeSeriesData.add(TimeSeriesSales2( + element.weightDate!, + element.dailyAverageResult.toDouble(), + )); + }); + + for (int index = 0; index < weightService.monthWeightMeasurementResultAverage.length; index++) { + weighMonthTimeSeriesData.add(TimeSeriesSales3( + index, + weightService.monthWeightMeasurementResultAverage[index].weekAverageResult.toDouble(), + )); + } + + weightService.yearWeightMeasurementResultAverage.forEach((element) { + weightYearTimeSeriesData.add(TimeSeriesSales2( + element.date!, + element.monthAverageResult.toDouble(), + )); + }); + + setState(ViewState.Idle); + } + } + + addWeightResult({required String weightDate, required String weightMeasured, required int weightUnit}) async { + setState(ViewState.BusyLocal); + await weightService.addWeightResult( + weightDate: weightDate, + weightMeasured: weightMeasured, + weightUnit: weightUnit, + ); + if (weightService.hasError) { + error = weightService.error!; + setState(ViewState.Error); + } else { + await getWeight(); + setState(ViewState.Idle); + } + } + + Future sendReportByEmail() async { + setState(ViewState.BusyLocal); + + await weightService.sendReportByEmail(); + if (weightService.hasError) { + error = weightService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + updateWeightResult({required int lineItemNo, required int weightUnit, required String weightMeasured, required String weightDate}) async { + setState(ViewState.BusyLocal); + await weightService.updateWeightResult(lineItemNo: lineItemNo, weightMeasured: weightMeasured, weightUnit: weightUnit, weightDate: weightDate); + if (weightService.hasError) { + error = weightService.error!; + setState(ViewState.Error); + } else { + await getWeight(); + setState(ViewState.Idle); + } + } + + deleteWeightResult({ + required int lineItemNo, + }) async { + setState(ViewState.BusyLocal); + await weightService.deleteWeightResult( + lineItemNo: lineItemNo, + ); + if (weightService.hasError) { + error = weightService.error!; + setState(ViewState.Error); + } else { + await getWeight(); + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModels/notifications_view_model.dart b/lib/core/viewModels/notifications_view_model.dart new file mode 100644 index 00000000..98077560 --- /dev/null +++ b/lib/core/viewModels/notifications_view_model.dart @@ -0,0 +1,48 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/notifications/mark_message_as_read_request_model.dart'; +import 'package:diplomaticquarterapp/core/service/notifications_service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../locator.dart'; +import 'base_view_model.dart'; + +class NotificationViewModel extends BaseViewModel { + NotificationService _notificationService = locator(); + ToDoCountProviderModel model = Provider.of(AppGlobal.context); + + List get notifications => _notificationService.notificationsList; + + Future getNotifications(GetNotificationsRequestModel getNotificationsRequestModel, BuildContext context) async { + if (getNotificationsRequestModel.currentPage == 0) setState(ViewState.Busy); + + await _notificationService.getAllNotifications(getNotificationsRequestModel); + if (_notificationService.hasError) { + error = _notificationService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future markAsRead(id) async { + // setState(ViewState.Busy); + MarkMessageAsReadRequestModel markMessageAsReadRequestModel = new MarkMessageAsReadRequestModel(notificationPoolID: id); + final authService = new AuthProvider(); + await _notificationService.markAsRead(markMessageAsReadRequestModel); + await authService.getDashboard().then((value) { + var notificationCount = ''; + notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); + model.setState(model.count, 0, true, notificationCount); + sharedPref.setString(NOTIFICATION_COUNT, notificationCount); + + }); + setState(ViewState.Idle); + } +} diff --git a/lib/core/viewModels/offers_Categorise_view_model.dart b/lib/core/viewModels/offers_Categorise_view_model.dart new file mode 100644 index 00000000..adfca8cd --- /dev/null +++ b/lib/core/viewModels/offers_Categorise_view_model.dart @@ -0,0 +1,48 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/offer_products_model.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/offers_model.dart'; +import 'package:diplomaticquarterapp/core/service/offers_service.dart'; +import 'package:diplomaticquarterapp/locator.dart'; + +import 'base_view_model.dart'; + +class OffersCategoriseViewModel extends BaseViewModel { + bool hasError = false; + + OffersCategoriseService _offersCategoriseService = + locator(); + List get categorise => _offersCategoriseService.offersList; + + List get products => + _offersCategoriseService.offersProducts; + + Future getOffersCategorise() async { + hasError = false; + _offersCategoriseService.clearCategorise(); + setState(ViewState.Busy); + await _offersCategoriseService.getOffersCategorise(); + if (_offersCategoriseService.hasError) { + error = _offersCategoriseService.error!; + setState(ViewState.ErrorLocal); + } else + await getOffersProducts(); + } + + Future getOffersProducts({String? i}) async { + hasError = false; + + setState(ViewState.Busy); + await _offersCategoriseService.getOffersProducts(id: i!); + if (_offersCategoriseService.hasError) { + error = _offersCategoriseService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } +} +// await _offersCategoriseService.getOffersProducts(); +// if (_offersCategoriseService.hasError) { +// error = _offersCategoriseService.error; +// setState(ViewState.ErrorLocal); +// } else +// setState(ViewState.Idle); diff --git a/lib/core/viewModels/packages_offers/PackagesOffersViewModel.dart b/lib/core/viewModels/packages_offers/PackagesOffersViewModel.dart new file mode 100644 index 00000000..64f76b68 --- /dev/null +++ b/lib/core/viewModels/packages_offers/PackagesOffersViewModel.dart @@ -0,0 +1,54 @@ +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCartItemsResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/tamara_payment_option.dart'; +import 'package:diplomaticquarterapp/core/service/packages_offers/PackagesOffersServices.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; + +class OfferCategoriesViewModel extends BaseViewModel{ + OffersAndPackagesServices service = locator(); + get categoryList => service.categoryList; + get productList => service.categoryList; + +} + +class PackagesViewModel extends BaseViewModel { + OffersAndPackagesServices service = locator(); + + List get categoryList => service.categoryList; + List get productList => service.productList; + List get latestOffersList => service.latestOffersList; + List get bestSellerList => service.bestSellerList; + List get bannersList => service.bannersList; + List get cartItemList => service.cartItemList; + List get hospitals => service.hospitals; + + List get tamara_options => service.tamaraPaymentOptions; + bool allowTamara = true; + + setTamaraIllegablity(double amount){ + bool illegible = true; + if(tamara_options == null || tamara_options.isEmpty) + illegible = false; + else{ + tamara_options.forEach((element) { + final ill = (amount >= element.minLimit! && amount <= element.maxLimit!); + element.enable = ill; + illegible = illegible || ill; + }); + } + allowTamara = illegible; + } + + String _cartItemCount = ""; + + String get cartItemCount => _cartItemCount; + + set cartItemCount(String value) { + _cartItemCount = value; + notifyListeners(); + } +} diff --git a/lib/core/viewModels/pharmacies_view_model.dart b/lib/core/viewModels/pharmacies_view_model.dart new file mode 100644 index 00000000..f6a763b6 --- /dev/null +++ b/lib/core/viewModels/pharmacies_view_model.dart @@ -0,0 +1,43 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_list_model.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart'; +import 'package:diplomaticquarterapp/core/service/pharmacies_service.dart'; + +import '../../locator.dart'; +import 'base_view_model.dart'; + +class PharmacyViewModel extends BaseViewModel { + bool isFinished = true; + bool hasError = false; + String errorMsg = ''; + PharmacyService _pharmacyService = locator(); + + List get pharmacy => _pharmacyService.medicineItem; + List get pharmacyList => _pharmacyService.pharmaciesList; + + Future getPharmacies({int? id}) async { + setState(ViewState.Busy); + + await _pharmacyService.getPharmaciesList(itemID: id!); + if (_pharmacyService.hasError) { + error = _pharmacyService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + clearMedicineSearch(){ + _pharmacyService.clearMedicineList(); + } + Future getMedicine({String? name}) async { + hasError = false; + _pharmacyService.clearMedicineList(); + setState(ViewState.BusyLocal); + await _pharmacyService.getMedicineList(drugName: name!); + if (_pharmacyService.hasError) { + error = _pharmacyService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/core/viewModels/pharmacyModule/BestSellerViewModel.dart b/lib/core/viewModels/pharmacyModule/BestSellerViewModel.dart new file mode 100644 index 00000000..b03ee5b9 --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/BestSellerViewModel.dart @@ -0,0 +1,26 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../../locator.dart'; + +class BestSellerViewModel extends BaseViewModel { + + PharmacyModuleService _pharmacyService = locator(); + + List get bestSellerProduct => + _pharmacyService.bestSellerProducts; + + getBestSellerProducts() async { + setState(ViewState.BusyLocal); + await _pharmacyService.getBestSellerProducts(); + // if (_pharmacyService.hasError) { + // error = _pharmacyService.error; + // setState(ViewState.Error); + // } else { + setState(ViewState.Idle); + // } + } + +} \ No newline at end of file diff --git a/lib/core/viewModels/pharmacyModule/BrandViewModel.dart b/lib/core/viewModels/pharmacyModule/BrandViewModel.dart new file mode 100644 index 00000000..c1cdc8bc --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/BrandViewModel.dart @@ -0,0 +1,29 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../../locator.dart'; + +class BrandViewModel extends BaseViewModel { + PharmacyModuleService _pharmacyService = locator(); + + List get manufacturerList => _pharmacyService.manufacturerList; + + Future getTopManufacturerList() async { + setState(ViewState.BusyLocal); + await _pharmacyService.getTopManufacturerList(); + // if (_pharmacyService.hasError) { + // error = _pharmacyService.error; + // setState(ViewState.Error); + // } else { + setState(ViewState.Idle); + // } + } + + @override + void dispose() { + + super.dispose(); + } +} diff --git a/lib/core/viewModels/pharmacyModule/LastVisitedViewModel.dart b/lib/core/viewModels/pharmacyModule/LastVisitedViewModel.dart new file mode 100644 index 00000000..568e56f8 --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/LastVisitedViewModel.dart @@ -0,0 +1,25 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../../locator.dart'; + +class LastVisitedViewModel extends BaseViewModel { + + PharmacyModuleService _pharmacyService = locator(); + + List get lastVisitedProducts => + _pharmacyService.lastVisitedProducts; + + getLastVisitedProducts() async { + setState(ViewState.BusyLocal); + await _pharmacyService.getLastVisitedProducts(); + // if (_pharmacyService.hasError) { + // error = _pharmacyService.error; + // setState(ViewState.Error); + // } else { + setState(ViewState.Idle); + // } + } +} \ No newline at end of file diff --git a/lib/core/viewModels/pharmacyModule/MostViewedViewModel.dart b/lib/core/viewModels/pharmacyModule/MostViewedViewModel.dart new file mode 100644 index 00000000..a0f51038 --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/MostViewedViewModel.dart @@ -0,0 +1,23 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; + +class MostViewedViewModel extends BaseViewModel { + PharmacyModuleService _pharmacyService = locator(); + + List get mostViewedProducts => + _pharmacyService.mostViewedProducts; + + getMostViewedProducts() async { + setState(ViewState.BusyLocal); + await _pharmacyService.getMostViewedProducts(); + // if (_pharmacyService.hasError) { + // error = _pharmacyService.error; + // setState(ViewState.Error); + // } else { + setState(ViewState.Idle); + // } + } +} diff --git a/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart b/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart new file mode 100644 index 00000000..cd8ae4a2 --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart @@ -0,0 +1,241 @@ +import 'dart:convert'; + +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/ShippingOption.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCart.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCartResponse.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/payment-checkout-data.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/order-preview-service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class OrderPreviewViewModel extends BaseViewModel { + OrderPreviewService _orderService = locator(); + + List get addresses => _orderService.addresses; + + LacumAccountInformation get lacumInformation => _orderService.lacumInformation!; + + List get orderListModel => _orderService.orderList; + + PharmacyModuleViewModel pharmacyModuleViewModel = locator(); + + ShoppingCartResponse cartResponse = ShoppingCartResponse(); + PaymentCheckoutData paymentCheckoutData = PaymentCheckoutData(); + double totalAdditionalShippingCharge = 0; + + setShoppingCartResponse(ShoppingCartResponse cart) { + cartResponse = cart; + notifyListeners(); + } + + Future getOrderPreviewData() async { + setState(ViewState.Busy); + await _orderService.getAddresses(); + if (_orderService.hasError) { + error = _orderService.error!; + setState(ViewState.Error); + } else { + getShoppingCart(); + } + } + + void update() { + notifyListeners(); + } + + Future getShoppingCart() async { + // setState(ViewState.Busy); + // GifLoaderDialogUtils.showMyDialog( + // locator().navigatorKey.currentContext); + await _orderService.getShoppingCart().then((res) { + if (res != null) _handleGetShoppingCartResponse(res); + }); + if (_orderService.hasError) { + error = _orderService.error!; + // setState(ViewState.Error); + } else { + if (paymentCheckoutData != null) { + paymentCheckoutData.cartDataVisible = true; + } + // GifLoaderDialogUtils.hideDialog( + // locator().navigatorKey.currentContext); + setState(ViewState.Idle); + } + } + + Future changeProductQuantity(ShoppingCart product) async { + setState(ViewState.BusyLocal); + var resp = await _orderService.changeProductQuantity(product.id!, product); + + if (_orderService.hasError) { + error = _orderService.error!; + setState(ViewState.ErrorLocal); + } else { + var object = _handleGetShoppingCartResponse(resp); + setState(ViewState.Idle); + } + // return object; + } + + Future deleteProduct(ShoppingCart product) async { + setState(ViewState.BusyLocal); + var resp = await _orderService.deleteProduct(product.id!); + var object = _handleGetShoppingCartResponse(resp); + if (_orderService.hasError) { + error = _orderService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + return object; + } + + Future deleteShoppingCart() async { + setState(ViewState.Busy); + await _orderService.deleteShoppingCart().then((res) { + _handleGetShoppingCartResponse(res); + }); + if (_orderService.hasError) { + error = _orderService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + ShoppingCartResponse _handleGetShoppingCartResponse(Map res) { + cartResponse.totalAmount = 0.0; + totalAdditionalShippingCharge = 0; + if (res.isEmpty) { + error = "response is null"; + setState(ViewState.Error); + return ShoppingCartResponse(); + } + cartResponse.itemCount = res["item_count"]; + cartResponse.quantityCount = res["quantity_count"]; + cartResponse.subtotal = res["subtotal"]; + cartResponse.subtotalWithVat = res["subtotal_with_vat"]; + cartResponse.subtotalVatAmount = res["subtotal_vat_amount"]; + cartResponse.subtotalVatRate = res["subtotal_vat_rate"]; + cartResponse.shoppingCarts = []; + + if (paymentCheckoutData.shippingOption != null) { + totalAdditionalShippingCharge = paymentCheckoutData.shippingOption!.rate!; + cartResponse.subtotalVatAmount = (cartResponse.subtotalVatAmount)! + (paymentCheckoutData.shippingOption!.rateVat!); + cartResponse.totalAmount = (cartResponse.totalAmount)! + (paymentCheckoutData.shippingOption!.rate! + paymentCheckoutData.shippingOption!.rateVat!); + // Changed By Aamir += into ()+() + } + + res["shopping_carts"].forEach((item) { + ShoppingCart shoppingCart = ShoppingCart.fromJson(item); + cartResponse.shoppingCarts!.add(shoppingCart); + totalAdditionalShippingCharge += shoppingCart.product!.additionalShippingCharge!; + }); + if (paymentCheckoutData.shippingOption != null) cartResponse.totalAmount = (cartResponse.subtotalWithVat! + totalAdditionalShippingCharge + paymentCheckoutData.shippingOption!.rateVat!); + return cartResponse; + } + + String getPaymentOptionImage(PaymentOption paymentOption) { + String assetFile = "assets/images/pharmacy_module/payment/"; + switch (paymentOption.index) { + case 0: + return "${assetFile}mada.png"; + break; + case 1: + return "${assetFile}sadad.png"; + break; + case 2: + return "${assetFile}visa.png"; + break; + case 3: + return "${assetFile}mastercard.png"; + break; + case 4: + return "${assetFile}installment.png"; + break; + case 5: + return "${assetFile}applePay.png"; + default: + return ""; + } + } + + String getPaymentOptionName(PaymentOption paymentOption) { + return _orderService.getPaymentOptionName(paymentOption); + } + + getInformationsByAddress(String identificationNo) async { + await getShippingOption(identificationNo); + } + + getLacumAccountInformation(String identificationNo) async { + setState(ViewState.Busy); + await _orderService.getLacumAccountInformation(identificationNo); + if (_orderService.hasError) { + error = _orderService.error!; + setState(ViewState.Error); + } else { + if (_orderService.lacumInformation!.yahalaAccountNo != 0) getLacumGroupData(identificationNo); + } + } + + Future getLacumGroupData(String identificationNo) async { + setState(ViewState.Busy); + await _orderService.getLacumGroupInformation(identificationNo); + paymentCheckoutData.lacumInformation = _orderService.lacumGroupInformation; + paymentCheckoutData.usedLakumPoints = paymentCheckoutData.lacumInformation!.lakumInquiryInformationObjVersion!.pointsBalanceAmount!; + if (_orderService.hasError) { + error = _orderService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getShippingOption(String identificationNo) async { + setState(ViewState.Busy); + await _orderService.getShippingOption(paymentCheckoutData.address!).then((res) async { + if (_orderService.hasError) { + error = _orderService.error!; + setState(ViewState.Error); + } else { + paymentCheckoutData.shippingOption = ShippingOption.fromJson(res as Map); + //Changed By Aamir Map into Map + setState(ViewState.Idle); + await getLacumAccountInformation(identificationNo); + } + }); + } + + Future makeOrder(bool isLakumEnabled) async { + setState(ViewState.Busy); + await pharmacyModuleViewModel.generatePharmacyToken(); + + await _orderService.makeOrder(paymentCheckoutData, cartResponse.shoppingCarts!, isLakumEnabled); + if (_orderService.hasError) { + error = _orderService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + bool isCartItemsOutOfStock() { + bool outOfStock = false; + for (int i = 0; i < cartResponse.shoppingCarts!.length; i++) { + if (cartResponse.shoppingCarts![i].product!.stockQuantity! == 0) { + outOfStock = true; + break; + } + } + return outOfStock; + } +} + +enum PaymentOption { meda, sadad, visa, mastercard, installments, applepay } diff --git a/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart b/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart new file mode 100644 index 00000000..d920f1e3 --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart @@ -0,0 +1,118 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Country.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/pharmacyAddress_service.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:geocoding/geocoding.dart'; +import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class PharmacyAddressesViewModel extends BaseViewModel { + PharmacyAddressService _pharmacyAddressService = locator(); + + List get addresses => _pharmacyAddressService.addresses; + + int get selectedAddressIndex => _pharmacyAddressService.selectedAddressIndex; + + CountryData get country => _pharmacyAddressService.country!; + + setSelectedAddressIndex(int index) { + _pharmacyAddressService.selectedAddressIndex = index; + } + + Future getAddressesList() async { + setState(ViewState.Busy); + await _pharmacyAddressService.getAddresses(); + if (_pharmacyAddressService.hasError) { + error = _pharmacyAddressService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + // Future addEditAddress(PickResult value, AddressInfo editedAddress) async { + Future addEditAddress(Placemark selectedPlace, AddressInfo editedAddress, {String? latLong}) async { + setState(ViewState.Busy); + + AddressInfo sendingAddress; + + if (editedAddress == null) { + sendingAddress = AddressInfo(); + sendingAddress.id = "0"; + sendingAddress.firstName = user!.firstName; + sendingAddress.lastName = user!.lastName; + sendingAddress.email = user!.emailAddress; + sendingAddress.company = null; + } else { + sendingAddress = editedAddress; + } + + sendingAddress.country = selectedPlace.country; + sendingAddress.city = selectedPlace.locality; + sendingAddress.zipPostalCode = selectedPlace.postalCode; + sendingAddress.province = selectedPlace.locality; + sendingAddress.latLong = latLong; + + // value.addressComponents.forEach((element) { + // if (element.types.contains("country")) { + // sendingAddress.country = element.longName; + // } + // if (element.types.contains("administrative_area_level_1")) { + // sendingAddress.city = element.longName; + // } + // if (element.types.contains("postal_code")) { + // sendingAddress.zipPostalCode = element.longName; + // } + // if (element.types.contains("administrative_area_level_2")) { + // sendingAddress.province = element.longName; + // } + // }); + // sendingAddress.latLong = value.geometry.location.toString(); + + await _pharmacyAddressService.getCountries(sendingAddress.country!); + sendingAddress.countryId = country.id; + sendingAddress.stateProvinceId = null; + sendingAddress.address1 = selectedPlace.name; + sendingAddress.address2 = selectedPlace.street; + sendingAddress.phoneNumber = user!.mobileNumber; + sendingAddress.faxNumber = user!.faxNumber; + sendingAddress.customerAttributes = ""; + sendingAddress.createdOnUtc = DateTime.now().toString(); + if (editedAddress == null) { + await _pharmacyAddressService.addCustomerAddress(sendingAddress); + } else { + await _pharmacyAddressService.editCustomerAddress(sendingAddress).then((value) async {}); + } + + if (_pharmacyAddressService.hasError) { + setState(ViewState.Idle); + await Future.delayed(Duration(milliseconds: 800)); + getAddressesList(); + } else { + setState(ViewState.Idle); + await Future.delayed(Duration(milliseconds: 800)); + getAddressesList(); + } + } + + Future deleteAddresses(AddressInfo address) async { + setState(ViewState.Busy); + await _pharmacyAddressService.deleteCustomerAddress(address); + if (_pharmacyAddressService.hasError) { + error = _pharmacyAddressService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + await Future.delayed(Duration(milliseconds: 800)); + getAddressesList(); + } + } + + Future saveSelectedAddressLocally(AddressInfo selectedAddress) async { + await sharedPref.setObject(PHARMACY_SELECTED_ADDRESS, selectedAddress); + } +} diff --git a/lib/core/viewModels/pharmacyModule/PrescriptionViewModel.dart b/lib/core/viewModels/pharmacyModule/PrescriptionViewModel.dart new file mode 100644 index 00000000..1d0cda79 --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/PrescriptionViewModel.dart @@ -0,0 +1,29 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/prescription_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../../locator.dart'; + +class PrescriptionViewModel extends BaseViewModel { + + PrescriptionService _prescriptionService = locator(); + + List get prescriptionsList => + _prescriptionService.prescriptionsList; + + getPrescription() async { + await getSavedLanguage(); + prescriptionsList.clear(); + if(prescriptionsList.isEmpty){ + setState(ViewState.Busy); + await _prescriptionService.getPrescription(); + if (_prescriptionService.hasError) { + error = _prescriptionService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + } +} \ No newline at end of file diff --git a/lib/core/viewModels/pharmacyModule/brand_view_model.dart b/lib/core/viewModels/pharmacyModule/brand_view_model.dart new file mode 100644 index 00000000..78a08ed8 --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/brand_view_model.dart @@ -0,0 +1,59 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/brandModel.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/topBrandsModel.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/brands_service.dart'; + + +import '../../../locator.dart'; + +class BrandsViewModel extends BaseViewModel{ + BrandsService _brandsService = locator(); + List get brandsListList => _brandsService.brandsList; + + BrandsService _topBrandsService = locator(); + List get topBrandsListList => _topBrandsService.topBrandsList; + + List get searchList => + _brandsService.searchList; + + bool hasError = false; + + + Future getBrandsData() async { + hasError = false; + setState(ViewState.Busy); + + await _brandsService.getBrands(); + if (_brandsService.hasError) { + error = _brandsService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future getTopBrandsData() async { + hasError = false; + setState(ViewState.Busy); + await _topBrandsService.getTopBrands(); + if (_topBrandsService.hasError) { + error = _topBrandsService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + + Future searchProducts({required String productName}) async { + hasError = false; + _brandsService.clearSearchList(); + setState(ViewState.Busy); + await _brandsService.searchProducts(productName: productName); + if (_brandsService.hasError) { + error = _brandsService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } +} \ No newline at end of file diff --git a/lib/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart b/lib/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart new file mode 100644 index 00000000..d115845b --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart @@ -0,0 +1,54 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/ListUserAgreement.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/lacum-registration-service.dart'; + +import '../../../locator.dart'; +import 'lacum-viewmodel.dart'; + +class LacumRegistrationViewModel extends LacumViewModel { + LacumRegistrationService _lacumService = locator(); + + ListUserAgreement get listUserAgreement => _lacumService.listUserAgreement!; + + Future checkLacumAccountActivation(String patientIdentificationNo) async { + setState(ViewState.Busy); + await _lacumService.getLacumAccountInformationById(patientIdentificationNo); + if (_lacumService.hasError) { + error = _lacumService.error!; + setState(ViewState.Error); + } else { + if (_lacumService.lacumInformation != null) { + if (_lacumService.lacumInformation!.yahalaAccountNo == 0) { + error = _lacumService.lacumInformation!.errorEndUserMessage!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + } + } + + Future getUserTermsAndConditionsForEPharmcy() async { + setState(ViewState.Busy); + await _lacumService.getUserTermsAndConditionsForEPharmcy(); + if (_lacumService.hasError) { + error = _lacumService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future createNewLakumAccount(String name, String phone, String identificationNo, int languageId) async { + setState(ViewState.Busy); + await _lacumService.createLakumAccount(name, phone, 0, identificationNo, languageId); + if (_lacumService.hasError) { + error = _lacumService.error!; + setState(ViewState.Error); + return 404; + } else { + setState(ViewState.Idle); + return 200; + } + } +} diff --git a/lib/core/viewModels/pharmacyModule/lacum-trasnfer-viewModel.dart b/lib/core/viewModels/pharmacyModule/lacum-trasnfer-viewModel.dart new file mode 100644 index 00000000..84f7910b --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/lacum-trasnfer-viewModel.dart @@ -0,0 +1,42 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/lacum-transfer-service.dart'; + +import '../../../locator.dart'; +import 'lacum-viewmodel.dart'; + +class LacumTranferViewModel extends LacumViewModel { + LacumTransferService _lacumService = locator(); + + LacumAccountInformation? get lacumReceiverInformation => + _lacumService.lacumReceiverInformation; + + Future getLacumGroupDataBuAccountId(String accountId) async { + setState(ViewState.Busy); + await _lacumService.getLacumGroupDataBuAccountId(accountId); + if (_lacumService.hasError) { + error = _lacumService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future transferYaHalaLoyaltyPoints(String points) async { + setState(ViewState.Busy); + await _lacumService.transferYaHalaLoyaltyPoints(points); + if (_lacumService.hasError) { + error = _lacumService.error!; + setState(ViewState.Error); + return 404; + } else { + setState(ViewState.Idle); + return 200; + } + } + + setLakumData(LacumAccountInformation lacumInformation, LacumAccountInformation lacumGroupInformation){ + _lacumService.lacumInformation = lacumInformation; + _lacumService.lacumGroupInformation = lacumGroupInformation; + } +} diff --git a/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart b/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart new file mode 100644 index 00000000..aa6f28aa --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart @@ -0,0 +1,107 @@ +import 'dart:async'; +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/lacum-service.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class LacumViewModel extends BaseViewModel { + LacumService _lacumService = locator(); + + LacumAccountInformation? get lacumInformation => _lacumService.lacumInformation; + + LacumAccountInformation? get lacumGroupInformation => _lacumService.lacumGroupInformation; + + String get successMsg => _lacumService.successMsg; + + Future getLacumData(String identificationNo) async { + await getLacumAccountData(identificationNo); + getLacumGroupData(identificationNo); + } + + Future getLacumAccountData(String identificationNo) async { + setState(ViewState.Busy); + await _lacumService.getLacumAccountInformation(identificationNo); + if (_lacumService.hasError) { + error = _lacumService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getLacumGroupData(String identificationNo) async { + setState(ViewState.Busy); + await _lacumService.getLacumGroupInformation(identificationNo); + if (_lacumService.hasError) { + error = _lacumService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future makeAccountActivate(String identificationNo) async { + setState(ViewState.Busy); + await _lacumService.makeAccountActivate(); + if (_lacumService.hasError) { + error = _lacumService.error!; + setState(ViewState.Error); + } else { + lacumGroupInformation?.lakumInquiryInformationObjVersion?.accountStatus = "Active"; + getLacumAccountData(identificationNo); + } + } + + Future makeAccountDeactivate(String identificationNo) async { + setState(ViewState.Busy); + await _lacumService.makeAccountDeactivate(); + if (_lacumService.hasError) { + error = _lacumService.error!; + setState(ViewState.Error); + } else { + lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus = "Cancelled"; + getLacumAccountData(identificationNo); + } + } + + Future createLakumAccount(String name, String phone) async { + setState(ViewState.BusyLocal); + await _lacumService.createLakumAccount(name, phone, lacumInformation!.yahalaAccountNo!, lacumInformation!.identificationNo!, null); + if (_lacumService.hasError) { + error = _lacumService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + String formatCreatedDateToString() { + DateTime createdDate = DateUtil.convertStringToDate(lacumGroupInformation!.lakumInquiryInformationObjVersion!.createdDate!); + return DateUtil.getFormattedDate(createdDate, "MMM dd,yyyy"); + } + + Uint8List convertBase64ToBarCodeImage() { + try { + final _byteImage = base64Decode(lacumGroupInformation!.lakumInquiryInformationObjVersion!.barCode!.split(',').last); + return _byteImage; + } catch (e) { + print(e); + return Uint8List(0); + } + } + + setLakumData(LacumAccountInformation lacumInformation, LacumAccountInformation lacumGroupInformation) { + _lacumService.lacumInformation = lacumInformation; + _lacumService.lacumGroupInformation = lacumGroupInformation; + } + + clearLakumGroupData() { + _lacumService.lacumGroupInformation = null; + } +} diff --git a/lib/core/viewModels/pharmacyModule/order_model_view_model.dart b/lib/core/viewModels/pharmacyModule/order_model_view_model.dart new file mode 100644 index 00000000..12d79b22 --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/order_model_view_model.dart @@ -0,0 +1,127 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCartResponse.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/payment-checkout-data.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/order-preview-service.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/cancelOrder_service.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/orderDetails_service.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/order_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class OrderModelViewModel extends BaseViewModel { + OrderService _orderService = locator(); + List get orders => _orderService.orderList; + + OrderDetailsService _orderDetailsService = locator(); + List get orderListModel => _orderDetailsService.orderList; + + CancelOrderService _cancelOrderService = locator(); + List get cancelOrder => _cancelOrderService.cancelOrderList; + + + OrderPreviewService _orderServices = locator(); + List get addresses => _orderServices.addresses; + LacumAccountInformation get lacumInformation => + _orderServices.lacumInformation!; + ShoppingCartResponse cartResponse = ShoppingCartResponse(); + PaymentCheckoutData paymentCheckoutData = PaymentCheckoutData(); + double totalAdditionalShippingCharge = 0; + + + + Future getOrder(customerId, customerGUID, pageID) async { + setState(ViewState.Busy); + await _orderService.getOrder(customerId, customerGUID, pageID); + if (_orderService.hasError) { + error = _orderService.error!; + setState(ViewState.Error); + } else { + //order = _orderService.orderList; + setState(ViewState.Idle); + } + } + + Future getOrderDetails(OrderId, orderGUID) async { + setState(ViewState.Busy); + await _orderDetailsService.getOrderDetails(OrderId, orderGUID); + if (_orderDetailsService.hasError) { + error = _orderDetailsService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + return _orderDetailsService.orderList.first; + } + + Future getProductReview() async { + setState(ViewState.Busy); + // await _orderService.getProductReview(); + if (_orderService.hasError) { + error = _orderService.error!; + setState(ViewState.Error); + } else { + //order = _orderService.orderList; + setState(ViewState.Idle); + } + } + + Future getCanceledOrder(order, context) async { + setState(ViewState.Busy); + dynamic res; + await _cancelOrderService.getCanceledOrder(order).then((value) { + res = value['success']['SuccessEndUserMsg']; + // AppToast.showSuccessToast(message: "Request Sent Successfully"); + AppToast.showSuccessToast(message: TranslationBase.of(context).requestSent); +// Navigator.pop(context); + }); + if (_cancelOrderService.hasError) { + error = _cancelOrderService.error!; + setState(ViewState.Error); + AppToast.showErrorToast(message: error); + } else { + setState(ViewState.Idle); +// AppToast.showSuccessToast(message: "Request Sent Successfully"); +// Navigator.push(context, +// MaterialPageRoute(builder: (context) => OrderPage())); + + } + + return res; + } + + Future makeReview(PharmacyProduct product, double rating, String reviewText) async { + setState(ViewState.Busy); + await _orderDetailsService.makeReview(product, rating, reviewText); + if (_orderDetailsService.hasError) { + error = _orderDetailsService.error!; + setState(ViewState.Error); + AppToast.showErrorToast(message: error); + } else { + setState(ViewState.Idle); + AppToast.showSuccessToast(message: TranslationBase.of(AppGlobal.context).submitReview); + // AppToast.showSuccessToast( + // message: "Your review has been Submitted successfully"); + } + } + + Future makeOrder() async { + /* setState(ViewState.Busy); + await _orderServices.makeOrder(paymentCheckoutData, cartResponse.shoppingCarts); + if (_orderServices.hasError) { + error = _orderServices.error; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + }*/ + } + +} diff --git a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart new file mode 100644 index 00000000..de50b1bc --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart @@ -0,0 +1,116 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart'; + +//import 'package:diplomaticquarterapp/core/model/prescriptions/perscription_pharmacy.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/recommendedProduct_service.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; + +import '../../../locator.dart'; + +class PharmacyModuleViewModel extends BaseViewModel { + PharmacyModuleService _pharmacyService = locator(); + + RecommendedProductService _recommendedProductService = locator(); + + List get bannerList => _pharmacyService.bannerItems; + + List get recommendedProductList => _recommendedProductService.recommendedList; + + Future generatePharmacyToken() async { + setState(ViewState.Busy); + await _pharmacyService.generatePharmacyToken(); + if (_pharmacyService.hasError) { + error = _pharmacyService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future verifyCustomer() async { + var data = await sharedPref.getObject(USER_PROFILE); + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + + setState(ViewState.Busy); + if (authenticatedUserObject.isLogin && data != null && customerId == null) { + await _pharmacyService.makeVerifyCustomer(data); + } + if (_pharmacyService.hasError) { + error = _pharmacyService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future createUser() async { + setState(ViewState.Busy); + await _pharmacyService.createUser(); + if (_pharmacyService.hasError) { + error = _pharmacyService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future getBannerList() async { + if (bannerList.isEmpty) { + GifLoaderDialogUtils.showMyDialog(locator().navigatorKey.currentContext!); + await _pharmacyService.getBannerListList(); + GifLoaderDialogUtils.hideDialog(locator().navigatorKey.currentContext!); + if (_pharmacyService.hasError) { + error = _pharmacyService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + } + + List getBannerImagesUrl(ProjectViewModel projectViewModel) { + List images =[]; + images.add('assets/images/pharmacy_module/pharmacy_logo_green.png'); + + if (projectViewModel.isArabic) + images.add('assets/images/pharmacy_module/offers_banner_ar.png'); + else + images.add('assets/images/pharmacy_module/offers_banner.png'); + + _pharmacyService.bannerItems.forEach((element) { + images.add(element.src!); + }); + + return images; + } + + getRecommendedProducts(productId) async { + setState(ViewState.Busy); + await _recommendedProductService.getRecommendedProducts(productId); + if (_recommendedProductService.hasError) { + error = _recommendedProductService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future checkUserIsActivated() async { + if (authenticatedUserObject.isLogin) { + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + if (customerId != null) { + return true; + } else { + return false; + } + } else { + // go to login page + return false; + } + } +} diff --git a/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart b/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart new file mode 100644 index 00000000..de48afd5 --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/product_detail_view_model.dart @@ -0,0 +1,161 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCart.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCartResponse.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/Wishlist.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/locationModel.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/productDetailModel.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/specification.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/product_detail_service.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; +import 'package:provider/provider.dart'; + +import '../../../locator.dart'; + +class ProductDetailViewModel extends BaseViewModel { + ProductDetailService _productDetailService = locator(); + + List get productDetailService => _productDetailService.productDetailList; + + List get productLocationService => _productDetailService.productLocationList; + + List get wishListItems => _productDetailService.wishListProducts; + + List get productSpecification => _productDetailService.productSpecification; + + bool hasError = false; + + num get stockQuantity => _productDetailService.stockQuantity!; + + String get stockAvailability => _productDetailService.stockAvailability!; + + String get stockAvailabilityn => _productDetailService.stockAvailabilityn!; + + bool get isStockAvailable => _productDetailService.isStockAvailable!; + + Future getProductReviewsData(productID) async { + hasError = false; + setState(ViewState.Busy); + await _productDetailService.getProductReviews(productID); + if (_productDetailService.hasError) { + error = _productDetailService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future getProductLocationData(String productSKU) async { + hasError = false; + setState(ViewState.BusyLocal); + await _productDetailService.getProductAvailabiltyDetail(productSKU); + if (_productDetailService.hasError) { + error = _productDetailService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future notifyMe(customerId, itemID) async { + hasError = false; + setState(ViewState.BusyLocal); + await _productDetailService.notifyMe(customerId, itemID); + if (_productDetailService.hasError) { + error = _productDetailService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future addToCartData(quantity, itemID, context) async { + hasError = false; + setState(ViewState.BusyLocal); + var resp = await _productDetailService.addToCart(quantity, itemID, context); + ShoppingCartResponse object = _handleGetShoppingCartResponse(resp); + if (_productDetailService.hasError) { + error = _productDetailService.error!; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + Provider.of(locator().navigatorKey.currentContext!, listen: false).setShoppingCartResponse(object); + } + } + + ShoppingCartResponse _handleGetShoppingCartResponse(Map res) { + ShoppingCartResponse cartResponse = ShoppingCartResponse(); + + if (res == null) { + error = "response is null"; + setState(ViewState.Error); + return ShoppingCartResponse(); + } + print(res); + cartResponse.itemCount = res["item_count"]; + cartResponse.quantityCount = res["quantity_count"]; + cartResponse.subtotal = res["subtotal"]; + cartResponse.subtotalWithVat = res["subtotal_with_vat"]; + cartResponse.subtotalVatAmount = res["subtotal_vat_amount"]; + cartResponse.subtotalVatRate = res["subtotal_vat_rate"]; + cartResponse.shoppingCarts =[]; + res["shopping_carts"].forEach((item) { + ShoppingCart shoppingCart = ShoppingCart.fromJson(item); + cartResponse.shoppingCarts!.add(shoppingCart); + }); + return cartResponse; + } + + Future addToWishlistData(itemID, context) async { + hasError = false; + setState(ViewState.BusyLocal); + GifLoaderDialogUtils.showMyDialog(locator().navigatorKey.currentContext!); + await _productDetailService.addToWishlist(itemID, context); + GifLoaderDialogUtils.hideDialog(locator().navigatorKey.currentContext!); + + if (_productDetailService.hasError) { + error = _productDetailService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future checkWishlistData() async { + hasError = false; + setState(ViewState.Busy); + await _productDetailService.getWishlistItems(); + if (_productDetailService.hasError) { + error = _productDetailService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future deleteWishlistData(itemID, context) async { + hasError = false; + setState(ViewState.BusyLocal); + GifLoaderDialogUtils.showMyDialog(locator().navigatorKey.currentContext!); + await _productDetailService.deleteItemFromWishlist(itemID, context); + GifLoaderDialogUtils.hideDialog(locator().navigatorKey.currentContext!); + + if (_productDetailService.hasError) { + error = _productDetailService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future productSpecificationData(itemID) async { + hasError = false; + setState(ViewState.Busy); + await _productDetailService.productSpecificationData(itemID); + if (_productDetailService.hasError) { + error = _productDetailService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + clearReview() { + productDetailService.clear(); + } +} diff --git a/lib/core/viewModels/pharmacyModule/review_view_model.dart b/lib/core/viewModels/pharmacyModule/review_view_model.dart new file mode 100644 index 00000000..00fd73fe --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/review_view_model.dart @@ -0,0 +1,26 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/reviewModel.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/review_service.dart'; + +import '../../../locator.dart'; + +class ReviewViewModel extends BaseViewModel{ + ReviewService _reviewService = locator(); + + List get reviewListList => _reviewService.reviewList; + + bool hasError = false; + + + Future getReviewData() async { + hasError = false; + setState(ViewState.Busy); + await _reviewService.getReview(); + if (_reviewService.hasError) { + error = _reviewService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } +} \ No newline at end of file diff --git a/lib/core/viewModels/pharmacyModule/tems-condition-viewmodel.dart b/lib/core/viewModels/pharmacyModule/tems-condition-viewmodel.dart new file mode 100644 index 00000000..f8684092 --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/tems-condition-viewmodel.dart @@ -0,0 +1,25 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/ListUserAgreement.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/terms-condition-service.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class TermsConditionViewModel extends BaseViewModel { + TermsConditionService _termsConditionService = locator(); + + ListUserAgreement get listUserAgreement => _termsConditionService.listUserAgreement!; + + Future getUserTermsAndConditionsForEPharmcy() async { + setState(ViewState.Busy); + await _termsConditionService.getUserTermsAndConditionsForEPharmcy(); + if (_termsConditionService.hasError) { + error = _termsConditionService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModels/pharmacyModule/wishlist_view_model.dart b/lib/core/viewModels/pharmacyModule/wishlist_view_model.dart new file mode 100644 index 00000000..4f26ad79 --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/wishlist_view_model.dart @@ -0,0 +1,25 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/Wishlist.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/wishList_service.dart'; + +import '../../../locator.dart'; + +class WishListViewModel extends BaseViewModel{ + WishListService _wishlistService = locator(); + + List get wishListList => _wishlistService.wishListProducts; + bool hasError = false; + + + Future getWishlistData({isLocalLoader = false}) async { + hasError = false; + setState(isLocalLoader ? ViewState.BusyLocal:ViewState.Busy); + await _wishlistService.getWishlist(); + if (_wishlistService.hasError) { + error = _wishlistService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } +} \ No newline at end of file diff --git a/lib/core/viewModels/pharmacy_categorise_view_model.dart b/lib/core/viewModels/pharmacy_categorise_view_model.dart new file mode 100644 index 00000000..e936ae71 --- /dev/null +++ b/lib/core/viewModels/pharmacy_categorise_view_model.dart @@ -0,0 +1,258 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/pharmacy_categorise.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/scan_qr_model.dart'; +import 'package:diplomaticquarterapp/core/service/pharmacy_categorise_service.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:flutter/cupertino.dart'; + +import 'base_view_model.dart'; + +class PharmacyCategoriseViewModel extends BaseViewModel { + bool hasError = false; + + int firstSubsetIndex = 0; + int inPatientPageSize = 20; + int lastSubsetIndex = 20; + + List filteredInPatientItems = []; + List filteredMyInPatientItems = []; + + PharmacyCategoriseService _pharmacyCategoriseService = locator(); + + List get categorise => _pharmacyCategoriseService.categoriseList; + + List get categoriseParent => _pharmacyCategoriseService.parentCategoriseList; + + List get parentProducts => _pharmacyCategoriseService.parentProductsList; + + List get subCategorise => _pharmacyCategoriseService.subCategoriseList; + + List get subProducts => _pharmacyCategoriseService.subProductsList; + + List get finalProducts => _pharmacyCategoriseService.finalProducts; + + List get brandsList => _pharmacyCategoriseService.brandsList; + + List get searchList => _pharmacyCategoriseService.searchList; + + List get scanList => _pharmacyCategoriseService.scanList; + + Future getCategorise() async { + hasError = false; + // _insuranceCardService.clearInsuranceCard(); + setState(ViewState.Busy); + await _pharmacyCategoriseService.getCategorise(); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future getBrands({String? id}) async { + hasError = false; + // _insuranceCardService.clearInsuranceCard(); + setState(ViewState.Busy); + await _pharmacyCategoriseService.getBrands(id: id!); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future scanQr({String? id}) async { + hasError = false; + // _insuranceCardService.clearInsuranceCard(); + setState(ViewState.Busy); + await _pharmacyCategoriseService.scanQr(id: id!); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + clearSearchList() { + _pharmacyCategoriseService.clearSearchList(); + } + + Future searchProducts({String? productName}) async { + hasError = false; + _pharmacyCategoriseService.clearSearchList(); + setState(ViewState.Busy); + await _pharmacyCategoriseService.searchProducts(productName: productName!); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future getCategoriseParent({String? i, int? pageIndex, bool? isLoading, BuildContext? context}) async { + hasError = false; + // _insuranceCardService.clearInsuranceCard(); + setState(ViewState.Busy); + // GifLoaderDialogUtils.showMyDialog(context); + await _pharmacyCategoriseService.getCategoriseParent(id: i!); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.ErrorLocal); + } else + await getBrands(id: i); + await getParentProducts(i: i, pageIndex: pageIndex, isLoading: isLoading, context: context); + // GifLoaderDialogUtils.showMyDialog(context); + } + + Future getParentProducts({String? i, int? pageIndex, bool? isLoading, BuildContext? context}) async { + hasError = false; + // _insuranceCardService.clearInsuranceCard(); + setState(ViewState.BusyLocal); + GifLoaderDialogUtils.showMyDialog(context!); + await _pharmacyCategoriseService.getParentProducts(id: i, pageNumber: pageIndex, isLoading: isLoading!); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + GifLoaderDialogUtils.hideDialog(context); + } + + Future getSubCategorise({String? i, int? pageIndex, bool isLoading = false, BuildContext? context}) async { + hasError = false; + // _insuranceCardService.clearInsuranceCard(); + setState(ViewState.Busy); + await _pharmacyCategoriseService.getSubCategorise( + id: i!, + ); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.ErrorLocal); + } else + getSubProducts(i: i, pageIndex: pageIndex, isLoading: isLoading, context: context); + } + + Future getSubProducts({String? i, int? pageIndex, bool isLoading = false, BuildContext? context}) async { + hasError = false; + // _insuranceCardService.clearInsuranceCard(); + setState(ViewState.BusyLocal); + GifLoaderDialogUtils.showMyDialog(context!); + await _pharmacyCategoriseService.getSubProducts(id: i, pageIndex: pageIndex, isLoading: isLoading); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + GifLoaderDialogUtils.hideDialog(context!); + } + + Future getFinalProducts({String? i}) async { + hasError = false; + // _insuranceCardService.clearInsuranceCard(); + setState(ViewState.Busy); + await _pharmacyCategoriseService.getFinalProducts(id: i!); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future getFilteredProducts({String? categoryId, String? brandId, String? min, String? max}) async { + hasError = false; + // _insuranceCardService.clearInsuranceCard(); + setState(ViewState.Busy); + await _pharmacyCategoriseService.getFilteredProducts(categoryId: categoryId, brandId: brandId, max: max, min: min); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future getFilteredSubProducts({String? categoryId, String? brandId, String? min, String? max}) async { + hasError = false; + // _insuranceCardService.clearInsuranceCard(); + setState(ViewState.Busy); + await _pharmacyCategoriseService.getFilteredSubProducts(categoryId: categoryId, brandId: brandId, max: max, min: min); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future getManufacturerProducts(String id) async { + setState(ViewState.Busy); + await _pharmacyCategoriseService.getManufacturerProducts(id); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getLastVisitedProducts() async { + setState(ViewState.Busy); + await _pharmacyCategoriseService.getLastVisitedProducts(); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getBestSellerProducts() async { + setState(ViewState.Busy); + await _pharmacyCategoriseService.getBestSellerProducts(); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getMostViewedProducts() async { + setState(ViewState.Busy); + await _pharmacyCategoriseService.getMostViewedProducts(); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + Future getNewProducts() async { + setState(ViewState.Busy); + await _pharmacyCategoriseService.getNewProducts(); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + addOnFilteredList() { + if (lastSubsetIndex < parentProducts.length) { + firstSubsetIndex = firstSubsetIndex + (parentProducts.length - lastSubsetIndex < inPatientPageSize - 1 ? parentProducts.length - lastSubsetIndex : inPatientPageSize - 1); + lastSubsetIndex = lastSubsetIndex + (parentProducts.length - lastSubsetIndex < inPatientPageSize - 1 ? parentProducts.length - lastSubsetIndex : inPatientPageSize - 1); + filteredInPatientItems.addAll(parentProducts.sublist(firstSubsetIndex, lastSubsetIndex)); + setState(ViewState.Idle); + } + } + + removeOnFilteredList() { + if (lastSubsetIndex - inPatientPageSize - 1 > 0) { + filteredInPatientItems.removeAt(lastSubsetIndex - inPatientPageSize - 1); + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModels/product_categories_view_model.dart b/lib/core/viewModels/product_categories_view_model.dart new file mode 100644 index 00000000..2508f557 --- /dev/null +++ b/lib/core/viewModels/product_categories_view_model.dart @@ -0,0 +1,27 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/pharmacy_categorise.dart'; +import 'package:diplomaticquarterapp/core/service/pharmacy_categorise_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; + +class ProductCategoriesViewModel extends BaseViewModel { + bool hasError = false; + + PharmacyCategoriseService _pharmacyCategoriseService = + locator(); + + List get categorise => + _pharmacyCategoriseService.categoriseList; + + Future getCategorise() async { + hasError = false; + // _insuranceCardService.clearInsuranceCard(); + setState(ViewState.Busy); + await _pharmacyCategoriseService.getCategorise(); + if (_pharmacyCategoriseService.hasError) { + error = _pharmacyCategoriseService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart new file mode 100644 index 00000000..238ee0f5 --- /dev/null +++ b/lib/core/viewModels/project_view_model.dart @@ -0,0 +1,274 @@ +import 'dart:async'; + +import 'package:connectivity_plus/connectivity_plus.dart'; +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/privilege/HMCProjectListModel.dart'; +import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart'; +import 'package:diplomaticquarterapp/core/model/privilege/ProjectDetailListModel.dart'; +import 'package:diplomaticquarterapp/core/model/privilege/VidaPlusProjectListModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/laser_body_parts.dart'; +import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart'; +import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart'; + +import '../../models/Appointments/DoctorListResponse.dart'; + +bool isAppArabic = false; + +class ProjectViewModel extends BaseViewModel { + GAnalytics get analytics => locator(); + + // Platform Bridge + PlatformBridge platformBridge() { + return PlatformBridge.shared(); + } + + AppSharedPreferences sharedPref = AppSharedPreferences(); + Locale _appLocale = Locale('ar'); + String currentLanguage = 'ar'; + bool _isArabic = true; + bool isInternetConnection = true; + bool isLoading = false; + bool isError = false; + String error = ''; + dynamic searchvalue; + bool isLogin = false; + bool _isAllAppointmentsLoaded = false; + + bool get isAllAppointmentsLoaded => _isAllAppointmentsLoaded; + bool isPatientAdmitted = false; + bool patientHasAdmissionRequest = false; + int inPatientProjectID = 0; + GetAdmissionInfoResponseModel getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel(); + GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel(); + + bool isIndoorNavigationEnabled = true; + + int waitingAppointmentProjectID = 0; + DoctorList? waitingAppointmentDoctor; + String waitingAppointmentNFCCode = ""; + + setWaitingAppointmentDoctor(DoctorList waitingAppointmentDoctor) { + this.waitingAppointmentDoctor = waitingAppointmentDoctor; + notifyListeners(); + } + + setWaitingAppointmentNFCCode(String waitingAppointmentNFCCode) { + this.waitingAppointmentNFCCode = waitingAppointmentNFCCode; + notifyListeners(); + } + + setWaitingAppointmentProjectID(int projectID) { + this.waitingAppointmentProjectID = projectID; + notifyListeners(); + } + + void setIsAllAppointmentsLoaded(bool value) { + _isAllAppointmentsLoaded = value; + notifyListeners(); + } + + RegisterInfoResponse _registerInfo = RegisterInfoResponse(); + + RegisterInfoResponse get registerInfo => _registerInfo; + + dynamic get searchValue => searchvalue; + + Locale get appLocal => _appLocale; + + LocaleType get localeType => isArabic ? LocaleType.ar : LocaleType.en; + + bool get isArabic => _isArabic; + + bool isLoginChild = false; + List privilegeRootUser = []; + List privilegeChildUser = []; + List _vidaPlusProjectListModel = []; + List _hMCProjectListModel = []; + List _projectDetailListModel = []; + + List get privileges => isLoginChild ? privilegeChildUser : privilegeChildUser; + + List get vidaPlusProjectList => _vidaPlusProjectListModel; + + List get hMCProjectListModel => _hMCProjectListModel; + + List get projectDetailListModel => _projectDetailListModel; + + List selectedBodyPartList = []; + + late StreamSubscription subscription; + + late double _latitude = 0.0; + late double _longitude = 0.0; + + double get latitude => _latitude; + + double get longitude => _longitude; + + late int laserSelectionDuration = 0; + + ProjectViewModel() { + try { + loadSharedPrefLanguage(); + subscription = Connectivity().onConnectivityChanged.listen((ConnectivityResult result) { + if (result == ConnectivityResult.mobile) { + isInternetConnection = true; + } else if (result == ConnectivityResult.wifi) { + } else if (result == ConnectivityResult.none) { + isInternetConnection = false; + } + notifyListeners(); + }); + } catch (e) { + print(e); + } + } + + Future loadSharedPrefLanguage() async { + try { + currentLanguage = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + _appLocale = Locale(currentLanguage); + isAppArabic = _isArabic = currentLanguage == 'ar'; + notifyListeners(); + } catch (e) { + print(e); + } + } + + void changeLanguage(String lan) { + if (lan != "en" && currentLanguage != lan) { + _appLocale = Locale("ar"); + isAppArabic = _isArabic = true; + currentLanguage = 'ar'; + sharedPref.setString(APP_LANGUAGE, 'ar'); + } else if (lan != "ar" && currentLanguage != lan) { + _appLocale = Locale("en"); + isAppArabic = _isArabic = false; + currentLanguage = 'en'; + sharedPref.setString(APP_LANGUAGE, 'en'); + } + + notifyListeners(); + } + + setIsPatientAdmitted(bool isAdmitted) { + this.isPatientAdmitted = isAdmitted; + notifyListeners(); + } + + setIsIndoorNavigationEnabled(bool isEnabled) { + this.isIndoorNavigationEnabled = isEnabled; + notifyListeners(); + } + + setPatientHasAdmissionRequest(bool hasAdmissionRequest) { + this.patientHasAdmissionRequest = hasAdmissionRequest; + notifyListeners(); + } + + setInPatientProjectID(int projectID) { + this.inPatientProjectID = projectID; + notifyListeners(); + } + + setInPatientAdmissionInfo(GetAdmissionInfoResponseModel _getAdmissionInfoResponseModel) { + this.getAdmissionInfoResponseModel = _getAdmissionInfoResponseModel; + notifyListeners(); + } + + setInPatientAdmissionRequest(GetAdmissionRequestInfoResponseModel _getAdmissionRequestInfoResponseModel) { + this.getAdmissionRequestInfoResponseModel = _getAdmissionRequestInfoResponseModel; + notifyListeners(); + } + + setPrivilegeModelList({List? privilege}) { + this.isLoginChild = isLoginChild; + privilegeRootUser = privilege!; + + notifyListeners(); + } + + setVidaPlusProjectList(List vidaPlusProjectListModelInput) { + _vidaPlusProjectListModel = vidaPlusProjectListModelInput; + notifyListeners(); + } + + setProjectsDetailList(List projectDetailListModel) { + _projectDetailListModel = projectDetailListModel; + notifyListeners(); + } + + setHMCProjectList(List hMCProjectListModel) { + _hMCProjectListModel = hMCProjectListModel; + notifyListeners(); + } + + setPrivilege({privilegeList, bool isLoginChild = false}) { + List privilege = []; + + privilegeList['List'][0]['ListPrivilege'].forEach((item) { + privilege.add(PrivilegeModel.fromJson(item)); + }); + + this.isLoginChild = isLoginChild; + if (isLoginChild) + privilegeChildUser = privilege; + else + privilegeRootUser = privilege; + + notifyListeners(); + } + + setIsLoginChild({required bool isLoginChild}) { + this.isLoginChild = isLoginChild; + notifyListeners(); + } + + bool havePrivilege(int id) { + bool isHavePrivilege = false; + try { + if (isLoginChild) { + privilegeChildUser.forEach((element) { + if (element.iD == id) isHavePrivilege = element.privilege!; + }); + } else { + privilegeRootUser.forEach((element) { + if (element.iD == id) isHavePrivilege = element.privilege!; + }); + } + } catch (e) { + print(e); + } + return isHavePrivilege; + } + + @override + void dispose() { + if (subscription != null) subscription.cancel(); + super.dispose(); + } + + setSearchValue(data) { + searchvalue = data; + notifyListeners(); + } + + void setLatitudeLongitude(double lat, double long) { + _latitude = lat; + _longitude = long; + notifyListeners(); + } + + setRegisterData(RegisterInfoResponse data) { + _registerInfo = data; + notifyListeners(); + } +} diff --git a/lib/core/viewModels/qr_view_model.dart b/lib/core/viewModels/qr_view_model.dart new file mode 100644 index 00000000..7d952820 --- /dev/null +++ b/lib/core/viewModels/qr_view_model.dart @@ -0,0 +1,79 @@ +import 'dart:convert'; +import 'dart:io'; + +import 'package:barcode_scan2/barcode_scan2.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/qr/qr_parking_model.dart'; +import 'package:diplomaticquarterapp/core/service/qr_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; + +import '../../locator.dart'; + +class QrViewModel extends BaseViewModel { + QrService _qrService = locator(); + bool isSavePark = false; + QRParkingModel? qrParkingModel; + + readQr() async { + //TODO fix the barcode scan + String result = await readQR(); + var data = json.decode(result); + var qRParkingID = data['QRParkingID']; + setState(ViewState.BusyLocal); + await _qrService.getQRParkingByID(qRParkingID); + if (_qrService.hasError) { + error = _qrService.error!; + setState(ViewState.ErrorLocal); + } else { + if (_qrService.qRParkingList.length > 0) { + qrParkingModel = _qrService.qRParkingList[0]; + await sharedPref.setObject(IS_GO_TO_PARKING, qrParkingModel); + isSavePark = true; + setState(ViewState.Idle); + } else { + error = "Invalid Qr Code"; + setState(ViewState.ErrorLocal); + } + } + } + + readQR() async { + if (await PermissionService.isCameraEnabled()) { + return (await BarcodeScanner.scan()).rawContent; + } else { + if (Platform.isAndroid) { + Utils.showPermissionConsentDialog(AppGlobal.context, TranslationBase.of(AppGlobal.context).cameraPermissionDialog, () async { + await BarcodeScanner.scan().then((value) { + return value.rawContent; + //Chnanges by Aamir + }); + }); + } else { + return (await BarcodeScanner.scan()).rawContent; + } + } + } + + getIsSaveParking() async { + setState(ViewState.Busy); + var parking = await sharedPref.getObject(IS_GO_TO_PARKING); + if (parking != null) { + isSavePark = true; + qrParkingModel = QRParkingModel.fromJson(parking); + } + setState(ViewState.Busy); + } + + clearParking() async { + setState(ViewState.Busy); + await sharedPref.setObject(IS_GO_TO_PARKING, null); + isSavePark = false; + qrParkingModel = null; + setState(ViewState.Idle); + } +} diff --git a/lib/core/viewModels/vaccine_view_model.dart b/lib/core/viewModels/vaccine_view_model.dart new file mode 100644 index 00000000..e5ab9b7e --- /dev/null +++ b/lib/core/viewModels/vaccine_view_model.dart @@ -0,0 +1,65 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/vaccine/my_vaccine.dart'; +import 'package:diplomaticquarterapp/core/model/vaccine/vaccination_item.dart'; +import 'package:diplomaticquarterapp/core/service/vaccine_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; + +import '../../locator.dart'; +import 'base_view_model.dart'; + +class VaccineViewModel extends BaseViewModel { + bool hasError = false; + + VaccineService _vaccineService = locator(); + + List get vaccineList => _vaccineService.vaccineList; + List get vaccinationItemList => _vaccineService.vaccinationItemList; + + + Future getVaccine() async { + hasError = false; + setState(ViewState.Busy); + await _vaccineService.getMyVaccine(); + if (_vaccineService.hasError) { + error = _vaccineService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + Future getMyVaccinationItem() async { + hasError = false; + setState(ViewState.Busy); + await _vaccineService.getMyVaccinationItem(); + if (_vaccineService.hasError) { + error = _vaccineService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } + + Future getMyVaccinationOnHand({String? pItemCode}) async { + hasError = false; + setState(ViewState.Busy); + await _vaccineService.getMyVaccinationOnHand(pItemCode: pItemCode!); + if (_vaccineService.hasError) { + error = _vaccineService.error!; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future sendEmail({String? message}) async { + hasError = false; + setState(ViewState.BusyLocal); + await _vaccineService.sendEmail(); + if (_vaccineService.hasError) { + error = _vaccineService.error!; + setState(ViewState.ErrorLocal); + AppToast.showErrorToast(message: error); + } else { + AppToast.showSuccessToast(message: message!); + setState(ViewState.Idle); + } + } +} diff --git a/lib/core/viewModels/weather/weather_view_model.dart b/lib/core/viewModels/weather/weather_view_model.dart new file mode 100644 index 00000000..733c591d --- /dev/null +++ b/lib/core/viewModels/weather/weather_view_model.dart @@ -0,0 +1,27 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/weahter/weather_model.dart'; +import 'package:diplomaticquarterapp/core/service/weather_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../../locator.dart'; + +class WeatherViewModel extends BaseViewModel { + WeatherService _weatherService = locator(); + List get weatherIndicatorData => + _weatherService.weatherIndicatorData; + getWeatherData() async { + setState(ViewState.Busy); + + // if (id != null && projectID != null) { + // await _erService.getProjectAvgERWaitingTimeOrders( + // id: id, projectID: projectID); + // } else { + await _weatherService.getWeatherData(); + // } + if (_weatherService.hasError) { + error = _weatherService.error!; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } +} diff --git a/lib/d_q_icons_icons.dart b/lib/d_q_icons_icons.dart new file mode 100644 index 00000000..83335a36 --- /dev/null +++ b/lib/d_q_icons_icons.dart @@ -0,0 +1,98 @@ +/// Flutter icons DQIcons +/// Copyright (C) 2020 by original authors @ fluttericon.com, fontello.com +/// This font was generated by FlutterIcon.com, which is derived from Fontello. +/// +/// To use this font, place it in your fonts/ directory and include the +/// following in your pubspec.yaml +/// +/// flutter: +/// fonts: +/// - family: DQIcons +/// fonts: +/// - asset: fonts/DQIcons.ttf +/// +/// +/// +import 'package:flutter/widgets.dart'; + +class DQIcons { + DQIcons._(); + + static const _kFontFam = 'DQIcons'; + static const dynamic _kFontPkg = null; + + static const IconData blood_pressure = + IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData blood = + IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData bmi = + IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData heart = + IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData height = + IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData outline = + IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData thermometer = + IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData weight_scale = + IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData parking_icon = + IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData blood_type_icon = + IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData height_icon = + IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData online_payment_icon = + IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData search_medicine_icon = + IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData vital_sign_icon = + IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData weight_icon = + IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData my_medical_file = + IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData family = + IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData calendar__2_ = + IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData roboticon = + IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData cart_menu_icon = + IconData(0xe814, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData categories_menu_icon = + IconData(0xe815, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData hmg_logo_icon = + IconData(0xe816, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData user_menu_icon = + IconData(0xe817, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData cart_menu_icon_1 = + IconData(0xe818, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData categories_menu_icon_1 = + IconData(0xe819, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData hmg_logo_icon_1 = + IconData(0xe81a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData emo_cry = + IconData(0xe8b5, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData emo_shoot = + IconData(0xe8b6, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData emo_squint = + IconData(0xe8b7, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData emo_laugh = + IconData(0xe8b8, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData chrome = + IconData(0xe8c0, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData opera = + IconData(0xe8c1, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData ie = + IconData(0xe8c2, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData crown = + IconData(0xe8c3, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData crown_plus = + IconData(0xe8c4, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData crown_minus = + IconData(0xe8c5, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData marquee = + IconData(0xe8c6, fontFamily: _kFontFam, fontPackage: _kFontPkg); +} diff --git a/lib/extensions/list_extension.dart b/lib/extensions/list_extension.dart new file mode 100644 index 00000000..eeb3d6f3 --- /dev/null +++ b/lib/extensions/list_extension.dart @@ -0,0 +1,8 @@ +extension Unique on List { + List unique([Id Function(E element)? id, bool inplace = true]) { + final ids = Set(); + var list = inplace ? this : List.from(this); + list.retainWhere((x) => ids.add(id != null ? id(x) : x as Id)); + return list; + } +} \ No newline at end of file diff --git a/lib/extensions/string_extensions.dart b/lib/extensions/string_extensions.dart new file mode 100644 index 00000000..df9cb4f6 --- /dev/null +++ b/lib/extensions/string_extensions.dart @@ -0,0 +1,19 @@ +import 'dart:convert'; +import 'package:crypto/crypto.dart'; + +extension CapExtension on String { + String get toCamelCase => "${this[0].toUpperCase()}${this.substring(1)}"; + + String get inCaps => '${this[0].toUpperCase()}${this.substring(1)}'; + + String get allInCaps => this.toUpperCase(); + + String get capitalizeFirstofEach => this.trim().length > 0 ? this.trim().toLowerCase().split(" ").map((str) => str.isNotEmpty ? str.inCaps : str).join(" ") : ""; +} + +extension HashSha on String { + String get toSha256 { + var bytes = utf8.encode(this); + return sha256.convert(bytes).toString(); + } +} diff --git a/lib/firebase_options.dart b/lib/firebase_options.dart new file mode 100644 index 00000000..75513c06 --- /dev/null +++ b/lib/firebase_options.dart @@ -0,0 +1,72 @@ +// File generated by FlutterFire CLI. +// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members +import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; +import 'package:flutter/foundation.dart' + show defaultTargetPlatform, kIsWeb, TargetPlatform; + +/// Default [FirebaseOptions] for use with your Firebase apps. +/// +/// Example: +/// ```dart +/// import 'firebase_options.dart'; +/// // ... +/// await Firebase.initializeApp( +/// options: DefaultFirebaseOptions.currentPlatform, +/// ); +/// ``` +class DefaultFirebaseOptions { + static FirebaseOptions get currentPlatform { + if (kIsWeb) { + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for web - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + } + switch (defaultTargetPlatform) { + case TargetPlatform.android: + return android; + case TargetPlatform.iOS: + return ios; + case TargetPlatform.macOS: + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for macos - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + case TargetPlatform.windows: + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for windows - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + case TargetPlatform.linux: + throw UnsupportedError( + 'DefaultFirebaseOptions have not been configured for linux - ' + 'you can reconfigure this by running the FlutterFire CLI again.', + ); + default: + throw UnsupportedError( + 'DefaultFirebaseOptions are not supported for this platform.', + ); + } + } + + static const FirebaseOptions android = FirebaseOptions( + apiKey: 'AIzaSyDUfg6AKM1-00WyzpvLImUBC46wFrq9-qw', + appId: '1:815750722565:android:62281cd3e5df4063', + messagingSenderId: '815750722565', + projectId: 'api-project-815750722565', + databaseURL: 'https://api-project-815750722565.firebaseio.com', + storageBucket: 'api-project-815750722565.appspot.com', + ); + + static const FirebaseOptions ios = FirebaseOptions( + apiKey: 'AIzaSyDiXnCO00li4V7Ioa2YZ_M4ECxRsu_P9tA', + appId: '1:815750722565:ios:328ec247a81a2ca23c186c', + messagingSenderId: '815750722565', + projectId: 'api-project-815750722565', + databaseURL: 'https://api-project-815750722565.firebaseio.com', + storageBucket: 'api-project-815750722565.appspot.com', + androidClientId: '815750722565-m14h8mkosm7cnq6uh6rhqr54dn02d705.apps.googleusercontent.com', + iosClientId: '815750722565-da8p56le8bd6apsbm9eft0jjl1rtpgkt.apps.googleusercontent.com', + iosBundleId: 'com.HMG.HMG-Smartphone', + ); +} diff --git a/lib/generated/json/GeoZonesResponseModel_helper.dart b/lib/generated/json/GeoZonesResponseModel_helper.dart new file mode 100644 index 00000000..7cf3cc5f --- /dev/null +++ b/lib/generated/json/GeoZonesResponseModel_helper.dart @@ -0,0 +1,50 @@ +import 'package:diplomaticquarterapp/core/model/geofencing/responses/GeoZonesResponseModel.dart'; + +geoZonesResponseModelEntityFromJson(GeoZonesResponseModel data, Map json) { + if (json['GEOF_ID'] != null) { + data.geofId = json['GEOF_ID']?.toInt(); + } + if (json['Description'] != null) { + data.description = json['Description']?.toString(); + } + if (json['DescriptionN'] != null) { + data.descriptionN = json['DescriptionN']?.toString(); + } + if (json['Latitude'] != null) { + data.latitude = json['Latitude']?.toString(); + } + if (json['Longitude'] != null) { + data.longitude = json['Longitude']?.toString(); + } + if (json['Radius'] != null) { + data.radius = json['Radius']?.toInt(); + } + if (json['Type'] != null) { + data.type = json['Type']?.toInt(); + } + if (json['ProjectID'] != null) { + data.projectID = json['ProjectID']?.toInt(); + } + if (json['ImageURL'] != null) { + data.imageURL = json['ImageURL']?.toString(); + } + if (json['IsCity'] != null) { + data.isCity = json['IsCity']; + } + return data; +} + +Map geoZonesResponseModelEntityToJson(GeoZonesResponseModel entity) { + final Map data = new Map(); + data['GEOF_ID'] = entity.geofId; + data['Description'] = entity.description; + data['DescriptionN'] = entity.descriptionN; + data['Latitude'] = entity.latitude; + data['Longitude'] = entity.longitude; + data['Radius'] = entity.radius; + data['Type'] = entity.type; + data['ProjectID'] = entity.projectID; + data['ImageURL'] = entity.imageURL; + data['IsCity'] = entity.isCity; + return data; +} diff --git a/lib/generated/json/OfferCategoriesResponseModel_helper.dart b/lib/generated/json/OfferCategoriesResponseModel_helper.dart new file mode 100644 index 00000000..b6bb7d97 --- /dev/null +++ b/lib/generated/json/OfferCategoriesResponseModel_helper.dart @@ -0,0 +1,172 @@ +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart'; + +offerCategoriesResponseModelFromJson(PackagesCategoriesResponseModel data, Map json) { + if (json['id'] != null) { + data.id = json['id']; + } + if (json['name'] != null) { + data.name = json['name']?.toString(); + } + if (json['namen'] != null) { + data.namen = json['namen']?.toString(); + } + if (json['localized_names'] != null) { + data.localizedNames = []; + (json['localized_names'] as List).forEach((v) { + data.localizedNames!.add(new OfferCategoriesResponseModelLocalizedName().fromJson(v)); + }); + } + if (json['description'] != null) { + data.description = json['description']; + } + if (json['category_template_id'] != null) { + data.categoryTemplateId = json['category_template_id']?.toInt(); + } + if (json['meta_keywords'] != null) { + data.metaKeywords = json['meta_keywords']?.toString(); + } + if (json['meta_description'] != null) { + data.metaDescription = json['meta_description']?.toString(); + } + if (json['meta_title'] != null) { + data.metaTitle = json['meta_title']?.toString(); + } + if (json['parent_category_id'] != null) { + data.parentCategoryId = json['parent_category_id']?.toInt(); + } + if (json['page_size'] != null) { + data.pageSize = json['page_size']?.toInt(); + } + if (json['page_size_options'] != null) { + data.pageSizeOptions = json['page_size_options']?.toString(); + } + if (json['price_ranges'] != null) { + data.priceRanges = json['price_ranges']; + } + if (json['show_on_home_page'] != null) { + data.showOnHomePage = json['show_on_home_page']; + } + if (json['include_in_top_menu'] != null) { + data.includeInTopMenu = json['include_in_top_menu']; + } + if (json['has_discounts_applied'] != null) { + data.hasDiscountsApplied = json['has_discounts_applied']; + } + if (json['published'] != null) { + data.published = json['published']; + } + if (json['deleted'] != null) { + data.deleted = json['deleted']; + } + if (json['display_order'] != null) { + data.displayOrder = json['display_order']?.toInt(); + } + if (json['created_on_utc'] != null) { + data.createdOnUtc = json['created_on_utc']?.toString(); + } + if (json['updated_on_utc'] != null) { + data.updatedOnUtc = json['updated_on_utc']?.toString(); + } + if (json['role_ids'] != null) { + data.roleIds =[]; + data.roleIds!.addAll(json['role_ids']); + } + if (json['discount_ids'] != null) { + data.discountIds = []; + data.discountIds!.addAll(json['discount_ids']); + } + if (json['store_ids'] != null) { + data.storeIds =[]; + data.storeIds!.addAll(json['store_ids']); + } + if (json['image'] != null) { + data.image = new OfferCategoriesResponseModelImage().fromJson(json['image']); + } + if (json['se_name'] != null) { + data.seName = json['se_name']?.toString(); + } + if (json['is_leaf'] != null) { + data.isLeaf = json['is_leaf']; + } + return data; +} + +Map offerCategoriesResponseModelToJson(PackagesCategoriesResponseModel entity) { + final Map data = new Map(); + data['id'] = entity.id; + data['name'] = entity.name; + data['namen'] = entity.namen; + if (entity.localizedNames != null) { + data['localized_names'] = entity.localizedNames!.map((v) => v.toJson()).toList(); + } + data['description'] = entity.description; + data['category_template_id'] = entity.categoryTemplateId; + data['meta_keywords'] = entity.metaKeywords; + data['meta_description'] = entity.metaDescription; + data['meta_title'] = entity.metaTitle; + data['parent_category_id'] = entity.parentCategoryId; + data['page_size'] = entity.pageSize; + data['page_size_options'] = entity.pageSizeOptions; + data['price_ranges'] = entity.priceRanges; + data['show_on_home_page'] = entity.showOnHomePage; + data['include_in_top_menu'] = entity.includeInTopMenu; + data['has_discounts_applied'] = entity.hasDiscountsApplied; + data['published'] = entity.published; + data['deleted'] = entity.deleted; + data['display_order'] = entity.displayOrder; + data['created_on_utc'] = entity.createdOnUtc; + data['updated_on_utc'] = entity.updatedOnUtc; + if (entity.roleIds != null) { + data['role_ids'] = []; + } + if (entity.discountIds != null) { + data['discount_ids'] = []; + } + if (entity.storeIds != null) { + data['store_ids'] = []; + } + if (entity.image != null) { + data['image'] = entity.image!.toJson(); + } + data['se_name'] = entity.seName; + data['is_leaf'] = entity.isLeaf; + return data; +} + +offerCategoriesResponseModelLocalizedNameFromJson(OfferCategoriesResponseModelLocalizedName data, Map json) { + if (json['language_id'] != null) { + data.languageId = json['language_id']?.toInt(); + } + if (json['localized_name'] != null) { + data.localizedName = json['localized_name']?.toString(); + } + return data; +} + +Map offerCategoriesResponseModelLocalizedNameToJson(OfferCategoriesResponseModelLocalizedName entity) { + final Map data = new Map(); + data['language_id'] = entity.languageId; + data['localized_name'] = entity.localizedName; + return data; +} + +offerCategoriesResponseModelImageFromJson(OfferCategoriesResponseModelImage data, Map json) { + if (json['src'] != null) { + data.src = json['src']?.toString(); + } + if (json['thumb'] != null) { + data.thumb = json['thumb']; + } + if (json['attachment'] != null) { + data.attachment = json['attachment']; + } + return data; +} + +Map offerCategoriesResponseModelImageToJson(OfferCategoriesResponseModelImage entity) { + final Map data = new Map(); + data['src'] = entity.src; + data['thumb'] = entity.thumb; + data['attachment'] = entity.attachment; + return data; +} diff --git a/lib/generated/json/OfferProductsResponseModel_helper.dart b/lib/generated/json/OfferProductsResponseModel_helper.dart new file mode 100644 index 00000000..818de36a --- /dev/null +++ b/lib/generated/json/OfferProductsResponseModel_helper.dart @@ -0,0 +1,575 @@ +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; + +offerProductsResponseModelFromJson(PackagesResponseModel data, Map json) { + if (json['id'] != null) { + data.id = json['id']; + } + if (json['visible_individually'] != null) { + data.visibleIndividually = json['visible_individually']; + } + if (json['name'] != null) { + data.name = json['name']?.toString(); + } + if (json['namen'] != null) { + data.namen = json['namen']?.toString(); + } + if (json['localized_names'] != null) { + data.localizedNames = []; + (json['localized_names'] as List).forEach((v) { + data.localizedNames!.add(new OfferProductsResponseModelLocalizedName().fromJson(v)); + }); + } + if (json['short_description'] != null) { + data.shortDescription = json['short_description']?.toString(); + } + if (json['short_descriptionn'] != null) { + data.shortDescriptionn = json['short_descriptionn']?.toString(); + } + if (json['full_description'] != null) { + data.fullDescription = json['full_description']?.toString(); + } + if (json['full_descriptionn'] != null) { + data.fullDescriptionn = json['full_descriptionn']?.toString(); + } + if (json['markas_new'] != null) { + data.markasNew = json['markas_new']; + } + if (json['show_on_home_page'] != null) { + data.showOnHomePage = json['show_on_home_page']; + } + if (json['meta_keywords'] != null) { + data.metaKeywords = json['meta_keywords']; + } + if (json['meta_description'] != null) { + data.metaDescription = json['meta_description']; + } + if (json['meta_title'] != null) { + data.metaTitle = json['meta_title']; + } + if (json['allow_customer_reviews'] != null) { + data.allowCustomerReviews = json['allow_customer_reviews']; + } + if (json['approved_rating_sum'] != null) { + data.approvedRatingSum = json['approved_rating_sum']?.toInt(); + } + if (json['not_approved_rating_sum'] != null) { + data.notApprovedRatingSum = json['not_approved_rating_sum']?.toInt(); + } + if (json['approved_total_reviews'] != null) { + data.approvedTotalReviews = json['approved_total_reviews']?.toInt(); + } + if (json['not_approved_total_reviews'] != null) { + data.notApprovedTotalReviews = json['not_approved_total_reviews']?.toInt(); + } + if (json['sku'] != null) { + data.sku = json['sku']?.toString(); + } + if (json['is_rx'] != null) { + data.isRx = json['is_rx']; + } + if (json['prescription_required'] != null) { + data.prescriptionRequired = json['prescription_required']; + } + if (json['rx_message'] != null) { + data.rxMessage = json['rx_message']; + } + if (json['rx_messagen'] != null) { + data.rxMessagen = json['rx_messagen']; + } + if (json['manufacturer_part_number'] != null) { + data.manufacturerPartNumber = json['manufacturer_part_number']; + } + if (json['gtin'] != null) { + data.gtin = json['gtin']; + } + if (json['is_gift_card'] != null) { + data.isGiftCard = json['is_gift_card']; + } + if (json['require_other_products'] != null) { + data.requireOtherProducts = json['require_other_products']; + } + if (json['automatically_add_required_products'] != null) { + data.automaticallyAddRequiredProducts = json['automatically_add_required_products']; + } + if (json['is_download'] != null) { + data.isDownload = json['is_download']; + } + if (json['unlimited_downloads'] != null) { + data.unlimitedDownloads = json['unlimited_downloads']; + } + if (json['max_number_of_downloads'] != null) { + data.maxNumberOfDownloads = json['max_number_of_downloads']?.toInt(); + } + if (json['download_expiration_days'] != null) { + data.downloadExpirationDays = json['download_expiration_days']; + } + if (json['has_sample_download'] != null) { + data.hasSampleDownload = json['has_sample_download']; + } + if (json['has_user_agreement'] != null) { + data.hasUserAgreement = json['has_user_agreement']; + } + if (json['is_recurring'] != null) { + data.isRecurring = json['is_recurring']; + } + if (json['recurring_cycle_length'] != null) { + data.recurringCycleLength = json['recurring_cycle_length']?.toInt(); + } + if (json['recurring_total_cycles'] != null) { + data.recurringTotalCycles = json['recurring_total_cycles']?.toInt(); + } + if (json['is_rental'] != null) { + data.isRental = json['is_rental']; + } + if (json['rental_price_length'] != null) { + data.rentalPriceLength = json['rental_price_length']?.toInt(); + } + if (json['is_ship_enabled'] != null) { + data.isShipEnabled = json['is_ship_enabled']; + } + if (json['is_free_shipping'] != null) { + data.isFreeShipping = json['is_free_shipping']; + } + if (json['ship_separately'] != null) { + data.shipSeparately = json['ship_separately']; + } + if (json['additional_shipping_charge'] != null) { + data.additionalShippingCharge = json['additional_shipping_charge']?.toDouble(); + } + if (json['is_tax_exempt'] != null) { + data.isTaxExempt = json['is_tax_exempt']; + } + if (json['is_telecommunications_or_broadcasting_or_electronic_services'] != null) { + data.isTelecommunicationsOrBroadcastingOrElectronicServices = json['is_telecommunications_or_broadcasting_or_electronic_services']; + } + if (json['use_multiple_warehouses'] != null) { + data.useMultipleWarehouses = json['use_multiple_warehouses']; + } + if (json['manage_inventory_method_id'] != null) { + data.manageInventoryMethodId = json['manage_inventory_method_id']?.toInt(); + } + if (json['stock_quantity'] != null) { + data.stockQuantity = json['stock_quantity']?.toInt(); + } + if (json['stock_availability'] != null) { + data.stockAvailability = json['stock_availability']?.toString(); + } + if (json['stock_availabilityn'] != null) { + data.stockAvailabilityn = json['stock_availabilityn']?.toString(); + } + if (json['display_stock_availability'] != null) { + data.displayStockAvailability = json['display_stock_availability']; + } + if (json['display_stock_quantity'] != null) { + data.displayStockQuantity = json['display_stock_quantity']; + } + if (json['min_stock_quantity'] != null) { + data.minStockQuantity = json['min_stock_quantity']?.toInt(); + } + if (json['notify_admin_for_quantity_below'] != null) { + data.notifyAdminForQuantityBelow = json['notify_admin_for_quantity_below']?.toInt(); + } + if (json['allow_back_in_stock_subscriptions'] != null) { + data.allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions']; + } + if (json['order_minimum_quantity'] != null) { + data.orderMinimumQuantity = json['order_minimum_quantity']?.toInt(); + } + if (json['order_maximum_quantity'] != null) { + data.orderMaximumQuantity = json['order_maximum_quantity']?.toInt(); + } + if (json['allowed_quantities'] != null) { + data.allowedQuantities = json['allowed_quantities']; + } + if (json['allow_adding_only_existing_attribute_combinations'] != null) { + data.allowAddingOnlyExistingAttributeCombinations = json['allow_adding_only_existing_attribute_combinations']; + } + if (json['disable_buy_button'] != null) { + data.disableBuyButton = json['disable_buy_button']; + } + if (json['disable_wishlist_button'] != null) { + data.disableWishlistButton = json['disable_wishlist_button']; + } + if (json['available_for_pre_order'] != null) { + data.availableForPreOrder = json['available_for_pre_order']; + } + if (json['pre_order_availability_start_date_time_utc'] != null) { + data.preOrderAvailabilityStartDateTimeUtc = json['pre_order_availability_start_date_time_utc']; + } + if (json['call_for_price'] != null) { + data.callForPrice = json['call_for_price']; + } + if (json['price'] != null) { + data.price = json['price']?.toDouble(); + } + if (json['old_price'] != null) { + data.oldPrice = json['old_price']?.toDouble(); + } + if (json['product_cost'] != null) { + data.productCost = json['product_cost']?.toDouble(); + } + if (json['special_price'] != null) { + data.specialPrice = json['special_price']; + } + if (json['special_price_start_date_time_utc'] != null) { + data.specialPriceStartDateTimeUtc = json['special_price_start_date_time_utc']; + } + if (json['special_price_end_date_time_utc'] != null) { + data.specialPriceEndDateTimeUtc = json['special_price_end_date_time_utc']; + } + if (json['customer_enters_price'] != null) { + data.customerEntersPrice = json['customer_enters_price']; + } + if (json['minimum_customer_entered_price'] != null) { + data.minimumCustomerEnteredPrice = json['minimum_customer_entered_price']?.toDouble(); + } + if (json['maximum_customer_entered_price'] != null) { + data.maximumCustomerEnteredPrice = json['maximum_customer_entered_price']?.toDouble(); + } + if (json['baseprice_enabled'] != null) { + data.basepriceEnabled = json['baseprice_enabled']; + } + if (json['baseprice_amount'] != null) { + data.basepriceAmount = json['baseprice_amount']?.toDouble(); + } + if (json['baseprice_base_amount'] != null) { + data.basepriceBaseAmount = json['baseprice_base_amount']?.toDouble(); + } + if (json['has_tier_prices'] != null) { + data.hasTierPrices = json['has_tier_prices']; + } + if (json['has_discounts_applied'] != null) { + data.hasDiscountsApplied = json['has_discounts_applied']; + } + if (json['discount_name'] != null) { + data.discountName = json['discount_name']; + } + if (json['discount_namen'] != null) { + data.discountNamen = json['discount_namen']; + } + if (json['discount_description'] != null) { + data.discountDescription = json['discount_description']; + } + if (json['discount_Descriptionn'] != null) { + data.discountDescriptionn = json['discount_Descriptionn']; + } + if (json['discount_percentage'] != null) { + data.discountPercentage = json['discount_percentage']; + } + if (json['currency'] != null) { + data.currency = json['currency']?.toString(); + } + if (json['currencyn'] != null) { + data.currencyn = json['currencyn']?.toString(); + } + if (json['weight'] != null) { + data.weight = json['weight']?.toDouble(); + } + if (json['length'] != null) { + data.length = json['length']?.toDouble(); + } + if (json['width'] != null) { + data.width = json['width']?.toDouble(); + } + if (json['height'] != null) { + data.height = json['height']?.toDouble(); + } + if (json['available_start_date_time_utc'] != null) { + data.availableStartDateTimeUtc = json['available_start_date_time_utc']; + } + if (json['available_end_date_time_utc'] != null) { + data.availableEndDateTimeUtc = json['available_end_date_time_utc']; + } + if (json['display_order'] != null) { + data.displayOrder = json['display_order']?.toInt(); + } + if (json['published'] != null) { + data.published = json['published']; + } + if (json['deleted'] != null) { + data.deleted = json['deleted']; + } + if (json['created_on_utc'] != null) { + data.createdOnUtc = json['created_on_utc']?.toString(); + } + if (json['updated_on_utc'] != null) { + data.updatedOnUtc = json['updated_on_utc']?.toString(); + } + if (json['product_type'] != null) { + data.productType = json['product_type']?.toString(); + } + if (json['parent_grouped_product_id'] != null) { + data.parentGroupedProductId = json['parent_grouped_product_id']?.toInt(); + } + if (json['role_ids'] != null) { + data.roleIds =[]; + data.roleIds!.addAll(json['role_ids']); + } + if (json['discount_ids'] != null) { + data.discountIds = []; + data.discountIds!.addAll(json['discount_ids']); + } + if (json['store_ids'] != null) { + data.storeIds = []; + data.storeIds!.addAll(json['store_ids']); + } + + if (json['store_names'] != null) { + data.storeNames = []; + data.storeNames!.addAll(json['store_names']); + } + + if (json['manufacturer_ids'] != null) { + data.manufacturerIds = json['manufacturer_ids']?.map((v) => v?.toInt())?.toList()?.cast(); + } + if (json['reviews'] != null) { + data.reviews =[]; + data.reviews!.addAll(json['reviews']); + } + if (json['images'] != null) { + data.images = []; + (json['images'] as List).forEach((v) { + data.images!.add(new OfferProductsResponseModelImage().fromJson(v)); + }); + } + if (json['attributes'] != null) { + data.attributes = []; + data.attributes!.addAll(json['attributes']); + } + if (json['specifications'] != null) { + data.specifications = []; + (json['specifications'] as List).forEach((v) { + data.specifications!.add(new OfferProductsResponseModelSpecification().fromJson(v)); + }); + } + if (json['associated_product_ids'] != null) { + data.associatedProductIds = []; + data.associatedProductIds!.addAll(json['associated_product_ids']); + } + if (json['tags'] != null) { + data.tags = []; + data.tags!.addAll(json['tags']); + } + if (json['vendor_id'] != null) { + data.vendorId = json['vendor_id']?.toInt(); + } + if (json['se_name'] != null) { + data.seName = json['se_name']?.toString(); + } + return data; +} + +Map offerProductsResponseModelToJson(PackagesResponseModel entity) { + final Map data = new Map(); + data['id'] = entity.id; + data['visible_individually'] = entity.visibleIndividually; + data['name'] = entity.name; + data['namen'] = entity.namen; + if (entity.localizedNames != null) { + data['localized_names'] = entity.localizedNames!.map((v) => v.toJson()).toList(); + } + data['short_description'] = entity.shortDescription; + data['short_descriptionn'] = entity.shortDescriptionn; + data['full_description'] = entity.fullDescription; + data['full_descriptionn'] = entity.fullDescriptionn; + data['markas_new'] = entity.markasNew; + data['show_on_home_page'] = entity.showOnHomePage; + data['meta_keywords'] = entity.metaKeywords; + data['meta_description'] = entity.metaDescription; + data['meta_title'] = entity.metaTitle; + data['allow_customer_reviews'] = entity.allowCustomerReviews; + data['approved_rating_sum'] = entity.approvedRatingSum; + data['not_approved_rating_sum'] = entity.notApprovedRatingSum; + data['approved_total_reviews'] = entity.approvedTotalReviews; + data['not_approved_total_reviews'] = entity.notApprovedTotalReviews; + data['sku'] = entity.sku; + data['is_rx'] = entity.isRx; + data['prescription_required'] = entity.prescriptionRequired; + data['rx_message'] = entity.rxMessage; + data['rx_messagen'] = entity.rxMessagen; + data['manufacturer_part_number'] = entity.manufacturerPartNumber; + data['gtin'] = entity.gtin; + data['is_gift_card'] = entity.isGiftCard; + data['require_other_products'] = entity.requireOtherProducts; + data['automatically_add_required_products'] = entity.automaticallyAddRequiredProducts; + data['is_download'] = entity.isDownload; + data['unlimited_downloads'] = entity.unlimitedDownloads; + data['max_number_of_downloads'] = entity.maxNumberOfDownloads; + data['download_expiration_days'] = entity.downloadExpirationDays; + data['has_sample_download'] = entity.hasSampleDownload; + data['has_user_agreement'] = entity.hasUserAgreement; + data['is_recurring'] = entity.isRecurring; + data['recurring_cycle_length'] = entity.recurringCycleLength; + data['recurring_total_cycles'] = entity.recurringTotalCycles; + data['is_rental'] = entity.isRental; + data['rental_price_length'] = entity.rentalPriceLength; + data['is_ship_enabled'] = entity.isShipEnabled; + data['is_free_shipping'] = entity.isFreeShipping; + data['ship_separately'] = entity.shipSeparately; + data['additional_shipping_charge'] = entity.additionalShippingCharge; + data['is_tax_exempt'] = entity.isTaxExempt; + data['is_telecommunications_or_broadcasting_or_electronic_services'] = entity.isTelecommunicationsOrBroadcastingOrElectronicServices; + data['use_multiple_warehouses'] = entity.useMultipleWarehouses; + data['manage_inventory_method_id'] = entity.manageInventoryMethodId; + data['stock_quantity'] = entity.stockQuantity; + data['stock_availability'] = entity.stockAvailability; + data['stock_availabilityn'] = entity.stockAvailabilityn; + data['display_stock_availability'] = entity.displayStockAvailability; + data['display_stock_quantity'] = entity.displayStockQuantity; + data['min_stock_quantity'] = entity.minStockQuantity; + data['notify_admin_for_quantity_below'] = entity.notifyAdminForQuantityBelow; + data['allow_back_in_stock_subscriptions'] = entity.allowBackInStockSubscriptions; + data['order_minimum_quantity'] = entity.orderMinimumQuantity; + data['order_maximum_quantity'] = entity.orderMaximumQuantity; + data['allowed_quantities'] = entity.allowedQuantities; + data['allow_adding_only_existing_attribute_combinations'] = entity.allowAddingOnlyExistingAttributeCombinations; + data['disable_buy_button'] = entity.disableBuyButton; + data['disable_wishlist_button'] = entity.disableWishlistButton; + data['available_for_pre_order'] = entity.availableForPreOrder; + data['pre_order_availability_start_date_time_utc'] = entity.preOrderAvailabilityStartDateTimeUtc; + data['call_for_price'] = entity.callForPrice; + data['price'] = entity.price; + data['old_price'] = entity.oldPrice; + data['product_cost'] = entity.productCost; + data['special_price'] = entity.specialPrice; + data['special_price_start_date_time_utc'] = entity.specialPriceStartDateTimeUtc; + data['special_price_end_date_time_utc'] = entity.specialPriceEndDateTimeUtc; + data['customer_enters_price'] = entity.customerEntersPrice; + data['minimum_customer_entered_price'] = entity.minimumCustomerEnteredPrice; + data['maximum_customer_entered_price'] = entity.maximumCustomerEnteredPrice; + data['baseprice_enabled'] = entity.basepriceEnabled; + data['baseprice_amount'] = entity.basepriceAmount; + data['baseprice_base_amount'] = entity.basepriceBaseAmount; + data['has_tier_prices'] = entity.hasTierPrices; + data['has_discounts_applied'] = entity.hasDiscountsApplied; + data['discount_name'] = entity.discountName; + data['discount_namen'] = entity.discountNamen; + data['discount_description'] = entity.discountDescription; + data['discount_Descriptionn'] = entity.discountDescriptionn; + data['discount_percentage'] = entity.discountPercentage; + data['currency'] = entity.currency; + data['currencyn'] = entity.currencyn; + data['weight'] = entity.weight; + data['length'] = entity.length; + data['width'] = entity.width; + data['height'] = entity.height; + data['available_start_date_time_utc'] = entity.availableStartDateTimeUtc; + data['available_end_date_time_utc'] = entity.availableEndDateTimeUtc; + data['display_order'] = entity.displayOrder; + data['published'] = entity.published; + data['deleted'] = entity.deleted; + data['created_on_utc'] = entity.createdOnUtc; + data['updated_on_utc'] = entity.updatedOnUtc; + data['product_type'] = entity.productType; + data['parent_grouped_product_id'] = entity.parentGroupedProductId; + if (entity.roleIds != null) { + data['role_ids'] = []; + } + if (entity.discountIds != null) { + data['discount_ids'] = []; + } + if (entity.storeIds != null) { + data['store_ids'] = []; + } + data['manufacturer_ids'] = entity.manufacturerIds; + if (entity.reviews != null) { + data['reviews'] = []; + } + if (entity.images != null) { + data['images'] = entity.images!.map((v) => v.toJson()).toList(); + } + if (entity.attributes != null) { + data['attributes'] = []; + } + if (entity.specifications != null) { + data['specifications'] = entity.specifications!.map((v) => v.toJson()).toList(); + } + if (entity.associatedProductIds != null) { + data['associated_product_ids'] = []; + } + if (entity.tags != null) { + data['tags'] = []; + } + data['vendor_id'] = entity.vendorId; + data['se_name'] = entity.seName; + return data; +} + +offerProductsResponseModelLocalizedNameFromJson(OfferProductsResponseModelLocalizedName data, Map json) { + if (json['language_id'] != null) { + data.languageId = json['language_id']?.toInt(); + } + if (json['localized_name'] != null) { + data.localizedName = json['localized_name']?.toString(); + } + return data; +} + +Map offerProductsResponseModelLocalizedNameToJson(OfferProductsResponseModelLocalizedName entity) { + final Map data = new Map(); + data['language_id'] = entity.languageId; + data['localized_name'] = entity.localizedName; + return data; +} + +offerProductsResponseModelImageFromJson(OfferProductsResponseModelImage data, Map json) { + if (json['id'] != null) { + data.id = json['id']?.toInt(); + } + if (json['position'] != null) { + data.position = json['position']?.toInt(); + } + if (json['src'] != null) { + data.src = json['src']?.toString(); + } + if (json['thumb'] != null) { + data.thumb = json['thumb']?.toString(); + } + if (json['attachment'] != null) { + data.attachment = json['attachment']?.toString(); + } + return data; +} + +Map offerProductsResponseModelImageToJson(OfferProductsResponseModelImage entity) { + final Map data = new Map(); + data['id'] = entity.id; + data['position'] = entity.position; + data['src'] = entity.src; + data['thumb'] = entity.thumb; + data['attachment'] = entity.attachment; + return data; +} + +offerProductsResponseModelSpecificationFromJson(OfferProductsResponseModelSpecification data, Map json) { + if (json['id'] != null) { + data.id = json['id']?.toInt(); + } + if (json['display_order'] != null) { + data.displayOrder = json['display_order']?.toInt(); + } + if (json['default_value'] != null) { + data.defaultValue = json['default_value']?.toString(); + } + if (json['default_valuen'] != null) { + data.defaultValuen = json['default_valuen']?.toString(); + } + if (json['name'] != null) { + data.name = json['name']?.toString(); + } + if (json['nameN'] != null) { + data.nameN = json['nameN']?.toString(); + } + return data; +} + +Map offerProductsResponseModelSpecificationToJson(OfferProductsResponseModelSpecification entity) { + final Map data = new Map(); + data['id'] = entity.id; + data['display_order'] = entity.displayOrder; + data['default_value'] = entity.defaultValue; + data['default_valuen'] = entity.defaultValuen; + data['name'] = entity.name; + data['nameN'] = entity.nameN; + return data; +} diff --git a/lib/generated/json/base/json_convert_content.dart b/lib/generated/json/base/json_convert_content.dart new file mode 100644 index 00000000..c4d393c3 --- /dev/null +++ b/lib/generated/json/base/json_convert_content.dart @@ -0,0 +1,154 @@ +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: camel_case_types +// ignore_for_file: prefer_single_quotes + +import 'package:diplomaticquarterapp/core/model/geofencing/responses/GeoZonesResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/geofencing/responses/LogGeoZoneResponseModel.dart'; + +// This file is automatically generated. DO NOT EDIT, all your changes would be lost. +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; +import 'package:diplomaticquarterapp/generated/json/GeoZonesResponseModel_helper.dart'; +import 'package:diplomaticquarterapp/generated/json/OfferCategoriesResponseModel_helper.dart'; +import 'package:diplomaticquarterapp/generated/json/OfferProductsResponseModel_helper.dart'; +import 'package:diplomaticquarterapp/generated/json/log_geo_zone_response_model_entity_helper.dart'; + +class JsonConvert { + T fromJson(Map json) { + return _getFromJson(runtimeType, this, json); + } + + Map toJson() { + return _getToJson(runtimeType, this); + } + + static _getFromJson(Type type, data, json) { + switch (type) { + case PackagesCategoriesResponseModel: + return offerCategoriesResponseModelFromJson(data as PackagesCategoriesResponseModel, json) as T; + case OfferCategoriesResponseModelLocalizedName: + return offerCategoriesResponseModelLocalizedNameFromJson(data as OfferCategoriesResponseModelLocalizedName, json) as T; + case OfferCategoriesResponseModelImage: + return offerCategoriesResponseModelImageFromJson(data as OfferCategoriesResponseModelImage, json) as T; + case LogGeoZoneResponseModel: + return logGeoZoneResponseModelEntityFromJson(data as LogGeoZoneResponseModel, json) as T; + case PackagesResponseModel: + return offerProductsResponseModelFromJson(data as PackagesResponseModel, json) as T; + case OfferProductsResponseModelLocalizedName: + return offerProductsResponseModelLocalizedNameFromJson(data as OfferProductsResponseModelLocalizedName, json) as T; + case OfferProductsResponseModelImage: + return offerProductsResponseModelImageFromJson(data as OfferProductsResponseModelImage, json) as T; + case OfferProductsResponseModelSpecification: + return offerProductsResponseModelSpecificationFromJson(data as OfferProductsResponseModelSpecification, json) as T; + case GeoZonesResponseModel: + return geoZonesResponseModelEntityFromJson(data as GeoZonesResponseModel, json) as T; + } + return data as T; + } + + static _getToJson(Type type, data) { + switch (type) { + case PackagesCategoriesResponseModel: + return offerCategoriesResponseModelToJson(data as PackagesCategoriesResponseModel); + case OfferCategoriesResponseModelLocalizedName: + return offerCategoriesResponseModelLocalizedNameToJson(data as OfferCategoriesResponseModelLocalizedName); + case OfferCategoriesResponseModelImage: + return offerCategoriesResponseModelImageToJson(data as OfferCategoriesResponseModelImage); + case LogGeoZoneResponseModel: + return logGeoZoneResponseModelEntityToJson(data as LogGeoZoneResponseModel); + case PackagesResponseModel: + return offerProductsResponseModelToJson(data as PackagesResponseModel); + case OfferProductsResponseModelLocalizedName: + return offerProductsResponseModelLocalizedNameToJson(data as OfferProductsResponseModelLocalizedName); + case OfferProductsResponseModelImage: + return offerProductsResponseModelImageToJson(data as OfferProductsResponseModelImage); + case OfferProductsResponseModelSpecification: + return offerProductsResponseModelSpecificationToJson(data as OfferProductsResponseModelSpecification); + case GeoZonesResponseModel: + return geoZonesResponseModelEntityToJson(data as GeoZonesResponseModel); + } + return data as T; + } + + //Go back to a single instance by type + static _fromJsonSingle(json) { + String type = M.toString(); + if (type == (PackagesCategoriesResponseModel).toString()) { + return PackagesCategoriesResponseModel().fromJson(json); + } else if (type == (OfferCategoriesResponseModelLocalizedName).toString()) { + return OfferCategoriesResponseModelLocalizedName().fromJson(json); + } else if (type == (OfferCategoriesResponseModelImage).toString()) { + return OfferCategoriesResponseModelImage().fromJson(json); + } else if (type == (LogGeoZoneResponseModel).toString()) { + return LogGeoZoneResponseModel().fromJson(json); + } else if (type == (PackagesResponseModel).toString()) { + return PackagesResponseModel().fromJson(json); + } else if (type == (OfferProductsResponseModelLocalizedName).toString()) { + return OfferProductsResponseModelLocalizedName().fromJson(json); + } else if (type == (OfferProductsResponseModelImage).toString()) { + return OfferProductsResponseModelImage().fromJson(json); + } else if (type == (OfferProductsResponseModelSpecification).toString()) { + return OfferProductsResponseModelSpecification().fromJson(json); + } else if (type == (GeoZonesResponseModel).toString()) { + return GeoZonesResponseModel().fromJson(json); + } + return null; + } + + //list is returned by type + static M _getListChildType(List data) { + //Changed By Aamir + if ([] is M) { + return data.map((e) => PackagesCategoriesResponseModel().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => OfferCategoriesResponseModelLocalizedName().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => OfferCategoriesResponseModelImage().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => LogGeoZoneResponseModel().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => PackagesResponseModel().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => OfferProductsResponseModelLocalizedName().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => OfferProductsResponseModelImage().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => OfferProductsResponseModelSpecification().fromJson(e as Map)).toList() as M; + } else if ([] is M) { + return data.map((e) => GeoZonesResponseModel().fromJson(e as Map)).toList() as M; + } + return M as M; + } + + // static M _getListChildType(List data) { + // if (List() is M) { + // return data.map((e) => PackagesCategoriesResponseModel().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => OfferCategoriesResponseModelLocalizedName().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => OfferCategoriesResponseModelImage().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => LogGeoZoneResponseModel().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => PackagesResponseModel().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => OfferProductsResponseModelLocalizedName().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => OfferProductsResponseModelImage().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => OfferProductsResponseModelSpecification().fromJson(e)).toList() as M; + // } else if (List() is M) { + // return data.map((e) => GeoZonesResponseModel().fromJson(e)).toList() as M; + // } + // return null; + // } + + static M fromJsonAsT(json) { + if (json is List) { + return _getListChildType(json as List>); + //changed by Aamir added after As keyword + } else { + return _fromJsonSingle(json) as M; + } + } +} diff --git a/lib/generated/json/base/json_field.dart b/lib/generated/json/base/json_field.dart new file mode 100644 index 00000000..32632862 --- /dev/null +++ b/lib/generated/json/base/json_field.dart @@ -0,0 +1,21 @@ +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: camel_case_types +// ignore_for_file: prefer_single_quotes + +// This file is automatically generated. DO NOT EDIT, all your changes would be lost. + +class JSONField { + //Specify the parse field name + final String? name; + + //Specify the time resolution format + final String? format; + + //Whether to participate in toJson + final bool? serialize; + + //Whether to participate in fromMap + final bool? deserialize; + + const JSONField({this.name, this.format, this.serialize, this.deserialize}); +} diff --git a/lib/generated/json/log_geo_zone_response_model_entity_helper.dart b/lib/generated/json/log_geo_zone_response_model_entity_helper.dart new file mode 100644 index 00000000..28b8c996 --- /dev/null +++ b/lib/generated/json/log_geo_zone_response_model_entity_helper.dart @@ -0,0 +1,54 @@ +import 'package:diplomaticquarterapp/core/model/geofencing/responses/LogGeoZoneResponseModel.dart'; + +logGeoZoneResponseModelEntityFromJson(LogGeoZoneResponseModel data, Map json) { + if (json['LanguageID'] != null) { + data.languageID = json['LanguageID']?.toInt(); + } + if (json['ErrorCode'] != null) { + data.errorCode = json['ErrorCode']; + } + if (json['ErrorEndUserMessage'] != null) { + data.errorEndUserMessage = json['ErrorEndUserMessage']?.toString(); + } + if (json['ErrorEndUserMessageN'] != null) { + data.errorEndUserMessageN = json['ErrorEndUserMessageN']; + } + if (json['ErrorMessage'] != null) { + data.errorMessage = json['ErrorMessage']; + } + if (json['ErrorType'] != null) { + data.errorType = json['ErrorType']?.toInt(); + } + if (json['IsAuthenticated'] != null) { + data.isAuthenticated = json['IsAuthenticated']; + } + if (json['SuccessMsg'] != null) { + data.successMsg = json['SuccessMsg']; + } + if (json['SuccessMsgN'] != null) { + data.successMsgN = json['SuccessMsgN']; + } + if (json['statusCode'] != null) { + data.statusCode = json['statusCode']?.toInt(); + } + if (json['MessageStatus'] != null) { + data.messageStatus = json['MessageStatus']?.toInt(); + } + return data; +} + +Map logGeoZoneResponseModelEntityToJson(LogGeoZoneResponseModel entity) { + final Map data = new Map(); + data['LanguageID'] = entity.languageID; + data['ErrorCode'] = entity.errorCode; + data['ErrorEndUserMessage'] = entity.errorEndUserMessage; + data['ErrorEndUserMessageN'] = entity.errorEndUserMessageN; + data['ErrorMessage'] = entity.errorMessage; + data['ErrorType'] = entity.errorType; + data['IsAuthenticated'] = entity.isAuthenticated; + data['SuccessMsg'] = entity.successMsg; + data['SuccessMsgN'] = entity.successMsgN; + data['statusCode'] = entity.statusCode; + data['MessageStatus'] = entity.messageStatus; + return data; +} diff --git a/lib/locator.dart b/lib/locator.dart new file mode 100644 index 00000000..61ed983b --- /dev/null +++ b/lib/locator.dart @@ -0,0 +1,341 @@ +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart'; +import 'package:diplomaticquarterapp/core/service/ancillary_orders_service.dart'; +import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/prescription_service.dart'; +import 'package:diplomaticquarterapp/core/service/qr_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/MostViewedViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/product_categories_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/weather/weather_view_model.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_service.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/cancelOrder_service.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/order_service.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/recommendedProduct_service.dart'; +// import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart'; +// import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; +// import 'package:diplomaticquarterapp/services/pharmacy_services/order_service.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/review_service.dart'; +import 'package:diplomaticquarterapp/services/pharmacy_services/wishList_service.dart'; +import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; +import 'package:flutter_local_notifications/flutter_local_notifications.dart'; +import 'package:get_it/get_it.dart'; + +import 'analytics/google-analytics.dart'; +import 'core/service/AlHabibMedicalService/cmc_service.dart'; +import 'core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'core/service/AlHabibMedicalService/e_referral_service.dart'; +import 'core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; +import 'core/service/AlHabibMedicalService/home_health_care_service.dart'; +import 'core/service/AuthenticatedUserObject.dart'; +import 'core/service/PrescriptionDeliveryService.dart'; +import 'core/service/appointment_rate_service.dart'; +import 'core/service/blood/blood_details_servies.dart'; +import 'core/service/blood/blood_donation_service.dart'; +import 'core/service/childvaccines/add_new_child_service.dart'; +import 'core/service/childvaccines/child_vaccines_service.dart'; +import 'core/service/childvaccines/delete_baby_service.dart'; +import 'core/service/childvaccines/user_information_service.dart'; +import 'core/service/childvaccines/vaccination_table_service.dart'; +import 'core/service/contactus/finadus_service.dart'; +import 'core/service/contactus/livechat_service.dart'; +import 'core/service/dashboard_service.dart'; +import 'core/service/er/EdOnlineServices.dart'; +import 'core/service/er/am_service.dart'; +import 'core/service/er/er_service.dart'; +import 'core/service/feedback/feedback_service.dart'; +import 'core/service/geofencing/GeofencingServices.dart'; +import 'core/service/hospital_service.dart'; +import 'core/service/insurance_service.dart'; +import 'core/service/medical/ActiveMedicationsService.dart'; +import 'core/service/medical/AllergiesService.dart'; +import 'core/service/medical/BloodPressureService.dart'; +import 'core/service/medical/BloodSugarService.dart'; +import 'core/service/medical/EyeService.dart'; +import 'core/service/medical/PatientSickLeaveService.dart'; +import 'core/service/medical/WeightPressureService.dart'; +import 'core/service/medical/ask_doctor_services.dart'; +import 'core/service/medical/labs_service.dart'; +import 'core/service/medical/medical_service.dart'; +import 'core/service/medical/my_balance_service.dart'; +import 'core/service/medical/my_doctor_service.dart'; +import 'core/service/medical/prescriptions_service.dart'; +import 'core/service/medical/radiology_service.dart'; +import 'core/service/medical/reports_monthly_service.dart'; +import 'core/service/medical/reports_service.dart'; +import 'core/service/medical/vital_sign_service.dart'; +import 'core/service/notifications_service.dart'; +import 'core/service/offers_service.dart'; +import 'core/service/packages_offers/PackagesOffersServices.dart'; +import 'core/service/parmacyModule/lacum-registration-service.dart'; +import 'core/service/parmacyModule/lacum-service.dart'; +import 'core/service/parmacyModule/lacum-transfer-service.dart'; +import 'core/service/parmacyModule/order-preview-service.dart'; +import 'core/service/parmacyModule/parmacy_module_service.dart'; +import 'core/service/parmacyModule/terms-condition-service.dart'; +import 'core/service/pharmacies_service.dart'; +import 'core/service/pharmacy_categorise_service.dart'; +import 'core/service/privilege_service.dart'; +import 'core/service/termsConditionsService.dart'; +import 'core/service/vaccine_service.dart'; +import 'core/service/weather_service.dart'; +import 'core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; +import 'core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart'; +import 'core/viewModels/TermsConditionsViewModel.dart'; +import 'core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; +import 'core/viewModels/appointment_rate_view_model.dart'; +import 'core/viewModels/blooddonation/blood_details_view_model.dart'; +import 'core/viewModels/blooddonation/booddonation_view_model.dart'; +import 'core/viewModels/child_vaccines/add_new_child_view_model.dart'; +import 'core/viewModels/child_vaccines/child_vaccines_view_model.dart'; +import 'core/viewModels/child_vaccines/vaccination_table_view_model.dart'; +import 'core/viewModels/contactus/findus_view_model.dart'; +import 'core/viewModels/contactus/livechat_view_model.dart'; +import 'core/viewModels/er/EdOnlineViewModel.dart'; +import 'core/viewModels/er/am_request_view_model.dart'; +import 'core/viewModels/er/near_hospital_view_model.dart'; +import 'core/viewModels/er/rrt-view-model.dart'; +import 'core/viewModels/feedback/feedback_view_model.dart'; +import 'core/viewModels/hospital_view_model.dart'; +import 'core/viewModels/insurance_card_View_model.dart'; +import 'core/viewModels/medical/ActiveMedicationsViewModel.dart'; +import 'core/viewModels/medical/AllergiesViewModel.dart'; +import 'core/viewModels/medical/EyeViewModel.dart'; +import 'core/viewModels/medical/PrescriptionDeliveryViewModel.dart'; +import 'core/viewModels/medical/ask_doctor_view_model.dart'; +import 'core/viewModels/medical/blood_pressure_view_model.dart'; +import 'core/viewModels/medical/blood_sugar_view_model.dart'; +import 'core/viewModels/medical/labs_view_model.dart'; +import 'core/viewModels/medical/medical_view_model.dart'; +import 'core/viewModels/medical/my_balance_view_model.dart'; +import 'core/viewModels/medical/my_doctor_view_model.dart'; +import 'core/viewModels/medical/patient_sick_leave_view_model.dart'; +import 'core/viewModels/medical/prescriptions_view_model.dart'; +import 'core/viewModels/medical/radiology_view_model.dart'; +import 'core/viewModels/medical/reports_monthly_view_model.dart'; +import 'core/viewModels/medical/reports_view_model.dart'; +import 'core/viewModels/medical/vital_sign_view_model.dart'; +import 'core/viewModels/medical/weight_pressure_view_model.dart'; +import 'core/viewModels/notifications_view_model.dart'; +import 'core/viewModels/offers_Categorise_view_model.dart'; +import 'core/viewModels/packages_offers/PackagesOffersViewModel.dart'; +import 'core/viewModels/pharmacies_view_model.dart'; +import 'core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'core/viewModels/pharmacyModule/BestSellerViewModel.dart'; +import 'core/viewModels/pharmacyModule/BrandViewModel.dart'; +import 'core/viewModels/pharmacyModule/LastVisitedViewModel.dart'; +import 'core/viewModels/pharmacyModule/PrescriptionViewModel.dart'; +import 'core/viewModels/pharmacyModule/brand_view_model.dart'; +import 'core/viewModels/pharmacyModule/lacum-registration-viewModel.dart'; +import 'core/viewModels/pharmacyModule/lacum-trasnfer-viewModel.dart'; +import 'core/viewModels/pharmacyModule/lacum-viewmodel.dart'; +import 'core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'core/viewModels/pharmacyModule/product_detail_view_model.dart'; +import 'core/viewModels/pharmacyModule/review_view_model.dart'; +import 'core/viewModels/pharmacyModule/tems-condition-viewmodel.dart'; +import 'core/viewModels/pharmacyModule/wishlist_view_model.dart'; +import 'core/viewModels/pharmacy_categorise_view_model.dart'; +import 'core/viewModels/qr_view_model.dart'; +import 'core/viewModels/vaccine_view_model.dart'; +import 'core/viewModels/weather/weather_view_model.dart'; +import 'services/pharmacy_services/brands_service.dart'; +import 'services/pharmacy_services/orderDetails_service.dart'; +import 'services/pharmacy_services/pharmacyAddress_service.dart'; +import 'services/pharmacy_services/product_detail_service.dart'; + +GetIt locator = GetIt.instance; + +///di +void setupLocator() { + /// Others + locator.registerLazySingleton(() => FlutterLocalNotificationsPlugin()); + + /// Services + locator.registerLazySingleton(() => AuthenticatedUserObject()); + locator.registerLazySingleton(() => HospitalService()); + locator.registerLazySingleton(() => PharmacyService()); + locator.registerLazySingleton(() => MyDoctorService()); + locator.registerLazySingleton(() => PrescriptionsService()); + locator.registerLazySingleton(() => LabsService()); + locator.registerLazySingleton(() => RadiologyService()); + locator.registerLazySingleton(() => FeedbackService()); + locator.registerLazySingleton(() => InsuranceCardService()); + locator.registerLazySingleton(() => VitalSignService()); + locator.registerLazySingleton(() => MedicalService()); + locator.registerLazySingleton(() => NavigationService()); + locator.registerLazySingleton(() => ReportsService()); + locator.registerLazySingleton(() => DashboardService()); + locator.registerLazySingleton(() => AppointmentRateService()); + locator.registerLazySingleton(() => QrService()); + locator.registerFactory(() => VaccineService()); + locator.registerLazySingleton(() => ReportsMonthlyService()); + locator.registerLazySingleton(() => ErService()); + locator.registerLazySingleton(() => AmService()); + locator.registerLazySingleton(() => EReferralService()); + locator.registerLazySingleton(() => HomeHealthCareService()); + locator.registerLazySingleton(() => CMCService()); + + locator.registerLazySingleton(() => PatientSickLeaveService()); + locator.registerLazySingleton(() => MyBalanceService()); + locator.registerLazySingleton(() => BloodSugarService()); + locator.registerLazySingleton(() => BloodPressureService()); + locator.registerLazySingleton(() => WeightService()); + locator.registerLazySingleton(() => EyeService()); + locator.registerLazySingleton(() => ActiveMedicationsService()); + locator.registerLazySingleton(() => AskDoctorService()); + locator.registerLazySingleton(() => AllergiesService()); + locator.registerLazySingleton(() => FindusService()); + locator.registerLazySingleton(() => LiveChatService()); + locator.registerLazySingleton(() => H2OService()); + + locator.registerLazySingleton(() => BloodDonationService()); + locator.registerLazySingleton(() => BloodDetailsService()); + locator.registerLazySingleton(() => ChildVaccinesService()); + locator.registerLazySingleton(() => UserInformationService()); + locator.registerLazySingleton(() => CreteNewBabyService()); + locator.registerLazySingleton(() => DeleteBabyService()); + + locator.registerLazySingleton(() => VaccinationTableService()); + locator.registerLazySingleton(() => AncillaryOrdersService()); + locator.registerLazySingleton(() => EdOnlineServices()); + locator.registerLazySingleton(() => PayfortService()); + + //pharmacy + // locator.registerLazySingleton(() => PharmacyCategoriseService()); + // locator.registerLazySingleton(() => OffersCategoriseService()); + locator.registerLazySingleton(() => PharmacyCategoriseService()); + locator.registerLazySingleton(() => OffersCategoriseService()); + + locator.registerLazySingleton(() => NotificationService()); + locator.registerLazySingleton(() => PharmacyModuleService()); + locator.registerLazySingleton(() => WishListService()); + locator.registerLazySingleton(() => ReviewService()); + locator.registerLazySingleton(() => BrandsService()); + locator.registerLazySingleton(() => ProductDetailService()); + + locator.registerLazySingleton(() => OrderPreviewService()); + locator.registerLazySingleton(() => LacumService()); + locator.registerLazySingleton(() => LacumTransferService()); + locator.registerLazySingleton(() => LacumRegistrationService()); + locator.registerLazySingleton(() => OrderService()); + locator.registerLazySingleton(() => PharmacyAddressService()); + locator.registerLazySingleton(() => OrderDetailsService()); + locator.registerLazySingleton(() => CustomerAddressesService()); + // locator.registerLazySingleton(() => TermsConditionService()); + locator.registerLazySingleton(() => TermsConditionService()); + locator.registerLazySingleton(() => CancelOrderService()); + locator.registerLazySingleton(() => PrescriptionService()); + locator.registerLazySingleton(() => RecommendedProductService()); + + locator.registerLazySingleton(() => PrivilegeService()); + locator.registerLazySingleton(() => WeatherService()); + locator.registerLazySingleton(() => TermsConditionsService()); + locator.registerLazySingleton(() => BariatricsService()); + locator.registerLazySingleton(() => PrescriptionDeliveryService()); + + /// View Model + locator.registerFactory(() => HospitalViewModel()); + locator.registerFactory(() => PharmacyViewModel()); + locator.registerFactory(() => MyDoctorViewModel()); + locator.registerFactory(() => PrescriptionsViewModel()); + locator.registerFactory(() => ReportsViewModel()); + locator.registerFactory(() => LabsViewModel()); + locator.registerFactory(() => RadiologyViewModel()); + locator.registerFactory(() => FeedbackViewModel()); + locator.registerFactory(() => VaccineViewModel()); + locator.registerFactory(() => VitalSignViewModel()); + locator.registerFactory(() => InsuranceViewModel()); + locator.registerFactory(() => MedicalViewModel()); + locator.registerFactory(() => DashboardViewModel()); + locator.registerFactory(() => AppointmentRateViewModel()); + locator.registerFactory(() => QrViewModel()); + locator.registerFactory(() => ReportsMonthlyViewModel()); + locator.registerFactory(() => NearHospitalViewModel()); + locator.registerFactory(() => RRTViewModel()); + locator.registerFactory(() => AmRequestViewModel()); + locator.registerFactory(() => PatientSickLeaveViewMode()); + locator.registerFactory(() => MyBalanceViewModel()); + locator.registerFactory(() => EReferralViewModel()); + locator.registerFactory(() => FindusViewModel()); + locator.registerFactory(() => LiveChatViewModel()); + locator.registerFactory(() => BloodDonationViewModel()); + locator.registerFactory(() => BloodDeatailsViewModel()); + locator.registerFactory(() => ChildVaccinesViewModel()); + locator.registerFactory(() => UserInformationViewModel()); + locator.registerFactory(() => VaccinationTableViewModel()); + locator.registerFactory(() => OrderModelViewModel()); + locator.registerFactory(() => PharmacyAddressesViewModel()); + locator.registerFactory(() => TermsConditionViewModel()); + + locator.registerFactory(() => AddNewChildViewModel()); + locator.registerFactory(() => H2OViewModel()); + locator.registerFactory(() => BloodSugarViewMode()); + locator.registerFactory(() => BloodPressureViewMode()); + locator.registerFactory(() => WeightPressureViewModel()); + locator.registerFactory(() => EyeViewModel()); + locator.registerFactory(() => ActiveMedicationsViewModel()); + locator.registerFactory(() => AskDoctorViewModel()); + locator.registerFactory(() => PrescriptionDeliveryViewModel()); + + locator.registerFactory(() => AllergiesViewModel()); + locator.registerFactory(() => HomeHealthCareViewModel()); + locator.registerFactory(() => CMCViewModel()); + locator.registerFactory(() => NotificationViewModel()); + + locator.registerFactory(() => PharmacyModuleViewModel()); + locator.registerFactory(() => WishListViewModel()); + locator.registerFactory(() => ReviewViewModel()); + locator.registerFactory(() => BrandsViewModel()); + locator.registerFactory(() => ProductDetailViewModel()); + locator.registerFactory(() => WeatherViewModel()); + + // locator.registerFactory(() => OrderPreviewViewModel()); + locator.registerFactory(() => LacumViewModel()); + locator.registerFactory(() => LacumTranferViewModel()); + locator.registerFactory(() => LacumRegistrationViewModel()); + locator.registerFactory(() => EdOnlineViewModel()); + locator.registerFactory(() => ProductCategoriesViewModel()); + + //pharmacy + locator.registerFactory(() => PharmacyCategoriseViewModel()); + locator.registerFactory(() => OffersCategoriseViewModel()); + locator.registerFactory(() => BariatricsViewModel()); + + locator.registerFactory(() => PrescriptionViewModel()); + locator.registerFactory(() => BrandViewModel()); + locator.registerFactory(() => BestSellerViewModel()); + locator.registerFactory(() => LastVisitedViewModel()); + locator.registerFactory(() => MostViewedViewModel()); + locator.registerFactory(() => PayfortViewModel()); + + // Offer And Packages + //---------------------- + locator.registerLazySingleton( + () => OffersAndPackagesServices()); // offerPackagesServices Service + locator.registerFactory( + () => OfferCategoriesViewModel()); // Categories View Model + locator.registerFactory(() => PackagesViewModel()); // Products View Model + + //pharmacy + // locator.registerFactory(() => PharmacyCategoriseViewModel()); + // locator.registerFactory(() => OffersCategoriseViewModel()); + // Geofencing + // --------------------- + locator.registerLazySingleton( + () => GeofencingServices()); // Geofencing Services + locator.registerFactory(() => TermsConditionsViewModel()); + locator.registerFactory(() => AnciallryOrdersViewModel()); + + + // Google/Firebase Analytics + // --------------------------- + locator.registerFactory(() => GAnalytics()); + + locator.registerLazySingleton(() => BaseAppClient()); +} diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 00000000..03ac65fc --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,217 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:app_links/app_links.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/PharmacyPagesViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart'; +import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; +import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart'; +import 'package:diplomaticquarterapp/theme/theme_notifier.dart'; +import 'package:diplomaticquarterapp/theme/theme_value.dart'; +import 'package:diplomaticquarterapp/uitl/DeepLinkHandler.dart'; +import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; +import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:firebase_core/firebase_core.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:provider/provider.dart'; + +import 'config/size_config.dart'; +import 'core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'core/viewModels/project_view_model.dart'; +import 'locator.dart'; +import 'pages/pharmacies/compare-list.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + await Firebase.initializeApp(); + + // Pass all uncaught "fatal" errors from the framework to Crashlytics + // FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError; + + // Pass all uncaught asynchronous errors that aren't handled by the Flutter framework to Crashlytics + // PlatformDispatcher.instance.onError = (error, stack) { + // if (!kDebugMode) FirebaseCrashlytics.instance.recordError(error, stack, fatal: true); + // return true; + // }; + + setupLocator(); + HttpOverrides.global = MyHttpOverrides(); + + runApp(MyApp()); +} + +class MyApp extends StatefulWidget { + @override + _MyApp createState() => new _MyApp(); +} + +class MyHttpOverrides extends HttpOverrides { + @override + HttpClient createHttpClient(SecurityContext? context) { + return super.createHttpClient(context)..badCertificateCallback = (X509Certificate cert, String host, int port) => true; + } +} + +class _MyApp extends State { + // late AppUpdateInfo _updateInfo; + StreamSubscription? _linkSubscription; + final GlobalKey navigatorKey = GlobalKey(); + + //0537503378 + //1231755 + + //0567184134 mobile + //246305493 + + // checkForUpdate() { + // // todo need to verify 'imp' + // InAppUpdate.checkForUpdate().then((info) { + // print("checkForUpdate!!!"); + // print(info.toString()); + // if (info.immediateUpdateAllowed) { + // print("Immediate567184134 Allowed!!!"); + // InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString())); + // } + // }).catchError((e) { + // print(e.toString()); + // }); + // } + + @override + void initState() { + //ProjectViewModel projectProvider; + // projectProvider = Provider.of(context); + // var font = projectProvider.isArabic ? 'Cairo' : 'WorkSans'; + + // Re-enable once going live + // if (Platform.isAndroid) checkForUpdate(); + + ThemeNotifier(defaultTheme()); + initDeepLinks(); + super.initState(); + } + + void dispose() { + _linkSubscription?.cancel(); + + super.dispose(); + } + + Future initDeepLinks() async { + // Handle links + _linkSubscription = AppLinks().uriLinkStream.listen((uri) { + debugPrint('onAppLink: $uri'); + openAppLink(uri); + }); + } + + void openAppLink(Uri uri) { + print("the uri is $uri"); + DeepLinkHandler.instance.handleDeepLinkAndNavigation( + locator().navigatorKey.currentState, uri, context); + } + + @override + Widget build(BuildContext context) { + PlatformBridge.init(context); + AppGlobal.context = context; + + // SystemChrome.setPreferredOrientations([ + // DeviceOrientation.portraitUp, + // DeviceOrientationO.portraitDown, + // ]); + // final themeNotifier = Provider.of(context); + precacheImage(AssetImage('assets/images/powerd-by.jpg'), context); + + return LayoutBuilder( + builder: (context, constraints) { + return OrientationBuilder( + builder: (context, orientation) { + SizeConfig().init(constraints, orientation); + return MultiProvider( + providers: [ + ChangeNotifierProvider( + create: (context) => PharmacyPagesViewModel(), + ), + ChangeNotifierProvider( + create: (context) => ProjectViewModel(), + ), + ChangeNotifierProvider( + create: (context) => DashboardViewModel(), + ), + ChangeNotifierProvider( + create: (context) => ToDoCountProviderModel(), + ), + ChangeNotifierProvider( + create: (context) => SearchProvider(), + ), + ChangeNotifierProvider.value( + value: SearchProvider(), + ), + ChangeNotifierProvider( + create: (context) => ThemeNotifier( + defaultTheme(), + ), + ), + StreamProvider.value( + value: RobotProvider().intStream(), + initialData: RobotProvider().setValue({}), + ), + ChangeNotifierProvider( + create: (context) => CompareList(), + ), + ChangeNotifierProvider( + create: (context) => OrderPreviewViewModel(), + ), + ChangeNotifierProvider(create: (context) => PayfortViewModel()), + ], + child: Consumer( + builder: (context, projectProvider, child) => MaterialApp( + builder: (context, mchild) { + AppGlobal.projectViewModelContext = context; + return MediaQuery( + data: MediaQuery.of(context).copyWith( + textScaler: TextScaler.linear(1.0), + ), //set desired text scale factor here + child: mchild!); + // Container( + // color: Colors.blue, + // )); + }, + navigatorKey: locator().navigatorKey, + showSemanticsDebugger: false, + title: 'Dr. AlHabib', + locale: projectProvider.appLocal, + localizationsDelegates: [ + TranslationBaseDelegate(), + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + ], + supportedLocales: [ + const Locale('ar', ''), // Arabic + const Locale('en', ''), // English + ], + theme: Provider.of(context).getTheme(), + initialRoute: SPLASH, + // initialRoute: CALL_PAGE, + // initialRoute: OPENTOK_CALL_PAGE, + // initialRoute: PACKAGES_OFFERS, + // initialRoute: PACKAGES_ORDER_COMPLETED, + routes: routes, + debugShowCheckedModeBanner: false, + ), + ), + ); + }, + ); + }, + ); + } +} diff --git a/lib/models/Appointments/AppoimentAllHistoryResultList.dart b/lib/models/Appointments/AppoimentAllHistoryResultList.dart new file mode 100644 index 00000000..ac37f555 --- /dev/null +++ b/lib/models/Appointments/AppoimentAllHistoryResultList.dart @@ -0,0 +1,298 @@ +class AppoitmentAllHistoryResultList { + String? setupID; + dynamic? projectID; + dynamic? appointmentNo; + String? appointmentDate; + dynamic? appointmentDateN; + dynamic? appointmentType; + String? bookDate; + dynamic? patientType; + dynamic? patientID; + dynamic? clinicID; + dynamic? doctorID; + String? endDate; + String? startTime; + String? endTime; + dynamic? status; + dynamic? visitType; + dynamic? visitFor; + dynamic? patientStatusType; + dynamic? companyID; + dynamic? bookedBy; + String? bookedOn; + dynamic confirmedBy; + dynamic confirmedOn; + dynamic arrivalChangedBy; + dynamic arrivedOn; + dynamic editedBy; + dynamic editedOn; + dynamic doctorName; + dynamic doctorNameN; + String? statusDesc; + dynamic statusDescN; + bool? vitalStatus; + dynamic vitalSignAppointmentNo; + dynamic? episodeID; + dynamic? actualDoctorRate; + String? clinicName; + bool? complainExists; + String? doctorImageURL; + String? doctorNameObj; + dynamic? doctorRate; + dynamic decimalDoctorRate; + List? doctorSpeciality; + String? doctorTitle; + dynamic? gender; + String? genderDescription; + bool? iSAllowOnlineCheckedIN; + bool? isActiveDoctor; + bool? isActiveDoctorProfile; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + dynamic? isFollowup; + bool? isLiveCareAppointment; + bool? isInOutPatient; + bool? isMedicalReportRequested; + bool? isOnlineCheckedIN; + String? latitude; + dynamic listHISGetContactLensPerscription; + dynamic listHISGetGlassPerscription; + String? longitude; + dynamic? nextAction; + dynamic? noOfPatientsRate; + dynamic? originalClinicID; + dynamic? originalProjectID; + String? projectName; + String? qR; + int? remaniningHoursTocanPay; + bool? sMSButtonVisable; + dynamic? serviceID; + + AppoitmentAllHistoryResultList( + {this.setupID, + this.projectID, + this.appointmentNo, + this.appointmentDate, + this.appointmentDateN, + this.appointmentType, + this.bookDate, + this.patientType, + this.patientID, + this.clinicID, + this.doctorID, + this.endDate, + this.startTime, + this.endTime, + this.status, + this.visitType, + this.visitFor, + this.patientStatusType, + this.companyID, + this.bookedBy, + this.bookedOn, + this.confirmedBy, + this.confirmedOn, + this.arrivalChangedBy, + this.arrivedOn, + this.editedBy, + this.editedOn, + this.doctorName, + this.doctorNameN, + this.statusDesc, + this.statusDescN, + this.vitalStatus, + this.vitalSignAppointmentNo, + this.episodeID, + this.actualDoctorRate, + this.clinicName, + this.complainExists, + this.doctorImageURL, + this.doctorNameObj, + this.doctorRate, + this.decimalDoctorRate, + this.doctorSpeciality, + this.doctorTitle, + this.gender, + this.genderDescription, + this.iSAllowOnlineCheckedIN, + this.isActiveDoctor, + this.isActiveDoctorProfile, + this.isDoctorAllowVedioCall, + this.isExecludeDoctor, + this.isFollowup, + this.isLiveCareAppointment, + this.isMedicalReportRequested, + this.isOnlineCheckedIN, + this.latitude, + this.listHISGetContactLensPerscription, + this.listHISGetGlassPerscription, + this.longitude, + this.nextAction, + this.noOfPatientsRate, + this.originalClinicID, + this.originalProjectID, + this.projectName, + this.qR, + this.remaniningHoursTocanPay, + this.sMSButtonVisable, + this.serviceID}); + + AppoitmentAllHistoryResultList.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + appointmentNo = json['AppointmentNo']; + appointmentDate = json['AppointmentDate']; + appointmentDateN = json['AppointmentDateN']; + appointmentType = json['AppointmentType']; + bookDate = json['BookDate']; + patientType = json['PatientType']; + patientID = json['PatientID']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + endDate = json['EndDate']; + startTime = json['StartTime']; + endTime = json['EndTime']; + status = json['Status']; + visitType = json['VisitType']; + visitFor = json['VisitFor']; + patientStatusType = json['PatientStatusType']; + companyID = json['CompanyID']; + bookedBy = json['BookedBy']; + bookedOn = json['BookedOn']; + confirmedBy = json['ConfirmedBy']; + confirmedOn = json['ConfirmedOn']; + arrivalChangedBy = json['ArrivalChangedBy']; + arrivedOn = json['ArrivedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + doctorName = json['DoctorName']; + doctorNameN = json['DoctorNameN']; + statusDesc = json['StatusDesc']; + statusDescN = json['StatusDescN']; + vitalStatus = json['VitalStatus']; + vitalSignAppointmentNo = json['VitalSignAppointmentNo']; + episodeID = json['EpisodeID']; + actualDoctorRate = json['ActualDoctorRate']; + clinicName = json['ClinicName']; + complainExists = json['ComplainExists']; + doctorImageURL = json['DoctorImageURL']; + doctorNameObj = json['DoctorNameObj']; + doctorRate = json['DoctorRate']; + decimalDoctorRate = json['DecimalDoctorRate']; + doctorSpeciality = json['DoctorSpeciality'] != null + ? json['DoctorSpeciality'].cast() + : ["null"]; + doctorTitle = json['DoctorTitle']; + gender = json['Gender']; + genderDescription = json['GenderDescription']; + iSAllowOnlineCheckedIN = json['ISAllowOnlineCheckedIN']; + isActiveDoctor = json['IsActiveDoctor']; + isActiveDoctorProfile = json['IsActiveDoctorProfile']; + isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; + isExecludeDoctor = json['IsExecludeDoctor']; + isFollowup = json['IsFollowup']; + isLiveCareAppointment = json['IsLiveCareAppointment']; + isInOutPatient = json['IsInOutPatient']; + isMedicalReportRequested = json['IsMedicalReportRequested']; + isOnlineCheckedIN = json['IsOnlineCheckedIN']; + latitude = json['Latitude']; + listHISGetContactLensPerscription = + json['List_HIS_GetContactLensPerscription']; + listHISGetGlassPerscription = json['List_HIS_GetGlassPerscription']; + longitude = json['Longitude']; + nextAction = json['NextAction']; + noOfPatientsRate = json['NoOfPatientsRate']; + originalClinicID = json['OriginalClinicID']; + originalProjectID = json['OriginalProjectID']; + projectName = json['ProjectName']; + qR = json['QR']; + remaniningHoursTocanPay = json['RemaniningHoursTocanPay']; + sMSButtonVisable = json['SMSButtonVisable']; + serviceID = json['ServiceID']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['AppointmentNo'] = this.appointmentNo; + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentDateN'] = this.appointmentDateN; + data['AppointmentType'] = this.appointmentType; + data['BookDate'] = this.bookDate; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['EndDate'] = this.endDate; + data['StartTime'] = this.startTime; + data['EndTime'] = this.endTime; + data['Status'] = this.status; + data['VisitType'] = this.visitType; + data['VisitFor'] = this.visitFor; + data['PatientStatusType'] = this.patientStatusType; + data['CompanyID'] = this.companyID; + data['BookedBy'] = this.bookedBy; + data['BookedOn'] = this.bookedOn; + data['ConfirmedBy'] = this.confirmedBy; + data['ConfirmedOn'] = this.confirmedOn; + data['ArrivalChangedBy'] = this.arrivalChangedBy; + data['ArrivedOn'] = this.arrivedOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + data['DoctorName'] = this.doctorName; + data['DoctorNameN'] = this.doctorNameN; + data['StatusDesc'] = this.statusDesc; + data['StatusDescN'] = this.statusDescN; + data['VitalStatus'] = this.vitalStatus; + data['VitalSignAppointmentNo'] = this.vitalSignAppointmentNo; + data['EpisodeID'] = this.episodeID; + data['ActualDoctorRate'] = this.actualDoctorRate; + data['ClinicName'] = this.clinicName; + data['ComplainExists'] = this.complainExists; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorNameObj'] = this.doctorNameObj; + data['DoctorRate'] = this.doctorRate; + data['DecimalDoctorRate'] = this.decimalDoctorRate; + data['DoctorSpeciality'] = this.doctorSpeciality; + data['DoctorTitle'] = this.doctorTitle; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['ISAllowOnlineCheckedIN'] = this.iSAllowOnlineCheckedIN; + data['IsActiveDoctor'] = this.isActiveDoctor; + data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile; + data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; + data['IsExecludeDoctor'] = this.isExecludeDoctor; + data['IsFollowup'] = this.isFollowup; + data['IsLiveCareAppointment'] = this.isLiveCareAppointment; + data['IsInOutPatient'] = this.isInOutPatient; + data['IsMedicalReportRequested'] = this.isMedicalReportRequested; + data['IsOnlineCheckedIN'] = this.isOnlineCheckedIN; + data['Latitude'] = this.latitude; + data['List_HIS_GetContactLensPerscription'] = + this.listHISGetContactLensPerscription; + data['List_HIS_GetGlassPerscription'] = this.listHISGetGlassPerscription; + data['Longitude'] = this.longitude; + data['NextAction'] = this.nextAction; + data['NoOfPatientsRate'] = this.noOfPatientsRate; + data['OriginalClinicID'] = this.originalClinicID; + data['OriginalProjectID'] = this.originalProjectID; + data['ProjectName'] = this.projectName; + data['QR'] = this.qR; + data['RemaniningHoursTocanPay'] = this.remaniningHoursTocanPay; + data['SMSButtonVisable'] = this.sMSButtonVisable; + data['ServiceID'] = this.serviceID; + return data; + } +} + +class PatientAppointmentList { + String? filterName = ""; + List? patientDoctorAppointmentList =[]; + + PatientAppointmentList( + {this.filterName, + AppoitmentAllHistoryResultList? patientDoctorAppointment}) { + patientDoctorAppointmentList!.add(patientDoctorAppointment!); + } +} diff --git a/lib/models/Appointments/DentalChiefComplaintsModel.dart b/lib/models/Appointments/DentalChiefComplaintsModel.dart new file mode 100644 index 00000000..8314723d --- /dev/null +++ b/lib/models/Appointments/DentalChiefComplaintsModel.dart @@ -0,0 +1,48 @@ +class DentalChiefComplaintsModel { + List? listDentalChiefComplain; + + DentalChiefComplaintsModel({this.listDentalChiefComplain}); + + DentalChiefComplaintsModel.fromJson(Map json) { + if (json['List_DentalChiefComplain'] != null) { + listDentalChiefComplain = []; + json['List_DentalChiefComplain'].forEach((v) { + listDentalChiefComplain!.add(new ListDentalChiefComplain.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + if (this.listDentalChiefComplain != null) { + data['List_DentalChiefComplain'] = + this.listDentalChiefComplain!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class ListDentalChiefComplain { + int? projectID; + int? iD; + String? name; + String? nameN; + + ListDentalChiefComplain({this.projectID, this.iD, this.name, this.nameN}); + + ListDentalChiefComplain.fromJson(Map json) { + projectID = json['ProjectID']; + iD = json['ID']; + name = json['Name']; + nameN = json['NameN']; + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + data['ID'] = this.iD; + data['Name'] = this.name; + data['NameN'] = this.nameN; + return data; + } +} diff --git a/lib/models/Appointments/DentalProceduresModel.dart b/lib/models/Appointments/DentalProceduresModel.dart new file mode 100644 index 00000000..ca8e5eba --- /dev/null +++ b/lib/models/Appointments/DentalProceduresModel.dart @@ -0,0 +1,76 @@ +class DentalProceduresModel { + List? listIsPatientHasOnGoingEstimation; + + DentalProceduresModel({this.listIsPatientHasOnGoingEstimation}); + + DentalProceduresModel.fromJson(Map json) { + if (json['List_IsPatientHasOnGoingEstimation'] != null) { + listIsPatientHasOnGoingEstimation = + []; + json['List_IsPatientHasOnGoingEstimation'].forEach((v) { + listIsPatientHasOnGoingEstimation! + .add(new ListIsPatientHasOnGoingEstimation.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + if (this.listIsPatientHasOnGoingEstimation != null) { + data['List_IsPatientHasOnGoingEstimation'] = this + .listIsPatientHasOnGoingEstimation! + .map((v) => v.toJson()) + .toList(); + } + return data; + } +} + +class ListIsPatientHasOnGoingEstimation { + dynamic setupID; + dynamic estimationNo; + int? projectID; + String? procedureId; + int? patientID; + int? sequenceNo; + int? neededTime; + String? procedureName; + dynamic procedureNameN; + + ListIsPatientHasOnGoingEstimation( + {this.setupID, + this.estimationNo, + this.projectID, + this.procedureId, + this.patientID, + this.sequenceNo, + this.neededTime, + this.procedureName, + this.procedureNameN}); + + ListIsPatientHasOnGoingEstimation.fromJson(Map json) { + setupID = json['SetupID']; + estimationNo = json['EstimationNo']; + projectID = json['ProjectID']; + procedureId = json['ProcedureId']; + patientID = json['PatientID']; + sequenceNo = json['sequenceNo']; + neededTime = json['NeededTime']; + procedureName = json['ProcedureName']; + procedureNameN = json['ProcedureNameN']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['EstimationNo'] = this.estimationNo; + data['ProjectID'] = this.projectID; + data['ProcedureId'] = this.procedureId; + data['PatientID'] = this.patientID; + data['sequenceNo'] = this.sequenceNo; + data['NeededTime'] = this.neededTime; + data['ProcedureName'] = this.procedureName; + data['ProcedureNameN'] = this.procedureNameN; + return data; + } +} diff --git a/lib/models/Appointments/DoctorListResponse.dart b/lib/models/Appointments/DoctorListResponse.dart new file mode 100644 index 00000000..4dc65cfa --- /dev/null +++ b/lib/models/Appointments/DoctorListResponse.dart @@ -0,0 +1,425 @@ +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; + +class DoctorList { + int? clinicID; + dynamic appointmentNo; + String? clinicName; + String? doctorTitle; + num? iD; + String? name; + int? projectID; + String? projectName; + int? actualDoctorRate; + num? clinicRoomNo; + dynamic date; + dynamic appointmentDate; + dynamic dayName; + int? doctorID; + String? doctorImageURL; + dynamic doctorProfile; + dynamic doctorProfileInfo; + int? doctorRate; + num? gender; + String? genderDescription; + bool? isAppointmentAllowed; + bool? isDoctorAllowVedioCall; + bool? isDoctorDummy; + bool? isLiveCare; + bool? isLiveCareClinic; + bool? isDoctorHasPrePostImages; + String? latitude; + String? longitude; + String? nationalityFlagURL; + String? nationalityID; + String? nationalityName; + dynamic nearestFreeSlot; + int? noOfPatientsRate; + num? originalClinicID; + num? personRate; + dynamic projectDistanceInKiloMeters; + String? qR; + dynamic qRString; + num? rateNumber; + dynamic serviceID; + String? setupID; + List? speciality; + List? specialityN; + dynamic workingHours; + dynamic decimalDoctorRate; + String? projectBottomName; + String? projectTopName; + bool? isHMC; + String? region; + String? regionArabic; + String? regionEnglish; + String? regionID; + + DoctorList( + {this.clinicID, + this.appointmentNo, + this.clinicName, + this.doctorTitle, + this.iD, + this.name, + this.projectID, + this.projectName, + this.actualDoctorRate, + this.clinicRoomNo, + this.date, + this.appointmentDate, + this.dayName, + this.doctorID, + this.doctorImageURL, + this.doctorProfile, + this.doctorProfileInfo, + this.doctorRate, + this.gender, + this.genderDescription, + this.isAppointmentAllowed, + this.isDoctorAllowVedioCall, + this.isDoctorDummy, + this.isLiveCare, + this.isLiveCareClinic, + this.isDoctorHasPrePostImages, + 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.specialityN, + this.workingHours, + this.decimalDoctorRate, + this.projectBottomName, + this.projectTopName, + this.isHMC, + this.region, + this.regionArabic, + this.regionEnglish, + this.regionID, + }); + + DoctorList.fromJson( + Map json, + ) { + clinicID = json['ClinicID']; + appointmentNo = json['AppointmentNo']; + clinicName = json['ClinicName']; + doctorTitle = json['DoctorTitle']; + iD = json['ID']; + name = json['DoctorName'] ?? json['Name']; + projectID = json['ProjectID']; + projectName = json['ProjectName']; + actualDoctorRate = json['ActualDoctorRate']; + clinicRoomNo = json['ClinicRoomNo']; + date = json['Date']; + appointmentDate = json['AppointmentDate']; + dayName = json['DayName']; + doctorID = json['DoctorID']; + doctorImageURL = json['DoctorImageURL']; + doctorProfile = json['DoctorProfile']; + doctorProfileInfo = json['DoctorProfileInfo']; + doctorRate = json['DoctorRate']; + gender = json['Gender']; + genderDescription = json['GenderDescription']; + isAppointmentAllowed = json['IsAppointmentAllowed']; + isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; + isDoctorDummy = json['IsDoctorDummy']; + isLiveCare = json['IsLiveCare']; + isLiveCareClinic = json['IsLiveCareClinic']; + isDoctorHasPrePostImages = json['IsDoctorHasPrePostImages']; + 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']; + if (json.containsKey('Speciality') && json['Speciality'] != null) speciality = json['Speciality'].cast(); + if (json.containsKey('SpecialityN') && json['SpecialityN'] != null) specialityN = json['SpecialityN'].cast(); + workingHours = json['WorkingHours']; + decimalDoctorRate = json['DecimalDoctorRate']; + projectBottomName = json['ProjectNameBottom']; + projectTopName = json['ProjectNameTop']; + this.isHMC = json["IsHMC"]; + this.regionArabic = json['RegionNameN']; + this.regionEnglish = json['RegionName']; + } + + String? getRegionName(bool isArabic) { + if (isArabic) { + return regionArabic; + } + return regionEnglish; + } + + Map toJson() { + final Map data = new Map(); + data['ClinicID'] = this.clinicID; + data['AppointmentNo'] = this.appointmentNo; + 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['DoctorID'] = this.doctorID; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorProfile'] = this.doctorProfile; + data['DoctorProfileInfo'] = this.doctorProfileInfo; + data['DoctorRate'] = this.doctorRate; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['IsAppointmentAllowed'] = this.isAppointmentAllowed; + data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; + data['IsDoctorDummy'] = this.isDoctorDummy; + data['IsLiveCare'] = this.isLiveCare; + data['IsLiveCareClinic'] = this.isLiveCareClinic; + data['IsDoctorHasPrePostImages'] = this.isDoctorHasPrePostImages; + 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['SpecialityN'] = this.specialityN; + data['WorkingHours'] = this.workingHours; + data['DecimalDoctorRate'] = this.decimalDoctorRate; + return data; + } + + String getProjectCompleteName(){ + return "${this.projectTopName} ${this.projectBottomName}"; + } + + String getProjectCompleteNameWithLocale({bool isArabic = false}) { + if (isArabic) { + return "${this.projectBottomName} ${this.projectTopName}"; + } + return "${this.projectTopName} ${this.projectBottomName}"; + } +} + +class PatientDoctorAppointmentList { + String? filterName = ""; + String? distanceInKMs = ""; + List? patientDoctorAppointmentList = []; + String? projectTopName = ""; + String? projectBottomName = ""; + bool? isHMC; + List hospitalList = []; + + PatientDoctorAppointmentList( + {this.filterName, + this.distanceInKMs, + this.projectTopName, + this.projectBottomName, + DoctorList? patientDoctorAppointment, + HospitalsModel? model, + this.isHMC = false}) { + if (model != null) { + hospitalList.add(model); + } + if (patientDoctorAppointment != null) { + patientDoctorAppointmentList!.add(patientDoctorAppointment!); + } + } +} + +// class PatientDoctorAppointmentListByRegion { +// String? filterName = ""; +// String? distanceInKMs = ""; +// List? hmgDoctorList = []; +// List? hmcDoctorList = []; +// String? projectTopName = ""; +// String? projectBottomName = ""; +// +// PatientDoctorAppointmentListByRegion({this.filterName, this.distanceInKMs, this.projectTopName, this.projectBottomName, DoctorList? hmcPatientDoctorAppointment, DoctorList? hmgPatientDoctorAppointment}) { +// hmcDoctorList!.add(hmcPatientDoctorAppointment!); +// hmgDoctorList!.add(hmgPatientDoctorAppointment!); +// } +// } + +class PatientDoctorAppointmentListByRegion { + List? hmgDoctorList = []; + List? hmcDoctorList = []; + int hmcSize = 0; + int hmgSize = 0; + num distance = double.infinity; + num hmgDistance = double.infinity; + num hmcDistance = double.infinity; +} + +class RegionList { + Map? registeredDoctorMap = {}; +} + +/// dummy data +/// +/// + +DoctorList doctor1 = DoctorList( + clinicID: 101, + appointmentNo: 12345, + clinicName: "Downtown Clinic", + doctorTitle: "Dr.", + iD: 1, + name: "John Doe", + projectID: 301, + projectName: "HealthCare Network", + actualDoctorRate: 500, + clinicRoomNo: 2, + date: "2025-01-10", + appointmentDate: "2025-01-15T10:00:00", + dayName: "Monday", + doctorID: 11, + doctorImageURL: "https://example.com/images/johndoe.jpg", + doctorProfile: null, + doctorProfileInfo: null, + doctorRate: 4, + gender: 1, + genderDescription: "Male", + isAppointmentAllowed: true, + isDoctorAllowVedioCall: false, + isDoctorDummy: false, + isLiveCare: true, + isLiveCareClinic: false, + isDoctorHasPrePostImages: true, + latitude: "24.7136", + longitude: "46.6753", + nationalityFlagURL: "https://example.com/images/flags/sa.png", + nationalityID: "SA", + nationalityName: "Saudi Arabia", + nearestFreeSlot: "2025-01-15T10:00:00", + noOfPatientsRate: 50, + originalClinicID: 102, + personRate: 4.5, + projectDistanceInKiloMeters: 5.0, + qR: "QR123", + qRString: "abcd1234", + rateNumber: 120, + serviceID: null, + setupID: "Setup001", + speciality: ["Cardiology", "Internal Medicine"], + specialityN: ["Cardiology"], + workingHours: "8 AM - 5 PM", + decimalDoctorRate: 4.5, + projectBottomName: "HealthCare Bottom", + projectTopName: "HealthCare Top", + isHMC: false, + region: "Riyadh", +); + +DoctorList doctor2 = DoctorList( + clinicID: 102, + appointmentNo: 67890, + clinicName: "City Medical Center", + doctorTitle: "Dr.", + iD: 2, + name: "Jane Smith", + projectID: 302, + projectName: "MedicalGroup Network", + actualDoctorRate: 450, + clinicRoomNo: 5, + date: "2025-01-12", + appointmentDate: "2025-01-16T09:00:00", + dayName: "Wednesday", + doctorID: 12, + doctorImageURL: "https://example.com/images/janesmith.jpg", + doctorProfile: null, + doctorProfileInfo: null, + doctorRate: 5, + gender: 2, + genderDescription: "Female", + isAppointmentAllowed: true, + isDoctorAllowVedioCall: true, + isDoctorDummy: false, + isLiveCare: false, + isLiveCareClinic: true, + isDoctorHasPrePostImages: false, + latitude: "24.7742", + longitude: "46.7387", + nationalityFlagURL: "https://example.com/images/flags/us.png", + nationalityID: "US", + nationalityName: "United States", + nearestFreeSlot: "2025-01-16T09:00:00", + noOfPatientsRate: 70, + originalClinicID: 103, + personRate: 4.8, + projectDistanceInKiloMeters: 8.0, + qR: "QR567", + qRString: "efgh5678", + rateNumber: 200, + serviceID: null, + setupID: "Setup002", + speciality: ["Dermatology", "Cosmetic Surgery"], + specialityN: ["Dermatology"], + workingHours: "9 AM - 6 PM", + decimalDoctorRate: 4.8, + projectBottomName: "MedicalGroup Bottom", + projectTopName: "MedicalGroup Top", + isHMC: true, + region: "Riyadh", +); + +// Dummy data for PatientDoctorAppointmentList +PatientDoctorAppointmentList patientList1 = PatientDoctorAppointmentList( + filterName: "Aryan", + distanceInKMs: "0", + projectTopName: "HealthCare", + projectBottomName: "Center", + patientDoctorAppointment: doctor1, +); + +PatientDoctorAppointmentList patientList2 = PatientDoctorAppointmentList( + filterName: "Aryan", + distanceInKMs: "0", + projectTopName: "MedicalGroup", + projectBottomName: "Clinic", + patientDoctorAppointment: doctor2, +); + +// Dummy data for PatientDoctorAppointmentListByRegion +PatientDoctorAppointmentListByRegion region1 = + PatientDoctorAppointmentListByRegion() + ..hmgDoctorList = [patientList1] + ..hmcDoctorList = [patientList2]; + +// Dummy data for RegionList +RegionList regionList = RegionList() + ..registeredDoctorMap = { + "Region1": region1, + "Region2": region1, + }; \ No newline at end of file diff --git a/lib/models/Appointments/DoctorProfile.dart b/lib/models/Appointments/DoctorProfile.dart new file mode 100644 index 00000000..b78281a5 --- /dev/null +++ b/lib/models/Appointments/DoctorProfile.dart @@ -0,0 +1,184 @@ +class DoctorProfileList { + num? doctorID; + String? doctorName; + dynamic doctorNameN; + num? clinicID; + String? clinicDescription; + dynamic clinicDescriptionN; + dynamic licenseExpiry; + num? employmentType; + dynamic setupID; + num? projectID; + String? projectName; + String? nationalityID; + String? nationalityName; + dynamic nationalityNameN; + num? gender; + String? genderDescription; + dynamic genderDescriptionN; + dynamic doctorTitle; + dynamic projectNameN; + bool? isAllowWaitList; + String? titleDescription; + dynamic titleDescriptionN; + dynamic isRegistered; + dynamic isDoctorDummy; + bool? isActive; + bool? isDoctorHasPrePostImages; + dynamic isDoctorAppointmentDisplayed; + bool? doctorClinicActive; + dynamic isbookingAllowed; + String? doctorCases; + dynamic doctorPicture; + String? doctorProfileInfo; + List? specialty; + num? actualDoctorRate; + String? doctorImageURL; + num? doctorRate; + num? decimalDoctorRate; + String? doctorTitleForProfile; + bool? isAppointmentAllowed; + String? nationalityFlagURL; + int? noOfPatientsRate; + String? qR; + num? serviceID; + + DoctorProfileList( + {this.doctorID, + this.doctorName, + this.doctorNameN, + this.clinicID, + this.clinicDescription, + this.clinicDescriptionN, + this.licenseExpiry, + this.employmentType, + this.setupID, + this.projectID, + this.projectName, + this.nationalityID, + this.nationalityName, + this.nationalityNameN, + this.gender, + this.genderDescription, + this.genderDescriptionN, + this.doctorTitle, + this.projectNameN, + this.isAllowWaitList, + this.titleDescription, + this.titleDescriptionN, + this.isRegistered, + this.isDoctorDummy, + this.isActive, + this.isDoctorHasPrePostImages, + this.isDoctorAppointmentDisplayed, + this.doctorClinicActive, + this.isbookingAllowed, + this.doctorCases, + this.doctorPicture, + this.doctorProfileInfo, + this.specialty, + this.actualDoctorRate, + this.doctorImageURL, + this.doctorRate, + this.decimalDoctorRate, + this.doctorTitleForProfile, + this.isAppointmentAllowed, + this.nationalityFlagURL, + this.noOfPatientsRate, + this.qR, + this.serviceID}); + + DoctorProfileList.fromJson(Map json) { + doctorID = json['DoctorID']; + doctorName = json['DoctorName']; + doctorNameN = json['DoctorNameN']; + clinicID = json['ClinicID']; + clinicDescription = json['ClinicDescription']; + clinicDescriptionN = json['ClinicDescriptionN']; + licenseExpiry = json['LicenseExpiry']; + employmentType = json['EmploymentType']; + setupID = json['SetupID']; + projectID = json['ProjectID']; + projectName = json['ProjectName']; + nationalityID = json['NationalityID']; + nationalityName = json['NationalityName']; + nationalityNameN = json['NationalityNameN']; + gender = json['Gender']; + genderDescription = json['Gender_Description']; + genderDescriptionN = json['Gender_DescriptionN']; + doctorTitle = json['DoctorTitle']; + projectNameN = json['ProjectNameN']; + isAllowWaitList = json['IsAllowWaitList']; + titleDescription = json['Title_Description']; + titleDescriptionN = json['Title_DescriptionN']; + isRegistered = json['IsRegistered']; + isDoctorDummy = json['IsDoctorDummy']; + isActive = json['IsActive']; + isDoctorHasPrePostImages = json['IsDoctorHasPrePostImages']; + isDoctorAppointmentDisplayed = json['IsDoctorAppointmentDisplayed']; + doctorClinicActive = json['DoctorClinicActive']; + isbookingAllowed = json['IsbookingAllowed']; + doctorCases = json['DoctorCases']; + doctorPicture = json['DoctorPicture']; + doctorProfileInfo = json['DoctorProfileInfo']; + specialty = json['Specialty'] != null ? json['Specialty'].cast() : [""]; + actualDoctorRate = json['ActualDoctorRate']; + doctorImageURL = json['DoctorImageURL']; + doctorRate = json['DoctorRate']; + decimalDoctorRate = json['DecimalDoctorRate']; + doctorTitleForProfile = json['DoctorTitleForProfile']; + isAppointmentAllowed = json['IsAppointmentAllowed']; + nationalityFlagURL = json['NationalityFlagURL']; + noOfPatientsRate = json['NoOfPatientsRate']; + qR = json['QR']; + serviceID = json['ServiceID']; + } + + Map toJson() { + final Map data = new Map(); + data['DoctorID'] = this.doctorID; + data['DoctorName'] = this.doctorName; + data['DoctorNameN'] = this.doctorNameN; + data['ClinicID'] = this.clinicID; + data['ClinicDescription'] = this.clinicDescription; + data['ClinicDescriptionN'] = this.clinicDescriptionN; + data['LicenseExpiry'] = this.licenseExpiry; + data['EmploymentType'] = this.employmentType; + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['ProjectName'] = this.projectName; + data['NationalityID'] = this.nationalityID; + data['NationalityName'] = this.nationalityName; + data['NationalityNameN'] = this.nationalityNameN; + data['Gender'] = this.gender; + data['Gender_Description'] = this.genderDescription; + data['Gender_DescriptionN'] = this.genderDescriptionN; + data['DoctorTitle'] = this.doctorTitle; + data['ProjectNameN'] = this.projectNameN; + data['IsAllowWaitList'] = this.isAllowWaitList; + data['Title_Description'] = this.titleDescription; + data['Title_DescriptionN'] = this.titleDescriptionN; + data['IsRegistered'] = this.isRegistered; + data['IsDoctorDummy'] = this.isDoctorDummy; + data['IsActive'] = this.isActive; + data['IsDoctorHasPrePostImages'] = this.isDoctorHasPrePostImages; + data['IsDoctorAppointmentDisplayed'] = this.isDoctorAppointmentDisplayed; + data['DoctorClinicActive'] = this.doctorClinicActive; + data['IsbookingAllowed'] = this.isbookingAllowed; + data['DoctorCases'] = this.doctorCases; + data['DoctorPicture'] = this.doctorPicture; + data['DoctorProfileInfo'] = this.doctorProfileInfo; + data['Specialty'] = this.specialty; + data['ActualDoctorRate'] = this.actualDoctorRate; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorRate'] = this.doctorRate; + data['DecimalDoctorRate'] = this.decimalDoctorRate; + data['DoctorTitleForProfile'] = this.doctorTitleForProfile; + data['IsAppointmentAllowed'] = this.isAppointmentAllowed; + data['NationalityFlagURL'] = this.nationalityFlagURL; + data['NoOfPatientsRate'] = this.noOfPatientsRate; + data['QR'] = this.qR; + data['ServiceID'] = this.serviceID; + return data; + } +} diff --git a/lib/models/Appointments/DoctorRateDetails.dart b/lib/models/Appointments/DoctorRateDetails.dart new file mode 100644 index 00000000..58668856 --- /dev/null +++ b/lib/models/Appointments/DoctorRateDetails.dart @@ -0,0 +1,36 @@ +class DoctorRateDetails { + dynamic doctorID; + dynamic projectID; + dynamic clinicID; + dynamic rate; + dynamic patientNumber; + dynamic ratio; + + DoctorRateDetails( + {this.doctorID, + this.projectID, + this.clinicID, + this.rate, + this.patientNumber, + this.ratio}); + + DoctorRateDetails.fromJson(Map json) { + doctorID = json['DoctorID']; + projectID = json['ProjectID']; + clinicID = json['ClinicID']; + rate = json['Rate']; + patientNumber = json['PatientNumber']; + ratio = json['Ratio']; + } + + Map toJson() { + final Map data = new Map(); + data['DoctorID'] = this.doctorID; + data['ProjectID'] = this.projectID; + data['ClinicID'] = this.clinicID; + data['Rate'] = this.rate; + data['PatientNumber'] = this.patientNumber; + data['Ratio'] = this.ratio; + return data; + } +} diff --git a/lib/models/Appointments/FreeSlot.dart b/lib/models/Appointments/FreeSlot.dart new file mode 100644 index 00000000..46692982 --- /dev/null +++ b/lib/models/Appointments/FreeSlot.dart @@ -0,0 +1,12 @@ +class FreeSlot { + List event; + DateTime slot; + + + FreeSlot(this.slot, this.event); + + @override + String toString() { + return '{ ${this.slot}, ${this.event} }'; + } +} \ No newline at end of file diff --git a/lib/models/Appointments/InsertAppointmentRequest.dart b/lib/models/Appointments/InsertAppointmentRequest.dart new file mode 100644 index 00000000..719f6ff9 --- /dev/null +++ b/lib/models/Appointments/InsertAppointmentRequest.dart @@ -0,0 +1,20 @@ +import 'package:diplomaticquarterapp/models/Request.dart'; + +class InsertAppointmentRequest extends Request { + String? AppointmentDate; // ???? "/Date(1577750400000)/" + int? DoctorID; + int? InitialSlotDuration; + String? SelectedTime; + String? StartTime; + String? EndTime; + String? TempValue; + int? VisitFor; + int? VisitType; + bool? IsVirtual; + List? GeneralProcedureList; + String? DeviceToken; + bool? IsForLiveCare; + String? OriginalClinicID; + String? OriginalProjectID; + +} diff --git a/lib/models/Appointments/PatientPackageComponent b/lib/models/Appointments/PatientPackageComponent new file mode 100644 index 00000000..e69de29b diff --git a/lib/models/Appointments/PatientPackageComponent.dart b/lib/models/Appointments/PatientPackageComponent.dart new file mode 100644 index 00000000..26ce9229 --- /dev/null +++ b/lib/models/Appointments/PatientPackageComponent.dart @@ -0,0 +1,59 @@ +class PatientPackageComponent { + List? patientPackageComponents; + + PatientPackageComponent({this.patientPackageComponents}); + + PatientPackageComponent.fromJson(Map json) { + if (json['PatientPackageComponents'] != null) { + patientPackageComponents = []; + json['PatientPackageComponents'].forEach((v) { + patientPackageComponents!.add(new PatientPackageComponents.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + if (this.patientPackageComponents != null) { + data['PatientPackageComponents'] = this.patientPackageComponents!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class PatientPackageComponents { + int? invoiceNo; + int? lineItemNo; + String? procedureID; + String? procedureName; + int? projectID; + int? sequence; + String? setupID; + num? invoiceNo_VP; + + PatientPackageComponents({this.invoiceNo, this.lineItemNo, this.procedureID, this.procedureName, this.projectID, this.sequence, this.setupID, this.invoiceNo_VP}); + + PatientPackageComponents.fromJson(Map json) { + invoiceNo = json['InvoiceNo']; + lineItemNo = json['LineItemNo']; + procedureID = json['ProcedureID']; + procedureName = json['ProcedureName']; + projectID = json['ProjectID']; + sequence = json['Sequence']; + setupID = json['SetupID']; + invoiceNo_VP = json['InvoiceNo_VP']; + } + + Map toJson() { + final Map data = new Map(); + data['InvoiceNo'] = this.invoiceNo; + data['LineItemNo'] = this.lineItemNo; + data['ProcedureID'] = this.procedureID; + data['ProcedureName'] = this.procedureName; + data['ProjectID'] = this.projectID; + data['Sequence'] = this.sequence; + data['SetupID'] = this.setupID; + data['InvoiceNo_VP'] = this.invoiceNo_VP; + return data; + } +} diff --git a/lib/models/Appointments/PatientShareResposne.dart b/lib/models/Appointments/PatientShareResposne.dart new file mode 100644 index 00000000..ef0dd7c9 --- /dev/null +++ b/lib/models/Appointments/PatientShareResposne.dart @@ -0,0 +1,212 @@ +class PatientShareResponse { + int? advanceNumber; + dynamic appointmentDate; + int? appointmentNo; + int? cashPrice; + int? cashPriceTax; + int? cashPriceWithTax; + int? clinicID; + dynamic clinicName; + int? companyId; + dynamic companyName; + int? companyShareWithTax; + dynamic doctorImageURL; + dynamic doctorNameObj; + int? doctorID; + List? doctorSpeciality; + dynamic errCode; + int? groupID; + bool? iSAllowOnlineCheckedIN; + dynamic insurancePolicyNo; + bool? isExcludedForOnlineCheckin; + int? isFollowup; + bool? isLiveCareAppointment; + bool? isOnlineCheckedIN; + dynamic message; + int? nextAction; + dynamic patientCardID; + int? patientID; + dynamic patientShare; + dynamic patientShareWithTax; + int? patientStatusType; + dynamic patientTaxAmount; + dynamic patientType; + int? paymentAmount; + dynamic paymentDate; + dynamic paymentMethodName; + dynamic paymentReferenceNumber; + int? policyId; + dynamic policyName; + dynamic procedureName; + int? projectID; + dynamic projectName; + dynamic setupID; + int? sourceType; + dynamic startTime; + int? status; + int? statusCode; + dynamic statusDesc; + dynamic subPolicyNo; + int? userID; + int? serviceID; + + PatientShareResponse( + {this.advanceNumber, + this.appointmentDate, + this.appointmentNo, + this.cashPrice, + this.cashPriceTax, + this.cashPriceWithTax, + this.clinicID, + this.clinicName, + this.companyId, + this.companyName, + this.companyShareWithTax, + this.doctorID, + this.doctorImageURL, + this.doctorNameObj, + this.doctorSpeciality, + this.errCode, + this.groupID, + this.iSAllowOnlineCheckedIN, + this.insurancePolicyNo, + this.isExcludedForOnlineCheckin, + this.isFollowup, + this.isLiveCareAppointment, + this.isOnlineCheckedIN, + this.message, + this.nextAction, + this.patientCardID, + this.patientID, + this.patientShare, + this.patientShareWithTax, + this.patientStatusType, + this.patientTaxAmount, + this.patientType, + this.paymentAmount, + this.paymentDate, + this.paymentMethodName, + this.paymentReferenceNumber, + this.policyId, + this.policyName, + this.procedureName, + this.projectID, + this.projectName, + this.setupID, + this.sourceType, + this.startTime, + this.status, + this.statusCode, + this.statusDesc, + this.subPolicyNo, + this.userID, + this.serviceID}); + + PatientShareResponse.fromJson(Map json) { + advanceNumber = json['AdvanceNumber']; + appointmentDate = json['AppointmentDate']; + appointmentNo = json['AppointmentNo']; + cashPrice = json['CashPrice']; + cashPriceTax = json['CashPriceTax']; + cashPriceWithTax = json['CashPriceWithTax']; + clinicID = json['ClinicID']; + clinicName = json['ClinicName']; + companyId = json['CompanyId']; + companyName = json['CompanyName']; + companyShareWithTax = json['CompanyShareWithTax']; + doctorID = json['DoctorID']; + doctorImageURL = json['DoctorImageURL']; + doctorNameObj = json['DoctorNameObj']; +// doctorSpeciality = json['DoctorSpeciality'].cast(); + errCode = json['ErrCode']; + groupID = json['GroupID']; + iSAllowOnlineCheckedIN = json['ISAllowOnlineCheckedIN']; + insurancePolicyNo = json['InsurancePolicyNo']; + isExcludedForOnlineCheckin = json['IsExcludedForOnlineCheckin']; + isFollowup = json['IsFollowup']; + isLiveCareAppointment = json['IsLiveCareAppointment']; + isOnlineCheckedIN = json['IsOnlineCheckedIN']; + message = json['Message']; + nextAction = json['NextAction']; + patientCardID = json['PatientCardID']; + patientID = json['PatientID']; + patientShare = json['PatientShare']; + patientShareWithTax = json['PatientShareWithTax']; + patientStatusType = json['PatientStatusType']; + patientTaxAmount = json['PatientTaxAmount']; + patientType = json['PatientType']; + paymentAmount = json['PaymentAmount']; + paymentDate = json['PaymentDate']; + paymentMethodName = json['PaymentMethodName']; + paymentReferenceNumber = json['PaymentReferenceNumber']; + policyId = json['PolicyId']; + policyName = json['PolicyName']; + procedureName = json['ProcedureName']; + projectID = json['ProjectID']; + projectName = json['ProjectName']; + setupID = json['SetupID']; + sourceType = json['SourceType']; + startTime = json['StartTime']; + status = json['Status']; + statusCode = json['StatusCode']; + statusDesc = json['StatusDesc']; + subPolicyNo = json['SubPolicyNo']; + userID = json['UserID']; + serviceID = json['ServiceID']; + } + + Map toJson() { + final Map data = new Map(); + data['AdvanceNumber'] = this.advanceNumber; + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentNo'] = this.appointmentNo; + data['CashPrice'] = this.cashPrice; + data['CashPriceTax'] = this.cashPriceTax; + data['CashPriceWithTax'] = this.cashPriceWithTax; + data['ClinicID'] = this.clinicID; + data['ClinicName'] = this.clinicName; + data['CompanyId'] = this.companyId; + data['CompanyName'] = this.companyName; + data['CompanyShareWithTax'] = this.companyShareWithTax; + data['DoctorID'] = this.doctorID; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorNameObj'] = this.doctorNameObj; + data['DoctorSpeciality'] = this.doctorSpeciality; + data['ErrCode'] = this.errCode; + data['GroupID'] = this.groupID; + data['ISAllowOnlineCheckedIN'] = this.iSAllowOnlineCheckedIN; + data['InsurancePolicyNo'] = this.insurancePolicyNo; + data['IsExcludedForOnlineCheckin'] = this.isExcludedForOnlineCheckin; + data['IsFollowup'] = this.isFollowup; + data['IsLiveCareAppointment'] = this.isLiveCareAppointment; + data['IsOnlineCheckedIN'] = this.isOnlineCheckedIN; + data['Message'] = this.message; + data['NextAction'] = this.nextAction; + data['PatientCardID'] = this.patientCardID; + data['PatientID'] = this.patientID; + data['PatientShare'] = this.patientShare; + data['PatientShareWithTax'] = this.patientShareWithTax; + data['PatientStatusType'] = this.patientStatusType; + data['PatientTaxAmount'] = this.patientTaxAmount; + data['PatientType'] = this.patientType; + data['PaymentAmount'] = this.paymentAmount; + data['PaymentDate'] = this.paymentDate; + data['PaymentMethodName'] = this.paymentMethodName; + data['PaymentReferenceNumber'] = this.paymentReferenceNumber; + data['PolicyId'] = this.policyId; + data['PolicyName'] = this.policyName; + data['ProcedureName'] = this.procedureName; + data['ProjectID'] = this.projectID; + data['ProjectName'] = this.projectName; + data['SetupID'] = this.setupID; + data['SourceType'] = this.sourceType; + data['StartTime'] = this.startTime; + data['Status'] = this.status; + data['StatusCode'] = this.statusCode; + data['StatusDesc'] = this.statusDesc; + data['SubPolicyNo'] = this.subPolicyNo; + data['UserID'] = this.userID; + data['ServiceID'] = this.serviceID; + return data; + } +} diff --git a/lib/models/Appointments/SearchInfoModel.dart b/lib/models/Appointments/SearchInfoModel.dart new file mode 100644 index 00000000..ee1faf90 --- /dev/null +++ b/lib/models/Appointments/SearchInfoModel.dart @@ -0,0 +1,16 @@ +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart'; + +class SearchInfo { + int? ProjectID; + int? ClinicID; + String? DoctorName; + String? SelectedDate; + String? SelectedTime; + String? currentLat; + String? currentLong; + DateTime? date; + + HospitalsModel? hospital; + ListClinicCentralized? clinic; +} diff --git a/lib/models/Appointments/appoDetailsButtons.dart b/lib/models/Appointments/appoDetailsButtons.dart new file mode 100644 index 00000000..faec136a --- /dev/null +++ b/lib/models/Appointments/appoDetailsButtons.dart @@ -0,0 +1,24 @@ +class AppoDetailsButton { + String? title; + String? subtitle; + String? icon; + String? caller; + + AppoDetailsButton({this.title, this.subtitle, this.icon, this.caller}); + + AppoDetailsButton.fromJson(Map json) { + title = json['title']; + subtitle = json['subtitle']; + icon = json['icon']; + caller = json['caller']; + } + + Map toJson() { + final Map data = new Map(); + data['title'] = this.title; + data['subtitle'] = this.subtitle; + data['icon'] = this.icon; + data['caller'] = this.caller; + return data; + } +} diff --git a/lib/models/Appointments/doctor_pre_post_image.dart b/lib/models/Appointments/doctor_pre_post_image.dart new file mode 100644 index 00000000..96a738bd --- /dev/null +++ b/lib/models/Appointments/doctor_pre_post_image.dart @@ -0,0 +1,107 @@ +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:diplomaticquarterapp/uitl/utils.dart'; + +class DoctorPrePostImages { + DoctorPrePostImageModel? pre; + DoctorPrePostImageModel? post; + + Uint8List getPreBytes(){ + try{ + var b64 = pre!.imageStr!.replaceFirst('data:image/png;base64,', ''); + if(pre!.imageStr != null && isBase64(b64)) + return Utils.dataFromBase64String(b64); + }catch(e){ + + } + return Uint8List(0); + } + + Uint8List getPostBytes(){ + try{ + var b64 = post!.imageStr!.replaceFirst('data:image/png;base64,', ''); + if(post!.imageStr != null && isBase64(b64)) + return Utils.dataFromBase64String(b64); + }catch(e){ + + } + return Uint8List(0); + } + + bool isBase64(String str) { + RegExp _base64 = RegExp( + r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})$'); + return _base64.hasMatch(str); + } +} + +class DoctorPrePostImageModel { + String? setupID; + int? projectID; + int? clinicId; + int? doctorId; + int? lineItemNo; + String? imageStr; + int? imageType; + String? description; + dynamic isNewUpdated; + bool? isActive; + String? createdOn; + int? createdBy; + dynamic editedOn; + dynamic editedBy; + + DoctorPrePostImageModel({ + this.setupID, + this.projectID, + this.clinicId, + this.doctorId, + this.lineItemNo, + this.imageStr, + this.imageType, + this.description, + this.isNewUpdated, + this.isActive, + this.createdOn, + this.createdBy, + this.editedOn, + this.editedBy}); + + DoctorPrePostImageModel.fromJson(dynamic json) { + setupID = json["SetupID"]; + projectID = json["ProjectID"]; + clinicId = json["ClinicId"]; + doctorId = json["DoctorId"]; + lineItemNo = json["LineItemNo"]; + imageStr = json["ImageStr"]; + imageType = json["ImageType"]; + description = json["Description"]; + isNewUpdated = json["IsNewUpdated"]; + isActive = json["IsActive"]; + createdOn = json["CreatedOn"]; + createdBy = json["CreatedBy"]; + editedOn = json["EditedOn"]; + editedBy = json["EditedBy"]; + } + + Map toJson() { + var map = {}; + map["SetupID"] = setupID; + map["ProjectID"] = projectID; + map["ClinicId"] = clinicId; + map["DoctorId"] = doctorId; + map["LineItemNo"] = lineItemNo; + map["ImageStr"] = imageStr; + map["ImageType"] = imageType; + map["Description"] = description; + map["IsNewUpdated"] = isNewUpdated; + map["IsActive"] = isActive; + map["CreatedOn"] = createdOn; + map["CreatedBy"] = createdBy; + map["EditedOn"] = editedOn; + map["EditedBy"] = editedBy; + return map; + } + +} \ No newline at end of file diff --git a/lib/models/Appointments/getClinicsRequest.dart b/lib/models/Appointments/getClinicsRequest.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/models/Appointments/laser_body_parts.dart b/lib/models/Appointments/laser_body_parts.dart new file mode 100644 index 00000000..d7d3fbd1 --- /dev/null +++ b/lib/models/Appointments/laser_body_parts.dart @@ -0,0 +1,64 @@ +class LaserBodyPart { + int? id; + int? category; + String? bodyPart; + bool? fullBoadyPart; + bool? isRetouch; + String? timeDuration; + String? bodyPartN; + bool? isActive; + String? mappingCode; + int? procedureID; + int? orderNum; + String? categoryName; + String? categoryNameN; + + LaserBodyPart( + {this.id, + this.category, + this.bodyPart, + this.fullBoadyPart, + this.isRetouch, + this.timeDuration, + this.bodyPartN, + this.isActive, + this.mappingCode, + this.procedureID, + this.orderNum, + this.categoryName, + this.categoryNameN}); + + LaserBodyPart.fromJson(Map json) { + id = json['Id']; + category = json['Category']; + bodyPart = json['BodyPart']; + fullBoadyPart = json['FullBoadyPart']; + isRetouch = json['IsRetouch']; + timeDuration = json['TimeDuration']; + bodyPartN = json['BodyPartN']; + isActive = json['IsActive']; + mappingCode = json['MappingCode']; + procedureID = json['ProcedureID']; + orderNum = json['OrderNum']; + categoryName = json['CategoryName']; + categoryNameN = json['CategoryNameN']; + } + + Map toJson() { + final Map data = new Map(); + data['Id'] = this.id; + data['Category'] = this.category; + data['BodyPart'] = this.bodyPart; + data['FullBoadyPart'] = this.fullBoadyPart; + data['IsRetouch'] = this.isRetouch; + data['TimeDuration'] = this.timeDuration; + data['BodyPartN'] = this.bodyPartN; + data['IsActive'] = this.isActive; + data['MappingCode'] = this.mappingCode; + data['ProcedureID'] = this.procedureID; + data['OrderNum'] = this.orderNum; + data['CategoryName'] = this.categoryName; + data['CategoryNameN'] = this.categoryNameN; + return data; + } +} diff --git a/lib/models/Appointments/timeSlot.dart b/lib/models/Appointments/timeSlot.dart new file mode 100644 index 00000000..ccddc2d9 --- /dev/null +++ b/lib/models/Appointments/timeSlot.dart @@ -0,0 +1,10 @@ +import 'package:flutter/cupertino.dart'; + +class TimeSlot { + String? isoTime; + DateTime? start; + DateTime? end; + String? vidaDate; + TimeSlot({@required this.isoTime, @required this.start, @required this.end, this.vidaDate}); + +} diff --git a/lib/models/Appointments/toDoCountProviderModel.dart b/lib/models/Appointments/toDoCountProviderModel.dart new file mode 100644 index 00000000..0418424c --- /dev/null +++ b/lib/models/Appointments/toDoCountProviderModel.dart @@ -0,0 +1,25 @@ +import 'package:flutter/cupertino.dart'; + +class ToDoCountProviderModel with ChangeNotifier { + + int? _count; + int? _ancillaryCount; + String? _notificationsCount; + bool? _isShowBadge = false; + + + int? get count => _count == null ? 0 : _count!; + int? get ancillaryCount => _ancillaryCount == null ? 0 : _ancillaryCount; + + String? get notificationsCount => _notificationsCount == null ? "0" : _notificationsCount; + + bool get isShowBadge => _isShowBadge!; + + void setState(int? count, int? ancillaryCount, bool? isShowBadge, String? notifCount) { + _count = count; + _isShowBadge = isShowBadge; + _notificationsCount = notifCount; + _ancillaryCount = ancillaryCount; + notifyListeners(); + } +} \ No newline at end of file diff --git a/lib/models/Authentication/authenticated_user.dart b/lib/models/Authentication/authenticated_user.dart new file mode 100644 index 00000000..0d2b3544 --- /dev/null +++ b/lib/models/Authentication/authenticated_user.dart @@ -0,0 +1,292 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class AuthenticatedUser { + String? setupID; + int? patientType; + int? patientID; + String? firstName; + String? middleName; + String? lastName; + String? firstNameN; + String? middleNameN; + String? lastNameN; + int? relationshipID; + int? gender; + String? dateofBirth; + DateTime? dateofBirthDataTime; + dynamic dateofBirthN; + String? nationalityID; + dynamic phoneResi; + dynamic phoneOffice; + String? mobileNumber; + dynamic faxNumber; + String? emailAddress; + dynamic bloodGroup; + dynamic rHFactor; + bool? isEmailAlertRequired; + bool? isSMSAlertRequired; + String? preferredLanguage; + bool? isPrivilegedMember; + dynamic memberID; + dynamic expiryDate; + dynamic isHmgEmployee; + dynamic employeeID; + dynamic emergencyContactName; + dynamic emergencyContactNo; + int? patientPayType; + dynamic dHCCPatientRefID; + bool? isPatientDummy; + int? status; + dynamic isStatusCleared; + int? patientIdentificationType; + String? patientIdentificationNo; + int? projectID; + int? infoSourceID; + dynamic address; + int? age; + String? ageDesc; + int? areaID; + int? createdBy; + String? genderDescription; + dynamic iR; + dynamic iSOCityID; + dynamic iSOCountryID; + List? listPrivilege; + dynamic marital; + int? outSA; + dynamic pOBox; + bool? receiveHealthSummaryReport; + int? sourceType; + dynamic strDateofBirth; + 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, + this.cRSVerificationStatus}); + + AuthenticatedUser.fromJson(Map json) { + setupID = json['SetupID']; + patientType = json['PatientType']; + patientID = json['PatientID']; + firstName = json['FirstName']; + middleName = json['MiddleName']; + lastName = json['LastName']; + firstNameN = json['FirstNameN']; + middleNameN = json['MiddleNameN']; + lastNameN = json['LastNameN']; + relationshipID = json['RelationshipID']; + gender = json['Gender']; + dateofBirth = json['DateofBirth']; + dateofBirthDataTime = DateUtil.convertStringToDate(json['DateofBirth']); + dateofBirthN = json['DateofBirthN']; + nationalityID = json['NationalityID']; + phoneResi = json['PhoneResi']; + phoneOffice = json['PhoneOffice']; + mobileNumber = json['MobileNumber']; + faxNumber = json['FaxNumber']; + emailAddress = json['EmailAddress']; + bloodGroup = json['BloodGroup']; + rHFactor = json['RHFactor']; + isEmailAlertRequired = json['IsEmailAlertRequired']; + isSMSAlertRequired = json['IsSMSAlertRequired']; + preferredLanguage = json['PreferredLanguage']; + isPrivilegedMember = json['IsPrivilegedMember']; + memberID = json['MemberID']; + expiryDate = json['ExpiryDate']; + isHmgEmployee = json['IsHmgEmployee']; + employeeID = json['EmployeeID']; + emergencyContactName = json['EmergencyContactName']; + emergencyContactNo = json['EmergencyContactNo']; + patientPayType = json['PatientPayType']; + dHCCPatientRefID = json['DHCCPatientRefID']; + isPatientDummy = json['IsPatientDummy']; + status = json['Status']; + isStatusCleared = json['IsStatusCleared']; + patientIdentificationType = json['PatientIdentificationType']; + patientIdentificationNo = json['PatientIdentificationNo']; + projectID = json['ProjectID']; + infoSourceID = json['InfoSourceID']; + address = json['Address']; + age = json['Age']; + ageDesc = json['AgeDesc']; + areaID = json['AreaID']; + createdBy = json['CreatedBy']; + genderDescription = json['GenderDescription']; + iR = json['IR']; + iSOCityID = json['ISOCityID']; + iSOCountryID = json['ISOCountryID']; + if (json['ListPrivilege'] != null) { + listPrivilege = []; + json['ListPrivilege'].forEach((v) { + listPrivilege!.add(new ListPrivilege.fromJson(v)); + }); + } + marital = json['Marital']; + outSA = json['OutSA']; + pOBox = json['POBox']; + receiveHealthSummaryReport = json['ReceiveHealthSummaryReport']; + sourceType = json['SourceType']; + strDateofBirth = json['StrDateofBirth']; + tempAddress = json['TempAddress']; + zipCode = json['ZipCode']; + isFamily = json['IsFamily']; + cRSVerificationStatus = json['CRSVerificationStatus']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['FirstName'] = this.firstName; + data['MiddleName'] = this.middleName; + data['LastName'] = this.lastName; + data['FirstNameN'] = this.firstNameN; + data['MiddleNameN'] = this.middleNameN; + data['LastNameN'] = this.lastNameN; + data['RelationshipID'] = this.relationshipID; + data['Gender'] = this.gender; + data['DateofBirth'] = this.dateofBirth; + data['DateofBirthN'] = this.dateofBirthN; + data['NationalityID'] = this.nationalityID; + data['PhoneResi'] = this.phoneResi; + data['PhoneOffice'] = this.phoneOffice; + data['MobileNumber'] = this.mobileNumber; + data['FaxNumber'] = this.faxNumber; + data['EmailAddress'] = this.emailAddress; + data['BloodGroup'] = this.bloodGroup; + data['RHFactor'] = this.rHFactor; + data['IsEmailAlertRequired'] = this.isEmailAlertRequired; + data['IsSMSAlertRequired'] = this.isSMSAlertRequired; + data['PreferredLanguage'] = this.preferredLanguage; + data['IsPrivilegedMember'] = this.isPrivilegedMember; + data['MemberID'] = this.memberID; + data['ExpiryDate'] = this.expiryDate; + data['IsHmgEmployee'] = this.isHmgEmployee; + data['EmployeeID'] = this.employeeID; + data['EmergencyContactName'] = this.emergencyContactName; + data['EmergencyContactNo'] = this.emergencyContactNo; + data['PatientPayType'] = this.patientPayType; + data['DHCCPatientRefID'] = this.dHCCPatientRefID; + data['IsPatientDummy'] = this.isPatientDummy; + data['Status'] = this.status; + data['IsStatusCleared'] = this.isStatusCleared; + data['PatientIdentificationType'] = this.patientIdentificationType; + data['PatientIdentificationNo'] = this.patientIdentificationNo; + data['ProjectID'] = this.projectID; + data['InfoSourceID'] = this.infoSourceID; + data['Address'] = this.address; + data['Age'] = this.age; + data['AgeDesc'] = this.ageDesc; + data['AreaID'] = this.areaID; + data['CreatedBy'] = this.createdBy; + data['GenderDescription'] = this.genderDescription; + data['IR'] = this.iR; + data['ISOCityID'] = this.iSOCityID; + data['ISOCountryID'] = this.iSOCountryID; + if (this.listPrivilege != null) { + data['ListPrivilege'] = + this.listPrivilege!.map((v) => v.toJson()).toList(); + } + data['Marital'] = this.marital; + data['OutSA'] = this.outSA; + data['POBox'] = this.pOBox; + data['ReceiveHealthSummaryReport'] = this.receiveHealthSummaryReport; + data['SourceType'] = this.sourceType; + data['StrDateofBirth'] = this.strDateofBirth; + data['TempAddress'] = this.tempAddress; + data['ZipCode'] = this.zipCode; + data['IsFamily'] = this.isFamily; + data['CRSVerificationStatus'] = this.cRSVerificationStatus; + return data; + } +} + +class ListPrivilege { + int? iD; + String? serviceName; + bool? previlege; + dynamic region; + + ListPrivilege({this.iD, this.serviceName, this.previlege, this.region}); + + ListPrivilege.fromJson(Map json) { + iD = json['ID']; + serviceName = json['ServiceName']; + previlege = json['Previlege']; + region = json['Region']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['ServiceName'] = this.serviceName; + data['Previlege'] = this.previlege; + data['Region'] = this.region; + return data; + } +} diff --git a/lib/models/Authentication/check_activation_code_request.dart b/lib/models/Authentication/check_activation_code_request.dart new file mode 100644 index 00000000..8d2cd71e --- /dev/null +++ b/lib/models/Authentication/check_activation_code_request.dart @@ -0,0 +1,110 @@ +class CheckActivationCodeReq { + int? patientMobileNumber; + String? mobileNo; + String? deviceToken; + bool? projectOutSA; + int? loginType; + String? zipCode; + bool? isRegister; + String? logInTokenID; + int? searchType; + int? patientID; + String? nationalID; + String? patientIdentificationID; + String? activationCode; + bool? isSilentLogin; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + dynamic sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + bool? forRegisteration; + + CheckActivationCodeReq({ + this.patientMobileNumber, + this.mobileNo, + this.deviceToken, + this.projectOutSA, + this.loginType, + this.zipCode, + this.isRegister, + this.logInTokenID, + this.searchType, + this.patientID, + this.nationalID, + this.patientIdentificationID, + this.activationCode, + this.isSilentLogin, + this.versionID, + this.channel, + // this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.forRegisteration, + }); + + CheckActivationCodeReq.fromJson(Map json) { + patientMobileNumber = json['PatientMobileNumber']; + mobileNo = json['MobileNo']; + deviceToken = json['DeviceToken']; + projectOutSA = json['ProjectOutSA']; + loginType = json['LoginType']; + zipCode = json['ZipCode']; + isRegister = json['isRegister']; + logInTokenID = json['LogInTokenID']; + searchType = json['SearchType']; + patientID = json['PatientID']; + nationalID = json['NationalID']; + patientIdentificationID = json['PatientIdentificationID']; + activationCode = json['activationCode']; + isSilentLogin = json['IsSilentLogin']; + 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']; + forRegisteration = json['ForRegisteration']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientMobileNumber'] = this.patientMobileNumber; + data['MobileNo'] = this.mobileNo; + data['DeviceToken'] = this.deviceToken; + data['ProjectOutSA'] = this.projectOutSA; + data['LoginType'] = this.loginType; + data['ZipCode'] = this.zipCode; + data['isRegister'] = this.isRegister; + data['LogInTokenID'] = this.logInTokenID; + data['SearchType'] = this.searchType; + data['PatientID'] = this.patientID; + data['NationalID'] = this.nationalID; + data['PatientIdentificationID'] = this.patientIdentificationID; + data['activationCode'] = this.activationCode; + data['IsSilentLogin'] = this.isSilentLogin; + 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['ForRegisteration'] = this.forRegisteration; + + return data; + } +} diff --git a/lib/models/Authentication/check_activation_code_request_register.dart b/lib/models/Authentication/check_activation_code_request_register.dart new file mode 100644 index 00000000..85e1f56f --- /dev/null +++ b/lib/models/Authentication/check_activation_code_request_register.dart @@ -0,0 +1,121 @@ +class CheckActivationCodeRegisterReq { + int? patientMobileNumber; + String? mobileNo; + String? deviceToken; + bool? projectOutSA; + int? loginType; + String? zipCode; + bool? isRegister; + String? logInTokenID; + int? searchType; + int? patientID; + String? nationalID; + String? patientIdentificationID; + String? activationCode; + bool? isSilentLogin; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + dynamic sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + bool? forRegisteration; + String? dob; + int? isHijri; + String? healthId; + + CheckActivationCodeRegisterReq({ + this.patientMobileNumber, + this.mobileNo, + this.deviceToken, + this.projectOutSA, + this.loginType, + this.zipCode, + this.isRegister, + this.logInTokenID, + this.searchType, + this.patientID, + this.nationalID, + this.patientIdentificationID, + this.activationCode, + this.isSilentLogin, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.forRegisteration, + this.dob, + this.isHijri, + this.healthId, + }); + + CheckActivationCodeRegisterReq.fromJson(Map json) { + patientMobileNumber = json['PatientMobileNumber']; + mobileNo = json['MobileNo']; + deviceToken = json['DeviceToken']; + projectOutSA = json['ProjectOutSA']; + loginType = json['LoginType']; + zipCode = json['ZipCode']; + isRegister = json['isRegister']; + logInTokenID = json['LogInTokenID']; + searchType = json['SearchType']; + patientID = json['PatientID']; + nationalID = json['NationalID']; + patientIdentificationID = json['PatientIdentificationID']; + activationCode = json['activationCode']; + isSilentLogin = json['IsSilentLogin']; + 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']; + forRegisteration = json['ForRegisteration']; + dob = json['DOB']; + isHijri = json['IsHijri']; + healthId = json['HealthId']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientMobileNumber'] = this.patientMobileNumber; + data['MobileNo'] = this.mobileNo; + data['DeviceToken'] = this.deviceToken; + data['ProjectOutSA'] = this.projectOutSA; + data['LoginType'] = this.loginType; + data['ZipCode'] = this.zipCode; + data['isRegister'] = this.isRegister; + data['LogInTokenID'] = this.logInTokenID; + data['SearchType'] = this.searchType; + data['PatientID'] = this.patientID; + data['NationalID'] = this.nationalID; + data['PatientIdentificationID'] = this.patientIdentificationID; + data['activationCode'] = this.activationCode; + data['IsSilentLogin'] = this.isSilentLogin; + 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['ForRegisteration'] = this.forRegisteration; + data['DOB'] = dob; + data['IsHijri'] = isHijri; + data['HealthId'] = healthId; + return data; + } +} diff --git a/lib/models/Authentication/check_activation_code_response.dart b/lib/models/Authentication/check_activation_code_response.dart new file mode 100644 index 00000000..2fa18a5e --- /dev/null +++ b/lib/models/Authentication/check_activation_code_response.dart @@ -0,0 +1,547 @@ +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; + +class CheckActivationCode { + dynamic date; + int? languageID; + int? serviceName; + dynamic time; + dynamic androidLink; + String? authenticationTokenID; + dynamic data; + bool? dataw; + int? dietType; + dynamic errorCode; + dynamic errorEndUserMessage; + dynamic errorEndUserMessageN; + dynamic errorMessage; + int? errorType; + int? foodCategory; + dynamic iOSLink; + bool? isAuthenticated; + int? mealOrderStatus; + int? mealType; + int? messageStatus; + int? numberOfResultRecords; + dynamic patientBlodType; + dynamic successMsg; + dynamic successMsgN; + dynamic doctorInformationList; + dynamic getAllPendingRecordsList; + dynamic getAllSharedRecordsByStatusList; + dynamic getResponseFileList; + bool? isHMGPatient; + bool? isLoginSuccessfully; + bool? isNeedUpdateIdintificationNo; + bool? kioskSendSMS; + AuthenticatedUser? list; + dynamic listAskHabibMobileLoginInfo; + dynamic listAskHabibPatientFile; + dynamic listMergeFiles; + dynamic listMobileLoginInfo; + dynamic listPatientCount; + dynamic logInTokenID; + dynamic mohemmPrivilegeList; + int? pateintID; + String? patientBloodType; + bool? patientHasFile; + dynamic patientMergedIDs; + bool? patientOutSA; + int? patientShareRequestID; + int? patientType; + int? projectIDOut; + dynamic returnMessage; + bool? sMSLoginRequired; + dynamic servicePrivilegeList; + dynamic sharePatientName; + dynamic verificationCode; + dynamic email; + dynamic errorList; + bool? hasFile; + bool? isActiveCode; + bool? isMerged; + bool? isNeedUserAgreement; + bool? isSMSSent; + dynamic memberList; + dynamic message; + int? statusCode; + + CheckActivationCode( + {this.date, + this.languageID, + this.serviceName, + this.time, + this.androidLink, + this.authenticationTokenID, + this.data, + this.dataw, + this.dietType, + this.errorCode, + this.errorEndUserMessage, + this.errorEndUserMessageN, + this.errorMessage, + this.errorType, + this.foodCategory, + this.iOSLink, + this.isAuthenticated, + this.mealOrderStatus, + this.mealType, + this.messageStatus, + this.numberOfResultRecords, + this.patientBlodType, + this.successMsg, + this.successMsgN, + this.doctorInformationList, + this.getAllPendingRecordsList, + this.getAllSharedRecordsByStatusList, + this.getResponseFileList, + this.isHMGPatient, + this.isLoginSuccessfully, + this.isNeedUpdateIdintificationNo, + this.kioskSendSMS, + this.list, + this.listAskHabibMobileLoginInfo, + this.listAskHabibPatientFile, + this.listMergeFiles, + this.listMobileLoginInfo, + this.listPatientCount, + this.logInTokenID, + this.mohemmPrivilegeList, + this.pateintID, + this.patientBloodType, + this.patientHasFile, + this.patientMergedIDs, + this.patientOutSA, + this.patientShareRequestID, + this.patientType, + this.projectIDOut, + this.returnMessage, + this.sMSLoginRequired, + this.servicePrivilegeList, + this.sharePatientName, + this.verificationCode, + this.email, + this.errorList, + this.hasFile, + this.isActiveCode, + this.isMerged, + this.isNeedUserAgreement, + this.isSMSSent, + this.memberList, + this.message, + this.statusCode}); + + CheckActivationCode.fromJson(Map json) { + date = json['Date']; + languageID = json['LanguageID']; + serviceName = json['ServiceName']; + time = json['Time']; + androidLink = json['AndroidLink']; + authenticationTokenID = json['AuthenticationTokenID']; + data = json['Data']; + dataw = json['Dataw']; + dietType = json['DietType']; + errorCode = json['ErrorCode']; + errorEndUserMessage = json['ErrorEndUserMessage']; + errorEndUserMessageN = json['ErrorEndUserMessageN']; + errorMessage = json['ErrorMessage']; + errorType = json['ErrorType']; + foodCategory = json['FoodCategory']; + iOSLink = json['IOSLink']; + isAuthenticated = json['IsAuthenticated']; + mealOrderStatus = json['MealOrderStatus']; + mealType = json['MealType']; + messageStatus = json['MessageStatus']; + numberOfResultRecords = json['NumberOfResultRecords']; + patientBlodType = json['PatientBlodType']; + successMsg = json['SuccessMsg']; + successMsgN = json['SuccessMsgN']; + doctorInformationList = json['DoctorInformation_List']; + getAllPendingRecordsList = json['GetAllPendingRecordsList']; + getAllSharedRecordsByStatusList = json['GetAllSharedRecordsByStatusList']; + getResponseFileList = json['GetResponseFileList']; + isHMGPatient = json['IsHMGPatient']; + isLoginSuccessfully = json['IsLoginSuccessfully']; + isNeedUpdateIdintificationNo = json['IsNeedUpdateIdintificationNo']; + kioskSendSMS = json['KioskSendSMS']; + if (json['List'] != null) { + list = new AuthenticatedUser.fromJson(json['List'][0]); + } + listAskHabibMobileLoginInfo = json['List_AskHabibMobileLoginInfo']; + listAskHabibPatientFile = json['List_AskHabibPatientFile']; + listMergeFiles = json['List_MergeFiles']; + listMobileLoginInfo = json['List_MobileLoginInfo']; + listPatientCount = json['List_PatientCount']; + logInTokenID = json['LogInTokenID']; + mohemmPrivilegeList = json['MohemmPrivilege_List']; + pateintID = json['PateintID']; + patientBloodType = json['PatientBloodType']; + patientHasFile = json['PatientHasFile']; + patientMergedIDs = json['PatientMergedIDs']; + patientOutSA = json['PatientOutSA']; + patientShareRequestID = json['PatientShareRequestID']; + patientType = json['PatientType']; + projectIDOut = json['ProjectIDOut']; + returnMessage = json['ReturnMessage']; + sMSLoginRequired = json['SMSLoginRequired']; + servicePrivilegeList = json['ServicePrivilege_List']; + sharePatientName = json['SharePatientName']; + verificationCode = json['VerificationCode']; + email = json['email']; + errorList = json['errorList']; + hasFile = json['hasFile']; + isActiveCode = json['isActiveCode']; + isMerged = json['isMerged']; + isNeedUserAgreement = json['isNeedUserAgreement']; + isSMSSent = json['isSMSSent']; + memberList = json['memberList']; + message = json['message']; + statusCode = json['statusCode']; + } + + Map toJson() { + final Map data = new Map(); + data['Date'] = this.date; + data['LanguageID'] = this.languageID; + data['ServiceName'] = this.serviceName; + data['Time'] = this.time; + data['AndroidLink'] = this.androidLink; + data['AuthenticationTokenID'] = this.authenticationTokenID; + data['Data'] = this.data; + data['Dataw'] = this.dataw; + data['DietType'] = this.dietType; + data['ErrorCode'] = this.errorCode; + data['ErrorEndUserMessage'] = this.errorEndUserMessage; + data['ErrorEndUserMessageN'] = this.errorEndUserMessageN; + data['ErrorMessage'] = this.errorMessage; + data['ErrorType'] = this.errorType; + data['FoodCategory'] = this.foodCategory; + data['IOSLink'] = this.iOSLink; + data['IsAuthenticated'] = this.isAuthenticated; + data['MealOrderStatus'] = this.mealOrderStatus; + data['MealType'] = this.mealType; + data['MessageStatus'] = this.messageStatus; + data['NumberOfResultRecords'] = this.numberOfResultRecords; + data['PatientBlodType'] = this.patientBlodType; + data['SuccessMsg'] = this.successMsg; + data['SuccessMsgN'] = this.successMsgN; + data['DoctorInformation_List'] = this.doctorInformationList; + data['GetAllPendingRecordsList'] = this.getAllPendingRecordsList; + data['GetAllSharedRecordsByStatusList'] = + this.getAllSharedRecordsByStatusList; + data['GetResponseFileList'] = this.getResponseFileList; + data['IsHMGPatient'] = this.isHMGPatient; + data['IsLoginSuccessfully'] = this.isLoginSuccessfully; + data['IsNeedUpdateIdintificationNo'] = this.isNeedUpdateIdintificationNo; + data['KioskSendSMS'] = this.kioskSendSMS; + if (this.list != null) { + data['List'] = this.list; + } + data['List_AskHabibMobileLoginInfo'] = this.listAskHabibMobileLoginInfo; + data['List_AskHabibPatientFile'] = this.listAskHabibPatientFile; + data['List_MergeFiles'] = this.listMergeFiles; + data['List_MobileLoginInfo'] = this.listMobileLoginInfo; + data['List_PatientCount'] = this.listPatientCount; + data['LogInTokenID'] = this.logInTokenID; + data['MohemmPrivilege_List'] = this.mohemmPrivilegeList; + data['PateintID'] = this.pateintID; + data['PatientBloodType'] = this.patientBloodType; + data['PatientHasFile'] = this.patientHasFile; + data['PatientMergedIDs'] = this.patientMergedIDs; + data['PatientOutSA'] = this.patientOutSA; + data['PatientShareRequestID'] = this.patientShareRequestID; + data['PatientType'] = this.patientType; + data['ProjectIDOut'] = this.projectIDOut; + data['ReturnMessage'] = this.returnMessage; + data['SMSLoginRequired'] = this.sMSLoginRequired; + data['ServicePrivilege_List'] = this.servicePrivilegeList; + data['SharePatientName'] = this.sharePatientName; + data['VerificationCode'] = this.verificationCode; + data['email'] = this.email; + data['errorList'] = this.errorList; + data['hasFile'] = this.hasFile; + data['isActiveCode'] = this.isActiveCode; + data['isMerged'] = this.isMerged; + data['isNeedUserAgreement'] = this.isNeedUserAgreement; + data['isSMSSent'] = this.isSMSSent; + data['memberList'] = this.memberList; + data['message'] = this.message; + data['statusCode'] = this.statusCode; + return data; + } +} + +class List { + String? setupID; + int? patientType; + int? patientID; + String? firstName; + String? middleName; + String? lastName; + String? firstNameN; + String? middleNameN; + String? lastNameN; + int? relationshipID; + int? gender; + String? dateofBirth; + dynamic dateofBirthN; + String? nationalityID; + dynamic phoneResi; + dynamic phoneOffice; + String? mobileNumber; + dynamic faxNumber; + String? emailAddress; + dynamic bloodGroup; + dynamic rHFactor; + bool? isEmailAlertRequired; + bool? isSMSAlertRequired; + String? preferredLanguage; + bool? isPrivilegedMember; + dynamic memberID; + dynamic expiryDate; + dynamic isHmgEmployee; + dynamic employeeID; + dynamic emergencyContactName; + dynamic emergencyContactNo; + int? patientPayType; + dynamic dHCCPatientRefID; + bool? isPatientDummy; + int? status; + dynamic isStatusCleared; + int? patientIdentificationType; + String? patientIdentificationNo; + int? projectID; + int? infoSourceID; + dynamic address; + int? age; + String? ageDesc; + int? areaID; + int? createdBy; + String? genderDescription; + dynamic iR; + dynamic iSOCityID; + dynamic iSOCountryID; + ListPrivilege? listPrivilege; + dynamic marital; + int? outSA; + dynamic pOBox; + bool? receiveHealthSummaryReport; + int? sourceType; + dynamic strDateofBirth; + dynamic tempAddress; + dynamic zipCode; + + List({ + 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, + }); + + List.fromJson(Map json) { + setupID = json['SetupID']; + patientType = json['PatientType']; + patientID = json['PatientID']; + firstName = json['FirstName']; + middleName = json['MiddleName']; + lastName = json['LastName']; + firstNameN = json['FirstNameN']; + middleNameN = json['MiddleNameN']; + lastNameN = json['LastNameN']; + relationshipID = json['RelationshipID']; + gender = json['Gender']; + dateofBirth = json['DateofBirth']; + dateofBirthN = json['DateofBirthN']; + nationalityID = json['NationalityID']; + phoneResi = json['PhoneResi']; + phoneOffice = json['PhoneOffice']; + mobileNumber = json['MobileNumber']; + faxNumber = json['FaxNumber']; + emailAddress = json['EmailAddress']; + bloodGroup = json['BloodGroup']; + rHFactor = json['RHFactor']; + isEmailAlertRequired = json['IsEmailAlertRequired']; + isSMSAlertRequired = json['IsSMSAlertRequired']; + preferredLanguage = json['PreferredLanguage']; + isPrivilegedMember = json['IsPrivilegedMember']; + memberID = json['MemberID']; + expiryDate = json['ExpiryDate']; + isHmgEmployee = json['IsHmgEmployee']; + employeeID = json['EmployeeID']; + emergencyContactName = json['EmergencyContactName']; + emergencyContactNo = json['EmergencyContactNo']; + patientPayType = json['PatientPayType']; + dHCCPatientRefID = json['DHCCPatientRefID']; + isPatientDummy = json['IsPatientDummy']; + status = json['Status']; + isStatusCleared = json['IsStatusCleared']; + patientIdentificationType = json['PatientIdentificationType']; + patientIdentificationNo = json['PatientIdentificationNo']; + projectID = json['ProjectID']; + infoSourceID = json['InfoSourceID']; + address = json['Address']; + age = json['Age']; + ageDesc = json['AgeDesc']; + areaID = json['AreaID']; + createdBy = json['CreatedBy']; + genderDescription = json['GenderDescription']; + iR = json['IR']; + iSOCityID = json['ISOCityID']; + iSOCountryID = json['ISOCountryID']; + if (json['ListPrivilege'] != null) { + listPrivilege = ListPrivilege.fromJson(json['ListPrivilege']); + } + marital = json['Marital']; + outSA = json['OutSA']; + pOBox = json['POBox']; + receiveHealthSummaryReport = json['ReceiveHealthSummaryReport']; + sourceType = json['SourceType']; + strDateofBirth = json['StrDateofBirth']; + tempAddress = json['TempAddress']; + zipCode = json['ZipCode']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['FirstName'] = this.firstName; + data['MiddleName'] = this.middleName; + data['LastName'] = this.lastName; + data['FirstNameN'] = this.firstNameN; + data['MiddleNameN'] = this.middleNameN; + data['LastNameN'] = this.lastNameN; + data['RelationshipID'] = this.relationshipID; + data['Gender'] = this.gender; + data['DateofBirth'] = this.dateofBirth; + data['DateofBirthN'] = this.dateofBirthN; + data['NationalityID'] = this.nationalityID; + data['PhoneResi'] = this.phoneResi; + data['PhoneOffice'] = this.phoneOffice; + data['MobileNumber'] = this.mobileNumber; + data['FaxNumber'] = this.faxNumber; + data['EmailAddress'] = this.emailAddress; + data['BloodGroup'] = this.bloodGroup; + data['RHFactor'] = this.rHFactor; + data['IsEmailAlertRequired'] = this.isEmailAlertRequired; + data['IsSMSAlertRequired'] = this.isSMSAlertRequired; + data['PreferredLanguage'] = this.preferredLanguage; + data['IsPrivilegedMember'] = this.isPrivilegedMember; + data['MemberID'] = this.memberID; + data['ExpiryDate'] = this.expiryDate; + data['IsHmgEmployee'] = this.isHmgEmployee; + data['EmployeeID'] = this.employeeID; + data['EmergencyContactName'] = this.emergencyContactName; + data['EmergencyContactNo'] = this.emergencyContactNo; + data['PatientPayType'] = this.patientPayType; + data['DHCCPatientRefID'] = this.dHCCPatientRefID; + data['IsPatientDummy'] = this.isPatientDummy; + data['Status'] = this.status; + data['IsStatusCleared'] = this.isStatusCleared; + data['PatientIdentificationType'] = this.patientIdentificationType; + data['PatientIdentificationNo'] = this.patientIdentificationNo; + data['ProjectID'] = this.projectID; + data['InfoSourceID'] = this.infoSourceID; + data['Address'] = this.address; + data['Age'] = this.age; + data['AgeDesc'] = this.ageDesc; + data['AreaID'] = this.areaID; + data['CreatedBy'] = this.createdBy; + data['GenderDescription'] = this.genderDescription; + data['IR'] = this.iR; + data['ISOCityID'] = this.iSOCityID; + data['ISOCountryID'] = this.iSOCountryID; + if (this.listPrivilege != null) { + data['ListPrivilege'] = this.listPrivilege; + } + data['Marital'] = this.marital; + data['OutSA'] = this.outSA; + data['POBox'] = this.pOBox; + data['ReceiveHealthSummaryReport'] = this.receiveHealthSummaryReport; + data['SourceType'] = this.sourceType; + data['StrDateofBirth'] = this.strDateofBirth; + data['TempAddress'] = this.tempAddress; + data['ZipCode'] = this.zipCode; + + return data; + } +} + +class ListPrivilege { + int? iD; + String? serviceName; + bool? previlege; + dynamic region; + + ListPrivilege({this.iD, this.serviceName, this.previlege, this.region}); + + ListPrivilege.fromJson(Map json) { + iD = json['ID']; + serviceName = json['ServiceName']; + previlege = json['Previlege']; + region = json['Region']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['ServiceName'] = this.serviceName; + data['Previlege'] = this.previlege; + data['Region'] = this.region; + return data; + } +} diff --git a/lib/models/Authentication/check_paitent_authentication_req.dart b/lib/models/Authentication/check_paitent_authentication_req.dart new file mode 100644 index 00000000..8aa348c1 --- /dev/null +++ b/lib/models/Authentication/check_paitent_authentication_req.dart @@ -0,0 +1,88 @@ +class CheckPatientAuthenticationReq { + int? patientMobileNumber; + String? zipCode; + bool? isRegister; + String? tokenID; + int? searchType; + String? patientIdentificationID; + int? patientID; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + dynamic sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + String? dob; + int? isHijri; + String? healthId; + CheckPatientAuthenticationReq( + {this.patientMobileNumber, + this.zipCode, + this.isRegister, + this.tokenID, + this.searchType, + this.patientIdentificationID, + this.patientID, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.dob, + this.isHijri, + this.healthId + }); + + CheckPatientAuthenticationReq.fromJson(Map json) { + patientMobileNumber = json['PatientMobileNumber']; + zipCode = json['ZipCode']; + isRegister = json['isRegister']; + tokenID = json['TokenID']; + searchType = json['SearchType']; + patientIdentificationID = json['PatientIdentificationID']; + patientID = json['PatientID']; + 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']; + dob = json['dob']; + isHijri = json['isHijri']; + healthId = json['HealthId']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientMobileNumber'] = this.patientMobileNumber; + data['ZipCode'] = this.zipCode; + data['isRegister'] = this.isRegister; + data['TokenID'] = this.tokenID; + data['SearchType'] = this.searchType; + data['PatientIdentificationID'] = this.patientIdentificationID; + data['PatientID'] = this.patientID; + 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['dob'] =this.dob; + data['isHijri'] = this.isHijri; + data['HealthId'] = healthId; + return data; + } +} diff --git a/lib/models/Authentication/check_user_status_reponse.dart b/lib/models/Authentication/check_user_status_reponse.dart new file mode 100644 index 00000000..0701c8b3 --- /dev/null +++ b/lib/models/Authentication/check_user_status_reponse.dart @@ -0,0 +1,316 @@ +class CheckUserStatusResponse { + dynamic date; + int? languageID; + int? serviceName; + dynamic time; + dynamic androidLink; + dynamic authenticationTokenID; + dynamic data; + bool? dataw; + int? dietType; + dynamic errorCode; + dynamic errorEndUserMessage; + dynamic errorEndUserMessageN; + dynamic errorMessage; + int? errorType; + int? foodCategory; + dynamic iOSLink; + bool? isAuthenticated; + int? mealOrderStatus; + int? mealType; + int? messageStatus; + int? numberOfResultRecords; + dynamic patientBlodType; + dynamic successMsg; + dynamic successMsgN; + dynamic accessTokenObject; + int? age; + dynamic clientIdentifierId; + int? createdBy; + String? dateOfBirth; + String? firstNameAr; + String? firstNameEn; + String? gender; + dynamic genderAr; + dynamic genderEn; + String? healthId; + String? idNumber; + String? idType; + bool? isHijri; + int? isInstertedOrUpdated; + int? isdynamic; + int? isPatientExistNHIC; + String? lastNameAr; + String? lastNameEn; + dynamic listActiveAccessToken; + String? maritalStatus; + String? maritalStatusCode; + String? nationality; + String? nationalityCode; + String? occupation; + String? patientStatus; + String? placeofBirth; + dynamic practitionerStatusCode; + dynamic practitionerStatusDescAr; + dynamic practitionerStatusDescEn; + String? secondNameAr; + String? secondNameEn; + String? thirdNameAr; + String? thirdNameEn; + dynamic accessToken; + int? categoryCode; + dynamic categoryNameAr; + dynamic categoryNameEn; + int? constraintCode; + dynamic constraintNameAr; + dynamic constraintNameEn; + dynamic content; + dynamic licenseExpiryDate; + dynamic licenseIssuedDate; + dynamic licenseStatusCode; + dynamic licenseStatusDescAr; + dynamic licenseStatusDescEn; + dynamic organizations; + dynamic registrationNumber; + int? specialtyCode; + dynamic specialtyNameAr; + dynamic specialtyNameEn; + + CheckUserStatusResponse( + {this.date, + this.languageID, + this.serviceName, + this.time, + this.androidLink, + this.authenticationTokenID, + this.data, + this.dataw, + this.dietType, + this.errorCode, + this.errorEndUserMessage, + this.errorEndUserMessageN, + this.errorMessage, + this.errorType, + this.foodCategory, + this.iOSLink, + this.isAuthenticated, + this.mealOrderStatus, + this.mealType, + this.messageStatus, + this.numberOfResultRecords, + this.patientBlodType, + this.successMsg, + this.successMsgN, + this.accessTokenObject, + this.age, + this.clientIdentifierId, + this.createdBy, + this.dateOfBirth, + this.firstNameAr, + this.firstNameEn, + this.gender, + this.genderAr, + this.genderEn, + this.healthId, + this.idNumber, + this.idType, + this.isHijri, + this.isInstertedOrUpdated, + this.isdynamic, + this.isPatientExistNHIC, + this.lastNameAr, + this.lastNameEn, + this.listActiveAccessToken, + this.maritalStatus, + this.maritalStatusCode, + this.nationality, + this.nationalityCode, + this.occupation, + this.patientStatus, + this.placeofBirth, + this.practitionerStatusCode, + this.practitionerStatusDescAr, + this.practitionerStatusDescEn, + this.secondNameAr, + this.secondNameEn, + this.thirdNameAr, + this.thirdNameEn, + this.accessToken, + this.categoryCode, + this.categoryNameAr, + this.categoryNameEn, + this.constraintCode, + this.constraintNameAr, + this.constraintNameEn, + this.content, + this.licenseExpiryDate, + this.licenseIssuedDate, + this.licenseStatusCode, + this.licenseStatusDescAr, + this.licenseStatusDescEn, + this.organizations, + this.registrationNumber, + this.specialtyCode, + this.specialtyNameAr, + this.specialtyNameEn}); + + CheckUserStatusResponse.fromJson(Map json) { + date = json['Date']; + languageID = json['LanguageID']; + serviceName = json['ServiceName']; + time = json['Time']; + androidLink = json['AndroidLink']; + authenticationTokenID = json['AuthenticationTokenID']; + data = json['Data']; + dataw = json['Dataw']; + dietType = json['DietType']; + errorCode = json['ErrorCode']; + errorEndUserMessage = json['ErrorEndUserMessage']; + errorEndUserMessageN = json['ErrorEndUserMessageN']; + errorMessage = json['ErrorMessage']; + errorType = json['ErrorType']; + foodCategory = json['FoodCategory']; + iOSLink = json['IOSLink']; + isAuthenticated = json['IsAuthenticated']; + mealOrderStatus = json['MealOrderStatus']; + mealType = json['MealType']; + messageStatus = json['MessageStatus']; + numberOfResultRecords = json['NumberOfResultRecords']; + patientBlodType = json['PatientBlodType']; + successMsg = json['SuccessMsg']; + successMsgN = json['SuccessMsgN']; + accessTokenObject = json['AccessTokenObject']; + age = json['Age']; + clientIdentifierId = json['ClientIdentifierId']; + createdBy = json['CreatedBy']; + dateOfBirth = json['DateOfBirth']; + firstNameAr = json['FirstNameAr']; + firstNameEn = json['FirstNameEn']; + gender = json['Gender']; + genderAr = json['GenderAr']; + genderEn = json['GenderEn']; + healthId = json['HealthId']; + idNumber = json['IdNumber']; + idType = json['IdType']; + isHijri = json['IsHijri']; + isInstertedOrUpdated = json['IsInstertedOrUpdated']; + isdynamic = json['Isdynamic']; + isPatientExistNHIC = json['IsPatientExistNHIC']; + lastNameAr = json['LastNameAr']; + lastNameEn = json['LastNameEn']; + listActiveAccessToken = json['List_ActiveAccessToken']; + maritalStatus = json['MaritalStatus']; + maritalStatusCode = json['MaritalStatusCode']; + nationality = json['Nationality']; + nationalityCode = json['NationalityCode']; + occupation = json['Occupation']; + patientStatus = json['PatientStatus']; + placeofBirth = json['PlaceofBirth']; + practitionerStatusCode = json['PractitionerStatusCode']; + practitionerStatusDescAr = json['PractitionerStatusDescAr']; + practitionerStatusDescEn = json['PractitionerStatusDescEn']; + secondNameAr = json['SecondNameAr']; + secondNameEn = json['SecondNameEn']; + thirdNameAr = json['ThirdNameAr']; + thirdNameEn = json['ThirdNameEn']; + accessToken = json['accessToken']; + categoryCode = json['categoryCode']; + categoryNameAr = json['categoryNameAr']; + categoryNameEn = json['categoryNameEn']; + constraintCode = json['constraintCode']; + constraintNameAr = json['constraintNameAr']; + constraintNameEn = json['constraintNameEn']; + content = json['content']; + licenseExpiryDate = json['licenseExpiryDate']; + licenseIssuedDate = json['licenseIssuedDate']; + licenseStatusCode = json['licenseStatusCode']; + licenseStatusDescAr = json['licenseStatusDescAr']; + licenseStatusDescEn = json['licenseStatusDescEn']; + organizations = json['organizations']; + registrationNumber = json['registrationNumber']; + specialtyCode = json['specialtyCode']; + specialtyNameAr = json['specialtyNameAr']; + specialtyNameEn = json['specialtyNameEn']; + } + + Map toJson() { + final Map data = new Map(); + data['Date'] = this.date; + data['LanguageID'] = this.languageID; + data['ServiceName'] = this.serviceName; + data['Time'] = this.time; + data['AndroidLink'] = this.androidLink; + data['AuthenticationTokenID'] = this.authenticationTokenID; + data['Data'] = this.data; + data['Dataw'] = this.dataw; + data['DietType'] = this.dietType; + data['ErrorCode'] = this.errorCode; + data['ErrorEndUserMessage'] = this.errorEndUserMessage; + data['ErrorEndUserMessageN'] = this.errorEndUserMessageN; + data['ErrorMessage'] = this.errorMessage; + data['ErrorType'] = this.errorType; + data['FoodCategory'] = this.foodCategory; + data['IOSLink'] = this.iOSLink; + data['IsAuthenticated'] = this.isAuthenticated; + data['MealOrderStatus'] = this.mealOrderStatus; + data['MealType'] = this.mealType; + data['MessageStatus'] = this.messageStatus; + data['NumberOfResultRecords'] = this.numberOfResultRecords; + data['PatientBlodType'] = this.patientBlodType; + data['SuccessMsg'] = this.successMsg; + data['SuccessMsgN'] = this.successMsgN; + data['AccessTokenObject'] = this.accessTokenObject; + data['Age'] = this.age; + data['ClientIdentifierId'] = this.clientIdentifierId; + data['CreatedBy'] = this.createdBy; + data['DateOfBirth'] = this.dateOfBirth; + data['FirstNameAr'] = this.firstNameAr; + data['FirstNameEn'] = this.firstNameEn; + data['Gender'] = this.gender; + data['GenderAr'] = this.genderAr; + data['GenderEn'] = this.genderEn; + data['HealthId'] = this.healthId; + data['IdNumber'] = this.idNumber; + data['IdType'] = this.idType; + data['IsHijri'] = this.isHijri; + data['IsInstertedOrUpdated'] = this.isInstertedOrUpdated; + data['Isdynamic'] = this.isdynamic; + data['IsPatientExistNHIC'] = this.isPatientExistNHIC; + data['LastNameAr'] = this.lastNameAr; + data['LastNameEn'] = this.lastNameEn; + data['List_ActiveAccessToken'] = this.listActiveAccessToken; + data['MaritalStatus'] = this.maritalStatus; + data['MaritalStatusCode'] = this.maritalStatusCode; + data['Nationality'] = this.nationality; + data['NationalityCode'] = this.nationalityCode; + data['Occupation'] = this.occupation; + data['PatientStatus'] = this.patientStatus; + data['PlaceofBirth'] = this.placeofBirth; + data['PractitionerStatusCode'] = this.practitionerStatusCode; + data['PractitionerStatusDescAr'] = this.practitionerStatusDescAr; + data['PractitionerStatusDescEn'] = this.practitionerStatusDescEn; + data['SecondNameAr'] = this.secondNameAr; + data['SecondNameEn'] = this.secondNameEn; + data['ThirdNameAr'] = this.thirdNameAr; + data['ThirdNameEn'] = this.thirdNameEn; + data['accessToken'] = this.accessToken; + data['categoryCode'] = this.categoryCode; + data['categoryNameAr'] = this.categoryNameAr; + data['categoryNameEn'] = this.categoryNameEn; + data['constraintCode'] = this.constraintCode; + data['constraintNameAr'] = this.constraintNameAr; + data['constraintNameEn'] = this.constraintNameEn; + data['content'] = this.content; + data['licenseExpiryDate'] = this.licenseExpiryDate; + data['licenseIssuedDate'] = this.licenseIssuedDate; + data['licenseStatusCode'] = this.licenseStatusCode; + data['licenseStatusDescAr'] = this.licenseStatusDescAr; + data['licenseStatusDescEn'] = this.licenseStatusDescEn; + data['organizations'] = this.organizations; + data['registrationNumber'] = this.registrationNumber; + data['specialtyCode'] = this.specialtyCode; + data['specialtyNameAr'] = this.specialtyNameAr; + data['specialtyNameEn'] = this.specialtyNameEn; + return data; + } +} diff --git a/lib/models/Authentication/check_user_status_req.dart b/lib/models/Authentication/check_user_status_req.dart new file mode 100644 index 00000000..69f94fd6 --- /dev/null +++ b/lib/models/Authentication/check_user_status_req.dart @@ -0,0 +1,60 @@ +class CheckUserStatusRequest { + String? patientIdentificationID; + String? dOB; + int? isHijri; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + dynamic sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + + CheckUserStatusRequest( + {this.patientIdentificationID, + this.dOB, + this.isHijri, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID}); + + CheckUserStatusRequest.fromJson(Map json) { + patientIdentificationID = json['PatientIdentificationID']; + dOB = json['DOB']; + isHijri = json['IsHijri']; + 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['PatientIdentificationID'] = this.patientIdentificationID; + data['DOB'] = this.dOB; + data['IsHijri'] = this.isHijri; + 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/models/Authentication/checkpatient_for_registration.dart b/lib/models/Authentication/checkpatient_for_registration.dart new file mode 100644 index 00000000..fa23df5f --- /dev/null +++ b/lib/models/Authentication/checkpatient_for_registration.dart @@ -0,0 +1,80 @@ +class CheckPatientForRegistration { + int? patientIdentificationID; + int? patientMobileNumber; + String? zipCode; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + dynamic sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + String? tokenID; + int? patientID; + bool? isRegister; + String? dob; + int? isHijri; + + CheckPatientForRegistration( + {this.patientIdentificationID, + this.patientMobileNumber, + this.zipCode, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.tokenID, + this.patientID, + this.isRegister, + this.dob, + this.isHijri}); + + CheckPatientForRegistration.fromJson(Map json) { + patientIdentificationID = json['PatientIdentificationID']; + patientMobileNumber = json['PatientMobileNumber']; + zipCode = json['ZipCode']; + 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']; + tokenID = json['TokenID']; + patientID = json['PatientID']; + isRegister = json['isRegister']; + dob = json['DOB']; + isHijri = json['IsHijri']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientIdentificationID'] = this.patientIdentificationID; + data['PatientMobileNumber'] = this.patientMobileNumber; + data['ZipCode'] = this.zipCode; + 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['TokenID'] = this.tokenID; + data['PatientID'] = this.patientID; + data['isRegister'] = this.isRegister; + data['DOB'] = dob; + data['IsHijri'] = isHijri; + return data; + } +} diff --git a/lib/models/Authentication/countries_list.dart b/lib/models/Authentication/countries_list.dart new file mode 100644 index 00000000..157e9291 --- /dev/null +++ b/lib/models/Authentication/countries_list.dart @@ -0,0 +1,21 @@ +class CountriesLists { + String? iD; + String? name; + dynamic nameN; + + CountriesLists({this.iD, this.name, this.nameN}); + + CountriesLists.fromJson(Map json) { + iD = json['ID']; + name = json['Name']; + nameN = json['NameN']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['Name'] = this.name; + data['NameN'] = this.nameN; + return data; + } +} \ No newline at end of file diff --git a/lib/models/Authentication/get_mobile_info_request.dart b/lib/models/Authentication/get_mobile_info_request.dart new file mode 100644 index 00000000..07025c35 --- /dev/null +++ b/lib/models/Authentication/get_mobile_info_request.dart @@ -0,0 +1,96 @@ +class GetMobileLoginInfoRequest { + int? patientMobileNumber; + String? mobileNo; + String? deviceToken; + int? projectOutSA; + int? loginType; + String? zipCode; + bool? isRegister; + String? logInTokenID; + int? searchType; + int? patientID; + String? nationalID; + String? patientIdentificationID; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + dynamic sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + + GetMobileLoginInfoRequest( + {this.patientMobileNumber, + this.mobileNo, + this.deviceToken, + this.projectOutSA, + this.loginType, + this.zipCode, + this.isRegister, + this.logInTokenID, + this.searchType, + this.patientID, + this.nationalID, + this.patientIdentificationID, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID}); + + GetMobileLoginInfoRequest.fromJson(Map json) { + patientMobileNumber = json['PatientMobileNumber']; + mobileNo = json['MobileNo']; + deviceToken = json['DeviceToken']; + projectOutSA = json['ProjectOutSA']; + loginType = json['LoginType']; + zipCode = json['ZipCode']; + isRegister = json['isRegister']; + logInTokenID = json['LogInTokenID']; + searchType = json['SearchType']; + patientID = json['PatientID']; + nationalID = json['NationalID']; + patientIdentificationID = json['PatientIdentificationID']; + 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['PatientMobileNumber'] = this.patientMobileNumber; + data['MobileNo'] = this.mobileNo; + data['DeviceToken'] = this.deviceToken; + data['ProjectOutSA'] = this.projectOutSA; + data['LoginType'] = this.loginType; + data['ZipCode'] = this.zipCode; + data['isRegister'] = this.isRegister; + data['LogInTokenID'] = this.logInTokenID; + data['SearchType'] = this.searchType; + data['PatientID'] = this.patientID; + data['NationalID'] = this.nationalID; + data['PatientIdentificationID'] = this.patientIdentificationID; + 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/models/Authentication/get_mobile_info_response.dart b/lib/models/Authentication/get_mobile_info_response.dart new file mode 100644 index 00000000..3b41300a --- /dev/null +++ b/lib/models/Authentication/get_mobile_info_response.dart @@ -0,0 +1,292 @@ +class GetMobileLoginInfoResponse { + dynamic date; + int? languageID; + int? serviceName; + dynamic time; + dynamic androidLink; + dynamic authenticationTokenID; + dynamic data; + bool? dataw; + int? dietType; + dynamic errorCode; + dynamic errorEndUserMessage; + dynamic errorEndUserMessageN; + dynamic errorMessage; + int? errorType; + int? foodCategory; + dynamic iOSLink; + bool? isAuthenticated; + int? mealOrderStatus; + int? mealType; + int? messageStatus; + int? numberOfResultRecords; + dynamic patientBlodType; + dynamic successMsg; + dynamic successMsgN; + dynamic doctorInformationList; + dynamic getAllPendingRecordsList; + dynamic getAllSharedRecordsByStatusList; + dynamic getResponseFileList; + bool? isHMGPatient; + bool? isLoginSuccessfully; + bool? isNeedUpdateIdintificationNo; + bool? kioskSendSMS; + dynamic list; + dynamic listAskHabibMobileLoginInfo; + dynamic listAskHabibPatientFile; + dynamic listMergeFiles; + List? listMobileLoginInfo; + dynamic listPatientCount; + String? logInTokenID; + dynamic mohemmPrivilegeList; + int? pateintID; + dynamic patientBloodType; + bool? patientHasFile; + dynamic patientMergedIDs; + bool? patientOutSA; + int? patientShareRequestID; + int? patientType; + int? projectIDOut; + dynamic returnMessage; + bool? sMSLoginRequired; + dynamic servicePrivilegeList; + dynamic sharePatientName; + dynamic verificationCode; + dynamic email; + dynamic errorList; + bool? hasFile; + bool? isActiveCode; + bool? isMerged; + bool? isNeedUserAgreement; + bool? isSMSSent; + dynamic memberList; + dynamic message; + int? statusCode; + + GetMobileLoginInfoResponse( + {this.date, + this.languageID, + this.serviceName, + this.time, + this.androidLink, + this.authenticationTokenID, + this.data, + this.dataw, + this.dietType, + this.errorCode, + this.errorEndUserMessage, + this.errorEndUserMessageN, + this.errorMessage, + this.errorType, + this.foodCategory, + this.iOSLink, + this.isAuthenticated, + this.mealOrderStatus, + this.mealType, + this.messageStatus, + this.numberOfResultRecords, + this.patientBlodType, + this.successMsg, + this.successMsgN, + this.doctorInformationList, + this.getAllPendingRecordsList, + this.getAllSharedRecordsByStatusList, + this.getResponseFileList, + this.isHMGPatient, + this.isLoginSuccessfully, + this.isNeedUpdateIdintificationNo, + this.kioskSendSMS, + this.list, + this.listAskHabibMobileLoginInfo, + this.listAskHabibPatientFile, + this.listMergeFiles, + this.listMobileLoginInfo, + this.listPatientCount, + this.logInTokenID, + this.mohemmPrivilegeList, + this.pateintID, + this.patientBloodType, + this.patientHasFile, + this.patientMergedIDs, + this.patientOutSA, + this.patientShareRequestID, + this.patientType, + this.projectIDOut, + this.returnMessage, + this.sMSLoginRequired, + this.servicePrivilegeList, + this.sharePatientName, + this.verificationCode, + this.email, + this.errorList, + this.hasFile, + this.isActiveCode, + this.isMerged, + this.isNeedUserAgreement, + this.isSMSSent, + this.memberList, + this.message, + this.statusCode}); + + GetMobileLoginInfoResponse.fromJson(Map json) { + date = json['Date']; + languageID = json['LanguageID']; + serviceName = json['ServiceName']; + time = json['Time']; + androidLink = json['AndroidLink']; + authenticationTokenID = json['AuthenticationTokenID']; + data = json['Data']; + dataw = json['Dataw']; + dietType = json['DietType']; + errorCode = json['ErrorCode']; + errorEndUserMessage = json['ErrorEndUserMessage']; + errorEndUserMessageN = json['ErrorEndUserMessageN']; + errorMessage = json['ErrorMessage']; + errorType = json['ErrorType']; + foodCategory = json['FoodCategory']; + iOSLink = json['IOSLink']; + isAuthenticated = json['IsAuthenticated']; + mealOrderStatus = json['MealOrderStatus']; + mealType = json['MealType']; + messageStatus = json['MessageStatus']; + numberOfResultRecords = json['NumberOfResultRecords']; + patientBlodType = json['PatientBlodType']; + successMsg = json['SuccessMsg']; + successMsgN = json['SuccessMsgN']; + doctorInformationList = json['DoctorInformation_List']; + getAllPendingRecordsList = json['GetAllPendingRecordsList']; + getAllSharedRecordsByStatusList = json['GetAllSharedRecordsByStatusList']; + getResponseFileList = json['GetResponseFileList']; + isHMGPatient = json['IsHMGPatient']; + isLoginSuccessfully = json['IsLoginSuccessfully']; + isNeedUpdateIdintificationNo = json['IsNeedUpdateIdintificationNo']; + kioskSendSMS = json['KioskSendSMS']; + list = json['List']; + listAskHabibMobileLoginInfo = json['List_AskHabibMobileLoginInfo']; + listAskHabibPatientFile = json['List_AskHabibPatientFile']; + listMergeFiles = json['List_MergeFiles']; + if (json['List_MobileLoginInfo'] != null) { + listMobileLoginInfo = []; + json['List_MobileLoginInfo'].forEach((v) { + listMobileLoginInfo!.add(new ListMobileLoginInfo.fromJson(v)); + }); + } + listPatientCount = json['List_PatientCount']; + logInTokenID = json['LogInTokenID']; + mohemmPrivilegeList = json['MohemmPrivilege_List']; + pateintID = json['PateintID']; + patientBloodType = json['PatientBloodType']; + patientHasFile = json['PatientHasFile']; + patientMergedIDs = json['PatientMergedIDs']; + patientOutSA = json['PatientOutSA']; + patientShareRequestID = json['PatientShareRequestID']; + patientType = json['PatientType']; + projectIDOut = json['ProjectIDOut']; + returnMessage = json['ReturnMessage']; + sMSLoginRequired = json['SMSLoginRequired']; + servicePrivilegeList = json['ServicePrivilege_List']; + sharePatientName = json['SharePatientName']; + verificationCode = json['VerificationCode']; + email = json['email']; + errorList = json['errorList']; + hasFile = json['hasFile']; + isActiveCode = json['isActiveCode']; + isMerged = json['isMerged']; + isNeedUserAgreement = json['isNeedUserAgreement']; + isSMSSent = json['isSMSSent']; + memberList = json['memberList']; + message = json['message']; + statusCode = json['statusCode']; + } + + Map toJson() { + final Map data = new Map(); + data['Date'] = this.date; + data['LanguageID'] = this.languageID; + data['ServiceName'] = this.serviceName; + data['Time'] = this.time; + data['AndroidLink'] = this.androidLink; + data['AuthenticationTokenID'] = this.authenticationTokenID; + data['Data'] = this.data; + data['Dataw'] = this.dataw; + data['DietType'] = this.dietType; + data['ErrorCode'] = this.errorCode; + data['ErrorEndUserMessage'] = this.errorEndUserMessage; + data['ErrorEndUserMessageN'] = this.errorEndUserMessageN; + data['ErrorMessage'] = this.errorMessage; + data['ErrorType'] = this.errorType; + data['FoodCategory'] = this.foodCategory; + data['IOSLink'] = this.iOSLink; + data['IsAuthenticated'] = this.isAuthenticated; + data['MealOrderStatus'] = this.mealOrderStatus; + data['MealType'] = this.mealType; + data['MessageStatus'] = this.messageStatus; + data['NumberOfResultRecords'] = this.numberOfResultRecords; + data['PatientBlodType'] = this.patientBlodType; + data['SuccessMsg'] = this.successMsg; + data['SuccessMsgN'] = this.successMsgN; + data['DoctorInformation_List'] = this.doctorInformationList; + data['GetAllPendingRecordsList'] = this.getAllPendingRecordsList; + data['GetAllSharedRecordsByStatusList'] = + this.getAllSharedRecordsByStatusList; + data['GetResponseFileList'] = this.getResponseFileList; + data['IsHMGPatient'] = this.isHMGPatient; + data['IsLoginSuccessfully'] = this.isLoginSuccessfully; + data['IsNeedUpdateIdintificationNo'] = this.isNeedUpdateIdintificationNo; + data['KioskSendSMS'] = this.kioskSendSMS; + data['List'] = this.list; + data['List_AskHabibMobileLoginInfo'] = this.listAskHabibMobileLoginInfo; + data['List_AskHabibPatientFile'] = this.listAskHabibPatientFile; + data['List_MergeFiles'] = this.listMergeFiles; + if (this.listMobileLoginInfo != null) { + data['List_MobileLoginInfo'] = + this.listMobileLoginInfo!.map((v) => v.toJson()).toList(); + } + data['List_PatientCount'] = this.listPatientCount; + data['LogInTokenID'] = this.logInTokenID; + data['MohemmPrivilege_List'] = this.mohemmPrivilegeList; + data['PateintID'] = this.pateintID; + data['PatientBloodType'] = this.patientBloodType; + data['PatientHasFile'] = this.patientHasFile; + data['PatientMergedIDs'] = this.patientMergedIDs; + data['PatientOutSA'] = this.patientOutSA; + data['PatientShareRequestID'] = this.patientShareRequestID; + data['PatientType'] = this.patientType; + data['ProjectIDOut'] = this.projectIDOut; + data['ReturnMessage'] = this.returnMessage; + data['SMSLoginRequired'] = this.sMSLoginRequired; + data['ServicePrivilege_List'] = this.servicePrivilegeList; + data['SharePatientName'] = this.sharePatientName; + data['VerificationCode'] = this.verificationCode; + data['email'] = this.email; + data['errorList'] = this.errorList; + data['hasFile'] = this.hasFile; + data['isActiveCode'] = this.isActiveCode; + data['isMerged'] = this.isMerged; + data['isNeedUserAgreement'] = this.isNeedUserAgreement; + data['isSMSSent'] = this.isSMSSent; + data['memberList'] = this.memberList; + data['message'] = this.message; + data['statusCode'] = this.statusCode; + return data; + } +} + +class ListMobileLoginInfo { + int? iD; + int? loginType; + + ListMobileLoginInfo({this.iD, this.loginType}); + + ListMobileLoginInfo.fromJson(Map json) { + iD = json['ID']; + loginType = json['LoginType']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['LoginType'] = this.loginType; + return data; + } +} diff --git a/lib/models/Authentication/get_patient_occupation_list_response.dart b/lib/models/Authentication/get_patient_occupation_list_response.dart new file mode 100644 index 00000000..60a21dc6 --- /dev/null +++ b/lib/models/Authentication/get_patient_occupation_list_response.dart @@ -0,0 +1,22 @@ +class GetPatientOccupationListResponse { + String? occupationID; + String? description; + String? descriptionN; + + GetPatientOccupationListResponse( + {this.occupationID, this.description, this.descriptionN}); + + GetPatientOccupationListResponse.fromJson(Map json) { + occupationID = json['OccupationID']; + description = json['Description']; + descriptionN = json['DescriptionN']; + } + + Map toJson() { + final Map data = new Map(); + data['OccupationID'] = this.occupationID; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + return data; + } +} diff --git a/lib/models/Authentication/insert_device_imei_request.dart b/lib/models/Authentication/insert_device_imei_request.dart new file mode 100644 index 00000000..82902fe3 --- /dev/null +++ b/lib/models/Authentication/insert_device_imei_request.dart @@ -0,0 +1,72 @@ +class INSERTDeviceIMEIRequest { + String? setupID; + int? patientType; + int? patientID; + String? firstName; + String? firstNameN; + String? lastNameN; + int? preferredLanguage; + String? patientIdentificationNo; + bool? outSA; + String? identificationNo; + String? mobileNo; + String? tokenID; + String? iMEI; + bool? biometricEnabled; + int? logInTypeID; + + INSERTDeviceIMEIRequest( + {this.setupID, + this.patientType, + this.patientID, + this.firstName, + this.firstNameN, + this.lastNameN, + this.preferredLanguage, + this.patientIdentificationNo, + this.outSA, + this.identificationNo, + this.mobileNo, + this.tokenID, + this.iMEI, + this.biometricEnabled, + this.logInTypeID}); + + INSERTDeviceIMEIRequest.fromJson(Map json) { + setupID = json['SetupID']; + patientType = json['PatientType']; + patientID = json['PatientID']; + firstName = json['FirstName']; + firstNameN = json['FirstNameN']; + lastNameN = json['LastNameN']; + preferredLanguage = json['PreferredLanguage']; + patientIdentificationNo = json['PatientIdentificationNo']; + outSA = json['OutSA']; + identificationNo = json['IdentificationNo']; + mobileNo = json['MobileNo']; + tokenID = json['TokenID']; + iMEI = json['IMEI']; + biometricEnabled = json['BiometricEnabled']; + logInTypeID = json['LogInTypeID']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['FirstName'] = this.firstName; + data['FirstNameN'] = this.firstNameN; + data['LastNameN'] = this.lastNameN; + data['PreferredLanguage'] = this.preferredLanguage; + data['PatientIdentificationNo'] = this.patientIdentificationNo; + data['OutSA'] = this.outSA; + data['IdentificationNo'] = this.identificationNo; + data['MobileNo'] = this.mobileNo; + data['TokenID'] = this.tokenID; + data['IMEI'] = this.iMEI; + data['BiometricEnabled'] = this.biometricEnabled; + data['LogInTypeID'] = this.logInTypeID; + return data; + } +} diff --git a/lib/models/Authentication/register_info_response.dart b/lib/models/Authentication/register_info_response.dart new file mode 100644 index 00000000..1c8973d6 --- /dev/null +++ b/lib/models/Authentication/register_info_response.dart @@ -0,0 +1,321 @@ +class RegisterInfoResponse { + dynamic date; + int? languageID; + int? serviceName; + dynamic time; + dynamic androidLink; + dynamic authenticationTokenID; + dynamic data; + bool? dataw; + int? dietType; + dynamic errorCode; + dynamic errorEndUserMessage; + dynamic errorEndUserMessageN; + dynamic errorMessage; + int? errorType; + int? foodCategory; + dynamic iOSLink; + bool? isAuthenticated; + int? mealOrderStatus; + int? mealType; + int? messageStatus; + int? numberOfResultRecords; + dynamic patientBlodType; + dynamic successMsg; + dynamic successMsgN; + dynamic accessTokenObject; + int? age; + dynamic clientIdentifierId; + int? createdBy; + String? dateOfBirth; + String? firstNameAr; + String? firstNameEn; + String? gender; + dynamic genderAr; + dynamic genderEn; + String? healthId; + String? idNumber; + String? idType; + bool? isHijri; + int? isInstertedOrUpdated; + int? isdynamic; + int? isPatientExistNHIC; + String? lastNameAr; + String? lastNameEn; + dynamic listActiveAccessToken; + String? maritalStatus; + String? maritalStatusCode; + String? nationality; + String? nationalityCode; + String? occupation; + String? patientStatus; + String? placeofBirth; + dynamic practitionerStatusCode; + dynamic practitionerStatusDescAr; + dynamic practitionerStatusDescEn; + String? secondNameAr; + String? secondNameEn; + String? thirdNameAr; + String? thirdNameEn; + dynamic accessToken; + int? categoryCode; + dynamic categoryNameAr; + dynamic categoryNameEn; + int? constraintCode; + dynamic constraintNameAr; + dynamic constraintNameEn; + dynamic content; + dynamic licenseExpiryDate; + dynamic licenseIssuedDate; + dynamic licenseStatusCode; + dynamic licenseStatusDescAr; + dynamic licenseStatusDescEn; + dynamic organizations; + dynamic registrationNumber; + int? specialtyCode; + dynamic specialtyNameAr; + dynamic specialtyNameEn; + // String? occupationID; + + RegisterInfoResponse( + {this.date, + this.languageID, + this.serviceName, + this.time, + this.androidLink, + this.authenticationTokenID, + this.data, + this.dataw, + this.dietType, + this.errorCode, + this.errorEndUserMessage, + this.errorEndUserMessageN, + this.errorMessage, + this.errorType, + this.foodCategory, + this.iOSLink, + this.isAuthenticated, + this.mealOrderStatus, + this.mealType, + this.messageStatus, + this.numberOfResultRecords, + this.patientBlodType, + this.successMsg, + this.successMsgN, + this.accessTokenObject, + this.age, + this.clientIdentifierId, + this.createdBy, + this.dateOfBirth, + this.firstNameAr, + this.firstNameEn, + this.gender, + this.genderAr, + this.genderEn, + this.healthId, + this.idNumber, + this.idType, + this.isHijri, + this.isInstertedOrUpdated, + this.isdynamic, + this.isPatientExistNHIC, + this.lastNameAr, + this.lastNameEn, + this.listActiveAccessToken, + this.maritalStatus, + this.maritalStatusCode, + this.nationality, + this.nationalityCode, + this.occupation, + this.patientStatus, + this.placeofBirth, + this.practitionerStatusCode, + this.practitionerStatusDescAr, + this.practitionerStatusDescEn, + this.secondNameAr, + this.secondNameEn, + this.thirdNameAr, + this.thirdNameEn, + this.accessToken, + this.categoryCode, + this.categoryNameAr, + this.categoryNameEn, + this.constraintCode, + this.constraintNameAr, + this.constraintNameEn, + this.content, + this.licenseExpiryDate, + this.licenseIssuedDate, + this.licenseStatusCode, + this.licenseStatusDescAr, + this.licenseStatusDescEn, + this.organizations, + this.registrationNumber, + this.specialtyCode, + this.specialtyNameAr, + this.specialtyNameEn, + // this.occupationID + }); + + RegisterInfoResponse.fromJson(Map json) { + date = json['Date']; + languageID = json['LanguageID']; + serviceName = json['ServiceName']; + time = json['Time']; + androidLink = json['AndroidLink']; + authenticationTokenID = json['AuthenticationTokenID']; + data = json['Data']; + dataw = json['Dataw']; + dietType = json['DietType']; + errorCode = json['ErrorCode']; + errorEndUserMessage = json['ErrorEndUserMessage']; + errorEndUserMessageN = json['ErrorEndUserMessageN']; + errorMessage = json['ErrorMessage']; + errorType = json['ErrorType']; + foodCategory = json['FoodCategory']; + iOSLink = json['IOSLink']; + isAuthenticated = json['IsAuthenticated']; + mealOrderStatus = json['MealOrderStatus']; + mealType = json['MealType']; + messageStatus = json['MessageStatus']; + numberOfResultRecords = json['NumberOfResultRecords']; + patientBlodType = json['PatientBlodType']; + successMsg = json['SuccessMsg']; + successMsgN = json['SuccessMsgN']; + accessTokenObject = json['AccessTokenObject']; + age = json['Age']; + clientIdentifierId = json['ClientIdentifierId']; + createdBy = json['CreatedBy']; + dateOfBirth = json['DateOfBirth']; + firstNameAr = json['FirstNameAr']; + firstNameEn = json['FirstNameEn']; + gender = json['Gender']; + genderAr = json['GenderAr']; + genderEn = json['GenderEn']; + healthId = json['HealthId']; + idNumber = json['IdNumber']; + idType = json['IdType']; + isHijri = json['IsHijri']; + isInstertedOrUpdated = json['IsInstertedOrUpdated']; + isdynamic = json['Isdynamic']; + isPatientExistNHIC = json['IsPatientExistNHIC']; + lastNameAr = json['LastNameAr']; + lastNameEn = json['LastNameEn']; + listActiveAccessToken = json['List_ActiveAccessToken']; + maritalStatus = json['MaritalStatus']; + maritalStatusCode = json['MaritalStatusCode']; + nationality = json['Nationality']; + nationalityCode = json['NationalityCode']; + occupation = json['Occupation']; + patientStatus = json['PatientStatus']; + placeofBirth = json['PlaceofBirth']; + practitionerStatusCode = json['PractitionerStatusCode']; + practitionerStatusDescAr = json['PractitionerStatusDescAr']; + practitionerStatusDescEn = json['PractitionerStatusDescEn']; + secondNameAr = json['SecondNameAr']; + secondNameEn = json['SecondNameEn']; + thirdNameAr = json['ThirdNameAr']; + thirdNameEn = json['ThirdNameEn']; + accessToken = json['accessToken']; + categoryCode = json['categoryCode']; + categoryNameAr = json['categoryNameAr']; + categoryNameEn = json['categoryNameEn']; + constraintCode = json['constraintCode']; + constraintNameAr = json['constraintNameAr']; + constraintNameEn = json['constraintNameEn']; + content = json['content']; + licenseExpiryDate = json['licenseExpiryDate']; + licenseIssuedDate = json['licenseIssuedDate']; + licenseStatusCode = json['licenseStatusCode']; + licenseStatusDescAr = json['licenseStatusDescAr']; + licenseStatusDescEn = json['licenseStatusDescEn']; + organizations = json['organizations']; + registrationNumber = json['registrationNumber']; + specialtyCode = json['specialtyCode']; + specialtyNameAr = json['specialtyNameAr']; + specialtyNameEn = json['specialtyNameEn']; + // occupationID = json['OccupationID']; + } + + Map toJson() { + final Map data = new Map(); + data['Date'] = this.date; + data['LanguageID'] = this.languageID; + data['ServiceName'] = this.serviceName; + data['Time'] = this.time; + data['AndroidLink'] = this.androidLink; + data['AuthenticationTokenID'] = this.authenticationTokenID; + data['Data'] = this.data; + data['Dataw'] = this.dataw; + data['DietType'] = this.dietType; + data['ErrorCode'] = this.errorCode; + data['ErrorEndUserMessage'] = this.errorEndUserMessage; + data['ErrorEndUserMessageN'] = this.errorEndUserMessageN; + data['ErrorMessage'] = this.errorMessage; + data['ErrorType'] = this.errorType; + data['FoodCategory'] = this.foodCategory; + data['IOSLink'] = this.iOSLink; + data['IsAuthenticated'] = this.isAuthenticated; + data['MealOrderStatus'] = this.mealOrderStatus; + data['MealType'] = this.mealType; + data['MessageStatus'] = this.messageStatus; + data['NumberOfResultRecords'] = this.numberOfResultRecords; + data['PatientBlodType'] = this.patientBlodType; + data['SuccessMsg'] = this.successMsg; + data['SuccessMsgN'] = this.successMsgN; + data['AccessTokenObject'] = this.accessTokenObject; + data['Age'] = this.age; + data['ClientIdentifierId'] = this.clientIdentifierId; + data['CreatedBy'] = this.createdBy; + data['DateOfBirth'] = this.dateOfBirth; + data['FirstNameAr'] = this.firstNameAr; + data['FirstNameEn'] = this.firstNameEn; + data['Gender'] = this.gender; + data['GenderAr'] = this.genderAr; + data['GenderEn'] = this.genderEn; + data['HealthId'] = this.healthId; + data['IdNumber'] = this.idNumber; + data['IdType'] = this.idType; + data['IsHijri'] = this.isHijri; + data['IsInstertedOrUpdated'] = this.isInstertedOrUpdated; + data['Isdynamic'] = this.isdynamic; + data['IsPatientExistNHIC'] = this.isPatientExistNHIC; + data['LastNameAr'] = this.lastNameAr; + data['LastNameEn'] = this.lastNameEn; + data['List_ActiveAccessToken'] = this.listActiveAccessToken; + data['MaritalStatus'] = this.maritalStatus; + data['MaritalStatusCode'] = this.maritalStatusCode; + data['Nationality'] = this.nationality; + data['NationalityCode'] = this.nationalityCode; + data['Occupation'] = this.occupation; + data['PatientStatus'] = this.patientStatus; + data['PlaceofBirth'] = this.placeofBirth; + data['PractitionerStatusCode'] = this.practitionerStatusCode; + data['PractitionerStatusDescAr'] = this.practitionerStatusDescAr; + data['PractitionerStatusDescEn'] = this.practitionerStatusDescEn; + data['SecondNameAr'] = this.secondNameAr; + data['SecondNameEn'] = this.secondNameEn; + data['ThirdNameAr'] = this.thirdNameAr; + data['ThirdNameEn'] = this.thirdNameEn; + data['accessToken'] = this.accessToken; + data['categoryCode'] = this.categoryCode; + data['categoryNameAr'] = this.categoryNameAr; + data['categoryNameEn'] = this.categoryNameEn; + data['constraintCode'] = this.constraintCode; + data['constraintNameAr'] = this.constraintNameAr; + data['constraintNameEn'] = this.constraintNameEn; + data['content'] = this.content; + data['licenseExpiryDate'] = this.licenseExpiryDate; + data['licenseIssuedDate'] = this.licenseIssuedDate; + data['licenseStatusCode'] = this.licenseStatusCode; + data['licenseStatusDescAr'] = this.licenseStatusDescAr; + data['licenseStatusDescEn'] = this.licenseStatusDescEn; + data['organizations'] = this.organizations; + data['registrationNumber'] = this.registrationNumber; + data['specialtyCode'] = this.specialtyCode; + data['specialtyNameAr'] = this.specialtyNameAr; + data['specialtyNameEn'] = this.specialtyNameEn; + // data['OccupationID'] = this.occupationID; + return data; + } +} diff --git a/lib/models/Authentication/register_user_requet.dart b/lib/models/Authentication/register_user_requet.dart new file mode 100644 index 00000000..e436d6ef --- /dev/null +++ b/lib/models/Authentication/register_user_requet.dart @@ -0,0 +1,190 @@ +class RegisterUserRequest { + Patientobject? patientobject; + String? patientIdentificationID; + dynamic patientMobileNumber; + String? logInTokenID; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + dynamic sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + String? dob; + int? isHijri; + String? healthId; + String? zipCode; + // String? occupationID; + + RegisterUserRequest( + {this.patientobject, + this.patientIdentificationID, + this.patientMobileNumber, + this.logInTokenID, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.dob, + this.isHijri, + this.healthId, + this.zipCode, + // this.occupationID + }); + + RegisterUserRequest.fromJson(Map json) { + patientobject = json['Patientobject'] != null ? new Patientobject.fromJson(json['Patientobject']) : null; + patientIdentificationID = json['PatientIdentificationID']; + patientMobileNumber = json['PatientMobileNumber']; + logInTokenID = json['LogInTokenID']; + 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']; + dob = json['DOB']; + isHijri = json['IsHijri']; + healthId = json['HealthId']; + zipCode = json['ZipCode']; + // occupationID = json['OccupationID']; + } + + Map toJson() { + final Map data = new Map(); + if (this.patientobject != null) { + data['Patientobject'] = this.patientobject!.toJson(); + } + data['PatientIdentificationID'] = this.patientIdentificationID; + data['PatientMobileNumber'] = this.patientMobileNumber; + data['LogInTokenID'] = this.logInTokenID; + 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['DOB'] = this.dob; + data['IsHijri'] = this.isHijri; + data['HealthId'] = this.healthId; + data['ZipCode'] = this.zipCode; + // data['OccupationID'] = this.occupationID; + return data; + } +} + +class Patientobject { + bool? tempValue; + int? patientIdentificationType; + String? patientIdentificationNo; + dynamic mobileNumber; + int? patientOutSA; + String? firstName; + String? middleName; + String? lastName; + String? firstNameN; + String? middleNameN; + String? lastNameN; + dynamic strDateofBirth; + String? dateofBirth; + int? gender; + String? nationalityID; + String? eHealthIDField; + String? dateofBirthN; + String? emailAddress; + String? sourceType; + String? preferredLanguage; + String? marital; + // String? occupationID; + + Patientobject( + {this.tempValue, + this.patientIdentificationType, + this.patientIdentificationNo, + this.mobileNumber, + this.patientOutSA, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.strDateofBirth, + this.dateofBirth, + this.gender, + this.nationalityID, + this.eHealthIDField, + this.dateofBirthN, + this.emailAddress, + this.sourceType, + this.preferredLanguage, + this.marital, + // this.occupationID + }); + + Patientobject.fromJson(Map json) { + tempValue = json['TempValue']; + patientIdentificationType = json['PatientIdentificationType']; + patientIdentificationNo = json['PatientIdentificationNo']; + mobileNumber = json['MobileNumber']; + patientOutSA = json['PatientOutSA']; + firstName = json['FirstName']; + middleName = json['MiddleName']; + lastName = json['LastName']; + firstNameN = json['FirstNameN']; + middleNameN = json['MiddleNameN']; + lastNameN = json['LastNameN']; + strDateofBirth = json['StrDateofBirth']; + dateofBirth = json['DateofBirth']; + gender = json['Gender']; + nationalityID = json['NationalityID']; + eHealthIDField = json['eHealthIDField']; + dateofBirthN = json['DateofBirthN']; + emailAddress = json['EmailAddress']; + sourceType = json['SourceType']; + + preferredLanguage = json['PreferredLanguage']; + marital = json['Marital']; + // occupationID = json['OccupationID'] ?? ""; + } + + Map toJson() { + final Map data = new Map(); + data['TempValue'] = this.tempValue; + data['PatientIdentificationType'] = this.patientIdentificationType; + data['PatientIdentificationNo'] = this.patientIdentificationNo; + data['MobileNumber'] = this.mobileNumber; + data['PatientOutSA'] = this.patientOutSA; + data['FirstName'] = this.firstName; + data['MiddleName'] = this.middleName; + data['LastName'] = this.lastName; + data['FirstNameN'] = this.firstNameN; + data['MiddleNameN'] = this.middleNameN; + data['LastNameN'] = this.lastNameN; + data['StrDateofBirth'] = this.strDateofBirth; + data['DateofBirth'] = this.dateofBirth; + data['Gender'] = this.gender; + data['NationalityID'] = this.nationalityID; + data['eHealthIDField'] = this.eHealthIDField; + data['DateofBirthN'] = this.dateofBirthN; + data['EmailAddress'] = this.emailAddress; + data['SourceType'] = this.sourceType; + data['PreferredLanguage'] = this.preferredLanguage; + data['Marital'] = this.marital; + // data['OccupationID'] = this.occupationID; + return data; + } +} diff --git a/lib/models/Authentication/registered_authenticated_user_req.dart b/lib/models/Authentication/registered_authenticated_user_req.dart new file mode 100644 index 00000000..4b39ccc9 --- /dev/null +++ b/lib/models/Authentication/registered_authenticated_user_req.dart @@ -0,0 +1,104 @@ +class RegisteredAuthenticatedUserRequest { + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + int? patientID; + String? tokenID; + String? voipToken; + int? patientTypeID; + int? patientType; + String? deviceToken; + String? deviceType; + String? patientMobileNumber; + String? nationalID; + int? gender; + int? loginType; + String? mACAddress; + int? latitude; + int? longitude; + + RegisteredAuthenticatedUserRequest( + {this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.voipToken, + this.patientTypeID, + this.patientType, + this.deviceToken, + this.deviceType, + this.patientMobileNumber, + this.nationalID, + this.gender, + this.loginType, + this.mACAddress, + this.latitude, + this.longitude}); + + RegisteredAuthenticatedUserRequest.fromJson(Map json) { + 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']; + voipToken = json['VoipToken']; + patientTypeID = json['PatientTypeID']; + patientType = json['PatientType']; + deviceToken = json['DeviceToken']; + deviceType = json['DeviceType']; + patientMobileNumber = json['PatientMobileNumber']; + nationalID = json['NationalID']; + gender = json['Gender']; + loginType = json['LoginType']; + mACAddress = json['MACAddress']; + latitude = json['Latitude']; + longitude = json['Longitude']; + } + + 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['VoipToken'] = this.voipToken; + data['PatientTypeID'] = this.patientTypeID; + data['PatientType'] = this.patientType; + data['DeviceToken'] = this.deviceToken; + data['DeviceType'] = this.deviceType; + data['PatientMobileNumber'] = this.patientMobileNumber; + data['NationalID'] = this.nationalID; + data['Gender'] = this.gender; + data['LoginType'] = this.loginType; + data['MACAddress'] = this.mACAddress; + data['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + return data; + } +} diff --git a/lib/models/Authentication/select_device_imei_res.dart b/lib/models/Authentication/select_device_imei_res.dart new file mode 100644 index 00000000..979dfca1 --- /dev/null +++ b/lib/models/Authentication/select_device_imei_res.dart @@ -0,0 +1,73 @@ +class SelectDeviceIMEIRES { + bool? biometricEnabled; + String? createdOn; + String? editedOn; + int? iD; + String? iMEI; + String? identificationNo; + int? logInType; + String? mobile; + String? name; + String? nameN; + bool? outSA; + int? patientID; + int? patientType; + int? preferredLanguage; + + SelectDeviceIMEIRES( + {this.biometricEnabled, + this.createdOn, + this.editedOn, + this.iD, + this.iMEI, + this.identificationNo, + this.logInType, + this.mobile, + this.name, + this.nameN, + this.outSA, + this.patientID, + this.patientType, + this.preferredLanguage}); + + SelectDeviceIMEIRES.fromJson(Map json) { + biometricEnabled = json['BiometricEnabled']; + createdOn = json['CreatedOn'].toString(); + editedOn = json['EditedOn'].toString(); + iD = json['ID']; + iMEI = json['IMEI']; + identificationNo = json['IdentificationNo'].toString(); + logInType = json['LogInType']; + mobile = json['Mobile'].toString(); + name = json['Name']; + nameN = json['NameN']; + outSA = json['OutSA']; + patientID = json['PatientID']; + patientType = json['PatientType']; + preferredLanguage = json['PreferredLanguage']; + } + + Map toJson() { + final Map data = Map(); + data['BiometricEnabled'] = this.biometricEnabled; + data['CreatedOn'] = this.createdOn; + data['EditedOn'] = this.editedOn; + data['ID'] = this.iD; + data['IMEI'] = this.iMEI; + data['IdentificationNo'] = this.identificationNo; + data['LogInType'] = this.logInType; + data['Mobile'] = this.mobile; + data['Name'] = this.name; + data['NameN'] = this.nameN; + data['OutSA'] = this.outSA; + data['PatientID'] = this.patientID; + data['PatientType'] = this.patientType; + data['PreferredLanguage'] = this.preferredLanguage; + return data; + } + + @override + String toString() { + return 'SelectDeviceIMEIRES{biometricEnabled: $biometricEnabled, createdOn: $createdOn, editedOn: $editedOn, iD: $iD, iMEI: $iMEI, identificationNo: $identificationNo, logInType: $logInType, mobile: $mobile, name: $name, nameN: $nameN, outSA: $outSA, patientID: $patientID, patientType: $patientType, preferredLanguage: $preferredLanguage}'; + } +} diff --git a/lib/models/Authentication/send_activation_request.dart b/lib/models/Authentication/send_activation_request.dart new file mode 100644 index 00000000..04e684e9 --- /dev/null +++ b/lib/models/Authentication/send_activation_request.dart @@ -0,0 +1,132 @@ +class SendActivationRequest { + int? patientMobileNumber; + String? mobileNo; + String? deviceToken; + bool? projectOutSA; + int? loginType; + String? zipCode; + bool? isRegister; + String? logInTokenID; + int? searchType; + int? patientID; + String? nationalID; + String? patientIdentificationID; + int? oTPSendType; + int? languageID; + double? versionID; + int? channel; + String? iPAdress; + String? generalid; + int? patientOutSA; + dynamic sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + String? sMSSignature; + String? dob; + int? isHijri; + String? healthId; + int? responseID; + int? status; + int? familyRegionID; + bool? isPatientExcluded; + SendActivationRequest( + {this.patientMobileNumber, + this.mobileNo, + this.deviceToken, + this.projectOutSA, + this.loginType, + this.zipCode, + this.isRegister, + this.logInTokenID, + this.searchType, + this.patientID, + this.nationalID, + this.patientIdentificationID, + this.oTPSendType, + this.languageID, + this.versionID, + this.channel, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.sMSSignature, + this.dob, + this.isHijri, + this.healthId, + this.responseID, + this.status, + this.familyRegionID, + this.isPatientExcluded + }); + + SendActivationRequest.fromJson(Map json) { + patientMobileNumber = json['PatientMobileNumber']; + mobileNo = json['MobileNo']; + deviceToken = json['DeviceToken']; + projectOutSA = json['ProjectOutSA']; + loginType = json['LoginType']; + zipCode = json['ZipCode']; + isRegister = json['isRegister']; + logInTokenID = json['LogInTokenID']; + searchType = json['SearchType']; + patientID = json['PatientID']; + nationalID = json['NationalID']; + patientIdentificationID = json['PatientIdentificationID']; + oTPSendType = json['OTP_SendType']; + languageID = json['LanguageID']; + versionID = json['VersionID']; + channel = json['Channel']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + patientOutSA = json['PatientOutSA']; + sessionID = json['SessionID']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; + deviceTypeID = json['DeviceTypeID']; + sMSSignature = json['SMSSignature']; + dob = json['DOB']; + isHijri = json['IsHijri']; + healthId = json['HealthId']; + responseID = json['ReponseID']; + status = json['Status']; + familyRegionID = json['FamilyRegionID']; + isPatientExcluded = json['IsPatientExcluded']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientMobileNumber'] = this.patientMobileNumber; + data['MobileNo'] = this.mobileNo; + data['DeviceToken'] = this.deviceToken; + data['ProjectOutSA'] = this.projectOutSA; + data['LoginType'] = this.loginType; + data['ZipCode'] = this.zipCode; + data['isRegister'] = this.isRegister; + data['LogInTokenID'] = this.logInTokenID; + data['SearchType'] = this.searchType; + data['PatientID'] = this.patientID; + data['NationalID'] = this.nationalID; + data['PatientIdentificationID'] = this.patientIdentificationID; + data['OTP_SendType'] = this.oTPSendType; + data['LanguageID'] = this.languageID; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + 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['SMSSignature'] = sMSSignature; + data['DOB'] = dob; + data['IsHijri'] = isHijri; + data['HealthId'] = healthId; + data['ResponseID'] = responseID; + data['Status'] = status; + data['FamilyRegionID'] = familyRegionID; + data['IsPatientExcluded'] = isPatientExcluded; + return data; + } +} diff --git a/lib/models/Clinics/ClinicListResponse.dart b/lib/models/Clinics/ClinicListResponse.dart new file mode 100644 index 00000000..43b78970 --- /dev/null +++ b/lib/models/Clinics/ClinicListResponse.dart @@ -0,0 +1,83 @@ +class ListClinicCentralized { + int? clinicID; + String? clinicDescription; + String? clinicDescriptionN; + int? age; + int? gender; + bool? isLiveCareClinicAndOnline; + int? liveCareClinicID; + int? liveCareServiceID; + + ListClinicCentralized( + {this.clinicID, + this.clinicDescription, + this.clinicDescriptionN, + this.age, + this.gender, + this.isLiveCareClinicAndOnline, + this.liveCareClinicID, + this.liveCareServiceID}); + + ListClinicCentralized.fromJson(Map json) { + clinicID = json['ClinicID']; + clinicDescription = json['ClinicDescription']; + clinicDescriptionN = json['ClinicDescriptionN']; + age = json['Age']; + gender = json['Gender']; + isLiveCareClinicAndOnline = json['IsLiveCareClinicAndOnline']; + liveCareClinicID = json['LiveCareClinicID']; + liveCareServiceID = json['LiveCareServiceID']; + } + + Map toJson() { + final Map data = new Map(); + data['ClinicID'] = this.clinicID; + data['ClinicDescription'] = this.clinicDescription; + data['ClinicDescriptionN'] = this.clinicDescriptionN; + data['Age'] = this.age; + data['Gender'] = this.gender; + data['IsLiveCareClinicAndOnline'] = this.isLiveCareClinicAndOnline; + data['LiveCareClinicID'] = this.liveCareClinicID; + data['LiveCareServiceID'] = this.liveCareServiceID; + return data; + } + + + @override + String toString() { + return '${clinicDescription}'.toLowerCase() + ' ${clinicDescription}'.toUpperCase(); + } +} + +class ListGetBookScheduleConfigsList { + int? iD; + String? description; + dynamic descriptionN; + bool? value; + bool? isActive; + + ListGetBookScheduleConfigsList( + {this.iD, + this.description, + this.descriptionN, + this.value, + this.isActive}); + + ListGetBookScheduleConfigsList.fromJson(Map json) { + iD = json['ID']; + description = json['Description']; + descriptionN = json['DescriptionN']; + value = json['Value']; + isActive = json['IsActive']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + data['Value'] = this.value; + data['IsActive'] = this.isActive; + return data; + } +} diff --git a/lib/models/Clinics/EROnlineCheckInPaymentDetailsResponse.dart b/lib/models/Clinics/EROnlineCheckInPaymentDetailsResponse.dart new file mode 100644 index 00000000..1d6694ad --- /dev/null +++ b/lib/models/Clinics/EROnlineCheckInPaymentDetailsResponse.dart @@ -0,0 +1,108 @@ +class EROnlineCheckInPaymentDetailsResponse { + num? cashPrice; + num? cashPriceTax; + num? cashPriceWithTax; + int? companyId; + String? companyName; + num? companyShareWithTax; + dynamic errCode; + int? groupID; + String? insurancePolicyNo; + String? message; + String? patientCardID; + num? patientShare; + num? patientShareWithTax; + num? patientTaxAmount; + int? policyId; + String? policyName; + String? procedureId; + String? procedureName; + dynamic setupID; + int? statusCode; + String? subPolicyNo; + bool? isCash; + bool? isEligible; + bool? isInsured; + EROnlineCheckInPaymentDetailsResponse( + {this.cashPrice, + this.cashPriceTax, + this.cashPriceWithTax, + this.companyId, + this.companyName, + this.companyShareWithTax, + this.errCode, + this.groupID, + this.insurancePolicyNo, + this.message, + this.patientCardID, + this.patientShare, + this.patientShareWithTax, + this.patientTaxAmount, + this.policyId, + this.policyName, + this.procedureId, + this.procedureName, + this.setupID, + this.statusCode, + this.subPolicyNo, + this.isCash, + this.isEligible, + this.isInsured + }); + + EROnlineCheckInPaymentDetailsResponse.fromJson(Map json) { + cashPrice = json['CashPrice']; + cashPriceTax = json['CashPriceTax']; + cashPriceWithTax = json['CashPriceWithTax']; + companyId = json['CompanyId']; + companyName = json['CompanyName']; + companyShareWithTax = json['CompanyShareWithTax']; + errCode = json['ErrCode']; + groupID = json['GroupID']; + insurancePolicyNo = json['InsurancePolicyNo']; + message = json['Message']; + patientCardID = json['PatientCardID']; + patientShare = json['PatientShare']; + patientShareWithTax = json['PatientShareWithTax']; + patientTaxAmount = json['PatientTaxAmount']; + policyId = json['PolicyId']; + policyName = json['PolicyName']; + procedureId = json['ProcedureId']; + procedureName = json['ProcedureName']; + setupID = json['SetupID']; + statusCode = json['StatusCode']; + subPolicyNo = json['SubPolicyNo']; + isCash = json['IsCash']; + isEligible = json['IsEligible']; + isInsured = json['IsInsured']; + } + + Map toJson() { + final Map data = new Map(); + data['CashPrice'] = this.cashPrice; + data['CashPriceTax'] = this.cashPriceTax; + data['CashPriceWithTax'] = this.cashPriceWithTax; + data['CompanyId'] = this.companyId; + data['CompanyName'] = this.companyName; + data['CompanyShareWithTax'] = this.companyShareWithTax; + data['ErrCode'] = this.errCode; + data['GroupID'] = this.groupID; + data['InsurancePolicyNo'] = this.insurancePolicyNo; + data['Message'] = this.message; + data['PatientCardID'] = this.patientCardID; + data['PatientShare'] = this.patientShare; + data['PatientShareWithTax'] = this.patientShareWithTax; + data['PatientTaxAmount'] = this.patientTaxAmount; + data['PolicyId'] = this.policyId; + data['PolicyName'] = this.policyName; + data['ProcedureId'] = this.procedureId; + data['ProcedureName'] = this.procedureName; + data['SetupID'] = this.setupID; + data['StatusCode'] = this.statusCode; + data['SubPolicyNo'] = this.subPolicyNo; + data['IsCash'] = this.isCash; + data['IsEligible'] = this.isEligible; + data['IsInsured'] = this.isInsured; + return data; + } +} diff --git a/lib/models/CovidDriveThru/CovidPaymentInfoResponse.dart b/lib/models/CovidDriveThru/CovidPaymentInfoResponse.dart new file mode 100644 index 00000000..35342c26 --- /dev/null +++ b/lib/models/CovidDriveThru/CovidPaymentInfoResponse.dart @@ -0,0 +1,96 @@ +class CovidPaymentInfoResponse { + dynamic propertyChanged; + dynamic cashPriceField; + dynamic cashPriceTaxField; + dynamic cashPriceWithTaxField; + dynamic companyIdField; + String? companyNameField; + dynamic companyShareWithTaxField; + dynamic errCodeField; + dynamic groupIDField; + dynamic insurancePolicyNoField; + String? messageField; + dynamic patientCardIDField; + dynamic patientShareField; + dynamic patientShareWithTaxField; + dynamic patientTaxAmountField; + dynamic policyIdField; + dynamic policyNameField; + String? procedureNameField; + dynamic setupIDField; + dynamic statusCodeField; + dynamic subPolicyNoField; + + CovidPaymentInfoResponse( + {this.propertyChanged, + this.cashPriceField, + this.cashPriceTaxField, + this.cashPriceWithTaxField, + this.companyIdField, + this.companyNameField, + this.companyShareWithTaxField, + this.errCodeField, + this.groupIDField, + this.insurancePolicyNoField, + this.messageField, + this.patientCardIDField, + this.patientShareField, + this.patientShareWithTaxField, + this.patientTaxAmountField, + this.policyIdField, + this.policyNameField, + this.procedureNameField, + this.setupIDField, + this.statusCodeField, + this.subPolicyNoField}); + + CovidPaymentInfoResponse.fromJson(Map json) { + propertyChanged = json['PropertyChanged']; + cashPriceField = json['cashPriceField']; + cashPriceTaxField = json['cashPriceTaxField']; + cashPriceWithTaxField = json['cashPriceWithTaxField']; + companyIdField = json['companyIdField']; + companyNameField = json['companyNameField']; + companyShareWithTaxField = json['companyShareWithTaxField']; + errCodeField = json['errCodeField']; + groupIDField = json['groupIDField']; + insurancePolicyNoField = json['insurancePolicyNoField']; + messageField = json['messageField']; + patientCardIDField = json['patientCardIDField']; + patientShareField = json['patientShareField']; + patientShareWithTaxField = json['patientShareWithTaxField']; + patientTaxAmountField = json['patientTaxAmountField']; + policyIdField = json['policyIdField']; + policyNameField = json['policyNameField']; + procedureNameField = json['procedureNameField']; + setupIDField = json['setupIDField']; + statusCodeField = json['statusCodeField']; + subPolicyNoField = json['subPolicyNoField']; + } + + Map toJson() { + final Map data = new Map(); + data['PropertyChanged'] = this.propertyChanged; + data['cashPriceField'] = this.cashPriceField; + data['cashPriceTaxField'] = this.cashPriceTaxField; + data['cashPriceWithTaxField'] = this.cashPriceWithTaxField; + data['companyIdField'] = this.companyIdField; + data['companyNameField'] = this.companyNameField; + data['companyShareWithTaxField'] = this.companyShareWithTaxField; + data['errCodeField'] = this.errCodeField; + data['groupIDField'] = this.groupIDField; + data['insurancePolicyNoField'] = this.insurancePolicyNoField; + data['messageField'] = this.messageField; + data['patientCardIDField'] = this.patientCardIDField; + data['patientShareField'] = this.patientShareField; + data['patientShareWithTaxField'] = this.patientShareWithTaxField; + data['patientTaxAmountField'] = this.patientTaxAmountField; + data['policyIdField'] = this.policyIdField; + data['policyNameField'] = this.policyNameField; + data['procedureNameField'] = this.procedureNameField; + data['setupIDField'] = this.setupIDField; + data['statusCodeField'] = this.statusCodeField; + data['subPolicyNoField'] = this.subPolicyNoField; + return data; + } +} diff --git a/lib/models/CovidDriveThru/CovidTestProceduresResponse.dart b/lib/models/CovidDriveThru/CovidTestProceduresResponse.dart new file mode 100644 index 00000000..2c0a42c9 --- /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/models/CovidDriveThru/DriveThroughTestingCenterModel.dart b/lib/models/CovidDriveThru/DriveThroughTestingCenterModel.dart new file mode 100644 index 00000000..4f528424 --- /dev/null +++ b/lib/models/CovidDriveThru/DriveThroughTestingCenterModel.dart @@ -0,0 +1,76 @@ +class DriveThroughTestingCenterModel { + int? rowID; + int? iD; + int? projectID; + String? setupID; + double? longitude; + double? latitude; + int? numberOfTracks; + bool? isActive; + int? createdBy; + String? createdOn; + int? testTypeEnum; + int? testProcedureEnum; + dynamic editedBy; + dynamic editedON; + dynamic projectName; + dynamic projectNameN; + + DriveThroughTestingCenterModel( + {this.rowID, + this.iD, + this.projectID, + this.setupID, + this.longitude, + this.latitude, + this.numberOfTracks, + this.isActive, + this.createdBy, + this.createdOn, + this.testTypeEnum, + this.testProcedureEnum, + this.editedBy, + this.editedON, + this.projectName, + this.projectNameN}); + + DriveThroughTestingCenterModel.fromJson(Map json) { + rowID = json['RowID']; + iD = json['ID']; + projectID = json['ProjectID']; + setupID = json['SetupID']; + longitude = json['Longitude']; + latitude = json['Latitude']; + numberOfTracks = json['NumberOfTracks']; + isActive = json['IsActive']; + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + testTypeEnum = json['TestTypeEnum']; + testProcedureEnum = json['TestprocedureEnum']; + editedBy = json['EditedBy']; + editedON = json['EditedON']; + projectName = json['ProjectName']; + projectNameN = json['ProjectNameN']; + } + + Map toJson() { + final Map data = new Map(); + data['RowID'] = this.rowID; + data['ID'] = this.iD; + data['ProjectID'] = this.projectID; + data['SetupID'] = this.setupID; + data['Longitude'] = this.longitude; + data['Latitude'] = this.latitude; + data['NumberOfTracks'] = this.numberOfTracks; + data['IsActive'] = this.isActive; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['TestTypeEnum'] = this.testTypeEnum; + data['TestprocedureEnum'] = this.testProcedureEnum; + data['EditedBy'] = this.editedBy; + data['EditedON'] = this.editedON; + data['ProjectName'] = this.projectName; + data['ProjectNameN'] = this.projectNameN; + return data; + } +} diff --git a/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart b/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart new file mode 100644 index 00000000..def0db59 --- /dev/null +++ b/lib/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart @@ -0,0 +1,393 @@ +class GetAllSharedRecordsByStatusResponse { + dynamic date; + int? languageID; + int? serviceName; + dynamic time; + dynamic androidLink; + dynamic authenticationTokenID; + dynamic data; + bool? dataw; + int? dietType; + dynamic errorCode; + dynamic errorEndUserMessage; + dynamic errorEndUserMessageN; + dynamic errorMessage; + int? errorType; + int? foodCategory; + dynamic iOSLink; + bool? isAuthenticated; + int? mealOrderStatus; + int? mealType; + int? messageStatus; + int? numberOfResultRecords; + dynamic patientBlodType; + dynamic successMsg; + dynamic successMsgN; + dynamic doctorInformationList; + List? getAllPendingRecordsList; + List? getAllSharedRecordsByStatusList ; + List? getResponseFileList; + bool? isHMGPatient; + bool? isLoginSuccessfully; + bool? isNeedUpdateIdintificationNo; + bool? kioskSendSMS; + dynamic list; + dynamic listAskHabibMobileLoginInfo; + dynamic listAskHabibPatientFile; + dynamic listMergeFiles; + dynamic listMobileLoginInfo; + dynamic listPatientCount; + dynamic logInTokenID; + dynamic mohemmPrivilegeList; + int? pateintID; + dynamic patientBloodType; + dynamic patientERDriverFile; + dynamic patientERDriverFileList; + bool? patientHasFile; + dynamic patientMergedIDs; + bool? patientOutSA; + int? patientShareRequestID; + int? patientType; + int? projectIDOut; + dynamic returnMessage; + bool? sMSLoginRequired; + dynamic servicePrivilegeList; + dynamic sharePatientName; + dynamic verificationCode; + dynamic email; + dynamic errorList; + bool? hasFile; + bool? isActiveCode; + bool? isMerged; + bool? isNeedUserAgreement; + bool? isSMSSent; + dynamic memberList; + dynamic message; + int? statusCode; + + GetAllSharedRecordsByStatusResponse( + {this.date, + this.languageID, + this.serviceName, + this.time, + this.androidLink, + this.authenticationTokenID, + this.data, + this.dataw, + this.dietType, + this.errorCode, + this.errorEndUserMessage, + this.errorEndUserMessageN, + this.errorMessage, + this.errorType, + this.foodCategory, + this.iOSLink, + this.isAuthenticated, + this.mealOrderStatus, + this.mealType, + this.messageStatus, + this.numberOfResultRecords, + this.patientBlodType, + this.successMsg, + this.successMsgN, + this.doctorInformationList, + this.getAllPendingRecordsList, + this.getAllSharedRecordsByStatusList, + this.getResponseFileList, + this.isHMGPatient, + this.isLoginSuccessfully, + this.isNeedUpdateIdintificationNo, + this.kioskSendSMS, + this.list, + this.listAskHabibMobileLoginInfo, + this.listAskHabibPatientFile, + this.listMergeFiles, + this.listMobileLoginInfo, + this.listPatientCount, + this.logInTokenID, + this.mohemmPrivilegeList, + this.pateintID, + this.patientBloodType, + this.patientERDriverFile, + this.patientERDriverFileList, + this.patientHasFile, + this.patientMergedIDs, + this.patientOutSA, + this.patientShareRequestID, + this.patientType, + this.projectIDOut, + this.returnMessage, + this.sMSLoginRequired, + this.servicePrivilegeList, + this.sharePatientName, + this.verificationCode, + this.email, + this.errorList, + this.hasFile, + this.isActiveCode, + this.isMerged, + this.isNeedUserAgreement, + this.isSMSSent, + this.memberList, + this.message, + this.statusCode}); + + GetAllSharedRecordsByStatusResponse.fromJson(Map json) { + try { + date = json['Date']; + languageID = json['LanguageID']; + serviceName = json['ServiceName']; + time = json['Time']; + androidLink = json['AndroidLink']; + authenticationTokenID = json['AuthenticationTokenID']; + data = json['Data']; + dataw = json['Dataw']; + dietType = json['DietType']; + errorCode = json['ErrorCode']; + errorEndUserMessage = json['ErrorEndUserMessage']; + errorEndUserMessageN = json['ErrorEndUserMessageN']; + errorMessage = json['ErrorMessage']; + errorType = json['ErrorType']; + foodCategory = json['FoodCategory']; + iOSLink = json['IOSLink']; + isAuthenticated = json['IsAuthenticated']; + mealOrderStatus = json['MealOrderStatus']; + mealType = json['MealType']; + messageStatus = json['MessageStatus']; + numberOfResultRecords = json['NumberOfResultRecords']; + patientBlodType = json['PatientBlodType']; + successMsg = json['SuccessMsg']; + successMsgN = json['SuccessMsgN']; + doctorInformationList = json['DoctorInformation_List']; +// getAllPendingRecordsList = json['GetAllPendingRecordsList']; + + if (json['GetAllPendingRecordsList'] != null) { + getAllSharedRecordsByStatusList = []; + json['GetAllPendingRecordsList'].forEach((v) { + getAllSharedRecordsByStatusList!.add(new GetAllSharedRecordsByStatusList.fromJson(v)); + }); + } + + if (json['GetAllSharedRecordsByStatusList'] != null) { + getAllSharedRecordsByStatusList = []; + json['GetAllSharedRecordsByStatusList'].forEach((v) { + getAllSharedRecordsByStatusList!.add(new GetAllSharedRecordsByStatusList.fromJson(v)); + }); + } + getResponseFileList = json['GetResponseFileList']; + isHMGPatient = json['IsHMGPatient']; + isLoginSuccessfully = json['IsLoginSuccessfully']; + isNeedUpdateIdintificationNo = json['IsNeedUpdateIdintificationNo']; + kioskSendSMS = json['KioskSendSMS']; + list = json['List']; + listAskHabibMobileLoginInfo = json['List_AskHabibMobileLoginInfo']; + listAskHabibPatientFile = json['List_AskHabibPatientFile']; + listMergeFiles = json['List_MergeFiles']; + listMobileLoginInfo = json['List_MobileLoginInfo']; + listPatientCount = json['List_PatientCount']; + logInTokenID = json['LogInTokenID']; + mohemmPrivilegeList = json['MohemmPrivilege_List']; + pateintID = json['PateintID']; + patientBloodType = json['PatientBloodType']; + patientERDriverFile = json['PatientER_DriverFile']; + patientERDriverFileList = json['PatientER_DriverFileList']; + patientHasFile = json['PatientHasFile']; + patientMergedIDs = json['PatientMergedIDs']; + patientOutSA = json['PatientOutSA']; + patientShareRequestID = json['PatientShareRequestID']; + patientType = json['PatientType']; + projectIDOut = json['ProjectIDOut']; + returnMessage = json['ReturnMessage']; + sMSLoginRequired = json['SMSLoginRequired']; + servicePrivilegeList = json['ServicePrivilege_List']; + sharePatientName = json['SharePatientName']; + verificationCode = json['VerificationCode']; + email = json['email']; + errorList = json['errorList']; + hasFile = json['hasFile']; + isActiveCode = json['isActiveCode']; + isMerged = json['isMerged']; + isNeedUserAgreement = json['isNeedUserAgreement']; + isSMSSent = json['isSMSSent']; + memberList = json['memberList']; + message = json['message']; + statusCode = json['statusCode']; + } catch (e) { + var asd = ""; + print(e); + } + } + + Map toJson() { + final Map data = new Map(); + data['Date'] = this.date; + data['LanguageID'] = this.languageID; + data['ServiceName'] = this.serviceName; + data['Time'] = this.time; + data['AndroidLink'] = this.androidLink; + data['AuthenticationTokenID'] = this.authenticationTokenID; + data['Data'] = this.data; + data['Dataw'] = this.dataw; + data['DietType'] = this.dietType; + data['ErrorCode'] = this.errorCode; + data['ErrorEndUserMessage'] = this.errorEndUserMessage; + data['ErrorEndUserMessageN'] = this.errorEndUserMessageN; + data['ErrorMessage'] = this.errorMessage; + data['ErrorType'] = this.errorType; + data['FoodCategory'] = this.foodCategory; + data['IOSLink'] = this.iOSLink; + data['IsAuthenticated'] = this.isAuthenticated; + data['MealOrderStatus'] = this.mealOrderStatus; + data['MealType'] = this.mealType; + data['MessageStatus'] = this.messageStatus; + data['NumberOfResultRecords'] = this.numberOfResultRecords; + data['PatientBlodType'] = this.patientBlodType; + data['SuccessMsg'] = this.successMsg; + data['SuccessMsgN'] = this.successMsgN; + data['DoctorInformation_List'] = this.doctorInformationList; + data['GetAllPendingRecordsList'] = this.getAllPendingRecordsList; + if (this.getAllSharedRecordsByStatusList != null) { + data['GetAllSharedRecordsByStatusList'] = this.getAllSharedRecordsByStatusList!.map((v) => v.toJson()).toList(); + } + data['GetResponseFileList'] = this.getResponseFileList; + data['IsHMGPatient'] = this.isHMGPatient; + data['IsLoginSuccessfully'] = this.isLoginSuccessfully; + data['IsNeedUpdateIdintificationNo'] = this.isNeedUpdateIdintificationNo; + data['KioskSendSMS'] = this.kioskSendSMS; + data['List'] = this.list; + data['List_AskHabibMobileLoginInfo'] = this.listAskHabibMobileLoginInfo; + data['List_AskHabibPatientFile'] = this.listAskHabibPatientFile; + data['List_MergeFiles'] = this.listMergeFiles; + data['List_MobileLoginInfo'] = this.listMobileLoginInfo; + data['List_PatientCount'] = this.listPatientCount; + data['LogInTokenID'] = this.logInTokenID; + data['MohemmPrivilege_List'] = this.mohemmPrivilegeList; + data['PateintID'] = this.pateintID; + data['PatientBloodType'] = this.patientBloodType; + data['PatientER_DriverFile'] = this.patientERDriverFile; + data['PatientER_DriverFileList'] = this.patientERDriverFileList; + data['PatientHasFile'] = this.patientHasFile; + data['PatientMergedIDs'] = this.patientMergedIDs; + data['PatientOutSA'] = this.patientOutSA; + data['PatientShareRequestID'] = this.patientShareRequestID; + data['PatientType'] = this.patientType; + data['ProjectIDOut'] = this.projectIDOut; + data['ReturnMessage'] = this.returnMessage; + data['SMSLoginRequired'] = this.sMSLoginRequired; + data['ServicePrivilege_List'] = this.servicePrivilegeList; + data['SharePatientName'] = this.sharePatientName; + data['VerificationCode'] = this.verificationCode; + data['email'] = this.email; + data['errorList'] = this.errorList; + data['hasFile'] = this.hasFile; + data['isActiveCode'] = this.isActiveCode; + data['isMerged'] = this.isMerged; + data['isNeedUserAgreement'] = this.isNeedUserAgreement; + data['isSMSSent'] = this.isSMSSent; + data['memberList'] = this.memberList; + data['message'] = this.message; + data['statusCode'] = this.statusCode; + return data; + } +} + +class GetAllSharedRecordsByStatusList { + int? iD; + int? patientID; + int? responseID; + dynamic relationshipID; + dynamic relationship; + dynamic relationshipN; + int? regionID; + int? status; + dynamic isActive; + String? editedOn; + String? createdOn; + int? age; + String? emaiLAddress; + int? gender; + String? genderDescription; + String? genderImage; + String? mobileNumber; + int? patientDataVerified; + String? patientIdenficationNumber; + String? patientName; + String? statusDescription; + int? familyRegionID; + + GetAllSharedRecordsByStatusList( + {this.iD, + this.patientID, + this.responseID, + this.relationshipID, + this.relationship, + this.relationshipN, + this.regionID, + this.status, + this.isActive, + this.editedOn, + this.createdOn, + this.age, + this.emaiLAddress, + this.gender, + this.genderDescription, + this.genderImage, + this.mobileNumber, + this.patientDataVerified, + this.patientIdenficationNumber, + this.patientName, + this.statusDescription, + this.familyRegionID}); + + GetAllSharedRecordsByStatusList.fromJson(Map json) { + iD = json['ID']; + patientID = json['PatientID']; + responseID = json['ResponseID']; + relationshipID = json['RelationshipID']; + relationship = json['Relationship']; + relationshipN = json['RelationshipN']; + regionID = json['RegionID']; + status = json['Status']; + isActive = json['IsActive']; + editedOn = json['EditedOn']; + createdOn = json['CreatedOn']; + age = json['Age']; + emaiLAddress = json['EmaiLAddress']; + gender = json['Gender']; + genderDescription = json['GenderDescription']; + genderImage = json['GenderImage']; + mobileNumber = json['MobileNumber']; + patientDataVerified = json['PatientDataVerified']; + patientIdenficationNumber = json['PatientIdenficationNumber']; + patientName = json['PatientName']; + statusDescription = json['StatusDescription']; + familyRegionID = json['FamilyRegionID']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['PatientID'] = this.patientID; + data['ResponseID'] = this.responseID; + data['RelationshipID'] = this.relationshipID; + data['Relationship'] = this.relationship; + data['RelationshipN'] = this.relationshipN; + data['RegionID'] = this.regionID; + data['Status'] = this.status; + data['IsActive'] = this.isActive; + data['EditedOn'] = this.editedOn; + data['CreatedOn'] = this.createdOn; + data['Age'] = this.age; + data['EmaiLAddress'] = this.emaiLAddress; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['GenderImage'] = this.genderImage; + data['MobileNumber'] = this.mobileNumber; + data['PatientDataVerified'] = this.patientDataVerified; + data['PatientIdenficationNumber'] = this.patientIdenficationNumber; + data['PatientName'] = this.patientName; + data['StatusDescription'] = this.statusDescription; + data['FamilyRegionID'] = this.familyRegionID; + return data; + } +} diff --git a/lib/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart b/lib/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart new file mode 100644 index 00000000..61c5855e --- /dev/null +++ b/lib/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart @@ -0,0 +1,68 @@ +class GetAllSharedRecordsByStatusReq { + 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? status; + + GetAllSharedRecordsByStatusReq( + {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.status}); + + GetAllSharedRecordsByStatusReq.fromJson(Map json) { + 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']; + status = json['Status']; + } + + 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['PatientType'] = this.patientType; + data['Status'] = this.status; + return data; + } +} diff --git a/lib/models/FamilyFiles/PatientERVirtualHistoryResponse.dart b/lib/models/FamilyFiles/PatientERVirtualHistoryResponse.dart new file mode 100644 index 00000000..932df25e --- /dev/null +++ b/lib/models/FamilyFiles/PatientERVirtualHistoryResponse.dart @@ -0,0 +1,108 @@ +class PatientERVirtualHistoryResponse { + List? erRequestHistoryList; + + PatientERVirtualHistoryResponse({this.erRequestHistoryList}); + + PatientERVirtualHistoryResponse.fromJson(Map json) { + if (json['ErRequestHistoryList'] != null) { + erRequestHistoryList = []; + json['ErRequestHistoryList'].forEach((v) { + erRequestHistoryList!.add(new ErRequestHistoryList.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + if (this.erRequestHistoryList != null) { + data['ErRequestHistoryList'] = + this.erRequestHistoryList!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class ErRequestHistoryList { + dynamic appointmentNo; + String? arrivalTime; + int? callDuration; + int? callStatus; + String? clientRequestID; + String? doctorID; + String? doctorName; + String? doctorNameN; + String? doctorTitle; + String? exWaitingTime; + bool? isAppointmentHaveRating; + int? patCount; + int? projectID; + String? sArrivalTime; + int? serviceID; + String? stringCallStatus; + int? vCID; + int? watingtimeInteger; + + ErRequestHistoryList( + {this.appointmentNo, + this.arrivalTime, + this.callDuration, + this.callStatus, + this.clientRequestID, + this.doctorID, + this.doctorName, + this.doctorNameN, + this.doctorTitle, + this.exWaitingTime, + this.isAppointmentHaveRating, + this.patCount, + this.projectID, + this.sArrivalTime, + this.serviceID, + this.stringCallStatus, + this.vCID, + this.watingtimeInteger}); + + ErRequestHistoryList.fromJson(Map json) { + appointmentNo = json['AppointmentNo'] != null ? json['AppointmentNo'] : "0"; + arrivalTime = json['ArrivalTime']; + callDuration = json['CallDuration']; + callStatus = json['CallStatus']; + clientRequestID = json['ClientRequestID']; + doctorID = json['DoctorID']; + doctorName = json['DoctorName']; + doctorNameN = json['DoctorNameN']; + doctorTitle = json['DoctorTitle']; + exWaitingTime = json['Ex_WaitingTime']; + isAppointmentHaveRating = json['IsAppointmentHaveRating']; + patCount = json['Pat_Count']; + projectID = json['ProjectID']; + sArrivalTime = json['SArrivalTime']; + serviceID = json['ServiceID']; + stringCallStatus = json['StringCallStatus']; + vCID = json['VC_ID']; + watingtimeInteger = json['WatingtimeInteger']; + } + + Map toJson() { + final Map data = new Map(); + data['AppointmentNo'] = this.appointmentNo; + data['ArrivalTime'] = this.arrivalTime; + data['CallDuration'] = this.callDuration; + data['CallStatus'] = this.callStatus; + data['ClientRequestID'] = this.clientRequestID; + data['DoctorID'] = this.doctorID; + data['DoctorName'] = this.doctorName; + data['DoctorNameN'] = this.doctorNameN; + data['DoctorTitle'] = this.doctorTitle; + data['Ex_WaitingTime'] = this.exWaitingTime; + data['IsAppointmentHaveRating'] = this.isAppointmentHaveRating; + data['Pat_Count'] = this.patCount; + data['ProjectID'] = this.projectID; + data['SArrivalTime'] = this.sArrivalTime; + data['ServiceID'] = this.serviceID; + data['StringCallStatus'] = this.stringCallStatus; + data['VC_ID'] = this.vCID; + data['WatingtimeInteger'] = this.watingtimeInteger; + return data; + } +} diff --git a/lib/models/InPatientServices/get_admission_info_response_model.dart b/lib/models/InPatientServices/get_admission_info_response_model.dart new file mode 100644 index 00000000..901adda8 --- /dev/null +++ b/lib/models/InPatientServices/get_admission_info_response_model.dart @@ -0,0 +1,104 @@ +class GetAdmissionInfoResponseModel { + String? setupID; + int? projectID; + int? admissionNo; + String? admissionDate; + int? admissionRequestNo; + int? admissionType; + int? patientType; + int? patientID; + int? clinicID; + int? doctorID; + int? admittingClinicID; + int? admittingDoctorID; + int? categoryID; + String? roomID; + String? bedID; + dynamic dischargeDate; + int? approvalNo; + int? status; + String? statusDesc; + String? statusDescN; + String? clinicName; + String? doctorName; + String? projectName; + + GetAdmissionInfoResponseModel( + {this.setupID, + this.projectID, + this.admissionNo, + this.admissionDate, + this.admissionRequestNo, + this.admissionType, + this.patientType, + this.patientID, + this.clinicID, + this.doctorID, + this.admittingClinicID, + this.admittingDoctorID, + this.categoryID, + this.roomID, + this.bedID, + this.dischargeDate, + this.approvalNo, + this.status, + this.statusDesc, + this.statusDescN, + this.clinicName, + this.doctorName, + this.projectName}); + + GetAdmissionInfoResponseModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + admissionNo = json['AdmissionNo']; + admissionDate = json['AdmissionDate']; + admissionRequestNo = json['AdmissionRequestNo']; + admissionType = json['AdmissionType']; + patientType = json['PatientType']; + patientID = json['PatientID']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + admittingClinicID = json['AdmittingClinicID']; + admittingDoctorID = json['AdmittingDoctorID']; + categoryID = json['CategoryID']; + roomID = json['RoomID']; + bedID = json['BedID']; + dischargeDate = json['DischargeDate']; + approvalNo = json['ApprovalNo']; + status = json['Status']; + statusDesc = json['StatusDesc']; + statusDescN = json['StatusDescN']; + clinicName = json['ClinicName']; + doctorName = json['DoctorName']; + projectName = json['ProjectName']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['AdmissionNo'] = this.admissionNo; + data['AdmissionDate'] = this.admissionDate; + data['AdmissionRequestNo'] = this.admissionRequestNo; + data['AdmissionType'] = this.admissionType; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['AdmittingClinicID'] = this.admittingClinicID; + data['AdmittingDoctorID'] = this.admittingDoctorID; + data['CategoryID'] = this.categoryID; + data['RoomID'] = this.roomID; + data['BedID'] = this.bedID; + data['DischargeDate'] = this.dischargeDate; + data['ApprovalNo'] = this.approvalNo; + data['Status'] = this.status; + data['StatusDesc'] = this.statusDesc; + data['StatusDescN'] = this.statusDescN; + data['ClinicName'] = this.clinicName; + data['DoctorName'] = this.doctorName; + data['ProjectName'] = this.projectName; + return data; + } +} diff --git a/lib/models/InPatientServices/get_admission_request_info_response_model.dart b/lib/models/InPatientServices/get_admission_request_info_response_model.dart new file mode 100644 index 00000000..73de052b --- /dev/null +++ b/lib/models/InPatientServices/get_admission_request_info_response_model.dart @@ -0,0 +1,86 @@ +class GetAdmissionRequestInfoResponseModel { + int? admissionRequestNo; + String? clinicName; + String? doctorName; + String? expectedAdmissionDate; + List ?medicalInstructions; + dynamic medicalInstructionsXML; + String? medicalRemarks; + int? projectId; + String? projectName; + String? setupId; + int? clinicId; + int? doctorId; + + GetAdmissionRequestInfoResponseModel( + {this.admissionRequestNo, + this.clinicName, + this.doctorName, + this.expectedAdmissionDate, + this.medicalInstructions, + this.medicalInstructionsXML, + this.medicalRemarks, + this.projectId, + this.projectName, + this.setupId, + this.clinicId, + this.doctorId}); + + GetAdmissionRequestInfoResponseModel.fromJson(Map json) { + admissionRequestNo = json['admissionRequestNo']; + clinicName = json['clinicName']; + doctorName = json['doctorName']; + clinicId = json['ClinicID']; + doctorId = json['DoctorID']; + expectedAdmissionDate = json['expectedAdmissionDate']; + if (json['medicaLInstructions'] != null) { + medicalInstructions = []; + json['medicaLInstructions'].forEach((v) { + medicalInstructions!.add(new MedicaLInstructions.fromJson(v)); + }); + } + medicalInstructionsXML = json['medicalInstructionsXML']; + medicalRemarks = json['medicalRemarks']; + projectId = json['projectId']; + projectName = json['projectName']; + setupId = json['setupId']; + } + + Map toJson() { + final Map data = new Map(); + data['admissionRequestNo'] = this.admissionRequestNo; + data['clinicName'] = this.clinicName; + data['doctorName'] = this.doctorName; + data['clinicId'] = this.clinicId; + data['doctorId'] = this.doctorId; + data['expectedAdmissionDate'] = this.expectedAdmissionDate; + if (this.medicalInstructions != null) { + data['medicaLInstructions'] = this.medicalInstructions!.map((v) => v.toJson()).toList(); + } + data['medicalInstructionsXML'] = this.medicalInstructionsXML; + data['medicalRemarks'] = this.medicalRemarks; + data['projectId'] = this.projectId; + data['projectName'] = this.projectName; + data['setupId'] = this.setupId; + return data; + } +} + +class MedicaLInstructions { + String? description; + int? parameterCode; + + MedicaLInstructions({this.description, this.parameterCode}); + + MedicaLInstructions.fromJson(Map json) { + description = json['description']; + parameterCode = json['parameterCode']; + } + + Map toJson() { + final Map data = new Map(); + data['description'] = this.description; + data['parameterCode'] = this.parameterCode; + return data; + } +} diff --git a/lib/models/InPatientServices/get_admitted_patient_response_model.dart b/lib/models/InPatientServices/get_admitted_patient_response_model.dart new file mode 100644 index 00000000..6bc55ae9 --- /dev/null +++ b/lib/models/InPatientServices/get_admitted_patient_response_model.dart @@ -0,0 +1,220 @@ +class GetAdmittedPatientsResponseModel { + String? setupID; + int? projectID; + int? admissionNo; + String? admissionDate; + int? patientType; + int? patientID; + int? clinicID; + int? doctorID; + String? roomID; + String? bedID; + int? status; + int? admissionStatus; + String? createdOn; + String? firstName; + String? middleName; + String? lastName; + String? firstNameN; + String? middleNameN; + String? lastNameN; + int? gender; + String? dateofBirth; + dynamic companionFirstName; + dynamic companionMiddleName; + dynamic companionLastName; + dynamic companionFirstNameN; + dynamic companionMiddleNameN; + dynamic companionLastNameN; + dynamic companionID; + dynamic companionGender; + bool? isHasCompanion; + int? buildingID; + int? floorID; + int? nursingStationID; + int? dietType; + String? dietTypeDateCahnged; + String? dietTypeDescription; + String? dietTypeDescriptionN; + dynamic allergyDiseaseDateCahnged; + dynamic allergyDiseaseChecked; + dynamic doctorRemarks; + dynamic allergyRemarks; + String? age; + dynamic allergies; + String? companionFullName; + bool? dietTypeChanged; + String? dietTypeDateCahngedDate; + String? genderDescription; + dynamic genderImageUrl; + bool? hasAllergy; + bool? isNewAdmitted; + String? patientFullName; + dynamic allergyRemark; + + GetAdmittedPatientsResponseModel( + {this.setupID, + this.projectID, + this.admissionNo, + this.admissionDate, + this.patientType, + this.patientID, + this.clinicID, + this.doctorID, + this.roomID, + this.bedID, + this.status, + this.admissionStatus, + this.createdOn, + this.firstName, + this.middleName, + this.lastName, + this.firstNameN, + this.middleNameN, + this.lastNameN, + this.gender, + this.dateofBirth, + this.companionFirstName, + this.companionMiddleName, + this.companionLastName, + this.companionFirstNameN, + this.companionMiddleNameN, + this.companionLastNameN, + this.companionID, + this.companionGender, + this.isHasCompanion, + this.buildingID, + this.floorID, + this.nursingStationID, + this.dietType, + this.dietTypeDateCahnged, + this.dietTypeDescription, + this.dietTypeDescriptionN, + this.allergyDiseaseDateCahnged, + this.allergyDiseaseChecked, + this.doctorRemarks, + this.allergyRemarks, + this.age, + this.allergies, + this.companionFullName, + this.dietTypeChanged, + this.dietTypeDateCahngedDate, + this.genderDescription, + this.genderImageUrl, + this.hasAllergy, + this.isNewAdmitted, + this.patientFullName, + this.allergyRemark}); + + GetAdmittedPatientsResponseModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + admissionNo = json['AdmissionNo']; + admissionDate = json['AdmissionDate']; + patientType = json['PatientType']; + patientID = json['PatientID']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + roomID = json['RoomID']; + bedID = json['BedID']; + status = json['Status']; + admissionStatus = json['AdmissionStatus']; + createdOn = json['CreatedOn']; + firstName = json['FirstName']; + middleName = json['MiddleName']; + lastName = json['LastName']; + firstNameN = json['FirstNameN']; + middleNameN = json['MiddleNameN']; + lastNameN = json['LastNameN']; + gender = json['Gender']; + dateofBirth = json['DateofBirth']; + companionFirstName = json['CompanionFirstName']; + companionMiddleName = json['CompanionMiddleName']; + companionLastName = json['CompanionLastName']; + companionFirstNameN = json['CompanionFirstNameN']; + companionMiddleNameN = json['CompanionMiddleNameN']; + companionLastNameN = json['CompanionLastNameN']; + companionID = json['CompanionID']; + companionGender = json['CompanionGender']; + isHasCompanion = json['IsHasCompanion']; + buildingID = json['BuildingID']; + floorID = json['FloorID']; + nursingStationID = json['NursingStationID']; + dietType = json['DietType']; + dietTypeDateCahnged = json['DietTypeDateCahnged']; + dietTypeDescription = json['DietTypeDescription']; + dietTypeDescriptionN = json['DietTypeDescriptionN']; + allergyDiseaseDateCahnged = json['AllergyDiseaseDateCahnged']; + allergyDiseaseChecked = json['AllergyDiseaseChecked']; + doctorRemarks = json['DoctorRemarks']; + allergyRemarks = json['AllergyRemarks']; + age = json['Age']; + allergies = json['Allergies']; + companionFullName = json['CompanionFullName']; + dietTypeChanged = json['DietTypeChanged']; + dietTypeDateCahngedDate = json['DietTypeDateCahnged_Date']; + genderDescription = json['GenderDescription']; + genderImageUrl = json['GenderImageUrl']; + hasAllergy = json['HasAllergy']; + isNewAdmitted = json['IsNewAdmitted']; + patientFullName = json['PatientFullName']; + allergyRemark = json['allergyRemark']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['AdmissionNo'] = this.admissionNo; + data['AdmissionDate'] = this.admissionDate; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['RoomID'] = this.roomID; + data['BedID'] = this.bedID; + data['Status'] = this.status; + data['AdmissionStatus'] = this.admissionStatus; + data['CreatedOn'] = this.createdOn; + data['FirstName'] = this.firstName; + data['MiddleName'] = this.middleName; + data['LastName'] = this.lastName; + data['FirstNameN'] = this.firstNameN; + data['MiddleNameN'] = this.middleNameN; + data['LastNameN'] = this.lastNameN; + data['Gender'] = this.gender; + data['DateofBirth'] = this.dateofBirth; + data['CompanionFirstName'] = this.companionFirstName; + data['CompanionMiddleName'] = this.companionMiddleName; + data['CompanionLastName'] = this.companionLastName; + data['CompanionFirstNameN'] = this.companionFirstNameN; + data['CompanionMiddleNameN'] = this.companionMiddleNameN; + data['CompanionLastNameN'] = this.companionLastNameN; + data['CompanionID'] = this.companionID; + data['CompanionGender'] = this.companionGender; + data['IsHasCompanion'] = this.isHasCompanion; + data['BuildingID'] = this.buildingID; + data['FloorID'] = this.floorID; + data['NursingStationID'] = this.nursingStationID; + data['DietType'] = this.dietType; + data['DietTypeDateCahnged'] = this.dietTypeDateCahnged; + data['DietTypeDescription'] = this.dietTypeDescription; + data['DietTypeDescriptionN'] = this.dietTypeDescriptionN; + data['AllergyDiseaseDateCahnged'] = this.allergyDiseaseDateCahnged; + data['AllergyDiseaseChecked'] = this.allergyDiseaseChecked; + data['DoctorRemarks'] = this.doctorRemarks; + data['AllergyRemarks'] = this.allergyRemarks; + data['Age'] = this.age; + data['Allergies'] = this.allergies; + data['CompanionFullName'] = this.companionFullName; + data['DietTypeChanged'] = this.dietTypeChanged; + data['DietTypeDateCahnged_Date'] = this.dietTypeDateCahngedDate; + data['GenderDescription'] = this.genderDescription; + data['GenderImageUrl'] = this.genderImageUrl; + data['HasAllergy'] = this.hasAllergy; + data['IsNewAdmitted'] = this.isNewAdmitted; + data['PatientFullName'] = this.patientFullName; + data['allergyRemark'] = this.allergyRemark; + return data; + } +} diff --git a/lib/models/InPatientServices/get_general_instructions_response_model.dart b/lib/models/InPatientServices/get_general_instructions_response_model.dart new file mode 100644 index 00000000..7869a40e --- /dev/null +++ b/lib/models/InPatientServices/get_general_instructions_response_model.dart @@ -0,0 +1,52 @@ +class GetGeneralInstructions { + int? rowID; + int? iD; + int? projectID; + String? text; + String? textN; + bool? isActive; + int? createdBy; + String? createdOn; + dynamic editedBy; + dynamic editedOn; + + GetGeneralInstructions( + {this.rowID, + this.iD, + this.projectID, + this.text, + this.textN, + this.isActive, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn}); + + GetGeneralInstructions.fromJson(Map json) { + rowID = json['RowID']; + iD = json['ID']; + projectID = json['ProjectID']; + text = json['Text']; + textN = json['TextN']; + isActive = json['IsActive']; + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + } + + Map toJson() { + final Map data = new Map(); + data['RowID'] = this.rowID; + data['ID'] = this.iD; + data['ProjectID'] = this.projectID; + data['Text'] = this.text; + data['TextN'] = this.textN; + data['IsActive'] = this.isActive; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + return data; + } +} diff --git a/lib/models/InPatientServices/get_inpatient_advance_history_response_model.dart b/lib/models/InPatientServices/get_inpatient_advance_history_response_model.dart new file mode 100644 index 00000000..d6753707 --- /dev/null +++ b/lib/models/InPatientServices/get_inpatient_advance_history_response_model.dart @@ -0,0 +1,71 @@ +class InPatientAdvanceHistoryResponseModel { + int? advanceNumber; + int? errorCode; + String? message; + List? responseInpatientAdvanceInfo; + int? statusCode; + + InPatientAdvanceHistoryResponseModel({this.advanceNumber, this.errorCode, this.message, this.responseInpatientAdvanceInfo, this.statusCode}); + + InPatientAdvanceHistoryResponseModel.fromJson(Map json) { + advanceNumber = json['advanceNumber']; + errorCode = json['errorCode']; + message = json['message']; + if (json['responseInpatientAdvanceInfo'] != null) { + responseInpatientAdvanceInfo = []; + json['responseInpatientAdvanceInfo'].forEach((v) { + responseInpatientAdvanceInfo!.add(new ResponseInpatientAdvanceInfo.fromJson(v)); + }); + } + statusCode = json['statusCode']; + } + + Map toJson() { + final Map data = new Map(); + data['advanceNumber'] = this.advanceNumber; + data['errorCode'] = this.errorCode; + data['message'] = this.message; + if (this.responseInpatientAdvanceInfo != null) { + data['responseInpatientAdvanceInfo'] = this.responseInpatientAdvanceInfo!.map((v) => v.toJson()).toList(); + } + data['statusCode'] = this.statusCode; + return data; + } +} + +class ResponseInpatientAdvanceInfo { + int? admissionNo; + int? admissionReqNo; + String? createdOn; + int? patientId; + int? projectId; + num? requestedAmount; + String? setupId; + int? status; + + ResponseInpatientAdvanceInfo({this.admissionNo, this.admissionReqNo, this.createdOn, this.patientId, this.projectId, this.requestedAmount, this.setupId, this.status}); + + ResponseInpatientAdvanceInfo.fromJson(Map json) { + admissionNo = json['admissionNo']; + admissionReqNo = json['admissionReqNo']; + createdOn = json['createdOn']; + patientId = json['patientId']; + projectId = json['projectId']; + requestedAmount = json['requestedAmount']; + setupId = json['setupId']; + status = json['status']; + } + + Map toJson() { + final Map data = new Map(); + data['admissionNo'] = this.admissionNo; + data['admissionReqNo'] = this.admissionReqNo; + data['createdOn'] = this.createdOn; + data['patientId'] = this.patientId; + data['projectId'] = this.projectId; + data['requestedAmount'] = this.requestedAmount; + data['setupId'] = this.setupId; + data['status'] = this.status; + return data; + } +} diff --git a/lib/models/InPatientServices/get_inpatient_advance_requests_response_model.dart b/lib/models/InPatientServices/get_inpatient_advance_requests_response_model.dart new file mode 100644 index 00000000..658cbfa3 --- /dev/null +++ b/lib/models/InPatientServices/get_inpatient_advance_requests_response_model.dart @@ -0,0 +1,74 @@ +class InPatientAdvanceResponseModel { + int? advanceNumber; + Null errorCode; + String? message; + List? responseInpatientAdvanceInfo; + int? statusCode; + + InPatientAdvanceResponseModel({this.advanceNumber, this.errorCode, this.message, this.responseInpatientAdvanceInfo, this.statusCode}); + + InPatientAdvanceResponseModel.fromJson(Map json) { + advanceNumber = json['advanceNumber']; + errorCode = json['errorCode']; + message = json['message']; + if (json['responseInpatientAdvanceInfo'] != null) { + responseInpatientAdvanceInfo = []; + json['responseInpatientAdvanceInfo'].forEach((v) { + responseInpatientAdvanceInfo!.add(new ResponseInpatientAdvanceInfo.fromJson(v)); + }); + } + statusCode = json['statusCode']; + } + + Map toJson() { + final Map data = new Map(); + data['advanceNumber'] = this.advanceNumber; + data['errorCode'] = this.errorCode; + data['message'] = this.message; + if (this.responseInpatientAdvanceInfo != null) { + data['responseInpatientAdvanceInfo'] = this.responseInpatientAdvanceInfo!.map((v) => v.toJson()).toList(); + } + data['statusCode'] = this.statusCode; + return data; + } +} + +class ResponseInpatientAdvanceInfo { + int? admissionNo; + int? admissionReqNo; + String? createdOn; + int? patientId; + int? projectId; + num? requestedAmount; + String? setupId; + int? status; + int? paymentRequestID; + + ResponseInpatientAdvanceInfo({this.admissionNo, this.admissionReqNo, this.createdOn, this.patientId, this.projectId, this.requestedAmount, this.setupId, this.status, this.paymentRequestID}); + + ResponseInpatientAdvanceInfo.fromJson(Map json) { + admissionNo = json['admissionNo']; + admissionReqNo = json['admissionReqNo']; + createdOn = json['createdOn']; + patientId = json['patientId']; + projectId = json['projectId']; + requestedAmount = json['requestedAmount']; + setupId = json['setupId']; + status = json['status']; + paymentRequestID = json['PaymentRequestId']; + } + + Map toJson() { + final Map data = new Map(); + data['admissionNo'] = this.admissionNo; + data['admissionReqNo'] = this.admissionReqNo; + data['createdOn'] = this.createdOn; + data['patientId'] = this.patientId; + data['projectId'] = this.projectId; + data['requestedAmount'] = this.requestedAmount; + data['setupId'] = this.setupId; + data['status'] = this.status; + data['PaymentRequestId'] = this.paymentRequestID; + return data; + } +} diff --git a/lib/models/InPatientServices/get_meal_items_schedule_response_model.dart b/lib/models/InPatientServices/get_meal_items_schedule_response_model.dart new file mode 100644 index 00000000..5d3f7ddb --- /dev/null +++ b/lib/models/InPatientServices/get_meal_items_schedule_response_model.dart @@ -0,0 +1,74 @@ +import 'package:flutter/material.dart'; + +class GetMealItemsScheduleResponseModel { + int? itemID; + String? description; + String? descriptionN; + dynamic comment; + dynamic commentN; + String? imageURL; + bool? isDefault; + int? categoryID; + String? categoryDescription; + String? categoryDescriptionN; + int? scheduleID; + int? cal; + + GetMealItemsScheduleResponseModel( + {this.itemID, + this.description, + this.descriptionN, + this.comment, + this.commentN, + this.imageURL, + this.isDefault, + this.categoryID, + this.categoryDescription, + this.categoryDescriptionN, + this.scheduleID, + this.cal}); + + GetMealItemsScheduleResponseModel.fromJson(Map json) { + itemID = json['ItemID']; + description = json['Description']; + descriptionN = json['DescriptionN']; + comment = json['Comment']; + commentN = json['CommentN']; + imageURL = json['ImageURL']; + isDefault = json['IsDefault']; + categoryID = json['CategoryID']; + categoryDescription = json['CategoryDescription']; + categoryDescriptionN = json['CategoryDescriptionN']; + scheduleID = json['ScheduleID']; + cal = json['cal']; + } + + Map toJson() { + final Map data = new Map(); + data['ItemID'] = this.itemID; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + data['Comment'] = this.comment; + data['CommentN'] = this.commentN; + data['ImageURL'] = this.imageURL; + data['IsDefault'] = this.isDefault; + data['CategoryID'] = this.categoryID; + data['CategoryDescription'] = this.categoryDescription; + data['CategoryDescriptionN'] = this.categoryDescriptionN; + data['ScheduleID'] = this.scheduleID; + data['cal'] = this.cal; + return data; + } +} + +class GetMealItemsScheduleResponseModelList { + String? filterName; + List getMealItemsScheduleResponseModelList = []; + + // int selectedItemID = 0; + final ValueNotifier selectedItemID = ValueNotifier(0); + + GetMealItemsScheduleResponseModelList({this.filterName, GetMealItemsScheduleResponseModel? getMealItemsScheduleResponseModel}) { + getMealItemsScheduleResponseModelList.add(getMealItemsScheduleResponseModel!); + } +} diff --git a/lib/models/InPatientServices/get_meals_schedule_response_model.dart b/lib/models/InPatientServices/get_meals_schedule_response_model.dart new file mode 100644 index 00000000..c691ee84 --- /dev/null +++ b/lib/models/InPatientServices/get_meals_schedule_response_model.dart @@ -0,0 +1,60 @@ +class GetMealsScheduleResponseModel { + int? scheduleID; + int? mealID; + String? description; + String? descriptionN; + int? weekID; + String? weekDescription; + String? weekDescriptionN; + String? tAT; + int? dietTypeID; + int? dayID; + bool? isShow; + String? tATTime; + + GetMealsScheduleResponseModel( + {this.scheduleID, + this.mealID, + this.description, + this.descriptionN, + this.weekID, + this.weekDescription, + this.weekDescriptionN, + this.tAT, + this.dietTypeID, + this.dayID, + this.isShow, + this.tATTime}); + + GetMealsScheduleResponseModel.fromJson(Map json) { + scheduleID = json['ScheduleID']; + mealID = json['MealID']; + description = json['Description']; + descriptionN = json['DescriptionN']; + weekID = json['WeekID']; + weekDescription = json['WeekDescription']; + weekDescriptionN = json['WeekDescriptionN']; + tAT = json['TAT']; + dietTypeID = json['DietTypeID']; + dayID = json['DayID']; + isShow = json['IsShow']; + tATTime = json['TATTime']; + } + + Map toJson() { + final Map data = new Map(); + data['ScheduleID'] = this.scheduleID; + data['MealID'] = this.mealID; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + data['WeekID'] = this.weekID; + data['WeekDescription'] = this.weekDescription; + data['WeekDescriptionN'] = this.weekDescriptionN; + data['TAT'] = this.tAT; + data['DietTypeID'] = this.dietTypeID; + data['DayID'] = this.dayID; + data['IsShow'] = this.isShow; + data['TATTime'] = this.tATTime; + return data; + } +} diff --git a/lib/models/InPatientServices/get_medical_instructions_response_model.dart b/lib/models/InPatientServices/get_medical_instructions_response_model.dart new file mode 100644 index 00000000..110975ba --- /dev/null +++ b/lib/models/InPatientServices/get_medical_instructions_response_model.dart @@ -0,0 +1,85 @@ +class GetMedicalInstructions { + dynamic propertyChanged; + int? admissionRequestNoField; + String? clinicNameField; + String? doctorNameField; + String? expectedAdmissionDateField; + List? medicaLInstructionsField; + dynamic medicalInstructionsXMLField; + String? medicalRemarksField; + int? projectIdField; + String? projectNameField; + String? setupIdField; + + GetMedicalInstructions( + {this.propertyChanged, + this.admissionRequestNoField, + this.clinicNameField, + this.doctorNameField, + this.expectedAdmissionDateField, + this.medicaLInstructionsField, + this.medicalInstructionsXMLField, + this.medicalRemarksField, + this.projectIdField, + this.projectNameField, + this.setupIdField}); + + GetMedicalInstructions.fromJson(Map json) { + propertyChanged = json['PropertyChanged']; + admissionRequestNoField = json['admissionRequestNoField']; + clinicNameField = json['clinicNameField']; + doctorNameField = json['doctorNameField']; + expectedAdmissionDateField = json['expectedAdmissionDateField']; + if (json['medicaLInstructions'] != null) { + medicaLInstructionsField = []; + json['medicaLInstructions'].forEach((v) { + medicaLInstructionsField!.add(new MedicaLInstructionsField.fromJson(v)); + }); + } + medicalInstructionsXMLField = json['medicalInstructionsXMLField']; + medicalRemarksField = json['medicalRemarksField']; + projectIdField = json['projectIdField']; + projectNameField = json['projectNameField']; + setupIdField = json['setupIdField']; + } + + Map toJson() { + final Map data = new Map(); + data['PropertyChanged'] = this.propertyChanged; + data['admissionRequestNoField'] = this.admissionRequestNoField; + data['clinicNameField'] = this.clinicNameField; + data['doctorNameField'] = this.doctorNameField; + data['expectedAdmissionDateField'] = this.expectedAdmissionDateField; + if (this.medicaLInstructionsField != null) { + data['medicaLInstructionsField'] = this.medicaLInstructionsField!.map((v) => v.toJson()).toList(); + } + data['medicalInstructionsXMLField'] = this.medicalInstructionsXMLField; + data['medicalRemarksField'] = this.medicalRemarksField; + data['projectIdField'] = this.projectIdField; + data['projectNameField'] = this.projectNameField; + data['setupIdField'] = this.setupIdField; + return data; + } +} + +class MedicaLInstructionsField { + Null propertyChanged; + String? descriptionField; + int? parameterCodeField; + + MedicaLInstructionsField({this.propertyChanged, this.descriptionField, this.parameterCodeField}); + + MedicaLInstructionsField.fromJson(Map json) { + propertyChanged = json['PropertyChanged']; + descriptionField = json['description']; + parameterCodeField = json['parameterCodeField']; + } + + Map toJson() { + final Map data = new Map(); + data['PropertyChanged'] = this.propertyChanged; + data['descriptionField'] = this.descriptionField; + data['parameterCodeField'] = this.parameterCodeField; + return data; + } +} diff --git a/lib/models/LiveCare/ApplePayInsertRequest.dart b/lib/models/LiveCare/ApplePayInsertRequest.dart new file mode 100644 index 00000000..6a7f1ac6 --- /dev/null +++ b/lib/models/LiveCare/ApplePayInsertRequest.dart @@ -0,0 +1,187 @@ +class ApplePayInsertRequest { + String? clientRequestID; + int? clinicID; + String? currency; + String? customerEmail; + dynamic customerID; + String? customerName; + String? deviceToken; + String? voipToken; + int? doctorID; + String? projectID; + String? serviceID; + int? channelID; + dynamic patientID; + int? patientTypeID; + int? patientOutSA; + dynamic appointmentDate; + int? appointmentNo; + String? orderDescription; + String? liveServiceID; + String? latitude; + String? longitude; + String? amount; + String? isSchedule; + String? language; + int? userName; + String? responseContinueURL; + String? backClickUrl; + String? paymentOption; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + bool? isMobSDK; + String? merchantReference; + String? merchantIdentifier; + String? commandType; + String? signature; + String? accessCode; + String? shaRequestPhrase; + String? shaResponsePhrase; + String? returnURL; + + ApplePayInsertRequest( + {this.clientRequestID, + this.clinicID, + this.currency, + this.customerEmail, + this.customerID, + this.customerName, + this.deviceToken, + this.voipToken, + this.doctorID, + this.projectID, + this.serviceID, + this.channelID, + this.patientID, + this.patientTypeID, + this.patientOutSA, + this.appointmentDate, + this.appointmentNo, + this.orderDescription, + this.liveServiceID, + this.latitude, + this.longitude, + this.amount, + this.isSchedule, + this.language, + this.userName, + this.responseContinueURL, + this.backClickUrl, + this.paymentOption, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.isMobSDK, + this.merchantReference, + this.merchantIdentifier, + this.commandType, + this.signature, + this.accessCode, + this.shaRequestPhrase, + this.shaResponsePhrase, + this.returnURL, + }); + + ApplePayInsertRequest.fromJson(Map json) { + clientRequestID = json['ClientRequestID']; + clinicID = json['ClinicID']; + currency = json['Currency']; + customerEmail = json['CustomerEmail']; + customerID = json['CustomerID']; + customerName = json['CustomerName']; + deviceToken = json['DeviceToken']; + voipToken = json['VoipToken']; + doctorID = json['DoctorID']; + projectID = json['ProjectID']; + serviceID = json['Service_ID']; + channelID = json['Channel_ID']; + patientID = json['PatientID']; + patientTypeID = json['PatientTypeID']; + patientOutSA = json['PatientOutSA']; + appointmentDate = json['AppointmentDate']; + appointmentNo = json['AppointmentNo']; + orderDescription = json['OrderDescription']; + liveServiceID = json['Live_ServiceID']; + latitude = json['Latitude']; + longitude = json['Longitude']; + amount = json['Amount']; + isSchedule = json['IsSchedule']; + language = json['Language']; + userName = json['userName']; + responseContinueURL = json['ResponseContinueURL']; + backClickUrl = json['BackClickUrl']; + paymentOption = json['PaymentOption']; + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + sessionID = json['SessionID']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; + deviceTypeID = json['DeviceTypeID']; + } + + Map toJson() { + final Map data = new Map(); + data['ClientRequestID'] = this.clientRequestID; + data['ClinicID'] = this.clinicID; + data['Currency'] = this.currency; + data['CustomerEmail'] = this.customerEmail; + data['CustomerID'] = this.customerID; + data['CustomerName'] = this.customerName; + data['DeviceToken'] = this.deviceToken; + data['VoipToken'] = this.voipToken; + data['DoctorID'] = this.doctorID; + data['ProjectID'] = this.projectID; + data['Service_ID'] = this.serviceID; + data['Channel_ID'] = this.channelID; + data['PatientID'] = this.patientID; + data['PatientId'] = this.patientID; + data['PatientTypeID'] = this.patientTypeID; + data['PatientOutSA'] = this.patientOutSA; + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentNo'] = this.appointmentNo; + data['OrderDescription'] = this.orderDescription; + data['Live_ServiceID'] = this.liveServiceID; + data['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + data['Amount'] = this.amount; + data['IsSchedule'] = this.isSchedule; + data['Language'] = this.language; + data['userName'] = this.userName; + data['ResponseContinueURL'] = this.responseContinueURL; + data['BackClickUrl'] = this.backClickUrl; + data['PaymentOption'] = this.paymentOption; + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['SessionID'] = this.sessionID; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['DeviceTypeID'] = this.deviceTypeID; + + data['IsMobSDK'] = this.isMobSDK; + data['Merchant_Reference'] = this.merchantReference; + data['Merchant_Identifier'] = this.merchantIdentifier; + data['CommandType'] = this.commandType; + data['Signature'] = this.signature; + data['Access_code'] = this.accessCode; + data['SHA_RequestPhase'] = this.shaRequestPhrase; + data['SHA_ResponsePhase'] = this.shaResponsePhrase; + data['ReturnURL'] = this.returnURL; + + return data; + } +} diff --git a/lib/models/LiveCare/ClinicsServiceTimingsResponse.dart b/lib/models/LiveCare/ClinicsServiceTimingsResponse.dart new file mode 100644 index 00000000..a7f5c12b --- /dev/null +++ b/lib/models/LiveCare/ClinicsServiceTimingsResponse.dart @@ -0,0 +1,116 @@ +class ClinicsServiceTimingsResponse { + List? patientERGetClinicsServiceTimingsList; + + ClinicsServiceTimingsResponse({this.patientERGetClinicsServiceTimingsList}); + + ClinicsServiceTimingsResponse.fromJson(Map json) { + if (json['PatientER_GetClinicsServiceTimingsList'] != null) { + patientERGetClinicsServiceTimingsList = []; + json['PatientER_GetClinicsServiceTimingsList'].forEach((v) { + patientERGetClinicsServiceTimingsList!.add(new PatientERGetClinicsServiceTimingsList.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + if (this.patientERGetClinicsServiceTimingsList != null) { + data['PatientER_GetClinicsServiceTimingsList'] = this.patientERGetClinicsServiceTimingsList!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class PatientERGetClinicsServiceTimingsList { + int? iD; + int? serviceID; + dynamic shiftID; + int? dayOfWeek; + String? dayOfWeekStr; + dynamic startTime; + dynamic endTime; + bool? isActive; + String? createdOn; + String? createdBy; + bool? projectOutSA; + String? dayOfWeekStrN; + List? shiftTimings; + + PatientERGetClinicsServiceTimingsList( + {this.iD, + this.serviceID, + this.shiftID, + this.dayOfWeek, + this.dayOfWeekStr, + this.startTime, + this.endTime, + this.isActive, + this.createdOn, + this.createdBy, + this.projectOutSA, + this.dayOfWeekStrN, + this.shiftTimings}); + + PatientERGetClinicsServiceTimingsList.fromJson(Map json) { + iD = json['ID']; + serviceID = json['ServiceID']; + shiftID = json['ShiftID']; + dayOfWeek = json['DayOfWeek']; + dayOfWeekStr = json['DayOfWeekStr']; + startTime = json['StartTime']; + endTime = json['EndTime']; + isActive = json['IsActive']; + createdOn = json['CreatedOn']; + createdBy = json['CreatedBy']; + projectOutSA = json['ProjectOutSA']; + dayOfWeekStrN = json['DayOfWeekStrN']; + if (json['ShiftTimings'] != null) { + shiftTimings = []; + json['ShiftTimings'].forEach((v) { + shiftTimings!.add(new ShiftTimings.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['ServiceID'] = this.serviceID; + data['ShiftID'] = this.shiftID; + data['DayOfWeek'] = this.dayOfWeek; + data['DayOfWeekStr'] = this.dayOfWeekStr; + data['StartTime'] = this.startTime; + data['EndTime'] = this.endTime; + data['IsActive'] = this.isActive; + data['CreatedOn'] = this.createdOn; + data['CreatedBy'] = this.createdBy; + data['ProjectOutSA'] = this.projectOutSA; + data['DayOfWeekStrN'] = this.dayOfWeekStrN; + if (this.shiftTimings != null) { + data['ShiftTimings'] = this.shiftTimings!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class ShiftTimings { + String? endTime; + int? shiftID; + String? startTime; + + ShiftTimings({this.endTime, this.shiftID, this.startTime}); + + ShiftTimings.fromJson(Map json) { + endTime = json['EndTime']; + shiftID = json['ShiftID']; + startTime = json['StartTime']; + } + + Map toJson() { + final Map data = new Map(); + data['EndTime'] = this.endTime; + data['ShiftID'] = this.shiftID; + data['StartTime'] = this.startTime; + return data; + } +} diff --git a/lib/models/LiveCare/ERAppointmentFeesResponse.dart b/lib/models/LiveCare/ERAppointmentFeesResponse.dart new file mode 100644 index 00000000..3deaa05b --- /dev/null +++ b/lib/models/LiveCare/ERAppointmentFeesResponse.dart @@ -0,0 +1,65 @@ +class ERAppointmentFeesResponse { + GetERAppointmentFeesList? getERAppointmentFeesList; + + ERAppointmentFeesResponse({this.getERAppointmentFeesList}); + + ERAppointmentFeesResponse.fromJson(Map json) { + getERAppointmentFeesList = json['GetERAppointmentFeesList'] != null + ? new GetERAppointmentFeesList.fromJson( + json['GetERAppointmentFeesList']) + : null; + } + + Map toJson() { + final Map data = new Map(); + if (this.getERAppointmentFeesList != null) { + data['GetERAppointmentFeesList'] = this.getERAppointmentFeesList!.toJson(); + } + return data; + } +} + +class GetERAppointmentFeesList { + String? amount; + String? companyName; + bool? isInsured; + bool? isShowInsuranceUpdateModule; + bool? isCash; + bool? isEligible; + String? tax; + String? total; + String? currency; + + GetERAppointmentFeesList( + {this.amount, + this.companyName, + this.isInsured, + this.isShowInsuranceUpdateModule, + this.tax, + this.total, + this.currency}); + + GetERAppointmentFeesList.fromJson(Map json) { + amount = json['Amount']; + companyName = json['CompanyName']; + isInsured = json['IsInsured']; + isCash = json['IsCash']; + isEligible = json['IsEligible']; + isShowInsuranceUpdateModule = json['IsShowInsuranceUpdateModule']; + tax = json['Tax']; + total = json['Total']; + currency = json['currency']; + } + + Map toJson() { + final Map data = new Map(); + data['Amount'] = this.amount; + data['CompanyName'] = this.companyName; + data['IsInsured'] = this.isInsured; + data['IsShowInsuranceUpdateModule'] = this.isShowInsuranceUpdateModule; + data['Tax'] = this.tax; + data['Total'] = this.total; + data['currency'] = this.currency; + return data; + } +} diff --git a/lib/models/LiveCare/IncomingCallData.dart b/lib/models/LiveCare/IncomingCallData.dart new file mode 100644 index 00000000..e357a5df --- /dev/null +++ b/lib/models/LiveCare/IncomingCallData.dart @@ -0,0 +1,117 @@ +class IncomingCallData { + String? callerID; + String? receiverID; + String? msgID; + String? notfID; + String? notificationForeground; + String? count; + String? message; + String? appointmentNo; // 1 for Video call, 2 for Audio call + String? title; + String? projectID; + String? notificationType; + String? background; // 0 for Zoom, 1 for OpenTok + String? doctorname; + String? clinicname; + String? speciality; + String? appointmentdate; + String? appointmenttime; + String? type; + String? sessionId; + String? identity; + String? name; + String? videoUrl; + String? picture; + String? token; + String? isCall; + String? sound; + String? server; + String? isWebRTC; + + IncomingCallData( + {this.msgID, + this.notfID, + this.notificationForeground, + this.count, + this.message, + this.appointmentNo, + this.title, + this.projectID, + this.notificationType, + this.background, + this.doctorname, + this.clinicname, + this.speciality, + this.appointmentdate, + this.appointmenttime, + this.type, + this.sessionId, + this.identity, + this.name, + this.videoUrl, + this.picture, + this.isCall, + this.sound}); + + IncomingCallData.fromJson(Map json) { + callerID = json['callerID']; + receiverID = json['PatientID']; + msgID = json['msgID']; + notfID = json['notfID']; + notificationForeground = json['notification_foreground']; + count = json['count']; + message = json['message']; + appointmentNo = json['AppointmentNo']; + title = json['title']; + projectID = json['ProjectID']; + notificationType = json['NotificationType']; + background = json['background']; + doctorname = json['doctorname']; + clinicname = json['clinicname']; + speciality = json['speciality']; + appointmentdate = json['appointmentdate']; + appointmenttime = json['appointmenttime']; + type = json['type']; + sessionId = json['session_id']; + token = json['token']; + identity = json['identity']; + name = json['name']; + videoUrl = json['videoUrl']; + picture = json['picture']; + isCall = json['is_call']; + sound = json['sound']; + server = json['server']; + isWebRTC = json['isWebRTC'] ?? "false"; + } + + Map toJson() { + final Map data = new Map(); + data['msgID'] = this.msgID; + data['notfID'] = this.notfID; + data['notification_foreground'] = this.notificationForeground; + data['count'] = this.count; + data['message'] = this.message; + data['AppointmentNo'] = this.appointmentNo; + data['title'] = this.title; + data['ProjectID'] = this.projectID; + data['NotificationType'] = this.notificationType; + data['background'] = this.background; + data['doctorname'] = this.doctorname; + data['clinicname'] = this.clinicname; + data['speciality'] = this.speciality; + data['appointmentdate'] = this.appointmentdate; + data['appointmenttime'] = this.appointmenttime; + data['type'] = this.type; + data['session_id'] = this.sessionId; + data['token'] = this.token; + data['identity'] = this.identity; + data['name'] = this.name; + data['videoUrl'] = this.videoUrl; + data['picture'] = this.picture; + data['is_call'] = this.isCall; + data['sound'] = this.sound; + data['server'] = this.server; + data['isWebRTC'] = this.isWebRTC; + return data; + } +} diff --git a/lib/models/LiveCare/LiveCareClinicsListResponse.dart b/lib/models/LiveCare/LiveCareClinicsListResponse.dart new file mode 100644 index 00000000..687b3763 --- /dev/null +++ b/lib/models/LiveCare/LiveCareClinicsListResponse.dart @@ -0,0 +1,128 @@ +class LiveCareClinicsListResponse { + List? patientERGetClinicsList; + + LiveCareClinicsListResponse({this.patientERGetClinicsList}); + + LiveCareClinicsListResponse.fromJson(Map json) { + if (json['PatientER_GetClinicsList'] != null) { + patientERGetClinicsList = []; + json['PatientER_GetClinicsList'].forEach((v) { + patientERGetClinicsList!.add(new PatientERGetClinicsList.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + if (this.patientERGetClinicsList != null) { + data['PatientER_GetClinicsList'] = this.patientERGetClinicsList!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class PatientERGetClinicsList { + int? iD; + int? serviceID; + String? serviceName; + String? serviceNameN; + int? clinicID; + int? age; + bool? isCheckAgeBelow; + int? gender; + bool? isActive; + String? createdOn; + String? createdBy; + int? isOnline; + dynamic endTime; + bool? projectOutSA; + List? shiftTimings; + dynamic startTime; + + PatientERGetClinicsList( + {this.iD, + this.serviceID, + this.serviceName, + this.serviceNameN, + this.clinicID, + this.age, + this.isCheckAgeBelow, + this.gender, + this.isActive, + this.createdOn, + this.createdBy, + this.isOnline, + this.endTime, + this.projectOutSA, + this.shiftTimings, + this.startTime}); + + PatientERGetClinicsList.fromJson(Map json) { + iD = json['ID']; + serviceID = json['ServiceID']; + serviceName = json['ServiceName']; + serviceNameN = json['ServiceNameN']; + clinicID = json['ClinicID']; + age = json['Age']; + isCheckAgeBelow = json['IsCheckAgeBelow']; + gender = json['Gender']; + isActive = json['IsActive']; + createdOn = json['CreatedOn']; + createdBy = json['CreatedBy']; + isOnline = json['IsOnline']; + endTime = json['EndTime']; + projectOutSA = json['ProjectOutSA']; + if (json['ShiftTimings'] != null) { + shiftTimings = []; + json['ShiftTimings'].forEach((v) { + shiftTimings!.add(new ShiftTimings.fromJson(v)); + }); + } + startTime = json['StartTime']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['ServiceID'] = this.serviceID; + data['ServiceName'] = this.serviceName; + data['ServiceNameN'] = this.serviceNameN; + data['ClinicID'] = this.clinicID; + data['Age'] = this.age; + data['IsCheckAgeBelow'] = this.isCheckAgeBelow; + data['Gender'] = this.gender; + data['IsActive'] = this.isActive; + data['CreatedOn'] = this.createdOn; + data['CreatedBy'] = this.createdBy; + data['IsOnline'] = this.isOnline; + data['EndTime'] = this.endTime; + data['ProjectOutSA'] = this.projectOutSA; + if (this.shiftTimings != null) { + data['ShiftTimings'] = this.shiftTimings!.map((v) => v.toJson()).toList(); + } + data['StartTime'] = this.startTime; + return data; + } +} + +class ShiftTimings { + String? endTime; + int? shiftID; + String? startTime; + + ShiftTimings({this.endTime, this.shiftID, this.startTime}); + + ShiftTimings.fromJson(Map json) { + endTime = json['EndTime']; + shiftID = json['ShiftID']; + startTime = json['StartTime']; + } + + Map toJson() { + final Map data = new Map(); + data['EndTime'] = this.endTime; + data['ShiftID'] = this.shiftID; + data['StartTime'] = this.startTime; + return data; + } +} diff --git a/lib/models/LiveCare/LiveCareScheduleClinicsListResponse.dart b/lib/models/LiveCare/LiveCareScheduleClinicsListResponse.dart new file mode 100644 index 00000000..c915cfe7 --- /dev/null +++ b/lib/models/LiveCare/LiveCareScheduleClinicsListResponse.dart @@ -0,0 +1,64 @@ +class LiveCareScheduleClinicsListResponse { + List? clinicsHaveScheduleList; + + LiveCareScheduleClinicsListResponse({this.clinicsHaveScheduleList}); + + LiveCareScheduleClinicsListResponse.fromJson(Map json) { + if (json['ClinicsHaveScheduleList'] != null) { + clinicsHaveScheduleList = []; + json['ClinicsHaveScheduleList'].forEach((v) { + clinicsHaveScheduleList!.add(new ClinicsHaveScheduleList.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + if (this.clinicsHaveScheduleList != null) { + data['ClinicsHaveScheduleList'] = + this.clinicsHaveScheduleList!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class ClinicsHaveScheduleList { + int? clinicID; + int? serviceID; + int? projectID; + String? clinicDesc; + String? clinicDescN; + String? projectDesc; + String? projectDescN; + + ClinicsHaveScheduleList( + {this.clinicID, + this.serviceID, + this.projectID, + this.clinicDesc, + this.clinicDescN, + this.projectDesc, + this.projectDescN}); + + ClinicsHaveScheduleList.fromJson(Map json) { + clinicID = json['ClinicID']; + serviceID = json['ServiceID']; + projectID = json['ProjectID']; + clinicDesc = json['ClinicDesc']; + clinicDescN = json['ClinicDescN']; + projectDesc = json['ProjectDesc']; + projectDescN = json['ProjectDescN']; + } + + Map toJson() { + final Map data = new Map(); + data['ClinicID'] = this.clinicID; + data['ServiceID'] = this.serviceID; + data['ProjectID'] = this.projectID; + data['ClinicDesc'] = this.clinicDesc; + data['ClinicDescN'] = this.clinicDescN; + data['ProjectDesc'] = this.projectDesc; + data['ProjectDescN'] = this.projectDescN; + return data; + } +} diff --git a/lib/models/LiveCare/insertVIDARequest.dart b/lib/models/LiveCare/insertVIDARequest.dart new file mode 100644 index 00000000..b6037d29 --- /dev/null +++ b/lib/models/LiveCare/insertVIDARequest.dart @@ -0,0 +1,92 @@ +class insertVIDARequest { + int? patientID; + int? acceptedBy; + int? appointmentNo; + String? deviceToken; + double? latitude; + double? longitude; + int? serviceID; + int? projectID; + int? clinicID; + String? deviceType; + String? voipToken; + double? versionID; + int? channel; + int? languageID; + String? iPAdress; + String? generalid; + int? patientOutSA; + String? sessionID; + bool? isDentalAllowedBackend; + int? deviceTypeID; + + insertVIDARequest( + {this.patientID, + this.acceptedBy, + this.appointmentNo, + this.deviceToken, + this.latitude, + this.longitude, + this.serviceID, + this.projectID, + this.clinicID, + this.deviceType, + this.voipToken, + this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID}); + + insertVIDARequest.fromJson(Map json) { + patientID = json['PatientID']; + acceptedBy = json['AcceptedBy']; + appointmentNo = json['AppointmentNo']; + deviceToken = json['DeviceToken']; + latitude = json['Latitude']; + longitude = json['Longitude']; + serviceID = json['ServiceID']; + projectID = json['ProjectID']; + clinicID = json['ClinicID']; + deviceType = json['DeviceType']; + voipToken = json['VoipToken']; + 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['PatientID'] = this.patientID; + data['AcceptedBy'] = this.acceptedBy; + data['AppointmentNo'] = this.appointmentNo; + data['DeviceToken'] = this.deviceToken; + data['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + data['ServiceID'] = this.serviceID; + data['ProjectID'] = this.projectID; + data['ClinicID'] = this.clinicID; + data['DeviceType'] = this.deviceType; + data['VoipToken'] = this.voipToken; + 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/models/LiveCare/room_model.dart b/lib/models/LiveCare/room_model.dart new file mode 100644 index 00000000..7e365a0f --- /dev/null +++ b/lib/models/LiveCare/room_model.dart @@ -0,0 +1,65 @@ +import 'package:diplomaticquarterapp/models/LiveCare/room_validators.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/twilio_enums.dart'; + +class RoomModel with RoomValidators { + final String? name; + final bool? isLoading; + final bool isSubmitted; + final String? token; + final String? identity; + final TwilioRoomType type; + + RoomModel({ + this.name, + this.isLoading = false, + this.isSubmitted = false, + this.token, + this.identity, + this.type = TwilioRoomType.groupSmall, + }); + + static String getTypeText(TwilioRoomType type) { + switch (type) { + case TwilioRoomType.peerToPeer: + return 'peer 2 peer'; + break; + case TwilioRoomType.group: + return 'large (max 50 participants)'; + break; + case TwilioRoomType.groupSmall: + return 'small (max 4 participants)'; + break; + } + return ''; + } + + String get nameErrorText { + return isSubmitted && !nameValidator.isValid(name!) ? invalidNameErrorText : ""; + } + + String get typeText { + return RoomModel.getTypeText(type); + } + + bool get canSubmit { + return nameValidator.isValid(name!); + } + + RoomModel copyWith({ + String? name, + bool? isLoading, + bool? isSubmitted, + String? token, + String? identity, + TwilioRoomType? type, + }) { + return RoomModel( + name: name ?? this.name, + token: token ?? this.token, + identity: identity ?? this.identity, + isLoading: isLoading ?? this.isLoading, + isSubmitted: isSubmitted ?? this.isSubmitted, + type: type ?? this.type, + ); + } +} diff --git a/lib/models/LiveCare/room_validators.dart b/lib/models/LiveCare/room_validators.dart new file mode 100644 index 00000000..44fe95f0 --- /dev/null +++ b/lib/models/LiveCare/room_validators.dart @@ -0,0 +1,6 @@ +import 'package:diplomaticquarterapp/models/LiveCare/validators.dart'; + +mixin RoomValidators { + final StringValidator nameValidator = NonEmptyStringValidator(); + final String invalidNameErrorText = 'Room name can\'t be empty'; +} diff --git a/lib/models/LiveCare/twilio_enums.dart b/lib/models/LiveCare/twilio_enums.dart new file mode 100644 index 00000000..4d4f6f69 --- /dev/null +++ b/lib/models/LiveCare/twilio_enums.dart @@ -0,0 +1,17 @@ +enum TwilioRoomType { + peerToPeer, + group, + groupSmall, +} + +enum TwilioRoomStatus { + completed, + inProgress, +} + +enum TwilioStatusCallbackMethod { + GET, + POST, +} + +enum TwilioVideoCodec { VP8, H264 } diff --git a/lib/models/LiveCare/validators.dart b/lib/models/LiveCare/validators.dart new file mode 100644 index 00000000..aa42f231 --- /dev/null +++ b/lib/models/LiveCare/validators.dart @@ -0,0 +1,13 @@ +abstract class StringValidator { + bool isValid(String value); +} + +class NonEmptyStringValidator implements StringValidator { + @override + bool isValid(String value) { + if (value == null) { + return false; + } + return value.isNotEmpty; + } +} diff --git a/lib/models/MyInvoices/DentalInvoiceDetailResponse.dart b/lib/models/MyInvoices/DentalInvoiceDetailResponse.dart new file mode 100644 index 00000000..3d095be0 --- /dev/null +++ b/lib/models/MyInvoices/DentalInvoiceDetailResponse.dart @@ -0,0 +1,487 @@ +class DentalInvoiceDetailResponse { + List? listEInvoiceForDental; + + DentalInvoiceDetailResponse({this.listEInvoiceForDental}); + + DentalInvoiceDetailResponse.fromJson(Map json) { + if (json['List_eInvoiceForDental'] != null) { + listEInvoiceForDental = []; + json['List_eInvoiceForDental'].forEach((v) { + listEInvoiceForDental!.add(new ListEInvoiceForDental.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + if (this.listEInvoiceForDental != null) { + data['List_eInvoiceForDental'] = this.listEInvoiceForDental!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class ListEInvoiceForDental { + int? projectID; + int? doctorID; + dynamic grandTotal; + dynamic quantity; + dynamic total; + dynamic discount; + dynamic subTotal; + int? invoiceNo; + String? createdOn; + dynamic procedureID; + dynamic procedureName; + dynamic procedureNameN; + dynamic procedurePrice; + dynamic patientShare; + dynamic companyShare; + dynamic totalPatientShare; + dynamic totalCompanyShare; + dynamic totalShare; + dynamic discountAmount; + dynamic vATPercentage; + dynamic patientVATAmount; + dynamic companyVATAmount; + dynamic totalVATAmount; + dynamic price; + int? patientID; + String? patientName; + dynamic patientNameN; + String? nationalityID; + String? doctorName; + dynamic doctorNameN; + int? clinicID; + String? clinicDescription; + dynamic clinicDescriptionN; + String? appointmentDate; + int? appointmentNo; + String? insuranceID; + int? companyID; + String? companyName; + dynamic companyNameN; + String? companyAddress; + dynamic companyAddressN; + String? companyGroupAddress; + String? groupName; + dynamic groupNameN; + String? patientAddress; + String? vATNo; + String? paymentDate; + String? projectName; + dynamic totalDiscount; + dynamic totalPatientShareWithQuantity; + String? legalName; + dynamic legalNameN; + dynamic advanceAdjustment; + String? doctorImageURL; + List? listConsultation; + + ListEInvoiceForDental( + {this.projectID, + this.doctorID, + this.grandTotal, + this.quantity, + this.total, + this.discount, + this.subTotal, + this.invoiceNo, + this.createdOn, + this.procedureID, + this.procedureName, + this.procedureNameN, + this.procedurePrice, + this.patientShare, + this.companyShare, + this.totalPatientShare, + this.totalCompanyShare, + this.totalShare, + this.discountAmount, + this.vATPercentage, + this.patientVATAmount, + this.companyVATAmount, + this.totalVATAmount, + this.price, + this.patientID, + this.patientName, + this.patientNameN, + this.nationalityID, + this.doctorName, + this.doctorNameN, + this.clinicID, + this.clinicDescription, + this.clinicDescriptionN, + this.appointmentDate, + this.appointmentNo, + this.insuranceID, + this.companyID, + this.companyName, + this.companyNameN, + this.companyAddress, + this.companyAddressN, + this.companyGroupAddress, + this.groupName, + this.groupNameN, + this.patientAddress, + this.vATNo, + this.paymentDate, + this.projectName, + this.totalDiscount, + this.totalPatientShareWithQuantity, + this.legalName, + this.legalNameN, + this.advanceAdjustment, + this.doctorImageURL, + this.listConsultation}); + + ListEInvoiceForDental.fromJson(Map json) { + projectID = json['ProjectID']; + doctorID = json['DoctorID']; + grandTotal = json['GrandTotal']; + quantity = json['Quantity']; + total = json['Total']; + discount = json['Discount']; + subTotal = json['SubTotal']; + invoiceNo = json['InvoiceNo']; + createdOn = json['CreatedOn']; + procedureID = json['ProcedureID']; + procedureName = json['ProcedureName']; + procedureNameN = json['ProcedureNameN']; + procedurePrice = json['ProcedurePrice']; + patientShare = json['PatientShare']; + companyShare = json['CompanyShare']; + totalPatientShare = json['TotalPatientShare']; + totalCompanyShare = json['TotalCompanyShare']; + totalShare = json['TotalShare']; + discountAmount = json['DiscountAmount']; + vATPercentage = json['VATPercentage']; + patientVATAmount = json['PatientVATAmount']; + companyVATAmount = json['CompanyVATAmount']; + totalVATAmount = json['TotalVATAmount']; + price = json['Price']; + patientID = json['PatientID']; + patientName = json['PatientName']; + patientNameN = json['PatientNameN']; + nationalityID = json['NationalityID']; + doctorName = json['DoctorName']; + doctorNameN = json['DoctorNameN']; + clinicID = json['ClinicID']; + clinicDescription = json['ClinicDescription']; + clinicDescriptionN = json['ClinicDescriptionN']; + appointmentDate = json['AppointmentDate']; + appointmentNo = json['AppointmentNo']; + insuranceID = json['InsuranceID']; + companyID = json['CompanyID']; + companyName = json['CompanyName']; + companyNameN = json['CompanyNameN']; + companyAddress = json['CompanyAddress']; + companyAddressN = json['CompanyAddressN']; + companyGroupAddress = json['CompanyGroupAddress']; + groupName = json['GroupName']; + groupNameN = json['GroupNameN']; + patientAddress = json['PatientAddress']; + vATNo = json['VATNo']; + paymentDate = json['PaymentDate']; + projectName = json['ProjectName']; + totalDiscount = json['TotalDiscount']; + totalPatientShareWithQuantity = json['TotalPatientShareWithQuantity']; + legalName = json['LegalName']; + legalNameN = json['LegalNameN']; + advanceAdjustment = json['AdvanceAdjustment']; + doctorImageURL = json['DoctorImageURL']; + if (json['listConsultation'] != null) { + listConsultation =[]; + json['listConsultation'].forEach((v) { + listConsultation!.add(new ListConsultation.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + data['DoctorID'] = this.doctorID; + data['GrandTotal'] = this.grandTotal; + data['Quantity'] = this.quantity; + data['Total'] = this.total; + data['Discount'] = this.discount; + data['SubTotal'] = this.subTotal; + data['InvoiceNo'] = this.invoiceNo; + data['CreatedOn'] = this.createdOn; + data['ProcedureID'] = this.procedureID; + data['ProcedureName'] = this.procedureName; + data['ProcedureNameN'] = this.procedureNameN; + data['ProcedurePrice'] = this.procedurePrice; + data['PatientShare'] = this.patientShare; + data['CompanyShare'] = this.companyShare; + data['TotalPatientShare'] = this.totalPatientShare; + data['TotalCompanyShare'] = this.totalCompanyShare; + data['TotalShare'] = this.totalShare; + data['DiscountAmount'] = this.discountAmount; + data['VATPercentage'] = this.vATPercentage; + data['PatientVATAmount'] = this.patientVATAmount; + data['CompanyVATAmount'] = this.companyVATAmount; + data['TotalVATAmount'] = this.totalVATAmount; + data['Price'] = this.price; + data['PatientID'] = this.patientID; + data['PatientName'] = this.patientName; + data['PatientNameN'] = this.patientNameN; + data['NationalityID'] = this.nationalityID; + data['DoctorName'] = this.doctorName; + data['DoctorNameN'] = this.doctorNameN; + data['ClinicID'] = this.clinicID; + data['ClinicDescription'] = this.clinicDescription; + data['ClinicDescriptionN'] = this.clinicDescriptionN; + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentNo'] = this.appointmentNo; + data['InsuranceID'] = this.insuranceID; + data['CompanyID'] = this.companyID; + data['CompanyName'] = this.companyName; + data['CompanyNameN'] = this.companyNameN; + data['CompanyAddress'] = this.companyAddress; + data['CompanyAddressN'] = this.companyAddressN; + data['CompanyGroupAddress'] = this.companyGroupAddress; + data['GroupName'] = this.groupName; + data['GroupNameN'] = this.groupNameN; + data['PatientAddress'] = this.patientAddress; + data['VATNo'] = this.vATNo; + data['PaymentDate'] = this.paymentDate; + data['ProjectName'] = this.projectName; + data['TotalDiscount'] = this.totalDiscount; + data['TotalPatientShareWithQuantity'] = this.totalPatientShareWithQuantity; + data['LegalName'] = this.legalName; + data['LegalNameN'] = this.legalNameN; + data['AdvanceAdjustment'] = this.advanceAdjustment; + data['DoctorImageURL'] = this.doctorImageURL; + if (this.listConsultation != null) { + data['listConsultation'] = this.listConsultation!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class ListConsultation { + dynamic projectID; + dynamic doctorID; + dynamic grandTotal; + dynamic quantity; + dynamic total; + dynamic discount; + dynamic subTotal; + dynamic invoiceNo; + dynamic createdOn; + String? procedureID; + String? procedureName; + dynamic procedureNameN; + dynamic procedurePrice; + dynamic patientShare; + dynamic companyShare; + dynamic totalPatientShare; + dynamic totalCompanyShare; + dynamic totalShare; + dynamic discountAmount; + dynamic vATPercentage; + dynamic patientVATAmount; + dynamic companyVATAmount; + dynamic totalVATAmount; + dynamic price; + dynamic patientID; + dynamic patientName; + dynamic patientNameN; + dynamic nationalityID; + dynamic doctorName; + dynamic doctorNameN; + dynamic clinicID; + dynamic clinicDescription; + dynamic clinicDescriptionN; + dynamic appointmentDate; + dynamic appointmentNo; + dynamic insuranceID; + dynamic companyID; + dynamic companyName; + dynamic companyNameN; + dynamic companyAddress; + dynamic companyAddressN; + dynamic companyGroupAddress; + dynamic groupName; + dynamic groupNameN; + dynamic patientAddress; + String? vATNo; + dynamic paymentDate; + dynamic projectName; + dynamic totalDiscount; + dynamic totalPatientShareWithQuantity; + dynamic legalName; + dynamic legalNameN; + dynamic advanceAdjustment; + + ListConsultation( + {this.projectID, + this.doctorID, + this.grandTotal, + this.quantity, + this.total, + this.discount, + this.subTotal, + this.invoiceNo, + this.createdOn, + this.procedureID, + this.procedureName, + this.procedureNameN, + this.procedurePrice, + this.patientShare, + this.companyShare, + this.totalPatientShare, + this.totalCompanyShare, + this.totalShare, + this.discountAmount, + this.vATPercentage, + this.patientVATAmount, + this.companyVATAmount, + this.totalVATAmount, + this.price, + this.patientID, + this.patientName, + this.patientNameN, + this.nationalityID, + this.doctorName, + this.doctorNameN, + this.clinicID, + this.clinicDescription, + this.clinicDescriptionN, + this.appointmentDate, + this.appointmentNo, + this.insuranceID, + this.companyID, + this.companyName, + this.companyNameN, + this.companyAddress, + this.companyAddressN, + this.companyGroupAddress, + this.groupName, + this.groupNameN, + this.patientAddress, + this.vATNo, + this.paymentDate, + this.projectName, + this.totalDiscount, + this.totalPatientShareWithQuantity, + this.legalName, + this.legalNameN, + this.advanceAdjustment}); + + ListConsultation.fromJson(Map json) { + projectID = json['ProjectID']; + doctorID = json['DoctorID']; + grandTotal = json['GrandTotal']; + quantity = json['Quantity']; + total = json['Total']; + discount = json['Discount']; + subTotal = json['SubTotal']; + invoiceNo = json['InvoiceNo']; + createdOn = json['CreatedOn']; + procedureID = json['ProcedureID']; + procedureName = json['ProcedureName']; + procedureNameN = json['ProcedureNameN']; + procedurePrice = json['ProcedurePrice']; + patientShare = json['PatientShare']; + companyShare = json['CompanyShare']; + totalPatientShare = json['TotalPatientShare']; + totalCompanyShare = json['TotalCompanyShare']; + totalShare = json['TotalShare']; + discountAmount = json['DiscountAmount']; + vATPercentage = json['VATPercentage']; + patientVATAmount = json['PatientVATAmount']; + companyVATAmount = json['CompanyVATAmount']; + totalVATAmount = json['TotalVATAmount']; + price = json['Price']; + patientID = json['PatientID']; + patientName = json['PatientName']; + patientNameN = json['PatientNameN']; + nationalityID = json['NationalityID']; + doctorName = json['DoctorName']; + doctorNameN = json['DoctorNameN']; + clinicID = json['ClinicID']; + clinicDescription = json['ClinicDescription']; + clinicDescriptionN = json['ClinicDescriptionN']; + appointmentDate = json['AppointmentDate']; + appointmentNo = json['AppointmentNo']; + insuranceID = json['InsuranceID']; + companyID = json['CompanyID']; + companyName = json['CompanyName']; + companyNameN = json['CompanyNameN']; + companyAddress = json['CompanyAddress']; + companyAddressN = json['CompanyAddressN']; + companyGroupAddress = json['CompanyGroupAddress']; + groupName = json['GroupName']; + groupNameN = json['GroupNameN']; + patientAddress = json['PatientAddress']; + vATNo = json['VATNo']; + paymentDate = json['PaymentDate']; + projectName = json['ProjectName']; + totalDiscount = json['TotalDiscount']; + totalPatientShareWithQuantity = json['TotalPatientShareWithQuantity']; + legalName = json['LegalName']; + legalNameN = json['LegalNameN']; + advanceAdjustment = json['AdvanceAdjustment']; + } + + Map toJson() { + final Map data = new Map(); + data['ProjectID'] = this.projectID; + data['DoctorID'] = this.doctorID; + data['GrandTotal'] = this.grandTotal; + data['Quantity'] = this.quantity; + data['Total'] = this.total; + data['Discount'] = this.discount; + data['SubTotal'] = this.subTotal; + data['InvoiceNo'] = this.invoiceNo; + data['CreatedOn'] = this.createdOn; + data['ProcedureID'] = this.procedureID; + data['ProcedureName'] = this.procedureName; + data['ProcedureNameN'] = this.procedureNameN; + data['ProcedurePrice'] = this.procedurePrice; + data['PatientShare'] = this.patientShare; + data['CompanyShare'] = this.companyShare; + data['TotalPatientShare'] = this.totalPatientShare; + data['TotalCompanyShare'] = this.totalCompanyShare; + data['TotalShare'] = this.totalShare; + data['DiscountAmount'] = this.discountAmount; + data['VATPercentage'] = this.vATPercentage; + data['PatientVATAmount'] = this.patientVATAmount; + data['CompanyVATAmount'] = this.companyVATAmount; + data['TotalVATAmount'] = this.totalVATAmount; + data['Price'] = this.price; + data['PatientID'] = this.patientID; + data['PatientName'] = this.patientName; + data['PatientNameN'] = this.patientNameN; + data['NationalityID'] = this.nationalityID; + data['DoctorName'] = this.doctorName; + data['DoctorNameN'] = this.doctorNameN; + data['ClinicID'] = this.clinicID; + data['ClinicDescription'] = this.clinicDescription; + data['ClinicDescriptionN'] = this.clinicDescriptionN; + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentNo'] = this.appointmentNo; + data['InsuranceID'] = this.insuranceID; + data['CompanyID'] = this.companyID; + data['CompanyName'] = this.companyName; + data['CompanyNameN'] = this.companyNameN; + data['CompanyAddress'] = this.companyAddress; + data['CompanyAddressN'] = this.companyAddressN; + data['CompanyGroupAddress'] = this.companyGroupAddress; + data['GroupName'] = this.groupName; + data['GroupNameN'] = this.groupNameN; + data['PatientAddress'] = this.patientAddress; + data['VATNo'] = this.vATNo; + data['PaymentDate'] = this.paymentDate; + data['ProjectName'] = this.projectName; + data['TotalDiscount'] = this.totalDiscount; + data['TotalPatientShareWithQuantity'] = this.totalPatientShareWithQuantity; + data['LegalName'] = this.legalName; + data['LegalNameN'] = this.legalNameN; + data['AdvanceAdjustment'] = this.advanceAdjustment; + return data; + } +} diff --git a/lib/models/MyInvoices/GetDentalAppointmentsResponse.dart b/lib/models/MyInvoices/GetDentalAppointmentsResponse.dart new file mode 100644 index 00000000..e0f39619 --- /dev/null +++ b/lib/models/MyInvoices/GetDentalAppointmentsResponse.dart @@ -0,0 +1,113 @@ +class GetDentalAppointmentsResponse { + List? listDentalAppointments; + + GetDentalAppointmentsResponse({this.listDentalAppointments}); + + GetDentalAppointmentsResponse.fromJson(Map json) { + if (json['List_DentalAppointments'] != null) { + listDentalAppointments = []; + json['List_DentalAppointments'].forEach((v) { + listDentalAppointments!.add(new ListDentalAppointments.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + if (this.listDentalAppointments != null) { + data['List_DentalAppointments'] = + this.listDentalAppointments!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class ListDentalAppointments { + String? setupId; + int? projectID; + int? patientID; + int? appointmentNo; + String? appointmentDate; + dynamic appointmentDateN; + int? clinicID; + int? doctorID; + int? invoiceNo; + int? status; + String? arrivedOn; + dynamic doctorName; + String? doctorNameN; + String? clinicName; + dynamic decimalDoctorRate; + String? doctorImageURL; + dynamic doctorRate; + int? patientNumber; + String? projectName; + + ListDentalAppointments( + {this.setupId, + this.projectID, + this.patientID, + this.appointmentNo, + this.appointmentDate, + this.appointmentDateN, + this.clinicID, + this.doctorID, + this.invoiceNo, + this.status, + this.arrivedOn, + this.doctorName, + this.doctorNameN, + this.clinicName, + this.decimalDoctorRate, + this.doctorImageURL, + this.doctorRate, + this.patientNumber, + this.projectName}); + + ListDentalAppointments.fromJson(Map json) { + setupId = json['SetupId']; + projectID = json['ProjectID']; + patientID = json['PatientID']; + appointmentNo = json['AppointmentNo']; + appointmentDate = json['AppointmentDate']; + appointmentDateN = json['AppointmentDateN']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + invoiceNo = json['InvoiceNo']; + status = json['Status']; + arrivedOn = json['ArrivedOn']; + doctorName = json['DoctorName']; + doctorNameN = json['DoctorNameN']; + clinicName = json['ClinicName']; + decimalDoctorRate = json['DecimalDoctorRate']; + doctorImageURL = json['DoctorImageURL']; + doctorRate = json['DoctorRate']; + patientNumber = json['PatientNumber']; + projectName = json['ProjectName']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupId'] = this.setupId; + data['ProjectID'] = this.projectID; + data['PatientID'] = this.patientID; + data['AppointmentNo'] = this.appointmentNo; + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentDateN'] = this.appointmentDateN; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['InvoiceNo'] = this.invoiceNo; + data['Status'] = this.status; + data['ArrivedOn'] = this.arrivedOn; + data['DoctorName'] = this.doctorName; + data['DoctorNameN'] = this.doctorNameN; + data['ClinicName'] = this.clinicName; + data['DecimalDoctorRate'] = this.decimalDoctorRate; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorRate'] = this.doctorRate; + data['PatientNumber'] = this.patientNumber; + data['ProjectName'] = this.projectName; + return data; + } +} + diff --git a/lib/models/Request.dart b/lib/models/Request.dart new file mode 100644 index 00000000..a4cef77b --- /dev/null +++ b/lib/models/Request.dart @@ -0,0 +1,34 @@ +class Request { + var ClinicID; + var PatientOutSA; + var PatientID; + var ProjectID; + var LanguageID; + var DeviceTypeID; + var DeviceType; + var AppointmentNo; + var IPAdress; + var VersionID; + var Channel; + var PatientTypeID; + var PatientType; + var isDentalAllowedBackend; + var IsIrisPrescription; + var TokenID; + var SessionID; + var PatientIdentificationID; + var PatientMobileNumber; + var BookedBy; + var Latitude; + var Longitude; + var OutSA; + var Note; + var IsActiveAppointment; + var RequestType; + var InvoiceNo; + var EncounterType; + var generalid; + var ServiceID; + var StrAppointmentDate; + var SKU; +} \ No newline at end of file diff --git a/lib/models/SmartWatch/HealthData.dart b/lib/models/SmartWatch/HealthData.dart new file mode 100644 index 00000000..90a7e23d --- /dev/null +++ b/lib/models/SmartWatch/HealthData.dart @@ -0,0 +1,33 @@ +class healthData { + int? MedCategoryID; + int? MedSubCategoryID; + String? MachineDate; + double? Value; + int? TransactionsListID; + + healthData({ + this.MedCategoryID, + this.MedSubCategoryID, + this.MachineDate, + this.Value, + this.TransactionsListID + }); + + healthData.fromJson(Map json) { + MedCategoryID = json['MedCategoryID']; + MedSubCategoryID = json['MedSubCategoryID']; + MachineDate = json['MachineDate']; + Value = json['Value']; + TransactionsListID = json['TransactionsListID']; + } + + Map toJson() { + final Map data = new Map(); + data['MedCategoryID'] = this.MedCategoryID; + data['MedSubCategoryID'] = this.MedSubCategoryID; + data['MachineDate'] = this.MachineDate; + data['Value'] = this.Value; + data['TransactionsListID'] = this.TransactionsListID; + return data; + } +} \ No newline at end of file diff --git a/lib/models/SmartWatch/WeeklyHeartRateResModel.dart b/lib/models/SmartWatch/WeeklyHeartRateResModel.dart new file mode 100644 index 00000000..26341ee0 --- /dev/null +++ b/lib/models/SmartWatch/WeeklyHeartRateResModel.dart @@ -0,0 +1,26 @@ +class WeeklyHeartRateResModel { + num? valueAvg; + String? machineDate; + int? medCategoryID; + int? patientID; + + WeeklyHeartRateResModel( + {this.valueAvg, this.machineDate, this.medCategoryID, this.patientID}); + + WeeklyHeartRateResModel.fromJson(Map json) { + num value = json['ValueAvg'] != null ? json['ValueAvg'] : 0.0; + valueAvg = json['ValueAvg'] != null ? value.toInt() : 0; + machineDate = json['MachineDate']; + medCategoryID = json['MedCategoryID']; + patientID = json['PatientID']; + } + + Map toJson() { + final Map data = new Map(); + data['ValueAvg'] = this.valueAvg; + data['MachineDate'] = this.machineDate; + data['MedCategoryID'] = this.medCategoryID; + data['PatientID'] = this.patientID; + return data; + } +} diff --git a/lib/models/SmartWatch/WeeklyStepsResModel.dart b/lib/models/SmartWatch/WeeklyStepsResModel.dart new file mode 100644 index 00000000..e2af2dbd --- /dev/null +++ b/lib/models/SmartWatch/WeeklyStepsResModel.dart @@ -0,0 +1,42 @@ +class WeeklyStepsResModel { + int? iD; + int? patientID; + int? medCategoryID; + int? medSubCategoryID; + num? value; + String? machineDate; + bool? patientOutSA; + dynamic notes; + bool? isActive; + String? createdOn; + + WeeklyStepsResModel({this.iD, this.patientID, this.medCategoryID, this.medSubCategoryID, this.value, this.machineDate, this.patientOutSA, this.notes, this.isActive, this.createdOn}); + + WeeklyStepsResModel.fromJson(Map json) { + iD = json['ID']; + patientID = json['PatientID']; + medCategoryID = json['MedCategoryID']; + medSubCategoryID = json['MedSubCategoryID']; + value = json['Value'] != null ? num.tryParse(json['Value'])!.toInt() : 0; + machineDate = json['MachineDate']; + patientOutSA = json['PatientOutSA']; + notes = json['Notes']; + isActive = json['IsActive']; + createdOn = json['CreatedOn']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['PatientID'] = this.patientID; + data['MedCategoryID'] = this.medCategoryID; + data['MedSubCategoryID'] = this.medSubCategoryID; + data['Value'] = this.value; + data['MachineDate'] = this.machineDate; + data['PatientOutSA'] = this.patientOutSA; + data['Notes'] = this.notes; + data['IsActive'] = this.isActive; + data['CreatedOn'] = this.createdOn; + return data; + } +} diff --git a/lib/models/SmartWatch/YearlyHeartRateResModel.dart b/lib/models/SmartWatch/YearlyHeartRateResModel.dart new file mode 100644 index 00000000..3d81ff2c --- /dev/null +++ b/lib/models/SmartWatch/YearlyHeartRateResModel.dart @@ -0,0 +1,37 @@ +class YearlyHeartRateResModel { + dynamic? valueAvg; + int? medCategoryID; + int? month; + String? monthName; + int? patientID; + int? year; + + YearlyHeartRateResModel( + {this.valueAvg, + this.medCategoryID, + this.month, + this.monthName, + this.patientID, + this.year}); + + YearlyHeartRateResModel.fromJson(Map json) { + num value = json['ValueAvg'] != null ? json['ValueAvg'] : 0.0; + valueAvg = json['ValueAvg'] != null ? value.toInt() : 0; + medCategoryID = json['MedCategoryID']; + month = json['Month']; + monthName = json['MonthName']; + patientID = json['PatientID']; + year = json['Year']; + } + + Map toJson() { + final Map data = new Map(); + data['ValueAvg'] = this.valueAvg; + data['MedCategoryID'] = this.medCategoryID; + data['Month'] = this.month; + data['MonthName'] = this.monthName; + data['PatientID'] = this.patientID; + data['Year'] = this.year; + return data; + } +} diff --git a/lib/models/SmartWatch/YearlyStepsResModel.dart b/lib/models/SmartWatch/YearlyStepsResModel.dart new file mode 100644 index 00000000..13392105 --- /dev/null +++ b/lib/models/SmartWatch/YearlyStepsResModel.dart @@ -0,0 +1,37 @@ +class YearlyStepsResModel { + num? valueSum; + int? medCategoryID; + int? month; + String? monthName; + int? patientID; + int? year; + + YearlyStepsResModel( + {this.valueSum, + this.medCategoryID, + this.month, + this.monthName, + this.patientID, + this.year}); + + YearlyStepsResModel.fromJson(Map json) { + valueSum = json['ValueSum']; + medCategoryID = json['MedCategoryID']; + month = json['Month']; + monthName = json['MonthName']; + patientID = json['PatientID']; + year = json['Year']; + valueSum = valueSum != null ? valueSum!.toInt() : valueSum; + } + + Map toJson() { + final Map data = new Map(); + data['ValueSum'] = this.valueSum; + data['MedCategoryID'] = this.medCategoryID; + data['Month'] = this.month; + data['MonthName'] = this.monthName; + data['PatientID'] = this.patientID; + data['Year'] = this.year; + return data; + } +} diff --git a/lib/models/ambulanceRequest/locationDetails.dart b/lib/models/ambulanceRequest/locationDetails.dart new file mode 100644 index 00000000..6971da33 --- /dev/null +++ b/lib/models/ambulanceRequest/locationDetails.dart @@ -0,0 +1,23 @@ +class LocationDetails { + double? _lat; + double? _long; + String? _formattedAddress; + + double get lat => _lat!; + + set lat(double lat) { + _lat = lat; + } + + double get long => _long!; + + set long(double long) { + _long = long; + } + + String? get formattedAddress => _formattedAddress; + + set formattedAddress(String? formattedAddress) { + _formattedAddress = formattedAddress; + } +} diff --git a/lib/models/anicllary-orders/ancillary_order_list_model.dart b/lib/models/anicllary-orders/ancillary_order_list_model.dart new file mode 100644 index 00000000..9aefe844 --- /dev/null +++ b/lib/models/anicllary-orders/ancillary_order_list_model.dart @@ -0,0 +1,105 @@ +class AncillaryOrdersListModel { + List? ancillaryOrderList; + dynamic errCode; + String? message; + int? patientID; + String? patientName; + int? patientType; + int? projectID; + String? projectName; + String? setupID; + int? statusCode; + + AncillaryOrdersListModel( + {this.ancillaryOrderList, + this.errCode, + this.message, + this.patientID, + this.patientName, + this.patientType, + this.projectID, + this.projectName, + this.setupID, + this.statusCode}); + + AncillaryOrdersListModel.fromJson(Map json) { + if (json['AncillaryOrderList'] != null) { + ancillaryOrderList =[]; + json['AncillaryOrderList'].forEach((v) { + ancillaryOrderList!.add(new AncillaryOrderList.fromJson(v)); + }); + } + errCode = json['ErrCode']; + message = json['Message']; + patientID = json['PatientID']; + patientName = json['PatientName'] != null ? json['PatientName'] : ""; + patientType = json['PatientType']; + projectID = json['ProjectID']; + projectName = json['ProjectName']; + setupID = json['SetupID']; + statusCode = json['StatusCode']; + } + + Map toJson() { + final Map data = new Map(); + if (this.ancillaryOrderList != null) { + data['AncillaryOrderList'] = + this.ancillaryOrderList!.map((v) => v.toJson()).toList(); + } + data['ErrCode'] = this.errCode; + data['Message'] = this.message; + data['PatientID'] = this.patientID; + data['PatientName'] = this.patientName; + data['PatientType'] = this.patientType; + data['ProjectID'] = this.projectID; + data['ProjectName'] = this.projectName; + data['SetupID'] = this.setupID; + data['StatusCode'] = this.statusCode; + return data; + } +} + +class AncillaryOrderList { + String? appointmentDate; + int? appointmentNo; + int? clinicID; + String? clinicName; + int? doctorID; + String? doctorName; + String? orderDate; + int? orderNo; + + AncillaryOrderList( + {this.appointmentDate, + this.appointmentNo, + this.clinicID, + this.clinicName, + this.doctorID, + this.doctorName, + this.orderDate, + this.orderNo}); + + AncillaryOrderList.fromJson(Map json) { + appointmentDate = json['AppointmentDate']; + appointmentNo = json['AppointmentNo']; + clinicID = json['ClinicID']; + clinicName = json['ClinicName'] != null ? json['ClinicName'] : ""; + doctorID = json['DoctorID']; + doctorName = json['DoctorName']; + orderDate = json['OrderDate']; + orderNo = json['OrderNo']; + } + + Map toJson() { + final Map data = new Map(); + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentNo'] = this.appointmentNo; + data['ClinicID'] = this.clinicID; + data['ClinicName'] = this.clinicName; + data['DoctorID'] = this.doctorID; + data['DoctorName'] = this.doctorName; + data['OrderDate'] = this.orderDate; + data['OrderNo'] = this.orderNo; + return data; + } +} diff --git a/lib/models/anicllary-orders/ancillary_order_proc_model.dart b/lib/models/anicllary-orders/ancillary_order_proc_model.dart new file mode 100644 index 00000000..451d775e --- /dev/null +++ b/lib/models/anicllary-orders/ancillary_order_proc_model.dart @@ -0,0 +1,250 @@ +class AncillaryOrdersListProcListModel { + List? ancillaryOrderProcDetailsList; + String? appointmentDate; + int? appointmentNo; + int? clinicID; + String? clinicName; + int? companyID; + String? companyName; + int? doctorID; + String? doctorName; + dynamic errCode; + int? groupID; + String? insurancePolicyNo; + String? message; + String? patientCardID; + int? patientID; + String? patientName; + int? patientType; + int? policyID; + String? policyName; + int? projectID; + String? setupID; + int? statusCode; + int? subCategoryID; + String? subPolicyNo; + + AncillaryOrdersListProcListModel( + {this.ancillaryOrderProcDetailsList, + this.appointmentDate, + this.appointmentNo, + this.clinicID, + this.clinicName, + this.companyID, + this.companyName, + this.doctorID, + this.doctorName, + this.errCode, + this.groupID, + this.insurancePolicyNo, + this.message, + this.patientCardID, + this.patientID, + this.patientName, + this.patientType, + this.policyID, + this.policyName, + this.projectID, + this.setupID, + this.statusCode, + this.subCategoryID, + this.subPolicyNo}); + + AncillaryOrdersListProcListModel.fromJson(Map json) { + if (json['AncillaryOrderProcDetailsList'] != null) { + ancillaryOrderProcDetailsList = []; + json['AncillaryOrderProcDetailsList'].forEach((v) { + ancillaryOrderProcDetailsList! + .add(new AncillaryOrderProcDetailsList.fromJson(v)); + }); + } + appointmentDate = json['AppointmentDate']; + appointmentNo = json['AppointmentNo']; + clinicID = json['ClinicID']; + clinicName = json['ClinicName']; + companyID = json['CompanyID']; + companyName = json['CompanyName']; + doctorID = json['DoctorID']; + doctorName = json['DoctorName']; + errCode = json['ErrCode']; + groupID = json['GroupID']; + insurancePolicyNo = json['InsurancePolicyNo']; + message = json['Message']; + patientCardID = json['PatientCardID']; + patientID = json['PatientID']; + patientName = json['PatientName']; + patientType = json['PatientType']; + policyID = json['PolicyID']; + policyName = json['PolicyName']; + projectID = json['ProjectID']; + setupID = json['SetupID']; + statusCode = json['StatusCode']; + subCategoryID = json['SubCategoryID']; + subPolicyNo = json['SubPolicyNo']; + } + + Map toJson() { + final Map data = new Map(); + if (this.ancillaryOrderProcDetailsList != null) { + data['AncillaryOrderProcDetailsList'] = + this.ancillaryOrderProcDetailsList!.map((v) => v.toJson()).toList(); + } + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentNo'] = this.appointmentNo; + data['ClinicID'] = this.clinicID; + data['ClinicName'] = this.clinicName; + data['CompanyID'] = this.companyID; + data['CompanyName'] = this.companyName; + data['DoctorID'] = this.doctorID; + data['DoctorName'] = this.doctorName; + data['ErrCode'] = this.errCode; + data['GroupID'] = this.groupID; + data['InsurancePolicyNo'] = this.insurancePolicyNo; + data['Message'] = this.message; + data['PatientCardID'] = this.patientCardID; + data['PatientID'] = this.patientID; + data['PatientName'] = this.patientName; + data['PatientType'] = this.patientType; + data['PolicyID'] = this.policyID; + data['PolicyName'] = this.policyName; + data['ProjectID'] = this.projectID; + data['SetupID'] = this.setupID; + data['StatusCode'] = this.statusCode; + data['SubCategoryID'] = this.subCategoryID; + data['SubPolicyNo'] = this.subPolicyNo; + return data; + } +} + +class AncillaryOrderProcDetailsList { + dynamic approvalLineItemNo; + dynamic approvalNo; + String? approvalStatus; + dynamic approvalStatusID; + dynamic companyShare; + dynamic companyShareWithTax; + dynamic companyTaxAmount; + dynamic discountAmount; + dynamic discountCategory; + String? discountType; + dynamic discountTypeValue; + bool? isApprovalCreated; + bool? isApprovalRequired; + bool? isCovered; + String? orderDate; + dynamic orderLineItemNo; + dynamic orderNo; + dynamic partnerID; + dynamic partnerShare; + String? partnerShareType; + dynamic patientShare; + dynamic patientShareWithTax; + dynamic patientTaxAmount; + dynamic procPrice; + dynamic procedureCategoryID; + String? procedureCategoryName; + String? procedureID; + String? procedureName; + dynamic taxAmount; + dynamic taxPct; + + AncillaryOrderProcDetailsList( + {this.approvalLineItemNo, + this.approvalNo, + this.approvalStatus, + this.approvalStatusID, + this.companyShare, + this.companyShareWithTax, + this.companyTaxAmount, + this.discountAmount, + this.discountCategory, + this.discountType, + this.discountTypeValue, + this.isApprovalCreated, + this.isApprovalRequired, + this.isCovered, + this.orderDate, + this.orderLineItemNo, + this.orderNo, + this.partnerID, + this.partnerShare, + this.partnerShareType, + this.patientShare, + this.patientShareWithTax, + this.patientTaxAmount, + this.procPrice, + this.procedureCategoryID, + this.procedureCategoryName, + this.procedureID, + this.procedureName, + this.taxAmount, + this.taxPct}); + + AncillaryOrderProcDetailsList.fromJson(Map json) { + approvalLineItemNo = json['ApprovalLineItemNo']; + approvalNo = json['ApprovalNo']; + approvalStatus = json['ApprovalStatus']; + approvalStatusID = json['ApprovalStatusID']; + companyShare = json['CompanyShare']; + companyShareWithTax = json['CompanyShareWithTax']; + companyTaxAmount = json['CompanyTaxAmount']; + discountAmount = json['DiscountAmount']; + discountCategory = json['DiscountCategory']; + discountType = json['DiscountType']; + discountTypeValue = json['DiscountTypeValue']; + isApprovalCreated = json['IsApprovalCreated']; + isApprovalRequired = json['IsApprovalRequired']; + isCovered = json['IsCovered']; + orderDate = json['OrderDate']; + orderLineItemNo = json['OrderLineItemNo']; + orderNo = json['OrderNo']; + partnerID = json['PartnerID']; + partnerShare = json['PartnerShare']; + partnerShareType = json['PartnerShareType']; + patientShare = json['PatientShare']; + patientShareWithTax = json['PatientShareWithTax']; + patientTaxAmount = json['PatientTaxAmount']; + procPrice = json['ProcPrice']; + procedureCategoryID = json['ProcedureCategoryID']; + procedureCategoryName = json['ProcedureCategoryName']; + procedureID = json['ProcedureID']; + procedureName = json['ProcedureName']; + taxAmount = json['TaxAmount']; + taxPct = json['TaxPct']; + } + + Map toJson() { + final Map data = new Map(); + data['ApprovalLineItemNo'] = this.approvalLineItemNo; + data['ApprovalNo'] = this.approvalNo; + data['ApprovalStatus'] = this.approvalStatus; + data['ApprovalStatusID'] = this.approvalStatusID; + data['CompanyShare'] = this.companyShare; + data['CompanyShareWithTax'] = this.companyShareWithTax; + data['CompanyTaxAmount'] = this.companyTaxAmount; + data['DiscountAmount'] = this.discountAmount; + data['DiscountCategory'] = this.discountCategory; + data['DiscountType'] = this.discountType; + data['DiscountTypeValue'] = this.discountTypeValue; + data['IsApprovalCreated'] = this.isApprovalCreated; + data['IsApprovalRequired'] = this.isApprovalRequired; + data['IsCovered'] = this.isCovered; + data['OrderDate'] = this.orderDate; + data['OrderLineItemNo'] = this.orderLineItemNo; + data['OrderNo'] = this.orderNo; + data['PartnerID'] = this.partnerID; + data['PartnerShare'] = this.partnerShare; + data['PartnerShareType'] = this.partnerShareType; + data['PatientShare'] = this.patientShare; + data['PatientShareWithTax'] = this.patientShareWithTax; + data['PatientTaxAmount'] = this.patientTaxAmount; + data['ProcPrice'] = this.procPrice; + data['ProcedureCategoryID'] = this.procedureCategoryID; + data['ProcedureCategoryName'] = this.procedureCategoryName; + data['ProcedureID'] = this.procedureID; + data['ProcedureName'] = this.procedureName; + data['TaxAmount'] = this.taxAmount; + data['TaxPct'] = this.taxPct; + return data; + } +} diff --git a/lib/models/anicllary-orders/ancillary_orders_proc_list.dart b/lib/models/anicllary-orders/ancillary_orders_proc_list.dart new file mode 100644 index 00000000..57a9f3bb --- /dev/null +++ b/lib/models/anicllary-orders/ancillary_orders_proc_list.dart @@ -0,0 +1,18 @@ +class AncillaryOrdersProcedureList { + int? procedureID; + String? procedureDescription; + + AncillaryOrdersProcedureList({this.procedureID, this.procedureDescription}); + + AncillaryOrdersProcedureList.fromJson(Map json) { + procedureID = json['ProcedureID']; + procedureDescription = json['ProcedureDescription']; + } + + Map toJson() { + final Map data = new Map(); + data['ProcedureID'] = this.procedureID; + data['ProcedureDescription'] = this.procedureDescription; + return data; + } +} diff --git a/lib/models/apple_pay_request.dart b/lib/models/apple_pay_request.dart new file mode 100644 index 00000000..f4880544 --- /dev/null +++ b/lib/models/apple_pay_request.dart @@ -0,0 +1,135 @@ +class ApplePayRequest { + String? currency; + String? language; + String? customername; + dynamic customerEmail; + String? orderdescription; + String? liveServiceid; + dynamic longitude; + dynamic latitude; + String? devicetoken; + String? clientrequestid; + String? projectid; + String? serviceid; + String? patientid; + String? amount; + String? appleData; + String? appleSignature; + AppleHeader? appleHeader; + ApplePaymentMethod? applePaymentMethod; + + ApplePayRequest( + {this.currency, + this.language, + this.customername, + this.customerEmail, + this.orderdescription, + this.liveServiceid, + this.longitude, + this.latitude, + this.devicetoken, + this.clientrequestid, + this.projectid, + this.serviceid, + this.patientid, + this.amount, + this.appleData, + this.appleSignature, + this.appleHeader, + this.applePaymentMethod}); + + ApplePayRequest.fromJson(Map json) { + currency = json['currency']; + language = json['language']; + customername = json['customername']; + customerEmail = json['customer_email']; + orderdescription = json['orderdescription']; + liveServiceid = json['live_serviceid']; + longitude = json['longitude']; + latitude = json['latitude']; + devicetoken = json['devicetoken']; + clientrequestid = json['clientrequestid']; + projectid = json['projectid']; + serviceid = json['serviceid']; + patientid = json['patientid']; + amount = json['Amount']; + appleData = json['apple_data']; + appleSignature = json['apple_signature']; + appleHeader = json['apple_header'] != null ? new AppleHeader.fromJson(json['apple_header']) : null; + applePaymentMethod = json['apple_paymentMethod'] != null ? new ApplePaymentMethod.fromJson(json['apple_paymentMethod']) : null; + } + + Map toJson() { + final Map data = new Map(); + data['currency'] = this.currency; + data['language'] = this.language; + data['customername'] = this.customername; + data['customer_email'] = this.customerEmail; + data['orderdescription'] = this.orderdescription; + data['live_serviceid'] = this.liveServiceid; + data['longitude'] = this.longitude; + data['latitude'] = this.latitude; + data['devicetoken'] = this.devicetoken; + data['clientrequestid'] = this.clientrequestid; + data['projectid'] = this.projectid; + data['serviceid'] = this.serviceid; + data['patientid'] = this.patientid; + data['Amount'] = this.amount; + data['apple_data'] = this.appleData; + data['apple_signature'] = this.appleSignature; + if (this.appleHeader != null) { + data['apple_header'] = this.appleHeader!.toJson(); + } + if (this.applePaymentMethod != null) { + data['apple_paymentMethod'] = this.applePaymentMethod!.toJson(); + } + return data; + } +} + +class AppleHeader { + String? appleApplicationData; + String? appleEphemeralPublicKey; + String? applePublicKeyHash; + String? appleTransactionId; + + AppleHeader({this.appleApplicationData, this.appleEphemeralPublicKey, this.applePublicKeyHash, this.appleTransactionId}); + + AppleHeader.fromJson(Map json) { + appleApplicationData = json['apple_applicationData']; + appleEphemeralPublicKey = json['apple_ephemeralPublicKey']; + applePublicKeyHash = json['apple_publicKeyHash']; + appleTransactionId = json['apple_transactionId']; + } + + Map toJson() { + final Map data = new Map(); + data['apple_applicationData'] = this.appleApplicationData; + data['apple_ephemeralPublicKey'] = this.appleEphemeralPublicKey; + data['apple_publicKeyHash'] = this.applePublicKeyHash; + data['apple_transactionId'] = this.appleTransactionId; + return data; + } +} + +class ApplePaymentMethod { + String? appleDisplayName; + String? appleNetwork; + String? appleType; + + ApplePaymentMethod({this.appleDisplayName, this.appleNetwork, this.appleType}); + + ApplePaymentMethod.fromJson(Map json) { + appleDisplayName = json['apple_displayName']; + appleNetwork = json['apple_network']; + appleType = json['apple_type']; + } + + Map toJson() { + final Map data = new Map(); + data['apple_displayName'] = this.appleDisplayName; + data['apple_network'] = this.appleNetwork; + data['apple_type'] = this.appleType; + return data; + } +} diff --git a/lib/models/apple_pay_response.dart b/lib/models/apple_pay_response.dart new file mode 100644 index 00000000..7628873e --- /dev/null +++ b/lib/models/apple_pay_response.dart @@ -0,0 +1,112 @@ +import 'dart:convert'; + +class ApplePayResponse { + PaymentMethod? paymentMethod; + dynamic billingContact; + dynamic shippingMethod; + dynamic shippingContact; + Token? token; + + ApplePayResponse( + {this.paymentMethod, + this.billingContact, + this.shippingMethod, + this.shippingContact, + this.token}); + + ApplePayResponse.fromJson(Map jsonValue) { + paymentMethod = jsonValue['paymentMethod'] != null + ? new PaymentMethod.fromJson(jsonValue['paymentMethod']) + : null; + // billingContact = json['billingContact'] != null ? json['billingContact'] : ""; + // shippingMethod = json['shippingMethod'] != null ? json['shippingMethod'] : ""; + // shippingContact = json['shippingContact'] != null ? json['shippingContact'] : ""; + token = jsonValue['token'] != null ? new Token.fromJson(json.decode(jsonValue['token'])) : null; + } + + Map toJson() { + final Map data = new Map(); + if (this.paymentMethod != null) { + data['paymentMethod'] = this.paymentMethod!.toJson(); + } + data['billingContact'] = this.billingContact; + data['shippingMethod'] = this.shippingMethod; + data['shippingContact'] = this.shippingContact; + if (this.token != null) { + data['token'] = this.token!.toJson(); + } + return data; + } +} + +class PaymentMethod { + dynamic network; + dynamic displayName; + dynamic type; + + PaymentMethod({this.network, this.displayName, this.type}); + + PaymentMethod.fromJson(Map json) { + network = json['network']; + displayName = json['displayName']; + type = json['type']; + } + + Map toJson() { + final Map data = new Map(); + data['network'] = this.network; + data['displayName'] = this.displayName; + data['type'] = this.type; + return data; + } +} + +class Token { + String? version; + String? data; + String? signature; + Header? header; + + Token({this.version, this.data, this.signature, this.header}); + + Token.fromJson(Map json) { + version = json['version']; + data = json['data']; + signature = json['signature']; + header = + json['header'] != null ? new Header.fromJson(json['header']) : null; + } + + Map toJson() { + final Map data = new Map(); + data['version'] = this.version; + data['data'] = this.data; + data['signature'] = this.signature; + if (this.header != null) { + data['header'] = this.header!.toJson(); + } + return data; + } +} + +class Header { + String? ephemeralPublicKey; + String? publicKeyHash; + String? transactionId; + + Header({this.ephemeralPublicKey, this.publicKeyHash, this.transactionId}); + + Header.fromJson(Map json) { + ephemeralPublicKey = json['ephemeralPublicKey']; + publicKeyHash = json['publicKeyHash']; + transactionId = json['transactionId']; + } + + Map toJson() { + final Map data = new Map(); + data['ephemeralPublicKey'] = this.ephemeralPublicKey; + data['publicKeyHash'] = this.publicKeyHash; + data['transactionId'] = this.transactionId; + return data; + } +} diff --git a/lib/models/get_dental_instructions_response_model.dart b/lib/models/get_dental_instructions_response_model.dart new file mode 100644 index 00000000..97ed424c --- /dev/null +++ b/lib/models/get_dental_instructions_response_model.dart @@ -0,0 +1,77 @@ +class GetDentalInstructionsResponseModel { + List? data; + dynamic message; + int? status; + + GetDentalInstructionsResponseModel({this.data, this.message, this.status}); + + GetDentalInstructionsResponseModel.fromJson(Map json) { + if (json['Data'] != null) { + data = []; + json['Data'].forEach((v) { + data!.add(new Data.fromJson(v)); + }); + } + message = json['message']; + status = json['status']; + } + + Map toJson() { + final Map data = new Map(); + if (this.data != null) { + data['Data'] = this.data!.map((v) => v.toJson()).toList(); + } + data['message'] = this.message; + data['status'] = this.status; + return data; + } +} + +class Data { + String? createdOn; + String? mobileNo; + int? patientId; + int? procedureId; + int? projectId; + String? setupId; + String? smsContent; + int? sourceReferenceNo; + String? sourceType; + + Data( + {this.createdOn, + this.mobileNo, + this.patientId, + this.procedureId, + this.projectId, + this.setupId, + this.smsContent, + this.sourceReferenceNo, + this.sourceType}); + + Data.fromJson(Map json) { + createdOn = json['createdOn']; + mobileNo = json['mobileNo']; + patientId = json['patientId']; + procedureId = json['procedureId']; + projectId = json['projectId']; + setupId = json['setupId']; + smsContent = json['smsContent']; + sourceReferenceNo = json['sourceReferenceNo']; + sourceType = json['sourceType']; + } + + Map toJson() { + final Map data = new Map(); + data['createdOn'] = this.createdOn; + data['mobileNo'] = this.mobileNo; + data['patientId'] = this.patientId; + data['procedureId'] = this.procedureId; + data['projectId'] = this.projectId; + data['setupId'] = this.setupId; + data['smsContent'] = this.smsContent; + data['sourceReferenceNo'] = this.sourceReferenceNo; + data['sourceType'] = this.sourceType; + return data; + } +} diff --git a/lib/models/gradient_color.dart b/lib/models/gradient_color.dart new file mode 100644 index 00000000..b2114b97 --- /dev/null +++ b/lib/models/gradient_color.dart @@ -0,0 +1,35 @@ +import 'package:flutter/material.dart'; + +class GradientColor { + Color darkColor; + Color lightColor; + + GradientColor(this.darkColor, this.lightColor); +} + +List bannerColor = [ + new GradientColor(Color(0xFFF2B353E), Color(0xFFF71787E)), + new GradientColor(Color(0xFFFD02127), Color(0xFFFEE6161)), + new GradientColor(Colors.blue[700]!, Colors.blue[400]!), + new GradientColor(Colors.yellow[700]!, Colors.yellow), + new GradientColor(Colors.orange[800]!, Colors.orange), + new GradientColor(Colors.green[800]!, Colors.green[500]!), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), + new GradientColor(Colors.brown[700]!, Colors.brown), +]; diff --git a/lib/models/header_model.dart b/lib/models/header_model.dart new file mode 100644 index 00000000..adfc8f8f --- /dev/null +++ b/lib/models/header_model.dart @@ -0,0 +1,19 @@ +class HeaderModel { + String doctorName; + int doctorId; + String doctorImageURL; + List speciality; + String invoiceNo; + String projectName; + DateTime? date; + String? time; + String nationalityFlagURL; + int? doctorRate; + int? actualDoctorRate; + int? totalReviews; + String decimalDoctorRate; + String email; + + HeaderModel(this.doctorName, this.doctorId, this.doctorImageURL, this.speciality, this.invoiceNo, this.projectName, this.date, this.time, this.nationalityFlagURL, this.doctorRate, + this.actualDoctorRate, this.totalReviews, this.email, {this.decimalDoctorRate = ""}); +} diff --git a/lib/models/hmg_services.dart b/lib/models/hmg_services.dart new file mode 100644 index 00000000..793800fa --- /dev/null +++ b/lib/models/hmg_services.dart @@ -0,0 +1,10 @@ +class HmgServices { + int action; + String title; + String subTitle; + String icon; + bool isLogin; + bool isLocked; + + HmgServices(this.action, this.title, this.subTitle, this.icon, this.isLogin, {this.isLocked = false}); +} diff --git a/lib/models/id-name-pair.dart b/lib/models/id-name-pair.dart new file mode 100644 index 00000000..00336572 --- /dev/null +++ b/lib/models/id-name-pair.dart @@ -0,0 +1,12 @@ +import 'package:flutter/material.dart'; + +class IdNamePair with ChangeNotifier{ + var id; + var name; + + IdNamePair(this.id, this.name); + + void updateData() { + notifyListeners(); + } +} \ No newline at end of file diff --git a/lib/models/insurance/getInsuranceCompaniesModel.dart b/lib/models/insurance/getInsuranceCompaniesModel.dart new file mode 100644 index 00000000..2aaef58e --- /dev/null +++ b/lib/models/insurance/getInsuranceCompaniesModel.dart @@ -0,0 +1,64 @@ +class InsuranceCompaniesGetModel { + String? setupID; + int? projectID; + int? companyID; + String? companyName; + String? companyNameN; + String? alias; + String? aliasN; + String? insurancePolicyNo; + String? phoneOffice1; + String? phoneOffice2; + String? faxNumber; + int? status; + String? contractExpiry; + + InsuranceCompaniesGetModel( + {this.setupID, + this.projectID, + this.companyID, + this.companyName, + this.companyNameN, + this.alias, + this.aliasN, + this.insurancePolicyNo, + this.phoneOffice1, + this.phoneOffice2, + this.faxNumber, + this.status, + this.contractExpiry}); + + InsuranceCompaniesGetModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + companyID = json['CompanyID']; + companyName = json['CompanyName']; + companyNameN = json['CompanyNameN']; + alias = json['Alias']; + aliasN = json['AliasN']; + insurancePolicyNo = json['InsurancePolicyNo']; + phoneOffice1 = json['PhoneOffice1']; + phoneOffice2 = json['PhoneOffice2']; + faxNumber = json['FaxNumber']; + status = json['Status']; + contractExpiry = json['ContractExpiry']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['CompanyID'] = this.companyID; + data['CompanyName'] = this.companyName; + data['CompanyNameN'] = this.companyNameN; + data['Alias'] = this.alias; + data['AliasN'] = this.aliasN; + data['InsurancePolicyNo'] = this.insurancePolicyNo; + data['PhoneOffice1'] = this.phoneOffice1; + data['PhoneOffice2'] = this.phoneOffice2; + data['FaxNumber'] = this.faxNumber; + data['Status'] = this.status; + data['ContractExpiry'] = this.contractExpiry; + return data; + } +} diff --git a/lib/models/insurance/insuranceCompaniesSchemeModel.dart b/lib/models/insurance/insuranceCompaniesSchemeModel.dart new file mode 100644 index 00000000..a8ad8b3a --- /dev/null +++ b/lib/models/insurance/insuranceCompaniesSchemeModel.dart @@ -0,0 +1,72 @@ +class InsuranceCompaniesSchemeModel { + String? setupID; + int? projectID; + int? companyID; + int? subCategoryID; + String? subCategoryDesc; + String? subCategoryDescN; + String? validFrom; + String? validTo; + var isInpatient; + int? roomCategory; + bool? isActive; + int? createdBy; + String? createdOn; + int? editedBy; + String? editedOn; + + InsuranceCompaniesSchemeModel( + {this.setupID, + this.projectID, + this.companyID, + this.subCategoryID, + this.subCategoryDesc, + this.subCategoryDescN, + this.validFrom, + this.validTo, + this.isInpatient, + this.roomCategory, + this.isActive, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn}); + + InsuranceCompaniesSchemeModel.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + companyID = json['CompanyID']; + subCategoryID = json['SubCategoryID']; + subCategoryDesc = json['SubCategoryDesc']; + subCategoryDescN = json['SubCategoryDescN']; + validFrom = json['ValidFrom']; + validTo = json['ValidTo']; + isInpatient = json['IsInpatient']; + roomCategory = json['RoomCategory']; + isActive = json['IsActive']; + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['CompanyID'] = this.companyID; + data['SubCategoryID'] = this.subCategoryID; + data['SubCategoryDesc'] = this.subCategoryDesc; + data['SubCategoryDescN'] = this.subCategoryDescN; + data['ValidFrom'] = this.validFrom; + data['ValidTo'] = this.validTo; + data['IsInpatient'] = this.isInpatient; + data['RoomCategory'] = this.roomCategory; + data['IsActive'] = this.isActive; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + return data; + } +} diff --git a/lib/models/mobile_number.dart b/lib/models/mobile_number.dart new file mode 100644 index 00000000..f973aad9 --- /dev/null +++ b/lib/models/mobile_number.dart @@ -0,0 +1,1087 @@ +// final List countries = [ +// new Countries( +// name: "Saudi Arabia", name_ar: "المملكة العربية السعودية", code: '966'), +// new Countries( +// name: "United Arab Emirates", +// name_ar: "الإمارات العربية المتحدة", +// code: '971'), +// ]; + +// class Countries { +// final String name; +// final String name_ar; +// final String code; + +// Countries({this.name, this.name_ar, this.code}); +// } + +class Countries { + String? name; + String? nameAr; + String? code; + String? countryCode; + + Countries({this.name, this.nameAr, this.code, this.countryCode}); + + Countries.fromJson(Map json) { + name = json['name']; + nameAr = json['name_ar']; + code = json['code']; + countryCode = json['countryCode']; + } + + Map toJson() { + final Map data = new Map(); + data['name'] = this.name; + data['name_ar'] = this.nameAr; + data['code'] = this.code; + data['countryCode'] = this.countryCode; + return data; + } +} + +List> countriesData = [ + { + "name": "Saudi Arabia", + "name_ar": "المملكة العربية السعودية", + "code": "966", + "countryCode": "SA", + "pattern": "5xxxxxxxx", + "maxLength": 9 + }, + { + "name": "United Arab Emirates", + "name_ar": "الإمارات العربية المتحدة", + "code": "971", + "countryCode": "AE", + "pattern": "5xxxxxxxx", + "maxLength": 9 + }, + // { + // "name": "Bahrain", + // "name_ar": "البحرين", + // "code": "+973", + // "countryCode": "BH", + // "maxLength": 8 + // }, + // {"name": "Kuwait", "name_ar": "الكويت", "code": "+965", "countryCode": "KW"}, + // { + // "name": "Afghanistan", + // "name_ar": "أفغانستان", + // "code": "+93", + // "countryCode": "AF" + // }, + // { + // "name": "Aland Islands", + // "name_ar": "جزر آلاند", + // "code": "+358", + // "countryCode": "AX" + // }, + // { + // "name": "Albania", + // "name_ar": "ألبانيا", + // "code": "+355", + // "countryCode": "AL" + // }, + // { + // "name": "Algeria", + // "name_ar": "الجزائر", + // "code": "+213", + // "countryCode": "DZ" + // }, + // { + // "name": "AmericanSamoa", + // "name_ar": "ساموا الأمريكية", + // "code": "+1 684", + // "countryCode": "AS" + // }, + // {"name": "Andorra", "name_ar": "أندورا", "code": "+376", "countryCode": "AD"}, + // {"name": "Angola", "name_ar": "أنغولا", "code": "+244", "countryCode": "AO"}, + // { + // "name": "Anguilla", + // "name_ar": "أنغيلا", + // "code": "+1 264", + // "countryCode": "AI" + // }, + // { + // "name": "Antarctica", + // "name_ar": "القارة القطبية الجنوبية", + // "code": "+672", + // "countryCode": "AQ" + // }, + // { + // "name": "Antigua and Barbuda", + // "name_ar": "أنتيغوا وبربودا", + // "code": "+1268", + // "countryCode": "AG" + // }, + // { + // "name": "Argentina", + // "name_ar": "الأرجنتين", + // "code": "+54", + // "countryCode": "AR" + // }, + // { + // "name": "Armenia", + // "name_ar": "أرمينيا", + // "code": "+374", + // "countryCode": "AM" + // }, + // {"name": "Aruba", "name_ar": "أروبا", "code": "+297", "countryCode": "AW"}, + // { + // "name": "Australia", + // "name_ar": "أستراليا", + // "code": "+61", + // "countryCode": "AU" + // }, + // {"name": "Austria", "name_ar": "النمسا", "code": "+43", "countryCode": "AT"}, + // { + // "name": "Azerbaijan", + // "name_ar": "أذربيجان", + // "code": "+994", + // "countryCode": "AZ" + // }, + // { + // "name": "Bahamas", + // "name_ar": "الباهاما", + // "code": "+1 242", + // "countryCode": "BS" + // }, + // { + // "name": "Bangladesh", + // "name_ar": "بنغلاديش", + // "code": "+880", + // "countryCode": "BD" + // }, + // { + // "name": "Barbados", + // "name_ar": "بربادوس", + // "code": "+1 246", + // "countryCode": "BB" + // }, + // { + // "name": "Belarus", + // "name_ar": "روسيا البيضاء", + // "code": "+375", + // "countryCode": "BY" + // }, + // {"name": "Belgium", "name_ar": "بلجيكا", "code": "+32", "countryCode": "BE"}, + // {"name": "Belize", "name_ar": "بليز", "code": "+501", "countryCode": "BZ"}, + // {"name": "Benin", "name_ar": "بنين", "code": "+229", "countryCode": "BJ"}, + // { + // "name": "Bermuda", + // "name_ar": "برمودا", + // "code": "+1 441", + // "countryCode": "BM" + // }, + // {"name": "Bhutan", "name_ar": "بوتان", "code": "+975", "countryCode": "BT"}, + // { + // "name": "Bolivia, Plurinational State of", + // "name_ar": "دولة بوليفيا المتعددة القوميات", + // "code": "+591", + // "countryCode": "BO" + // }, + // { + // "name": "Bosnia and Herzegovina", + // "name_ar": "البوسنة والهرسك", + // "code": "+387", + // "countryCode": "BA" + // }, + // { + // "name": "Botswana", + // "name_ar": "بوتسوانا", + // "code": "+267", + // "countryCode": "BW" + // }, + // {"name": "Brazil", "name_ar": "البرازيل", "code": "+55", "countryCode": "BR"}, + // { + // "name": "British Indian Ocean Territory", + // "name_ar": "إقليم المحيط البريطاني الهندي", + // "code": "+246", + // "countryCode": "IO" + // }, + // { + // "name": "Brunei Darussalam", + // "name_ar": "بروناي دار السلام", + // "code": "+673", + // "countryCode": "BN" + // }, + // { + // "name": "Bulgaria", + // "name_ar": "بلغاريا", + // "code": "+359", + // "countryCode": "BG" + // }, + // { + // "name": "Burkina Faso", + // "name_ar": "بوركينا فاسو", + // "code": "+226", + // "countryCode": "BF" + // }, + // { + // "name": "Burundi", + // "name_ar": "بوروندي", + // "code": "+257", + // "countryCode": "BI" + // }, + // { + // "name": "Cambodia", + // "name_ar": "كمبوديا", + // "code": "+855", + // "countryCode": "KH" + // }, + // { + // "name": "Cameroon", + // "name_ar": "الكاميرون", + // "code": "+237", + // "countryCode": "CM" + // }, + // {"name": "Canada", "name_ar": "كندا", "code": "+1", "countryCode": "CA"}, + // { + // "name": "Cape Verde", + // "name_ar": "الرأس الأخضر", + // "code": "+238", + // "countryCode": "CV" + // }, + // { + // "name": "Cayman Islands", + // "name_ar": "جزر كايمان", + // "code": "+345", + // "countryCode": "KY" + // }, + // { + // "name": "Central African Republic", + // "name_ar": "جمهورية افريقيا الوسطى", + // "code": "+236", + // "countryCode": "CF" + // }, + // {"name": "Chad", "name_ar": "تشاد", "code": "+235", "countryCode": "TD"}, + // {"name": "Chile", "name_ar": "تشيلي", "code": "+56", "countryCode": "CL"}, + // {"name": "China", "name_ar": "الصين", "code": "+86", "countryCode": "CN"}, + // { + // "name": "Christmas Island", + // "name_ar": "جزيرة الكريسماس", + // "code": "+61", + // "countryCode": "CX" + // }, + // { + // "name": "Cocos (Keeling) Islands", + // "name_ar": "جزر كوكوس كيلينغ", + // "code": "+61", + // "countryCode": "CC" + // }, + // { + // "name": "Colombia", + // "name_ar": "كولومبيا", + // "code": "+57", + // "countryCode": "CO" + // }, + // { + // "name": "Comoros", + // "name_ar": "جزر القمر", + // "code": "+269", + // "countryCode": "KM" + // }, + // {"name": "Congo", "name_ar": "الكونغو", "code": "+242", "countryCode": "CG"}, + // { + // "name": "Congo, The Democratic Republic of the Congo", + // "name_ar": "الكونغو ، جمهورية الكونغو الديمقراطية", + // "code": "+243", + // "countryCode": "CD" + // }, + // { + // "name": "Cook Islands", + // "name_ar": "جزر كوك", + // "code": "+682", + // "countryCode": "CK" + // }, + // { + // "name": "Costa Rica", + // "name_ar": "كوستا ريكا", + // "code": "+506", + // "countryCode": "CR" + // }, + // { + // "name": "Cote d'Ivoire", + // "name_ar": "ساحل العاج", + // "code": "+225", + // "countryCode": "CI" + // }, + // { + // "name": "Croatia", + // "name_ar": "كرواتيا", + // "code": "+385", + // "countryCode": "HR" + // }, + // {"name": "Cuba", "name_ar": "كوبا", "code": "+53", "countryCode": "CU"}, + // {"name": "Cyprus", "name_ar": "قبرص", "code": "+357", "countryCode": "CY"}, + // { + // "name": "Czech Republic", + // "name_ar": "جمهورية التشيك", + // "code": "+420", + // "countryCode": "CZ" + // }, + // { + // "name": "Denmark", + // "name_ar": "الدنمارك", + // "code": "+45", + // "countryCode": "DK" + // }, + // { + // "name": "Djibouti", + // "name_ar": "جيبوتي", + // "code": "+253", + // "countryCode": "DJ" + // }, + // { + // "name": "Dominica", + // "name_ar": "دومينيكا", + // "code": "+1 767", + // "countryCode": "DM" + // }, + // { + // "name": "Dominican Republic", + // "name_ar": "جمهورية الدومنيكان", + // "code": "+1 849", + // "countryCode": "DO" + // }, + // { + // "name": "Ecuador", + // "name_ar": "الإكوادور", + // "code": "+593", + // "countryCode": "EC" + // }, + // {"name": "Egypt", "name_ar": "مصر", "code": "+20", "countryCode": "EG"}, + // { + // "name": "El Salvador", + // "name_ar": "السلفادور", + // "code": "+503", + // "countryCode": "SV" + // }, + // { + // "name": "Equatorial Guinea", + // "name_ar": "غينيا الإستوائية", + // "code": "+240", + // "countryCode": "GQ" + // }, + // { + // "name": "Eritrea", + // "name_ar": "إريتريا", + // "code": "+291", + // "countryCode": "ER" + // }, + // { + // "name": "Estonia", + // "name_ar": "استونيا", + // "code": "+372", + // "countryCode": "EE" + // }, + // { + // "name": "Ethiopia", + // "name_ar": "أثيوبيا", + // "code": "+251", + // "countryCode": "ET" + // }, + // { + // "name": "Falkland Islands (Malvinas)", + // "name_ar": "جزر فوكلاند مالفيناس", + // "code": "+500", + // "countryCode": "FK" + // }, + // { + // "name": "Faroe Islands", + // "name_ar": "جزر صناعية", + // "code": "+298", + // "countryCode": "FO" + // }, + // {"name": "Fiji", "name_ar": "فيجي", "code": "+679", "countryCode": "FJ"}, + // {"name": "Finland", "name_ar": "فنلندا", "code": "+358", "countryCode": "FI"}, + // {"name": "France", "name_ar": "فرنسا", "code": "+33", "countryCode": "FR"}, + // { + // "name": "French Guiana", + // "name_ar": "غيانا الفرنسية", + // "code": "+594", + // "countryCode": "GF" + // }, + // { + // "name": "French Polynesia", + // "name_ar": "بولينيزيا الفرنسية", + // "code": "+689", + // "countryCode": "PF" + // }, + // {"name": "Gabon", "name_ar": "الغابون", "code": "+241", "countryCode": "GA"}, + // {"name": "Gambia", "name_ar": "غامبيا", "code": "+220", "countryCode": "GM"}, + // {"name": "Georgia", "name_ar": "جورجيا", "code": "+995", "countryCode": "GE"}, + // {"name": "Germany", "name_ar": "ألمانيا", "code": "+49", "countryCode": "DE"}, + // {"name": "Ghana", "name_ar": "غانا", "code": "+233", "countryCode": "GH"}, + // { + // "name": "Gibraltar", + // "name_ar": "جبل طارق", + // "code": "+350", + // "countryCode": "GI" + // }, + // {"name": "Greece", "name_ar": "اليونان", "code": "+30", "countryCode": "GR"}, + // { + // "name": "Greenland", + // "name_ar": "الأرض الخضراء", + // "code": "+299", + // "countryCode": "GL" + // }, + // { + // "name": "Grenada", + // "name_ar": "غرينادا", + // "code": "+1 473", + // "countryCode": "GD" + // }, + // { + // "name": "Guadeloupe", + // "name_ar": "جوادلوب", + // "code": "+590", + // "countryCode": "GP" + // }, + // {"name": "Guam", "name_ar": "غوام", "code": "+1 671", "countryCode": "GU"}, + // { + // "name": "Guatemala", + // "name_ar": "غواتيمالا", + // "code": "+502", + // "countryCode": "GT" + // }, + // {"name": "Guernsey", "name_ar": "غيرنسي", "code": "+44", "countryCode": "GG"}, + // {"name": "Guinea", "name_ar": "غينيا", "code": "+224", "countryCode": "GN"}, + // { + // "name": "Guinea-Bissau", + // "name_ar": "غينيا بيساو", + // "code": "+245", + // "countryCode": "GW" + // }, + // {"name": "Guyana", "name_ar": "غيانا", "code": "+595", "countryCode": "GY"}, + // {"name": "Haiti", "name_ar": "هايتي", "code": "+509", "countryCode": "HT"}, + // { + // "name": "Holy See (Vatican City State)", + // "name_ar": "الكرسي الرسولي دولة الفاتيكان", + // "code": "+379", + // "countryCode": "VA" + // }, + // { + // "name": "Honduras", + // "name_ar": "هندوراس", + // "code": "+504", + // "countryCode": "HN" + // }, + // { + // "name": "Hong Kong", + // "name_ar": "هونج كونج", + // "code": "+852", + // "countryCode": "HK" + // }, + // {"name": "Hungary", "name_ar": "اليونان", "code": "+36", "countryCode": "HU"}, + // { + // "name": "Iceland", + // "name_ar": "أيسلندا", + // "code": "+354", + // "countryCode": "IS" + // }, + // {"name": "India", "name_ar": "الهند", "code": "+91", "countryCode": "IN"}, + // { + // "name": "Indonesia", + // "name_ar": "أندونيسيا", + // "code": "+62", + // "countryCode": "ID" + // }, + // { + // "name": "Iran, Islamic Republic of Persian Gulf", + // "name_ar": "جمهورية إيران الإسلامية الخليج الفارسي", + // "code": "+98", + // "countryCode": "IR" + // }, + // {"name": "Iraq", "name_ar": "العراق", "code": "+964", "countryCode": "IQ"}, + // { + // "name": "Ireland", + // "name_ar": "أيرلندا", + // "code": "+353", + // "countryCode": "IE" + // }, + // { + // "name": "Isle of Man", + // "name_ar": "جزيرة آيل أوف مان", + // "code": "+44", + // "countryCode": "IM" + // }, + // {"name": "Israel", "name_ar": "إسرائيل", "code": "+972", "countryCode": "IL"}, + // {"name": "Italy", "name_ar": "إيطاليا", "code": "+39", "countryCode": "IT"}, + // { + // "name": "Jamaica", + // "name_ar": "جامايكا", + // "code": "+1 876", + // "countryCode": "JM" + // }, + // {"name": "Japan", "name_ar": "اليابان", "code": "+81", "countryCode": "JP"}, + // {"name": "Jersey", "name_ar": "جيرسي", "code": "+44", "countryCode": "JE"}, + // {"name": "Jordan", "name_ar": "الأردن", "code": "+962", "countryCode": "JO"}, + // { + // "name": "Kazakhstan", + // "name_ar": "كازاخستان", + // "code": "+77", + // "countryCode": "KZ" + // }, + // {"name": "Kenya", "name_ar": "كينيا", "code": "+254", "countryCode": "KE"}, + // { + // "name": "Kiribati", + // "name_ar": "كيريباس", + // "code": "+686", + // "countryCode": "KI" + // }, + // { + // "name": "Korea, Democratic People's Republic of Korea", + // "name_ar": "جمهورية كوريا الديمقراطية الشعبية", + // "code": "+850", + // "countryCode": "KP" + // }, + // { + // "name": "Korea, Republic of South Korea", + // "name_ar": "جمهورية كوريا الديمقراطية الشعبية", + // "code": "+82", + // "countryCode": "KR" + // }, + // { + // "name": "Kyrgyzstan", + // "name_ar": "قرغيزستان", + // "code": "+996", + // "countryCode": "KG" + // }, + // {"name": "Laos", "name_ar": "لاوس", "code": "+856", "countryCode": "LA"}, + // {"name": "Latvia", "name_ar": "لاتفيا", "code": "+371", "countryCode": "LV"}, + // {"name": "Lebanon", "name_ar": "لبنان", "code": "+961", "countryCode": "LB"}, + // {"name": "Lesotho", "name_ar": "ليسوتو", "code": "+266", "countryCode": "LS"}, + // { + // "name": "Liberia", + // "name_ar": "ليبيريا", + // "code": "+231", + // "countryCode": "LR" + // }, + // { + // "name": "Libyan Arab Jamahiriya", + // "name_ar": "الجماهيرية العربية الليبية", + // "code": "+218", + // "countryCode": "LY" + // }, + // { + // "name": "Liechtenstein", + // "name_ar": "ليختنشتاين", + // "code": "+423", + // "countryCode": "LI" + // }, + // { + // "name": "Lithuania", + // "name_ar": "ليتوانيا", + // "code": "+370", + // "countryCode": "LT" + // }, + // { + // "name": "Luxembourg", + // "name_ar": "لوكسمبورغ", + // "code": "+352", + // "countryCode": "LU" + // }, + // {"name": "Macao", "name_ar": "ماكاو", "code": "+853", "countryCode": "MO"}, + // { + // "name": "Macedonia", + // "name_ar": "مقدونيا", + // "code": "+389", + // "countryCode": "MK" + // }, + // { + // "name": "Madagascar", + // "name_ar": "مدغشقر", + // "code": "+261", + // "countryCode": "MG" + // }, + // {"name": "Malawi", "name_ar": "مالاوي", "code": "+265", "countryCode": "MW"}, + // { + // "name": "Malaysia", + // "name_ar": "ماليزيا", + // "code": "+60", + // "countryCode": "MY" + // }, + // { + // "name": "Maldives", + // "name_ar": "جزر المالديف", + // "code": "+960", + // "countryCode": "MV" + // }, + // {"name": "Mali", "name_ar": "مالي", "code": "+223", "countryCode": "ML"}, + // {"name": "Malta", "name_ar": "مالطا", "code": "+356", "countryCode": "MT"}, + // { + // "name": "Marshall Islands", + // "name_ar": "جزر مارشال", + // "code": "+692", + // "countryCode": "MH" + // }, + // { + // "name": "Martinique", + // "name_ar": "مارتينيك", + // "code": "+596", + // "countryCode": "MQ" + // }, + // { + // "name": "Mauritania", + // "name_ar": "موريتانيا", + // "code": "+222", + // "countryCode": "MR" + // }, + // { + // "name": "Mauritius", + // "name_ar": "موريشيوس", + // "code": "+230", + // "countryCode": "MU" + // }, + // {"name": "Mayotte", "name_ar": "مايوت", "code": "+262", "countryCode": "YT"}, + // {"name": "Mexico", "name_ar": "المكسيك", "code": "+52", "countryCode": "MX"}, + // { + // "name": "Micronesia, Federated States of Micronesia", + // "name_ar": "ميكرونيزيا ، ولايات ميكرونيزيا الموحدة", + // "code": "+691", + // "countryCode": "FM" + // }, + // { + // "name": "Moldova", + // "name_ar": "مولدوفا", + // "code": "+373", + // "countryCode": "MD" + // }, + // {"name": "Monaco", "name_ar": "موناكو", "code": "+377", "countryCode": "MC"}, + // { + // "name": "Mongolia", + // "name_ar": "منغوليا", + // "code": "+976", + // "countryCode": "MN" + // }, + // { + // "name": "Montenegro", + // "name_ar": "الجبل الأسود", + // "code": "+382", + // "countryCode": "ME" + // }, + // { + // "name": "Montserrat", + // "name_ar": "مونتسيرات", + // "code": "+1664", + // "countryCode": "MS" + // }, + // {"name": "Morocco", "name_ar": "المغرب", "code": "+212", "countryCode": "MA"}, + // { + // "name": "Mozambique", + // "name_ar": "موزمبيق", + // "code": "+258", + // "countryCode": "MZ" + // }, + // {"name": "Myanmar", "name_ar": "ميانمار", "code": "+95", "countryCode": "MM"}, + // { + // "name": "Namibia", + // "name_ar": "ناميبيا", + // "code": "+264", + // "countryCode": "NA" + // }, + // {"name": "Nauru", "name_ar": "ناورو", "code": "+674", "countryCode": "NR"}, + // {"name": "Nepal", "name_ar": "نيبال", "code": "+977", "countryCode": "NP"}, + // { + // "name": "Netherlands", + // "name_ar": "هولندا", + // "code": "+31", + // "countryCode": "NL" + // }, + // { + // "name": "Netherlands Antilles", + // "name_ar": "جزر الأنتيل الهولندية", + // "code": "+599", + // "countryCode": "AN" + // }, + // { + // "name": "New Caledonia", + // "name_ar": "كاليدونيا الجديدة", + // "code": "+687", + // "countryCode": "NC" + // }, + // { + // "name": "New Zealand", + // "name_ar": "نيوزيلندا", + // "code": "+64", + // "countryCode": "NZ" + // }, + // { + // "name": "Nicaragua", + // "name_ar": "نيكاراغوا", + // "code": "+505", + // "countryCode": "NI" + // }, + // {"name": "Niger", "name_ar": "النيجر", "code": "+227", "countryCode": "NE"}, + // { + // "name": "Nigeria", + // "name_ar": "نيجيريا", + // "code": "+234", + // "countryCode": "NG" + // }, + // {"name": "Niue", "name_ar": "نيوي", "code": "+683", "countryCode": "NU"}, + // { + // "name": "Norfolk Island", + // "name_ar": "جزيرة نورفولك", + // "code": "+672", + // "countryCode": "NF" + // }, + // { + // "name": "Northern Mariana Islands", + // "name_ar": "جزر مريانا الشمالية", + // "code": "+1 670", + // "countryCode": "MP" + // }, + // {"name": "Norway", "name_ar": "النرويج", "code": "+47", "countryCode": "NO"}, + // { + // "name": "Oman", + // "name_ar": "سلطنة عمان", + // "code": "+968", + // "countryCode": "OM" + // }, + // { + // "name": "Pakistan", + // "name_ar": "باكستان", + // "code": "+92", + // "countryCode": "PK" + // }, + // {"name": "Palau", "name_ar": "بالاو", "code": "+680", "countryCode": "PW"}, + // { + // "name": "Palestinian Territory, Occupied", + // "name_ar": "الأراضي الفلسطينية المحتلة", + // "code": "+970", + // "countryCode": "PS" + // }, + // {"name": "Panama", "name_ar": "بناما", "code": "+507", "countryCode": "PA"}, + // { + // "name": "Papua New Guinea", + // "name_ar": "بابوا غينيا الجديدة", + // "code": "+675", + // "countryCode": "PG" + // }, + // { + // "name": "Paraguay", + // "name_ar": "باراغواي", + // "code": "+595", + // "countryCode": "PY" + // }, + // {"name": "Peru", "name_ar": "بيرو", "code": "+51", "countryCode": "PE"}, + // { + // "name": "Philippines", + // "name_ar": "الفلبين", + // "code": "+63", + // "countryCode": "PH" + // }, + // { + // "name": "Pitcairn", + // "name_ar": "بيتكيرن", + // "code": "+872", + // "countryCode": "PN" + // }, + // {"name": "Poland", "name_ar": "بولندا", "code": "+48", "countryCode": "PL"}, + // { + // "name": "Portugal", + // "name_ar": "البرتغال", + // "code": "+351", + // "countryCode": "PT" + // }, + // { + // "name": "Puerto Rico", + // "name_ar": "بورتوريكو", + // "code": "+1 939", + // "countryCode": "PR" + // }, + // {"name": "Qatar", "name_ar": "دولة قطر", "code": "+974", "countryCode": "QA"}, + // {"name": "Romania", "name_ar": "رومانيا", "code": "+40", "countryCode": "RO"}, + // {"name": "Russia", "name_ar": "روسيا", "code": "+7", "countryCode": "RU"}, + // {"name": "Rwanda", "name_ar": "رواندا", "code": "+250", "countryCode": "RW"}, + // { + // "name": "Reunion", + // "name_ar": "جمع شمل", + // "code": "+262", + // "countryCode": "RE" + // }, + // { + // "name": "Saint Barthelemy", + // "name_ar": "سانت بارتيليمي", + // "code": "+590", + // "countryCode": "BL" + // }, + // { + // "name": "Saint Helena, Ascension and Tristan Da Cunha", + // "name_ar": "سانت هيلانة ، أسنشن وتريستان دا كونها", + // "code": "+290", + // "countryCode": "SH" + // }, + // { + // "name": "Saint Kitts and Nevis", + // "name_ar": "سانت كيتس ونيفيس", + // "code": "+1 869", + // "countryCode": "KN" + // }, + // { + // "name": "Saint Lucia", + // "name_ar": "القديسة لوسيا", + // "code": "+1 758", + // "countryCode": "LC" + // }, + // { + // "name": "Saint Martin", + // "name_ar": "القديس مارتن", + // "code": "+590", + // "countryCode": "MF" + // }, + // { + // "name": "Saint Pierre and Miquelon", + // "name_ar": "سانت بيير وميكلون", + // "code": "+508", + // "countryCode": "PM" + // }, + // { + // "name": "Saint Vincent and the Grenadines", + // "name_ar": "سانت فنسنت وجزر غرينادين", + // "code": "+1 784", + // "countryCode": "VC" + // }, + // {"name": "Samoa", "name_ar": "ساموا", "code": "+685", "countryCode": "WS"}, + // { + // "name": "San Marino", + // "name_ar": "سان مارينو", + // "code": "+378", + // "countryCode": "SM" + // }, + // { + // "name": "Sao Tome and Principe", + // "name_ar": "ساو تومي وبرينسيبي", + // "code": "+239", + // "countryCode": "ST" + // }, + // { + // "name": "Senegal", + // "name_ar": "السنغال", + // "code": "+221", + // "countryCode": "SN" + // }, + // {"name": "Serbia", "name_ar": "صربيا", "code": "+381", "countryCode": "RS"}, + // { + // "name": "Seychelles", + // "name_ar": "سيشيل", + // "code": "+248", + // "countryCode": "SC" + // }, + // { + // "name": "Sierra Leone", + // "name_ar": "سيرا ليون", + // "code": "+232", + // "countryCode": "SL" + // }, + // { + // "name": "Singapore", + // "name_ar": "سنغافورة", + // "code": "+65", + // "countryCode": "SG" + // }, + // { + // "name": "Slovakia", + // "name_ar": "سلوفاكيا", + // "code": "+421", + // "countryCode": "SK" + // }, + // { + // "name": "Slovenia", + // "name_ar": "سلوفينيا", + // "code": "+386", + // "countryCode": "SI" + // }, + // { + // "name": "Solomon Islands", + // "name_ar": "جزر سليمان", + // "code": "+677", + // "countryCode": "SB" + // }, + // { + // "name": "Somalia", + // "name_ar": "الصومال", + // "code": "+252", + // "countryCode": "SO" + // }, + // { + // "name": "South Africa", + // "name_ar": "جنوب أفريقيا", + // "code": "+27", + // "countryCode": "ZA" + // }, + // { + // "name": "South Georgia and the South Sandwich Islands", + // "name_ar": "جورجيا الجنوبية وجزر ساندويتش الجنوبية", + // "code": "+500", + // "countryCode": "GS" + // }, + // {"name": "Spain", "name_ar": "إسبانيا", "code": "+34", "countryCode": "ES"}, + // { + // "name": "Sri Lanka", + // "name_ar": "سيريلانكا", + // "code": "+94", + // "countryCode": "LK" + // }, + // {"name": "Sudan", "name_ar": "سودان", "code": "+249", "countryCode": "SD"}, + // { + // "name": "Suriname", + // "name_ar": "سورينام", + // "code": "+597", + // "countryCode": "SR" + // }, + // { + // "name": "Svalbard and Jan Mayen", + // "name_ar": "سفالبارد وجان ماين", + // "code": "+47", + // "countryCode": "SJ" + // }, + // { + // "name": "Swaziland", + // "name_ar": "سوازيلاند", + // "code": "+268", + // "countryCode": "SZ" + // }, + // {"name": "Sweden", "name_ar": "السويد", "code": "+46", "countryCode": "SE"}, + // { + // "name": "Switzerland", + // "name_ar": "سويسرا", + // "code": "+41", + // "countryCode": "CH" + // }, + // { + // "name": "Syrian Arab Republic", + // "name_ar": "الجمهورية العربية السورية", + // "code": "+963", + // "countryCode": "SY" + // }, + // {"name": "Taiwan", "name_ar": "تايوان", "code": "+886", "countryCode": "TW"}, + // { + // "name": "Tajikistan", + // "name_ar": "طاجيكستان", + // "code": "+992", + // "countryCode": "TJ" + // }, + // { + // "name": "Tanzania, United Republic of Tanzania", + // "name_ar": "تنزانيا ، جمهورية تنزانيا المتحدة", + // "code": "+255", + // "countryCode": "TZ" + // }, + // { + // "name": "Thailand", + // "name_ar": "تايلاند", + // "code": "+66", + // "countryCode": "TH" + // }, + // { + // "name": "Timor-Leste", + // "name_ar": "تيمور الشرقية", + // "code": "+670", + // "countryCode": "TL" + // }, + // {"name": "Togo", "name_ar": "ليذهب", "code": "+228", "countryCode": "TG"}, + // { + // "name": "Tokelau", + // "name_ar": "توكيلاو", + // "code": "+690", + // "countryCode": "TK" + // }, + // {"name": "Tonga", "name_ar": "تونغا", "code": "+676", "countryCode": "TO"}, + // { + // "name": "Trinidad and Tobago", + // "name_ar": "ترينداد وتوباغو", + // "code": "+1 868", + // "countryCode": "TT" + // }, + // {"name": "Tunisia", "name_ar": "تونس", "code": "+216", "countryCode": "TN"}, + // {"name": "Turkey", "name_ar": "ديك رومي", "code": "+90", "countryCode": "TR"}, + // { + // "name": "Turkmenistan", + // "name_ar": "تركمانستان", + // "code": "+993", + // "countryCode": "TM" + // }, + // { + // "name": "Turks and Caicos Islands", + // "name_ar": "جزر تركس وكايكوس", + // "code": "+1 649", + // "countryCode": "TC" + // }, + // {"name": "Tuvalu", "name_ar": "توفالو", "code": "+688", "countryCode": "TV"}, + // {"name": "Uganda", "name_ar": "أوغندا", "code": "+256", "countryCode": "UG"}, + // { + // "name": "Ukraine", + // "name_ar": "أوكرانيا", + // "code": "+380", + // "countryCode": "UA" + // }, + // { + // "name": "United Kingdom", + // "name_ar": "المملكة المتحدة", + // "code": "+44", + // "countryCode": "GB" + // }, + // { + // "name": "United States", + // "name_ar": "الولايات المتحدة الامريكانية", + // "code": "+1", + // "countryCode": "US" + // }, + // { + // "name": "Uruguay", + // "name_ar": "أوروغواي", + // "code": "+598", + // "countryCode": "UY" + // }, + // { + // "name": "Uzbekistan", + // "name_ar": "أوزبكستان", + // "code": "+998", + // "countryCode": "UZ" + // }, + // { + // "name": "Vanuatu", + // "name_ar": "فانواتو", + // "code": "+678", + // "countryCode": "VU" + // }, + // { + // "name": "Venezuela, Bolivarian Republic of Venezuela", + // "name_ar": "فنزويلا ، جمهورية فنزويلا البوليفارية", + // "code": "+58", + // "countryCode": "VE" + // }, + // {"name": "Vietnam", "name_ar": "فيتنام", "code": "+84", "countryCode": "VN"}, + // { + // "name": "Virgin Islands, British", + // "name_ar": "جزر العذراء البريطانية", + // "code": "+1 284", + // "countryCode": "VG" + // }, + // { + // "name": "Virgin Islands, U.S.", + // "name_ar": "جزر فيرجن ، الولايات المتحدة", + // "code": "+1 340", + // "countryCode": "VI" + // }, + // { + // "name": "Wallis and Futuna", + // "name_ar": "واليس وفوتونا", + // "code": "+681", + // "countryCode": "WF" + // }, + // {"name": "Yemen", "name_ar": "اليمن", "code": "+967", "countryCode": "YE"}, + // {"name": "Zambia", "name_ar": "زامبيا", "code": "+260", "countryCode": "ZM"}, + // { + // "name": "Zimbabwe", + // "name_ar": "زيمبابوي", + // "code": "+263", + // "countryCode": "ZW" + // } +]; +// }); +// List countryList =[]; diff --git a/lib/models/pharmacy/Wishlist.dart b/lib/models/pharmacy/Wishlist.dart new file mode 100644 index 00000000..0e1eb1b1 --- /dev/null +++ b/lib/models/pharmacy/Wishlist.dart @@ -0,0 +1,881 @@ +// To parse this JSON data, do +// +// final wishlist = wishlistFromJson(jsonString); + +import 'dart:convert'; + +List wishlistFromJson(String str) => List.from(json.decode(str).map((x) => Wishlist.fromJson(x))); + +String wishlistToJson(List data) => json.encode(List.from(data.map((x) => x.toJson()))); + +class Wishlist { + Wishlist({ + this.languageId, + this.id, + this.productAttributes, + this.customerEnteredPrice, + this.quantity, + this.discountAmountInclTax, + this.subtotal, + this.subtotalWithVat, + this.subtotalVatAmount, + this.subtotalVatRate, + this.currency, + this.currencyn, + this.rentalStartDateUtc, + this.rentalEndDateUtc, + this.createdOnUtc, + this.updatedOnUtc, + this.shoppingCartType, + this.productId, + this.product, + this.customerId, + this.customer, + }); + + dynamic languageId; + dynamic id; + List? productAttributes; + dynamic customerEnteredPrice; + dynamic quantity; + dynamic discountAmountInclTax; + dynamic subtotal; + dynamic subtotalWithVat; + dynamic subtotalVatAmount; + dynamic subtotalVatRate; + dynamic currency; + dynamic currencyn; + dynamic rentalStartDateUtc; + dynamic rentalEndDateUtc; + dynamic createdOnUtc; + dynamic updatedOnUtc; + dynamic shoppingCartType; + dynamic productId; + dynamic product; + dynamic customerId; + Customer? customer; + + factory Wishlist.fromJson(Map json) => Wishlist( + languageId: json["language_id"], + id: json["id"], + productAttributes: List.from(json["product_attributes"].map((x) => x)), + customerEnteredPrice: json["customer_entered_price"], + quantity: json["quantity"], + discountAmountInclTax: json["discount_amount_incl_tax"] != null ? json["discount_amount_incl_tax"] :0.0, + subtotal: json["subtotal"], + subtotalWithVat: json["subtotal_with_vat"], + subtotalVatAmount: json["subtotal_vat_amount"], + subtotalVatRate: json["subtotal_vat_rate"], + currency: json["currency"], + currencyn: json["currencyn"], + rentalStartDateUtc: json["rental_start_date_utc"] != null ? DateTime.parse(json["rental_start_date_utc"]) : DateTime.now(), + rentalEndDateUtc: json["rental_end_date_utc"] != null ? DateTime.parse(json["rental_end_date_utc"]) : DateTime.now(), + createdOnUtc: DateTime.parse(json["created_on_utc"]), + updatedOnUtc: DateTime.parse(json["updated_on_utc"]), + shoppingCartType: json["shopping_cart_type"], + productId: json["product_id"], + product: Product.fromJson(json["product"]), + customerId: json["customer_id"], + customer: Customer.fromJson(json["customer"]), + ); + + Map toJson() => { + "language_id": languageId, + "id": id, + "product_attributes": List.from(productAttributes!.map((x) => x)), + "customer_entered_price": customerEnteredPrice, + "quantity": quantity, + "discount_amount_incl_tax": discountAmountInclTax, + "subtotal": subtotal, + "subtotal_with_vat": subtotalWithVat, + "subtotal_vat_amount": subtotalVatAmount, + "subtotal_vat_rate": subtotalVatRate, + "currency": currency, + "currencyn": currencyn, + "rental_start_date_utc": rentalStartDateUtc, + "rental_end_date_utc": rentalEndDateUtc, + "created_on_utc": createdOnUtc.toIso8601String(), + "updated_on_utc": updatedOnUtc.toIso8601String(), + "shopping_cart_type": shoppingCartType, + "product_id": productId, + "product": product.toJson(), + "customer_id": customerId, + "customer": customer!.toJson(), + }; +} + +class Customer { + Customer({ + this.billingAddress, + this.shippingAddress, + this.addresses, + this.id, + this.username, + this.email, + this.firstName, + this.lastName, + this.languageId, + this.adminComment, + this.isTaxExempt, + this.hasShoppingCartItems, + this.active, + this.deleted, + this.isSystemAccount, + this.systemName, + this.lastIpAddress, + this.createdOnUtc, + this.lastLoginDateUtc, + this.lastActivityDateUtc, + this.registeredInStoreId, + this.roleIds, + }); + + Address? billingAddress; + Address? shippingAddress; + List
? addresses; + String? id; + String? username; + String? email; + dynamic firstName; + dynamic lastName; + dynamic languageId; + dynamic adminComment; + bool? isTaxExempt; + bool? hasShoppingCartItems; + bool? active; + bool? deleted; + bool? isSystemAccount; + dynamic systemName; + String? lastIpAddress; + DateTime? createdOnUtc; + DateTime? lastLoginDateUtc; + DateTime? lastActivityDateUtc; + dynamic registeredInStoreId; + List? roleIds; + + factory Customer.fromJson(Map json) => Customer( + billingAddress: Address.fromJson(json["billing_address"]), + shippingAddress: Address.fromJson(json["shipping_address"]), + addresses: List
.from(json["addresses"].map((x) => Address.fromJson(x))), + id: json["id"], + username: json["username"], + email: json["email"], + firstName: json["first_name"], + lastName: json["last_name"], + languageId: json["language_id"], + adminComment: json["admin_comment"], + isTaxExempt: json["is_tax_exempt"], + hasShoppingCartItems: json["has_shopping_cart_items"], + active: json["active"], + deleted: json["deleted"], + isSystemAccount: json["is_system_account"], + systemName: json["system_name"], + lastIpAddress: json["last_ip_address"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + lastLoginDateUtc: json["last_login_date_utc"] != null ? DateTime.parse(json["last_login_date_utc"]) : DateTime.now(), + lastActivityDateUtc: DateTime.parse(json["last_activity_date_utc"]), + registeredInStoreId: json["registered_in_store_id"], + roleIds: List.from(json["role_ids"].map((x) => x)), + ); + + Map toJson() => { + "billing_address": billingAddress!.toJson(), + "shipping_address": shippingAddress!.toJson(), + "addresses": List.from(addresses!.map((x) => x.toJson())), + "id": id, + "username": username, + "email": email, + "first_name": firstName, + "last_name": lastName, + "language_id": languageId, + "admin_comment": adminComment, + "is_tax_exempt": isTaxExempt, + "has_shopping_cart_items": hasShoppingCartItems, + "active": active, + "deleted": deleted, + "is_system_account": isSystemAccount, + "system_name": systemName, + "last_ip_address": lastIpAddress, + "created_on_utc": createdOnUtc!.toIso8601String(), + "last_login_date_utc": lastLoginDateUtc!.toIso8601String(), + "last_activity_date_utc": lastActivityDateUtc!.toIso8601String(), + "registered_in_store_id": registeredInStoreId, + "role_ids": List.from(roleIds!.map((x) => x)), + }; +} + +class Address { + Address({ + this.id, + this.firstName, + this.lastName, + this.email, + this.company, + this.countryId, + this.country, + this.stateProvinceId, + this.city, + this.address1, + this.address2, + this.zipPostalCode, + this.phoneNumber, + this.faxNumber, + this.customerAttributes, + this.createdOnUtc, + this.province, + this.latLong, + }); + + String? id; + FirstName? firstName; + LastName? lastName; + Email? email; + dynamic company; + dynamic countryId; + Country? country; + dynamic stateProvinceId; + City? city; + String? address1; + String? address2; + String? zipPostalCode; + String? phoneNumber; + dynamic faxNumber; + String? customerAttributes; + DateTime? createdOnUtc; + dynamic province; + String? latLong; + + factory Address.fromJson(Map json) => Address( + id: json["id"], + firstName: firstNameValues.map![json["first_name"]], + lastName: lastNameValues.map![json["last_name"]], + email: emailValues.map![json["email"]], + company: json["company"], + countryId: json["country_id"], + country: countryValues.map![json["country"]], + stateProvinceId: json["state_province_id"], + city: cityValues.map![json["city"]], + address1: json["address1"], + address2: json["address2"], + zipPostalCode: json["zip_postal_code"], + phoneNumber: json["phone_number"], + faxNumber: json["fax_number"], + customerAttributes: json["customer_attributes"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + province: json["province"], + latLong: json["lat_long"], + ); + + Map toJson() => { + "id": id, + "first_name": firstNameValues.reverse[firstName], + "last_name": lastNameValues.reverse[lastName], + "email": emailValues.reverse[email], + "company": company, + "country_id": countryId, + "country": countryValues.reverse[country], + "state_province_id": stateProvinceId, + "city": cityValues.reverse[city], + "address1": address1, + "address2": address2, + "zip_postal_code": zipPostalCode, + "phone_number": phoneNumber, + "fax_number": faxNumber, + "customer_attributes": customerAttributes, + "created_on_utc": createdOnUtc!.toIso8601String(), + "province": province, + "lat_long": latLong, + }; +} + +enum City { RIYADH, AL_OYUN } + +final cityValues = EnumValues({ + "Al Oyun": City.AL_OYUN, + "Riyadh": City.RIYADH +}); + +enum Country { SAUDI_ARABIA } + +final countryValues = EnumValues({ + "Saudi Arabia": Country.SAUDI_ARABIA +}); + +enum Email { TAMER_FANASHEH_GMAIL_COM, TAMER_DASDASDAS_GMAIL_COM } + +final emailValues = EnumValues({ + "Tamer.dasdasdas@gmail.com": Email.TAMER_DASDASDAS_GMAIL_COM, + "Tamer.fanasheh@gmail.com": Email.TAMER_FANASHEH_GMAIL_COM +}); + +enum FirstName { TAMER, TAMER_FANASHEH } + +final firstNameValues = EnumValues({ + "TAMER": FirstName.TAMER, + "TAMER FANASHEH": FirstName.TAMER_FANASHEH +}); + +enum LastName { FANASHEH, MUSA } + +final lastNameValues = EnumValues({ + "FANASHEH": LastName.FANASHEH, + "MUSA": LastName.MUSA +}); + +class Product { + Product({ + this.id, + this.visibleIndividually, + this.name, + this.namen, + this.localizedNames, + this.shortDescription, + this.shortDescriptionn, + this.fullDescription, + this.fullDescriptionn, + this.markasNew, + this.showOnHomePage, +// this.metaKeywords, +// this.metaDescription, +// this.metaTitle, + this.allowCustomerReviews, + this.approvedRatingSum, + this.notApprovedRatingSum, + this.approvedTotalReviews, + this.notApprovedTotalReviews, + this.sku, + this.isRx, + this.prescriptionRequired, + this.rxMessage, + this.rxMessagen, +// this.manufacturerPartNumber, +// this.gtin, + this.isGiftCard, + this.requireOtherProducts, + this.automaticallyAddRequiredProducts, + this.isDownload, + this.unlimitedDownloads, + this.maxNumberOfDownloads, +// this.downloadExpirationDays, + this.hasSampleDownload, + this.hasUserAgreement, + this.isRecurring, + this.recurringCycleLength, + this.recurringTotalCycles, + this.isRental, + this.rentalPriceLength, + this.isShipEnabled, + this.isFreeShipping, + this.shipSeparately, + this.additionalShippingCharge, + this.isTaxExempt, + this.isTelecommunicationsOrBroadcastingOrElectronicServices, + this.useMultipleWarehouses, + this.manageInventoryMethodId, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.displayStockAvailability, + this.displayStockQuantity, + this.minStockQuantity, + this.notifyAdminForQuantityBelow, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, +// this.allowedQuantities, + this.allowAddingOnlyExistingAttributeCombinations, + this.disableBuyButton, + this.disableWishlistButton, + this.availableForPreOrder, + this.preOrderAvailabilityStartDateTimeUtc, + this.callForPrice, + this.price, + this.oldPrice, + this.productCost, + this.specialPrice, + this.specialPriceStartDateTimeUtc, + this.specialPriceEndDateTimeUtc, + this.customerEntersPrice, + this.minimumCustomerEnteredPrice, + this.maximumCustomerEnteredPrice, + this.basepriceEnabled, + this.basepriceAmount, + this.basepriceBaseAmount, + this.hasTierPrices, + this.hasDiscountsApplied, + this.discountName, + this.discountNamen, + this.discountDescription, + this.discountDescriptionn, + this.discountPercentage, + this.currency, + this.currencyn, + this.weight, + this.length, + this.width, + this.height, + this.availableStartDateTimeUtc, + this.availableEndDateTimeUtc, + this.displayOrder, + this.published, + this.deleted, + this.createdOnUtc, + this.updatedOnUtc, + this.productType, + this.parentGroupedProductId, + this.roleIds, + this.discountIds, + this.storeIds, + this.manufacturerIds, + this.reviews, + this.images, + this.attributes, + this.specifications, + this.associatedProductIds, + this.tags, + this.vendorId, + this.seName, + }); + + String? id; + bool? visibleIndividually; + String? name; + String? namen; + List? localizedNames; + String? shortDescription; + String? shortDescriptionn; + String? fullDescription; + String? fullDescriptionn; + bool? markasNew; + bool? showOnHomePage; +// dynamic metaKeywords; +// dynamic metaDescription; +// dynamic metaTitle; + bool? allowCustomerReviews; + dynamic approvedRatingSum; + dynamic notApprovedRatingSum; + dynamic approvedTotalReviews; + dynamic notApprovedTotalReviews; + String? sku; + bool? isRx; + bool? prescriptionRequired; + dynamic rxMessage; + dynamic rxMessagen; +// dynamic manufacturerPartNumber; +// dynamic gtin; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; + dynamic maxNumberOfDownloads; +// dynamic downloadExpirationDays; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; + dynamic recurringCycleLength; + dynamic recurringTotalCycles; + bool? isRental; + dynamic rentalPriceLength; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; + dynamic additionalShippingCharge; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; + dynamic manageInventoryMethodId; + dynamic stockQuantity; + String? stockAvailability; + String? stockAvailabilityn; + bool? displayStockAvailability; + bool? displayStockQuantity; + dynamic minStockQuantity; + dynamic notifyAdminForQuantityBelow; + bool? allowBackInStockSubscriptions; + dynamic orderMinimumQuantity; + dynamic orderMaximumQuantity; +// dynamic allowedQuantities; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; + dynamic preOrderAvailabilityStartDateTimeUtc; + bool? callForPrice; + double? price; + dynamic oldPrice; + double? productCost; + dynamic specialPrice; + dynamic specialPriceStartDateTimeUtc; + dynamic specialPriceEndDateTimeUtc; + bool? customerEntersPrice; + dynamic minimumCustomerEnteredPrice; + dynamic maximumCustomerEnteredPrice; + bool? basepriceEnabled; + dynamic basepriceAmount; + dynamic basepriceBaseAmount; + bool? hasTierPrices; + bool? hasDiscountsApplied; + dynamic discountName; + dynamic discountNamen; + dynamic discountDescription; + dynamic discountDescriptionn; + dynamic discountPercentage; + String? currency; + String? currencyn; + double? weight; + dynamic length; + dynamic width; + dynamic height; + dynamic availableStartDateTimeUtc; + dynamic availableEndDateTimeUtc; + dynamic displayOrder; + bool? published; + bool? deleted; + DateTime? createdOnUtc; + DateTime? updatedOnUtc; + String? productType; + dynamic parentGroupedProductId; + List? roleIds; + List? discountIds; + List? storeIds; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + List? associatedProductIds; + List? tags; + dynamic vendorId; + String? seName; + + factory Product.fromJson(Map json) => Product( + id: json["id"], + visibleIndividually: json["visible_individually"], + name: json["name"], + namen: json["namen"], + localizedNames: List.from(json["localized_names"].map((x) => LocalizedName.fromJson(x))), + shortDescription: json["short_description"], + shortDescriptionn: json["short_descriptionn"], + fullDescription: json["full_description"], + fullDescriptionn: json["full_descriptionn"], + markasNew: json["markas_new"], + showOnHomePage: json["show_on_home_page"], +// metaKeywords: json["meta_keywords"], +// metaDescription: json["meta_description"], +// metaTitle: json["meta_title"], + allowCustomerReviews: json["allow_customer_reviews"], + approvedRatingSum: json["approved_rating_sum"], + notApprovedRatingSum: json["not_approved_rating_sum"], + approvedTotalReviews: json["approved_total_reviews"], + notApprovedTotalReviews: json["not_approved_total_reviews"], + sku: json["sku"], + isRx: json["is_rx"], + prescriptionRequired: json["prescription_required"], + rxMessage: json["rx_message"] != null ? json["rx_message"] : "" , + rxMessagen: json["rx_messagen"] != null ? json["rx_messagen"] : "", +// manufacturerPartNumber: json["manufacturer_part_number"], +// gtin: json["gtin"], + isGiftCard: json["is_gift_card"], + requireOtherProducts: json["require_other_products"], + automaticallyAddRequiredProducts: json["automatically_add_required_products"], + isDownload: json["is_download"], + unlimitedDownloads: json["unlimited_downloads"], + maxNumberOfDownloads: json["max_number_of_downloads"], +// downloadExpirationDays: json["download_expiration_days"], + hasSampleDownload: json["has_sample_download"], + hasUserAgreement: json["has_user_agreement"], + isRecurring: json["is_recurring"], + recurringCycleLength: json["recurring_cycle_length"], + recurringTotalCycles: json["recurring_total_cycles"], + isRental: json["is_rental"], + rentalPriceLength: json["rental_price_length"], + isShipEnabled: json["is_ship_enabled"], + isFreeShipping: json["is_free_shipping"], + shipSeparately: json["ship_separately"], + additionalShippingCharge: json["additional_shipping_charge"], + isTaxExempt: json["is_tax_exempt"], + isTelecommunicationsOrBroadcastingOrElectronicServices: json["is_telecommunications_or_broadcasting_or_electronic_services"], + useMultipleWarehouses: json["use_multiple_warehouses"], + manageInventoryMethodId: json["manage_inventory_method_id"], + stockQuantity: json["stock_quantity"], + stockAvailability: json["stock_availability"], + stockAvailabilityn: json["stock_availabilityn"], + displayStockAvailability: json["display_stock_availability"], + displayStockQuantity: json["display_stock_quantity"], + minStockQuantity: json["min_stock_quantity"], + notifyAdminForQuantityBelow: json["notify_admin_for_quantity_below"], + allowBackInStockSubscriptions: json["allow_back_in_stock_subscriptions"], + orderMinimumQuantity: json["order_minimum_quantity"], + orderMaximumQuantity: json["order_maximum_quantity"], +// allowedQuantities: json["allowed_quantities"], + allowAddingOnlyExistingAttributeCombinations: json["allow_adding_only_existing_attribute_combinations"], + disableBuyButton: json["disable_buy_button"], + disableWishlistButton: json["disable_wishlist_button"], + availableForPreOrder: json["available_for_pre_order"], + preOrderAvailabilityStartDateTimeUtc: json["pre_order_availability_start_date_time_utc"] != null ? DateTime.parse(json["pre_order_availability_start_date_time_utc"]) : DateTime.now(), + callForPrice: json["call_for_price"], + price: json["price"].toDouble(), + oldPrice: json["old_price"], + productCost: json["product_cost"].toDouble(), + specialPrice: json["special_price"] != null ? json["special_price"] : 0.0 , + specialPriceStartDateTimeUtc: json["special_price_start_date_time_utc"] != null ? DateTime.parse(json["special_price_start_date_time_utc"]) : DateTime.now(), + specialPriceEndDateTimeUtc: json["special_price_end_date_time_utc"] != null ? DateTime.parse(json["special_price_end_date_time_utc"]) : DateTime.now(), + customerEntersPrice: json["customer_enters_price"], + minimumCustomerEnteredPrice: json["minimum_customer_entered_price"], + maximumCustomerEnteredPrice: json["maximum_customer_entered_price"], + basepriceEnabled: json["baseprice_enabled"], + basepriceAmount: json["baseprice_amount"], + basepriceBaseAmount: json["baseprice_base_amount"], + hasTierPrices: json["has_tier_prices"], + hasDiscountsApplied: json["has_discounts_applied"], + discountName: json["discount_name"], + discountNamen: json["discount_namen"], + discountDescription: json["discount_description"], + discountDescriptionn: json["discount_Descriptionn"], + discountPercentage: json["discount_percentage"], + currency: json["currency"], + currencyn: json["currencyn"], + weight: json["weight"].toDouble(), + length: json["length"], + width: json["width"], + height: json["height"], + availableStartDateTimeUtc: json["available_start_date_time_utc"], + availableEndDateTimeUtc: json["available_end_date_time_utc"], + displayOrder: json["display_order"], + published: json["published"], + deleted: json["deleted"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + updatedOnUtc: DateTime.parse(json["updated_on_utc"]), + productType: json["product_type"], + parentGroupedProductId: json["parent_grouped_product_id"], + roleIds: List.from(json["role_ids"].map((x) => x)), + discountIds: List.from(json["discount_ids"].map((x) => x)), + storeIds: List.from(json["store_ids"].map((x) => x)), + manufacturerIds: List.from(json["manufacturer_ids"].map((x) => x)), + reviews: List.from(json["reviews"].map((x) => x)), + images: List.from(json["images"].map((x) => Image.fromJson(x))), + attributes: List.from(json["attributes"].map((x) => x)), + specifications: List.from(json["specifications"].map((x) => Specification.fromJson(x))), + associatedProductIds: List.from(json["associated_product_ids"].map((x) => x)), + tags: List.from(json["tags"].map((x) => x)), + vendorId: json["vendor_id"], + seName: json["se_name"], + ); + + Map toJson() => { + "id": id, + "visible_individually": visibleIndividually, + "name": name, + "namen": namen, + "localized_names": List.from(localizedNames!.map((x) => x.toJson())), + "short_description": shortDescription, + "short_descriptionn": shortDescriptionn, + "full_description": fullDescription, + "full_descriptionn": fullDescriptionn, + "markas_new": markasNew, + "show_on_home_page": showOnHomePage, +// "meta_keywords": metaKeywords, +// "meta_description": metaDescription, +// "meta_title": metaTitle, + "allow_customer_reviews": allowCustomerReviews, + "approved_rating_sum": approvedRatingSum, + "not_approved_rating_sum": notApprovedRatingSum, + "approved_total_reviews": approvedTotalReviews, + "not_approved_total_reviews": notApprovedTotalReviews, + "sku": sku, + "is_rx": isRx, + "prescription_required": prescriptionRequired, + "rx_message": rxMessage, + "rx_messagen": rxMessagen, +// "manufacturer_part_number": manufacturerPartNumber, +// "gtin": gtin, + "is_gift_card": isGiftCard, + "require_other_products": requireOtherProducts, + "automatically_add_required_products": automaticallyAddRequiredProducts, + "is_download": isDownload, + "unlimited_downloads": unlimitedDownloads, + "max_number_of_downloads": maxNumberOfDownloads, +// "download_expiration_days": downloadExpirationDays, + "has_sample_download": hasSampleDownload, + "has_user_agreement": hasUserAgreement, + "is_recurring": isRecurring, + "recurring_cycle_length": recurringCycleLength, + "recurring_total_cycles": recurringTotalCycles, + "is_rental": isRental, + "rental_price_length": rentalPriceLength, + "is_ship_enabled": isShipEnabled, + "is_free_shipping": isFreeShipping, + "ship_separately": shipSeparately, + "additional_shipping_charge": additionalShippingCharge, + "is_tax_exempt": isTaxExempt, + "is_telecommunications_or_broadcasting_or_electronic_services": isTelecommunicationsOrBroadcastingOrElectronicServices, + "use_multiple_warehouses": useMultipleWarehouses, + "manage_inventory_method_id": manageInventoryMethodId, + "stock_quantity": stockQuantity, + "stock_availability": stockAvailability, + "stock_availabilityn": stockAvailabilityn, + "display_stock_availability": displayStockAvailability, + "display_stock_quantity": displayStockQuantity, + "min_stock_quantity": minStockQuantity, + "notify_admin_for_quantity_below": notifyAdminForQuantityBelow, + "allow_back_in_stock_subscriptions": allowBackInStockSubscriptions, + "order_minimum_quantity": orderMinimumQuantity, + "order_maximum_quantity": orderMaximumQuantity, +// "allowed_quantities": allowedQuantities, + "allow_adding_only_existing_attribute_combinations": allowAddingOnlyExistingAttributeCombinations, + "disable_buy_button": disableBuyButton, + "disable_wishlist_button": disableWishlistButton, + "available_for_pre_order": availableForPreOrder, + "pre_order_availability_start_date_time_utc": preOrderAvailabilityStartDateTimeUtc, + "call_for_price": callForPrice, + "price": price, + "old_price": oldPrice, + "product_cost": productCost, + "special_price": specialPrice, + "special_price_start_date_time_utc": specialPriceStartDateTimeUtc, + "special_price_end_date_time_utc": specialPriceEndDateTimeUtc, + "customer_enters_price": customerEntersPrice, + "minimum_customer_entered_price": minimumCustomerEnteredPrice, + "maximum_customer_entered_price": maximumCustomerEnteredPrice, + "baseprice_enabled": basepriceEnabled, + "baseprice_amount": basepriceAmount, + "baseprice_base_amount": basepriceBaseAmount, + "has_tier_prices": hasTierPrices, + "has_discounts_applied": hasDiscountsApplied, + "discount_name": discountName, + "discount_namen": discountNamen, + "discount_description": discountDescription, + "discount_Descriptionn": discountDescriptionn, + "discount_percentage": discountPercentage, + "currency": currency, + "currencyn": currencyn, + "weight": weight, + "length": length, + "width": width, + "height": height, + "available_start_date_time_utc": availableStartDateTimeUtc, + "available_end_date_time_utc": availableEndDateTimeUtc, + "display_order": displayOrder, + "published": published, + "deleted": deleted, + "created_on_utc": createdOnUtc!.toIso8601String(), + "updated_on_utc": updatedOnUtc!.toIso8601String(), + "product_type": productType, + "parent_grouped_product_id": parentGroupedProductId, + "role_ids": List.from(roleIds!.map((x) => x)), + "discount_ids": List.from(discountIds!.map((x) => x)), + "store_ids": List.from(storeIds!.map((x) => x)), + "manufacturer_ids": List.from(manufacturerIds!.map((x) => x)), + "reviews": List.from(reviews!.map((x) => x)), + "images": List.from(images!.map((x) => x.toJson())), + "attributes": List.from(attributes!.map((x) => x)), + "specifications": List.from(specifications!.map((x) => x.toJson())), + "associated_product_ids": List.from(associatedProductIds!.map((x) => x)), + "tags": List.from(tags!.map((x) => x)), + "vendor_id": vendorId, + "se_name": seName, + }; +} + +class Image { + Image({ + this.id, + this.position, + this.src, + this.thumb, + this.attachment, + }); + + dynamic id; + dynamic position; + String? src; + String? thumb; + String? attachment; + + factory Image.fromJson(Map json) => Image( + id: json["id"], + position: json["position"], + src: json["src"], + thumb: json["thumb"], + attachment: json["attachment"], + ); + + Map toJson() => { + "id": id, + "position": position, + "src": src, + "thumb": thumb, + "attachment": attachment, + }; +} + +class LocalizedName { + LocalizedName({ + this.languageId, + this.localizedName, + }); + + dynamic languageId; + String? localizedName; + + factory LocalizedName.fromJson(Map json) => LocalizedName( + languageId: json["language_id"], + localizedName: json["localized_name"], + ); + + Map toJson() => { + "language_id": languageId, + "localized_name": localizedName, + }; +} + +class Specification { + Specification({ + this.id, + this.displayOrder, + this.defaultValue, + this.defaultValuen, + this.name, + this.nameN, + }); + + dynamic id; + dynamic displayOrder; + String? defaultValue; + String? defaultValuen; + String? name; + String? nameN; + + factory Specification.fromJson(Map json) => Specification( + id: json["id"], + displayOrder: json["display_order"], + defaultValue: json["default_value"], + defaultValuen: json["default_valuen"], + name: json["name"], + nameN: json["nameN"], + ); + + Map toJson() => { + "id": id, + "display_order": displayOrder, + "default_value": defaultValue, + "default_valuen": defaultValuen, + "name": name, + "nameN": nameN, + }; +} + +class EnumValues { + Map? map; + Map? reverseMap; + + EnumValues(this.map); + + Map get reverse { + if (reverseMap == null) { + reverseMap = map!.map((k, v) => new MapEntry(v, k)); + } + return reverseMap!; + } +} diff --git a/lib/models/pharmacy/addToCartModel.dart b/lib/models/pharmacy/addToCartModel.dart new file mode 100644 index 00000000..d9fac131 --- /dev/null +++ b/lib/models/pharmacy/addToCartModel.dart @@ -0,0 +1,924 @@ +// To parse this JSON data, do +// +// final shoppingCart = shoppingCartFromJson(jsonString); + +import 'dart:convert'; + +ShoppingCart shoppingCartFromJson(String str) => ShoppingCart.fromJson(json.decode(str)); + +String shoppingCartToJson(ShoppingCart data) => json.encode(data.toJson()); + +class ShoppingCart { + ShoppingCart({ + this.itemCount, + this.quantityCount, + this.subtotal, + this.subtotalWithVat, + this.subtotalVatAmount, + this.subtotalVatRate, + this.shoppingCarts, + }); + + int? itemCount; + int? quantityCount; + double? subtotal; + double? subtotalWithVat; + double? subtotalVatAmount; + int? subtotalVatRate; + List? shoppingCarts; + + factory ShoppingCart.fromJson(Map json) => ShoppingCart( + itemCount: json["item_count"], + quantityCount: json["quantity_count"], + subtotal: json["subtotal"].toDouble(), + subtotalWithVat: json["subtotal_with_vat"].toDouble(), + subtotalVatAmount: json["subtotal_vat_amount"].toDouble(), + subtotalVatRate: json["subtotal_vat_rate"], + shoppingCarts: List.from(json["shopping_carts"].map((x) => ShoppingCartElement.fromJson(x))), + ); + + Map toJson() => { + "item_count": itemCount, + "quantity_count": quantityCount, + "subtotal": subtotal, + "subtotal_with_vat": subtotalWithVat, + "subtotal_vat_amount": subtotalVatAmount, + "subtotal_vat_rate": subtotalVatRate, + "shopping_carts": List.from(shoppingCarts!.map((x) => x.toJson())), + }; +} + +class ShoppingCartElement { + ShoppingCartElement({ + this.languageId, + this.id, + this.productAttributes, + this.customerEnteredPrice, + this.quantity, + this.discountAmountInclTax, + this.subtotal, + this.subtotalWithVat, + this.subtotalVatAmount, + this.subtotalVatRate, + this.currency, + this.currencyn, + this.rentalStartDateUtc, + this.rentalEndDateUtc, + this.createdOnUtc, + this.updatedOnUtc, + this.shoppingCartType, + this.productId, + this.product, + this.customerId, + this.customer, + }); + + int? languageId; + String ?id; + List? productAttributes; + int? customerEnteredPrice; + int? quantity; + dynamic discountAmountInclTax; + String? subtotal; + String? subtotalWithVat; + String? subtotalVatAmount; + String? subtotalVatRate; + String? currency; + String? currencyn; + dynamic rentalStartDateUtc; + dynamic rentalEndDateUtc; + DateTime? createdOnUtc; + DateTime? updatedOnUtc; + String? shoppingCartType; + int? productId; + Product? product; + int? customerId; + Customer? customer; + + factory ShoppingCartElement.fromJson(Map json) => ShoppingCartElement( + languageId: json["language_id"], + id: json["id"], + productAttributes: List.from(json["product_attributes"].map((x) => x)), + customerEnteredPrice: json["customer_entered_price"], + quantity: json["quantity"], + discountAmountInclTax: json["discount_amount_incl_tax"], + subtotal: json["subtotal"], + subtotalWithVat: json["subtotal_with_vat"], + subtotalVatAmount: json["subtotal_vat_amount"], + subtotalVatRate: json["subtotal_vat_rate"], + currency: json["currency"], + currencyn: json["currencyn"], + rentalStartDateUtc: json["rental_start_date_utc"], + rentalEndDateUtc: json["rental_end_date_utc"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + updatedOnUtc: DateTime.parse(json["updated_on_utc"]), + shoppingCartType: json["shopping_cart_type"], + productId: json["product_id"], + product: Product.fromJson(json["product"]), + customerId: json["customer_id"], + customer: Customer.fromJson(json["customer"]), + ); + + Map toJson() => { + "language_id": languageId, + "id": id, + "product_attributes": List.from(productAttributes!.map((x) => x)), + "customer_entered_price": customerEnteredPrice, + "quantity": quantity, + "discount_amount_incl_tax": discountAmountInclTax, + "subtotal": subtotal, + "subtotal_with_vat": subtotalWithVat, + "subtotal_vat_amount": subtotalVatAmount, + "subtotal_vat_rate": subtotalVatRate, + "currency": currency, + "currencyn": currencyn, + "rental_start_date_utc": rentalStartDateUtc, + "rental_end_date_utc": rentalEndDateUtc, + "created_on_utc": createdOnUtc!.toIso8601String(), + "updated_on_utc": updatedOnUtc!.toIso8601String(), + "shopping_cart_type": shoppingCartType, + "product_id": productId, + "product": product!.toJson(), + "customer_id": customerId, + "customer": customer!.toJson(), + }; +} + +class Customer { + Customer({ + this.billingAddress, + this.shippingAddress, + this.addresses, + this.id, + this.username, + this.email, + this.firstName, + this.lastName, + this.languageId, + this.adminComment, + this.isTaxExempt, + this.hasShoppingCartItems, + this.active, + this.deleted, + this.isSystemAccount, + this.systemName, + this.lastIpAddress, + this.createdOnUtc, + this.lastLoginDateUtc, + this.lastActivityDateUtc, + this.registeredInStoreId, + this.roleIds, + }); + + Address? billingAddress; + Address? shippingAddress; + List
? addresses; + String? id; + String? username; + String? email; + dynamic firstName; + dynamic lastName; + dynamic languageId; + dynamic adminComment; + bool? isTaxExempt; + bool? hasShoppingCartItems; + bool? active; + bool? deleted; + bool? isSystemAccount; + dynamic systemName; + String?lastIpAddress; + DateTime? createdOnUtc; + DateTime? lastLoginDateUtc; + DateTime? lastActivityDateUtc; + int? registeredInStoreId; + List? roleIds; + + factory Customer.fromJson(Map json) => Customer( + billingAddress: Address.fromJson(json["billing_address"]), + shippingAddress: Address.fromJson(json["shipping_address"]), + addresses: List
.from(json["addresses"].map((x) => Address.fromJson(x))), + id: json["id"], + username: json["username"], + email: json["email"], + firstName: json["first_name"], + lastName: json["last_name"], + languageId: json["language_id"], + adminComment: json["admin_comment"], + isTaxExempt: json["is_tax_exempt"], + hasShoppingCartItems: json["has_shopping_cart_items"], + active: json["active"], + deleted: json["deleted"], + isSystemAccount: json["is_system_account"], + systemName: json["system_name"], + lastIpAddress: json["last_ip_address"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + lastLoginDateUtc: DateTime.parse(json["last_login_date_utc"]), + lastActivityDateUtc: DateTime.parse(json["last_activity_date_utc"]), + registeredInStoreId: json["registered_in_store_id"], + roleIds: List.from(json["role_ids"].map((x) => x)), + ); + + Map toJson() => { + "billing_address": billingAddress!.toJson(), + "shipping_address": shippingAddress!.toJson(), + "addresses": List.from(addresses!.map((x) => x.toJson())), + "id": id, + "username": username, + "email": email, + "first_name": firstName, + "last_name": lastName, + "language_id": languageId, + "admin_comment": adminComment, + "is_tax_exempt": isTaxExempt, + "has_shopping_cart_items": hasShoppingCartItems, + "active": active, + "deleted": deleted, + "is_system_account": isSystemAccount, + "system_name": systemName, + "last_ip_address": lastIpAddress, + "created_on_utc": createdOnUtc!.toIso8601String(), + "last_login_date_utc": lastLoginDateUtc!.toIso8601String(), + "last_activity_date_utc": lastActivityDateUtc!.toIso8601String(), + "registered_in_store_id": registeredInStoreId, + "role_ids": List.from(roleIds!.map((x) => x)), + }; +} + +class Address { + Address({ + this.id, + this.firstName, + this.lastName, + this.email, + this.company, + this.countryId, + this.country, + this.stateProvinceId, + this.city, + this.address1, + this.address2, + this.zipPostalCode, + this.phoneNumber, + this.faxNumber, + this.customerAttributes, + this.createdOnUtc, + this.province, + this.latLong, + }); + + String? id; + FirstName? firstName; + LastName? lastName; + Email? email; + dynamic company; + int? countryId; + Country? country; + dynamic stateProvinceId; + City? city; + String? address1; + String? address2; + String? zipPostalCode; + String? phoneNumber; + dynamic faxNumber; + String? customerAttributes; + DateTime? createdOnUtc; + dynamic province; + String? latLong; + + factory Address.fromJson(Map json) => Address( + id: json["id"], + firstName: firstNameValues.map![json["first_name"]], + lastName: lastNameValues.map![json["last_name"]], + email: emailValues.map![json["email"]], + company: json["company"], + countryId: json["country_id"], + country: countryValues.map![json["country"]], + stateProvinceId: json["state_province_id"], + city: cityValues.map![json["city"]], + address1: json["address1"], + address2: json["address2"], + zipPostalCode: json["zip_postal_code"], + phoneNumber: json["phone_number"], + faxNumber: json["fax_number"], + customerAttributes: json["customer_attributes"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + province: json["province"], + latLong: json["lat_long"], + ); + + Map toJson() => { + "id": id, + "first_name": firstNameValues.reverse[firstName], + "last_name": lastNameValues.reverse[lastName], + "email": emailValues.reverse[email], + "company": company, + "country_id": countryId, + "country": countryValues.reverse[country], + "state_province_id": stateProvinceId, + "city": cityValues.reverse[city], + "address1": address1, + "address2": address2, + "zip_postal_code": zipPostalCode, + "phone_number": phoneNumber, + "fax_number": faxNumber, + "customer_attributes": customerAttributes, + "created_on_utc": createdOnUtc!.toIso8601String(), + "province": province, + "lat_long": latLong, + }; +} + +enum City { CALIFORNIA, RIYADH, AL_OYUN } + +final cityValues = EnumValues({ + "Al Oyun": City.AL_OYUN, + "California": City.CALIFORNIA, + "Riyadh": City.RIYADH +}); + +enum Country { UNITED_STATES, SAUDI_ARABIA } + +final countryValues = EnumValues({ + "Saudi Arabia": Country.SAUDI_ARABIA, + "United States": Country.UNITED_STATES +}); + +enum Email { TAMER_FANASHEH_GMAIL_COM, TAMER_DASDASDAS_GMAIL_COM, TAMER_F_CLOUDSOLUTION_SA_COM } + +final emailValues = EnumValues({ + "Tamer.dasdasdas@gmail.com": Email.TAMER_DASDASDAS_GMAIL_COM, + "Tamer.fanasheh@gmail.com": Email.TAMER_FANASHEH_GMAIL_COM, + "Tamer.F@cloudsolution-sa.com": Email.TAMER_F_CLOUDSOLUTION_SA_COM +}); + +enum FirstName { TAMER, TAMER_FANASHEH } + +final firstNameValues = EnumValues({ + "TAMER": FirstName.TAMER, + "TAMER FANASHEH": FirstName.TAMER_FANASHEH +}); + +enum LastName { FANASHEH, MUSA } + +final lastNameValues = EnumValues({ + "FANASHEH": LastName.FANASHEH, + "MUSA": LastName.MUSA +}); + +class Product { + Product({ + this.id, + this.visibleIndividually, + this.name, + this.namen, + this.localizedNames, + this.shortDescription, + this.shortDescriptionn, + this.fullDescription, + this.fullDescriptionn, + this.markasNew, + this.showOnHomePage, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.allowCustomerReviews, + this.approvedRatingSum, + this.notApprovedRatingSum, + this.approvedTotalReviews, + this.notApprovedTotalReviews, + this.sku, + this.isRx, + this.prescriptionRequired, + this.rxMessage, + this.rxMessagen, + this.manufacturerPartNumber, + this.gtin, + this.isGiftCard, + this.requireOtherProducts, + this.automaticallyAddRequiredProducts, + this.isDownload, + this.unlimitedDownloads, + this.maxNumberOfDownloads, + this.downloadExpirationDays, + this.hasSampleDownload, + this.hasUserAgreement, + this.isRecurring, + this.recurringCycleLength, + this.recurringTotalCycles, + this.isRental, + this.rentalPriceLength, + this.isShipEnabled, + this.isFreeShipping, + this.shipSeparately, + this.additionalShippingCharge, + this.isTaxExempt, + this.isTelecommunicationsOrBroadcastingOrElectronicServices, + this.useMultipleWarehouses, + this.manageInventoryMethodId, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.displayStockAvailability, + this.displayStockQuantity, + this.minStockQuantity, + this.notifyAdminForQuantityBelow, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, + this.allowedQuantities, + this.allowAddingOnlyExistingAttributeCombinations, + this.disableBuyButton, + this.disableWishlistButton, + this.availableForPreOrder, + this.preOrderAvailabilityStartDateTimeUtc, + this.callForPrice, + this.price, + this.oldPrice, + this.productCost, + this.specialPrice, + this.specialPriceStartDateTimeUtc, + this.specialPriceEndDateTimeUtc, + this.customerEntersPrice, + this.minimumCustomerEnteredPrice, + this.maximumCustomerEnteredPrice, + this.basepriceEnabled, + this.basepriceAmount, + this.basepriceBaseAmount, + this.hasTierPrices, + this.hasDiscountsApplied, + this.discountName, + this.discountNamen, + this.discountDescription, + this.discountDescriptionn, + this.discountPercentage, + this.currency, + this.currencyn, + this.weight, + this.length, + this.width, + this.height, + this.availableStartDateTimeUtc, + this.availableEndDateTimeUtc, + this.displayOrder, + this.published, + this.deleted, + this.createdOnUtc, + this.updatedOnUtc, + this.productType, + this.parentGroupedProductId, + this.roleIds, + this.discountIds, + this.storeIds, + this.manufacturerIds, + this.reviews, + this.images, + this.attributes, + this.specifications, + this.associatedProductIds, + this.tags, + this.vendorId, + this.seName, + }); + + String? id; + bool? visibleIndividually; + String? name; + String? namen; + List? localizedNames; + String? shortDescription; + String? shortDescriptionn; + String? fullDescription; + String? fullDescriptionn; + bool? markasNew; + bool? showOnHomePage; + String? metaKeywords; + String? metaDescription; + String? metaTitle; + bool? allowCustomerReviews; + int? approvedRatingSum; + int? notApprovedRatingSum; + int? approvedTotalReviews; + int? notApprovedTotalReviews; + String? sku; + bool? isRx; + bool? prescriptionRequired; + dynamic rxMessage; + dynamic rxMessagen; + dynamic manufacturerPartNumber; + dynamic gtin; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; + int? maxNumberOfDownloads; + dynamic downloadExpirationDays; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; + int? recurringCycleLength; + int? recurringTotalCycles; + bool? isRental; + int? rentalPriceLength; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; + int? additionalShippingCharge; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; + int? manageInventoryMethodId; + int? stockQuantity; + String? stockAvailability; + String? stockAvailabilityn; + bool? displayStockAvailability; + bool? displayStockQuantity; + int? minStockQuantity; + int? notifyAdminForQuantityBelow; + bool? allowBackInStockSubscriptions; + int? orderMinimumQuantity; + int? orderMaximumQuantity; + dynamic allowedQuantities; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; + dynamic preOrderAvailabilityStartDateTimeUtc; + bool? callForPrice; + double? price; + int? oldPrice; + double? productCost; + dynamic specialPrice; + dynamic specialPriceStartDateTimeUtc; + dynamic specialPriceEndDateTimeUtc; + bool? customerEntersPrice; + int? minimumCustomerEnteredPrice; + int? maximumCustomerEnteredPrice; + bool? basepriceEnabled; + int? basepriceAmount; + int? basepriceBaseAmount; + bool? hasTierPrices; + bool? hasDiscountsApplied; + dynamic discountName; + dynamic discountNamen; + dynamic discountDescription; + dynamic discountDescriptionn; + dynamic discountPercentage; + String? currency; + String? currencyn; + double? weight; + int? length; + int? width; + int? height; + dynamic availableStartDateTimeUtc; + dynamic availableEndDateTimeUtc; + int? displayOrder; + bool? published; + bool? deleted; + DateTime? createdOnUtc; + DateTime? updatedOnUtc; + String? productType; + int? parentGroupedProductId; + List? roleIds; + List? discountIds; + List? storeIds; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + List? associatedProductIds; + List? tags; + int? vendorId; + String? seName; + + factory Product.fromJson(Map json) => Product( + id: json["id"], + visibleIndividually: json["visible_individually"], + name: json["name"], + namen: json["namen"], + localizedNames: List.from(json["localized_names"].map((x) => LocalizedName.fromJson(x))), + shortDescription: json["short_description"], + shortDescriptionn: json["short_descriptionn"], + fullDescription: json["full_description"], + fullDescriptionn: json["full_descriptionn"], + markasNew: json["markas_new"], + showOnHomePage: json["show_on_home_page"], + metaKeywords: json["meta_keywords"] == null ? null : json["meta_keywords"], + metaDescription: json["meta_description"] == null ? null : json["meta_description"], + metaTitle: json["meta_title"] == null ? null : json["meta_title"], + allowCustomerReviews: json["allow_customer_reviews"], + approvedRatingSum: json["approved_rating_sum"], + notApprovedRatingSum: json["not_approved_rating_sum"], + approvedTotalReviews: json["approved_total_reviews"], + notApprovedTotalReviews: json["not_approved_total_reviews"], + sku: json["sku"], + isRx: json["is_rx"], + prescriptionRequired: json["prescription_required"], + rxMessage: json["rx_message"], + rxMessagen: json["rx_messagen"], + manufacturerPartNumber: json["manufacturer_part_number"], + gtin: json["gtin"], + isGiftCard: json["is_gift_card"], + requireOtherProducts: json["require_other_products"], + automaticallyAddRequiredProducts: json["automatically_add_required_products"], + isDownload: json["is_download"], + unlimitedDownloads: json["unlimited_downloads"], + maxNumberOfDownloads: json["max_number_of_downloads"], + downloadExpirationDays: json["download_expiration_days"], + hasSampleDownload: json["has_sample_download"], + hasUserAgreement: json["has_user_agreement"], + isRecurring: json["is_recurring"], + recurringCycleLength: json["recurring_cycle_length"], + recurringTotalCycles: json["recurring_total_cycles"], + isRental: json["is_rental"], + rentalPriceLength: json["rental_price_length"], + isShipEnabled: json["is_ship_enabled"], + isFreeShipping: json["is_free_shipping"], + shipSeparately: json["ship_separately"], + additionalShippingCharge: json["additional_shipping_charge"], + isTaxExempt: json["is_tax_exempt"], + isTelecommunicationsOrBroadcastingOrElectronicServices: json["is_telecommunications_or_broadcasting_or_electronic_services"], + useMultipleWarehouses: json["use_multiple_warehouses"], + manageInventoryMethodId: json["manage_inventory_method_id"], + stockQuantity: json["stock_quantity"], + stockAvailability: json["stock_availability"], + stockAvailabilityn: json["stock_availabilityn"], + displayStockAvailability: json["display_stock_availability"], + displayStockQuantity: json["display_stock_quantity"], + minStockQuantity: json["min_stock_quantity"], + notifyAdminForQuantityBelow: json["notify_admin_for_quantity_below"], + allowBackInStockSubscriptions: json["allow_back_in_stock_subscriptions"], + orderMinimumQuantity: json["order_minimum_quantity"], + orderMaximumQuantity: json["order_maximum_quantity"], + allowedQuantities: json["allowed_quantities"], + allowAddingOnlyExistingAttributeCombinations: json["allow_adding_only_existing_attribute_combinations"], + disableBuyButton: json["disable_buy_button"], + disableWishlistButton: json["disable_wishlist_button"], + availableForPreOrder: json["available_for_pre_order"], + preOrderAvailabilityStartDateTimeUtc: json["pre_order_availability_start_date_time_utc"], + callForPrice: json["call_for_price"], + price: json["price"].toDouble(), + oldPrice: json["old_price"], + productCost: json["product_cost"].toDouble(), + specialPrice: json["special_price"], + specialPriceStartDateTimeUtc: json["special_price_start_date_time_utc"], + specialPriceEndDateTimeUtc: json["special_price_end_date_time_utc"], + customerEntersPrice: json["customer_enters_price"], + minimumCustomerEnteredPrice: json["minimum_customer_entered_price"], + maximumCustomerEnteredPrice: json["maximum_customer_entered_price"], + basepriceEnabled: json["baseprice_enabled"], + basepriceAmount: json["baseprice_amount"], + basepriceBaseAmount: json["baseprice_base_amount"], + hasTierPrices: json["has_tier_prices"], + hasDiscountsApplied: json["has_discounts_applied"], + discountName: json["discount_name"], + discountNamen: json["discount_namen"], + discountDescription: json["discount_description"], + discountDescriptionn: json["discount_Descriptionn"], + discountPercentage: json["discount_percentage"], + currency: json["currency"], + currencyn: json["currencyn"], + weight: json["weight"].toDouble(), + length: json["length"], + width: json["width"], + height: json["height"], + availableStartDateTimeUtc: json["available_start_date_time_utc"], + availableEndDateTimeUtc: json["available_end_date_time_utc"], + displayOrder: json["display_order"], + published: json["published"], + deleted: json["deleted"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + updatedOnUtc: DateTime.parse(json["updated_on_utc"]), + productType: json["product_type"], + parentGroupedProductId: json["parent_grouped_product_id"], + roleIds: List.from(json["role_ids"].map((x) => x)), + discountIds: List.from(json["discount_ids"].map((x) => x)), + storeIds: List.from(json["store_ids"].map((x) => x)), + manufacturerIds: List.from(json["manufacturer_ids"].map((x) => x)), + reviews: List.from(json["reviews"].map((x) => x)), + images: List.from(json["images"].map((x) => Image.fromJson(x))), + attributes: List.from(json["attributes"].map((x) => x)), + specifications: List.from(json["specifications"].map((x) => Specification.fromJson(x))), + associatedProductIds: List.from(json["associated_product_ids"].map((x) => x)), + tags: List.from(json["tags"].map((x) => x)), + vendorId: json["vendor_id"], + seName: json["se_name"], + ); + + Map toJson() => { + "id": id, + "visible_individually": visibleIndividually, + "name": name, + "namen": namen, + "localized_names": List.from(localizedNames!.map((x) => x.toJson())), + "short_description": shortDescription, + "short_descriptionn": shortDescriptionn, + "full_description": fullDescription, + "full_descriptionn": fullDescriptionn, + "markas_new": markasNew, + "show_on_home_page": showOnHomePage, + "meta_keywords": metaKeywords == null ? null : metaKeywords, + "meta_description": metaDescription == null ? null : metaDescription, + "meta_title": metaTitle == null ? null : metaTitle, + "allow_customer_reviews": allowCustomerReviews, + "approved_rating_sum": approvedRatingSum, + "not_approved_rating_sum": notApprovedRatingSum, + "approved_total_reviews": approvedTotalReviews, + "not_approved_total_reviews": notApprovedTotalReviews, + "sku": sku, + "is_rx": isRx, + "prescription_required": prescriptionRequired, + "rx_message": rxMessage, + "rx_messagen": rxMessagen, + "manufacturer_part_number": manufacturerPartNumber, + "gtin": gtin, + "is_gift_card": isGiftCard, + "require_other_products": requireOtherProducts, + "automatically_add_required_products": automaticallyAddRequiredProducts, + "is_download": isDownload, + "unlimited_downloads": unlimitedDownloads, + "max_number_of_downloads": maxNumberOfDownloads, + "download_expiration_days": downloadExpirationDays, + "has_sample_download": hasSampleDownload, + "has_user_agreement": hasUserAgreement, + "is_recurring": isRecurring, + "recurring_cycle_length": recurringCycleLength, + "recurring_total_cycles": recurringTotalCycles, + "is_rental": isRental, + "rental_price_length": rentalPriceLength, + "is_ship_enabled": isShipEnabled, + "is_free_shipping": isFreeShipping, + "ship_separately": shipSeparately, + "additional_shipping_charge": additionalShippingCharge, + "is_tax_exempt": isTaxExempt, + "is_telecommunications_or_broadcasting_or_electronic_services": isTelecommunicationsOrBroadcastingOrElectronicServices, + "use_multiple_warehouses": useMultipleWarehouses, + "manage_inventory_method_id": manageInventoryMethodId, + "stock_quantity": stockQuantity, + "stock_availability": stockAvailability, + "stock_availabilityn": stockAvailabilityn, + "display_stock_availability": displayStockAvailability, + "display_stock_quantity": displayStockQuantity, + "min_stock_quantity": minStockQuantity, + "notify_admin_for_quantity_below": notifyAdminForQuantityBelow, + "allow_back_in_stock_subscriptions": allowBackInStockSubscriptions, + "order_minimum_quantity": orderMinimumQuantity, + "order_maximum_quantity": orderMaximumQuantity, + "allowed_quantities": allowedQuantities, + "allow_adding_only_existing_attribute_combinations": allowAddingOnlyExistingAttributeCombinations, + "disable_buy_button": disableBuyButton, + "disable_wishlist_button": disableWishlistButton, + "available_for_pre_order": availableForPreOrder, + "pre_order_availability_start_date_time_utc": preOrderAvailabilityStartDateTimeUtc, + "call_for_price": callForPrice, + "price": price, + "old_price": oldPrice, + "product_cost": productCost, + "special_price": specialPrice, + "special_price_start_date_time_utc": specialPriceStartDateTimeUtc, + "special_price_end_date_time_utc": specialPriceEndDateTimeUtc, + "customer_enters_price": customerEntersPrice, + "minimum_customer_entered_price": minimumCustomerEnteredPrice, + "maximum_customer_entered_price": maximumCustomerEnteredPrice, + "baseprice_enabled": basepriceEnabled, + "baseprice_amount": basepriceAmount, + "baseprice_base_amount": basepriceBaseAmount, + "has_tier_prices": hasTierPrices, + "has_discounts_applied": hasDiscountsApplied, + "discount_name": discountName, + "discount_namen": discountNamen, + "discount_description": discountDescription, + "discount_Descriptionn": discountDescriptionn, + "discount_percentage": discountPercentage, + "currency": currency, + "currencyn": currencyn, + "weight": weight, + "length": length, + "width": width, + "height": height, + "available_start_date_time_utc": availableStartDateTimeUtc, + "available_end_date_time_utc": availableEndDateTimeUtc, + "display_order": displayOrder, + "published": published, + "deleted": deleted, + "created_on_utc": createdOnUtc!.toIso8601String(), + "updated_on_utc": updatedOnUtc!.toIso8601String(), + "product_type": productType, + "parent_grouped_product_id": parentGroupedProductId, + "role_ids": List.from(roleIds!.map((x) => x)), + "discount_ids": List.from(discountIds!.map((x) => x)), + "store_ids": List.from(storeIds!.map((x) => x)), + "manufacturer_ids": List.from(manufacturerIds!.map((x) => x)), + "reviews": List.from(reviews!.map((x) => x)), + "images": List.from(images!.map((x) => x.toJson())), + "attributes": List.from(attributes!.map((x) => x)), + "specifications": List.from(specifications!.map((x) => x.toJson())), + "associated_product_ids": List.from(associatedProductIds!.map((x) => x)), + "tags": List.from(tags!.map((x) => x)), + "vendor_id": vendorId, + "se_name": seName, + }; +} + +class Image { + Image({ + this.id, + this.position, + this.src, + this.thumb, + this.attachment, + }); + + int? id; + int? position; + String? src; + String? thumb; + String? attachment; + + factory Image.fromJson(Map json) => Image( + id: json["id"], + position: json["position"], + src: json["src"], + thumb: json["thumb"], + attachment: json["attachment"], + ); + + Map toJson() => { + "id": id, + "position": position, + "src": src, + "thumb": thumb, + "attachment": attachment, + }; +} + +class LocalizedName { + LocalizedName({ + this.languageId, + this.localizedName, + }); + + int? languageId; + String? localizedName; + + factory LocalizedName.fromJson(Map json) => LocalizedName( + languageId: json["language_id"], + localizedName: json["localized_name"], + ); + + Map toJson() => { + "language_id": languageId, + "localized_name": localizedName, + }; +} + +class Specification { + Specification({ + this.id, + this.displayOrder, + this.defaultValue, + this.defaultValuen, + this.name, + this.nameN, + }); + + int? id; + int? displayOrder; + String? defaultValue; + String? defaultValuen; + String? name; + String? nameN; + + factory Specification.fromJson(Map json) => Specification( + id: json["id"], + displayOrder: json["display_order"], + defaultValue: json["default_value"], + defaultValuen: json["default_valuen"], + name: json["name"], + nameN: json["nameN"], + ); + + Map toJson() => { + "id": id, + "display_order": displayOrder, + "default_value": defaultValue, + "default_valuen": defaultValuen, + "name": name, + "nameN": nameN, + }; +} + +class EnumValues { + Map? map; + Map? reverseMap; + + EnumValues(this.map); + + Map get reverse { + if (reverseMap == null) { + reverseMap = map!.map((k, v) => new MapEntry(v, k)); + } + return reverseMap!; + } +} diff --git a/lib/models/pharmacy/brandModel.dart b/lib/models/pharmacy/brandModel.dart new file mode 100644 index 00000000..c1a64c2f --- /dev/null +++ b/lib/models/pharmacy/brandModel.dart @@ -0,0 +1,137 @@ +// To parse this JSON data, do +// +// final brand = brandFromJson(jsonString); + +import 'dart:convert'; + +List brandFromJson(String str) => List.from(json.decode(str).map((x) => Brand.fromJson(x))); + +String brandToJson(List data) => json.encode(List.from(data.map((x) => x.toJson()))); + +class Brand { + Brand({ + this.id, + this.name, + this.namen, + this.localizedNames, + this.description, + this.manufacturerTemplateId, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.pageSize, + this.pageSizeOptions, + this.priceRanges, + this.published, + this.deleted, + this.displayOrder, + this.createdOnUtc, + this.updatedOnUtc, + this.image, + }); + + String? id; + String? name; + String? namen; + List? localizedNames; + String? description; + int? manufacturerTemplateId; + String? metaKeywords; + dynamic metaDescription; + dynamic metaTitle; + int? pageSize; + String? pageSizeOptions; + dynamic priceRanges; + bool? published; + bool? deleted; + int? displayOrder; + DateTime? createdOnUtc; + DateTime? updatedOnUtc; + Image? image; + + factory Brand.fromJson(Map json) => Brand( + id: json["id"], + name: json["name"], + namen: json["namen"], + localizedNames: List.from(json["localized_names"].map((x) => LocalizedName.fromJson(x))), + description: json["description"] == null ? null : json["description"], + manufacturerTemplateId: json["manufacturer_template_id"], + metaKeywords: json["meta_keywords"], + metaDescription: json["meta_description"], + metaTitle: json["meta_title"], + pageSize: json["page_size"], + pageSizeOptions: json["page_size_options"], + priceRanges: json["price_ranges"], + published: json["published"], + deleted: json["deleted"], + displayOrder: json["display_order"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + updatedOnUtc: DateTime.parse(json["updated_on_utc"]), + image: json["image"] == null ? null : Image.fromJson(json["image"]), + ); + + Map toJson() => { + "id": id, + "name": name, + "namen": namen, + "localized_names": List.from(localizedNames!.map((x) => x.toJson())), + "description": description == null ? null : description, + "manufacturer_template_id": manufacturerTemplateId, + "meta_keywords": metaKeywords, + "meta_description": metaDescription, + "meta_title": metaTitle, + "page_size": pageSize, + "page_size_options": pageSizeOptions, + "price_ranges": priceRanges, + "published": published, + "deleted": deleted, + "display_order": displayOrder, + "created_on_utc": createdOnUtc!.toIso8601String(), + "updated_on_utc": updatedOnUtc!.toIso8601String(), + "image": image == null ? null : image!.toJson(), + }; +} + +class Image { + Image({ + this.src, + this.thumb, + this.attachment, + }); + + String? src; + dynamic thumb; + dynamic attachment; + + factory Image.fromJson(Map json) => Image( + src: json["src"], + thumb: json["thumb"], + attachment: json["attachment"], + ); + + Map toJson() => { + "src": src, + "thumb": thumb, + "attachment": attachment, + }; +} + +class LocalizedName { + LocalizedName({ + this.languageId, + this.localizedName, + }); + + int? languageId; + String? localizedName; + + factory LocalizedName.fromJson(Map json) => LocalizedName( + languageId: json["language_id"], + localizedName: json["localized_name"], + ); + + Map toJson() => { + "language_id": languageId, + "localized_name": localizedName, + }; +} diff --git a/lib/models/pharmacy/locationModel.dart b/lib/models/pharmacy/locationModel.dart new file mode 100644 index 00000000..ee80ecde --- /dev/null +++ b/lib/models/pharmacy/locationModel.dart @@ -0,0 +1,159 @@ +// To parse this JSON data, do +// +// final locationModel = locationModelFromJson(jsonString); + +import 'dart:convert'; + +List locationModelFromJson(String str) => List.from(json.decode(str).map((x) => LocationModel.fromJson(x))); + +String locationModelToJson(List data) => json.encode(List.from(data.map((x) => x.toJson()))); + +class LocationModel { + LocationModel({ + this.expiryDate, + this.sellingPrice, + this.quantity, + this.itemId, + this.locationId, + this.projectId, + this.setupId, + this.locationDescription, + this.locationDescriptionN, + this.itemDescription, + this.itemDescriptionN, + this.alias, + this.locationTypeId, + this.barcode, + this.companybarcode, + this.cityId, + this.cityName, + this.distanceInKilometers, + this.latitude, + this.locationType, + this.longitude, + this.phoneNumber, + this.projectImageUrl, + this.sortOrder, + }); + + ExpiryDate? expiryDate; + double? sellingPrice; + int? quantity; + int? itemId; + int? locationId; + int? projectId; + String? setupId; + String? locationDescription; + dynamic locationDescriptionN; + ItemDescription? itemDescription; + dynamic itemDescriptionN; + Alias? alias; + int? locationTypeId; + int? barcode; + dynamic companybarcode; + int? cityId; + String? cityName; + int? distanceInKilometers; + String? latitude; + int? locationType; + String? longitude; + String? phoneNumber; + String? projectImageUrl; + int? sortOrder; + + factory LocationModel.fromJson(Map json) => LocationModel( + expiryDate: expiryDateValues.map![json["ExpiryDate"]], + sellingPrice: json["SellingPrice"].toDouble(), + quantity: json["Quantity"], + itemId: json["ItemID"], + locationId: json["LocationID"], + projectId: json["ProjectID"], + setupId: json["SetupID"], + locationDescription: json["LocationDescription"], + locationDescriptionN: json["LocationDescriptionN"], + itemDescription: itemDescriptionValues.map![json["ItemDescription"]], + itemDescriptionN: json["ItemDescriptionN"], + alias: aliasValues.map![json["Alias"]], + locationTypeId: json["LocationTypeID"], + barcode: json["Barcode"], + companybarcode: json["Companybarcode"], + cityId: json["CityID"], + cityName: json["CityName"], + distanceInKilometers: json["DistanceInKilometers"], + latitude: json["Latitude"], + locationType: json["LocationType"], + longitude: json["Longitude"], + phoneNumber: json["PhoneNumber"], + projectImageUrl: json["ProjectImageURL"], + sortOrder: json["SortOrder"], + ); + + Map toJson() => { + "ExpiryDate": expiryDateValues.reverse[expiryDate], + "SellingPrice": sellingPrice, + "Quantity": quantity, + "ItemID": itemId, + "LocationID": locationId, + "ProjectID": projectId, + "SetupID": setupId, + "LocationDescription": locationDescription, + "LocationDescriptionN": locationDescriptionN, + "ItemDescription": itemDescriptionValues.reverse[itemDescription], + "ItemDescriptionN": itemDescriptionN, + "Alias": aliasValues.reverse[alias], + "LocationTypeID": locationTypeId, + "Barcode": barcode, + "Companybarcode": companybarcode, + "CityID": cityId, + "CityName": cityName, + "DistanceInKilometers": distanceInKilometers, + "Latitude": latitude, + "LocationType": locationType, + "Longitude": longitude, + "PhoneNumber": phoneNumber, + "ProjectImageURL": projectImageUrl, + "SortOrder": sortOrder, + }; +} + +enum Alias { CAPSULE } + +final aliasValues = EnumValues({ + "CAPSULE": Alias.CAPSULE +}); + +enum CityName { RIYADH, KHOBAR, QASSIM } + +final cityNameValues = EnumValues({ + "Khobar": CityName.KHOBAR, + "Qassim": CityName.QASSIM, + "Riyadh": CityName.RIYADH +}); + +enum ExpiryDate { DATE_16223220000000300, DATE_16250004000000300, DATE_16538580000000300 } + +final expiryDateValues = EnumValues({ + "/Date(1622322000000+0300)/": ExpiryDate.DATE_16223220000000300, + "/Date(1625000400000+0300)/": ExpiryDate.DATE_16250004000000300, + "/Date(1653858000000+0300)/": ExpiryDate.DATE_16538580000000300 +}); + +enum ItemDescription { XERACTAN_20_MG_CAP_30_S } + +final itemDescriptionValues = EnumValues({ + "XERACTAN 20 MG CAP 30'S": ItemDescription.XERACTAN_20_MG_CAP_30_S +}); + +class EnumValues { + Map? map; + Map? reverseMap; + + EnumValues(this.map); + + Map get reverse { + if (reverseMap == null) { + reverseMap = map!.map((k, v) => new MapEntry(v, k)); + } + return reverseMap!; + } +} diff --git a/lib/models/pharmacy/productDetailModel.dart b/lib/models/pharmacy/productDetailModel.dart new file mode 100644 index 00000000..0d09130f --- /dev/null +++ b/lib/models/pharmacy/productDetailModel.dart @@ -0,0 +1,243 @@ +import 'dart:convert'; + +List productDetailFromJson(String str) => List.from(json.decode(str).map((x) => ProductDetail.fromJson(x))); + +String productDetailToJson(List data) => json.encode(List.from(data.map((x) => x.toJson()))); + +class ProductDetail { + ProductDetail({ + this.reviews, + }); + + List? reviews; + + factory ProductDetail.fromJson(Map json) => ProductDetail( + reviews: List.from(json["reviews"].map((x) => Review.fromJson(x))), + ); + + Map toJson() => { + "reviews": List.from(reviews!.map((x) => x.toJson())), + }; +} + +class Review { + Review({ + this.id, + this.position, + this.reviewId, + this.customerId, + this.productId, + this.storeId, + this.isApproved, + this.title, + this.reviewText, + this.replyText, + this.rating, + this.helpfulYesTotal, + this.helpfulNoTotal, + this.createdOnUtc, + this.customer, + this.product, + }); + + int? id; + int? position; + int? reviewId; + int? customerId; + int? productId; + int? storeId; + bool? isApproved; + String? title; + String? reviewText; + dynamic replyText; + int? rating; + int? helpfulYesTotal; + int? helpfulNoTotal; + DateTime? createdOnUtc; + Customer? customer; + dynamic product; + + factory Review.fromJson(Map json) => Review( + id: json["id"], + position: json["position"], + reviewId: json["review_id"], + customerId: json["customer_id"], + productId: json["product_id"], + storeId: json["store_id"], + isApproved: json["is_approved"], + title: json["title"], + reviewText: json["review_text"], + replyText: json["reply_text"], + rating: json["rating"], + helpfulYesTotal: json["helpful_yes_total"], + helpfulNoTotal: json["helpful_no_total"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + customer: Customer.fromJson(json["customer"]), + product: json["product"], + ); + + Map toJson() => { + "id": id, + "position": position, + "review_id": reviewId, + "customer_id": customerId, + "product_id": productId, + "store_id": storeId, + "is_approved": isApproved, + "title": title, + "review_text": reviewText, + "reply_text": replyText, + "rating": rating, + "helpful_yes_total": helpfulYesTotal, + "helpful_no_total": helpfulNoTotal, + "created_on_utc": createdOnUtc!.toIso8601String(), + "customer": customer!.toJson(), + "product": product, + }; +} + +class Customer { + Customer({ + this.fileNumber, + this.iqamaNumber, + this.isOutSa, + this.patientType, + this.gender, + this.birthDate, + this.phone, + this.countryCode, + this.yahalaAccountno, + this.billingAddress, + this.shippingAddress, + this.id, + this.username, + this.email, + this.firstName, + this.lastName, + this.languageId, + this.adminComment, + this.isTaxExempt, + this.hasShoppingCartItems, + this.active, + this.deleted, + this.isSystemAccount, + this.systemName, + this.lastIpAddress, + this.createdOnUtc, + this.lastLoginDateUtc, + this.lastActivityDateUtc, + this.registeredInStoreId, + }); + + dynamic fileNumber; + dynamic iqamaNumber; + int? isOutSa; + int? patientType; + dynamic gender; + DateTime? birthDate; + dynamic phone; + dynamic countryCode; + dynamic yahalaAccountno; + dynamic billingAddress; + dynamic shippingAddress; + String? id; + Email? username; + Email? email; + dynamic firstName; + dynamic lastName; + dynamic languageId; + dynamic adminComment; + dynamic isTaxExempt; + dynamic hasShoppingCartItems; + dynamic active; + dynamic deleted; + dynamic isSystemAccount; + dynamic systemName; + dynamic lastIpAddress; + dynamic createdOnUtc; + dynamic lastLoginDateUtc; + dynamic lastActivityDateUtc; + dynamic registeredInStoreId; + + factory Customer.fromJson(Map json) => Customer( + fileNumber: json["file_number"], + iqamaNumber: json["iqama_number"], + isOutSa: json["is_out_sa"], + patientType: json["patient_type"], + gender: json["gender"], + birthDate: DateTime.parse(json["birth_date"]), + phone: json["phone"], + countryCode: json["country_code"], + yahalaAccountno: json["yahala_accountno"], + billingAddress: json["billing_address"], + shippingAddress: json["shipping_address"], + id: json["id"], + username: emailValues.map![json["username"]], + email: emailValues.map![json["email"]], + firstName: json["first_name"], + lastName: json["last_name"], + languageId: json["language_id"], + adminComment: json["admin_comment"], + isTaxExempt: json["is_tax_exempt"], + hasShoppingCartItems: json["has_shopping_cart_items"], + active: json["active"], + deleted: json["deleted"], + isSystemAccount: json["is_system_account"], + systemName: json["system_name"], + lastIpAddress: json["last_ip_address"], + createdOnUtc: json["created_on_utc"], + lastLoginDateUtc: json["last_login_date_utc"], + lastActivityDateUtc: json["last_activity_date_utc"], + registeredInStoreId: json["registered_in_store_id"], + ); + + Map toJson() => { + "file_number": fileNumber, + "iqama_number": iqamaNumber, + "is_out_sa": isOutSa, + "patient_type": patientType, + "gender": gender, + "birth_date": birthDate!.toIso8601String(), + "phone": phone, + "country_code": countryCode, + "yahala_accountno": yahalaAccountno, + "billing_address": billingAddress, + "shipping_address": shippingAddress, + "id": id, + "username": emailValues.reverse[username], + "email": emailValues.reverse[email], + "first_name": firstName, + "last_name": lastName, + "language_id": languageId, + "admin_comment": adminComment, + "is_tax_exempt": isTaxExempt, + "has_shopping_cart_items": hasShoppingCartItems, + "active": active, + "deleted": deleted, + "is_system_account": isSystemAccount, + "system_name": systemName, + "last_ip_address": lastIpAddress, + "created_on_utc": createdOnUtc, + "last_login_date_utc": lastLoginDateUtc, + "last_activity_date_utc": lastActivityDateUtc, + "registered_in_store_id": registeredInStoreId, + }; +} + +enum Email { STEVE_GATES_NOP_COMMERCE_COM } + +final emailValues = EnumValues({"steve_gates@nopCommerce.com": Email.STEVE_GATES_NOP_COMMERCE_COM}); + +class EnumValues { + Map? map; + Map? reverseMap; + + EnumValues(this.map); + + Map get reverse { + if (reverseMap == null) { + reverseMap = map!.map((k, v) => new MapEntry(v, k)); + } + return reverseMap!; + } +} diff --git a/lib/models/pharmacy/products.dart b/lib/models/pharmacy/products.dart new file mode 100644 index 00000000..b792399d --- /dev/null +++ b/lib/models/pharmacy/products.dart @@ -0,0 +1,823 @@ +// To parse this JSON data, do +// +// final products = productsFromJson(jsonString); + +import 'dart:convert'; + +Products productsFromJson(String str) => Products.fromJson(json.decode(str)); + +String productsToJson(Products data) => json.encode(data.toJson()); + +class Products { + Products({ + this.messageStatus, + this.products, + }); + + dynamic messageStatus; + List? products; + + factory Products.fromJson(Map json) => Products( + messageStatus: json["MessageStatus"], + products: List.from(json["products"].map((x) => Product.fromJson(x))), + ); + + Map toJson() => { + "MessageStatus": messageStatus, + "products": List.from(products!.map((x) => x.toJson())), + }; +} + +class Product { + Product({ + this.id, + this.visibleIndividually, + this.name, + this.namen, + this.localizedNames, + this.shortDescription, + this.shortDescriptionn, + this.fullDescription, + this.fullDescriptionn, + this.markasNew, + this.showOnHomePage, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.allowCustomerReviews, + this.approvedRatingSum, + this.notApprovedRatingSum, + this.approvedTotalReviews, + this.notApprovedTotalReviews, + this.sku, + this.isRx, + this.prescriptionRequired, + this.rxMessage, + this.rxMessagen, + this.manufacturerPartNumber, + this.gtin, + this.isGiftCard, + this.requireOtherProducts, + this.automaticallyAddRequiredProducts, + this.isDownload, + this.unlimitedDownloads, + this.maxNumberOfDownloads, + this.downloadExpirationDays, + this.hasSampleDownload, + this.hasUserAgreement, + this.isRecurring, + this.recurringCycleLength, + this.recurringTotalCycles, + this.isRental, + this.rentalPriceLength, + this.isShipEnabled, + this.isFreeShipping, + this.shipSeparately, + this.additionalShippingCharge, + this.isTaxExempt, + this.isTelecommunicationsOrBroadcastingOrElectronicServices, + this.useMultipleWarehouses, + this.manageInventoryMethodId, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.displayStockAvailability, + this.displayStockQuantity, + this.minStockQuantity, + this.notifyAdminForQuantityBelow, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, + this.allowedQuantities, + this.allowAddingOnlyExistingAttributeCombinations, + this.disableBuyButton, + this.disableWishlistButton, + this.availableForPreOrder, + this.preOrderAvailabilityStartDateTimeUtc, + this.callForPrice, + this.price, + this.oldPrice, + this.productCost, + this.specialPrice, + this.specialPriceStartDateTimeUtc, + this.specialPriceEndDateTimeUtc, + this.customerEntersPrice, + this.minimumCustomerEnteredPrice, + this.maximumCustomerEnteredPrice, + this.basepriceEnabled, + this.basepriceAmount, + this.basepriceBaseAmount, + this.hasTierPrices, + this.hasDiscountsApplied, + this.discountName, + this.discountNamen, + this.discountDescription, + this.discountDescriptionn, + this.discountPercentage, + this.currency, + this.currencyn, + this.weight, + this.length, + this.width, + this.height, + this.availableStartDateTimeUtc, + this.availableEndDateTimeUtc, + this.displayOrder, + this.published, + this.deleted, + this.createdOnUtc, + this.updatedOnUtc, + this.productType, + this.parentGroupedProductId, + this.roleIds, + this.discountIds, + this.storeIds, + this.manufacturerIds, + this.reviews, + this.images, + this.attributes, + this.specifications, + this.associatedProductIds, + this.tags, + this.vendorId, + this.seName, + }); + + String? id; + bool? visibleIndividually; + String? name; + String? namen; + List? localizedNames; + String? shortDescription; + String? shortDescriptionn; + String? fullDescription; + String? fullDescriptionn; + bool? markasNew; + bool? showOnHomePage; + String? metaKeywords; + String? metaDescription; + String? metaTitle; + bool? allowCustomerReviews; + int? approvedRatingSum; + int? notApprovedRatingSum; + int? approvedTotalReviews; + int? notApprovedTotalReviews; + String? sku; + bool? isRx; + bool? prescriptionRequired; + String? rxMessage; + String? rxMessagen; + dynamic manufacturerPartNumber; + dynamic gtin; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; + int? maxNumberOfDownloads; + dynamic downloadExpirationDays; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; + int? recurringCycleLength; + int? recurringTotalCycles; + bool? isRental; + int? rentalPriceLength; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; + int? additionalShippingCharge; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; + int? manageInventoryMethodId; + int? stockQuantity; + String? stockAvailability; + String? stockAvailabilityn; + bool? displayStockAvailability; + bool? displayStockQuantity; + int? minStockQuantity; + int? notifyAdminForQuantityBelow; + bool? allowBackInStockSubscriptions; + int? orderMinimumQuantity; + int? orderMaximumQuantity; + dynamic allowedQuantities; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; + dynamic preOrderAvailabilityStartDateTimeUtc; + bool? callForPrice; + double? price; + int? oldPrice; + double? productCost; + dynamic specialPrice; + dynamic specialPriceStartDateTimeUtc; + dynamic specialPriceEndDateTimeUtc; + bool? customerEntersPrice; + int? minimumCustomerEnteredPrice; + int? maximumCustomerEnteredPrice; + bool? basepriceEnabled; + int? basepriceAmount; + int? basepriceBaseAmount; + bool? hasTierPrices; + bool? hasDiscountsApplied; + String? discountName; + String? discountNamen; + String? discountDescription; + String? discountDescriptionn; + String? discountPercentage; + String? currency; + String? currencyn; + double? weight; + int? length; + int? width; + int? height; + dynamic availableStartDateTimeUtc; + dynamic availableEndDateTimeUtc; + int? displayOrder; + bool? published; + bool? deleted; + DateTime? createdOnUtc; + DateTime? updatedOnUtc; + String? productType; + int? parentGroupedProductId; + List? roleIds; + List? discountIds; + List? storeIds; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + List? associatedProductIds; + List? tags; + int? vendorId; + String? seName; + + factory Product.fromJson(Map json) => Product( + id: json["id"], + visibleIndividually: json["visible_individually"], + name: json["name"], + namen: json["namen"], + localizedNames: List.from(json["localized_names"].map((x) => LocalizedName.fromJson(x))), + shortDescription: json["short_description"] == null ? null : json["short_description"], + shortDescriptionn: json["short_descriptionn"] == null ? null : json["short_descriptionn"], + fullDescription: json["full_description"], + fullDescriptionn: json["full_descriptionn"], + markasNew: json["markas_new"], + showOnHomePage: json["show_on_home_page"], + metaKeywords: json["meta_keywords"] == null ? null : json["meta_keywords"], + metaDescription: json["meta_description"] == null ? null : json["meta_description"], + metaTitle: json["meta_title"] == null ? null : json["meta_title"], + allowCustomerReviews: json["allow_customer_reviews"], + approvedRatingSum: json["approved_rating_sum"], + notApprovedRatingSum: json["not_approved_rating_sum"], + approvedTotalReviews: json["approved_total_reviews"], + notApprovedTotalReviews: json["not_approved_total_reviews"], + sku: json["sku"], + isRx: json["is_rx"], + prescriptionRequired: json["prescription_required"], + rxMessage: json["rx_message"] == null ? null : json["rx_message"], + rxMessagen: json["rx_messagen"] == null ? null : json["rx_messagen"], + manufacturerPartNumber: json["manufacturer_part_number"], + gtin: json["gtin"], + isGiftCard: json["is_gift_card"], + requireOtherProducts: json["require_other_products"], + automaticallyAddRequiredProducts: json["automatically_add_required_products"], + isDownload: json["is_download"], + unlimitedDownloads: json["unlimited_downloads"], + maxNumberOfDownloads: json["max_number_of_downloads"], + downloadExpirationDays: json["download_expiration_days"], + hasSampleDownload: json["has_sample_download"], + hasUserAgreement: json["has_user_agreement"], + isRecurring: json["is_recurring"], + recurringCycleLength: json["recurring_cycle_length"], + recurringTotalCycles: json["recurring_total_cycles"], + isRental: json["is_rental"], + rentalPriceLength: json["rental_price_length"], + isShipEnabled: json["is_ship_enabled"], + isFreeShipping: json["is_free_shipping"], + shipSeparately: json["ship_separately"], + additionalShippingCharge: json["additional_shipping_charge"], + isTaxExempt: json["is_tax_exempt"], + isTelecommunicationsOrBroadcastingOrElectronicServices: json["is_telecommunications_or_broadcasting_or_electronic_services"], + useMultipleWarehouses: json["use_multiple_warehouses"], + manageInventoryMethodId: json["manage_inventory_method_id"], + stockQuantity: json["stock_quantity"], + stockAvailability: json["stock_availability"], + stockAvailabilityn: json["stock_availabilityn"], + displayStockAvailability: json["display_stock_availability"], + displayStockQuantity: json["display_stock_quantity"], + minStockQuantity: json["min_stock_quantity"], + notifyAdminForQuantityBelow: json["notify_admin_for_quantity_below"], + allowBackInStockSubscriptions: json["allow_back_in_stock_subscriptions"], + orderMinimumQuantity: json["order_minimum_quantity"], + orderMaximumQuantity: json["order_maximum_quantity"], + allowedQuantities: json["allowed_quantities"], + allowAddingOnlyExistingAttributeCombinations: json["allow_adding_only_existing_attribute_combinations"], + disableBuyButton: json["disable_buy_button"], + disableWishlistButton: json["disable_wishlist_button"], + availableForPreOrder: json["available_for_pre_order"], + preOrderAvailabilityStartDateTimeUtc: json["pre_order_availability_start_date_time_utc"], + callForPrice: json["call_for_price"], + price: json["price"].toDouble(), + oldPrice: json["old_price"], + productCost: json["product_cost"].toDouble(), + specialPrice: json["special_price"], + specialPriceStartDateTimeUtc: json["special_price_start_date_time_utc"], + specialPriceEndDateTimeUtc: json["special_price_end_date_time_utc"], + customerEntersPrice: json["customer_enters_price"], + minimumCustomerEnteredPrice: json["minimum_customer_entered_price"], + maximumCustomerEnteredPrice: json["maximum_customer_entered_price"], + basepriceEnabled: json["baseprice_enabled"], + basepriceAmount: json["baseprice_amount"], + basepriceBaseAmount: json["baseprice_base_amount"], + hasTierPrices: json["has_tier_prices"], + hasDiscountsApplied: json["has_discounts_applied"], + discountName: json["discount_name"] == null ? null : json["discount_name"], + discountNamen: json["discount_namen"] == null ? null : json["discount_namen"], + discountDescription: json["discount_description"] == null ? null : json["discount_description"], + discountDescriptionn: json["discount_Descriptionn"] == null ? null : json["discount_Descriptionn"], + discountPercentage: json["discount_percentage"] == null ? null : json["discount_percentage"], + currency: json["currency"], + currencyn: json["currencyn"], + weight: json["weight"].toDouble(), + length: json["length"], + width: json["width"], + height: json["height"], + availableStartDateTimeUtc: json["available_start_date_time_utc"], + availableEndDateTimeUtc: json["available_end_date_time_utc"], + displayOrder: json["display_order"], + published: json["published"], + deleted: json["deleted"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + updatedOnUtc: DateTime.parse(json["updated_on_utc"]), + productType: json["product_type"], + parentGroupedProductId: json["parent_grouped_product_id"], + roleIds: List.from(json["role_ids"].map((x) => x)), + discountIds: List.from(json["discount_ids"].map((x) => x)), + storeIds: List.from(json["store_ids"].map((x) => x)), + manufacturerIds: List.from(json["manufacturer_ids"].map((x) => x)), + reviews: List.from(json["reviews"].map((x) => Review.fromJson(x))), + images: List.from(json["images"].map((x) => Image.fromJson(x))), + attributes: List.from(json["attributes"].map((x) => x)), + specifications: List.from(json["specifications"].map((x) => Specification.fromJson(x))), + associatedProductIds: List.from(json["associated_product_ids"].map((x) => x)), + tags: List.from(json["tags"].map((x) => x)), + vendorId: json["vendor_id"], + seName: json["se_name"], + ); + + Map toJson() => { + "id": id, + "visible_individually": visibleIndividually, + "name": name, + "namen": namen, + "localized_names": List.from(localizedNames!.map((x) => x.toJson())), + "short_description": shortDescription == null ? null : shortDescription, + "short_descriptionn": shortDescriptionn == null ? null : shortDescriptionn, + "full_description": fullDescription, + "full_descriptionn": fullDescriptionn, + "markas_new": markasNew, + "show_on_home_page": showOnHomePage, + "meta_keywords": metaKeywords == null ? null : metaKeywords, + "meta_description": metaDescription == null ? null : metaDescription, + "meta_title": metaTitle == null ? null : metaTitle, + "allow_customer_reviews": allowCustomerReviews, + "approved_rating_sum": approvedRatingSum, + "not_approved_rating_sum": notApprovedRatingSum, + "approved_total_reviews": approvedTotalReviews, + "not_approved_total_reviews": notApprovedTotalReviews, + "sku": sku, + "is_rx": isRx, + "prescription_required": prescriptionRequired, + "rx_message": rxMessage == null ? null : rxMessage, + "rx_messagen": rxMessagen == null ? null : rxMessagen, + "manufacturer_part_number": manufacturerPartNumber, + "gtin": gtin, + "is_gift_card": isGiftCard, + "require_other_products": requireOtherProducts, + "automatically_add_required_products": automaticallyAddRequiredProducts, + "is_download": isDownload, + "unlimited_downloads": unlimitedDownloads, + "max_number_of_downloads": maxNumberOfDownloads, + "download_expiration_days": downloadExpirationDays, + "has_sample_download": hasSampleDownload, + "has_user_agreement": hasUserAgreement, + "is_recurring": isRecurring, + "recurring_cycle_length": recurringCycleLength, + "recurring_total_cycles": recurringTotalCycles, + "is_rental": isRental, + "rental_price_length": rentalPriceLength, + "is_ship_enabled": isShipEnabled, + "is_free_shipping": isFreeShipping, + "ship_separately": shipSeparately, + "additional_shipping_charge": additionalShippingCharge, + "is_tax_exempt": isTaxExempt, + "is_telecommunications_or_broadcasting_or_electronic_services": isTelecommunicationsOrBroadcastingOrElectronicServices, + "use_multiple_warehouses": useMultipleWarehouses, + "manage_inventory_method_id": manageInventoryMethodId, + "stock_quantity": stockQuantity, + "stock_availability": stockAvailability, + "stock_availabilityn": stockAvailabilityn, + "display_stock_availability": displayStockAvailability, + "display_stock_quantity": displayStockQuantity, + "min_stock_quantity": minStockQuantity, + "notify_admin_for_quantity_below": notifyAdminForQuantityBelow, + "allow_back_in_stock_subscriptions": allowBackInStockSubscriptions, + "order_minimum_quantity": orderMinimumQuantity, + "order_maximum_quantity": orderMaximumQuantity, + "allowed_quantities": allowedQuantities, + "allow_adding_only_existing_attribute_combinations": allowAddingOnlyExistingAttributeCombinations, + "disable_buy_button": disableBuyButton, + "disable_wishlist_button": disableWishlistButton, + "available_for_pre_order": availableForPreOrder, + "pre_order_availability_start_date_time_utc": preOrderAvailabilityStartDateTimeUtc, + "call_for_price": callForPrice, + "price": price, + "old_price": oldPrice, + "product_cost": productCost, + "special_price": specialPrice, + "special_price_start_date_time_utc": specialPriceStartDateTimeUtc, + "special_price_end_date_time_utc": specialPriceEndDateTimeUtc, + "customer_enters_price": customerEntersPrice, + "minimum_customer_entered_price": minimumCustomerEnteredPrice, + "maximum_customer_entered_price": maximumCustomerEnteredPrice, + "baseprice_enabled": basepriceEnabled, + "baseprice_amount": basepriceAmount, + "baseprice_base_amount": basepriceBaseAmount, + "has_tier_prices": hasTierPrices, + "has_discounts_applied": hasDiscountsApplied, + "discount_name": discountName == null ? null : discountName, + "discount_namen": discountNamen == null ? null : discountNamen, + "discount_description": discountDescription == null ? null : discountDescription, + "discount_Descriptionn": discountDescriptionn == null ? null : discountDescriptionn, + "discount_percentage": discountPercentage == null ? null : discountPercentage, + "currency": currency, + "currencyn": currencyn, + "weight": weight, + "length": length, + "width": width, + "height": height, + "available_start_date_time_utc": availableStartDateTimeUtc, + "available_end_date_time_utc": availableEndDateTimeUtc, + "display_order": displayOrder, + "published": published, + "deleted": deleted, + "created_on_utc": createdOnUtc!.toIso8601String(), + "updated_on_utc": updatedOnUtc!.toIso8601String(), + "product_type": productType, + "parent_grouped_product_id": parentGroupedProductId, + "role_ids": List.from(roleIds!.map((x) => x)), + "discount_ids": List.from(discountIds!.map((x) => x)), + "store_ids": List.from(storeIds!.map((x) => x)), + "manufacturer_ids": List.from(manufacturerIds!.map((x) => x)), + "reviews": List.from(reviews!.map((x) => x.toJson())), + "images": List.from(images!.map((x) => x.toJson())), + "attributes": List.from(attributes!.map((x) => x)), + "specifications": List.from(specifications!.map((x) => x.toJson())), + "associated_product_ids": List.from(associatedProductIds!.map((x) => x)), + "tags": List.from(tags!.map((x) => x)), + "vendor_id": vendorId, + "se_name": seName, + }; +} + +class Image { + Image({ + this.id, + this.position, + this.src, + this.thumb, + this.attachment, + }); + + int? id; + int? position; + String? src; + String? thumb; + String? attachment; + + factory Image.fromJson(Map json) => Image( + id: json["id"], + position: json["position"], + src: json["src"], + thumb: json["thumb"], + attachment: json["attachment"], + ); + + Map toJson() => { + "id": id, + "position": position, + "src": src, + "thumb": thumb, + "attachment": attachment, + }; +} + +class LocalizedName { + LocalizedName({ + this.languageId, + this.localizedName, + }); + + int? languageId; + String? localizedName; + + factory LocalizedName.fromJson(Map json) => LocalizedName( + languageId: json["language_id"], + localizedName: json["localized_name"], + ); + + Map toJson() => { + "language_id": languageId, + "localized_name": localizedName, + }; +} + +class Review { + Review({ + this.id, + this.position, + this.reviewId, + this.customerId, + this.productId, + this.storeId, + this.isApproved, + this.title, + this.reviewText, + this.replyText, + this.rating, + this.helpfulYesTotal, + this.helpfulNoTotal, + this.createdOnUtc, + this.customer, + this.product, + }); + + int? id; + int? position; + int? reviewId; + int? customerId; + int? productId; + int? storeId; + bool? isApproved; + String? title; + String? reviewText; + dynamic replyText; + int? rating; + int? helpfulYesTotal; + int? helpfulNoTotal; + DateTime? createdOnUtc; + Customer? customer; + dynamic product; + + factory Review.fromJson(Map json) => Review( + id: json["id"], + position: json["position"], + reviewId: json["review_id"], + customerId: json["customer_id"], + productId: json["product_id"], + storeId: json["store_id"], + isApproved: json["is_approved"], + title: json["title"], + reviewText: json["review_text"], + replyText: json["reply_text"], + rating: json["rating"], + helpfulYesTotal: json["helpful_yes_total"], + helpfulNoTotal: json["helpful_no_total"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + customer: Customer.fromJson(json["customer"]), + product: json["product"], + ); + + Map toJson() => { + "id": id, + "position": position, + "review_id": reviewId, + "customer_id": customerId, + "product_id": productId, + "store_id": storeId, + "is_approved": isApproved, + "title": title, + "review_text": reviewText, + "reply_text": replyText, + "rating": rating, + "helpful_yes_total": helpfulYesTotal, + "helpful_no_total": helpfulNoTotal, + "created_on_utc": createdOnUtc!.toIso8601String(), + "customer": customer!.toJson(), + "product": product, + }; +} + +class Customer { + Customer({ + this.fileNumber, + this.iqamaNumber, + this.isOutSa, + this.patientType, + this.gender, + this.birthDate, + this.phone, + this.countryCode, + this.yahalaAccountno, + this.billingAddress, + this.shippingAddress, + this.addresses, + this.id, + this.username, + this.email, + this.firstName, + this.lastName, + this.languageId, + this.adminComment, + this.isTaxExempt, + this.hasShoppingCartItems, + this.active, + this.deleted, + this.isSystemAccount, + this.systemName, + this.lastIpAddress, + this.createdOnUtc, + this.lastLoginDateUtc, + this.lastActivityDateUtc, + this.registeredInStoreId, + this.roleIds, + }); + + dynamic fileNumber; + dynamic iqamaNumber; + int? isOutSa; + int? patientType; + dynamic gender; + DateTime? birthDate; + dynamic phone; + dynamic countryCode; + dynamic yahalaAccountno; + dynamic billingAddress; + dynamic shippingAddress; + List? addresses; + String? id; + Username? username; + Email? email; + dynamic firstName; + dynamic lastName; + dynamic languageId; + dynamic adminComment; + dynamic isTaxExempt; + dynamic hasShoppingCartItems; + dynamic active; + dynamic deleted; + dynamic isSystemAccount; + dynamic systemName; + dynamic lastIpAddress; + dynamic createdOnUtc; + dynamic lastLoginDateUtc; + dynamic lastActivityDateUtc; + dynamic registeredInStoreId; + List? roleIds; + + factory Customer.fromJson(Map json) => Customer( + fileNumber: json["file_number"], + iqamaNumber: json["iqama_number"], + isOutSa: json["is_out_sa"], + patientType: json["patient_type"], + gender: json["gender"], + birthDate: DateTime.parse(json["birth_date"]), + phone: json["phone"], + countryCode: json["country_code"], + yahalaAccountno: json["yahala_accountno"], + billingAddress: json["billing_address"], + shippingAddress: json["shipping_address"], + addresses: List.from(json["addresses"].map((x) => x)), + id: json["id"], + username: usernameValues.map![json["username"]], + email: emailValues.map![json["email"]], + firstName: json["first_name"], + lastName: json["last_name"], + languageId: json["language_id"], + adminComment: json["admin_comment"], + isTaxExempt: json["is_tax_exempt"], + hasShoppingCartItems: json["has_shopping_cart_items"], + active: json["active"], + deleted: json["deleted"], + isSystemAccount: json["is_system_account"], + systemName: json["system_name"], + lastIpAddress: json["last_ip_address"], + createdOnUtc: json["created_on_utc"], + lastLoginDateUtc: json["last_login_date_utc"], + lastActivityDateUtc: json["last_activity_date_utc"], + registeredInStoreId: json["registered_in_store_id"], + roleIds: List.from(json["role_ids"].map((x) => x)), + ); + + Map toJson() => { + "file_number": fileNumber, + "iqama_number": iqamaNumber, + "is_out_sa": isOutSa, + "patient_type": patientType, + "gender": gender, + "birth_date": birthDate!.toIso8601String(), + "phone": phone, + "country_code": countryCode, + "yahala_accountno": yahalaAccountno, + "billing_address": billingAddress, + "shipping_address": shippingAddress, + "addresses": List.from(addresses!.map((x) => x)), + "id": id, + "username": usernameValues.reverse[username], + "email": emailValues.reverse[email], + "first_name": firstName, + "last_name": lastName, + "language_id": languageId, + "admin_comment": adminComment, + "is_tax_exempt": isTaxExempt, + "has_shopping_cart_items": hasShoppingCartItems, + "active": active, + "deleted": deleted, + "is_system_account": isSystemAccount, + "system_name": systemName, + "last_ip_address": lastIpAddress, + "created_on_utc": createdOnUtc, + "last_login_date_utc": lastLoginDateUtc, + "last_activity_date_utc": lastActivityDateUtc, + "registered_in_store_id": registeredInStoreId, + "role_ids": List.from(roleIds!.map((x) => x)), + }; +} + +enum Email { MEMO17299_GMAIL_COM, STEVE_GATES_NOP_COMMERCE_COM } + +final emailValues = EnumValues({"Memo17299@gmail.com": Email.MEMO17299_GMAIL_COM, "steve_gates@nopCommerce.com": Email.STEVE_GATES_NOP_COMMERCE_COM}); + +enum Username { AMAL_26, STEVE_GATES_NOP_COMMERCE_COM } + +final usernameValues = EnumValues({"amal_26": Username.AMAL_26, "steve_gates@nopCommerce.com": Username.STEVE_GATES_NOP_COMMERCE_COM}); + +class Specification { + Specification({ + this.id, + this.displayOrder, + this.defaultValue, + this.defaultValuen, + this.name, + this.nameN, + }); + + int? id; + int? displayOrder; + String? defaultValue; + String? defaultValuen; + Name? name; + NameN? nameN; + + factory Specification.fromJson(Map json) => Specification( + id: json["id"], + displayOrder: json["display_order"], + defaultValue: json["default_value"], + defaultValuen: json["default_valuen"], + name: nameValues.map![json["name"]], + nameN: nameNValues.map![json["nameN"]], + ); + + Map toJson() => { + "id": id, + "display_order": displayOrder, + "default_value": defaultValue, + "default_valuen": defaultValuen, + "name": nameValues.reverse[name], + "nameN": nameNValues.reverse[nameN], + }; +} + +enum Name { PRIMARY_UNIT_OF_MEASURE, BRAND, MANUFACTURER_COUNTRY_NAME, STORAGE, COMPOSITION, SPF } + +final nameValues = EnumValues({ + "BRAND": Name.BRAND, + "COMPOSITION": Name.COMPOSITION, + "MANUFACTURER COUNTRY NAME": Name.MANUFACTURER_COUNTRY_NAME, + "Primary Unit Of Measure": Name.PRIMARY_UNIT_OF_MEASURE, + "SPF": Name.SPF, + "STORAGE": Name.STORAGE +}); + +enum NameN { EMPTY, NAME_N, PURPLE, FLUFFY, TENTACLED, SPF } + +final nameNValues = + EnumValues({"وحدة القياس الأولية": NameN.EMPTY, "تخزين": NameN.FLUFFY, "علامة تجارية": NameN.NAME_N, "اسم البلد المصنع": NameN.PURPLE, "SPF": NameN.SPF, "المكونات": NameN.TENTACLED}); + +class EnumValues { + Map? map; + Map? reverseMap; + + EnumValues(this.map); + + Map get reverse { + if (reverseMap == null) { + reverseMap = map!.map((k, v) => new MapEntry(v, k)); + } + return reverseMap!; + } +} diff --git a/lib/models/pharmacy/reviewModel.dart b/lib/models/pharmacy/reviewModel.dart new file mode 100644 index 00000000..dacf6c6f --- /dev/null +++ b/lib/models/pharmacy/reviewModel.dart @@ -0,0 +1,803 @@ +// To parse this JSON data, do +// +// final review = reviewFromJson(jsonString); + +import 'dart:convert'; + +List reviewFromJson(String str) => List.from(json.decode(str).map((x) => Review.fromJson(x))); + +String reviewToJson(List data) => json.encode(List.from(data.map((x) => x.toJson()))); + +class Product { + Product({ + this.id, + this.visibleIndividually, + this.name, + this.namen, + this.localizedNames, + this.shortDescription, + this.shortDescriptionn, + this.fullDescription, + this.fullDescriptionn, + this.markasNew, + this.showOnHomePage, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.allowCustomerReviews, + this.approvedRatingSum, + this.notApprovedRatingSum, + this.approvedTotalReviews, + this.notApprovedTotalReviews, + this.sku, + this.isRx, + this.prescriptionRequired, + this.rxMessage, + this.rxMessagen, + this.manufacturerPartNumber, + this.gtin, + this.isGiftCard, + this.requireOtherProducts, + this.automaticallyAddRequiredProducts, + this.isDownload, + this.unlimitedDownloads, + this.maxNumberOfDownloads, + this.downloadExpirationDays, + this.hasSampleDownload, + this.hasUserAgreement, + this.isRecurring, + this.recurringCycleLength, + this.recurringTotalCycles, + this.isRental, + this.rentalPriceLength, + this.isShipEnabled, + this.isFreeShipping, + this.shipSeparately, + this.additionalShippingCharge, + this.isTaxExempt, + this.isTelecommunicationsOrBroadcastingOrElectronicServices, + this.useMultipleWarehouses, + this.manageInventoryMethodId, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.displayStockAvailability, + this.displayStockQuantity, + this.minStockQuantity, + this.notifyAdminForQuantityBelow, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, + this.allowedQuantities, + this.allowAddingOnlyExistingAttributeCombinations, + this.disableBuyButton, + this.disableWishlistButton, + this.availableForPreOrder, + this.preOrderAvailabilityStartDateTimeUtc, + this.callForPrice, + this.price, + this.oldPrice, + this.productCost, + this.specialPrice, + this.specialPriceStartDateTimeUtc, + this.specialPriceEndDateTimeUtc, + this.customerEntersPrice, + this.minimumCustomerEnteredPrice, + this.maximumCustomerEnteredPrice, + this.basepriceEnabled, + this.basepriceAmount, + this.basepriceBaseAmount, + this.hasTierPrices, + this.hasDiscountsApplied, + this.discountName, + this.discountNamen, + this.discountDescription, + this.discountDescriptionn, + this.discountPercentage, + this.currency, + this.currencyn, + this.weight, + this.length, + this.width, + this.height, + this.availableStartDateTimeUtc, + this.availableEndDateTimeUtc, + this.displayOrder, + this.published, + this.deleted, + this.createdOnUtc, + this.updatedOnUtc, + this.productType, + this.parentGroupedProductId, + this.roleIds, + this.discountIds, + this.storeIds, + this.manufacturerIds, + this.reviews, + this.images, + this.attributes, + this.specifications, + this.associatedProductIds, + this.tags, + this.vendorId, + this.seName, + }); + + String? id; + bool? visibleIndividually; + String? name; + String? namen; + List? localizedNames; + String? shortDescription; + String? shortDescriptionn; + String? fullDescription; + String? fullDescriptionn; + bool? markasNew; + bool? showOnHomePage; + String? metaKeywords; + String? metaDescription; + String? metaTitle; + bool? allowCustomerReviews; + dynamic approvedRatingSum; + dynamic notApprovedRatingSum; + dynamic approvedTotalReviews; + dynamic notApprovedTotalReviews; + String? sku; + bool? isRx; + bool? prescriptionRequired; + dynamic rxMessage; + dynamic rxMessagen; + dynamic manufacturerPartNumber; + dynamic gtin; + bool? isGiftCard; + bool? requireOtherProducts; + bool? automaticallyAddRequiredProducts; + bool? isDownload; + bool? unlimitedDownloads; + dynamic maxNumberOfDownloads; + dynamic downloadExpirationDays; + bool? hasSampleDownload; + bool? hasUserAgreement; + bool? isRecurring; + dynamic recurringCycleLength; + dynamic recurringTotalCycles; + bool? isRental; + dynamic rentalPriceLength; + bool? isShipEnabled; + bool? isFreeShipping; + bool? shipSeparately; + dynamic additionalShippingCharge; + bool? isTaxExempt; + bool? isTelecommunicationsOrBroadcastingOrElectronicServices; + bool? useMultipleWarehouses; + dynamic manageInventoryMethodId; + dynamic stockQuantity; + String? stockAvailability; + String? stockAvailabilityn; + bool? displayStockAvailability; + bool? displayStockQuantity; + dynamic minStockQuantity; + dynamic notifyAdminForQuantityBelow; + bool? allowBackInStockSubscriptions; + dynamic orderMinimumQuantity; + dynamic orderMaximumQuantity; + dynamic allowedQuantities; + bool? allowAddingOnlyExistingAttributeCombinations; + bool? disableBuyButton; + bool? disableWishlistButton; + bool? availableForPreOrder; + dynamic preOrderAvailabilityStartDateTimeUtc; + bool? callForPrice; + dynamic price; + dynamic oldPrice; + dynamic productCost; + dynamic specialPrice; + dynamic specialPriceStartDateTimeUtc; + dynamic specialPriceEndDateTimeUtc; + bool? customerEntersPrice; + dynamic minimumCustomerEnteredPrice; + dynamic maximumCustomerEnteredPrice; + bool? basepriceEnabled; + dynamic basepriceAmount; + dynamic basepriceBaseAmount; + bool? hasTierPrices; + bool? hasDiscountsApplied; + dynamic discountName; + dynamic discountNamen; + dynamic discountDescription; + dynamic discountDescriptionn; + dynamic discountPercentage; + String? currency; + String? currencyn; + double? weight; + dynamic length; + dynamic width; + dynamic height; + dynamic availableStartDateTimeUtc; + dynamic availableEndDateTimeUtc; + dynamic displayOrder; + bool? published; + bool? deleted; + DateTime? createdOnUtc; + DateTime? updatedOnUtc; + String? productType; + dynamic parentGroupedProductId; + List? roleIds; + List? discountIds; + List? storeIds; + List? manufacturerIds; + List? reviews; + List? images; + List? attributes; + List? specifications; + List? associatedProductIds; + List? tags; + dynamic vendorId; + String? seName; + + factory Product.fromJson(Map json) => Product( + id: json["id"], + visibleIndividually: json["visible_individually"], + name: json["name"], + namen: json["namen"], + localizedNames: List.from(json["localized_names"].map((x) => LocalizedName.fromJson(x))), + shortDescription: json["short_description"], + shortDescriptionn: json["short_descriptionn"], + fullDescription: json["full_description"], + fullDescriptionn: json["full_descriptionn"], + markasNew: json["markas_new"], + showOnHomePage: json["show_on_home_page"], + metaKeywords: json["meta_keywords"], + metaDescription: json["meta_description"], + metaTitle: json["meta_title"], + allowCustomerReviews: json["allow_customer_reviews"], + approvedRatingSum: json["approved_rating_sum"], + notApprovedRatingSum: json["not_approved_rating_sum"], + approvedTotalReviews: json["approved_total_reviews"], + notApprovedTotalReviews: json["not_approved_total_reviews"], + sku: json["sku"], + isRx: json["is_rx"], + prescriptionRequired: json["prescription_required"], + rxMessage: json["rx_message"], + rxMessagen: json["rx_messagen"], + manufacturerPartNumber: json["manufacturer_part_number"], + gtin: json["gtin"], + isGiftCard: json["is_gift_card"], + requireOtherProducts: json["require_other_products"], + automaticallyAddRequiredProducts: json["automatically_add_required_products"], + isDownload: json["is_download"], + unlimitedDownloads: json["unlimited_downloads"], + maxNumberOfDownloads: json["max_number_of_downloads"], + downloadExpirationDays: json["download_expiration_days"], + hasSampleDownload: json["has_sample_download"], + hasUserAgreement: json["has_user_agreement"], + isRecurring: json["is_recurring"], + recurringCycleLength: json["recurring_cycle_length"], + recurringTotalCycles: json["recurring_total_cycles"], + isRental: json["is_rental"], + rentalPriceLength: json["rental_price_length"], + isShipEnabled: json["is_ship_enabled"], + isFreeShipping: json["is_free_shipping"], + shipSeparately: json["ship_separately"], + additionalShippingCharge: json["additional_shipping_charge"], + isTaxExempt: json["is_tax_exempt"], + isTelecommunicationsOrBroadcastingOrElectronicServices: json["is_telecommunications_or_broadcasting_or_electronic_services"], + useMultipleWarehouses: json["use_multiple_warehouses"], + manageInventoryMethodId: json["manage_inventory_method_id"], + stockQuantity: json["stock_quantity"], + stockAvailability: json["stock_availability"], + stockAvailabilityn: json["stock_availabilityn"], + displayStockAvailability: json["display_stock_availability"], + displayStockQuantity: json["display_stock_quantity"], + minStockQuantity: json["min_stock_quantity"], + notifyAdminForQuantityBelow: json["notify_admin_for_quantity_below"], + allowBackInStockSubscriptions: json["allow_back_in_stock_subscriptions"], + orderMinimumQuantity: json["order_minimum_quantity"], + orderMaximumQuantity: json["order_maximum_quantity"], + allowedQuantities: json["allowed_quantities"], + allowAddingOnlyExistingAttributeCombinations: json["allow_adding_only_existing_attribute_combinations"], + disableBuyButton: json["disable_buy_button"], + disableWishlistButton: json["disable_wishlist_button"], + availableForPreOrder: json["available_for_pre_order"], + preOrderAvailabilityStartDateTimeUtc: json["pre_order_availability_start_date_time_utc"], + callForPrice: json["call_for_price"], + price: json["price"], + oldPrice: json["old_price"], + productCost: json["product_cost"], + specialPrice: json["special_price"], + specialPriceStartDateTimeUtc: json["special_price_start_date_time_utc"], + specialPriceEndDateTimeUtc: json["special_price_end_date_time_utc"], + customerEntersPrice: json["customer_enters_price"], + minimumCustomerEnteredPrice: json["minimum_customer_entered_price"], + maximumCustomerEnteredPrice: json["maximum_customer_entered_price"], + basepriceEnabled: json["baseprice_enabled"], + basepriceAmount: json["baseprice_amount"], + basepriceBaseAmount: json["baseprice_base_amount"], + hasTierPrices: json["has_tier_prices"], + hasDiscountsApplied: json["has_discounts_applied"], + discountName: json["discount_name"], + discountNamen: json["discount_namen"], + discountDescription: json["discount_description"], + discountDescriptionn: json["discount_Descriptionn"], + discountPercentage: json["discount_percentage"], + currency: json["currency"], + currencyn: json["currencyn"], + weight: json["weight"].toDouble(), + length: json["length"], + width: json["width"], + height: json["height"], + availableStartDateTimeUtc: json["available_start_date_time_utc"], + availableEndDateTimeUtc: json["available_end_date_time_utc"], + displayOrder: json["display_order"], + published: json["published"], + deleted: json["deleted"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + updatedOnUtc: DateTime.parse(json["updated_on_utc"]), + productType: json["product_type"], + parentGroupedProductId: json["parent_grouped_product_id"], + roleIds: List.from(json["role_ids"].map((x) => x)), + discountIds: List.from(json["discount_ids"].map((x) => x)), + storeIds: List.from(json["store_ids"].map((x) => x)), + manufacturerIds: List.from(json["manufacturer_ids"].map((x) => x)), + reviews: List.from(json["reviews"].map((x) => Review.fromJson(x))), + images: List.from(json["images"].map((x) => Image.fromJson(x))), + attributes: List.from(json["attributes"].map((x) => x)), + specifications: List.from(json["specifications"].map((x) => Specification.fromJson(x))), + associatedProductIds: List.from(json["associated_product_ids"].map((x) => x)), + tags: List.from(json["tags"].map((x) => x)), + vendorId: json["vendor_id"], + seName: json["se_name"], + ); + + Map toJson() => { + "id": id, + "visible_individually": visibleIndividually, + "name": name, + "namen": namen, + "localized_names": List.from(localizedNames!.map((x) => x.toJson())), + "short_description": shortDescription, + "short_descriptionn": shortDescriptionn, + "full_description": fullDescription, + "full_descriptionn": fullDescriptionn, + "markas_new": markasNew, + "show_on_home_page": showOnHomePage, + "meta_keywords": metaKeywords, + "meta_description": metaDescription, + "meta_title": metaTitle, + "allow_customer_reviews": allowCustomerReviews, + "approved_rating_sum": approvedRatingSum, + "not_approved_rating_sum": notApprovedRatingSum, + "approved_total_reviews": approvedTotalReviews, + "not_approved_total_reviews": notApprovedTotalReviews, + "sku": sku, + "is_rx": isRx, + "prescription_required": prescriptionRequired, + "rx_message": rxMessage, + "rx_messagen": rxMessagen, + "manufacturer_part_number": manufacturerPartNumber, + "gtin": gtin, + "is_gift_card": isGiftCard, + "require_other_products": requireOtherProducts, + "automatically_add_required_products": automaticallyAddRequiredProducts, + "is_download": isDownload, + "unlimited_downloads": unlimitedDownloads, + "max_number_of_downloads": maxNumberOfDownloads, + "download_expiration_days": downloadExpirationDays, + "has_sample_download": hasSampleDownload, + "has_user_agreement": hasUserAgreement, + "is_recurring": isRecurring, + "recurring_cycle_length": recurringCycleLength, + "recurring_total_cycles": recurringTotalCycles, + "is_rental": isRental, + "rental_price_length": rentalPriceLength, + "is_ship_enabled": isShipEnabled, + "is_free_shipping": isFreeShipping, + "ship_separately": shipSeparately, + "additional_shipping_charge": additionalShippingCharge, + "is_tax_exempt": isTaxExempt, + "is_telecommunications_or_broadcasting_or_electronic_services": isTelecommunicationsOrBroadcastingOrElectronicServices, + "use_multiple_warehouses": useMultipleWarehouses, + "manage_inventory_method_id": manageInventoryMethodId, + "stock_quantity": stockQuantity, + "stock_availability": stockAvailability, + "stock_availabilityn": stockAvailabilityn, + "display_stock_availability": displayStockAvailability, + "display_stock_quantity": displayStockQuantity, + "min_stock_quantity": minStockQuantity, + "notify_admin_for_quantity_below": notifyAdminForQuantityBelow, + "allow_back_in_stock_subscriptions": allowBackInStockSubscriptions, + "order_minimum_quantity": orderMinimumQuantity, + "order_maximum_quantity": orderMaximumQuantity, + "allowed_quantities": allowedQuantities, + "allow_adding_only_existing_attribute_combinations": allowAddingOnlyExistingAttributeCombinations, + "disable_buy_button": disableBuyButton, + "disable_wishlist_button": disableWishlistButton, + "available_for_pre_order": availableForPreOrder, + "pre_order_availability_start_date_time_utc": preOrderAvailabilityStartDateTimeUtc, + "call_for_price": callForPrice, + "price": price, + "old_price": oldPrice, + "product_cost": productCost, + "special_price": specialPrice, + "special_price_start_date_time_utc": specialPriceStartDateTimeUtc, + "special_price_end_date_time_utc": specialPriceEndDateTimeUtc, + "customer_enters_price": customerEntersPrice, + "minimum_customer_entered_price": minimumCustomerEnteredPrice, + "maximum_customer_entered_price": maximumCustomerEnteredPrice, + "baseprice_enabled": basepriceEnabled, + "baseprice_amount": basepriceAmount, + "baseprice_base_amount": basepriceBaseAmount, + "has_tier_prices": hasTierPrices, + "has_discounts_applied": hasDiscountsApplied, + "discount_name": discountName, + "discount_namen": discountNamen, + "discount_description": discountDescription, + "discount_Descriptionn": discountDescriptionn, + "discount_percentage": discountPercentage, + "currency": currency, + "currencyn": currencyn, + "weight": weight, + "length": length, + "width": width, + "height": height, + "available_start_date_time_utc": availableStartDateTimeUtc, + "available_end_date_time_utc": availableEndDateTimeUtc, + "display_order": displayOrder, + "published": published, + "deleted": deleted, + "created_on_utc": createdOnUtc!.toIso8601String(), + "updated_on_utc": updatedOnUtc!.toIso8601String(), + "product_type": productType, + "parent_grouped_product_id": parentGroupedProductId, + "role_ids": List.from(roleIds!.map((x) => x)), + "discount_ids": List.from(discountIds!.map((x) => x)), + "store_ids": List.from(storeIds!.map((x) => x)), + "manufacturer_ids": List.from(manufacturerIds!.map((x) => x)), + "reviews": List.from(reviews!.map((x) => x.toJson())), + "images": List.from(images!.map((x) => x.toJson())), + "attributes": List.from(attributes!.map((x) => x)), + "specifications": List.from(specifications!.map((x) => x.toJson())), + "associated_product_ids": List.from(associatedProductIds!.map((x) => x)), + "tags": List.from(tags!.map((x) => x)), + "vendor_id": vendorId, + "se_name": seName, + }; +} + +class Review { + Review({ + this.id, + this.position, + this.reviewId, + this.customerId, + this.productId, + this.storeId, + this.isApproved, + this.title, + this.reviewText, + this.replyText, + this.rating, + this.helpfulYesTotal, + this.helpfulNoTotal, + this.createdOnUtc, + this.customer, + this.product, + }); + + dynamic id; + dynamic position; + dynamic reviewId; + dynamic customerId; + dynamic productId; + dynamic storeId; + bool? isApproved; + String? title; + ReviewText? reviewText; + dynamic replyText; + dynamic rating; + dynamic helpfulYesTotal; + dynamic helpfulNoTotal; + DateTime? createdOnUtc; + Customer? customer; + Product? product; + + factory Review.fromJson(Map json) => Review( + id: json["id"], + position: json["position"], + reviewId: json["review_id"], + customerId: json["customer_id"], + productId: json["product_id"], + storeId: json["store_id"], + isApproved: json["is_approved"], + title: json["title"], + reviewText: reviewTextValues.map![json["review_text"]], + replyText: json["reply_text"], + rating: json["rating"], + helpfulYesTotal: json["helpful_yes_total"], + helpfulNoTotal: json["helpful_no_total"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + customer: Customer.fromJson(json["customer"]), + product: json["product"] == null ? null : Product.fromJson(json["product"]), + ); + + Map toJson() => { + "id": id, + "position": position, + "review_id": reviewId, + "customer_id": customerId, + "product_id": productId, + "store_id": storeId, + "is_approved": isApproved, + "title": title, + "review_text": reviewText, + "reply_text": replyText, + "rating": rating, + "helpful_yes_total": helpfulYesTotal, + "helpful_no_total": helpfulNoTotal, + "created_on_utc": createdOnUtc!.toIso8601String(), + "customer": customer!.toJson(), + "product": product == null ? null : product!.toJson(), + }; +} + +class Image { + Image({ + this.id, + this.position, + this.src, + this.thumb, + this.attachment, + }); + + dynamic id; + dynamic position; + String? src; + String? thumb; + String? attachment; + + factory Image.fromJson(Map json) => Image( + id: json["id"], + position: json["position"], + src: json["src"], + thumb: json["thumb"], + attachment: json["attachment"], + ); + + Map toJson() => { + "id": id, + "position": position, + "src": src, + "thumb": thumb, + "attachment": attachment, + }; +} + +class LocalizedName { + LocalizedName({ + this.languageId, + this.localizedName, + }); + + dynamic languageId; + String? localizedName; + + factory LocalizedName.fromJson(Map json) => LocalizedName( + languageId: json["language_id"], + localizedName: json["localized_name"], + ); + + Map toJson() => { + "language_id": languageId, + "localized_name": localizedName, + }; +} + +class Specification { + Specification({ + this.id, + this.displayOrder, + this.defaultValue, + this.defaultValuen, + this.name, + this.nameN, + }); + + dynamic id; + dynamic displayOrder; + String? defaultValue; + String? defaultValuen; + String? name; + String? nameN; + + factory Specification.fromJson(Map json) => Specification( + id: json["id"], + displayOrder: json["display_order"], + defaultValue: json["default_value"], + defaultValuen: json["default_valuen"], + name: json["name"], + nameN: json["nameN"], + ); + + Map toJson() => { + "id": id, + "display_order": displayOrder, + "default_value": defaultValue, + "default_valuen": defaultValuen, + "name": name, + "nameN": nameN, + }; +} + +class Customer { + Customer({ + this.fileNumber, + this.iqamaNumber, + this.isOutSa, + this.patientType, + this.gender, + this.birthDate, + this.phone, + this.countryCode, + this.yahalaAccountno, + this.billingAddress, + this.shippingAddress, + this.addresses, + this.id, + this.username, + this.email, + this.firstName, + this.lastName, + this.languageId, + this.adminComment, + this.isTaxExempt, + this.hasShoppingCartItems, + this.active, + this.deleted, + this.isSystemAccount, + this.systemName, + this.lastIpAddress, + this.createdOnUtc, + this.lastLoginDateUtc, + this.lastActivityDateUtc, + this.registeredInStoreId, + this.roleIds, + }); + + dynamic fileNumber; + dynamic iqamaNumber; + dynamic isOutSa; + dynamic patientType; + dynamic gender; + DateTime? birthDate; + dynamic phone; + dynamic countryCode; + dynamic yahalaAccountno; + dynamic billingAddress; + dynamic shippingAddress; + List? addresses; + String? id; + Username? username; + Email? email; + dynamic firstName; + dynamic lastName; + dynamic languageId; + dynamic adminComment; + dynamic isTaxExempt; + dynamic hasShoppingCartItems; + dynamic active; + dynamic deleted; + dynamic isSystemAccount; + dynamic systemName; + dynamic lastIpAddress; + dynamic createdOnUtc; + dynamic lastLoginDateUtc; + dynamic lastActivityDateUtc; + dynamic registeredInStoreId; + List? roleIds; + + factory Customer.fromJson(Map json) => Customer( + fileNumber: json["file_number"], + iqamaNumber: json["iqama_number"], + isOutSa: json["is_out_sa"], + patientType: json["patient_type"], + gender: json["gender"], + birthDate: DateTime.parse(json["birth_date"]), + phone: json["phone"], + countryCode: json["country_code"], + yahalaAccountno: json["yahala_accountno"], + billingAddress: json["billing_address"], + shippingAddress: json["shipping_address"], + addresses: List.from(json["addresses"].map((x) => x)), + id: json["id"], + username: usernameValues.map![json["username"]], + email: emailValues.map![json["email"]], + firstName: json["first_name"], + lastName: json["last_name"], + languageId: json["language_id"], + adminComment: json["admin_comment"], + isTaxExempt: json["is_tax_exempt"], + hasShoppingCartItems: json["has_shopping_cart_items"], + active: json["active"], + deleted: json["deleted"], + isSystemAccount: json["is_system_account"], + systemName: json["system_name"], + lastIpAddress: json["last_ip_address"], + createdOnUtc: json["created_on_utc"], + lastLoginDateUtc: json["last_login_date_utc"], + lastActivityDateUtc: json["last_activity_date_utc"], + registeredInStoreId: json["registered_in_store_id"], + roleIds: List.from(json["role_ids"].map((x) => x)), + ); + + Map toJson() => { + "file_number": fileNumber, + "iqama_number": iqamaNumber, + "is_out_sa": isOutSa, + "patient_type": patientType, + "gender": gender, + "birth_date": birthDate!.toIso8601String(), + "phone": phone, + "country_code": countryCode, + "yahala_accountno": yahalaAccountno, + "billing_address": billingAddress, + "shipping_address": shippingAddress, + "addresses": List.from(addresses!.map((x) => x)), + "id": id, + "username": usernameValues.reverse[username], + "email": emailValues.reverse[email], + "first_name": firstName, + "last_name": lastName, + "language_id": languageId, + "admin_comment": adminComment, + "is_tax_exempt": isTaxExempt, + "has_shopping_cart_items": hasShoppingCartItems, + "active": active, + "deleted": deleted, + "is_system_account": isSystemAccount, + "system_name": systemName, + "last_ip_address": lastIpAddress, + "created_on_utc": createdOnUtc, + "last_login_date_utc": lastLoginDateUtc, + "last_activity_date_utc": lastActivityDateUtc, + "registered_in_store_id": registeredInStoreId, + "role_ids": List.from(roleIds!.map((x) => x)), + }; +} + +enum Email { TAMER_FANASHEH_DRSULAIMANALHABIB_COM, STEVE_GATES_NOP_COMMERCE_COM } + +final emailValues = EnumValues({ + "steve_gates@nopCommerce.com": Email.STEVE_GATES_NOP_COMMERCE_COM, + "tamer.fanasheh@drsulaimanalhabib.com": Email.TAMER_FANASHEH_DRSULAIMANALHABIB_COM +}); + +enum Username { TAMERF, STEVE_GATES_NOP_COMMERCE_COM } + +final usernameValues = EnumValues({ + "steve_gates@nopCommerce.com": Username.STEVE_GATES_NOP_COMMERCE_COM, + "tamerf": Username.TAMERF +}); + +enum ReviewText { ENADDD, ENAD_TEST_0001, GOOD, ENAD_TEST_REVIEW_001, ENAD } + +final reviewTextValues = EnumValues({ + "ENAD ": ReviewText.ENAD, + "enaddd": ReviewText.ENADDD, + "ENAD TEST 0001": ReviewText.ENAD_TEST_0001, + "Enad Test Review 001": ReviewText.ENAD_TEST_REVIEW_001, + "good": ReviewText.GOOD +}); + +class EnumValues { + Map? map; + Map? reverseMap; + + EnumValues(this.map); + + Map get reverse { + if (reverseMap == null) { + reverseMap = map!.map((k, v) => new MapEntry(v, k)); + } + return reverseMap!; + } +} diff --git a/lib/models/pharmacy/specification.dart b/lib/models/pharmacy/specification.dart new file mode 100644 index 00000000..9fd50f01 --- /dev/null +++ b/lib/models/pharmacy/specification.dart @@ -0,0 +1,61 @@ +// To parse this JSON data, do +// +// final specificationModel = specificationModelFromJson(jsonString); + +import 'dart:convert'; + +SpecificationModel specificationModelFromJson(String str) => SpecificationModel.fromJson(json.decode(str)); + +String specificationModelToJson(SpecificationModel data) => json.encode(data.toJson()); + +class SpecificationModel { + SpecificationModel({ + this.specification, + }); + + List? specification; + + factory SpecificationModel.fromJson(Map json) => SpecificationModel( + specification: List.from(json["specification"].map((x) => Specification.fromJson(x))), + ); + + Map toJson() => { + "specification": List.from(specification!.map((x) => x.toJson())), + }; +} + +class Specification { + Specification({ + this.id, + this.displayOrder, + this.defaultValue, + this.defaultValuen, + this.name, + this.nameN, + }); + + int? id; + int? displayOrder; + String? defaultValue; + String? defaultValuen; + String? name; + String? nameN; + + factory Specification.fromJson(Map json) => Specification( + id: json["id"], + displayOrder: json["display_order"], + defaultValue: json["default_value"], + defaultValuen: json["default_valuen"], + name: json["name"], + nameN: json["nameN"], + ); + + Map toJson() => { + "id": id, + "display_order": displayOrder, + "default_value": defaultValue, + "default_valuen": defaultValuen, + "name": name, + "nameN": nameN, + }; +} diff --git a/lib/models/pharmacy/topBrandsModel.dart b/lib/models/pharmacy/topBrandsModel.dart new file mode 100644 index 00000000..57ac2fed --- /dev/null +++ b/lib/models/pharmacy/topBrandsModel.dart @@ -0,0 +1,137 @@ +// To parse this JSON data, do +// +// final topBrand = topBrandFromJson(jsonString); + +import 'dart:convert'; + +List topBrandFromJson(String str) => List.from(json.decode(str).map((x) => TopBrand.fromJson(x))); + +String topBrandToJson(List data) => json.encode(List.from(data.map((x) => x.toJson()))); + +class TopBrand { + TopBrand({ + this.id, + this.name, + this.namen, + this.localizedNames, + this.description, + this.manufacturerTemplateId, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.pageSize, + this.pageSizeOptions, + this.priceRanges, + this.published, + this.deleted, + this.displayOrder, + this.createdOnUtc, + this.updatedOnUtc, + this.image, + }); + + String? id; + String? name; + String? namen; + List? localizedNames; + String? description; + int? manufacturerTemplateId; + String? metaKeywords; + dynamic metaDescription; + dynamic metaTitle; + int? pageSize; + String? pageSizeOptions; + dynamic priceRanges; + bool? published; + bool? deleted; + int? displayOrder; + DateTime? createdOnUtc; + DateTime? updatedOnUtc; + Image? image; + + factory TopBrand.fromJson(Map json) => TopBrand( + id: json["id"], + name: json["name"], + namen: json["namen"], + localizedNames: List.from(json["localized_names"].map((x) => LocalizedName.fromJson(x))), + description: json["description"] == null ? null : json["description"], + manufacturerTemplateId: json["manufacturer_template_id"], + metaKeywords: json["meta_keywords"], + metaDescription: json["meta_description"], + metaTitle: json["meta_title"], + pageSize: json["page_size"], + pageSizeOptions: json["page_size_options"], + priceRanges: json["price_ranges"], + published: json["published"], + deleted: json["deleted"], + displayOrder: json["display_order"], + createdOnUtc: DateTime.parse(json["created_on_utc"]), + updatedOnUtc: DateTime.parse(json["updated_on_utc"]), + image: json["image"] == null ? null : Image.fromJson(json["image"]), + ); + + Map toJson() => { + "id": id, + "name": name, + "namen": namen, + "localized_names": List.from(localizedNames!.map((x) => x.toJson())), + "description": description == null ? null : description, + "manufacturer_template_id": manufacturerTemplateId, + "meta_keywords": metaKeywords, + "meta_description": metaDescription, + "meta_title": metaTitle, + "page_size": pageSize, + "page_size_options": pageSizeOptions, + "price_ranges": priceRanges, + "published": published, + "deleted": deleted, + "display_order": displayOrder, + "created_on_utc": createdOnUtc!.toIso8601String(), + "updated_on_utc": updatedOnUtc!.toIso8601String(), + "image": image == null ? null : image!.toJson(), + }; +} + +class Image { + Image({ + this.src, + this.thumb, + this.attachment, + }); + + String? src; + dynamic thumb; + dynamic attachment; + + factory Image.fromJson(Map json) => Image( + src: json["src"], + thumb: json["thumb"], + attachment: json["attachment"], + ); + + Map toJson() => { + "src": src, + "thumb": thumb, + "attachment": attachment, + }; +} + +class LocalizedName { + LocalizedName({ + this.languageId, + this.localizedName, + }); + + int? languageId; + String? localizedName; + + factory LocalizedName.fromJson(Map json) => LocalizedName( + languageId: json["language_id"], + localizedName: json["localized_name"], + ); + + Map toJson() => { + "language_id": languageId, + "localized_name": localizedName, + }; +} diff --git a/lib/models/rrt/RRTProcedureList.dart b/lib/models/rrt/RRTProcedureList.dart new file mode 100644 index 00000000..ff68b047 --- /dev/null +++ b/lib/models/rrt/RRTProcedureList.dart @@ -0,0 +1,50 @@ +class RRTProcedureList { + List? vidaProcedureList; + + RRTProcedureList({this.vidaProcedureList}); + + RRTProcedureList.fromJson(Map json) { + if (json['Vida_ProcedureList'] != null) { + vidaProcedureList = []; + json['Vida_ProcedureList'].forEach((v) { + vidaProcedureList!.add(new VidaProcedureList.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + if (this.vidaProcedureList != null) { + data['Vida_ProcedureList'] = this.vidaProcedureList!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class VidaProcedureList { + num? patientShare; + num? patientShareWithTax; + num? patientTaxAmount; + String? procedureID; + String? procedureName; + + VidaProcedureList({this.patientShare, this.patientShareWithTax, this.patientTaxAmount, this.procedureID, this.procedureName}); + + VidaProcedureList.fromJson(Map json) { + patientShare = json['PatientShare']; + patientShareWithTax = json['PatientShareWithTax']; + patientTaxAmount = json['PatientTaxAmount']; + procedureID = json['ProcedureID']; + procedureName = json['ProcedureName']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientShare'] = this.patientShare; + data['PatientShareWithTax'] = this.patientShareWithTax; + data['PatientTaxAmount'] = this.patientTaxAmount; + data['ProcedureID'] = this.procedureID; + data['ProcedureName'] = this.procedureName; + return data; + } +} diff --git a/lib/models/rrt/RRTRequestModel.dart b/lib/models/rrt/RRTRequestModel.dart new file mode 100644 index 00000000..dfb5b1b2 --- /dev/null +++ b/lib/models/rrt/RRTRequestModel.dart @@ -0,0 +1,75 @@ +class RRTRequestModel { + num? patientId; + int? patientOutSa; + bool? isOutPatient; + int? nearestProjectId; + num? longitude; + num? latitude; + String? additionalDetails; + String? nationality; + num? paymentAmount; + List? procedures; + + RRTRequestModel( + {this.patientId, + this.patientOutSa, + this.isOutPatient, + this.nearestProjectId, + this.longitude, + this.latitude, + this.additionalDetails, + this.nationality, + this.paymentAmount, + this.procedures}); + + RRTRequestModel.fromJson(Map json) { + patientId = json['patientId']; + patientOutSa = json['patientOutSa']; + isOutPatient = json['isOutPatient']; + nearestProjectId = json['nearestProjectId']; + longitude = json['longitude']; + latitude = json['latitude']; + additionalDetails = json['additionalDetails']; + nationality = json['nationality']; + paymentAmount = json['paymentAmount']; + if (json['procedures'] != null) { + procedures = []; + json['procedures'].forEach((v) { + procedures!.add(new Procedures.fromJson(v)); + }); + } + } + + Map toJson() { + final Map data = new Map(); + data['patientId'] = this.patientId; + data['patientOutSa'] = this.patientOutSa; + data['isOutPatient'] = this.isOutPatient; + data['nearestProjectId'] = this.nearestProjectId; + data['longitude'] = this.longitude; + data['latitude'] = this.latitude; + data['additionalDetails'] = this.additionalDetails; + data['nationality'] = this.nationality; + data['paymentAmount'] = this.paymentAmount; + if (this.procedures != null) { + data['procedures'] = this.procedures!.map((v) => v.toJson()).toList(); + } + return data; + } +} + +class Procedures { + String? serviceID; + + Procedures({this.serviceID}); + + Procedures.fromJson(Map json) { + serviceID = json['ServiceID']; + } + + Map toJson() { + final Map data = new Map(); + data['ServiceID'] = this.serviceID; + return data; + } +} diff --git a/lib/models/rrt/service_price.dart b/lib/models/rrt/service_price.dart new file mode 100644 index 00000000..abb57be6 --- /dev/null +++ b/lib/models/rrt/service_price.dart @@ -0,0 +1,53 @@ +class ServicePrice { + String? currency; + dynamic maxPrice; + dynamic maxTotalPrice; + dynamic maxVAT; + dynamic minPrice; + dynamic minTotalPrice; + dynamic minVAT; + dynamic price; + dynamic totalPrice; + dynamic vat; + + ServicePrice({ + this.currency, + this.maxPrice, + this.maxTotalPrice, + this.maxVAT, + this.minPrice, + this.minTotalPrice, + this.minVAT, + this.price, + this.totalPrice, + this.vat}); + + ServicePrice.fromJson(dynamic json) { + currency = json["Currency"]; + maxPrice = json["MaxPrice"]; + maxTotalPrice = json["MaxTotalPrice"]; + maxVAT = json["MaxVAT"]; + minPrice = json["MinPrice"]; + minTotalPrice = json["MinTotalPrice"]; + minVAT = json["MinVAT"]; + price = json["Price"]; + totalPrice = json["TotalPrice"]; + vat = json["VAT"]; + } + + Map toJson() { + var map = {}; + map["Currency"] = currency; + map["MaxPrice"] = maxPrice; + map["MaxTotalPrice"] = maxTotalPrice; + map["MaxVAT"] = maxVAT; + map["MinPrice"] = minPrice; + map["MinTotalPrice"] = minTotalPrice; + map["MinVAT"] = minVAT; + map["Price"] = price; + map["TotalPrice"] = totalPrice; + map["VAT"] = vat; + return map; + } + +} \ No newline at end of file diff --git a/lib/models/slider_data.dart b/lib/models/slider_data.dart new file mode 100644 index 00000000..6d72fc4f --- /dev/null +++ b/lib/models/slider_data.dart @@ -0,0 +1,11 @@ +import 'package:flutter/material.dart'; + +class SliderData{ + String pateintId; + String pateintName; + String dof; + Color darkColor; + Color lightColor; + + SliderData(this.pateintId, this.pateintName, this.dof,this.darkColor,this.lightColor); +} \ No newline at end of file diff --git a/lib/models/tamara_request_model.dart b/lib/models/tamara_request_model.dart new file mode 100644 index 00000000..4fe24426 --- /dev/null +++ b/lib/models/tamara_request_model.dart @@ -0,0 +1,120 @@ +class TamaraRequestModel { + String? merchantReference; + String? merchantIdentifier; + String? clientRequestID; + num? amount; + String? currency; + String? language; + String? commandType; + String? signature; + String? customerEmail; + String? orderDescription; + bool? isInstallment; + num? projectID; + String? accessCode; + String? sHARequestPhase; + String? sHAResponsePhase; + String? customerName; + String? fileNumber; + bool? patientOutSA; + String? deviceToken; + String? longitude; + String? latitude; + String? appointmentNo; + var serviceID; + var liveServiceID; + String? doctorID; + var appointmentDate; + bool? isSchedule; + + TamaraRequestModel( + {this.merchantReference, + this.merchantIdentifier, + this.clientRequestID, + this.amount, + this.currency, + this.language, + this.commandType, + this.signature, + this.customerEmail, + this.orderDescription, + this.isInstallment, + this.projectID, + this.accessCode, + this.sHARequestPhase, + this.sHAResponsePhase, + this.customerName, + this.fileNumber, + this.patientOutSA, + this.deviceToken, + this.longitude, + this.latitude, + this.appointmentNo, + this.serviceID, + this.liveServiceID, + this.appointmentDate, + this.doctorID, + this.isSchedule}); + + TamaraRequestModel.fromJson(Map json) { + merchantReference = json['Merchant_Reference']; + merchantIdentifier = json['Merchant_Identifier']; + clientRequestID = json['ClientRequestID']; + amount = json['Amount']; + currency = json['Currency']; + language = json['Language']; + commandType = json['CommandType']; + signature = json['Signature']; + customerEmail = json['CustomerEmail']; + orderDescription = json['OrderDescription']; + isInstallment = json['IsInstallment']; + projectID = json['ProjectID']; + accessCode = json['Access_code']; + sHARequestPhase = json['SHA_RequestPhase']; + sHAResponsePhase = json['SHA_ResponsePhase']; + customerName = json['CustomerName']; + fileNumber = json['FileNumber']; + patientOutSA = json['PatientOutSA']; + deviceToken = json['DeviceToken']; + longitude = json['Longitude']; + latitude = json['Latitude']; + appointmentNo = json['AppointmentNo']; + serviceID = json['Service_ID']; + liveServiceID = json['Live_ServiceID']; + doctorID = json['DoctorID']; + appointmentDate = json['AppointmentDate']; + isSchedule = json['IsSchedule']; + } + + Map toJson() { + final Map data = new Map(); + data['Merchant_Reference'] = this.merchantReference; + data['Merchant_Identifier'] = this.merchantIdentifier; + data['ClientRequestID'] = this.clientRequestID; + data['Amount'] = this.amount; + data['Currency'] = this.currency; + data['Language'] = this.language; + data['CommandType'] = this.commandType; + data['Signature'] = this.signature; + data['CustomerEmail'] = this.customerEmail; + data['OrderDescription'] = this.orderDescription; + data['IsInstallment'] = this.isInstallment; + data['ProjectID'] = this.projectID; + data['Access_code'] = this.accessCode; + data['SHA_RequestPhase'] = this.sHARequestPhase; + data['SHA_ResponsePhase'] = this.sHAResponsePhase; + data['CustomerName'] = this.customerName; + data['FileNumber'] = this.fileNumber; + data['PatientOutSA'] = this.patientOutSA; + data['DeviceToken'] = this.deviceToken; + data['Longitude'] = this.longitude; + data['Latitude'] = this.latitude; + data['AppointmentNo'] = this.appointmentNo; + data['Service_ID'] = this.serviceID; + data['Live_ServiceID'] = this.liveServiceID; + data['DoctorID'] = this.doctorID; + data['AppointmentDate'] = this.appointmentDate; + data['IsSchedule'] = this.isSchedule; + return data; + } +} diff --git a/lib/models/vital_sign.dart b/lib/models/vital_sign.dart new file mode 100644 index 00000000..f9587d31 --- /dev/null +++ b/lib/models/vital_sign.dart @@ -0,0 +1,8 @@ +class VitalSign { + final String des; + final String lastVal; + final String unit; + final String icon; + + VitalSign(this.des, this.lastVal, this.unit, this.icon); +} diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_cancel_order_dialog.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_cancel_order_dialog.dart new file mode 100644 index 00000000..4ea8c4ee --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_cancel_order_dialog.dart @@ -0,0 +1,111 @@ +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// ignore: must_be_immutable +class ConfirmCancelOrderDialog extends StatefulWidget { + final CMCViewModel model; + final Function onTap; + + ConfirmCancelOrderDialog({Key? key, required this.model, required this.onTap}); + + @override + _ConfirmCancelOrderDialogState createState() => _ConfirmCancelOrderDialogState(); +} + +class _ConfirmCancelOrderDialogState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return SimpleDialog( + contentPadding: EdgeInsets.fromLTRB(28.0, 2.0, 28.0, 0.0), + title: Text( + TranslationBase.of(context).confirm, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + letterSpacing: -0.46, + ), + ), + children: [ + Column( + children: [ + Divider(), + Center( + child: Text( + TranslationBase.of(context).cancelOrderMsg, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, letterSpacing: -0.46, color: Colors.grey[600]), + ), + ), + SizedBox( + height: 12.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Text( + TranslationBase.of(context).cancel.toUpperCase(), + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w700, + letterSpacing: -0.46, + color: Colors.red, + ), + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () async { + widget.onTap(); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Text( + TranslationBase.of(context).ok.toUpperCase(), + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w700, + letterSpacing: -0.46, + ), + )), + ), + ), + ), + ], + ), + SizedBox( + height: 5.0, + ), + ], + ) + ], + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart new file mode 100644 index 00000000..94379af8 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart @@ -0,0 +1,109 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:flutter/material.dart'; + +Future showCMCConfirmDialog(BuildContext context, String requestId, {required Function onClick}) async { + return showDialog( + context: context, + barrierDismissible: false, // user must tap button! + builder: (BuildContext context) { + return Dialog( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + ConfirmDialog( + requestId, + onClick: onClick, + ), + ], + ), + ); + }, + ); +} + +class ConfirmDialog extends StatelessWidget { + String requestId; + Function onClick; + + ConfirmDialog(this.requestId, {required this.onClick}); + + @override + Widget build(BuildContext context) { + return Container( + width: double.infinity, + padding: EdgeInsets.all(20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + width: 40, + height: 40, + margin: EdgeInsets.only(top: 20), + decoration: containerRadius(CustomColors.green, 200,), + child: Icon(Icons.done,color: Colors.white,), + ), + mFlex(1), + IconButton( + icon: Icon( + Icons.close, + ), + onPressed: () { + onClick(); + Navigator.pop(context); + }, + ), + ], + ), + mHeight(12), + Text( + TranslationBase.of(context).RRTRequestSuccess, + textAlign: TextAlign.start, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.46, + ), + ), + mHeight(20), + Text( + TranslationBase.of(context).reqId, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.grey[600], + letterSpacing: -0.46, + ), + ), + Text( + requestId ?? "", + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold, + color: Colors.black, + letterSpacing: -0.46, + ), + ), + mHeight(20), + Container( + width: MediaQuery.of(context).size.width * 0.9, + child: SecondaryButton( + label: TranslationBase.of(context).ok.toUpperCase(), + color: CustomColors.accentColor, + onTap: () async { + onClick(); + Navigator.pop(context); + }, + textColor: CustomColors.white), + ), + ], + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart new file mode 100644 index 00000000..d0dd1094 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart @@ -0,0 +1,311 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +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/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/app_map/google_huawei_map.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart'; +import 'package:geocoding/geocoding.dart'; +import 'package:geolocator/geolocator.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart' as gmaps; +import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart'; +import 'package:huawei_hmsavailability/huawei_hmsavailability.dart'; +import 'package:provider/provider.dart'; + +class CMCLocationPage extends StatefulWidget { + final Function onPick; + final double latitude; + final double longitude; + final dynamic model; + + const CMCLocationPage({Key? key, required this.onPick, required this.latitude, required this.longitude, this.model}) : super(key: key); + + @override + _CMCLocationPageState createState() => _CMCLocationPageState(); +} + +class _CMCLocationPageState extends State { + double latitude = 0; + double longitude = 0; + bool showCurrentLocation = false; + late Function onPick; + bool isHuawei = false; + late Placemark selectedPlace; + late AppMap appMap; + static gmaps.CameraPosition _kGooglePlex = gmaps.CameraPosition( + target: gmaps.LatLng(37.42796133580664, -122.085749655962), + zoom: 14.4746, + ); + late gmaps.LatLng currentPostion; + AppSharedPreferences sharedPref = AppSharedPreferences(); + late HmsApiAvailability hmsApiAvailability; + + @override + void initState() { + hmsApiAvailability = HmsApiAvailability(); + checkIsHuawei(); + + appMap = AppMap( + _kGooglePlex.toMap() as Map, + // changed by Aamir + onCameraMove: () { + _updatePosition(_kGooglePlex); + // changed by Aamir Huawei & Google Issue may Be + }, + onMapCreated: () { + currentPostion = gmaps.LatLng(widget.latitude, widget.longitude); + latitude = widget.latitude; + longitude = widget.longitude; + _getUserLocation(); + setState(() {}); + }, + onCameraIdle: () async { + List placemarks = await placemarkFromCoordinates(latitude, longitude); + selectedPlace = placemarks[0]; + print(selectedPlace); + }, + ); + + onPick = widget.onPick; + latitude = widget.latitude; + longitude = widget.longitude; + if (latitude == 0.0 && longitude == 0.0) { + showCurrentLocation = true; + } + super.initState(); + } + + checkIsHuawei() async { + await hmsApiAvailability!.isHMSAvailable().then((value) { + isHuawei = value == 0 ? true : false; + }); + print(isHuawei); + setState(() {}); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + return BaseView( + onModelReady: (model) {}, + builder: (_, model, widget) => AppScaffold( + isShowDecPage: false, + isShowAppBar: true, + baseViewModel: model, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + description: TranslationBase.of(context).infoCMC, + imagesInfo: [ + ImagesInfo(imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png'), + ], + appBarTitle: TranslationBase.of(context).addNewAddress, + body: isHuawei + ? Column( + children: [ + Expanded( + child: Stack( + alignment: Alignment.center, + children: [ + if (appMap != null) appMap, + Container( + margin: EdgeInsets.only(bottom: 50.0), + child: Icon( + Icons.place, + color: CustomColors.accentColor, + size: 50, + ), + ), + ], + ), + ), + Container( + padding: const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14), + child: DefaultButton(TranslationBase.of(context).addNewAddress, () async { + AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel( + customer: Customer(addresses: [ + Addresses( + address1: selectedPlace.street, + address2: selectedPlace.street, + customerAttributes: "", + city: selectedPlace.administrativeArea, + createdOnUtc: "", + id: "0", + faxNumber: "", + phoneNumber: projectViewModel.user!.mobileNumber, + province: selectedPlace.administrativeArea, + countryId: 69, + latLong: latitude.toStringAsFixed(6) + "," + longitude.toStringAsFixed(6), + country: selectedPlace.country, + zipPostalCode: selectedPlace.postalCode, + email: projectViewModel.user!.emailAddress) + ]), + ); + await model.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel); + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + } else { + AppToast.showSuccessToast(message: "Address Added Successfully"); + } + Navigator.of(context).pop(addNewAddressRequestModel); + }), + ), + ], + ) + : PlacePicker( + apiKey: GOOGLE_API_KEY, + enableMyLocationButton: true, + automaticallyImplyAppBarLeading: false, + autocompleteOnTrailingWhitespace: true, + selectInitialPosition: true, + autocompleteLanguage: projectViewModel.currentLanguage, + enableMapTypeButton: true, + searchForInitialValue: false, + onPlacePicked: (PickResult result) { + print(result.adrAddress); + }, + selectedPlaceWidgetBuilder: (_, selectedPlace, state, isSearchBarFocused) { + print("state: $state, isSearchBarFocused: $isSearchBarFocused"); + + return isSearchBarFocused + ? Container() + : FloatingCard( + bottomPosition: 0.0, + leftPosition: 0.0, + rightPosition: 0.0, + width: 500, + borderRadius: BorderRadius.circular(12.0), + child: state == SearchingState.Searching + ? Center(child: CircularProgressIndicator()) + : Container( + margin: EdgeInsets.all(12), + child: Column( + children: [ + SecondaryButton( + color: CustomColors.accentColor, + textColor: Colors.white, + onTap: () async { + print(selectedPlace); + AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel( + customer: Customer( + addresses: [ + Addresses( + address1: selectedPlace!.formattedAddress, + address2: selectedPlace.formattedAddress, + customerAttributes: "", + city: "", + createdOnUtc: "", + id: "0", + latLong: selectedPlace.geometry!.location.lat.toString() + "," + selectedPlace.geometry!.location.lng.toString(), + email: "", + ) + ], + ), + ); + + selectedPlace.addressComponents!.forEach((e) { + if (e.types.contains("country")) { + addNewAddressRequestModel.customer!.addresses![0].country = e.longName; + } + if (e.types.contains("postal_code")) { + addNewAddressRequestModel.customer!.addresses![0].zipPostalCode = e.longName; + } + if (e.types.contains("locality")) { + addNewAddressRequestModel.customer!.addresses![0].city = e.longName; + } + }); + + await model.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel); + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + } else { + onPick(); + AppToast.showSuccessToast(message: "Address Added Successfully"); + } + Navigator.of(context).pop(); + }, + label: TranslationBase.of(context).addNewAddress, + ), + ], + ), + ), + ); + }, + initialPosition: gmaps.LatLng(latitude, longitude), + useCurrentLocation: showCurrentLocation, + ), + ), + ); + } + + void _getUserLocation() async { + if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { + var lat = await this.sharedPref.getDouble(USER_LAT); + var long = await this.sharedPref.getDouble(USER_LONG); + latitude = lat; + longitude = long; + currentPostion = gmaps.LatLng(lat, long); + setMap(); + } else { + if (await PermissionService.isLocationEnabled()) { + Geolocator.getLastKnownPosition().then((value) { + latitude = value!.latitude; + longitude = value.longitude; + currentPostion = gmaps.LatLng(latitude, longitude); + setMap(); + }); + } else { + if (Platform.isAndroid) { + Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () { + Geolocator.getLastKnownPosition().then((value) { + latitude = value!.latitude; + longitude = value.longitude; + currentPostion = gmaps.LatLng(latitude, longitude); + setMap(); + }); + }); + } else { + Geolocator.getLastKnownPosition().then((value) { + latitude = value!.latitude; + longitude = value.longitude; + setMap(); + }); + } + } + } + } + + setMap() { + setState(() { + _kGooglePlex = gmaps.CameraPosition( + target: currentPostion, + zoom: 14.4746, + ); + appMap.moveTo(cameraPostion: _kGooglePlex); + }); + } + + void _updatePosition(gmaps.CameraPosition _position) { + print(_position); + latitude = _position.target.latitude; + longitude = _position.target.longitude; + } +} diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart new file mode 100644 index 00000000..1b467242 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart @@ -0,0 +1,254 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/main.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; +import 'package:flutter/material.dart'; +import 'package:geolocator/geolocator.dart'; +import 'package:provider/provider.dart'; + +import 'new_cmc_step_one_page.dart'; + +class NewCMCPage extends StatefulWidget { + NewCMCPage({required this.model}); + + final CMCViewModel model; + + @override + _NewCMCPageState createState() => _NewCMCPageState(); +} + +class _NewCMCPageState extends State with TickerProviderStateMixin { + late PageController _controller; + int _currentIndex = 1; + + double _latitude = 0; + double _longitude = 0; + + late CMCInsertPresOrderRequestModel cMCInsertPresOrderRequestModel; + + late BuildContext _context; + + @override + void initState() { + super.initState(); + PatientERCMCInsertServicesList patientERCMCInsertServicesList; + if (widget.model.cmcAllServicesList.length > 0) { + patientERCMCInsertServicesList = PatientERCMCInsertServicesList( + price: widget.model.cmcAllServicesList[0].price, + serviceID: widget.model.cmcAllServicesList[0].serviceID.toString(), + selectedServiceName: widget.model.cmcAllServicesList[0].text, + selectedServiceNameAR: widget.model.cmcAllServicesList[0].textN, + recordID: 1, + totalPrice: widget.model.cmcAllServicesList[0].priceTotal, + vAT: widget.model.cmcAllServicesList[0].priceVAT, + ); + cMCInsertPresOrderRequestModel = CMCInsertPresOrderRequestModel(patientERCMCInsertServicesList: [patientERCMCInsertServicesList]); + } else { + cMCInsertPresOrderRequestModel = CMCInsertPresOrderRequestModel(patientERCMCInsertServicesList: []); + //changed By Aamir + } + _controller = new PageController(); + // _getCurrentLocation(); + } + + _getCurrentLocation() async { + await Geolocator.getLastKnownPosition().then((value) { + _latitude = value!.latitude; + _longitude = value.longitude; + }).catchError((e) { + _longitude = 0; + _latitude = 0; + }); + } + + @override + void dispose() { + super.dispose(); + } + + changePageViewIndex(pageIndex) { + _controller.jumpToPage(pageIndex); + } + + @override + Widget build(BuildContext context) { + _context = context; + ProjectViewModel projectViewModel = Provider.of(context); + void showConfirmMessage(CMCViewModel model, GetCMCAllOrdersResponseModel order) { + showDialog( + context: context, + builder: (cxt) => ConfirmWithMessageDialog( + message: TranslationBase.of(context).cancelOrderMsg, + onTap: () async { + UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.iD, rejectionReason: "", presOrderStatus: 4, editedBy: 3); + Future.delayed(new Duration(milliseconds: 300)).then((value) async { + GifLoaderDialogUtils.showMyDialog(_context); + await model.updateCmcPresOrder(updatePresOrderRequestModel); + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + GifLoaderDialogUtils.hideDialog(_context); + } else { + AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); + await model.getCmcAllPresOrders(); + GifLoaderDialogUtils.hideDialog(_context); + } + }); + }, + )); + } + + int status = widget.model.pendingOrder != null && widget.model.pendingOrder!.statusId != null ? widget.model.pendingOrder!.statusId! : 0; + String _statusDisp = widget.model.pendingOrder != null && widget.model.pendingOrder!.statusText != null ? widget.model.pendingOrder!.statusText! : ""; + Color? _color; + if (status == 1) { + //pending + _color = Color(0xffCC9B14); + } else if (status == 2) { + //processing + _color = Color(0xff2E303A); + } else if (status == 3) { + //completed + _color = Color(0xff359846); + } else if (status == 4 || status == 6 || status == 7) { + //cancel // Rejected + _color = Color(0xffD02127); + } + + return Scaffold( + body: SafeArea( + child: Container( + child: widget.model.pendingOrder != null && widget.model.pendingOrder!.serviceText != null + ? Column( + children: [ + Container( + width: double.infinity, + padding: EdgeInsets.only(left: 12, right: 12, top: 12), + child: Container( + decoration: cardRadius(12), + margin: EdgeInsets.zero, + clipBehavior: Clip.antiAlias, + child: Container( + margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), + padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + ), + ), + // clipBehavior: Clip.antiAlias, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _statusDisp, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _color, letterSpacing: -0.4, height: 16 / 10), + ), + SizedBox(height: 6), + Text( + '${TranslationBase.of(context).requestID}: ${widget.model.pendingOrder!.iD}', + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).hospital + ": ", + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Expanded( + child: Text( + widget.model.pendingOrder!.projectName != null ? widget.model.pendingOrder!.projectName!.trim().toString() : "", + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), + ), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).serviceName + ": ", + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Expanded( + child: Text( + widget.model.pendingOrder!.serviceText!.trim().toString(), + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), + ), + ), + ], + ), + ], + ), + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text( + DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.model.pendingOrder!.created!)!), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10), + ), + SizedBox(height: 12), + if (widget.model.pendingOrder!.statusId == 1 || widget.model.pendingOrder!.statusId == 2) + InkWell( + onTap: () { + showConfirmMessage(widget.model, widget.model.pendingOrder!); + }, + child: Container( + padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), + decoration: BoxDecoration( + color: Color(0xffD02127), + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.circular(10), + ), + child: Text( + TranslationBase.of(context).cancel_nocaps, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4), + ), + ), + ), + ], + ), + ], + ), + ), + ), + ) + ], + ) + : Container( + color: Colors.red, + child: NewCMCStepOnePage( + changePageViewIndex: changePageViewIndex, + cMCInsertPresOrderRequestModel: cMCInsertPresOrderRequestModel, + model: widget.model, + latitude: _latitude, + longitude: _longitude, + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart new file mode 100644 index 00000000..43350f2d --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart @@ -0,0 +1,195 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/photo_view_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:provider/provider.dart'; + +import 'new_cmc_step_tow_page.dart'; + +class NewCMCStepOnePage extends StatefulWidget { + final CMCInsertPresOrderRequestModel cMCInsertPresOrderRequestModel; + final Function changePageViewIndex; + final CMCViewModel model; + + final double latitude; + final double longitude; + + const NewCMCStepOnePage({Key? key, required this.cMCInsertPresOrderRequestModel, required this.model, required this.changePageViewIndex, required this.latitude, required this.longitude}) + : super(key: key); + + @override + _NewCMCStepOnePageState createState() => _NewCMCStepOnePageState(); +} + +class _NewCMCStepOnePageState extends State { + int selectedItem = 0; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + return AppScaffold( + isShowAppBar: false, + baseViewModel: widget.model, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + child: Column( + children: [ + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index) { + return Row( + children: [ + Radio( + value: num.tryParse(widget.model.cmcAllServicesList[index].serviceID!), + activeColor: Colors.red[800], + onChanged: (newValue) async { + selectedItem = index; + PatientERCMCInsertServicesList patientERCMCInsertServicesList = PatientERCMCInsertServicesList( + price: widget.model.cmcAllServicesList[index].price, + serviceID: widget.model.cmcAllServicesList[index].serviceID, + selectedServiceName: widget.model.cmcAllServicesList[index].text, + selectedServiceNameAR: widget.model.cmcAllServicesList[index].textN, + recordID: 1, + totalPrice: widget.model.cmcAllServicesList[index].priceTotal, + vAT: widget.model.cmcAllServicesList[index].priceVAT); + setState(() { + widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList]; + }); + // CMCGetItemsRequestModel cMCGetItemsRequestModel = new CMCGetItemsRequestModel(checkupType: newValue); + // await widget.model.getCheckupItems(cMCGetItemsRequestModel: cMCGetItemsRequestModel); + }, + groupValue: widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList!.length > 0 + ? int.parse(widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList![0].serviceID!) + : 1), + Expanded( + child: Padding( + padding: const EdgeInsets.only( + left: 10, + right: 10, + top: 20, + bottom: 20, + ), + child: Text( + projectViewModel.isArabic ? widget.model.cmcAllServicesList[index].textN! : widget.model.cmcAllServicesList[index].text!, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.45, + ), + ), + ), + ), + ], + ); + }, + separatorBuilder: (context, index) { + return mDivider(Colors.grey); + }, + itemCount: widget.model.cmcAllServicesList.length), + Stack( + children: [ + Image.asset( + projectViewModel.isArabic ? "assets/images/cc_ar.png" : "assets/images/cc_en.png", + width: double.infinity, + ), + Align( + alignment: Alignment.topRight, + child: Container( + decoration: containerColorRadiusBorder( + Colors.black.withOpacity(0.2), + 1000, + Colors.white, + ), + margin: EdgeInsets.all(12), + child: IconButton( + icon: SvgPicture.asset( + "assets/images/new/ic_zoom.svg", + color: Colors.white, + ), + padding: EdgeInsets.all(12), + onPressed: () { + showDraggableDialog(context, PhotoViewPage(projectViewModel.isArabic ? "assets/images/cc_ar.png" : "assets/images/cc_en.png")); + }, + ), + ), + ), + ], + ), + ], + ), + ), + ), + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).next, + () async { + if (widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList!.length != 0 || widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList == null) { + // int index = widget.model.cmcAllServicesList.length; + PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList( + price: widget.model.cmcAllServicesList[selectedItem].price, + serviceID: widget.model.cmcAllServicesList[selectedItem].serviceID.toString(), + selectedServiceName: widget.model.cmcAllServicesList[selectedItem].text, + selectedServiceNameAR: widget.model.cmcAllServicesList[selectedItem].textN, + recordID: 1, + totalPrice: widget.model.cmcAllServicesList[selectedItem].priceTotal, + vAT: widget.model.cmcAllServicesList[selectedItem].priceVAT, + ); + + widget.cMCInsertPresOrderRequestModel.patientID = projectViewModel.user!.patientID; + widget.cMCInsertPresOrderRequestModel.patientOutSA = projectViewModel.user!.outSA; + + widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList]; + navigateTo( + context, + NewCMCStepThreePage( + cmcInsertPresOrderRequestModel: widget.cMCInsertPresOrderRequestModel, + model: widget.model, + ), + ); + // await widget.model.getCustomerInfo(); + if (widget.model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(); + } else { + // navigateTo( + // context, + // NewCMCStepTowPage( + // longitude: widget.longitude, + // latitude: widget.latitude, + // cmcInsertPresOrderRequestModel: widget.cMCInsertPresOrderRequestModel, + // model: widget.model, + // ), + // ); + } + } + }, + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart new file mode 100644 index 00000000..20d4f9f5 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart @@ -0,0 +1,427 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:maps_launcher/maps_launcher.dart'; +import 'package:provider/provider.dart'; + +class NewCMCStepThreePage extends StatefulWidget { + final CMCInsertPresOrderRequestModel cmcInsertPresOrderRequestModel; + final CMCViewModel model; + + NewCMCStepThreePage( + {Key? key, + required this.model, + required this.cmcInsertPresOrderRequestModel}); + + @override + _NewCMCStepThreePageState createState() => _NewCMCStepThreePageState(); +} + +class _NewCMCStepThreePageState extends State { + Completer _controller = Completer(); + + String? projectDropdownValue; + late List projectsList = []; + HospitalsModel? selectedHospital; + final GlobalKey projectDropdownKey = GlobalKey(); + bool isLocationSelected = false; + ProjectViewModel? projectViewModel; + + static CameraPosition _kGooglePlex = CameraPosition( + target: LatLng(37.42796133580664, -122.085749655962), + zoom: 14.4746, + ); + final Set markers = new Set(); + + @override + void initState() { + if (widget.cmcInsertPresOrderRequestModel.latitude != null) { + markers.clear(); + markers.add( + Marker( + markerId: MarkerId( + widget.cmcInsertPresOrderRequestModel.latitude.hashCode + .toString(), + ), + position: LatLng(widget.cmcInsertPresOrderRequestModel.latitude!, + widget.cmcInsertPresOrderRequestModel.longitude!)), + ); + _kGooglePlex = CameraPosition( + target: LatLng(widget.cmcInsertPresOrderRequestModel.latitude!, + widget.cmcInsertPresOrderRequestModel.longitude!), + zoom: 14.4746, + ); + } + WidgetsBinding.instance.addPostFrameCallback((_) { + // if (projectViewModel.isLogin) { + getProjectsList(); + // } + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + description: TranslationBase.of(context).infoCMC, + imagesInfo: [ + ImagesInfo( + imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png', + imageEn: + 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png'), + ], + appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + baseViewModel: widget.model, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Container( + height: 500, + width: double.maxFinite, + margin: EdgeInsets.only(left: 12, right: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 12, + ), + Text( + TranslationBase.of(context).orderSummary, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + letterSpacing: -0.46, + ), + ), + SizedBox( + height: 12, + ), + Container( + decoration: cardRadius(12), + child: Container( + padding: EdgeInsets.all(8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + margin: EdgeInsets.only(top: 12), + padding: EdgeInsets.only( + left: 0, right: 0, top: 0, bottom: 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectLocation, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + key: projectDropdownKey, + hint: new Text( + TranslationBase.of(context) + .selectHospital), + value: selectedHospital, + iconSize: 0, + isExpanded: true, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.56, + color: Colors.black), + items: projectsList.map((item) { + return new DropdownMenuItem< + HospitalsModel>( + value: item, + child: new Text(item.name!), + ); + }).toList(), + onChanged: + (HospitalsModel? newValue) async { + setState(() { + selectedHospital = newValue!; + projectDropdownValue = newValue + .mainProjectID + .toString(); + isLocationSelected = true; + widget.cmcInsertPresOrderRequestModel + .projectID = + newValue.mainProjectID; + // getDoctorsList(context); + }); + }, + ), + ), + ), + ], + ), + ), + Icon(Icons.keyboard_arrow_down), + ], + ), + ), + SizedBox( + height: 6, + ), + isLocationSelected + ? Padding( + padding: const EdgeInsets.all(8.0), + child: Stack( + children: [ + Container( + height: 200, + decoration: containerColorRadiusBorder( + Colors.white, 12, Colors.grey), + clipBehavior: Clip.antiAlias, + child: Container( + decoration: cardRadius(12), + clipBehavior: Clip.antiAlias, + margin: const EdgeInsets.all(0), + child: Image.network( + "https://maps.googleapis.com/maps/api/staticmap?center=" + + selectedHospital!.latitude + .toString() + + "," + + selectedHospital!.longitude + .toString() + + "&zoom=16&size=600x300&maptype=roadmap&markers=color:red%7C" + + selectedHospital!.latitude + .toString() + + "," + + selectedHospital!.longitude + .toString() + + "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8", + width: double.infinity, + height: double.infinity, + fit: BoxFit.cover, + ), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + InkWell( + onTap: () { + getDirections(); + }, + child: Container( + decoration: cardRadius(1000), + margin: EdgeInsets.all(12), + child: Padding( + padding: const EdgeInsets.only( + left: 12, + right: 12, + top: 6, + bottom: 6), + child: Row( + children: [ + Padding( + padding: + const EdgeInsets.all(3.0), + child: SvgPicture.asset( + "assets/images/new/direction.svg", + width: 13, + height: 13, + ), + ), + mWidth(6), + Text( + TranslationBase.of(context) + .getDirections, + style: TextStyle( + color: Colors.black, + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ) + ], + ), + ), + ), + ), + ], + ), + ], + ), + ) + : Container(), + SizedBox( + height: 12, + ), + Text( + TranslationBase.of(context).selectedService, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.46, + color: CustomColors.grey, + ), + ), + ...List.generate( + widget.cmcInsertPresOrderRequestModel + .patientERCMCInsertServicesList!.length, + (index) => Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + projectViewModel!.isArabic + ? widget + .cmcInsertPresOrderRequestModel + .patientERCMCInsertServicesList![index] + .selectedServiceNameAR! + : widget + .cmcInsertPresOrderRequestModel + .patientERCMCInsertServicesList![index] + .selectedServiceName!, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.bold, + letterSpacing: -0.46, + ), + ), + ], + ), + ), + ) + ], + ), + ), + ) + ], + ), + ), + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.10, + width: double.infinity, + color: Colors.white, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.9, + child: DefaultButton( + TranslationBase.of(context).confirm, + !isLocationSelected + ? null + : () async { + GifLoaderDialogUtils.showMyDialog(context); + String requestId = await widget.model.insertCMCOrderRC( + order: widget.cmcInsertPresOrderRequestModel); + GifLoaderDialogUtils.hideDialog(context); + if (widget.model.state != ViewState.ErrorLocal) { + showCMCConfirmDialog( + context, + requestId, + onClick: () { + Navigator.pop(context); + Navigator.pop(context); + }, + ); + } else { + AppToast.showErrorToast(message: widget.model.error); + } + }, + color: CustomColors.green, + disabledColor: CustomColors.grey, + ), + // SecondaryButton( + // label: TranslationBase.of(context).confirm, + // color: CustomColors.green, + // onTap: () async { + // if(isLocationSelected) { + // GifLoaderDialogUtils.showMyDialog(context); + // String requestId = await widget.model.insertCMCOrderRC(order: widget.cmcInsertPresOrderRequestModel); + // GifLoaderDialogUtils.hideDialog(context); + // if (widget.model.state != ViewState.ErrorLocal) { + // showCMCConfirmDialog( + // context, + // requestId, + // onClick: () { + // Navigator.pop(context); + // Navigator.pop(context); + // }, + // ); + // } else { + // AppToast.showErrorToast(message: widget.model.error); + // } + // } else { + // Utils.showErrorToast("Please select hospital from the dropdown menu to continue"); + // } + // }, + // textColor: Theme.of(context).backgroundColor), + ), + ], + ), + ), + ); + } + + getDirections() { + if (isLocationSelected) { + MapsLauncher.launchCoordinates(double.parse(selectedHospital!.latitude!), + double.parse(selectedHospital!.longitude!), selectedHospital!.name); + } else { + Utils.showErrorToast( + "Please select address from the dropdown menu to get directions"); + } + } + + getProjectsList() { + int languageID = projectViewModel!.isArabic ? 1 : 2; + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + List projectsListLocal = []; + service.getProjectsList(languageID, context).then((res) { + if (res['MessageStatus'] == 1) { + setState(() { + res['ListProject'].forEach((v) { + projectsListLocal.add(new HospitalsModel.fromJson(v)); + }); + projectsList = projectsListLocal; + }); + } + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart new file mode 100644 index 00000000..d75aecaa --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart @@ -0,0 +1,317 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/app_map/google_huawei_map.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:geolocator/geolocator.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart' as gmaps; +import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart'; +import 'package:permission_handler/permission_handler.dart'; + +import 'cmc_location_page.dart'; +import 'new_cmc_step_three_page.dart'; + +class NewCMCStepTowPage extends StatefulWidget { + final Function(PickResult) onPick; + final double latitude; + final double longitude; + final CMCInsertPresOrderRequestModel cmcInsertPresOrderRequestModel; + final CMCViewModel model; + + const NewCMCStepTowPage({Key? key, required this.onPick, required this.latitude, required this.longitude, required this.cmcInsertPresOrderRequestModel, required this.model}) : super(key: key); + + @override + _NewCMCStepTowPageState createState() => _NewCMCStepTowPageState(); +} + +class _NewCMCStepTowPageState extends State { + double latitude = 0; + double longitude = 0; + late AddressInfo _selectedAddress; + bool showCurrentLocation = false; + AppSharedPreferences sharedPref = AppSharedPreferences(); + + static gmaps.CameraPosition cameraPosition = gmaps.CameraPosition( + target: gmaps.LatLng(37.42796133580664, -122.085749655962), + zoom: 14.4746, + ); + + late gmaps.LatLng currentPostion; + + void _getUserLocation() async { + if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { + var lat = await this.sharedPref.getDouble(USER_LAT); + var long = await this.sharedPref.getDouble(USER_LONG); + latitude = lat; + longitude = long; + currentPostion = gmaps.LatLng(lat, long); + setMap(); + } else { + if (await PermissionService.isLocationEnabled()) { + Geolocator.getLastKnownPosition().then((value) { + latitude = value!.latitude; + longitude = value.longitude; + currentPostion = gmaps.LatLng(latitude, longitude); + setMap(); + }); + } else { + if (Platform.isAndroid) { + Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () { + Geolocator.getLastKnownPosition().then((value) { + latitude = value!.latitude; + longitude = value.longitude; + currentPostion = gmaps.LatLng(latitude, longitude); + setMap(); + }); + }); + } else { + Geolocator.getLastKnownPosition().then((value) { + latitude = value!.latitude; + longitude = value.longitude; + currentPostion = gmaps.LatLng(latitude, longitude); + setMap(); + }); + } + } + } + } + + @override + void initState() { + super.initState(); + appMap = AppMap( + cameraPosition.toMap() as Map, + // Changed by Aamir + onCameraMove: () { + // setState(() {}); + // Changed by Aamir + _updatePosition(cameraPosition); + }, + onMapCreated: () { + print("_getUserLocation"); + _getUserLocation(); + }, + ); + } + + setMap() { + setState(() { + cameraPosition = gmaps.CameraPosition( + target: currentPostion, + zoom: 14.4746, + ); + if (appMap != null) appMap.moveTo(cameraPostion: cameraPosition); + }); + } + + Future> requestPermissions() async { + var permissionResults = [ + Permission.location, + Permission.locationAlways, + ].request(); + + return permissionResults; + } + + setLatitudeAndLongitude({bool isSetState = false, String? latLong}) async { + print("latLong " + latLong.toString()); + if (latLong == null) { + if (widget.model.addressesList.isEmpty) { + setState(() { + showCurrentLocation = true; + }); + } else { + latLong = widget.model.addressesList[widget.model.addressesList.length - 1].latLong; + } + } + + if (!showCurrentLocation) { + List latLongArr = latLong!.split(','); + + latitude = double.parse(latLongArr[0]); + longitude = double.parse(latLongArr[1]); + print("sssss1 " + latitude.toString()); + print("sssss2 " + longitude.toString()); + currentPostion = gmaps.LatLng(latitude, longitude); + setMap(); + } + } + + late AppMap appMap; + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + description: TranslationBase.of(context).infoCMC, + imagesInfo: [ + ImagesInfo(imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png'), + ], + appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + baseViewModel: widget.model, + body: Column( + children: [ + if (widget.model.addressesList.isNotEmpty) + Container( + margin: EdgeInsets.only(left: 12, right: 12, bottom: 12, top: 12), + decoration: cardRadius(12), + child: Container( + child: InkWell( + onTap: () => confirmSelectLocationDialog(widget.model.addressesList), + child: Container( + padding: EdgeInsets.all(8), + width: double.infinity, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + getAddressName(), + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.45, + ), + ), + ), + Icon(Icons.arrow_drop_down) + ], + ), + ), + ), + height: 50, + width: double.infinity, + ), + ), + InkWell( + onTap: () async { + bool isNeedToUpdate = false; + await Navigator.of(context).push(new MaterialPageRoute( + builder: (BuildContext context) { + return CMCLocationPage( + latitude: latitude, + longitude: longitude, + onPick: () { + isNeedToUpdate = true; + }, + ); + }, + )); + if (isNeedToUpdate) { + _selectedAddress = new AddressInfo(); + _selectedAddress.address1 = widget.model.addressesList.last.address1; + showCurrentLocation = false; + setLatitudeAndLongitude(); + setState(() {}); + } + }, + child: Padding( + padding: EdgeInsets.only(left: 12, right: 12, bottom: 16, top: 8), + child: Row( + children: [ + Icon(Icons.add_circle_outline_sharp), + mWidth(12), + Text( + TranslationBase.of(context).addNewAddress, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + ], + ), + ), + ), + Expanded( + child: Stack( + alignment: Alignment.center, + children: [ + if (appMap != null) appMap, + Icon( + Icons.place, + color: CustomColors.accentColor, + size: 50, + ), + ], + ), + ), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14), + child: SecondaryButton( + color: Colors.red[800], + textColor: Colors.white, + onTap: () { + setState(() { + widget.cmcInsertPresOrderRequestModel.latitude = latitude; + widget.cmcInsertPresOrderRequestModel.longitude = longitude; + }); + // widget.changePageViewIndex(3); + navigateTo( + context, + NewCMCStepThreePage( + cmcInsertPresOrderRequestModel: widget.cmcInsertPresOrderRequestModel, + model: widget.model, + ), + ); + }, + label: TranslationBase.of(context).continues, + ), + ), + ], + ), + ); + } + + void _updatePosition(gmaps.CameraPosition _position) { + latitude = _position.target.latitude; + longitude = _position.target.longitude; + } + + void confirmSelectLocationDialog(List addresses) { + showDialog( + context: context, + builder: (cxt) => SelectLocationDialog( + addresses: addresses, + selectedAddress: _selectedAddress, + onValueSelected: (value) { + showCurrentLocation = false; + setLatitudeAndLongitude(latLong: value.latLong); + + setState(() { + _selectedAddress = value; + }); + }, + ), + ); + } + + String getAddressName() { + if (_selectedAddress != null) + return _selectedAddress.address1!; + else + return TranslationBase.of(context).selectAddress; + } +} diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart new file mode 100644 index 00000000..162c67a2 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart @@ -0,0 +1,89 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'NewCMC/new_cmc_page.dart'; +import 'orders_log_details_page.dart'; + +class CMCPage extends StatefulWidget { + @override + _CMCPageState createState() => _CMCPageState(); +} + +class _CMCPageState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) async { + await model.getCmcAllPresOrders(); + }, + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + description: TranslationBase.of(context).infoCMC, + imagesInfo: [ + ImagesInfo(imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png'), + ], + appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).cmcHeading), Text(TranslationBase.of(context).orderLog)], + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [NewCMCPage(model: model), OrdersLogDetailsPage(model: model)], + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart new file mode 100644 index 00000000..10a15d8d --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart @@ -0,0 +1,183 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'Dialog/confirm_cancel_order_dialog.dart'; + +class OrdersLogDetailsPage extends StatelessWidget { + final CMCViewModel model; + + const OrdersLogDetailsPage({Key ?key, required this.model}) : super(key: key); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + void showConfirmMessage(CMCViewModel model, GetCMCAllOrdersResponseModel order) { + showDialog( + context: context, + builder: (cxt) => ConfirmWithMessageDialog( + message: TranslationBase.of(context).cancelOrderMsg, + onTap: () { + UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.iD, rejectionReason: "", presOrderStatus: 4, editedBy: 3); + Future.delayed(new Duration(milliseconds: 300)).then((value) async { + GifLoaderDialogUtils.showMyDialog(context); + await model.updateCmcPresOrder(updatePresOrderRequestModel); + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + GifLoaderDialogUtils.hideDialog(context); + } else { + AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); + await model.getCmcAllPresOrders(); + GifLoaderDialogUtils.hideDialog(context); + } + }); + }, + )); + return; + } + + return AppScaffold( + isShowAppBar: false, + baseViewModel: model, + body: model.cmcAllPresOrders.length > 0 ? ListView.separated( + padding: EdgeInsets.all(21), + physics: BouncingScrollPhysics(), + itemBuilder: (context, index) { + GetCMCAllOrdersResponseModel order = model.cmcAllPresOrders.reversed.toList()[index]; + + int status = order.statusId!; + String _statusDisp = order.statusText!; + late Color _color; + if (status == 1) { + //pending + _color = Color(0xffCC9B14); + } else if (status == 2) { + //processing + _color = Color(0xff2E303A); + } else if (status == 3) { + //completed + _color = Color(0xff359846); + } else if (status == 4 || status == 6 || status == 7) { + //cancel // Rejected + _color = Color(0xffD02127); + } + return Container( + decoration: BoxDecoration( + color: _color, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Container( + margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), + padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + ), + ), + // clipBehavior: Clip.antiAlias, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _statusDisp, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _color, letterSpacing: -0.4, height: 16 / 10), + ), + SizedBox(height: 6), + Text( + '${TranslationBase.of(context).requestID}: ${order.iD}', + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).hospital + ": ", + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Expanded( + child: Text( + // !projectViewModel.isArabic ? order.nearestProjectDescription.trim().toString() : order.nearestProjectDescriptionN.toString(), + order.projectName != null ? order.projectName!.trim().toString() : "", + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), + ), + ), + ], + ) + ], + ), + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text( + DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(order.created!)!), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10), + ), + SizedBox(height: 12), + if (order.statusId == 1 || order.statusId == 2) + InkWell( + onTap: () { + showConfirmMessage(model, order); + }, + child: Container( + padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), + decoration: BoxDecoration( + color: Color(0xffD02127), + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.circular(10), + ), + child: Text( + TranslationBase.of(context).cancel_nocaps, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4), + ), + ), + ), + ], + ), + ], + ), + ), + ); + }, + separatorBuilder: (context, index) => SizedBox(height: 12), + itemCount: model.cmcAllPresOrders.length) : getNoDataWidget(context), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_index_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_index_page.dart new file mode 100644 index 00000000..543f320b --- /dev/null +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_index_page.dart @@ -0,0 +1,178 @@ +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:flutter/material.dart'; + +import 'new_e_referral_step_three_page.dart'; +import 'new_e_referral_step_two_page.dart'; + +class StartIndexForNewEReferral extends StatefulWidget { + StartIndexForNewEReferral(); + + @override + _StartIndexForNewEReferralState createState() => _StartIndexForNewEReferralState(); +} + +class _StartIndexForNewEReferralState extends State with TickerProviderStateMixin { + late PageController _controller; + int _currentIndex = 0; + int pageSelected = 2; + + CreateEReferralRequestModel createEReferralRequestModel = new CreateEReferralRequestModel(); + + @override + void initState() { + super.initState(); + _controller = new PageController(); + } + + @override + void dispose() { + super.dispose(); + } + + changePageViewIndex(pageIndex) { + _controller.jumpToPage(pageIndex); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Container( + height: double.infinity, + child: Column( + children: [ + Container( + width: double.infinity, + padding: EdgeInsets.only(left: 12,right: 12,top: 12), + child: Row( + children: [ + Expanded( + child: showProgress( + title: TranslationBase.of(context).RequesterInfo, + status: _currentIndex == 0 + ? TranslationBase.of(context).inPrgress + : _currentIndex > 0 + ? TranslationBase.of(context).completed + : TranslationBase.of(context).locked, + color: _currentIndex == 0 ? CustomColors.orange : CustomColors.green, + ), + ), + Expanded( + child: showProgress( + title: TranslationBase.of(context).patientInfo, + status: _currentIndex == 1 + ? TranslationBase.of(context).inPrgress + : _currentIndex > 1 + ? TranslationBase.of(context).completed + : TranslationBase.of(context).locked, + color: _currentIndex == 1 + ? CustomColors.orange + : _currentIndex > 1 + ? CustomColors.green + : CustomColors.grey2, + ), + ), + showProgress( + title: TranslationBase.of(context).otherInfo, + status: _currentIndex == 2 ? TranslationBase.of(context).inPrgress : TranslationBase.of(context).locked, + color: _currentIndex == 2 + ? CustomColors.orange + : _currentIndex > 3 + ? CustomColors.green + : CustomColors.grey2, + isNeedBorder: false, + ), + ], + ), + ), + Expanded( + child: PageView( + physics: NeverScrollableScrollPhysics(), + controller: _controller, + onPageChanged: (index) { + setState(() { + _currentIndex = index; + }); + }, + scrollDirection: Axis.horizontal, + children: [ + NewEReferralStepOnePage( + changePageViewIndex: changePageViewIndex, + createEReferralRequestModel: createEReferralRequestModel, + ), + NewEReferralStepTowPage( + changePageViewIndex: changePageViewIndex, + createEReferralRequestModel: createEReferralRequestModel, + ), + NewEReferralStepThreePage( + changePageViewIndex: changePageViewIndex, + createEReferralRequestModel: createEReferralRequestModel, + ), + ], + ), + ), + ], + ), + ), + ); + } + + Widget showProgress({required String title, required String status, required Color color, bool isNeedBorder = true}) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 26, + height: 26, + decoration: containerRadius(color, 200), + child: Icon( + Icons.done, + color: Colors.white, + size: 16, + ), + ), + if (isNeedBorder) + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: mDivider(Colors.grey), + )), + ], + ), + mHeight(8), + Text( + title, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + letterSpacing: -0.44, + ), + ), + mHeight(2), + Container( + padding: EdgeInsets.all(5), + decoration: containerRadius(color.withOpacity(0.2), 4), + child: Text( + status, + style: TextStyle( + fontSize: 8, + fontWeight: FontWeight.w600, + letterSpacing: -0.32, + color: color, + ), + ), + ), + ], + ) + ], + ); + } +} 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 new file mode 100644 index 00000000..72d28f60 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart @@ -0,0 +1,401 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/check_activation_code_for_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_relationship_types_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/send_activation_code_for_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dialogs/select_relation_type_dialog.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class NewEReferralStepOnePage extends StatefulWidget { + final CreateEReferralRequestModel createEReferralRequestModel; + final Function changePageViewIndex; + + const NewEReferralStepOnePage({Key? key, required this.createEReferralRequestModel, required this.changePageViewIndex}) : super(key: key); + + @override + _NewEReferralStepOnePageState createState() => _NewEReferralStepOnePageState(); +} + +class _NewEReferralStepOnePageState extends State { + TextEditingController _nameTextController = TextEditingController(); + TextEditingController _requesterRelationTextController = TextEditingController(); + + GetAllRelationshipTypeResponseModel _selectedRelation = GetAllRelationshipTypeResponseModel(); + String? email; + AuthenticatedUser authenticatedUser = AuthenticatedUser(); + GetAllSharedRecordsByStatusList selectedPatientFamily = GetAllSharedRecordsByStatusList(); + AdvanceModel advanceModel = AdvanceModel(); + late ProjectViewModel projectViewModel; + String mobileNo = ""; + + // todo create a model for Country + // todo use country from the json + dynamic _selectedCountry = {"name": "Saudi Arabia", "name_ar": "المملكة العربية السعودية", "code": "966", "countryCode": "SA", "pattern": "5xxxxxxxx", "maxLength": 9}; + AppSharedPreferences sharedPref = AppSharedPreferences(); + late AuthenticatedUser authUser; + + @override + void initState() { + super.initState(); + } + + void showSMSDialog(EReferralViewModel model) { + SMSOTP( + context, + 1, + _selectedCountry['code'] + mobileNo, + (value) { + submit(model, value); + }, + () => { + Navigator.pop(context), + }, + ).displayDialog(context); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + + return BaseView( + onModelReady: (model) => model.getRelationTypes(), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: false, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Container( + child: Column( + children: [ + Expanded( + child: SingleChildScrollView( + physics: ScrollPhysics(), + child: Container( + margin: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 20, + ), + Text( + TranslationBase.of(context).referralRequesterInformation, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + SizedBox( + height: 12, + ), + inputWidget(TranslationBase.of(context).enterReferralRequesterName, "", _nameTextController, isInputTypeNum: false), + SizedBox( + height: 12, + ), + PhoneNumberSelectorWidget(onNumberChange: (value) { + setState(() { + mobileNo = value; + }); + }, onCountryChange: (value) { + setState(() { + _selectedCountry = value; + }); + }), + SizedBox( + height: 12, + ), + Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: () => confirmSelectRelationTypeDialog(model.relationTypes), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectRelationship, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + Text( + getRelationName(), + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + ], + ), + ), + Icon(Icons.arrow_drop_down), + ], + ), + ), + ), + SizedBox( + height: 12, + ), + if (_selectedRelation != null && _selectedRelation.iD == 5) + inputWidget(TranslationBase.of(context).requesterRelationship, "", _requesterRelationTextController, isInputTypeNum: false), + ], + ), + ), + ), + ), + Container( + margin: EdgeInsets.zero, + decoration: cardRadius(0), + child: Container( + // color: Theme.of(context).scaffoldBackgroundColor, + padding: EdgeInsets.all(12), + width: double.infinity, + child: DefaultButton( + TranslationBase.of(context).next, + (_nameTextController.text.isEmpty || _selectedRelation == null || mobileNo.isEmpty || (_selectedRelation.iD == 5 && _requesterRelationTextController.text.isEmpty)) + ? null + : () async { + Future.delayed(new Duration(milliseconds: 300)).then((value) async { + GifLoaderDialogUtils.showMyDialog(context); + SendActivationCodeForEReferralRequestModel sendActivationCodeForEReferralRequestModel = SendActivationCodeForEReferralRequestModel( + zipCode: _selectedCountry['code'], + patientMobileNumber: int.parse(mobileNo), + ); + await model.sendActivationCodeForEReferral(sendActivationCodeForEReferralRequestModel); + GifLoaderDialogUtils.hideDialog(context); + showSMSDialog(model); + }); + }, + disabledColor: Colors.grey, + ), + ), + ), + ], + ), + ), + ), + ); + } + + void submit(EReferralViewModel model, code) async { + final activationCode = code; + Future.delayed(new Duration(milliseconds: 300)).then((value) async { + GifLoaderDialogUtils.showMyDialog(context); + CheckActivationCodeForEReferralResponseModel checkActivationCodeForEReferralRequestModel = new CheckActivationCodeForEReferralResponseModel(activationCode: activationCode); + await model.checkActivationCodeForEReferral(checkActivationCodeForEReferralRequestModel); + if (model.state == ViewState.ErrorLocal) { + GifLoaderDialogUtils.hideDialog(context); + Future.delayed(Duration(seconds: 1), () { + AppToast.showErrorToast(message: model.error); + showSMSDialog(model); + }); + } else { + GifLoaderDialogUtils.hideDialog(context); + Navigator.of(context).pop(); + widget.changePageViewIndex(1); + widget.createEReferralRequestModel.requesterName = _nameTextController.text; + widget.createEReferralRequestModel.requesterContactNo = _selectedCountry['code'].toString() + mobileNo; + widget.createEReferralRequestModel.otherRelationship = _requesterRelationTextController.text; + widget.createEReferralRequestModel.requesterRelationship = _selectedRelation.iD; + } + }); + } + + void confirmSelectRelationTypeDialog(List relations) { + showDialog( + context: context, + builder: (cxt) => SelectRelationTypeDialog( + relationTypes: relations, + selectedRelation: _selectedRelation, + onValueSelected: (value) { + setState(() { + _selectedRelation = value; + }); + }, + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, + {VoidCallback? suffixTap, bool isEnable = true, bool hasSelection = false, int? lines, bool isInputTypeNum = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: isInputTypeNum ? TextInputType.number : TextInputType.text, + controller: _controller, + maxLines: lines, + onChanged: (value) => {setState(() {})}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + suffixIconConstraints: BoxConstraints(minWidth: 50), + suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + + // void confirmSelectCountryTypeDialog() { + // showDialog( + // context: context, + // child: SelectCountryDialog( + // selectedCountry: _selectedCountry, + // onValueSelected: (value) { + // setState(() { + // _selectedCountry = value; + // }); + // }, + // ), + // ); + // } + + String getRelationName() { + if (_selectedRelation !=null && _selectedRelation.textAr != null) { + if (projectViewModel.isArabic) { + return _selectedRelation.textAr!; + } + return _selectedRelation.textEn!; + } else + return ""; + } + + String getCountryName() { + if (_selectedCountry != null) { + if (projectViewModel.isArabic) { + return _selectedCountry["name_ar"]; + } + return _selectedCountry["name"]; + } else + return "Country"; + } +} + +class MobileNumberTextFiled extends StatelessWidget { + const MobileNumberTextFiled({Key? key, required this.controller, required this.code, required this.onChange}) : super(key: key); + + final TextEditingController controller; + final String code; + final Function onChange; + + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.all(5), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(15), color: Colors.white), + child: Row(textDirection: TextDirection.ltr, children: [ + Expanded( + flex: 1, + child: Icon( + Icons.phone, + color: Colors.red, + )), + Expanded( + flex: 1, + child: Text( + code.toString(), + overflow: TextOverflow.clip, + )), + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.all(5), + child: TextField( + controller: controller, + onChanged: onChange(), + keyboardType: TextInputType.phone, + decoration: InputDecoration(border: InputBorder.none, hintText: '5xxxxxxxx'), + ), + ), + ) + ]), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart new file mode 100644 index 00000000..ec2a54d8 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart @@ -0,0 +1,482 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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:provider/provider.dart'; + +import '../dialogs/select_city_dialog.dart'; + +class NewEReferralStepThreePage extends StatefulWidget { + final CreateEReferralRequestModel createEReferralRequestModel; + final Function changePageViewIndex; + + const NewEReferralStepThreePage({Key? key, required this.createEReferralRequestModel, required this.changePageViewIndex}) : super(key: key); + + @override + _NewEReferralStepThreePageState createState() => _NewEReferralStepThreePageState(); +} + +class _NewEReferralStepThreePageState extends State { + TextEditingController _nameTextController = TextEditingController(); + TextEditingController _mobileTextController = TextEditingController(); + late GetAllCitiesResponseModel _selectedCity; + + late GetAllSharedRecordsByStatusList selectedPatientFamily; + List medicalReportImages = []; + List insuredPatientImages = []; + + List projectsList = []; + + bool isPatientInsured = false; + AppSharedPreferences sharedPref = AppSharedPreferences(); + late AuthenticatedUser authUser; + + final GlobalKey projectDropdownKey = GlobalKey(); + String? projectDropdownValue; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) { + getAllProjects(); + }, + builder: (_, model, widget) => AppScaffold( + isShowAppBar: false, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Container( + margin: EdgeInsets.all(12), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 20, + ), + Text( + TranslationBase.of(context).otherInfo, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + SizedBox( + height: 12, + ), + Container( + padding: EdgeInsets.all(12), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white, + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).medicalReport, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ...List.generate( + medicalReportImages.length, + (index) => Container( + padding: EdgeInsets.only(top: 6, bottom: 6), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + medicalReportImages[index].fileName, + ), + ], + ), + InkWell( + onTap: () { + setState(() { + medicalReportImages.remove(medicalReportImages[index]); + }); + }, + child: Icon( + Icons.close, + color: Colors.red[300], + )) + ], + ), + ), + ), + InkWell( + onTap: () { + ImageOptions.showImageOptions( + context, + (String image, File file) { + setState(() { + EReferralAttachment eReferralAttachment = new EReferralAttachment(fileName: 'image ${medicalReportImages.length + 1}.png', base64String: image); + medicalReportImages.add(eReferralAttachment); + }); + }, + ); + }, + child: Padding( + padding: EdgeInsets.only(top: 12, bottom: 12), + child: Text( + TranslationBase.of(context).selectAttachment, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.56, + decoration: TextDecoration.underline, + color: CustomColors.accentColor, + ), + ), + ), + ), + ], + ), + ), + Icon(Icons.attach_file), + ], + ), + ), + SizedBox( + height: 12, + ), + Container( + padding: EdgeInsets.only(top: 10), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Column( + children: [ + Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + margin: EdgeInsets.only(left: 20, right: 20), + padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).preferredBranch, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + key: projectDropdownKey, + hint: Text(TranslationBase.of(context).selectPreferredBranch), + value: projectDropdownValue, + iconSize: 0, + isExpanded: true, + style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black), + items: projectsList.map((item) { + return new DropdownMenuItem( + value: item.mainProjectID.toString() + "," + item.name.toString(), + child: new Text(item.name!), + ); + }).toList(), + onChanged: (newValue) { + setState(() { + projectDropdownValue = newValue!; + print(projectDropdownValue); + }); + }, + ), + ), + ), + ], + ), + ), + Icon(Icons.keyboard_arrow_down), + ], + )), + ], + ), + ), + SizedBox( + height: 12, + ), + Container( + // decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Row( + children: [ + Checkbox( + value: isPatientInsured, + activeColor: CustomColors.accentColor, + onChanged: (bool? newValue) { + setState(() { + isPatientInsured = newValue!; + }); + }), + Padding( + padding: const EdgeInsets.all(5.0), + child: Text( + TranslationBase.of(context).insuredPatientReferral, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600), + ), + ), + ], + ), + ], + ), + ], + ), + ), + if (isPatientInsured) + SizedBox( + height: 12, + ), + Opacity( + opacity: isPatientInsured ? 1 : 0, + child: Container( + padding: EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white, + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).medicalReport, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ...List.generate( + insuredPatientImages.length, + (index) => Container( + padding: EdgeInsets.only(top: 6, bottom: 6), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + 'image ${index + 1}.png', + ), + ], + ), + InkWell( + onTap: () { + setState(() { + insuredPatientImages.remove(insuredPatientImages[index]); + }); + }, + child: Icon( + Icons.close, + color: Colors.red[300], + ), + ) + ], + ), + ), + ), + InkWell( + onTap: () { + ImageOptions.showImageOptions(context, (String image, File file) { + setState(() { + EReferralAttachment eReferralAttachment = new EReferralAttachment(fileName: 'image ${medicalReportImages.length + 1}.png', base64String: image); + insuredPatientImages = [eReferralAttachment]; + }); + }); + }, + child: Padding( + padding: const EdgeInsets.only(top: 12, bottom: 12), + child: Text( + TranslationBase.of(context).selectAttachment, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.56, + decoration: TextDecoration.underline, + color: CustomColors.accentColor, + ), + ), + ), + ), + ], + ), + ), + Icon(Icons.attach_file), + ], + ), + ), + ), + ], + ), + ), + ), + bottomSheet: Container( + color: Theme.of(context).scaffoldBackgroundColor, + width: double.infinity, + padding: EdgeInsets.all(9), + child: DefaultButton( + TranslationBase.of(context).submit, + medicalReportImages.length == 0 + ? null + : () async { + Future.delayed(new Duration(milliseconds: 300)).then((value) async { + GifLoaderDialogUtils.showMyDialog(context); + this.widget.createEReferralRequestModel.medicalReportAttachment = medicalReportImages; + this.widget.createEReferralRequestModel.insuranceCardAttachment = insuredPatientImages.length != 0 ? insuredPatientImages[0] : null; + this.widget.createEReferralRequestModel.isInsuredPatient = isPatientInsured; + // ToDo make the preferred Branch info dynamic + this.widget.createEReferralRequestModel.preferredBranchCode = projectDropdownValue != null && projectDropdownValue!.isNotEmpty ? int.tryParse(projectDropdownValue!.split(",")[0]) : 0; + this.widget.createEReferralRequestModel.preferredBranchName = projectDropdownValue != null && projectDropdownValue!.isNotEmpty ? projectDropdownValue!.split(",")[1] : ""; + // this.widget.createEReferralRequestModel.otherRelationship = ""; + await model.createEReferral(this.widget.createEReferralRequestModel); + if (model.state == ViewState.ErrorLocal) { + GifLoaderDialogUtils.hideDialog(context); + Utils.showErrorToast(model.error); + } else { + GifLoaderDialogUtils.hideDialog(context); + // AppToast.showSuccessToast(message: TranslationBase.of(context).ereferralSaveSuccess); + showCMCConfirmDialog( + context, + model.referralNumber, + onClick: () { + Navigator.pop(context); + }, + ); + } + }); + }, + disabledColor: Colors.grey, + color: Color(0xff359846), + ), + + // SecondaryButton( + // textColor: Colors.white, + // label: "Submit", + // onTap: () async { + // this + // .widget + // .createEReferralRequestModel + // .medicalReportAttachment = medicalReportImages; + // this + // .widget + // .createEReferralRequestModel + // .insuranceCardAttachment = + // insuredPatientImages.length != 0 + // ? insuredPatientImages[0] + // : null; + // this.widget.createEReferralRequestModel.isInsuredPatient = + // isPatientInsured; + // // ToDo make the preferred Branch info dynamic + // this.widget.createEReferralRequestModel.preferredBranchCode = + // 15; + // this.widget.createEReferralRequestModel.preferredBranchName = + // "Arryan Hospital"; + // this.widget.createEReferralRequestModel.otherRelationship = + // ""; + // + // await model + // .createEReferral(this.widget.createEReferralRequestModel); + // if(model.state == ViewState.ErrorLocal) { + // Utils.showErrorToast(model.error); + // } else{ + // AppToast.showSuccessToast(message: "Referral sent successfully"); + // } + // }, + // loading: model.state == ViewState.BusyLocal, + // disabled: medicalReportImages.length == 0, + // ), + ))); + } + + void getAllProjects() { + int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2; + ClinicListService service = new ClinicListService(); + List projectsListLocal = []; + service.getProjectsList(languageID, context).then((res) { + if (res['MessageStatus'] == 1) { + setState(() { + res['ListProject'].forEach((v) { + projectsListLocal.add(new HospitalsModel.fromJson(v)); + }); + projectsList = projectsListLocal; + }); + // isProjectLoaded = true; + } else { + // isProjectLoaded = false; + } + }).catchError((err) { + print(err); + }); + } + + void confirmSelectCityDialog(List cities) { + showDialog( + context: context, + builder: (cxt) => SelectCityDialog( + cities: cities, + selectedCity: _selectedCity, + onValueSelected: (value) { + setState(() { + _selectedCity = value; + }); + }, + ), + ); + } + + String getRelationName() { + if (_selectedCity != null) + return _selectedCity.description!; + else + return "Select Relationship" /*TranslationBase.of(context).selectHospital*/; + } +} diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_two_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_two_page.dart new file mode 100644 index 00000000..daf11a8f --- /dev/null +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_two_page.dart @@ -0,0 +1,352 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dialogs/select_country_ingo_Dialog.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import '../dialogs/select_city_dialog.dart'; + +class NewEReferralStepTowPage extends StatefulWidget { + final CreateEReferralRequestModel createEReferralRequestModel; + final Function changePageViewIndex; + + const NewEReferralStepTowPage({Key? key, required this.createEReferralRequestModel, required this.changePageViewIndex}) : super(key: key); + + @override + _NewEReferralStepTowPageState createState() => _NewEReferralStepTowPageState(); +} + +class _NewEReferralStepTowPageState extends State { + TextEditingController _patientNameTextController = TextEditingController(); + TextEditingController _patientIdentificationTextController = TextEditingController(); + String mobileNo = ""; + GetAllCitiesResponseModel _selectedCity =GetAllCitiesResponseModel(); + + late GetAllSharedRecordsByStatusList selectedPatientFamily; + + // todo create a model for Country + // todo use country from the json + dynamic _selectedCountry = {"name": "Saudi Arabia", "name_ar": "المملكة العربية السعودية", "code": "966", "countryCode": "SA", "pattern": "5xxxxxxxx", "maxLength": 9}; + AppSharedPreferences sharedPref = AppSharedPreferences(); + late AuthenticatedUser authUser; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getAllCities(), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: false, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + physics: ScrollPhysics(), + child: Container( + margin: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 20, + ), + Text( + TranslationBase.of(context).patientInfo, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + SizedBox( + height: 12, + ), + inputWidget(TranslationBase.of(context).enterIdentificationNumber, "", _patientIdentificationTextController, isInputTypeNum: true), + SizedBox( + height: 12, + ), + inputWidget(TranslationBase.of(context).patientName, "", _patientNameTextController, isInputTypeNum: false), + SizedBox( + height: 12, + ), + PhoneNumberSelectorWidget(onNumberChange: (value) { + setState(() { + mobileNo = value; + }); + }, onCountryChange: (value) { + setState(() { + _selectedCountry = value; + }); + }), + SizedBox( + height: 12, + ), + Text( + TranslationBase.of(context).patientLocated, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + SizedBox( + height: 12, + ), + Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: () => confirmSelectCityDialog(model.allCities), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectCity, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + Text( + getRelationName(), + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + ], + ), + ), + Icon(Icons.arrow_drop_down), + ], + ), + ), + ), + SizedBox( + height: 12, + ), + ], + ), + ), + ), + ), + Container( + margin: EdgeInsets.zero, + decoration: cardRadius(0), + child: Container( + width: double.infinity, + padding: EdgeInsets.all(12), + child: DefaultButton( + TranslationBase.of(context).next, + (_patientNameTextController.text.isEmpty || _patientIdentificationTextController.text.isEmpty || _selectedCity == null || mobileNo.isEmpty) + ? null + : () { + this.widget.changePageViewIndex(2); + this.widget.createEReferralRequestModel.identificationNo = int.parse(_patientIdentificationTextController.text); + this.widget.createEReferralRequestModel.fullName = _patientNameTextController.text; + this.widget.createEReferralRequestModel.patientMobileNumber = _selectedCountry['code'].toString() + mobileNo; + this.widget.createEReferralRequestModel.cityCode = _selectedCity.iD.toString(); + this.widget.createEReferralRequestModel.cityName = _selectedCity.description; + }, + disabledColor: Colors.grey, + ), + ), + ) + ], + ), + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, + {VoidCallback? suffixTap, bool isEnable = true, bool hasSelection = false, int? lines, bool isInputTypeNum = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: isInputTypeNum ? TextInputType.number : TextInputType.text, + controller: _controller, + maxLines: lines, + onChanged: (value) => {setState(() {})}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + suffixIconConstraints: BoxConstraints(minWidth: 50), + suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + + void confirmSelectCityDialog(List cities) { + showDialog( + context: context, + builder: (cxt) => SelectCityDialog( + cities: cities, + selectedCity: _selectedCity, + onValueSelected: (value) { + setState(() { + _selectedCity = value; + }); + }, + ), + ); + } + + void confirmSelectCountryTypeDialog() { + showDialog( + context: context, + builder: (cxt) => SelectCountryDialog( + selectedCountry: _selectedCountry, + onValueSelected: (value) { + setState(() { + _selectedCountry = value; + }); + }, + ), + ); + } + + String getRelationName() { + if (_selectedCity?.description != null) + return _selectedCity.description!; + else + return TranslationBase.of(context).selectCity /*TranslationBase.of(context).selectHospital*/; + } + + String getCountryName() { + if (_selectedCountry != null) + return _selectedCountry["name"]; + else + return "Country"; + } +} + +class MobileNumberTextFiled extends StatelessWidget { + const MobileNumberTextFiled({Key? key, required this.controller, required this.code}) : super(key: key); + + final TextEditingController controller; + final String code; + + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.all(5), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(15), color: Colors.white), + child: Row(children: [ + Expanded( + flex: 1, + child: Icon( + Icons.phone, + color: Colors.red, + )), + Expanded( + flex: 1, + child: Text( + code.toString(), + overflow: TextOverflow.clip, + )), + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.all(5), + child: TextField( + controller: controller, + keyboardType: TextInputType.phone, + decoration: InputDecoration(border: InputBorder.none, hintText: TranslationBase.of(context).mobileNumber), + ), + ), + ) + ]), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/E-Referral/dialogs/select_city_dialog.dart b/lib/pages/AlHabibMedicalService/E-Referral/dialogs/select_city_dialog.dart new file mode 100644 index 00000000..e07f01bf --- /dev/null +++ b/lib/pages/AlHabibMedicalService/E-Referral/dialogs/select_city_dialog.dart @@ -0,0 +1,133 @@ +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// ignore: must_be_immutable +class SelectCityDialog extends StatefulWidget { + final List cities; + final Function(GetAllCitiesResponseModel) onValueSelected; + GetAllCitiesResponseModel selectedCity; + + SelectCityDialog({Key? key, required this.cities, required this.onValueSelected, required this.selectedCity}); + + @override + _SelectCityDialogState createState() => _SelectCityDialogState(); +} + +class _SelectCityDialogState extends State { + @override + void initState() { + super.initState(); + widget.selectedCity = widget.selectedCity ?? widget.cities[0]; + } + + @override + Widget build(BuildContext context) { + return Dialog( + child: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Column( + children: [ + ...List.generate( + widget.cities.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.selectedCity = widget.cities[index]; + }); + }, + child: ListTile( + title: Text(widget.cities[index].description!), + leading: Radio( + value: widget.cities[index], + groupValue: widget.selectedCity, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + widget.selectedCity = value!; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + ], + ), + ), + ], + ), + ), + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(widget.selectedCity); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + )), + ), + ), + ), + ], + ) + ], + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/E-Referral/dialogs/select_country_ingo_Dialog.dart b/lib/pages/AlHabibMedicalService/E-Referral/dialogs/select_country_ingo_Dialog.dart new file mode 100644 index 00000000..e1db9d5c --- /dev/null +++ b/lib/pages/AlHabibMedicalService/E-Referral/dialogs/select_country_ingo_Dialog.dart @@ -0,0 +1,1596 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// ignore: must_be_immutable + +// todo 'sikander' remove this file when usage known +class SelectCountryDialog extends StatefulWidget { + final Function(dynamic) onValueSelected; + dynamic selectedCountry; + + SelectCountryDialog( + {Key? key, /*this.relationTypes,*/ required this.onValueSelected, this.selectedCountry}); + + @override + _SelectCountryDialogState createState() => _SelectCountryDialogState(); +} + +class _SelectCountryDialogState extends State { + + // todo create a model for Country + List countryList = + [ + { + "name": "Saudi Arabia", + "name_ar":"المملكة العربية السعودية", + "code": "+966", + "countryCode": "SA", + "pattern": "5xxxxxxxx", + "maxLength": 9 + }, + { + "name": "United Arab Emirates", + "name_ar":"الإمارات العربية المتحدة", + "code": "+971", + "countryCode": "AE", + "pattern": "5xxxxxxxx", + "maxLength": 9 + }, + { + "name": "Bahrain", + "name_ar":"البحرين", + "code": "+973", + "countryCode": "BH", + "maxLength": 8 + }, + { + "name": "Kuwait", + "name_ar":"الكويت", + "code": "+965", + "countryCode": "KW" + }, + { + "name": "Afghanistan", + "name_ar":"أفغانستان", + "code": "+93", + "countryCode": "AF" + }, + { + "name": "Aland Islands", + "name_ar":"جزر آلاند", + "code": "+358", + "countryCode": "AX" + }, + { + "name": "Albania", + "name_ar":"ألبانيا", + "code": "+355", + "countryCode": "AL" + }, + { + "name": "Algeria", + "name_ar":"الجزائر", + "code": "+213", + "countryCode": "DZ" + }, + { + "name": "AmericanSamoa", + "name_ar":"ساموا الأمريكية", + "code": "+1 684", + "countryCode": "AS" + }, + { + "name": "Andorra", + "name_ar":"أندورا", + "code": "+376", + "countryCode": "AD" + }, + { + "name": "Angola", + "name_ar":"أنغولا", + "code": "+244", + "countryCode": "AO" + }, + { + "name": "Anguilla", + "name_ar":"أنغيلا", + "code": "+1 264", + "countryCode": "AI" + }, + { + "name": "Antarctica", + "name_ar":"القارة القطبية الجنوبية", + "code": "+672", + "countryCode": "AQ" + }, + { + "name": "Antigua and Barbuda", + "name_ar":"أنتيغوا وبربودا", + "code": "+1268", + "countryCode": "AG" + }, + { + "name": "Argentina", + "name_ar":"الأرجنتين", + "code": "+54", + "countryCode": "AR" + }, + { + "name": "Armenia", + "name_ar":"أرمينيا", + "code": "+374", + "countryCode": "AM" + }, + { + "name": "Aruba", + "name_ar":"أروبا", + "code": "+297", + "countryCode": "AW" + }, + { + "name": "Australia", + "name_ar":"أستراليا", + "code": "+61", + "countryCode": "AU" + }, + { + "name": "Austria", + "name_ar":"النمسا", + "code": "+43", + "countryCode": "AT" + }, + { + "name": "Azerbaijan", + "name_ar":"أذربيجان", + "code": "+994", + "countryCode": "AZ" + }, + { + "name": "Bahamas", + "name_ar":"الباهاما", + "code": "+1 242", + "countryCode": "BS" + }, + { + "name": "Bangladesh", + "name_ar":"بنغلاديش", + "code": "+880", + "countryCode": "BD" + }, + { + "name": "Barbados", + "name_ar":"بربادوس", + "code": "+1 246", + "countryCode": "BB" + }, + { + "name": "Belarus", + "name_ar":"روسيا البيضاء", + "code": "+375", + "countryCode": "BY" + }, + { + "name": "Belgium", + "name_ar":"بلجيكا", + "code": "+32", + "countryCode": "BE" + }, + { + "name": "Belize", + "name_ar":"بليز", + "code": "+501", + "countryCode": "BZ" + }, + { + "name": "Benin", + "name_ar":"بنين", + "code": "+229", + "countryCode": "BJ" + }, + { + "name": "Bermuda", + "name_ar":"برمودا", + "code": "+1 441", + "countryCode": "BM" + }, + { + "name": "Bhutan", + "name_ar":"بوتان", + "code": "+975", + "countryCode": "BT" + }, + { + "name": "Bolivia, Plurinational State of", + "name_ar":"دولة بوليفيا المتعددة القوميات", + "code": "+591", + "countryCode": "BO" + }, + { + "name": "Bosnia and Herzegovina", + "name_ar":"البوسنة والهرسك", + "code": "+387", + "countryCode": "BA" + }, + { + "name": "Botswana", + "name_ar":"بوتسوانا", + "code": "+267", + "countryCode": "BW" + }, + { + "name": "Brazil", + "name_ar":"البرازيل", + "code": "+55", + "countryCode": "BR" + }, + { + "name": "British Indian Ocean Territory", + "name_ar":"إقليم المحيط البريطاني الهندي", + "code": "+246", + "countryCode": "IO" + }, + { + "name": "Brunei Darussalam", + "name_ar":"بروناي دار السلام", + "code": "+673", + "countryCode": "BN" + }, + { + "name": "Bulgaria", + "name_ar":"بلغاريا", + "code": "+359", + "countryCode": "BG" + }, + { + "name": "Burkina Faso", + "name_ar":"بوركينا فاسو", + "code": "+226", + "countryCode": "BF" + }, + { + "name": "Burundi", + "name_ar":"بوروندي", + "code": "+257", + "countryCode": "BI" + }, + { + "name": "Cambodia", + "name_ar":"كمبوديا", + "code": "+855", + "countryCode": "KH" + }, + { + "name": "Cameroon", + "name_ar":"الكاميرون", + "code": "+237", + "countryCode": "CM" + }, + { + "name": "Canada", + "name_ar":"كندا", + "code": "+1", + "countryCode": "CA" + }, + { + "name": "Cape Verde", + "name_ar":"الرأس الأخضر", + "code": "+238", + "countryCode": "CV" + }, + { + "name": "Cayman Islands", + "name_ar":"جزر كايمان", + "code": "+345", + "countryCode": "KY" + }, + { + "name": "Central African Republic", + "name_ar":"جمهورية افريقيا الوسطى", + "code": "+236", + "countryCode": "CF" + }, + { + "name": "Chad", + "name_ar":"تشاد", + "code": "+235", + "countryCode": "TD" + }, + { + "name": "Chile", + "name_ar":"تشيلي", + "code": "+56", + "countryCode": "CL" + }, + { + "name": "China", + "name_ar":"الصين", + "code": "+86", + "countryCode": "CN" + }, + { + "name": "Christmas Island", + "name_ar":"جزيرة الكريسماس", + "code": "+61", + "countryCode": "CX" + }, + { + "name": "Cocos (Keeling) Islands", + "name_ar":"جزر كوكوس كيلينغ", + "code": "+61", + "countryCode": "CC" + }, + { + "name": "Colombia", + "name_ar":"كولومبيا", + "code": "+57", + "countryCode": "CO" + }, + { + "name": "Comoros", + "name_ar":"جزر القمر", + "code": "+269", + "countryCode": "KM" + }, + { + "name": "Congo", + "name_ar":"الكونغو", + "code": "+242", + "countryCode": "CG" + }, + { + "name": "Congo, The Democratic Republic of the Congo", + "name_ar":"الكونغو ، جمهورية الكونغو الديمقراطية", + "code": "+243", + "countryCode": "CD" + }, + { + "name": "Cook Islands", + "name_ar":"جزر كوك", + "code": "+682", + "countryCode": "CK" + }, + { + "name": "Costa Rica", + "name_ar":"كوستا ريكا", + "code": "+506", + "countryCode": "CR" + }, + { + "name": "Cote d'Ivoire", + "name_ar":"ساحل العاج", + "code": "+225", + "countryCode": "CI" + }, + { + "name": "Croatia", + "name_ar":"كرواتيا", + "code": "+385", + "countryCode": "HR" + }, + { + "name": "Cuba", + "name_ar":"كوبا", + "code": "+53", + "countryCode": "CU" + }, + { + "name": "Cyprus", + "name_ar":"قبرص", + "code": "+357", + "countryCode": "CY" + }, + { + "name": "Czech Republic", + "name_ar":"جمهورية التشيك", + "code": "+420", + "countryCode": "CZ" + }, + { + "name": "Denmark", + "name_ar":"الدنمارك", + "code": "+45", + "countryCode": "DK" + }, + { + "name": "Djibouti", + "name_ar":"جيبوتي", + "code": "+253", + "countryCode": "DJ" + }, + { + "name": "Dominica", + "name_ar":"دومينيكا", + "code": "+1 767", + "countryCode": "DM" + }, + { + "name": "Dominican Republic", + "name_ar":"جمهورية الدومنيكان", + "code": "+1 849", + "countryCode": "DO" + }, + { + "name": "Ecuador", + "name_ar":"الإكوادور", + "code": "+593", + "countryCode": "EC" + }, + { + "name": "Egypt", + "name_ar":"مصر", + "code": "+20", + "countryCode": "EG" + }, + { + "name": "El Salvador", + "name_ar":"السلفادور", + "code": "+503", + "countryCode": "SV" + }, + { + "name": "Equatorial Guinea", + "name_ar":"غينيا الإستوائية", + "code": "+240", + "countryCode": "GQ" + }, + { + "name": "Eritrea", + "name_ar":"إريتريا", + "code": "+291", + "countryCode": "ER" + }, + { + "name": "Estonia", + "name_ar":"استونيا", + "code": "+372", + "countryCode": "EE" + }, + { + "name": "Ethiopia", + "name_ar":"أثيوبيا", + "code": "+251", + "countryCode": "ET" + }, + { + "name": "Falkland Islands (Malvinas)", + "name_ar":"جزر فوكلاند مالفيناس", + "code": "+500", + "countryCode": "FK" + }, + { + "name": "Faroe Islands", + "name_ar":"جزر صناعية", + "code": "+298", + "countryCode": "FO" + }, + { + "name": "Fiji", + "name_ar":"فيجي", + "code": "+679", + "countryCode": "FJ" + }, + { + "name": "Finland", + "name_ar":"فنلندا", + "code": "+358", + "countryCode": "FI" + }, + { + "name": "France", + "name_ar":"فرنسا", + "code": "+33", + "countryCode": "FR" + }, + { + "name": "French Guiana", + "name_ar":"غيانا الفرنسية", + "code": "+594", + "countryCode": "GF" + }, + { + "name": "French Polynesia", + "name_ar":"بولينيزيا الفرنسية", + "code": "+689", + "countryCode": "PF" + }, + { + "name": "Gabon", + "name_ar":"الغابون", + "code": "+241", + "countryCode": "GA" + }, + { + "name": "Gambia", + "name_ar":"غامبيا", + "code": "+220", + "countryCode": "GM" + }, + { + "name": "Georgia", + "name_ar":"جورجيا", + "code": "+995", + "countryCode": "GE" + }, + { + "name": "Germany", + "name_ar":"ألمانيا", + "code": "+49", + "countryCode": "DE" + }, + { + "name": "Ghana", + "name_ar":"غانا", + "code": "+233", + "countryCode": "GH" + }, + { + "name": "Gibraltar", + "name_ar":"جبل طارق", + "code": "+350", + "countryCode": "GI" + }, + { + "name": "Greece", + "name_ar":"اليونان", + "code": "+30", + "countryCode": "GR" + }, + { + "name": "Greenland", + "name_ar":"الأرض الخضراء", + "code": "+299", + "countryCode": "GL" + }, + { + "name": "Grenada", + "name_ar":"غرينادا", + "code": "+1 473", + "countryCode": "GD" + }, + { + "name": "Guadeloupe", + "name_ar":"جوادلوب", + "code": "+590", + "countryCode": "GP" + }, + { + "name": "Guam", + "name_ar":"غوام", + "code": "+1 671", + "countryCode": "GU" + }, + { + "name": "Guatemala", + "name_ar":"غواتيمالا", + "code": "+502", + "countryCode": "GT" + }, + { + "name": "Guernsey", + "name_ar":"غيرنسي", + "code": "+44", + "countryCode": "GG" + }, + { + "name": "Guinea", + "name_ar":"غينيا", + "code": "+224", + "countryCode": "GN" + }, + { + "name": "Guinea-Bissau", + "name_ar":"غينيا بيساو", + "code": "+245", + "countryCode": "GW" + }, + { + "name": "Guyana", + "name_ar":"غيانا", + "code": "+595", + "countryCode": "GY" + }, + { + "name": "Haiti", + "name_ar":"هايتي", + "code": "+509", + "countryCode": "HT" + }, + { + "name": "Holy See (Vatican City State)", + "name_ar":"الكرسي الرسولي دولة الفاتيكان", + "code": "+379", + "countryCode": "VA" + }, + { + "name": "Honduras", + "name_ar":"هندوراس", + "code": "+504", + "countryCode": "HN" + }, + { + "name": "Hong Kong", + "name_ar":"هونج كونج", + "code": "+852", + "countryCode": "HK" + }, + { + "name": "Hungary", + "name_ar":"اليونان", + "code": "+36", + "countryCode": "HU" + }, + { + "name": "Iceland", + "name_ar":"أيسلندا", + "code": "+354", + "countryCode": "IS" + }, + { + "name": "India", + "name_ar":"الهند", + "code": "+91", + "countryCode": "IN" + }, + { + "name": "Indonesia", + "name_ar":"أندونيسيا", + "code": "+62", + "countryCode": "ID" + }, + { + "name": "Iran, Islamic Republic of Persian Gulf", + "name_ar":"جمهورية إيران الإسلامية الخليج الفارسي", + "code": "+98", + "countryCode": "IR" + }, + { + "name": "Iraq", + "name_ar":"العراق", + "code": "+964", + "countryCode": "IQ" + }, + { + "name": "Ireland", + "name_ar":"أيرلندا", + "code": "+353", + "countryCode": "IE" + }, + { + "name": "Isle of Man", + "name_ar":"جزيرة آيل أوف مان", + "code": "+44", + "countryCode": "IM" + }, + { + "name": "Israel", + "name_ar":"إسرائيل", + "code": "+972", + "countryCode": "IL" + }, + { + "name": "Italy", + "name_ar":"إيطاليا", + "code": "+39", + "countryCode": "IT" + }, + { + "name": "Jamaica", + "name_ar":"جامايكا", + "code": "+1 876", + "countryCode": "JM" + }, + { + "name": "Japan", + "name_ar":"اليابان", + "code": "+81", + "countryCode": "JP" + }, + { + "name": "Jersey", + "name_ar":"جيرسي", + "code": "+44", + "countryCode": "JE" + }, + { + "name": "Jordan", + "name_ar":"الأردن", + "code": "+962", + "countryCode": "JO" + }, + { + "name": "Kazakhstan", + "name_ar":"كازاخستان", + "code": "+77", + "countryCode": "KZ" + }, + { + "name": "Kenya", + "name_ar":"كينيا", + "code": "+254", + "countryCode": "KE" + }, + { + "name": "Kiribati", + "name_ar":"كيريباس", + "code": "+686", + "countryCode": "KI" + }, + { + "name": "Korea, Democratic People's Republic of Korea", + "name_ar":"جمهورية كوريا الديمقراطية الشعبية", + "code": "+850", + "countryCode": "KP" + }, + { + "name": "Korea, Republic of South Korea", + "name_ar":"جمهورية كوريا الديمقراطية الشعبية", + "code": "+82", + "countryCode": "KR" + }, + { + "name": "Kyrgyzstan", + "name_ar":"قرغيزستان", + "code": "+996", + "countryCode": "KG" + }, + { + "name": "Laos", + "name_ar":"لاوس", + "code": "+856", + "countryCode": "LA" + }, + { + "name": "Latvia", + "name_ar":"لاتفيا", + "code": "+371", + "countryCode": "LV" + }, + { + "name": "Lebanon", + "name_ar":"لبنان", + "code": "+961", + "countryCode": "LB" + }, + { + "name": "Lesotho", + "name_ar":"ليسوتو", + "code": "+266", + "countryCode": "LS" + }, + { + "name": "Liberia", + "name_ar":"ليبيريا", + "code": "+231", + "countryCode": "LR" + }, + { + "name": "Libyan Arab Jamahiriya", + "name_ar":"الجماهيرية العربية الليبية", + "code": "+218", + "countryCode": "LY" + }, + { + "name": "Liechtenstein", + "name_ar":"ليختنشتاين", + "code": "+423", + "countryCode": "LI" + }, + { + "name": "Lithuania", + "name_ar":"ليتوانيا", + "code": "+370", + "countryCode": "LT" + }, + { + "name": "Luxembourg", + "name_ar":"لوكسمبورغ", + "code": "+352", + "countryCode": "LU" + }, + { + "name": "Macao", + "name_ar":"ماكاو", + "code": "+853", + "countryCode": "MO" + }, + { + "name": "Macedonia", + "name_ar":"مقدونيا", + "code": "+389", + "countryCode": "MK" + }, + { + "name": "Madagascar", + "name_ar":"مدغشقر", + "code": "+261", + "countryCode": "MG" + }, + { + "name": "Malawi", + "name_ar":"مالاوي", + "code": "+265", + "countryCode": "MW" + }, + { + "name": "Malaysia", + "name_ar":"ماليزيا", + "code": "+60", + "countryCode": "MY" + }, + { + "name": "Maldives", + "name_ar":"جزر المالديف", + "code": "+960", + "countryCode": "MV" + }, + { + "name": "Mali", + "name_ar":"مالي", + "code": "+223", + "countryCode": "ML" + }, + { + "name": "Malta", + "name_ar":"مالطا", + "code": "+356", + "countryCode": "MT" + }, + { + "name": "Marshall Islands", + "name_ar":"جزر مارشال", + "code": "+692", + "countryCode": "MH" + }, + { + "name": "Martinique", + "name_ar":"مارتينيك", + "code": "+596", + "countryCode": "MQ" + }, + { + "name": "Mauritania", + "name_ar":"موريتانيا", + "code": "+222", + "countryCode": "MR" + }, + { + "name": "Mauritius", + "name_ar":"موريشيوس", + "code": "+230", + "countryCode": "MU" + }, + { + "name": "Mayotte", + "name_ar":"مايوت", + "code": "+262", + "countryCode": "YT" + }, + { + "name": "Mexico", + "name_ar":"المكسيك", + "code": "+52", + "countryCode": "MX" + }, + { + "name": "Micronesia, Federated States of Micronesia", + "name_ar":"ميكرونيزيا ، ولايات ميكرونيزيا الموحدة", + "code": "+691", + "countryCode": "FM" + }, + { + "name": "Moldova", + "name_ar":"مولدوفا", + "code": "+373", + "countryCode": "MD" + }, + { + "name": "Monaco", + "name_ar":"موناكو", + "code": "+377", + "countryCode": "MC" + }, + { + "name": "Mongolia", + "name_ar":"منغوليا", + "code": "+976", + "countryCode": "MN" + }, + { + "name": "Montenegro", + "name_ar":"الجبل الأسود", + "code": "+382", + "countryCode": "ME" + }, + { + "name": "Montserrat", + "name_ar":"مونتسيرات", + "code": "+1664", + "countryCode": "MS" + }, + { + "name": "Morocco", + "name_ar":"المغرب", + "code": "+212", + "countryCode": "MA" + }, + { + "name": "Mozambique", + "name_ar":"موزمبيق", + "code": "+258", + "countryCode": "MZ" + }, + { + "name": "Myanmar", + "name_ar":"ميانمار", + "code": "+95", + "countryCode": "MM" + }, + { + "name": "Namibia", + "name_ar":"ناميبيا", + "code": "+264", + "countryCode": "NA" + }, + { + "name": "Nauru", + "name_ar":"ناورو", + "code": "+674", + "countryCode": "NR" + }, + { + "name": "Nepal", + "name_ar":"نيبال", + "code": "+977", + "countryCode": "NP" + }, + { + "name": "Netherlands", + "name_ar":"هولندا", + "code": "+31", + "countryCode": "NL" + }, + { + "name": "Netherlands Antilles", + "name_ar":"جزر الأنتيل الهولندية", + "code": "+599", + "countryCode": "AN" + }, + { + "name": "New Caledonia", + "name_ar":"كاليدونيا الجديدة", + "code": "+687", + "countryCode": "NC" + }, + { + "name": "New Zealand", + "name_ar":"نيوزيلندا", + "code": "+64", + "countryCode": "NZ" + }, + { + "name": "Nicaragua", + "name_ar":"نيكاراغوا", + "code": "+505", + "countryCode": "NI" + }, + { + "name": "Niger", + "name_ar":"النيجر", + "code": "+227", + "countryCode": "NE" + }, + { + "name": "Nigeria", + "name_ar":"نيجيريا", + "code": "+234", + "countryCode": "NG" + }, + { + "name": "Niue", + "name_ar":"نيوي", + "code": "+683", + "countryCode": "NU" + }, + { + "name": "Norfolk Island", + "name_ar":"جزيرة نورفولك", + "code": "+672", + "countryCode": "NF" + }, + { + "name": "Northern Mariana Islands", + "name_ar":"جزر مريانا الشمالية", + "code": "+1 670", + "countryCode": "MP" + }, + { + "name": "Norway", + "name_ar":"النرويج", + "code": "+47", + "countryCode": "NO" + }, + { + "name": "Oman", + "name_ar":"سلطنة عمان", + "code": "+968", + "countryCode": "OM" + }, + { + "name": "Pakistan", + "name_ar":"باكستان", + "code": "+92", + "countryCode": "PK" + }, + { + "name": "Palau", + "name_ar":"بالاو", + "code": "+680", + "countryCode": "PW" + }, + { + "name": "Palestinian Territory, Occupied", + "name_ar":"الأراضي الفلسطينية المحتلة", + "code": "+970", + "countryCode": "PS" + }, + { + "name": "Panama", + "name_ar":"بناما", + "code": "+507", + "countryCode": "PA" + }, + { + "name": "Papua New Guinea", + "name_ar":"بابوا غينيا الجديدة", + "code": "+675", + "countryCode": "PG" + }, + { + "name": "Paraguay", + "name_ar":"باراغواي", + "code": "+595", + "countryCode": "PY" + }, + { + "name": "Peru", + "name_ar":"بيرو", + "code": "+51", + "countryCode": "PE" + }, + { + "name": "Philippines", + "name_ar":"الفلبين", + "code": "+63", + "countryCode": "PH" + }, + { + "name": "Pitcairn", + "name_ar":"بيتكيرن", + "code": "+872", + "countryCode": "PN" + }, + { + "name": "Poland", + "name_ar":"بولندا", + "code": "+48", + "countryCode": "PL" + }, + { + "name": "Portugal", + "name_ar":"البرتغال", + "code": "+351", + "countryCode": "PT" + }, + { + "name": "Puerto Rico", + "name_ar":"بورتوريكو", + "code": "+1 939", + "countryCode": "PR" + }, + { + "name": "Qatar", + "name_ar":"دولة قطر", + "code": "+974", + "countryCode": "QA" + }, + { + "name": "Romania", + "name_ar":"رومانيا", + "code": "+40", + "countryCode": "RO" + }, + { + "name": "Russia", + "name_ar":"روسيا", + "code": "+7", + "countryCode": "RU" + }, + { + "name": "Rwanda", + "name_ar":"رواندا", + "code": "+250", + "countryCode": "RW" + }, + { + "name": "Reunion", + "name_ar":"جمع شمل", + "code": "+262", + "countryCode": "RE" + }, + { + "name": "Saint Barthelemy", + "name_ar":"سانت بارتيليمي", + "code": "+590", + "countryCode": "BL" + }, + { + "name": "Saint Helena, Ascension and Tristan Da Cunha", + "name_ar":"سانت هيلانة ، أسنشن وتريستان دا كونها", + "code": "+290", + "countryCode": "SH" + }, + { + "name": "Saint Kitts and Nevis", + "name_ar":"سانت كيتس ونيفيس", + "code": "+1 869", + "countryCode": "KN" + }, + { + "name": "Saint Lucia", + "name_ar":"القديسة لوسيا", + "code": "+1 758", + "countryCode": "LC" + }, + { + "name": "Saint Martin", + "name_ar":"القديس مارتن", + "code": "+590", + "countryCode": "MF" + }, + { + "name": "Saint Pierre and Miquelon", + "name_ar":"سانت بيير وميكلون", + "code": "+508", + "countryCode": "PM" + }, + { + "name": "Saint Vincent and the Grenadines", + "name_ar":"سانت فنسنت وجزر غرينادين", + "code": "+1 784", + "countryCode": "VC" + }, + { + "name": "Samoa", + "name_ar":"ساموا", + "code": "+685", + "countryCode": "WS" + }, + { + "name": "San Marino", + "name_ar":"سان مارينو", + "code": "+378", + "countryCode": "SM" + }, + { + "name": "Sao Tome and Principe", + "name_ar":"ساو تومي وبرينسيبي", + "code": "+239", + "countryCode": "ST" + }, + { + "name": "Senegal", + "name_ar":"السنغال", + "code": "+221", + "countryCode": "SN" + }, + { + "name": "Serbia", + "name_ar":"صربيا", + "code": "+381", + "countryCode": "RS" + }, + { + "name": "Seychelles", + "name_ar":"سيشيل", + "code": "+248", + "countryCode": "SC" + }, + { + "name": "Sierra Leone", + "name_ar":"سيرا ليون", + "code": "+232", + "countryCode": "SL" + }, + { + "name": "Singapore", + "name_ar":"سنغافورة", + "code": "+65", + "countryCode": "SG" + }, + { + "name": "Slovakia", + "name_ar":"سلوفاكيا", + "code": "+421", + "countryCode": "SK" + }, + { + "name": "Slovenia", + "name_ar":"سلوفينيا", + "code": "+386", + "countryCode": "SI" + }, + { + "name": "Solomon Islands", + "name_ar":"جزر سليمان", + "code": "+677", + "countryCode": "SB" + }, + { + "name": "Somalia", + "name_ar":"الصومال", + "code": "+252", + "countryCode": "SO" + }, + { + "name": "South Africa", + "name_ar":"جنوب أفريقيا", + "code": "+27", + "countryCode": "ZA" + }, + { + "name": "South Georgia and the South Sandwich Islands", + "name_ar":"جورجيا الجنوبية وجزر ساندويتش الجنوبية", + "code": "+500", + "countryCode": "GS" + }, + { + "name": "Spain", + "name_ar":"إسبانيا", + "code": "+34", + "countryCode": "ES" + }, + { + "name": "Sri Lanka", + "name_ar":"سيريلانكا", + "code": "+94", + "countryCode": "LK" + }, + { + "name": "Sudan", + "name_ar":"سودان", + "code": "+249", + "countryCode": "SD" + }, + { + "name": "Suriname", + "name_ar":"سورينام", + "code": "+597", + "countryCode": "SR" + }, + { + "name": "Svalbard and Jan Mayen", + "name_ar":"سفالبارد وجان ماين", + "code": "+47", + "countryCode": "SJ" + }, + { + "name": "Swaziland", + "name_ar":"سوازيلاند", + "code": "+268", + "countryCode": "SZ" + }, + { + "name": "Sweden", + "name_ar":"السويد", + "code": "+46", + "countryCode": "SE" + }, + { + "name": "Switzerland", + "name_ar":"سويسرا", + "code": "+41", + "countryCode": "CH" + }, + { + "name": "Syrian Arab Republic", + "name_ar":"الجمهورية العربية السورية", + "code": "+963", + "countryCode": "SY" + }, + { + "name": "Taiwan", + "name_ar":"تايوان", + "code": "+886", + "countryCode": "TW" + }, + { + "name": "Tajikistan", + "name_ar":"طاجيكستان", + "code": "+992", + "countryCode": "TJ" + }, + { + "name": "Tanzania, United Republic of Tanzania", + "name_ar":"تنزانيا ، جمهورية تنزانيا المتحدة", + "code": "+255", + "countryCode": "TZ" + }, + { + "name": "Thailand", + "name_ar":"تايلاند", + "code": "+66", + "countryCode": "TH" + }, + { + "name": "Timor-Leste", + "name_ar":"تيمور الشرقية", + "code": "+670", + "countryCode": "TL" + }, + { + "name": "Togo", + "name_ar":"ليذهب", + "code": "+228", + "countryCode": "TG" + }, + { + "name": "Tokelau", + "name_ar":"توكيلاو", + "code": "+690", + "countryCode": "TK" + }, + { + "name": "Tonga", + "name_ar":"تونغا", + "code": "+676", + "countryCode": "TO" + }, + { + "name": "Trinidad and Tobago", + "name_ar":"ترينداد وتوباغو", + "code": "+1 868", + "countryCode": "TT" + }, + { + "name": "Tunisia", + "name_ar":"تونس", + "code": "+216", + "countryCode": "TN" + }, + { + "name": "Turkey", + "name_ar":"ديك رومي", + "code": "+90", + "countryCode": "TR" + }, + { + "name": "Turkmenistan", + "name_ar":"تركمانستان", + "code": "+993", + "countryCode": "TM" + }, + { + "name": "Turks and Caicos Islands", + "name_ar":"جزر تركس وكايكوس", + "code": "+1 649", + "countryCode": "TC" + }, + { + "name": "Tuvalu", + "name_ar":"توفالو", + "code": "+688", + "countryCode": "TV" + }, + { + "name": "Uganda", + "name_ar":"أوغندا", + "code": "+256", + "countryCode": "UG" + }, + { + "name": "Ukraine", + "name_ar":"أوكرانيا", + "code": "+380", + "countryCode": "UA" + }, + { + "name": "United Kingdom", + "name_ar":"المملكة المتحدة", + "code": "+44", + "countryCode": "GB" + }, + { + "name": "United States", + "name_ar":"الولايات المتحدة الامريكانية", + "code": "+1", + "countryCode": "US" + }, + { + "name": "Uruguay", + "name_ar":"أوروغواي", + "code": "+598", + "countryCode": "UY" + }, + { + "name": "Uzbekistan", + "name_ar":"أوزبكستان", + "code": "+998", + "countryCode": "UZ" + }, + { + "name": "Vanuatu", + "name_ar":"فانواتو", + "code": "+678", + "countryCode": "VU" + }, + { + "name": "Venezuela, Bolivarian Republic of Venezuela", + "name_ar":"فنزويلا ، جمهورية فنزويلا البوليفارية", + "code": "+58", + "countryCode": "VE" + }, + { + "name": "Vietnam", + "name_ar":"فيتنام", + "code": "+84", + "countryCode": "VN" + }, + { + "name": "Virgin Islands, British", + "name_ar":"جزر العذراء البريطانية", + "code": "+1 284", + "countryCode": "VG" + }, + { + "name": "Virgin Islands, U.S.", + "name_ar":"جزر فيرجن ، الولايات المتحدة", + "code": "+1 340", + "countryCode": "VI" + }, + { + "name": "Wallis and Futuna", + "name_ar":"واليس وفوتونا", + "code": "+681", + "countryCode": "WF" + }, + { + "name": "Yemen", + "name_ar":"اليمن", + "code": "+967", + "countryCode": "YE" + }, + { + "name": "Zambia", + "name_ar":"زامبيا", + "code": "+260", + "countryCode": "ZM" + }, + { + "name": "Zimbabwe", + "name_ar":"زيمبابوي", + "code": "+263", + "countryCode": "ZW" + } + ]; + + @override + void initState() { + super.initState(); + widget.selectedCountry = widget.selectedCountry ?? countryList[0]; + } + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Column( + children: [ + Divider(), + Container( + height: MediaQuery.of(context).size.height * 0.60, + child: SingleChildScrollView( + child: Column( + children: [ + ...List.generate( + countryList.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.selectedCountry = countryList[index]; + }); + }, + child: ListTile( + title: Text(countryList[index]["name"]), + leading: Radio( + value: countryList[index], + groupValue: widget.selectedCountry, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + widget.selectedCountry = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + ], + ), + ), + ], + ), + ) + ), + + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(widget.selectedCountry); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + )), + ), + ), + ), + ], + ) + ], + ) + ], + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/E-Referral/dialogs/select_relation_type_dialog.dart b/lib/pages/AlHabibMedicalService/E-Referral/dialogs/select_relation_type_dialog.dart new file mode 100644 index 00000000..d5323f4c --- /dev/null +++ b/lib/pages/AlHabibMedicalService/E-Referral/dialogs/select_relation_type_dialog.dart @@ -0,0 +1,129 @@ +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_relationship_types_response_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// ignore: must_be_immutable +class SelectRelationTypeDialog extends StatefulWidget { + final List relationTypes; + final Function(GetAllRelationshipTypeResponseModel) onValueSelected; + GetAllRelationshipTypeResponseModel selectedRelation; + + SelectRelationTypeDialog( + {Key? key, required this.relationTypes, required this.onValueSelected, required this.selectedRelation}); + + @override + _SelectRelationTypeDialogState createState() => _SelectRelationTypeDialogState(); +} + +class _SelectRelationTypeDialogState extends State { + @override + void initState() { + super.initState(); + widget.selectedRelation = widget.selectedRelation ?? widget.relationTypes[0]; + } + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Column( + children: [ + Divider(), + ...List.generate( + widget.relationTypes.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.selectedRelation = widget.relationTypes[index]; + }); + }, + child: ListTile( + title: Text(widget.relationTypes[index].text!), + leading: Radio( + value: widget.relationTypes[index], + groupValue: widget.selectedRelation, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + widget.selectedRelation = value!; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + ], + ), + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(widget.selectedRelation); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + )), + ), + ), + ), + ], + ) + ], + ) + ], + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/E-Referral/e_referral_confirm_sms_dialog.dart b/lib/pages/AlHabibMedicalService/E-Referral/e_referral_confirm_sms_dialog.dart new file mode 100644 index 00000000..3b5d585e --- /dev/null +++ b/lib/pages/AlHabibMedicalService/E-Referral/e_referral_confirm_sms_dialog.dart @@ -0,0 +1,379 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/check_activation_code_for_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class EReferralConfirmSMSDialog extends StatefulWidget { + final String phoneNumber; + final Function onSucces; + // final AdvanceModel advanceModel; + // final PatientInfoAndMobileNumber patientInfoAndMobileNumber; + // final String selectedPaymentMethod; + + const EReferralConfirmSMSDialog( + {Key? key, + required this.phoneNumber, + required this.onSucces + // this.advanceModel, + // this.selectedPaymentMethod, + // this.patientInfoAndMobileNumber + }) + : super(key: key); + + @override + _EReferralConfirmSMSDialogState createState() => _EReferralConfirmSMSDialogState(); +} + +class _EReferralConfirmSMSDialogState extends State { + final verifyAccountForm = GlobalKey(); + Map verifyAccountFormValue = { + 'digit1': null, + 'digit2': null, + 'digit3': null, + 'digit4': null, + }; + + TextEditingController digit1 = TextEditingController(text: ""); + TextEditingController digit2 = TextEditingController(text: ""); + TextEditingController digit3 = TextEditingController(text: ""); + TextEditingController digit4 = TextEditingController(text: ""); + + String timerText = (TIMER_MIN - 1).toString() + ':59'; + int min = TIMER_MIN - 1; + int sec = 59; + late Timer _timer; + + resendCode() { + min = TIMER_MIN - 1; + sec = 59; + _timer = Timer.periodic(Duration(seconds: 1), (Timer timer) { + if (min <= 0 && sec <= 0) { + timer.cancel(); + } else { + setState(() { + sec = sec - 1; + if (sec == 0 && min == 0) { + Navigator.pop(context); + min = 0; + sec = 0; + } else if (sec == 0) { + min = min - 1; + sec = 59; + } + timerText = min.toString() + ':' + sec.toString(); + }); + } + }); + } + + late FocusNode focusD1; + late FocusNode focusD2; + late FocusNode focusD3; + late FocusNode focusD4; + + @override + void initState() { + super.initState(); + resendCode(); + focusD1 = FocusNode(); + focusD2 = FocusNode(); + focusD3 = FocusNode(); + focusD4 = FocusNode(); + } + + @override + void dispose() { + _timer.cancel(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + builder: (_, model, w) => Dialog( + elevation: 0.6, + child: Container( + height: 520, + child: ListView( + children: [ + Container( + width: double.infinity, + height: 40, + color: Colors.grey[700], + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 4, + child: Center( + child: Texts( + 'SMS', + color: Colors.white, + textAlign: TextAlign.center, + ))), + Expanded( + flex: 1, + child: InkWell( + onTap: () => Navigator.pop(context), + child: Container( + decoration: BoxDecoration( + shape: BoxShape.circle, color: Colors.white), + child: Icon( + Icons.clear, + color: Colors.grey[900], + )), + ), + ) + ], + ), + ), + Image.asset( + 'assets/images/login/103.png', + height: MediaQuery.of(context).size.width * 0.25, + width: MediaQuery.of(context).size.width * 0.25, + ), + SizedBox( + height: 12, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + TranslationBase.of(context).pleaseEnterTheVerificationCode + + '[${widget.phoneNumber}]', + textAlign: TextAlign.center, + ), + ), + SizedBox( + height: 12, + ), + Form( + key: verifyAccountForm, + child: Container( + width: SizeConfig.realScreenWidth! * 0.90, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 30, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Container( + width: 65, + child: TextFormField( + textInputAction: TextInputAction.next, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 3, + ), + focusNode: focusD1, + maxLength: 1, + controller: digit1, + textAlign: TextAlign.center, + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + onSaved: (val) { + verifyAccountFormValue['digit1'] = val; + }, + validator: validateCodeDigit, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD2); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context).requestFocus(focusD2); + } + }, + ), + ), + Container( + width: 65, + child: TextFormField( + focusNode: focusD2, + controller: digit2, + textInputAction: TextInputAction.next, + maxLength: 1, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 3, + ), + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + validator: validateCodeDigit, + onSaved: (val) { + verifyAccountFormValue['digit2'] = val; + }, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD3); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context).requestFocus(focusD3); + } + }, + ), + ), + Container( + width: 65, + child: TextFormField( + focusNode: focusD3, + controller: digit3, + textInputAction: TextInputAction.next, + maxLength: 1, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 3, + ), + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + validator: validateCodeDigit, + onSaved: (val) { + verifyAccountFormValue['digit3'] = val; + }, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD4); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context) + .requestFocus(focusD4); + } + }, + )), + Container( + width: 65, + child: TextFormField( + focusNode: focusD4, + controller: digit4, + maxLength: 1, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 3, + ), + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + validator: validateCodeDigit, + onSaved: (val) { + verifyAccountFormValue['digit4'] = val; + }, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD4); + submit(model); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context) + .requestFocus(focusD4); + submit(model); + } + }), + ) + ], + ), + SizedBox( + height: 8, + ), + if (model.state == ViewState.ErrorLocal || + model.state == ViewState.Error) + Container( + margin: EdgeInsets.only(left: 8, right: 8), + width: double.maxFinite, + child: Texts( + model.error, + color: Colors.red, + ), + ), + SizedBox(height: 20), + // buildText(), + + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + TranslationBase.of(context) + .theVerificationCodeExpiresIn + + ' $timerText', + textAlign: TextAlign.center, + ), + ), + SizedBox(height: 20), + + Container( + width: double.maxFinite, + padding: EdgeInsets.all(12), + child: SecondaryButton( + textColor: Colors.white, + label: + TranslationBase.of(context).submit.toUpperCase(), + onTap: () { + submit(model); + }, + ), + ), + ], + ), + ), + ) + ], + ), + ), + ), + ); + } + + void submit(EReferralViewModel model) async { + if (verifyAccountForm.currentState!.validate()) { + final activationCode = + digit1.text + digit2.text + digit3.text + digit4.text; + // ToDo call service + CheckActivationCodeForEReferralResponseModel checkActivationCodeForEReferralRequestModel= new CheckActivationCodeForEReferralResponseModel(activationCode: activationCode); + await model.checkActivationCodeForEReferral(checkActivationCodeForEReferralRequestModel); + if(model.state == ViewState.ErrorLocal) { + // Utils.showErrorToast(model.error); + } else { + widget.onSucces(); + // Navigator.push(context, FadePage(page: StartIndexForAddProduct())); + // Navigate to new page + } + } + } + + String? validateCodeDigit(value) { + if (value.isEmpty) { + return ''; + } + return null; + } + + InputDecoration buildInputDecoration(BuildContext context) { + return InputDecoration( + // ts/images/password_icon.png + contentPadding: EdgeInsets.only(top: 20, bottom: 20), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5)), + borderSide: BorderSide(color: Colors.black), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + borderSide: BorderSide(color: Theme.of(context).primaryColor), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + borderSide: BorderSide(color: CustomColors.accentColor), + ), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + borderSide: BorderSide(color: CustomColors.accentColor), + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart new file mode 100644 index 00000000..f216c5ea --- /dev/null +++ b/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart @@ -0,0 +1,100 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_index_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.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:provider/provider.dart'; + +class EReferralPage extends StatefulWidget { + @override + _EReferralPageState createState() => _EReferralPageState(); +} + +class _EReferralPageState extends State + with SingleTickerProviderStateMixin { + late TabController _tabController; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getAllCities(), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).ereferral, + description: TranslationBase.of(context).eReferralInfo, + imagesInfo: [ + ImagesInfo( + imageAr: + 'https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/ar/1.png', + imageEn: + 'https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/1.png', + ) + ], + body: Column( + children: [ + TabBar( + isScrollable: false, + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: + EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [ + Text(TranslationBase.of(context).newReferral), + Text(TranslationBase.of(context).searchForReferrals), + ], + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + + controller: _tabController, + children: [ + StartIndexForNewEReferral(), + SearchForReferralsPage() + ], + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/E-Referral/referral_details.dart b/lib/pages/AlHabibMedicalService/E-Referral/referral_details.dart new file mode 100644 index 00000000..d92ff50b --- /dev/null +++ b/lib/pages/AlHabibMedicalService/E-Referral/referral_details.dart @@ -0,0 +1,138 @@ +import 'package:diplomaticquarterapp/Constants.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_response_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class ReferralDetails extends StatefulWidget { + final SearchEReferralResponseModel referral; + + const ReferralDetails({Key? key, required this.referral}) : super(key: key); + + @override + _ReferralDetailsState createState() => _ReferralDetailsState(); +} + +class _ReferralDetailsState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).ereferral, + body: Column( + children: [ + Container( + width: double.infinity, + child: Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 8, right: 16, bottom: 16), + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Text(TranslationBase.of(context).ereferral, style: TextStyle(letterSpacing: -0.64, color: Colors.black, fontSize: 18.0, fontWeight: FontWeight.bold)), + ), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 10, bottom: 5), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).referralStatus), + ), + Expanded( + child: _getNormalText(projectViewModel.isArabic ? widget.referral.statusAr : widget.referral.status, isBold: true), + ) + ], + ), + ), + mDivider(dividerColor!), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 10, bottom: 5), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).patientName), + ), + Expanded( + child: _getNormalText(widget.referral.patientName, isBold: true), + ) + ], + ), + ), + mDivider(dividerColor!), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 10, bottom: 5), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).referralNumber), + ), + Expanded( + child: _getNormalText(widget.referral.referralNumber.toString(), isBold: true), + ) + ], + ), + ), + mDivider(dividerColor!), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 10, bottom: 5), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).referralDate), + ), + Expanded( + child: _getNormalText(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDateNoTimeZone(widget.referral.referralDate!)), isBold: true), + ) + ], + ), + ), + mDivider(dividerColor!), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 10, bottom: 5), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).hospital), + ), + Expanded( + child: _getNormalText(widget.referral.preferredBranchName ?? "", isBold: true), + ) + ], + ), + ), + ], + ), + ), + )), + ], + )); + } + + _getNormalText(text, {bool isBold = false}) { + return Text( + text, + style: TextStyle( + fontSize: isBold ? 14 : 12, + letterSpacing: -0.5, + color: isBold ? Colors.black : Colors.grey[700], + fontWeight: FontWeight.w600, + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart new file mode 100644 index 00000000..106dc6e0 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/E-Referral/search_for_referrals_page.dart @@ -0,0 +1,314 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_criteria_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_request_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/referral_details.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/errors/app_embedded_error.dart'; +import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'dialogs/select_country_ingo_Dialog.dart'; + +class SearchForReferralsPage extends StatefulWidget { + SearchForReferralsPage({Key? key}); + + @override + _SearchForReferralsPageState createState() => _SearchForReferralsPageState(); +} + +class _SearchForReferralsPageState extends State { + TextEditingController _searchTextController = TextEditingController(); + + String mobileNo = ""; + bool _isSubmitted = false; + + dynamic _selectedCountry = {"name": "Saudi Arabia", "name_ar": "المملكة العربية السعودية", "code": "966", "countryCode": "SA", "pattern": "5xxxxxxxx", "maxLength": 9}; + + SearchCriteriaModel selectedCriteria = SearchCriteriaModel(name: "Identification Number", nameAr: "رقم الهوية", value: 1); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) async { + if (projectViewModel.isLogin) { + Future.delayed(new Duration(milliseconds: 300)).then((value) async { + GifLoaderDialogUtils.showMyDialog(context); + SearchEReferralRequestModel searchEReferralRequestModel = new SearchEReferralRequestModel( + patientMobileNumber: (projectViewModel.user!.outSA == 0 ? "966" : "971") + projectViewModel.user!.mobileNumber!.substring(1, projectViewModel.user!.mobileNumber!.length), + ); + if (selectedCriteria.value == 1) { + searchEReferralRequestModel.identificationNo = _searchTextController.text; + searchEReferralRequestModel.referralNumber = 0; + } else { + searchEReferralRequestModel.referralNumber = int.parse(_searchTextController.text); + searchEReferralRequestModel.identificationNo = projectViewModel.user!.patientIdentificationNo; + } + await model.getEReferrals(searchEReferralRequestModel); + GifLoaderDialogUtils.hideDialog(context); + }); + } + }, + builder: (_, model, widget) => AppScaffold( + isShowAppBar: false, + baseViewModel: model, + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Container( + margin: EdgeInsets.all(12), + child: Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + CommonDropDownView(TranslationBase.of(context).selectSearchCriteria, getSearchCriteriaName(projectViewModel), () { + List searchCriteria = [ + SearchCriteriaModel(name: "Identification Number", nameAr: "رقم الهوية", value: 1), + SearchCriteriaModel(name: "Referral Number", nameAr: "رقم الإحالة", value: 2), + ]; + List list = []; + for (int i = 0; i < searchCriteria.length; i++) { + list.add(RadioSelectionDialogModel(projectViewModel.isArabic ? searchCriteria[i].nameAr! : searchCriteria[i].name!, searchCriteria[i].value!)); + } + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: selectedCriteria.value, + onValueSelected: (index) { + selectedCriteria = searchCriteria[index - 1]; + setState(() {}); + }, + ), + ); + }).withBorderedContainer, + SizedBox(height: 12), + inputWidget(selectedCriteria.value == 1 ? TranslationBase.of(context).enterIdentificationNumber : TranslationBase.of(context).referralNumber, "", _searchTextController, + isInputTypeNum: true), + SizedBox(height: 12), + PhoneNumberSelectorWidget(onNumberChange: (value) { + setState(() { + mobileNo = value; + }); + }, onCountryChange: (value) { + setState(() { + _selectedCountry = value; + }); + }), + // InkWell( + // onTap: () => confirmSelectCountryTypeDialog(), + // child: Container( + // padding: EdgeInsets.all(12), + // width: double.infinity, + // height: 65, + // decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [Texts(getCountryName()), Icon(Icons.arrow_drop_down)], + // ), + // ), + // ), + // SizedBox( + // height: 12, + // ), + // MobileNumberTextFiled( + // controller: _mobileTextController, + // onChange: (_) { + // setState(() {}); + // }, + // code: _selectedCountry == null ? "11" : _selectedCountry["code"], + // ), + SizedBox(height: 12), + if ((model.state == ViewState.Idle && model.allReferral.length == 0)) Center(child: Text(TranslationBase.of(context).noSearchResult)), + if ((model.state == ViewState.ErrorLocal)) AppEmbeddedError(error: model.error), + model.allReferral.length > 0 + ? NetworkBaseView( + baseViewModel: model, + child: ListView.separated( + separatorBuilder: (context, index) => SizedBox(height: 0), + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemCount: model.allReferral == null ? 0 : model.allReferral.length, + itemBuilder: (BuildContext context, int index) { + return Container( + width: double.infinity, + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: ReferralDetails(referral: model.allReferral[index]), + ), + ); + }, + child: Container( + decoration: cardRadius(12), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(projectViewModel.isArabic ? model.allReferral[index].statusAr! : model.allReferral[index].status!, + style: TextStyle(fontSize: 14.0, letterSpacing: -0.56, fontWeight: FontWeight.bold)), + Container( + margin: EdgeInsets.only(top: 5.0), + child: MyRichText(TranslationBase.of(context).patientName + ": ", model.allReferral[index].patientName!, projectViewModel.isArabic)), + MyRichText(TranslationBase.of(context).hospital + ": ", model.allReferral[index].preferredBranchName!, projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).referralDate + ": ", + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDateNoTimeZone(model.allReferral[index].referralDate!)), projectViewModel.isArabic), + ], + ), + Icon(projectViewModel.isArabic ? Icons.arrow_back_ios_outlined : Icons.arrow_forward_outlined), + ], + ), + ), + ), + ), + ); + }, + ), + ) + : Container(), + SizedBox( + height: 80.0, + ) + ], + ), + ), + ), + ), + bottomSheet: Container( + color: Theme.of(context).scaffoldBackgroundColor, + width: double.infinity, + padding: EdgeInsets.all(14), + child: DefaultButton( + TranslationBase.of(context).search, + (_searchTextController.text.isEmpty || mobileNo.isEmpty) + ? null + : () async { + SearchEReferralRequestModel searchEReferralRequestModel = new SearchEReferralRequestModel( + patientMobileNumber: _selectedCountry['code'] + mobileNo, + ); + if (selectedCriteria.value == 1) { + searchEReferralRequestModel.identificationNo = _searchTextController.text; + searchEReferralRequestModel.referralNumber = 0; + } else { + searchEReferralRequestModel.referralNumber = int.parse(_searchTextController.text); + searchEReferralRequestModel.identificationNo = ''; + } + await model.getEReferrals(searchEReferralRequestModel); + setState(() { + _isSubmitted = true; + }); + }, + disabledColor: Colors.grey, + ), + ))); + } + + void confirmSelectCountryTypeDialog() { + showDialog( + context: context, + builder: (cxt) => SelectCountryDialog( + selectedCountry: _selectedCountry, + onValueSelected: (value) { + setState(() { + _selectedCountry = value; + }); + }, + ), + ); + } + + String getCountryName() { + if (_selectedCountry != null) + return _selectedCountry["name"]; + else + return "Country"; + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, + {VoidCallback? suffixTap, bool isEnable = true, bool hasSelection = false, int? lines, bool isInputTypeNum = false}) { + return InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: isInputTypeNum ? TextInputType.number : TextInputType.text, + controller: _controller, + maxLines: lines, + onChanged: (value) => {setState(() {})}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + suffixIconConstraints: BoxConstraints(minWidth: 50), + suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ).withBorderedContainer; + } + + String getSearchCriteriaName(ProjectViewModel projectViewModel) { + return projectViewModel.isArabic ? selectedCriteria.nameAr! : selectedCriteria.name!; + } +} diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/Dialog/confirm_cancel_order_dialog.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/Dialog/confirm_cancel_order_dialog.dart new file mode 100644 index 00000000..a0de3275 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/Dialog/confirm_cancel_order_dialog.dart @@ -0,0 +1,100 @@ +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// ignore: must_be_immutable +class ConfirmCancelOrderDialog extends StatefulWidget { + final HomeHealthCareViewModel model; + final Function? onTap; + + ConfirmCancelOrderDialog({Key? key, required this.model, this.onTap}); + + @override + _ConfirmCancelOrderDialogState createState() => _ConfirmCancelOrderDialogState(); +} + +class _ConfirmCancelOrderDialogState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return SimpleDialog( + contentPadding: EdgeInsets.all(20), + title: Center( + child: Texts( + TranslationBase.of(context).confirm, + color: Colors.black, + ), + ), + children: [ + Column( + children: [ + Divider(), + SizedBox( + height: 10.0, + ), + Center( + child: Texts( + TranslationBase.of(context).cancelOrderMsg, + ), + ), + SizedBox( + height: 10, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () async { + widget.onTap!(); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + )), + ), + ), + ), + ], + ) + ], + ) + ], + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart new file mode 100644 index 00000000..1ac2f90d --- /dev/null +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart @@ -0,0 +1,299 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/app_map/google_huawei_map.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart'; +import 'package:geocoding/geocoding.dart'; +import 'package:geolocator/geolocator.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart'; +import 'package:huawei_hmsavailability/huawei_hmsavailability.dart'; +import 'package:provider/provider.dart'; + +class LocationPage extends StatefulWidget { + final Function(PickResult)? onPick; + + // final double latitude; + // final double longitude; + final dynamic model; + + const LocationPage({Key? key, this.onPick, this.model}) : super(key: key); + + @override + _LocationPageState createState() => _LocationPageState(); +} + +class _LocationPageState extends State { + double latitude = 0; + double longitude = 0; + bool showCurrentLocation = false; + + GoogleMapController? mapController; + + bool isHuawei = false; + + late AppMap appMap; + AppSharedPreferences sharedPref = AppSharedPreferences(); + static CameraPosition _kGooglePlex = CameraPosition( + target: LatLng(37.42796133580664, -122.085749655962), + zoom: 14.4746, + ); + late LatLng currentPostion; + + // Completer mapController = Completer(); + late Placemark selectedPlace; + late HmsApiAvailability hmsApiAvailability; + late ProjectViewModel projectViewModel; + + @override + void initState() { + hmsApiAvailability = HmsApiAvailability(); + if (latitude == 0.0 && longitude == 0.0) { + showCurrentLocation = true; + } + if (Platform.isAndroid) checkIsHuawei(); + + WidgetsBinding.instance.addPostFrameCallback((_) { + latitude = projectViewModel.latitude; + longitude = projectViewModel.longitude; + appMap = AppMap( + //Changed By Aamir + _kGooglePlex.toMap() as Map, + onCameraMove: (camera) { + print("Changed By Aamir"); + _updatePosition(camera); + }, + onMapCreated: () { + currentPostion = LatLng(projectViewModel.latitude, projectViewModel.longitude); + latitude = projectViewModel.latitude; + longitude = projectViewModel.longitude; + _getUserLocation(); + setState(() {}); + }, + onCameraIdle: () async { + List placemarks = await placemarkFromCoordinates(latitude, longitude); + selectedPlace = placemarks[0]; + print(selectedPlace); + }, + ); + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) {}, + builder: (_, model, widget) => AppScaffold( + appBarTitle: TranslationBase.of(context).addAddress, + isShowDecPage: false, + isShowAppBar: true, + baseViewModel: model, + showNewAppBarTitle: true, + showNewAppBar: true, + body: isHuawei + ? Column( + children: [ + Expanded( + child: Stack( + alignment: Alignment.center, + children: [ + if (appMap != null) appMap, + Container( + margin: EdgeInsets.only(bottom: 50.0), + child: Icon( + Icons.place, + color: CustomColors.accentColor, + size: 50, + ), + ), + ], + ), + ), + Container( + padding: const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14), + child: DefaultButton(TranslationBase.of(context).addNewAddress, () async { + AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel( + customer: Customer(addresses: [ + Addresses( + address1: selectedPlace.street, + address2: selectedPlace.street, + customerAttributes: "", + city: selectedPlace.administrativeArea, + createdOnUtc: "", + id: "0", + faxNumber: "", + phoneNumber: projectViewModel.user!.mobileNumber, + province: selectedPlace.administrativeArea, + countryId: 69, + latLong: latitude.toStringAsFixed(6) + "," + longitude.toStringAsFixed(6), + country: selectedPlace.country, + zipPostalCode: selectedPlace.postalCode, + email: projectViewModel.user!.emailAddress) + ]), + ); + await model.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel); + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + } else { + AppToast.showSuccessToast(message: "Address Added Successfully"); + } + Navigator.of(context).pop(addNewAddressRequestModel); + }), + ), + ], + ) + : PlacePicker( + apiKey: GOOGLE_API_KEY, + enableMyLocationButton: true, + automaticallyImplyAppBarLeading: false, + autocompleteOnTrailingWhitespace: true, + selectInitialPosition: true, + autocompleteLanguage: projectViewModel.currentLanguage, + enableMapTypeButton: true, + searchForInitialValue: false, + onMapCreated: (GoogleMapController controller) { + mapController = controller; + }, + onPlacePicked: (PickResult result) { + print(result.adrAddress); + }, + selectedPlaceWidgetBuilder: (_, selectedPlace, state, isSearchBarFocused) { + print("state: $state, isSearchBarFocused: $isSearchBarFocused"); + return isSearchBarFocused + ? Container() + : FloatingCard( + bottomPosition: 0.0, + leftPosition: 0.0, + rightPosition: 0.0, + width: 500, + borderRadius: BorderRadius.circular(0.0), + child: state == SearchingState.Searching + ? SizedBox(height: 43, child: Center(child: CircularProgressIndicator())).insideContainer + : DefaultButton(TranslationBase.of(context).addNewAddress, () async { + AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel( + customer: Customer(addresses: [ + Addresses( + address1: selectedPlace!.formattedAddress, + address2: selectedPlace!.formattedAddress, + customerAttributes: "", + createdOnUtc: "", + id: "0", + faxNumber: "", + phoneNumber: projectViewModel.user!.mobileNumber, + countryId: 69, + latLong: selectedPlace.geometry!.location.lat.toString() + "," + selectedPlace.geometry!.location.lng.toString(), + email: projectViewModel.user!.emailAddress) + ]), + ); + + selectedPlace.addressComponents!.forEach((e) { + if (e.types.contains("country")) { + addNewAddressRequestModel.customer!.addresses![0].country = e.longName; + } + if (e.types.contains("postal_code")) { + addNewAddressRequestModel.customer!.addresses![0].zipPostalCode = e.longName; + } + if (e.types.contains("locality")) { + addNewAddressRequestModel.customer!.addresses![0].city = e.longName; + } + }); + + await model.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel); + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + } else { + AppToast.showSuccessToast(message: "Address Added Successfully"); + } + Navigator.of(context).pop(addNewAddressRequestModel); + }).insideContainer); + }, + initialPosition: LatLng(latitude, longitude), + useCurrentLocation: showCurrentLocation, + ), + ), + ); + } + + checkIsHuawei() async { + // isHuawei = await FlutterHmsGmsAvailability.isHmsAvailable; + // print(isHuawei); + // setState(() {}); + await hmsApiAvailability.isHMSAvailable().then((value) { + isHuawei = value == 0 ? true : false; + }); + print(isHuawei); + setState(() {}); + } + + void _getUserLocation() async { + if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { + var lat = await this.sharedPref.getDouble(USER_LAT); + var long = await this.sharedPref.getDouble(USER_LONG); + latitude = lat; + longitude = long; + currentPostion = LatLng(lat, long); + setMap(); + } else { + if (await PermissionService.isLocationEnabled()) { + Geolocator.getLastKnownPosition().then((value) { + latitude = value!.latitude; + longitude = value!.longitude; + currentPostion = LatLng(latitude, longitude); + setMap(); + }); + } else { + if (Platform.isAndroid) { + Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () { + Geolocator.getLastKnownPosition().then((value) { + latitude = value!.latitude; + longitude = value.longitude; + currentPostion = LatLng(latitude, longitude); + setMap(); + }); + }); + } else { + Geolocator.getLastKnownPosition().then((value) { + latitude = value!.latitude; + longitude = value.longitude; + setMap(); + }); + } + } + } + } + + setMap() { + setState(() { + _kGooglePlex = CameraPosition( + target: currentPostion, + zoom: 14.4746, + ); + appMap.moveTo(cameraPostion: _kGooglePlex); + }); + } + + void _updatePosition(CameraPosition _position) { + print(_position); + latitude = _position.target.latitude; + longitude = _position.target.longitude; + } +} diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart new file mode 100644 index 00000000..14085fd9 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart @@ -0,0 +1,142 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/main.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart'; +import 'package:provider/provider.dart'; + +class NewHomeHealthCareStepOnePage extends StatefulWidget { + final PatientERInsertPresOrderRequestModel patientERInsertPresOrderRequestModel; + final Function? changePageViewIndex; + final HomeHealthCareViewModel model; + + const NewHomeHealthCareStepOnePage({Key? key, required this.patientERInsertPresOrderRequestModel, required this.model, this.changePageViewIndex}) : super(key: key); + + @override + _NewHomeHealthCareStepOnePageState createState() => _NewHomeHealthCareStepOnePageState(); +} + +class _NewHomeHealthCareStepOnePageState extends State { + late PickResult _result; + + @override + void initState() { + if (widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList == null) widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList = []; + super.initState(); + } + + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: false, + baseViewModel: widget.model, + body: Column( + children: [ + Expanded( + flex: 1, + child: ListView.separated( + physics: BouncingScrollPhysics(), + shrinkWrap: true, + padding: EdgeInsets.only(left: 21, right: 21, top: 12, bottom: 12), + itemBuilder: (context, index) { + HHCGetAllServicesResponseModel service = widget.model.hhcAllServicesList[index]; + return Padding( + padding: const EdgeInsets.only(top: 4, bottom: 4), + child: Row( + children: [ + Checkbox( + value: isServiceSelected(int.parse(service.serviceID!)), + activeColor: Color(0xffD02127), + tristate: false, + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + onChanged: (bool? newValue) { + setState(() { + if (!isServiceSelected(int.parse(service.serviceID!))) + widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList!.add(PatientERHHCInsertServicesList( + recordID: widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList!.length, + serviceID: int.parse(service.serviceID!), + serviceName: projectViewModel.isArabic ? service.textN : service.text)); + else + removeSelected(int.parse(service.serviceID!)); + }); + }), + SizedBox(width: 6), + Expanded( + child: Text( + projectViewModel.isArabic ? service.textN! : service.text!.toLowerCase().capitalize(), + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), + ), + ), + ], + ), + ); + }, + separatorBuilder: (context, index) => Divider( + height: 1, + color: Color(0xffE5E5E5), + ), + itemCount: widget.model.hhcAllServicesList.length), + ), + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).next, + (this.widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList!.length == 0 || widget.model.state == ViewState.BusyLocal) + ? null + : () async { + widget.model.setState(ViewState.Busy); + await widget.model.getCustomerInfo(); + Navigator.push( + context, + FadePage( + page: NewHomeHealthCareStepTowPage( + patientERInsertPresOrderRequestModel: widget.patientERInsertPresOrderRequestModel, + model: widget.model, + ), + ), + ); + // } + }, + disabledColor: Color(0xff575757), + ), + ), + ], + ), + ); + } + + isServiceSelected(int serviceId) { + Iterable patientERHHCInsertServicesList = + widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList!.where((element) => serviceId == element.serviceID); + if (patientERHHCInsertServicesList.length > 0) { + return true; + } + return false; + } + + removeSelected(int serviceId) { + Iterable patientERHHCInsertServicesList = + widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList!.where((element) => serviceId == element.serviceID); + + if (patientERHHCInsertServicesList.length > 0) + setState(() { + widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList!.remove(patientERHHCInsertServicesList.first); + }); + } +} diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart new file mode 100644 index 00000000..3ff391ca --- /dev/null +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart @@ -0,0 +1,235 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:provider/provider.dart'; + +class NewHomeHealthCareStepThreePage extends StatefulWidget { + final PatientERInsertPresOrderRequestModel? patientERInsertPresOrderRequestModel; + final Function? changePageViewIndex; + final HomeHealthCareViewModel model; + + NewHomeHealthCareStepThreePage({Key? key, this.patientERInsertPresOrderRequestModel, this.changePageViewIndex, required this.model}); + + @override + _NewHomeHealthCareStepThreePageState createState() => _NewHomeHealthCareStepThreePageState(); +} + +class _NewHomeHealthCareStepThreePageState extends State { + Completer _controller = Completer(); + + static CameraPosition _kGooglePlex = CameraPosition( + target: LatLng(37.42796133580664, -122.085749655962), + zoom: 14.4746, + ); + final Set markers = new Set(); + + @override + void initState() { + if (widget.patientERInsertPresOrderRequestModel!.latitude != null) { + markers.clear(); + markers.add( + Marker( + markerId: MarkerId( + widget.patientERInsertPresOrderRequestModel!.latitude.hashCode.toString(), + ), + position: LatLng(widget.patientERInsertPresOrderRequestModel!.latitude!, widget.patientERInsertPresOrderRequestModel!.longitude!)), + ); + _kGooglePlex = CameraPosition( + target: LatLng(widget.patientERInsertPresOrderRequestModel!.latitude!, widget.patientERInsertPresOrderRequestModel!.longitude!), + zoom: 14.4746, + ); + } + super.initState(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + return AppScaffold( + isShowDecPage: false, + baseViewModel: widget.model, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).homeHealthCare, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Container( + width: double.maxFinite, + margin: EdgeInsets.only(left: 12, right: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.only(top: 12.0, bottom: 12.0), + child: Texts( + TranslationBase.of(context).RRTSummary, + fontWeight: FontWeight.bold, + fontSize: 22, + )), + Container( + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(12)), + padding: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectedLocation, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: CustomColors.textColor, + letterSpacing: -0.56, + ), + ), + SizedBox( + height: 12, + ), + Container( + height: 200, + decoration: containerColorRadiusBorderWidth(Colors.transparent, 12,Colors.transparent,0.5), + clipBehavior: Clip.antiAlias, + child: Image.network( + "https://maps.googleapis.com/maps/api/staticmap?center=" + + widget.patientERInsertPresOrderRequestModel!.latitude.toString() + + "," + + widget.patientERInsertPresOrderRequestModel!.longitude.toString() + + "&zoom=16&size=600x300&maptype=roadmap&markers=color:red%7C" + + widget.patientERInsertPresOrderRequestModel!.latitude.toString() + + "," + + widget.patientERInsertPresOrderRequestModel!.longitude.toString() + + "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8", + width: double.infinity, + height: double.infinity, + fit: BoxFit.cover, + )), + SizedBox( + height: 12, + ), + Text( + TranslationBase.of(context).selectedService, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: CustomColors.textColor, + letterSpacing: -0.56, + ), + ), + ...List.generate( + widget.patientERInsertPresOrderRequestModel!.patientERHHCInsertServicesList!.length, + (index) => Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Texts( + // TranslationBase.of(context).serviceName, + // fontSize: 12, + // ), + SizedBox( + height: 5, + ), + Row( + children: [ + Text( + (index + 1).toString() + '. ', + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: CustomColors.black, + letterSpacing: -0.48, + ), + ), + Text( + widget.patientERInsertPresOrderRequestModel!.patientERHHCInsertServicesList![index].serviceName!, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: CustomColors.black, + letterSpacing: -0.48, + ), + ), + ], + ) + ], + ), + ), + ) + ], + ), + ), + SizedBox( + height: 57, + ), + ], + ), + ), + ), + bottomSheet: Container( + color: Theme.of(context).scaffoldBackgroundColor, + width: double.infinity, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: DefaultButton( + TranslationBase.of(context).confirm, + () { + widget.model.setState(ViewState.Busy); + widget.model.insertPresPresOrder(order: widget.patientERInsertPresOrderRequestModel!).then((value) { + widget.model.setState(ViewState.Idle); + if (widget.model.state != ViewState.ErrorLocal) { + if (widget.model.orderId != null) { + showCMCConfirmDialog( + context, + widget.model.orderId.toString(), + onClick: () { + Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: HomeHealthCarePage)); + Navigator.push(context, FadePage(page: HomeHealthCarePage())); + }, + ); + } + } else { + AppToast.showErrorToast(message: widget.model.error); + } + }); + }, + color: CustomColors.green, + ), + ), + + // SecondaryButton( + // label: TranslationBase.of(context).confirm, + // disabled: widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length == 0, + // color: Colors.grey[800], + // onTap: () async { + // widget.model.setState(ViewState.Busy); + // widget.model.insertPresPresOrder(order: widget.patientERInsertPresOrderRequestModel).then((value) => { + // widget.model.setState(ViewState.Idle), + // Navigator.push( + // context, + // FadePage( + // page: HomeHealthCarePage(), + // ), + // ) + // }); + // }, + // textColor: Theme.of(context).backgroundColor), + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart new file mode 100644 index 00000000..ee8f5b92 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart @@ -0,0 +1,323 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/app_map/google_huawei_map.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:geolocator/geolocator.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:google_maps_place_picker_mb/google_maps_place_picker.dart'; + +import 'location_page.dart'; + +class NewHomeHealthCareStepTowPage extends StatefulWidget { + final Function(PickResult)? onPick; + final double? latitude; + final double? longitude; + final PatientERInsertPresOrderRequestModel? patientERInsertPresOrderRequestModel; + final Function? changePageViewIndex; + final HomeHealthCareViewModel model; + + const NewHomeHealthCareStepTowPage({Key? key, this.onPick, this.latitude, this.longitude, this.patientERInsertPresOrderRequestModel, this.changePageViewIndex, required this.model}) + : super(key: key); + + @override + _NewHomeHealthCareStepTowPageState createState() => _NewHomeHealthCareStepTowPageState(); +} + +class _NewHomeHealthCareStepTowPageState extends State { + double latitude = 0; + double longitude = 0; + AddressInfo? _selectedAddress; + + bool showCurrentLocation = false; + final Set markers = new Set(); + late AppMap appMap; + AppSharedPreferences sharedPref = AppSharedPreferences(); + static CameraPosition _kGooglePlex = CameraPosition( + target: LatLng(37.42796133580664, -122.085749655962), + zoom: 14.4746, + ); + late LatLng currentPostion; + Completer mapController = Completer(); + late LocationUtils locationUtils; + + @override + void initState() { + appMap = AppMap( + //Changed by Aamir + _kGooglePlex.toMap() as Map, + onCameraMove: (camera) { + _updatePosition(camera as CameraPosition); + }, + onMapCreated: () { + _getUserLocation(); + setState(() {}); + }, + onCameraIdle: () { + print("onCameraIdle"); + }, + ); + super.initState(); + } + + void _getUserLocation() async { + if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { + var lat = await this.sharedPref.getDouble(USER_LAT); + var long = await this.sharedPref.getDouble(USER_LONG); + latitude = lat; + longitude = long; + currentPostion = LatLng(lat, long); + setMap(); + } else { + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + locationUtils.getCurrentLocation(callBack: (value) { + print(value); + setMap(); + }); + // if (await PermissionService.isLocationEnabled()) { + // Geolocator.getLastKnownPosition().then((value) { + // latitude = value.latitude; + // longitude = value.longitude; + // currentPostion = LatLng(latitude, longitude); + // setMap(); + // }); + // } else { + // if (Platform.isAndroid) { + // Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () { + // Geolocator.getLastKnownPosition().then((value) { + // latitude = value.latitude; + // longitude = value.longitude; + // currentPostion = LatLng(latitude, longitude); + // setMap(); + // }); + // }); + // } else { + // Geolocator.getLastKnownPosition().then((value) { + // latitude = value.latitude; + // longitude = value.longitude; + // setMap(); + // }); + // } + // } + } + } + + setLatitudeAndLongitude({bool isSetState = false, String? latLong}) { + if (latLong == null) { + if (widget.model.addressesList.isEmpty) { + setState(() { + showCurrentLocation = true; + }); + } else { + latLong = widget.model.addressesList[widget.model.addressesList.length - 1].latLong; + } + } + + if (!showCurrentLocation) { + List latLongArr = latLong!.split(','); + + latitude = double.parse(latLongArr[0]); + longitude = double.parse(latLongArr[1]); + currentPostion = LatLng(latitude, longitude); + setMap(); + } + } + + setMap() { + setState(() { + _kGooglePlex = CameraPosition( + target: currentPostion, + zoom: 14.4746, + ); + appMap.moveTo(cameraPostion: _kGooglePlex); + }); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).homeHealthCare, + body: Column( + children: [ + if (widget.model.addressesList.isNotEmpty) + Container( + margin: EdgeInsets.only(left: 12, right: 12, bottom: 12, top: 12), + decoration: cardRadius(12), + child: Container( + child: InkWell( + onTap: () => confirmSelectLocationDialog(widget.model.addressesList), + child: Container( + padding: EdgeInsets.all(8), + width: double.infinity, + // height: 65, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + getAddressName(), + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.45, + ), + ), + ), + Icon(Icons.arrow_drop_down) + ], + ), + ), + ), + height: 50, + width: double.infinity, + ), + ), + InkWell( + onTap: () { + // Navigator.push( + // context, + // FadePage( + // page: LocationPage( + // // latitude: latitude, + // // longitude: longitude, + // ), + // ), + // ).then((value) async { + // print(value); + // await widget.model.getCustomerAddresses(); + // setState(() {}); + // }); + }, + child: Padding( + padding: EdgeInsets.only(left: 12, right: 12, bottom: 16, top: 16), + child: Row( + children: [ + Icon(Icons.location_on_outlined), + mWidth(12), + Text( + TranslationBase.of(context).selectLocation, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + ], + ), + ), + ), + Expanded( + child: Stack( + alignment: Alignment.center, + children: [ + if (appMap != null) appMap, + Container( + margin: EdgeInsets.only(bottom: 50.0), + child: Icon( + Icons.place, + color: CustomColors.accentColor, + size: 50, + ), + ), + ], + ), + ), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14), + child: DefaultButton( + TranslationBase.of(context).continues, + () { + setState(() { + widget.patientERInsertPresOrderRequestModel!.latitude = latitude; + widget.patientERInsertPresOrderRequestModel!.longitude = longitude; + }); + navigateTo( + context, + NewHomeHealthCareStepThreePage( + patientERInsertPresOrderRequestModel: widget.patientERInsertPresOrderRequestModel, + model: widget.model, + ), + ); + }, + ), + ), + ], + ), + ); + } + + void _updatePosition(CameraPosition _position) { + latitude = _position.target.latitude; + longitude = _position.target.longitude; + } + + void confirmSelectLocationDialog(List addresses) { + showDialog( + context: context, + builder: (cxt) => SelectLocationDialog( + addresses: addresses, + selectedAddress: _selectedAddress, + onValueSelected: (value) { + setLatitudeAndLongitude(latLong: value.latLong); + setState(() { + _selectedAddress = value; + }); + }, + ), + ); + } + + String getAddressName() { + if (_selectedAddress != null && _selectedAddress!.address1 != null) + return _selectedAddress!.address1.toString(); + else + return TranslationBase.of(context).selectAddress; + } + + goToCurrentLocation() { + Geolocator.getCurrentPosition().then((value) { + _selectedAddress = AddressInfo(latLong: '${value.latitude},${value.longitude}'); + moveToLocation(LatLng(value.latitude, value.longitude)); + }); + } + + moveToLocation(LatLng location, {bool animate = true}) async { + await Future.delayed(Duration(milliseconds: 200)); + _kGooglePlex = CameraPosition( + target: location, + zoom: 16.4746, + ); + if (animate) + (await mapController.future).animateCamera( + CameraUpdate.newCameraPosition(_kGooglePlex), + ); + else + (await mapController.future).moveCamera( + CameraUpdate.newCameraPosition(_kGooglePlex), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart new file mode 100644 index 00000000..42ced9eb --- /dev/null +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart @@ -0,0 +1,332 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; +import 'package:flutter/material.dart'; +import 'package:geolocator/geolocator.dart'; +import 'package:provider/provider.dart'; + +import 'new_Home_health_care_step_one_page.dart'; + +class NewHomeHealthCarePage extends StatefulWidget { + NewHomeHealthCarePage({required this.model}); + + final HomeHealthCareViewModel model; + + @override + _NewHomeHealthCarePageState createState() => _NewHomeHealthCarePageState(); +} + +class _NewHomeHealthCarePageState extends State with TickerProviderStateMixin { + late PageController _controller; + int _currentIndex = 1; + late double _latitude; + late double _longitude; + + PatientERInsertPresOrderRequestModel patientERInsertPresOrderRequestModel = PatientERInsertPresOrderRequestModel(); + + @override + void initState() { + super.initState(); + _controller = new PageController(); + _getCurrentLocation(); + } + + _getCurrentLocation() async { + if (await PermissionService.isLocationEnabled()) { + Geolocator.getLastKnownPosition().then((value) { + _latitude = value!.latitude; + _longitude = value.longitude; + }).catchError((e) { + _longitude = 0; + _latitude = 0; + }); + } else { + if (Platform.isAndroid) { + Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () { + Geolocator.getLastKnownPosition().then((value) { + _latitude = value!.latitude; + _longitude = value.longitude; + }).catchError((e) { + _longitude = 0; + _latitude = 0; + }); + }); + } else { + Geolocator.getLastKnownPosition().then((value) { + _latitude = value!.latitude; + _longitude = value.longitude; + }).catchError((e) { + _longitude = 0; + _latitude = 0; + }); + } + } + + // await Geolocator.getLastKnownPosition().then((value) { + // _latitude = value.latitude; + // _longitude = value.longitude; + // }).catchError((e) { + // _longitude = 0; + // _latitude = 0; + // }); + } + + @override + void dispose() { + super.dispose(); + } + + _changeCurrentTab(int tab) { + setState(() { + _currentIndex = tab; + }); + _controller.animateToPage(tab, duration: Duration(milliseconds: 800), curve: Curves.easeOutQuart); + } + + @override + Widget build(BuildContext context) { + void showConfirmMessage(HomeHealthCareViewModel model, GetCMCAllOrdersResponseModel order) { + showDialog( + context: context, + builder: (cxt) => ConfirmWithMessageDialog( + message: TranslationBase.of(context).cancelOrderMsg, + onTap: () async { + model.setState(ViewState.Busy); + UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.iD, rejectionReason: "", presOrderStatus: 4, editedBy: 3); + + await model.updateHHCPresOrder(updatePresOrderRequestModel); + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + } else { + AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); + await model.getHHCAllPresOrders(); + // await model.getHHCAllServices(); + } + }, + )); + } + + ProjectViewModel projectViewModel = Provider.of(context); + + return PageView( + physics: NeverScrollableScrollPhysics(), + controller: _controller, + onPageChanged: (index) { + setState(() { + _currentIndex = index; + }); + }, + scrollDirection: Axis.horizontal, + children: [ + widget.model.pendingOrder != null && widget.model.pendingOrder.serviceText != null + ? ListView( + padding: EdgeInsets.symmetric(horizontal: 20, vertical: 15), + children: [ + (Container( + decoration: BoxDecoration( + color: Color(0xffCC9B14), + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Container( + // decoration: containerColorRadiusLeft(Colors.white, 12), + margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), + padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + ), + ), + // clipBehavior: Clip.antiAlias, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + widget.model.pendingOrder.statusText ?? "", + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffCC9B14), letterSpacing: -0.4, height: 16 / 10), + ), + SizedBox(height: 6), + Text( + '${TranslationBase.of(context).requestID}: ${widget.model.pendingOrder.iD}', + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).hospital + ": ", + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Expanded( + child: Text( + widget.model.pendingOrder.nearestProjectName ?? "", + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), + ), + ), + ], + ) + ], + ), + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text( + DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.model.pendingOrder.created.toString()) ?? DateTime.now()), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10), + ), + SizedBox(height: 12), + if (widget.model.pendingOrder.statusId == 1 || widget.model.pendingOrder.statusId == 2) + InkWell( + onTap: () { + showConfirmMessage(widget.model, widget.model.pendingOrder); + }, + child: Container( + padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), + decoration: BoxDecoration( + color: Color(0xffD02127), + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.circular(10), + ), + child: Text( + TranslationBase.of(context).cancel_nocaps, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4), + ), + ), + ), + ], + ), + ], + ), + ), + )) + ], + ) + + // FractionallySizedBox( + // widthFactor: 0.9, + // child: SingleChildScrollView( + // child: Container( + // // margin: EdgeInsets.all(10), + // child: Container( + // width: double.infinity, + // padding: EdgeInsets.only(left: 12, right: 12, top: 12), + // child: Card( + // shape: cardRadius(12), + // elevation: 2, + // margin: EdgeInsets.zero, + // color: Color(0xffcd9e1b), + // clipBehavior: Clip.antiAlias, + // child: Container( + // // decoration: containerColorRadiusLeft(Colors.white, 12), + // margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 8, right: projectViewModel.isArabic ? 8 : 0), + // padding: EdgeInsets.all(12), + // // color: Colors.white, + // decoration: BoxDecoration( + // shape: BoxShape.rectangle, + // color: Colors.white, + // borderRadius: BorderRadius.only( + // topLeft: projectViewModel.isArabic ? Radius.zero : Radius.circular(12.0), + // topRight: projectViewModel.isArabic ? Radius.circular(12.0) : Radius.zero, + // bottomLeft: projectViewModel.isArabic ? Radius.zero : Radius.circular(12.0), + // bottomRight: projectViewModel.isArabic ? Radius.circular(12.0) : Radius.zero, + // ), + // ), + // // clipBehavior: Clip.antiAlias, + // child: Row( + // children: [ + // Expanded( + // child: Column( + // mainAxisAlignment: MainAxisAlignment.start, + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Texts( + // TranslationBase.of(context).OrderStatus + + // ' ' + + // (projectViewModel.isArabic ? widget.model.pendingOrder.descriptionN : widget.model.pendingOrder.description), + // bold: false, + // fontSize: 12, + // color: Color(0xffcd9e1b), + // fontWeight: FontWeight.bold, + // ), + // Texts( + // TranslationBase.of(context).requestID + ' ' + widget.model.pendingOrder.iD.toString(), + // fontWeight: FontWeight.w600, + // fontSize: 18, + // ), + // Texts( + // TranslationBase.of(context).serviceName, + // fontSize: 12, + // fontWeight: FontWeight.w600, + // ), + // ...List.generate( + // widget.model.hhcAllOrderDetail.length, + // (index) => Container( + // child: Texts( + // projectViewModel.isArabic ? widget.model.hhcAllOrderDetail[index].descriptionN : widget.model.hhcAllOrderDetail[index].description.capitalize(), + // fontSize: 13, + // bold: false, + // ), + // ), + // ), + // ], + // )), + // Column( + // children: [ + // Texts( + // DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.model.pendingOrder.createdOn)), + // fontSize: 14, + // ), + // mHeight(8), + // // SecondaryButton( + // // onTap: () { + // // showConfirmMessage(widget.model, widget.model.hhcAllOrderDetail[0]); + // // }, + // // label: TranslationBase.of(context).cancel, + // // color: Colors.red[900], + // // small: true, + // // ) + // ], + // ), + // ], + // ))), + // )))) + : NewHomeHealthCareStepOnePage( + changePageViewIndex: _changeCurrentTab, + patientERInsertPresOrderRequestModel: patientERInsertPresOrderRequestModel, + model: widget.model, + ), + ], + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart new file mode 100644 index 00000000..29403efd --- /dev/null +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart @@ -0,0 +1,97 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class StepsWidget extends StatelessWidget { + final int? index; + final Function? changeCurrentTab; + + StepsWidget({Key? key, this.index, this.changeCurrentTab}); + + @override + Widget build(BuildContext context) { + return showRow(); + } + + Widget showRow() { + return Container( + width: double.infinity, + child: Row( + children: [ + InkWell( + onTap: () => changeCurrentTab!(0), + child: Container( + width: 35, + height: 35, + decoration: containerColorRadiusBorder( + index == 0 + ? CustomColors.accentColor + : index! > 0 + ? Colors.green[700]! + : Colors.white, + 2000, + Colors.black), + child: Center( + child: Text( + "1", + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + ), + ), + ), + ), + ), + Expanded(child: mDivider(Colors.grey)), + InkWell( + onTap: () => index! >= 2 ? changeCurrentTab!(1) : null, + child: Container( + width: 35, + height: 35, + decoration: containerColorRadiusBorder( + index == 1 + ? CustomColors.accentColor + : index! > 1 + ? Colors.green[700]! + : Colors.white, + 2000, + Colors.black), + child: Center( + child: Text( + "2", + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + ), + ), + ), + ), + ), + Expanded(child: mDivider(Colors.grey)), + InkWell( + onTap: () => index == 2 ? changeCurrentTab!(3) : null, + child: Container( + width: 35, + height: 35, + decoration: containerColorRadiusBorder( + index == 2 ? CustomColors.accentColor : Colors.white, + 2000, + Colors.black, + ), + child: Center( + child: Text( + "3", + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + ), + ), + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart new file mode 100644 index 00000000..05b0d753 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart @@ -0,0 +1,67 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_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/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'home_health_care_page.dart'; + +class HomeHealthCareIndexPage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).serviceInformation, + body: SingleChildScrollView( + padding: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).homeHealthCare, + fontWeight: FontWeight.normal, + fontSize: 25, + color: Color(0xff60686b), + ), + SizedBox( + height: 12, + ), + Texts( + TranslationBase.of(context).homeHealthCareText, + fontWeight: FontWeight.normal, + fontSize: 17, + ), + SizedBox( + height: 22, + ), + Center(child: Image.asset('assets/images/AlHabibMedicalService/Wifi-AR.png')), + SizedBox( + height: 77, + ), + ], + )), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.10, + width: double.infinity, + child: Column( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.9, + child: SecondaryButton( + onTap: () => Navigator.push( + context, + FadePage( + page: HomeHealthCarePage(), + ), + ), + label: TranslationBase.of(context).loginRegister, + textColor: CustomColors.white), + ), + ], + ), + )); + } +} diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart new file mode 100644 index 00000000..7308154f --- /dev/null +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart @@ -0,0 +1,93 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_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/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:provider/provider.dart'; + +import 'NewHomeHealthCare/new_home_health_care_page.dart'; +import 'orders_log_details_page.dart'; + +class HomeHealthCarePage extends StatefulWidget { + @override + _HomeHealthCarePageState createState() => _HomeHealthCarePageState(); +} + +class _HomeHealthCarePageState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) { + model.getHHCAllPresOrders(); + }, + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + description: TranslationBase.of(context).HHCNotAuthMsg, + appBarTitle: TranslationBase.of(context).homeHealthCare, + showNewAppBar: true, + showNewAppBarTitle: true, + imagesInfo: [ImagesInfo(imageAr: 'https://hmgwebservices.com/Images/MobileApp/HHC/ar/0.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/HHC/en/0.png')], + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).homeHealthCare), Text(TranslationBase.of(context).orderLog)], + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + NewHomeHealthCarePage( + model: model, + ), + OrdersLogDetailsPage( + model: model, + ) + ], + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart new file mode 100644 index 00000000..71c40181 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart @@ -0,0 +1,179 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'Dialog/confirm_cancel_order_dialog.dart'; + +class OrdersLogDetailsPage extends StatelessWidget { + final HomeHealthCareViewModel? model; + + const OrdersLogDetailsPage({Key? key, this.model}) : super(key: key); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + void showConfirmMessage(HomeHealthCareViewModel model, GetCMCAllOrdersResponseModel order) { + showDialog( + context: context, + builder: (cxt) => ConfirmWithMessageDialog( + message: TranslationBase.of(context).cancelOrderMsg, + onTap: () async { + UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.iD, rejectionReason: "", presOrderStatus: 4, editedBy: 3); + model.setState(ViewState.Busy); + await model.updateHHCPresOrder(updatePresOrderRequestModel); + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + } else { + AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); + await model.getHHCAllPresOrders(); + // await model.getHHCAllServices(); + } + }, + ), + ); + return; + } + + return AppScaffold( + isShowAppBar: false, + baseViewModel: model, + body: model!.hhcAllPresOrders.length > 0 + ? ListView.separated( + padding: EdgeInsets.all(21), + physics: BouncingScrollPhysics(), + itemBuilder: (context, index) { + GetCMCAllOrdersResponseModel order = model!.hhcAllPresOrders.reversed.toList()[index]; + + int status = order.statusId!; + String _statusDisp = order.statusText!; + Color? _color; + if (status == 1) { + //pending + _color = Color(0xffCC9B14); + } else if (status == 2) { + //processing + _color = Color(0xff2E303A); + } else if (status == 3) { + //completed + _color = Color(0xff359846); + } else if (status == 4 || status == 6 || status == 7) { + //cancel // Rejected + _color = Color(0xffD02127); + } + return Container( + decoration: BoxDecoration( + color: _color, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Container( + // decoration: containerColorRadiusLeft(Colors.white, 12), + margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), + padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + ), + ), + // clipBehavior: Clip.antiAlias, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _statusDisp, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _color, letterSpacing: -0.4, height: 16 / 10), + ), + SizedBox(height: 6), + Text( + '${TranslationBase.of(context).requestID}: ${order.iD}', + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).hospital + ": ", + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Expanded( + child: Text( + order.nearestProjectName.toString(), + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), + ), + ), + ], + ) + ], + ), + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text( + DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(order.created!)!), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10), + ), + SizedBox(height: 12), + if (order.statusId == 1 || order.statusId == 2) + InkWell( + onTap: () { + showConfirmMessage(model!, order); + }, + child: Container( + padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), + decoration: BoxDecoration( + color: Color(0xffD02127), + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.circular(10), + ), + child: Text( + TranslationBase.of(context).cancel_nocaps, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4), + ), + ), + ), + ], + ), + ], + ), + ), + ); + }, + separatorBuilder: (context, index) => SizedBox(height: 12), + itemCount: model!.hhcAllPresOrders.length) + : getNoDataWidget(context), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart new file mode 100644 index 00000000..c12aa36a --- /dev/null +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -0,0 +1,428 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/weather_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/hmg_services.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_converter.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart'; +import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; +import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart'; +import 'package:diplomaticquarterapp/pages/ChildVaccines/new/child_initial_page.dart'; +import 'package:diplomaticquarterapp/pages/ChildVaccines/new/child_vaccine_page.dart'; +import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; +import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; +import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; +import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart'; +import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; +import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; +import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; +import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/services)contaniner.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:geolocator/geolocator.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; + +import 'h2o/h2o_page.dart'; + +class AllHabibMedicalService extends StatefulWidget { + //TODO + final Function? goToMyProfile; + + AllHabibMedicalService({Key? key, this.goToMyProfile}); + + @override + _AllHabibMedicalServiceState createState() => _AllHabibMedicalServiceState(); +} + +class _AllHabibMedicalServiceState extends State { + AppSharedPreferences sharedPref = AppSharedPreferences(); + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + PharmacyModuleViewModel pharmacyModuleViewModel = locator(); + late LocationUtils locationUtils; + var weather = '--'; + WeatherService _weatherService = WeatherService(); + List hmgServices = []; + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) => {Geolocator.getLastKnownPosition().then((value) => setLocation(value!))}); + }); + super.initState(); + } + + initialiseHmgServices(bool isLogin) { + hmgServices.clear(); + hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); + hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/covid_test_drive_thru.svg", isLogin)); + hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/visa.png", isLogin)); + hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); + hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); + hmgServices.add(new HmgServices(5, "RRT", TranslationBase.of(context).emergency, "assets/images/new/emergency.svg", isLogin)); + hmgServices.add(new HmgServices(6, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Referral.svg", isLogin)); + hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin)); + hmgServices.add(new HmgServices(8, TranslationBase.of(context).reachUs, TranslationBase.of(context).findUs, "assets/images/new/reach_us.svg", isLogin)); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + initialiseHmgServices(false); + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).alhabiServices, + isShowDecPage: false, + body: Column( + children: [ + Expanded( + child: ListView( + scrollDirection: Axis.vertical, + physics: AlwaysScrollableScrollPhysics(), + shrinkWrap: true, + children: [ + Container( + margin: EdgeInsets.all(8), + width: double.infinity, + height: 150, + decoration: BoxDecoration( + image: DecorationImage( + image: ExactAssetImage('assets/images/Weather_img.png'), + fit: BoxFit.cover, + ), + borderRadius: BorderRadius.circular(8.0)), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 10.0), + child: Row( + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).healthWeatherIndicators, + color: Colors.white, + fontWeight: FontWeight.w600, + ), + Texts( + TranslationBase.of(context).healthTipsBasedOnCurrentWeather, + color: Colors.white, + fontSize: 14, + ), + ], + ), + Expanded( + flex: 2, + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: HealthWeatherIndicator(), + ), + ); + }, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/Weather_ico.png', + width: 60, + height: 60, + ), + Directionality(textDirection: TextDirection.ltr, child: AppText(weather, fontSize: 22, color: Colors.white)) + ], + ), + Texts( + TranslationBase.of(context).moreDetails, + color: Colors.white, + decoration: TextDecoration.underline, + ), + ], + )), + ) + ], + ), + ), + ), + ServicesContainer( + onTap: () { + Navigator.pop(context); + Navigator.push( + context, + FadePage( + page: MedicalProfilePageNew(), + ), + ); + }, + imageLocation: 'assets/images/new-design/my_file_bottom_bar.png', + title: TranslationBase.of(context).myMedicalFile, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: LiveCareHome(), + ), + ), + imageLocation: 'assets/images/new-design/liveCare_ar_bg.png', + title: TranslationBase.of(context).livecare, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: Search(), + ), + ), + imageLocation: 'assets/images/new-design/booking_icon_active.png', + title: TranslationBase.of(context).bookAppo, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: PaymentService(), + ), + ), + imageLocation: 'assets/images/al-habib_online_payment_service_icon.png', + title: TranslationBase.of(context).onlinePaymentService, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: AnicllaryOrders(), + ), + ), + imageLocation: 'assets/images/comprehensive_medical_checkup_logo.png', + title: TranslationBase.of(context).anicllaryOrders, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(page: CovidDrivethruLocation()), + ), + imageLocation: 'assets/images/covid-car.png', + title: TranslationBase.of(context).covid19_driveThrueTest, + ), + ServicesContainer( + onTap: () { + Navigator.push( + context, + FadePage( + page: ErOptions( + isAppbar: true, + ), + ), + ); + }, + imageLocation: 'assets/images/emergency_service_image.png', + title: TranslationBase.of(context).emergencyService, + ), + ServicesContainer(onTap: () => getPharmacyToken(), imageLocation: 'assets/images/pharmacy_logo.png', title: TranslationBase.of(context).pharmacy), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: InsuranceUpdate(), + ), + ), + imageLocation: 'assets/images/medical/insurance_card_icon.png', + title: TranslationBase.of(context).updateInsurance, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(page: EReferralPage()), + ), + imageLocation: 'assets/images/ereferral_service_icon.png', + title: TranslationBase.of(context).ereferral, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: MyFamily(), + ), + ), + imageLocation: 'assets/images/new-design/family_icon_bottom_bar.png', + title: TranslationBase.of(context).myFamily, + ), + if (projectViewModel.havePrivilege(35)) + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(page: ChildInitialPage()), + ), + imageLocation: 'assets/images/new-design/children_vaccines_icon.png', + title: TranslationBase.of(context).childVaccine, + ), + ServicesContainer( + 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(36)) + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(page: BloodDonationPage()), + ), + imageLocation: 'assets/images/new-design/blood_icon.png', + title: TranslationBase.of(context).bloodD, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: (HealthCalculators()), + ), + ), + imageLocation: 'assets/images/new-design/health_calculator_icon.png', + title: TranslationBase.of(context).calculators, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: HealthConverter(), + ), + ), + imageLocation: 'assets/images/new-design/health_convertor_icon.png', + title: TranslationBase.of(context).converters, + ), + if (projectViewModel.havePrivilege(38)) + ServicesContainer( + onTap: () => Navigator.push(context, FadePage(page: H2OPage())), + imageLocation: 'assets/images/new-design/water_icon.png', + title: TranslationBase.of(context).h2o, + ), + if (projectViewModel.havePrivilege(41)) + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(page: SmartWatchInstructions()), + ), + imageLocation: 'assets/images/new-design/smartwatch_icon.png', + title: TranslationBase.of(context).smartWatches, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: ParkingPage(), + ), + ), + imageLocation: 'assets/images/new-design/parking_system_icon.png', + title: TranslationBase.of(context).parking, + ), + ServicesContainer( + onTap: () => launch("https://hmgwebservices.com/vt_mobile/html/index.html"), + imageLocation: 'assets/images/new-design/virtual_tour_icon.png', + title: TranslationBase.of(context).vTour, + ), + ServicesContainer( + onTap: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (BuildContext context) => MyWebView( + title: "HMG News", + selectedUrl: " https://twitter.com/HMG", //"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", //this url is not working so changed to the hmg + ))); + }, + imageLocation: 'assets/images/new-design/twitter_dashboard_icon.png', + title: TranslationBase.of(context).latestNews, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: FindUsPage(), + ), + ), + imageLocation: 'assets/images/new-design/find_us_icon.png', + title: TranslationBase.of(context).findUs, + ), + ], + ), + ), + ], + ), + ); + } + + getPharmacyToken() async { + if (!authProvider.isLogin) { + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + } else { + GifLoaderDialogUtils.showMyDialog(context); + await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { + if (pharmacyModuleViewModel.error.isNotEmpty) { + await pharmacyModuleViewModel.createUser().then((value) { + GifLoaderDialogUtils.hideDialog(context); + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + }); + } else { + GifLoaderDialogUtils.hideDialog(context); + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + } + }); + } + } + + getAuthUser() async { + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + setState(() { + authUser = data; + }); + } + var data = await this.sharedPref.getObject(WEATHER); + if (data == null) { + var d = await _weatherService.getWeatherData(); + print(d); + setState(() { + weather = d != null ? d.temperature.toString() + '\u2103' : '--'; + }); + } else { + setState(() { + weather = data != null ? data['Temperature'].toString() + '\u2103' : '--'; + }); + } + } + + void setLocation(Position position) { + this.sharedPref.setDouble(USER_LAT, position.latitude ?? 0.0); + this.sharedPref.setDouble(USER_LONG, position.longitude ?? 0.0); + getAuthUser(); + } +} diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart new file mode 100644 index 00000000..420f08f1 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart @@ -0,0 +1,277 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/weather_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/hmg_services.dart'; +import 'package:diplomaticquarterapp/pages/landing/widgets/services_view.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:geolocator/geolocator.dart'; +import 'package:provider/provider.dart'; + +import 'health-weather/health-weather-indicator.dart'; + +class AllHabibMedicalSevicePage2 extends StatefulWidget { + @override + _AllHabibMedicalSevicePage2State createState() => _AllHabibMedicalSevicePage2State(); +} + +class _AllHabibMedicalSevicePage2State extends State { + List hmgServices = []; + late LocationUtils locationUtils; + var weather = '--'; + AppSharedPreferences sharedPref = AppSharedPreferences(); + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + WeatherService _weatherService = WeatherService(); + double weatherNum = 30; + late ProjectViewModel projectViewModel; + + @override + void initState() { + // TODO: implement initState + super.initState(); + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) async => { + if (await PermissionService.isLocationEnabled()) + {Geolocator.getLastKnownPosition().then((value) => setLocation(value!))} + else + { + if (Platform.isAndroid) + { + Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () { + Geolocator.getLastKnownPosition().then((value) => setLocation(value!)); + }) + } + else + {Geolocator.getLastKnownPosition().then((value) => setLocation(value!))} + } + }); + }); + } + + initialiseHmgServices(bool isLogin) { + hmgServices.clear(); + + hmgServices.add(new HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin)); + hmgServices.add(new HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); + hmgServices.add(new HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); + hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); + hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); + hmgServices.add(new HmgServices(5, TranslationBase.of(context).pharmacyTitle, TranslationBase.of(context).pharmacySubtitle, "assets/images/new/Pharmacy.svg", isLogin)); + + hmgServices.add(new HmgServices(6, TranslationBase.of(context).medicalFileTitle2, TranslationBase.of(context).medicalFileSubtitle, "assets/images/new/medical file.svg", isLogin)); + hmgServices.add(new HmgServices(7, TranslationBase.of(context).familyTitle, TranslationBase.of(context).familySubtitle, "assets/images/new/my family.svg", isLogin)); + hmgServices.add(new HmgServices(8, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); + hmgServices.add(new HmgServices(9, TranslationBase.of(context).My_Child, TranslationBase.of(context).Vaccines, "assets/images/new/child vaccines.svg", isLogin)); + hmgServices.add(new HmgServices(10, TranslationBase.of(context).updateInsurance, TranslationBase.of(context).updateInsuranceSubtitle, "assets/images/new/update insurance card.svg", isLogin)); + hmgServices.add(new HmgServices(11, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); + hmgServices.add(new HmgServices(12, TranslationBase.of(context).waterTitle, TranslationBase.of(context).waterSubtitle, "assets/images/new/h2o.svg", isLogin)); + hmgServices.add(new HmgServices(13, TranslationBase.of(context).healthCalculatorTitle, TranslationBase.of(context).healthCalculatorSubtitle, "assets/images/new/health calculator.svg", isLogin)); + hmgServices.add(new HmgServices(14, TranslationBase.of(context).healthConvertersTitle, TranslationBase.of(context).healthConvertersSubtitle, "assets/images/new/health converter.svg", isLogin)); + hmgServices.add(new HmgServices(15, TranslationBase.of(context).Todo, TranslationBase.of(context).list, "assets/images/new/todo.svg", isLogin)); + hmgServices.add(new HmgServices(16, TranslationBase.of(context).Blood, TranslationBase.of(context).Donation, "assets/images/new/blood donation.svg", isLogin)); + + hmgServices.add(new HmgServices(17, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin)); + + hmgServices.add(new HmgServices(18, TranslationBase.of(context).Virtual, TranslationBase.of(context).Tour, "assets/images/new/virtual tour.svg", isLogin)); + hmgServices.add(new HmgServices(19, TranslationBase.of(context).smartWatches.split(" ")[0], TranslationBase.of(context).smartWatches.split(" ")[1], "assets/images/new/smart watch.svg", isLogin)); + hmgServices.add(new HmgServices(20, TranslationBase.of(context).parkingTitle2, TranslationBase.of(context).parkingSubtitle, "assets/images/new/parking details.svg", isLogin)); + hmgServices.add(new HmgServices(21, TranslationBase.of(context).latestNews.split(" ")[0], TranslationBase.of(context).latestNews.split(" ")[1], "assets/images/new/latest news.svg", isLogin)); + + hmgServices.add(new HmgServices(22, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin)); + + + // hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); + // hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); + // hmgServices.add(new HmgServices(7, TranslationBase.of(context).waterTitle, TranslationBase.of(context).waterSubtitle, "assets/images/new/h2o.svg", isLogin)); + // hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin)); + // hmgServices.add(new HmgServices(9, TranslationBase.of(context).medicalFileTitle2, TranslationBase.of(context).medicalFileSubtitle, "assets/images/new/medical file.svg", isLogin)); + // hmgServices.add(new HmgServices(10, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin)); + // hmgServices.add(new HmgServices(11, TranslationBase.of(context).pharmacyTitle, TranslationBase.of(context).pharmacySubtitle, "assets/images/new/Pharmacy.svg", isLogin)); + // hmgServices.add(new HmgServices(12, TranslationBase.of(context).updateInsurance, TranslationBase.of(context).updateInsuranceSubtitle, "assets/images/new/update insurance card.svg", isLogin)); + // hmgServices.add(new HmgServices(13, TranslationBase.of(context).familyTitle, TranslationBase.of(context).familySubtitle, "assets/images/new/my family.svg", isLogin)); + // hmgServices.add(new HmgServices(14, TranslationBase.of(context).My_Child, TranslationBase.of(context).Vaccines, "assets/images/new/child vaccines.svg", isLogin)); + // hmgServices.add(new HmgServices(15, TranslationBase.of(context).Todo, TranslationBase.of(context).list, "assets/images/new/todo.svg", isLogin)); + // hmgServices.add(new HmgServices(16, TranslationBase.of(context).Blood, TranslationBase.of(context).Donation, "assets/images/new/blood donation.svg", isLogin)); + // hmgServices.add(new HmgServices(17, TranslationBase.of(context).healthCalculatorTitle, TranslationBase.of(context).healthCalculatorSubtitle, "assets/images/new/health calculator.svg", isLogin)); + // hmgServices.add(new HmgServices(18, TranslationBase.of(context).healthConvertersTitle, TranslationBase.of(context).healthConvertersSubtitle, "assets/images/new/health converter.svg", isLogin)); + // hmgServices.add(new HmgServices(19, TranslationBase.of(context).smartWatches.split(" ")[0], TranslationBase.of(context).smartWatches.split(" ")[1], "assets/images/new/smart watch.svg", isLogin)); + // hmgServices.add(new HmgServices(20, TranslationBase.of(context).parkingTitle2, TranslationBase.of(context).parkingSubtitle, "assets/images/new/parking details.svg", isLogin)); + // hmgServices.add(new HmgServices(21, TranslationBase.of(context).Virtual, TranslationBase.of(context).Tour, "assets/images/new/virtual tour.svg", isLogin)); + // hmgServices.add(new HmgServices(22, TranslationBase.of(context).latestNews.split(" ")[0], TranslationBase.of(context).latestNews.split(" ")[1], "assets/images/new/latest news.svg", isLogin)); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + initialiseHmgServices(false); + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).hMGService, + body: Container( + width: double.infinity, + height: double.infinity, + child: SingleChildScrollView( + child: Column( + children: [ + Container( + width: double.infinity, + decoration: containerRadiusWithGradient(0, + color1: timeCalculator(6, 0, 10, 59) + ? Color(0xFFB3E3FE) + : timeCalculator(11, 0, 15, 59) + ? Color(0xFFFF9E7E) + : Color(0xFF2E6686), + color2: timeCalculator(6, 0, 10, 59) + ? Color(0xFF9AC7FF) + : timeCalculator(11, 0, 15, 59) + ? Color(0xFFFECB50) + : Color(0xFF122F48)), + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Directionality( + textDirection: TextDirection.ltr, + child: Text( + weather, + style: TextStyle( + fontSize: 24, + letterSpacing: -0.83, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + ), + Text( + DateUtil.getMonthDayYearDateFormatted(new DateTime.now()), + style: TextStyle( + fontSize: 12, + letterSpacing: -0.60, + fontWeight: FontWeight.w600, + color: Colors.white, + ), + ), + Text( + TranslationBase.of(context).healthWeatherIndicators, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.96, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + Text( + TranslationBase.of(context).healthTipsBasedOnCurrentWeather, + style: TextStyle( + fontSize: 10, + letterSpacing: -0.72, + fontWeight: FontWeight.w600, + color: Colors.white, + ), + ), + ], + ), + ), + Column( + children: [ + SvgPicture.asset( + "assets/images/new/cloudy.svg", + ), + InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: HealthWeatherIndicator(), + ), + ); + }, + child: Padding( + padding: const EdgeInsets.only(top: 10, bottom: 0), + child: Text( + TranslationBase.of(context).moreDetails, + style: TextStyle(fontSize: 12, letterSpacing: -0.72, fontWeight: FontWeight.w600, color: Colors.white, decoration: TextDecoration.underline), + ), + ), + ) + ], + ), + ], + ), + ), + ), + mHeight(16), + Padding( + padding: const EdgeInsets.only( + left: 16, + right: 16, + top: 0, + ), + child: GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: hmgServices.length, + padding: EdgeInsets.zero, + itemBuilder: (BuildContext context, int index) { + return ServicesView(hmgServices[index], index, false, projectViewModel); + }, + ), + ), + mHeight(16), + ], + ), + ), + ), + ); + } + + void setLocation(Position position) { + this.sharedPref.setDouble(USER_LAT, position.latitude ?? 0.0); + this.sharedPref.setDouble(USER_LONG, position.longitude ?? 0.0); + getAuthUser(); + } + + getAuthUser() async { + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + setState(() { + authUser = data; + }); + } + var data = await this.sharedPref.getObject(WEATHER); + if (data == null) { + var d = await _weatherService.getWeatherData(); + weatherNum = d.temperature; + setState(() { + weather = d != null ? d.temperature.toString() + '\u2103' : '--'; + }); + } else { + setState(() { + weather = data != null ? data['Temperature'].toString() + '\u2103' : '--'; + }); + } + } +} diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart new file mode 100644 index 00000000..37aa7e91 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart @@ -0,0 +1,174 @@ +import 'package:diplomaticquarterapp/core/viewModels/ancillary_orders_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.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'; + +class AnicllaryOrders extends StatefulWidget { + @override + _AnicllaryOrdersState createState() => _AnicllaryOrdersState(); +} + +class _AnicllaryOrdersState extends State with SingleTickerProviderStateMixin { + TabController? _tabController; + late ProjectViewModel projectViewModel; + + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + } + + void dispose() { + super.dispose(); + _tabController!.dispose(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getOrders(), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + baseViewModel: model, + appBarTitle: TranslationBase.of(context).anicllaryOrders, + body: SingleChildScrollView( + padding: EdgeInsets.all(12), child: model.ancillaryLists.length > 0 ? Column(children: [getPatientInfo(model), getAncillaryOrdersList(model)]) : getNoDataWidget(context)))); + } + + Widget getPatientInfo(AnciallryOrdersViewModel model) { + return Padding( + child: Column( + children: [ + Container( + width: double.infinity, + child: Container( + decoration: cardRadius(12), + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Text( + TranslationBase.of(context).patientName + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel.user!.firstName! + " " + projectViewModel.user!.lastName!, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).mrn + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel!.user!.patientID.toString(), + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).nationalIdNumber + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel!.user!.patientIdentificationNo!, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + ], + ), + ), + ), + ), + Divider() + ], + ), + padding: EdgeInsets.only(top: 5.0, bottom: 10.0), + ); + } + + Widget getAncillaryOrdersList(AnciallryOrdersViewModel model) { + return Column(children: [ + ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + reverse: true, + itemBuilder: (context, index) { + return DoctorCard( + onTap: () => ancillaryOrdersDetails(model.ancillaryLists[0].ancillaryOrderList![index], model.ancillaryLists[0].projectID), + isInOutPatient: true, + name: TranslationBase.of(context).dr.toString() + " " + (model.ancillaryLists[0].ancillaryOrderList![index].doctorName ?? ""), + billNo: model.ancillaryLists[0].ancillaryOrderList![index].orderNo.toString(), + profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + subName: model.ancillaryLists[0].projectName, + isLiveCareAppointment: false, + date: DateUtil.convertStringToDate(model.ancillaryLists[0].ancillaryOrderList![index].orderDate!), + isSortByClinic: true, + ); + }, + itemCount: model.ancillaryLists[0].ancillaryOrderList!.length, + separatorBuilder: (context, index) => SizedBox(height: 14), + ), + ]); + } + + ancillaryOrdersDetails(item, projectId) { + Navigator.push( + context, + FadePage( + page: AnicllaryOrdersDetails(item.appointmentNo, item.orderNo, projectId), + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart new file mode 100644 index 00000000..464786df --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart @@ -0,0 +1,897 @@ +import 'dart:developer'; +import 'dart:io'; + +import "package:collection/collection.dart"; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/PayfortEnums.dart'; +import 'package:diplomaticquarterapp/core/service/ancillary_orders_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/ApplePayInsertRequest.dart'; +import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_proc_model.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_project_details_resp_model.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class AnicllaryOrdersDetails extends StatefulWidget { + final dynamic appoNo; + final dynamic orderNo; + final dynamic projectID; + + AnicllaryOrdersDetails(this.appoNo, this.orderNo, this.projectID); + + @override + _AnicllaryOrdersState createState() => _AnicllaryOrdersState(); +} + +class _AnicllaryOrdersState extends State with SingleTickerProviderStateMixin { + late ProjectViewModel projectViewModel; + bool _agreeTerms = false; + String selectedPaymentMethod = ""; + late MyInAppBrowser browser; + String transID = ""; + late BuildContext localContext; + String? selectedInstallmentPlan; + + List selectedProcList = []; + List _ancillaryProcLists = []; + + String? tamaraPaymentStatus; + String? tamaraOrderID; + + void initState() { + WidgetsBinding.instance.addPostFrameCallback((_) { + getAncillaryOrderDetails(); + }); + super.initState(); + } + + void dispose() { + super.dispose(); + } + + addSelectedProcedure(AncillaryOrderProcDetailsList ancillaryOrderProcDetailsList) { + if (!checkIfProcedureSelected(ancillaryOrderProcDetailsList)) { + selectedProcList.add(ancillaryOrderProcDetailsList); + } else { + selectedProcList.remove(ancillaryOrderProcDetailsList); + } + } + + void getAncillaryOrderDetails() { + GifLoaderDialogUtils.showMyDialog(context); + AncillaryOrdersService ancillaryOrdersService = new AncillaryOrdersService(); + ancillaryOrdersService.getOrdersDetails(widget.appoNo, widget.orderNo, widget.projectID).then((response) { + _ancillaryProcLists = []; + selectedProcList = []; + if (response['AncillaryOrderProcList'] != null && response['AncillaryOrderProcList'].length != 0) { + response['AncillaryOrderProcList'].forEach((item) { + _ancillaryProcLists.add(AncillaryOrdersListProcListModel.fromJson(item)); + }); + addToSelectedProcedures(); + } + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + AppToast.showErrorToast(message: err.toString()); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + localContext = context; + AppGlobal.context = context; + return AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).anicllaryOrders, + body: SingleChildScrollView( + padding: EdgeInsets.all(12), + child: _ancillaryProcLists.isNotEmpty + ? Column( + children: [ + getPatientInfo(), + getAncillaryDetails(), + ], + ) + : getNoDataWidget(context), + ), + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10), bottomLeft: Radius.circular(10), bottomRight: Radius.circular(10)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 5, + blurRadius: 7, + offset: Offset(0, 3), // changes position of shadow + ), + ], + ), + padding: EdgeInsets.only(left: 21, right: 21, top: 15, bottom: 15), + width: double.infinity, + // color: Colors.white, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(height: 12), + Text( + TranslationBase.of(context).YouCanPayByTheFollowingOptions, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + SizedBox( + width: MediaQuery.of(context).size.width * 0.75, + child: getPaymentMethods(), + ), + _amountView(TranslationBase.of(context).patientShareTotalToDo, getTotalValue(), isBold: true, isTotal: true), + // _amountView(TranslationBase.of(context).patientShareTotalToDo, getTotalValue(), isBold: true, isTotal: true), + SizedBox(height: 12), + DefaultButton( + TranslationBase.of(context).payNow.toUpperCase(), + selectedProcList.length > 0 + ? () { + if (getTotalValue() != "0.00") { + makePayment(); + } else { + autoGenerateInvoice(); + } + } + : null, + color: selectedProcList.length > 0 ? CustomColors.green : CustomColors.grey2, + disabledColor: CustomColors.grey2, + ), + ], + ), + ), + ); + } + + _getNormalText(text, {bool isBold = false, bool isTotal = false}) { + return Text( + text, + style: TextStyle( + fontSize: isBold + ? isTotal + ? 16 + : 12 + : 11, + letterSpacing: -0.5, + color: isBold ? Color(0xff2E303A) : Color(0xff575757), + fontWeight: isTotal ? FontWeight.bold : FontWeight.w600), + ); + } + + _amountView(String title, String value, {bool isBold = false, bool isTotal = false}) { + return Padding( + padding: const EdgeInsets.only(top: 10, bottom: 10), + child: Row(children: [ + Expanded( + child: _getNormalText(title), + ), + Expanded( + child: Row( + children: [ + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + _getNormalText(value, isBold: isBold, isTotal: isTotal), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ), + ]), + ); + } + + Widget getPatientInfo() { + return Padding( + child: Column( + children: [ + Container( + width: double.infinity, + child: Container( + decoration: cardRadius(12), + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Text( + TranslationBase.of(context).patientName + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).mrn + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel.user!.patientID.toString(), + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).nationalIdNumber + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel.user.patientIdentificationNo!, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).appointmentNo + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + _ancillaryProcLists[0].appointmentNo.toString(), + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + mWidth(3), + Row( + children: [ + Text( + TranslationBase.of(context).orderNo + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + // _ancillaryProcLists[0].ancillaryOrderProcDetailsList![0].orderNo.toString(), + _ancillaryProcLists[0].ancillaryOrderProcDetailsList!.isNotEmpty ? _ancillaryProcLists[0].ancillaryOrderProcDetailsList![0].orderNo.toString() : "0", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + mWidth(3), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).insuranceCompany + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Expanded( + child: Text( + _ancillaryProcLists[0].companyName.toString(), + overflow: TextOverflow.clip, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ), + ], + ), + mWidth(3), + Row( + children: [ + Text( + TranslationBase.of(context).policyNo + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + _ancillaryProcLists[0].insurancePolicyNo.toString(), + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + ], + ), + ), + ), + ), + ], + ), + padding: EdgeInsets.only(top: 5.0, bottom: 10.0), + ); + } + + Widget getAncillaryDetails() { + Map newMap = groupBy(_ancillaryProcLists[0].ancillaryOrderProcDetailsList as Iterable, (AncillaryOrderProcDetailsList obj) => obj.procedureCategoryName); + return Padding(padding: EdgeInsets.only(top: 0, bottom: 200), child: getHeaderDetails(newMap)); + } + + Widget getHeaderDetails(newMap) { + List list = []; + newMap.forEach((key, value) { + list.add( + Container( + padding: EdgeInsets.only(bottom: 8.0), + child: Text(key, style: TextStyle(color: Colors.black, letterSpacing: -0.64, fontSize: 18.0, fontWeight: FontWeight.bold)), + ), + ); + list.add( + ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemBuilder: (context, index) { + return AbsorbPointer( + absorbing: isProcedureDisabled(value[index]), + child: Container( + decoration: BoxDecoration( + color: getCardColor(value[index]), + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Container( + margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), + padding: EdgeInsets.symmetric(vertical: 12, horizontal: 12), + decoration: BoxDecoration( + color: isProcedureDisabled(value[index]) ? Colors.grey[300] : Colors.white, + border: Border.all(color: isProcedureDisabled(value[index]) ? Colors.grey[300]! : Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.only(bottom: 12.0), + child: Text( + getInsuranceText(value[index]), + style: TextStyle(fontSize: 13, fontWeight: FontWeight.w600, color: getCardColor(value[index]), letterSpacing: -0.4, height: 16 / 10), + ), + ), + Table( + columnWidths: { + 0: FlexColumnWidth(1.0), + 1: FlexColumnWidth(2.5), + 2: FlexColumnWidth(1.5), + 3: FlexColumnWidth(1.5), + 4: FlexColumnWidth(1.5), + }, + children: fullData(context, value[index]), + ), + ], + ), + ), + ), + ); + }, + separatorBuilder: (context, index) => SizedBox(height: 12), + itemCount: value.length), + ); + }); + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: list, + ); + } + + String getTotalValue() { + double total = 0.0; + selectedProcList.forEach((result) => {total += result.patientShareWithTax}); + return total.toStringAsFixed(2); + } + + bool checkIfProcedureSelected(AncillaryOrderProcDetailsList ancillaryOrderProcDetailsList) { + if (selectedProcList.length > 0) { + if (selectedProcList.contains(ancillaryOrderProcDetailsList)) { + return true; + } else { + return false; + } + } else { + return false; + } + } + + bool isProcedureDisabled(AncillaryOrderProcDetailsList ancillaryOrderProcDetailsList) { + if ((ancillaryOrderProcDetailsList.isApprovalRequired! && !ancillaryOrderProcDetailsList.isApprovalCreated!) || + (ancillaryOrderProcDetailsList.isApprovalCreated! && ancillaryOrderProcDetailsList.approvalNo == 0) || + (ancillaryOrderProcDetailsList.isApprovalRequired! && ancillaryOrderProcDetailsList.isApprovalCreated! && ancillaryOrderProcDetailsList.approvalNo == 0)) { + return true; + } else { + return false; + } + } + + addToSelectedProcedures() { + if (_ancillaryProcLists.isNotEmpty) { + selectedProcList.clear(); + if (_ancillaryProcLists[0].ancillaryOrderProcDetailsList != null) { + _ancillaryProcLists[0].ancillaryOrderProcDetailsList!.forEach((element) { + if (!isProcedureDisabled(element)) { + selectedProcList.add(element); + } + }); + } else {} + } + setState(() {}); + } + + String getInsuranceText(value) { + String insuranceText = ""; + if (!value.isApprovalRequired) { + insuranceText = "Cash"; + } else { + if (value.isApprovalCreated && value.approvalNo != 0) { + insuranceText = "Approved"; + } else if (value.isApprovalRequired && value.isApprovalCreated && value.approvalNo == 0) { + insuranceText = "Approval Rejected - Please visit receptionist"; + } else { + insuranceText = "Sent For Approval"; + } + } + return insuranceText; + } + + Color getCardColor(value) { + Color color = Color(0xff); + if (!value.isApprovalRequired) { + color = Color(0xff2E303A); + } else { + if (value.isApprovalCreated && value.approvalNo != 0) { + color = Color(0xff359846); + } else if (value.isApprovalRequired && value.isApprovalCreated && value.approvalNo == 0) { + color = Color(0xffD02127); + } else { + color = Color(0xffCC9B14); + } + } + return color; + } + + List fullData(context, value) { + List tableRow = []; + + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(""), + Utils.tableColumnTitle(TranslationBase.of(context).procedure), + Utils.tableColumnTitle(TranslationBase.of(context).price), + Utils.tableColumnTitle(TranslationBase.of(context).vat), + Utils.tableColumnTitle(TranslationBase.of(context).total), + ], + ), + ); + + tableRow.add( + TableRow(children: [ + Checkbox( + value: checkIfProcedureSelected(value), + onChanged: (v) { + setState(() { + addSelectedProcedure(value); + }); + }), + Utils.tableColumnValue('${value.procedureName}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${value.patientShare.toString()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${value.patientTaxAmount.toString()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${value.patientShareWithTax.toString()}', isLast: true, isCapitable: false, mProjectViewModel: projectViewModel), + ]), + ); + return tableRow; + } + + makePayment() { + showDraggableDialog( + context, + PaymentMethod( + onSelectedMethod: (String method, [String? selectedInstallmentPlan]) { + selectedPaymentMethod = method; + this.selectedInstallmentPlan = selectedInstallmentPlan; + if (selectedPaymentMethod == "ApplePay") { + if (projectViewModel.havePrivilege(103)) { + startApplePay(); + } else { + openPayment(selectedPaymentMethod, projectViewModel.user, double.parse(getTotalValue()), AppoitmentAllHistoryResultList(), selectedInstallmentPlan); + } + } else { + openPayment(selectedPaymentMethod, projectViewModel.user, double.parse(getTotalValue()), AppoitmentAllHistoryResultList(), selectedInstallmentPlan); + } + }, + patientShare: double.parse(getTotalValue()), + isFromAdvancePayment: !projectViewModel.havePrivilege(94), + )); + } + + void startApplePay() async { + transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID!); + + print("TransactionID: $transID"); + GifLoaderDialogUtils.showMyDialog(context); + + LiveCareService service = new LiveCareService(); + ApplePayInsertRequest applePayInsertRequest = new ApplePayInsertRequest(); + + PayfortProjectDetailsRespModel? payfortProjectDetailsRespModel; + await context.read().getProjectDetailsForPayfort(projectId: widget.projectID, serviceId: ServiceTypeEnum.ancillaryOrder.getIdFromServiceEnum()).then((value) { + payfortProjectDetailsRespModel = value; + }); + + applePayInsertRequest.clientRequestID = transID; + applePayInsertRequest.clinicID = 0; + applePayInsertRequest.currency = projectViewModel.user.outSA == 1 ? "AED" : "SAR"; + // applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress; + applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com"; + applePayInsertRequest.customerID = projectViewModel.user.patientID; + applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!; + applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); + applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); + applePayInsertRequest.doctorID = 0; + applePayInsertRequest.projectID = widget.projectID.toString(); + applePayInsertRequest.serviceID = ServiceTypeEnum.advancePayment.getIdFromServiceEnum().toString(); + applePayInsertRequest.channelID = 3; + applePayInsertRequest.patientID = projectViewModel.user.patientID; + applePayInsertRequest.patientTypeID = projectViewModel.user.patientType; + applePayInsertRequest.patientOutSA = projectViewModel.user.outSA; + applePayInsertRequest.appointmentDate = null; + applePayInsertRequest.appointmentNo = widget.appoNo; + applePayInsertRequest.orderDescription = "Ancillary Order Payment"; + applePayInsertRequest.liveServiceID = "0"; + applePayInsertRequest.latitude = "0.0"; + applePayInsertRequest.longitude = "0.0"; + applePayInsertRequest.amount = double.parse(getTotalValue()).toString(); + applePayInsertRequest.isSchedule = "0"; + applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en'; + applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2; + applePayInsertRequest.userName = projectViewModel.user.patientID; + applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html"; + applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html"; + applePayInsertRequest.paymentOption = "ApplePay"; + + applePayInsertRequest.isMobSDK = true; + applePayInsertRequest.merchantReference = transID; + applePayInsertRequest.merchantIdentifier = payfortProjectDetailsRespModel!.merchantIdentifier; + applePayInsertRequest.commandType = "PURCHASE"; + applePayInsertRequest.signature = payfortProjectDetailsRespModel!.signature; + applePayInsertRequest.accessCode = payfortProjectDetailsRespModel!.accessCode; + applePayInsertRequest.shaRequestPhrase = payfortProjectDetailsRespModel!.shaRequest; + applePayInsertRequest.shaResponsePhrase = payfortProjectDetailsRespModel!.shaResponse; + applePayInsertRequest.returnURL = ""; + + service.applePayInsertRequest(applePayInsertRequest, context).then((res) async { + if (res["MessageStatus"] == 1) { + await context.read().initiateApplePayWithPayfort( + customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, + // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, + customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com", + orderDescription: "Ancillary Order Payment", + orderAmount: double.parse(getTotalValue()), + merchantReference: transID, + payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, + currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", + onFailed: (failureResult) async { + GifLoaderDialogUtils.hideDialog(context); + log("failureResult: ${failureResult.message.toString()}"); + AppToast.showErrorToast(message: failureResult.message.toString()); + }, + onSuccess: (successResult) async { + log("Payfort: ${successResult.responseMessage}"); + await context.read().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult); + checkPaymentStatus(AppoitmentAllHistoryResultList()); + }, + projectId: widget.projectID, + serviceTypeEnum: ServiceTypeEnum.ancillaryOrder, + ); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: "An error occurred while processing your request"); + } + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + }); + } + + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList? appo, [String? selectedInstallmentPlan]) { + browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); + transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID!); + + browser.openPaymentBrowser( + amount, + "Ancillary Orders Payment", + transID, + widget.projectID.toString(), + projectViewModel.user.emailAddress!, + paymentMethod, + projectViewModel.user.patientType, + projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, + projectViewModel.user.patientID, + authenticatedUser, + browser, + false, + "3", + // Need to get new Service ID from Ayman for Ancillary Tamara + "", + context, + _ancillaryProcLists[0].appointmentDate, + _ancillaryProcLists[0].appointmentNo, + _ancillaryProcLists[0].clinicID, + _ancillaryProcLists[0].doctorID, + selectedInstallmentPlan); + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + + if (selectedPaymentMethod == "TAMARA") { + if (Platform.isAndroid) { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['status']; + tamaraOrderID = uri.queryParameters['AuthorizePaymentId']; + } else { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['paymentStatus']; + tamaraOrderID = uri.queryParameters['orderId']; + } + } + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called!!!!"); + if (selectedPaymentMethod == "TAMARA") { + checkTamaraPaymentStatus(transID, appo); + } else { + checkPaymentStatus(appo); + } + } + + checkTamaraPaymentStatus(String orderID, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getTamaraPaymentStatus(orderID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["status"].toString().toLowerCase() == "success") { + updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID!, int.parse(this.selectedInstallmentPlan!), appo); + } else { + updateTamaraRequestStatus("Failed", "00", transID, tamaraOrderID != null ? tamaraOrderID! : "", int.parse(this.selectedInstallmentPlan!), appo); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, int selectedInstallments, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + try { + DoctorsListService service = new DoctorsListService(); + service.updateTamaraRequestStatus(responseMessage, status, clientRequestID, tamaraOrderID, selectedInstallments).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (tamaraPaymentStatus!.toLowerCase() == "approved") { + createAdvancePayment(res, appo); + // addAdvancedNumberRequestTamara("Tamara-Advance-0000", tamaraOrderID, appo.appointmentNo.toString(), appo); + } + }).catchError((err) { + print(err); + AppToast.showErrorToast(message: err); + GifLoaderDialogUtils.hideDialog(context); + }); + } catch (err) { + print(err); + } + } + + checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(localContext); + DoctorsListService service = new DoctorsListService(); + service.checkPaymentStatus(transID, false, localContext).then((res) { + String paymentInfo = res['Response_Message']; + if (paymentInfo == 'Success') { + createAdvancePayment(res, appo); + } else { + GifLoaderDialogUtils.hideDialog(localContext); + AppToast.showErrorToast(message: res['Response_Message']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(localContext); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + String paymentReference = res['Fort_id'].toString(); + service.HIS_createAdvancePayment(appo, widget.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], projectViewModel.user.patientType, + projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, projectViewModel.user.patientID, localContext, + isAncillaryOrder: true) + .then((res) { + addAdvancedNumberRequest( + Utils.isVidaPlusProject(projectViewModel, widget.projectID) + ? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString() + : res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), + paymentReference, + 0, + appo); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(localContext); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, localContext).then((res) { + autoGenerateInvoice(); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(localContext); + AppToast.showErrorToast(message: err.toString()); + print(err); + }); + } + + autoGenerateInvoice() { + List selectedProcListAPI = []; + + selectedProcList.forEach((element) { + selectedProcListAPI.add({ + "ApprovalLineItemNo": element.approvalLineItemNo, + "OrderLineItemNo": element.orderLineItemNo, + "ProcedureID": element.procedureID, + }); + }); + + GifLoaderDialogUtils.showMyDialog(localContext); + + DoctorsListService service = new DoctorsListService(); + service.autoGenerateAncillaryOrdersInvoice(widget.orderNo, widget.projectID, widget.appoNo, selectedProcListAPI, projectViewModel.isArabic ? 1 : 2, localContext).then((res) { + GifLoaderDialogUtils.hideDialog(localContext); + showAlertDialog(res['AncillaryOrderInvoiceList'][0]['InvoiceNo'], widget.projectID); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(localContext); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + showAlertDialog(dynamic invoiceNo, dynamic projectID) { + AlertDialogBox( + context: context, + confirmMessage: TranslationBase.of(context).ancillaryOrderPaymentSuccess + invoiceNo.toString(), + okText: TranslationBase.of(context).ok, + okFunction: () { + AlertDialogBox.closeAlertDialog(context); + Navigator.of(context).pop(); + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + }).showAlertDialog(context); + } +} diff --git a/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart b/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart new file mode 100644 index 00000000..03504f57 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ancillary-orders/ordersPayment.dart @@ -0,0 +1,13 @@ +import 'package:flutter/material.dart'; + +class OrdersPayment extends StatefulWidget { + @override + _OrdersPaymentState createState() => _OrdersPaymentState(); +} + +class _OrdersPaymentState extends State { + @override + Widget build(BuildContext context) { + return Container(); + } +} diff --git a/lib/pages/AlHabibMedicalService/h2o/Dialog/setting_page_radio_button_list_dialog.dart b/lib/pages/AlHabibMedicalService/h2o/Dialog/setting_page_radio_button_list_dialog.dart new file mode 100644 index 00000000..61e171c3 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/h2o/Dialog/setting_page_radio_button_list_dialog.dart @@ -0,0 +1,101 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/material.dart'; + +class CommonRadioButtonDialog extends StatefulWidget { + final List list; + final String title; + final int selectedIndex; + final Function(int) onSelect; + CommonRadioButtonDialog({Key? key, this.title = "", this.selectedIndex = 0, required this.list, required this.onSelect}) : super(key: key); + + @override + _CommonRadioButtonDialogState createState() { + return _CommonRadioButtonDialogState(); + } +} + +class _CommonRadioButtonDialogState extends State { + int _selectedIndex = 0; + + @override + void initState() { + super.initState(); + _selectedIndex = widget.selectedIndex; + } + + @override + void dispose() { + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Dialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(4), + ), + elevation: 0, + backgroundColor: Colors.white, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + height: widget.title == "" ? 24 : 50, + alignment: Alignment.center, + child: Text( + widget.title, + style: TextStyle(color: Colors.black87, fontSize: 18, fontWeight: FontWeight.w500), + ), + ), + Divider(height: 1, color: Colors.black38), + ListView.builder( + shrinkWrap: true, + padding: EdgeInsets.only(top: 4, bottom: 4), + physics: NeverScrollableScrollPhysics(), + itemBuilder: (context, index) { + return RadioListTile( + value: index, + dense: true, + activeColor: Colors.black54, + groupValue: _selectedIndex, + onChanged: (_index) => setState(() => _selectedIndex = _index!), + title: Text( + widget.list[index], + style: TextStyle(fontWeight: FontWeight.w500), + ), + ); + }, + itemCount: widget.list?.length ?? 0, + ), + Divider(height: 1, color: Colors.black38), + Container( + height: 50, + alignment: Alignment.center, + child: Row( + children: [ + Expanded( + child: TextButton( + child: Text( + TranslationBase.of(context).cancel, + style: TextStyle(color: Colors.redAccent, fontSize: 16, fontWeight: FontWeight.w500), + ), + onPressed: () => Navigator.pop(context), + ), + ), + Expanded( + child: TextButton( + child: Text( + TranslationBase.of(context).ok, + style: TextStyle(color: Colors.black87, fontSize: 16, fontWeight: FontWeight.w500), + ), + onPressed: () => widget.onSelect(_selectedIndex), + ), + ) + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart b/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart new file mode 100644 index 00000000..8e3495c1 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/h2o/h20_setting.dart @@ -0,0 +1,631 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +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'; + +class H2oSetting extends StatefulWidget { + final UserDetailModel userDetailModel; + final H2OViewModel viewModel; + + H2oSetting({Key? key, required this.userDetailModel, required this.viewModel}) : super(key: key); + + @override + _H2oSettingState createState() { + return _H2oSettingState(); + } +} + +class _H2oSettingState extends State { + TextEditingController _nameController = TextEditingController(); + TextEditingController _heightController = TextEditingController(); + TextEditingController _weightController = TextEditingController(); + List _weightPopupList =[]; + List _heightPopupList =[]; + + bool _isUnitML = true; + bool _isGenderMale = false; + bool _isHeightCM = false; + bool _isWeightKG = false; + double _heightValue = 1; + double _weightValue = 1; + + List _activityLevelListEng = []; + List _remindedTimeListEng = []; + int _selectedActiveLevel = 1; + int _selectedRemindedTime = 0; + DateTime _dobDate = DateTime.now(); + DateTime _tempDate = DateTime.now(); + + late UserDetailModel _userDetailModel; + + @override + void initState() { + super.initState(); + _userDetailModel = widget.userDetailModel; + _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 ?? true; + _isHeightCM = _userDetailModel?.isHeightInCM ?? true; + _isGenderMale = (_userDetailModel?.gender ?? "M") == "M" ? true : false; + _dobDate = DateUtil.convertStringToDate(_userDetailModel.dOB ?? DateUtil.convertDateToString(DateTime.now())); + _selectedActiveLevel = _userDetailModel.activityID ?? 1; + readPrefs(); + } + + late 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 + void didChangeDependencies() { + super.didChangeDependencies(); + _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}"]; + } + + @override + void dispose() { + super.dispose(); + } + + @override + Widget build(BuildContext context) { + _weightPopupList = [PopupMenuItem(child: Text(TranslationBase.of(context).kg), value: true), PopupMenuItem(child: Text(TranslationBase.of(context).lb), value: false)]; + _heightPopupList = [PopupMenuItem(child: Text(TranslationBase.of(context).cm), value: true), PopupMenuItem(child: Text(TranslationBase.of(context).ft), value: false)]; + + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).h2o, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF7F7F7), + showHomeAppBarIcon: false, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).enterDetailBelow, + style: TextStyle( + fontSize: 19, + height: 23 / 19, + fontWeight: FontWeight.w700, + color: Color(0xff2E303A), + letterSpacing: -1.14, + ), + ), + SizedBox(height: 12), + inputWidget(TranslationBase.of(context).enterNameHere, TranslationBase.of(context).name, _nameController).withBorderedContainer, + SizedBox(height: 16), + Text( + TranslationBase.of(context).preferredunit, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + SizedBox(height: 12), + _commonRadioButtonsRow(TranslationBase.of(context).mililitre, TranslationBase.of(context).litre, _isUnitML, (value) { + if (_isUnitML != value) { + setState(() { + _isUnitML = value!; + }); + } + }), + SizedBox(height: 12), + Text( + TranslationBase.of(context).pleaseSelectGender, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + SizedBox(height: 12), + _commonRadioButtonsRow(TranslationBase.of(context).male, TranslationBase.of(context).female, _isGenderMale, (value) { + if (_isGenderMale != value) { + setState(() { + _isGenderMale = value!; + }); + } + }), + SizedBox(height: 18), + _commonInputAndUnitRow( + TranslationBase.of(context).height, + _heightController, + 1, + 270, + _heightValue, + (text) { + _heightController.text = text; + }, + (value) { + _heightValue = value; + }, + _isHeightCM ? TranslationBase.of(context).cm : TranslationBase.of(context).ft, + (value) { + if (_isHeightCM != value) { + setState(() { + _isHeightCM = value; + }); + } + }, + _heightPopupList), + SizedBox(height: 12), + _commonInputAndUnitRow( + TranslationBase.of(context).weight, + _weightController, + 1, + 250, + _weightValue, + (text) { + _heightController.text = text; + }, + (value) { + _weightValue = value; + }, + _isWeightKG ? TranslationBase.of(context).kg : TranslationBase.of(context).lb, + (value) { + if (_isWeightKG != value) { + setState(() { + _isWeightKG = value; + }); + } + }, + _weightPopupList), + SizedBox(height: 12), + CommonDropDownView(TranslationBase.of(context).dateOfBirth, DateUtil.getFormattedDate(_dobDate, "dd MMMM, yyyy"), () { + showModalBottomSheet( + context: context, + builder: (context) { + return Container( + height: 250, + padding: EdgeInsets.all(8), + child: Column(children: [ + Container( + height: 40, + alignment: Alignment.centerRight, + child: Row(mainAxisSize: MainAxisSize.min, children: [ + InkWell( + onTap: () => Navigator.pop(context), + child: Container( + alignment: Alignment.center, + padding: EdgeInsets.fromLTRB(8, 4, 8, 4), + child: Text(TranslationBase.of(context).cancel), + ), + ), + SizedBox(width: 8), + InkWell( + onTap: () { + Navigator.pop(context); + setState(() { + _dobDate = _tempDate; + }); + }, + child: Container( + alignment: Alignment.center, + padding: EdgeInsets.fromLTRB(8, 4, 8, 4), + child: Text(TranslationBase.of(context).ok), + ), + ) + ]), + ), + Expanded( + child: Container( + width: MediaQuery.of(context).size.width, + child: CupertinoDatePicker( + initialDateTime: _dobDate, + mode: CupertinoDatePickerMode.date, + onDateTimeChanged: (_date) { + _tempDate = _date; + }, + ), + ), + ) + ]), + ); + }); + }, iconData: Icons.calendar_today) + .withBorderedContainer, + SizedBox(height: 12), + CommonDropDownView(TranslationBase.of(context).activityLevel, _activityLevelListEng[_selectedActiveLevel - 1], () { + List list = [ + for (int i = 0; i < _activityLevelListEng.length; i++) RadioSelectionDialogModel(_activityLevelListEng[i], i + 1), + ]; + + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: _selectedActiveLevel, + onValueSelected: (index) { + _selectedActiveLevel = index; + setState(() {}); + }, + ), + ); + }).withBorderedContainer, + SizedBox(height: 18), + Text( + TranslationBase.of(context).reminderLabel, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + SizedBox(height: 12), + CommonDropDownView(TranslationBase.of(context).reminderTimesLabel, _remindedTimeListEng[_selectedRemindedTime], () { + List list = [ + for (int i = 0; i < _remindedTimeListEng.length; i++) RadioSelectionDialogModel(_remindedTimeListEng[i], i), + ]; + + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: _selectedRemindedTime, + onValueSelected: (index) { + _selectedRemindedTime = index; + setState(() {}); + }, + ), + ); + }).withBorderedContainer, + ], + ), + ), + ), + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).save, + _updateUserDetails, + color: Color(0xff349745), + ), + ), + ], + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.text, + controller: _controller, + onChanged: (value) => { + // validateForm() + }, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ); + } + + Widget _commonRadioButtonsRow(String rightText, String leftText, bool checkParam, Function(bool?) callBack) { + return Row( + children: [ + Row( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(width: 22, height: 22, child: Radio(value: true, groupValue: checkParam, onChanged: callBack)), + SizedBox(width: 8), + Text( + rightText, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + letterSpacing: -0.44, + ), + ), + ], + ), + SizedBox(width: 12), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(width: 22, height: 22, child: Radio(value: false, groupValue: checkParam, onChanged: callBack)), + SizedBox(width: 8), + Text( + leftText, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + letterSpacing: -0.44, + ), + ), + ], + ), + ], + ); + } + + Widget _commonInputAndUnitRow(_title, _controller, double _minValue, double _maxValue, double _valueOrg, Function(String) onTextValueChange, Function(double) onValueChange, String unitTitle, + Function(bool) onUnitTap, _list) { + return Row( + children: [ + Expanded( + flex: 3, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, + ), + ), + TextField( + controller: _controller, + keyboardType: TextInputType.number, + onChanged: (value) { + double _value = double.parse(value); + if (_value > _maxValue) { + onTextValueChange(_maxValue.toStringAsFixed(0)); + onValueChange(_maxValue); + return; + } else if (_value < _minValue) { + onTextValueChange(_minValue.toStringAsFixed(0)); + onValueChange(_minValue); + return; + } else if (_value >= _minValue && _value <= _maxValue) { + onValueChange(_value); + return; + } + }, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp(r'[0-9]')), + ], + style: TextStyle( + color: Color(0xff575757), + letterSpacing: -0.56, + ), + decoration: InputDecoration( + isDense: true, + hintText: "0", + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + Container(height: 34, width: 1, color: Color(0xffE0E0E0), margin: EdgeInsets.only(left: 12, right: 12)), + Expanded( + flex: 1, + child: PopupMenuButton( + child: CommonDropDownView(TranslationBase.of(context).unit, unitTitle, (){}), + onSelected: (value) { + print("Changed By Aamir"); + // Changed By Aamir + /// onUnitTap(value); + }, + itemBuilder: (context) => _list), + ) + ], + ).withBorderedContainer; + } + + void _updateUserDetails() async { + _userDetailModel.height = _heightValue; + _userDetailModel.weight = _weightValue; + _userDetailModel.firstName = _nameController.text; + _userDetailModel.isWeightInKG = _isWeightKG; + _userDetailModel.isHeightInCM = _isHeightCM; + _userDetailModel.gender = _isGenderMale ? "M" : "F"; + + var tempDate = DateUtil.convertDateToString(_dobDate); + if (!tempDate.endsWith("/")) { + tempDate = tempDate + "/"; + } + + _userDetailModel.dOB = tempDate; + _userDetailModel.activityID = _selectedActiveLevel; + GifLoaderDialogUtils.showMyDialog(context); + 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) ?? 0; + 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) => {}); + } + }); + } +} + +// todo 'sikander' move these to separate file once usability known +class CommonDropDownView extends StatelessWidget { + final String title; + final String value; + final VoidCallback callback; + final IconData? iconData; + CommonDropDownView(this.title, this.value, this.callback, {Key? key, this.iconData}) : super(key: key); + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: callback, + child: Row( + children: [ + Expanded( + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, + ), + ), + Text( + value, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + ), + ]), + ), + Icon( + iconData ?? Icons.keyboard_arrow_down_sharp, + color: Color(0xff2E303A), + ) + ], + ), + ); + } +} + +extension BorderedContainer on Widget { + Widget get withBorderedContainer => Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: this, + ); +} diff --git a/lib/pages/AlHabibMedicalService/h2o/h2o_index_page.dart b/lib/pages/AlHabibMedicalService/h2o/h2o_index_page.dart new file mode 100644 index 00000000..a28c0d3e --- /dev/null +++ b/lib/pages/AlHabibMedicalService/h2o/h2o_index_page.dart @@ -0,0 +1,67 @@ +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h2o_page.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_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/cupertino.dart'; +import 'package:flutter/material.dart'; + +class H2OPageIndexPage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).serviceInformation, + body: SingleChildScrollView( + padding: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + "Water Tracker:", + fontWeight: FontWeight.normal, + fontSize: 25, + color: Color(0xFF60686b), + ), + SizedBox( + height: 12, + ), + Texts( + "This service is designed to help you to set drinking water goals and track the volume of water you are drinking on a daily basis. This service allows for schedule reminders and offers a basic statistical analysis of the amount of what you have consumed over the course of a day, week or month.", + fontWeight: FontWeight.normal, + fontSize: 17, + ), + SizedBox( + height: 22, + ), + Center( + child: Image.asset( + 'assets/images/AlHabibMedicalService/Wifi-AR.png')), + SizedBox( + height: 77, + ), + ], + )), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.10, + width: double.infinity, + child: Column( + children: [ + Container( + width: MediaQuery + .of(context) + .size + .width * 0.9, + child: SecondaryButton( + onTap: () => + Navigator.push(context, FadePage(page: H2OPage())), + label: "Water Tracker", + textColor: CustomColors.white), + ), + ], + ), + ),); + } +} diff --git a/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart b/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart new file mode 100644 index 00000000..981f80b1 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/h2o/h2o_page.dart @@ -0,0 +1,148 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.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/ToDoList/ToDo.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.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/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class H2OPage extends StatefulWidget { + @override + _H2OPageState createState() => _H2OPageState(); +} + +class _H2OPageState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + + @override + void initState() { + super.initState(); + _tabController = TabController( + length: 3, + vsync: this, + ); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getUserDetail(), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).waterTracker, + description: TranslationBase.of(context).h2oInfo, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF7F7F7), + imagesInfo: [ + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/h2o/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/h2o/ar/0.png') + ], + showHomeAppBarIcon: false, + baseViewModel: model, + isHelp: true, + appBarIcons: [ + if (model.isLogin) + IconButton( + icon: Icon(Icons.settings), + color: Color(0xff2B353E), + onPressed: () { + Navigator.push( + context, + FadePage( + page: H2oSetting(userDetailModel: model.userDetail, viewModel: model), + ), + ); + }, + ), + ], + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).today), Text(TranslationBase.of(context).week), Text(TranslationBase.of(context).month.toLowerCase().capitalizeFirstofEach)], + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [TodayPage(), WeekPage(), MonthPage()], + ), + ) + ], + ), + 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: MedicalProfilePageNew()))); + } 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 new file mode 100644 index 00000000..49440106 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/h2o/month_page.dart @@ -0,0 +1,60 @@ +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/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:diplomaticquarterapp/widgets/charts/custom_line_chart.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, + baseViewModel: model, + body: SingleChildScrollView( + padding: EdgeInsets.all(21), + physics: BouncingScrollPhysics(), + child: (model.userProgressForMonthDataSeries ?? []).isEmpty + ? getNoDataWidget(context) + : Container( + padding: EdgeInsets.fromLTRB(16, 14, 16, 14), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + TranslationBase.of(context).waterConsumedInMonth, + style: TextStyle(fontSize: 16.0, color: Color(0xff2E303A), fontWeight: FontWeight.w600, letterSpacing: -0.64), + ), + SizedBox(height: 24), + CustomLineChart(model.userProgressForMonthDataSeries!, projectViewModel.isArabic), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/h2o/today_page.dart b/lib/pages/AlHabibMedicalService/h2o/today_page.dart new file mode 100644 index 00000000..55a12105 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/h2o/today_page.dart @@ -0,0 +1,362 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:wave/config.dart'; +import 'package:wave/wave.dart'; + +class TodayPage extends StatefulWidget { + TodayPage({Key? key}) : super(key: key); + + @override + _TodayPageState createState() { + return _TodayPageState(); + } +} + +class _TodayPageState extends State { + TextEditingController _h20AmountController = TextEditingController(); + + bool isUnitML = true; + Future readPrefs() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + isUnitML = (prefs.getString(H2O_UNIT) ?? "ml") == "ml" ? true : false; + return isUnitML; + } + + bool canShowAddButton = false; + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getUserProgressForTodayData(), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: false, + appBarTitle: TranslationBase.of(context).h2o, + baseViewModel: model, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 320, + child: Row( + children: [ + Expanded( + child: FutureBuilder( + future: readPrefs(), + builder: (context, data) { + 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(); + double totalH2O = model?.userProgressData?.quantityLimit ?? 0.0; + double consumedH2O = model?.userProgressData?.quantityConsumed ?? 0.0; + if (!isUnitML) { + totalH2O = totalH2O / 1000; + consumedH2O = consumedH2O / 1000; + } + + if (consumedH2O > totalH2O) { + consumedH2O = totalH2O; + } + + double divide = consumedH2O / totalH2O; + String percentage = (divide * 100).toStringAsFixed(0); + var remainingH2O = totalH2O - consumedH2O; + + return AspectRatio( + aspectRatio: 234 / 320, + child: Stack( + alignment: Alignment.center, + children: [ + ClipRRect( + borderRadius: BorderRadius.circular(18), + child: WaveWidget( + config: CustomConfig( + colors: [Color(0xff0d47a1), Color(0xff1976d2), Color(0xff2196f3)], + durations: [19440, 10800, 6000], + heightPercentages: [1 - divide - .10, 1 - divide - .05, 1 - divide], + blur: MaskFilter.blur(BlurStyle.solid, 0), + ), + waveAmplitude: 0, + backgroundColor: Color(0xff2e303a), + size: Size( + double.infinity, + double.infinity, + ), + ), + ), + Padding( + padding: const EdgeInsets.only(top: 12, bottom: 12), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + remainingH2O.toStringAsFixed(0) + "$unit " + TranslationBase.of(context).left.toLowerCase(), + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Colors.white, + letterSpacing: -0.56, + ), + ), + Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + "$percentage%", + style: TextStyle( + fontSize: 34, + fontWeight: FontWeight.bold, + color: Colors.white, + letterSpacing: -2.34, + ), + ), + Text( + TranslationBase.of(context).consumed, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Colors.white, + letterSpacing: -0.56, + ), + ), + ], + ), + ], + ), + ) + ], + ), + ); + }, + ), + ), + SizedBox(width: 21), + SizedBox( + height: double.infinity, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + _circularButton(context, 600, model), + SizedBox(height: 8), + _circularButton(context, 330, model), + SizedBox(height: 8), + _circularButton(context, 200, model), + SizedBox(height: 8), + InkWell( + onTap: () => undoVolume(context, model), + child: Text( + TranslationBase.of(context).undo, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Color(0xffD02127), + letterSpacing: -0.56, + decoration: TextDecoration.underline, + ), + ), + ), + ], + ), + ) + ], + ), + ), + SizedBox(height: 40), + Text( + TranslationBase.of(context).addCustomAmount, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.56, + ), + ), + SizedBox(height: 12), + Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + children: [ + Expanded( + flex: 3, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).amount_, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, + ), + ), + TextField( + controller: _h20AmountController, + keyboardType: TextInputType.number, + onChanged: (value) { + double _value = 0; + if (value.length > 0) _value = double.parse(value); + + if (value.length > 0) { + if (canShowAddButton) { + return; + } + canShowAddButton = true; + setState(() {}); + } else { + canShowAddButton = false; + setState(() {}); + } + }, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp(r'[0-9]')), + ], + style: TextStyle( + color: Color(0xff575757), + letterSpacing: -0.56, + ), + decoration: InputDecoration( + isDense: true, + hintText: "0", + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (canShowAddButton) + Expanded( + flex: 1, + child: DefaultButton( + TranslationBase.of(context).add, + () async { + await showConfirmMessage(context, int.parse(_h20AmountController.text), model); + _h20AmountController.text = ""; + canShowAddButton = false; + SystemChannels.textInput.invokeMethod('TextInput.hide'); + setState(() {}); + }, + ), + ), + ], + ), + ], + ), + ), + ], + ), + ), + ), + ); + } + + Widget _circularButton(context, int value, model) { + String _text = "$value${TranslationBase.of(context).ml}"; + return InkWell( + onTap: () { + showConfirmMessage(context, value, model); + }, + child: Container( + padding: EdgeInsets.all(21), + alignment: Alignment.center, + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.circle, + border: Border.all(width: 1, color: Color(0xffDEDEDE)), + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + TranslationBase.of(context).add, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w500, + color: Color(0xff575757), + letterSpacing: -0.44, + ), + ), + Text( + _text, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + ], + ), + ), + ); + } + + Future showConfirmMessage(context, int amount, H2OViewModel model) async { + String title = "${TranslationBase.of(context).areyousure} $amount ${(isUnitML ? TranslationBase.of(context).ml : TranslationBase.of(context).l).toLowerCase()} ?"; + await showDialog( + context: context, + builder: (cxt) => ConfirmWithMessageDialog( + message: title, + onTap: () async { + GifLoaderDialogUtils.showMyDialog(context); + InsertUserActivityRequestModel insertUserActivityRequestModel = InsertUserActivityRequestModel(quantityIntake: amount); + await model.insertUserActivity(insertUserActivityRequestModel); + GifLoaderDialogUtils.hideDialog(context); + FocusManager.instance.primaryFocus!.unfocus(); + }, + ), + ); + } + + void undoVolume(context, H2OViewModel model) async { + GifLoaderDialogUtils.showMyDialog(context); + await model.undoUserActivity(); + GifLoaderDialogUtils.hideDialog(context); + } +} diff --git a/lib/pages/AlHabibMedicalService/h2o/week_page.dart b/lib/pages/AlHabibMedicalService/h2o/week_page.dart new file mode 100644 index 00000000..447f8da7 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/h2o/week_page.dart @@ -0,0 +1,59 @@ +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/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/charts/custom_line_chart.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.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( + isShowAppBar: false, + appBarTitle: TranslationBase.of(context).h2o, + baseViewModel: model, + body: SingleChildScrollView( + padding: EdgeInsets.all(21), + physics: BouncingScrollPhysics(), + child: (model.userProgressForWeekDataSeries ?? []).isEmpty + ? getNoDataWidget(context) + : Container( + padding: EdgeInsets.fromLTRB(16, 14, 16, 14), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + TranslationBase.of(context).waterConsumedInWeek, + style: TextStyle(fontSize: 16.0, color: Color(0xff2E303A), fontWeight: FontWeight.w600, letterSpacing: -0.64), + ), + SizedBox(height: 24), + CustomLineChart(model.userProgressForWeekDataSeries!, 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..9309fa9b --- /dev/null +++ b/lib/pages/AlHabibMedicalService/h2o/widgets/h20_buttom_navigation_bar.dart @@ -0,0 +1,59 @@ + +import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; +import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; +import 'package:diplomaticquarterapp/pages/landing/home_page_2.dart'; +import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; +import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart'; +import 'package:flutter/material.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: [ + HomePage2( + goToMyProfile: () { + _changeCurrentTab(1); + }, + ), + MedicalProfilePageNew(), + 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-weather/health-weather-indicator.dart b/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart new file mode 100644 index 00000000..f799a161 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart @@ -0,0 +1,149 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/weather/weather_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; +import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:diplomaticquarterapp/widgets/weather_slider/weather_slider.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class HealthWeatherIndicator extends StatefulWidget { + @override + _HospitalsPageState createState() => _HospitalsPageState(); +} + +class _HospitalsPageState extends State { + var data; + AppSharedPreferences sharedPref = AppSharedPreferences(); + late LocationUtils locationUtils; + var weather = '--'; + + late ProjectViewModel projectViewModel; + + @override + void initState() { + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) => locationUtils.getCurrentLocation()); + getWeather(); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getWeatherData(), + allowAny: true, + builder: (_, mode, widget) => AppScaffold( + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).healthWeatherIndicators, + isShowAppBar: true, + body: mode.weatherIndicatorData.length > 0 + ? SingleChildScrollView( + child: Column(children: [ + Container( + width: double.infinity, + decoration: containerRadiusWithGradient(0, + color1: timeCalculator(6, 0, 10, 59) + ? Color(0xFFB3E3FE) + : timeCalculator(11, 0, 15, 59) + ? Color(0xFFFF9E7E) + : Color(0xFF2E6686), + color2: timeCalculator(6, 0, 10, 59) + ? Color(0xFF9AC7FF) + : timeCalculator(11, 0, 15, 59) + ? Color(0xFFFECB50) + : Color(0xFF122F48)), + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Directionality( + textDirection: TextDirection.ltr, + child: Text( + weather, + style: TextStyle( + fontSize: 24, + letterSpacing: -0.83, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + ), + Text( + DateUtil.getMonthDayYearDateFormatted(new DateTime.now()), + style: TextStyle( + fontSize: 12, + letterSpacing: -0.60, + fontWeight: FontWeight.w600, + color: Colors.white, + ), + ), + Text( + TranslationBase.of(context).healthWeatherIndicators, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.96, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + Text( + TranslationBase.of(context).healthTipsBasedOnCurrentWeather, + style: TextStyle( + fontSize: 10, + letterSpacing: -0.72, + fontWeight: FontWeight.w600, + color: Colors.white, + ), + ), + ], + ), + ), + SvgPicture.asset( + "assets/images/new/cloudy.svg", + ), + ], + ), + ), + ), + Padding( + padding: EdgeInsets.all(15), + child: AppText( + projectViewModel.isArabic ? mode.weatherIndicatorData[0].cityNameN! : mode.weatherIndicatorData[0].cityName!, + fontSize: 24, + fontWeight: FontWeight.bold, + )), + Padding( + padding: EdgeInsets.all(15), + child: Column( + children: mode.weatherIndicatorData.map((data) { + return WeatherSlider(data, projectViewModel); + }).toList())) + ])) + : Center(child: AppCircularProgressIndicator())), + ); + } + + getWeather() async { + var data = await this.sharedPref.getObject(WEATHER); + setState(() { + weather = data['Temperature'].toString() + '\u2103' ?? '--'; + }); + } +} diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart new file mode 100644 index 00000000..f3b88a60 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bariatrics-screen.dart @@ -0,0 +1,237 @@ +import 'dart:collection'; + +import 'package:diplomaticquarterapp/config/size_config.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/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/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'; + +// TODO mosa_remark +class BariatricsPage extends StatefulWidget { + final age; + final gender; + final double obeseResult; + + BariatricsPage(this.age, this.gender, this.obeseResult); + + @override + _BariatricsPageState createState() => _BariatricsPageState(); +} + +class _BariatricsPageState extends State { + DiseasesByClinic? _selectedDisease; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + + return BaseView( + onModelReady: (model) => model.getClinicCategory(), + 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, + onChanged: (val) { + setState(() { + _selectedDisease = item; + }); + }, + )) + .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 { + callDoctorsSearchAPI(); + // 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 { + callDoctorsSearchAPI(); + // Navigator.push( + // context, + // FadePage(page: DoctorList()), + // ); + }, + ), + ), + ], + ), + ), + ); + } + + callDoctorsSearchAPI() { + ProjectViewModel projectProvider = Provider.of(context); + int languageID = projectProvider.isArabic! ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + List doctorsList = []; + List arr = []; + List arrDistance = []; + List result; + int numAll; + List _patientDoctorAppointmentListHospital =[]; + + DoctorsListService service = new DoctorsListService(); + service.getDoctorsList(108, 0, false, languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + if (res['DoctorList'].length != 0) { + doctorsList.clear(); + res['DoctorList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson(v)); + }); + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientDoctorAppointmentListHospital + .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); + } + }); + } else {} + }); + + result = LinkedHashSet.from(arr).toList(); + numAll = result.length; + navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); + } + + Future navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) async { + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))) + .then((value) { + setState(() { + // dropdownValue = null; + }); + // getProjectsList(); + }); + } + + _getImageName(int gender, double obeseResult, bool isArabic) { + String path = "assets/images/BMI/"; + double result = obeseResult; + + if (result < 18.5 && gender == 1) { + path += "bmi_blue_male"; + } else if (result >= 18.5 && result <= 24.9 && gender == 1) { + path += "bmi_green_male"; + } else if (result >= 25 && result <= 29.9 && gender == 1) { + path += "bmi_yellow_male"; + } else if (result >= 30 && result <= 34.9 && gender == 1) { + path += "bmi_orange_male"; + } else if (result >= 35 && gender == 1) { + path += "bmi_red_male"; + } else if (result < 18.5 && gender == 2) { + path += "bmi_blue_female"; + } else if (result >= 18.5 && result <= 24.9 && gender == 2) { + path += "bmi_green_female"; + } else if (result >= 25 && result <= 29.9 && gender == 2) { + path += "bmi_yellow_female"; + } else if (result >= 30 && result <= 34.9 && gender == 2) { + path += "bmi_orange_female"; + } else if (result >= 35 && gender == 2) { + path += "bmi_red_female"; + } else { + path += "default.png"; + } + + if (isArabic) { + path += "_ar.png"; + } else { + path += "_en.png"; + } + return path; + } +} diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart new file mode 100644 index 00000000..e74a4615 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/bmi_calculator.dart @@ -0,0 +1,363 @@ +import 'dart:math'; + +import 'package:diplomaticquarterapp/main.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.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:flutter/services.dart'; + +import 'result_page.dart'; + +const activeCardColor = Color(0xff70777A); +const inactiveCardColor = Color(0xffFAFAFd); + +class BMICalculator extends StatefulWidget { + @override + _BMICalculatorState createState() => _BMICalculatorState(); +} + +class _BMICalculatorState extends State { + TextEditingController textController = TextEditingController(); + String? textResult; + String? msg; + double? bmiResult; + + TextEditingController _heightController = TextEditingController(); + TextEditingController _weightController = TextEditingController(); + + List _weightPopupList = []; + List _heightPopupList = []; + + bool _isHeightCM = true; + bool _isWeightKG = true; + double _heightValue = 150; + double _weightValue = 40; + + double convertToCm(double number) { + return number * 30.48; + } + + double convertToKg(double number) { + return number / 2.205; + } + + double calculateBMI() { + if (!_isHeightCM) _heightValue = convertToCm(_heightValue.toDouble()); + + if (!_isWeightKG) _weightValue = convertToKg(_weightValue); + + bmiResult = _weightValue / pow(_heightValue / 100, 2); + + return bmiResult!; + } + + void showTextResult(BuildContext context) { + if (bmiResult! >= 30) { + textResult = TranslationBase.of(context).obese; + } else if (bmiResult! < 30 && bmiResult! >= 25) { + textResult = TranslationBase.of(context).overWeight; + } else if (bmiResult! < 25 && bmiResult! >= 18.5) { + textResult = TranslationBase.of(context).healthy; + } else if (bmiResult! < 18.5) { + textResult = TranslationBase.of(context).underWeight; + } + } + + void showMsg(BuildContext context) { + if (bmiResult! >= 30) { + msg = TranslationBase.of(context).bmiCalcMsgObese; + } else if (bmiResult! < 30 && bmiResult! >= 25) { + msg = TranslationBase.of(context).bmiCalcMsgOverweight; + } else if (bmiResult! < 25 && bmiResult! >= 18.5) { + msg = TranslationBase.of(context).bmiCalcMsgHealthy; + } else if (bmiResult! < 18.5) { + msg = TranslationBase.of(context).bmiCalcMsgUnderWeight; + } + } + + @override + void initState() { + super.initState(); + textController.text = '0'; // Setting the initial value for the field. + _heightValue = 100; + _weightValue = 50; + _heightController.text = _heightValue.toStringAsFixed(0); + _weightController.text = _weightValue.toStringAsFixed(0); + + _isWeightKG = true; + _isHeightCM = true; + } + + Widget build(BuildContext context) { + _weightPopupList = [PopupMenuItem(child: Text(TranslationBase.of(context).kg), value: true), PopupMenuItem(child: Text(TranslationBase.of(context).lb), value: false)]; + _heightPopupList = [PopupMenuItem(child: Text(TranslationBase.of(context).cm), value: true), PopupMenuItem(child: Text(TranslationBase.of(context).ft), value: false)]; + + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showHomeAppBarIcon: true, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: "${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}", + body: Column( + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).bmiCalcDesc, + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.56, + fontWeight: FontWeight.w600, + ), + ), + mHeight(24), + _commonInputAndUnitRow( + TranslationBase.of(context).height, + _heightController, + 1, + 270, + _heightValue, + (text) { + _heightController.text = text; + }, + (value) { + _heightValue = value; + }, + _isHeightCM ? TranslationBase.of(context).cm : TranslationBase.of(context).ft, + (value) { + if (_isHeightCM != value) { + setState(() { + _isHeightCM = value; + }); + } + }, + _heightPopupList, + ), + mHeight(12), + _commonInputAndUnitRow( + TranslationBase.of(context).weight, + _weightController, + 1, + 270, + _weightValue, + (text) { + _weightController.text = text; + }, + (value) { + _weightValue = value; + }, + _isWeightKG ? TranslationBase.of(context).kg : TranslationBase.of(context).pound, + (value) { + if (_isWeightKG != value) { + setState(() { + _isWeightKG = value; + }); + } + }, + _weightPopupList, + ), + ], + ), + ), + ), + Container( + color: Colors.white, + padding: EdgeInsets.all(16), + child: SecondaryButton( + label: TranslationBase.of(context).calculate, + color: CustomColors.accentColor, + onTap: () { + setState(() { + calculateBMI(); + showTextResult(context); + showMsg(context); + { + Navigator.push( + context, + FadePage( + page: ResultPage( + finalResult: bmiResult!, + textResult: textResult!, + msg: msg!, + ), + ), + ); + } + }); + }, + ), + ), + ], + ), + ); + } + + Widget _commonInputAndUnitRow(_title, _controller, double _minValue, double _maxValue, double _valueOrg, Function(String) onTextValueChange, Function(double) onValueChange, String unitTitle, + Function(bool) onUnitTap, _list) { + return Row( + children: [ + Expanded( + flex: 3, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, + ), + ), + TextField( + controller: _controller, + keyboardType: TextInputType.number, + onChanged: (value) { + double _value = double.parse(value); + if (_value > _maxValue) { + onTextValueChange(_maxValue.toStringAsFixed(0)); + onValueChange(_maxValue); + return; + } else if (_value < _minValue) { + onTextValueChange(_minValue.toStringAsFixed(0)); + onValueChange(_minValue); + return; + } else if (_value >= _minValue && _value <= _maxValue) { + onValueChange(_value); + return; + } + }, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp(r'[0-9]')), + ], + style: TextStyle( + color: Color(0xff575757), + letterSpacing: -0.56, + ), + decoration: InputDecoration( + isDense: true, + hintText: "0", + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + Container(height: 34, width: 1, color: Color(0xffE0E0E0), margin: EdgeInsets.only(left: 12, right: 12)), + Expanded( + flex: 1, + child: PopupMenuButton( + child: CommonDropDownView( + TranslationBase.of(context).unit, + unitTitle, + (val) async { + final RenderBox overlay = Overlay.of(context).context.findRenderObject() as RenderBox; + await showMenu( + context: context, + position: RelativeRect.fromRect(val.globalPosition & const Size(40, 40), Offset.zero & overlay.size), + items: _list, + elevation: 8.0, + ).then((val) { + print(val); + onUnitTap(val); + }); + }, + ), + itemBuilder: (context) => _list, + ), + ) + ], + ).withBorderedContainer; + } +} + +// todo 'sikander' move these to separate file once usability known +class CommonDropDownView extends StatefulWidget { + final String title; + final String value; + void Function(TapDownDetails details) callback; + final IconData? iconData; + + CommonDropDownView(this.title, this.value, this.callback, {Key? key, this.iconData}) : super(key: key); + + @override + State createState() => _CommonDropDownViewState(); +} + +class _CommonDropDownViewState extends State { + @override + Widget build(BuildContext context) { + return GestureDetector( + onTapDown: (val) { + widget.callback(val); + }, + child: Row( + children: [ + Expanded( + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + widget.title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, + ), + ), + Text( + widget.value, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + ), + ]), + ), + Icon( + widget.iconData ?? Icons.keyboard_arrow_down_sharp, + color: Color(0xff2E303A), + ) + ], + ), + ); + } +} + +extension BorderedContainer on Widget { + Widget get withBorderedContainer => Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: this, + ); +} diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart new file mode 100644 index 00000000..26222569 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmi_calculator/result_page.dart @@ -0,0 +1,252 @@ +import 'dart:collection'; + +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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:flutter_svg/svg.dart'; +import 'package:provider/provider.dart'; + +class ResultPage extends StatefulWidget { + final double finalResult; + final String textResult; + final String msg; + + ResultPage({required this.finalResult, required this.textResult, required this.msg}); + + @override + _ResultPageState createState() => _ResultPageState(); +} + +class _ResultPageState extends State { + Color? inductorColor; + + double? percent; + + Color colorInductor() { + if (widget.finalResult >= 30) { + inductorColor = Color(0xffC70D00); + } else if (widget.finalResult < 30 && widget.finalResult >= 25) { + inductorColor = Color(0xffC25400); + } else if (widget.finalResult < 25 && widget.finalResult >= 18.5) { + inductorColor = Color(0xff36D600); + } else if (widget.finalResult < 18.5) { + inductorColor = Color(0xff1BE0EE); + } + return inductorColor!; + } + + double percentInductor() { + if (widget.finalResult >= 30) { + percent = 1.0; + } else if (widget.finalResult < 30 && widget.finalResult >= 25) { + percent = 0.73; + } else if (widget.finalResult < 25 && widget.finalResult >= 18.5) { + percent = 0.5; + } else if (widget.finalResult < 18.5) { + percent = 0.25; + } + return percent!; + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowDecPage: false, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: "${TranslationBase.of(context).bmi} ${TranslationBase.of(context).calcHealth}", + body: Column( + children: [ + Container( + margin: EdgeInsets.only(left: 20, right: 20, top: 20, bottom: 6), + decoration: cardRadius(12), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + TranslationBase.of(context).bodyMassIndex + widget.finalResult.toStringAsFixed(2), + style: TextStyle( + fontSize: 16, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + mHeight(20), + Container( + height: MediaQuery.of(context).size.width / 2.8, + child: Row( + children: [ + showMass(context, TranslationBase.of(context).underWeight, "< 18.5", widget.finalResult <= 18.5 ? Colors.red : Colors.black, 8), + mWidth(12), + showMass(context, TranslationBase.of(context).healthy, "18.5 - 24.9", (widget.finalResult > 18.5 && widget.finalResult < 25) ? Colors.red : Colors.black, 6), + mWidth(12), + showMass(context, TranslationBase.of(context).overWeight, "25 - 29.9", (widget.finalResult >= 25 && widget.finalResult < 30) ? Colors.red : Colors.black, 4), + mWidth(12), + showMass(context, TranslationBase.of(context).obese, "30 - 34.9", (widget.finalResult >= 30 && widget.finalResult < 35) ? Colors.red : Colors.black, 2), + mWidth(12), + showMass(context, TranslationBase.of(context).extremeObese, "> 35", (widget.finalResult >= 35) ? Colors.red : Colors.black, 0), + ], + ), + ), + mHeight(20), + Text( + widget.textResult, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + ), + ), + mHeight(4), + Text( + widget.msg, + style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.56, color: CustomColors.textColor), + ), + ], + ), + ), + ), + mFlex(1), + Container( + color: Colors.white, + padding: EdgeInsets.all(16), + child: DefaultButton( + TranslationBase.of(context).seeListOfDoctor, + () { + callDoctorsSearchAPI(); + }, + ), + ), + ], + ), + ); + } + + callDoctorsSearchAPI() { + int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + List doctorsList = []; + List arr = []; + List arrDistance = []; + List result; + int numAll; + List _patientDoctorAppointmentListHospital =[]; + + DoctorsListService service = new DoctorsListService(); + service.getDoctorsList(108, 0, false, languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + if (res['DoctorList'].length != 0) { + doctorsList.clear(); + res['DoctorList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson(v)); + }); + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientDoctorAppointmentListHospital + .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); + } + }); + } else {} + }); + + result = LinkedHashSet.from(arr).toList(); + numAll = result.length; + navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); + } + + Future navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) async { + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))) + .then((value) { + setState(() { + // dropdownValue = null; + }); + // getProjectsList(); + }); + } + + Widget showMass(BuildContext context, String title, String weight, Color color, int f) { + return Expanded( + flex: 1, + child: Container( + height: double.infinity, + width: double.infinity, + child: Column( + children: [ + Flexible( + child: Row( + children: [ + mFlex(f), + Flexible( + flex: 10, + child: SvgPicture.asset( + "assets/images/new/mass/health_BMI.svg", + height: double.infinity, + width: double.infinity, + fit: BoxFit.fill, + color: color, + ), + ), + mFlex(f), + ], + ), + ), + mHeight(20), + AutoSizeText( + title, + maxLines: 1, + minFontSize: 6, + style: TextStyle( + color: color, + fontSize: 10, + letterSpacing: -0.6, + ), + ), + AutoSizeText( + weight, + maxLines: 1, + minFontSize: 6, + style: TextStyle( + color: color, + fontSize: 10, + letterSpacing: -0.6, + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart new file mode 100644 index 00000000..58b55f33 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_calculator.dart @@ -0,0 +1,678 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_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:flutter/services.dart'; +import 'package:provider/provider.dart'; + +import 'bmr_result_page.dart'; + +const activeCardColorGender = Color(0xffC5272D); +const inactiveCardColorGender = Color(0xffFAFAFd); +const activeCardColor = Color(0xff70777A); +const inactiveCardColor = Color(0xffFAFAFd); + +class BmrCalculator extends StatefulWidget { + @override + _BmrCalculatorState createState() => _BmrCalculatorState(); +} + +class _BmrCalculatorState extends State { + bool isMale = false; + bool isHeightCm = true; + Color maleCard = activeCardColorGender; + Color femaleCard = inactiveCardColorGender; + Color kgCard = activeCardColor; + Color lbCard = inactiveCardColor; + Color cmCard = activeCardColor; + Color ftCard = inactiveCardColor; + + final GlobalKey clinicDropdownKey = GlobalKey(); + TextEditingController ageController = new TextEditingController(); + TextEditingController _heightController = new TextEditingController(); + TextEditingController _weightController = TextEditingController(); + + bool _isHeightCM = true; + bool _isWeightKG = true; + double _heightValue = 150; + double _weightValue = 40; + + List _heightPopupList = []; + List _weightPopupList = []; + + // int age = 0; + // int height = 0; + // int weight = 0; + double bmrResult = 0; + String dropdownValue = ''; + double calories = 0; + + void updateColor(int type) { + //MG/DLT card + if (type == 1) { + if (maleCard == inactiveCardColorGender) { + maleCard = activeCardColorGender; + femaleCard = inactiveCardColorGender; + } else { + maleCard = inactiveCardColorGender; + } + } + if (type == 2) { + if (femaleCard == inactiveCardColorGender) { + femaleCard = activeCardColorGender; + maleCard = inactiveCardColorGender; + } else { + femaleCard = inactiveCardColorGender; + } + } + } + + void updateColorHeight(int type) { + //MG/DLT card + if (type == 1) { + if (cmCard == inactiveCardColor) { + cmCard = activeCardColor; + ftCard = inactiveCardColor; + } else { + cmCard = inactiveCardColor; + } + } + if (type == 2) { + if (ftCard == inactiveCardColor) { + ftCard = activeCardColor; + cmCard = inactiveCardColor; + } else { + ftCard = inactiveCardColor; + } + } + } + + void updateColorWeight(int type) { + //MG/DLT card + if (type == 1) { + if (kgCard == inactiveCardColor) { + kgCard = activeCardColor; + lbCard = inactiveCardColor; + } else { + kgCard = inactiveCardColor; + } + } + if (type == 2) { + if (lbCard == inactiveCardColor) { + lbCard = activeCardColor; + kgCard = inactiveCardColor; + } else { + lbCard = inactiveCardColor; + } + } + } + + void calculateBmr() { + if (isMale == true) { + bmrResult = 66.5 + (13.75 * int.parse(_weightController.text)) + (5.003 * int.parse(_heightController.text)) - (6.755 * int.parse(ageController.text)); + } else if (isMale == false) { + bmrResult = 655.0955 + (9.5634 * int.parse(_weightController.text)) + (1.850 * int.parse(_heightController.text)) - (4.676 * int.parse(ageController.text)); + } + + bmrResult = bmrResult.roundToDouble(); + } + + void calculateCalories(BuildContext context) { + if (dropdownValue == TranslationBase.of(context).almostInactive) { + calories = bmrResult * 1.2; + } else if (dropdownValue == TranslationBase.of(context).lightActive1) { + calories = bmrResult * 1.375; + } else if (dropdownValue == TranslationBase.of(context).veryActive) { + calories = bmrResult * 1.55; + } else if (dropdownValue == TranslationBase.of(context).superActive) { + calories = bmrResult * 1.725; + } else if (dropdownValue == "") { + calories = bmrResult * 10.725; + } + } + + @override + Widget build(BuildContext context) { + dropdownValue = TranslationBase.of(context).lightActive1; + ProjectViewModel projectViewModel = Provider.of(context); + _weightPopupList = [PopupMenuItem(child: Text(TranslationBase.of(context).kg), value: true), PopupMenuItem(child: Text(TranslationBase.of(context).lb), value: false)]; + _heightPopupList = [PopupMenuItem(child: Text(TranslationBase.of(context).cm), value: true), PopupMenuItem(child: Text(TranslationBase.of(context).ft), value: false)]; + + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).bmr, + showHomeAppBarIcon: false, + appBarIcons: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 7.0), + child: Icon( + Icons.info_outline, + color: Colors.white, + ), + ) + ], + body: Container( + height: double.infinity, + width: double.infinity, + child: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(21.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).calculateAmount, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + color: CustomColors.textColor, + ), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 20, + ), + Text( + TranslationBase.of(context).selectGender, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + color: CustomColors.textColor, + ), + ), + SizedBox( + height: 8.0, + ), + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(1); + isMale = false; + }); + }, + child: Row( + children: [ + Container( + decoration: containerColorRadiusBorderWidth(Colors.white, 1000, CustomColors.darkGreyColor, 1), + width: 24, + height: 24, + padding: EdgeInsets.all(4), + child: Container( + width: double.infinity, + height: double.infinity, + decoration: containerRadius(!isMale ? CustomColors.accentColor : Colors.white, 100), + ), + ), + mWidth(12), + Text( + TranslationBase.of(context).female, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + ), + ), + ], + ), + ), + ), + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(2); + isMale = true; + }); + }, + child: Row( + children: [ + Container( + decoration: containerColorRadiusBorderWidth(Colors.white, 1000, CustomColors.darkGreyColor, 1), + width: 24, + height: 24, + padding: EdgeInsets.all(4), + child: Container( + width: double.infinity, + height: double.infinity, + decoration: containerRadius(isMale ? CustomColors.accentColor : Colors.white, 100), + ), + ), + mWidth(12), + Text( + TranslationBase.of(context).male, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + ), + ), + ], + ), + ), + ), + ], + ), + ), + SizedBox( + height: 12.0, + ), + inputWidget(TranslationBase.of(context).age11_120Years, "0", ageController), + SizedBox( + height: 12.0, + ), + _commonInputAndUnitRow( + TranslationBase.of(context).height, + _heightController, + 1, + 270, + _heightValue, + (text) { + _heightController.text = text; + }, + (value) { + _heightValue = value; + }, + _isHeightCM ? TranslationBase.of(context).cm : TranslationBase.of(context).ft, + (value) { + if (_isHeightCM != value) { + setState(() { + _isHeightCM = value; + }); + } + }, + _heightPopupList, + ), + SizedBox( + height: 12.0, + ), + _commonInputAndUnitRow( + TranslationBase.of(context).weight, + _weightController, + 1, + 270, + _weightValue, + (text) { + _weightController.text = text; + }, + (value) { + _weightValue = value; + }, + _isWeightKG ? TranslationBase.of(context).kg : TranslationBase.of(context).pound, + (value) { + if (_isWeightKG != value) { + setState(() { + _isWeightKG = value; + }); + } + }, + _weightPopupList, + ), + SizedBox( + height: 12.0, + ), + InkWell( + onTap: () { + // dropdownKey.currentState; + openDropdown(clinicDropdownKey); + }, + child: Container( + // width: double.infinity, + // decoration: containerRadius(Colors.white, 12), + // padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).activityLevel, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + value: dropdownValue, + key: clinicDropdownKey, + icon: Icon(Icons.arrow_downward), + iconSize: 0, + elevation: 16, + isExpanded: true, + style: TextStyle(color: Colors.black87), + underline: Container( + height: 2, + color: Colors.black54, + ), + onChanged: (String? newValue) { + setState(() { + dropdownValue = newValue!; + }); + }, + items: [ + TranslationBase.of(context).almostInactive, + TranslationBase.of(context).lightActive1, + TranslationBase.of(context).veryActive, + TranslationBase.of(context).superActive + ].map>((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ), + ), + ), + ], + ), + ), + Icon(Icons.keyboard_arrow_down), + ], + ), + ).withBorderedContainer, + ), + SizedBox( + height: 25.0, + ), + ], + ), + ], + ), + ), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + color: Colors.white, + child: SecondaryButton( + label: TranslationBase.of(context).calculate, + color: CustomColors.accentColor, + onTap: () { + setState(() { + calculateBmr(); + calculateCalories(context); + + { + Navigator.push( + context, + FadePage( + page: BmrResultPage( + bmrResult: bmrResult, + calories: calories, + )), + ); + } + }); + }, + ), + ), + ], + ), + ), + ); + } + + void openDropdown(GlobalKey key) { + GestureDetector? detector; + + void searchForGestureDetector(BuildContext element) { + element.visitChildElements((element) { + if (element.widget != null && element.widget is GestureDetector) { + detector = element.widget as GestureDetector?; + //return false; + } else { + searchForGestureDetector(element); + } + + //return true; + }); + } + + searchForGestureDetector(key.currentContext!); + assert(detector != null); + + detector!.onTap!(); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.number, + controller: _controller, + onChanged: (value) => {}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + + Widget _commonInputAndUnitRow(_title, _controller, double _minValue, double _maxValue, double _valueOrg, Function(String) onTextValueChange, Function(double) onValueChange, String unitTitle, + Function(bool) onUnitTap, _list) { + return Row( + children: [ + Expanded( + flex: 3, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, + ), + ), + TextField( + controller: _controller, + keyboardType: TextInputType.number, + onChanged: (value) { + double _value = double.parse(value); + if (_value > _maxValue) { + onTextValueChange(_maxValue.toStringAsFixed(0)); + onValueChange(_maxValue); + return; + } else if (_value < _minValue) { + onTextValueChange(_minValue.toStringAsFixed(0)); + onValueChange(_minValue); + return; + } else if (_value >= _minValue && _value <= _maxValue) { + onValueChange(_value); + return; + } + }, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp(r'[0-9]')), + ], + style: TextStyle( + color: Color(0xff575757), + letterSpacing: -0.56, + ), + decoration: InputDecoration( + isDense: true, + hintText: "0", + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + Container(height: 34, width: 1, color: Color(0xffE0E0E0), margin: EdgeInsets.only(left: 12, right: 12)), + Expanded( + flex: 1, + child: PopupMenuButton( + child: CommonDropDownView( + TranslationBase.of(context).unit, + unitTitle, + (val) async { + final RenderBox overlay = Overlay.of(context).context.findRenderObject() as RenderBox; + await showMenu( + context: context, + position: RelativeRect.fromRect(val.globalPosition & const Size(40, 40), Offset.zero & overlay.size), + items: _list, + elevation: 8.0, + ).then((val) { + print(val); + onUnitTap(val); + }); + }, + ), + itemBuilder: (context) => _list), + ) + ], + ).withBorderedContainer; + } +} + +// todo 'sikander' move these to separate file once usability known +class CommonDropDownView extends StatelessWidget { + final String title; + final String value; + void Function(TapDownDetails details) callback; + final IconData? iconData; + + CommonDropDownView(this.title, this.value, this.callback, {Key? key, this.iconData}) : super(key: key); + + @override + Widget build(BuildContext context) { + return InkWell( + onTapDown: (val) => callback(val), + child: Row( + children: [ + Expanded( + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, + ), + ), + Text( + value, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + ), + ]), + ), + Icon( + iconData ?? Icons.keyboard_arrow_down_sharp, + color: Color(0xff2E303A), + ) + ], + ), + ); + } +} 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 new file mode 100644 index 00000000..79060a2d --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/bmr_calculator/bmr_result_page.dart @@ -0,0 +1,180 @@ +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_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'; + +class BmrResultPage extends StatelessWidget { + final double bmrResult; + final double calories; + + BmrResultPage({required this.bmrResult, required this.calories}); + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).bmr, + body: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Padding( + padding: const EdgeInsets.only(right: 20.0,left: 20,top: 20,bottom: 20), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).calories, + style: TextStyle( + fontSize: 19, + letterSpacing: -1.34, + fontWeight: FontWeight.bold, + ), + ), + mHeight(20), + Center( + child: CircularPercentIndicator( + radius: 120.0, + lineWidth: 3.0, + percent: ((this.bmrResult > 3500) ? 100 : this.bmrResult / 3500), + center: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + bmrResult.toStringAsFixed(1), + style: TextStyle( + fontSize: 17, + letterSpacing: -1.02, + fontWeight: FontWeight.w600, + ), + ), + SizedBox( + height: 5.0, + ), + Text( + TranslationBase.of(context).calories, + style: TextStyle( + fontSize: 18, + letterSpacing: -1.08, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + progressColor: CustomColors.accentColor, + backgroundColor: Colors.white, + ), + ), + mHeight(50), + Text( + TranslationBase.of(context).bodyWillBurn+' ( ${bmrResult.toStringAsFixed(1)} )'+TranslationBase.of(context).caloriesEachDay+'( ${calories.toStringAsFixed(1)} ) '+TranslationBase.of(context).maintainWeight, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.56, + fontWeight: FontWeight.w600, + color: CustomColors.textColor + ), + ), + ], + ).withBorderedContainer, + ), + mFlex(1), + + Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + color: Colors.white, + child: SecondaryButton( + label: TranslationBase.of(context).viewDocList, + color: CustomColors.accentColor, + onTap: () { + getDoctorsList(context); + }, + ), + ), + + ], + ), + ); + } + + getDoctorsList(BuildContext context) { + GifLoaderDialogUtils.showMyDialog(context); + BariatricsService service = new BariatricsService(); + + List doctorsList = []; + List _patientDoctorAppointmentListHospital =[]; + + service.getCalculationDoctors(calculationID: 3).then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res['List_CalculationTable'].length); + if (res['MessageStatus'] == 1) { + if (res['List_CalculationTable'].length != 0) { + res['List_CalculationTable'].forEach((item) { + DoctorList docList = new DoctorList(); + docList.clinicID = item['ClinicID']; + docList.clinicName = item['ClinicName']; + docList.doctorID = item['DoctorID']; + docList.doctorImageURL = item['DoctorImageURL']; + docList.name = item['DoctorName']; + docList.doctorTitle = item['DoctorTitle']; + docList.gender = item['Gender']; + docList.genderDescription = item['GenderDescription']; + docList.nationalityName = item['Nationality']; + docList.nationalityFlagURL = item['NationalityFlagURL']; + docList.projectID = item['ProjectID']; + docList.projectName = item['ProjectName']; + docList.actualDoctorRate = 0; + doctorsList.add(docList); + }); + + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: "0", patientDoctorAppointment: element)); + } + }); + + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))); + } + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} +extension BorderedContainer on Widget { + Widget get withBorderedContainer => Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: this, + ); +} \ No newline at end of file diff --git a/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart new file mode 100644 index 00000000..1d523d55 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart @@ -0,0 +1,741 @@ +import 'dart:math'; + +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.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:flutter/services.dart'; + +import 'body_fat_result_page.dart'; + +const activeCardColorGender = Color(0xffC5272D); +const inactiveCardColorGender = Color(0xffFAFAFd); +const activeCardColor = Color(0xff70777A); +const inactiveCardColor = Color(0xffFAFAFd); + +class BodyFat extends StatefulWidget { + @override + _BodyFatState createState() => _BodyFatState(); +} + +class _BodyFatState extends State { + final GlobalKey clinicDropdownKey = GlobalKey(); + bool _isHeightCM = true; + bool _isNeckKG = true; + bool _isWaistKG = true; + bool _isHipKG = true; + double _heightValue = 0; + double _neckValue = 0; + double _waistValue = 0; + double _hipValue = 0; + + TextEditingController _heightController = TextEditingController(); + TextEditingController _neckController = TextEditingController(); + TextEditingController _waistController = TextEditingController(); + TextEditingController _hipController = TextEditingController(); + + List _heightPopupList = []; + List _neckPopupList = []; + List _waistPopupList = []; + List _hipPopupList = []; + + bool isMale = false; + + // bool isHeightCm = true; + Color maleCard = activeCardColorGender; + Color femaleCard = inactiveCardColorGender; + + // Color neckCmCard = activeCardColor; + // Color neckFtCard = inactiveCardColor; + Color waistCmCard = activeCardColor; + Color waistFtCard = inactiveCardColor; + Color hipCmCard = activeCardColor; + Color hipFtCard = inactiveCardColor; + Color cmCard = activeCardColor; + Color ftCard = inactiveCardColor; + + // int neck = 10; + // int heightCm = 0; + // int heightFt = 0; + // int hip = 5; + double? heightInches; + double? minRange; + double? maxRange; + double? overWeightBy; + + // int waist = 5; + double bodyFat = 0; + double fat = 0; + String? dropdownValue; + double calories = 0; + String textResult = ''; + + @override + void initState() { + _neckController.text = _neckValue.toString(); + _hipController.text = _hipValue.toString(); + _waistController.text = _waistValue.toString(); + _heightController.text = _heightValue.toString(); + super.initState(); + } + + void updateColorHeight(int type) { + //MG/DLT card + if (type == 1) { + if (cmCard == inactiveCardColor) { + cmCard = activeCardColor; + ftCard = inactiveCardColor; + } else { + cmCard = inactiveCardColor; + } + } + if (type == 2) { + if (ftCard == inactiveCardColor) { + ftCard = activeCardColor; + cmCard = inactiveCardColor; + } else { + ftCard = inactiveCardColor; + } + } + } + + void updateColorWaist(int type) { + //MG/DLT card + if (type == 1) { + if (waistCmCard == inactiveCardColor) { + waistCmCard = activeCardColor; + waistFtCard = inactiveCardColor; + } else { + waistCmCard = inactiveCardColor; + } + } + if (type == 2) { + if (waistFtCard == inactiveCardColor) { + waistFtCard = activeCardColor; + waistCmCard = inactiveCardColor; + } else { + waistFtCard = inactiveCardColor; + } + } + } + + void updateColorHip(int type) { + //MG/DLT card + if (type == 1) { + if (hipCmCard == inactiveCardColor) { + hipCmCard = activeCardColor; + hipFtCard = inactiveCardColor; + } else { + hipCmCard = inactiveCardColor; + } + } + if (type == 2) { + if (hipFtCard == inactiveCardColor) { + hipFtCard = activeCardColor; + hipCmCard = inactiveCardColor; + } else { + hipFtCard = inactiveCardColor; + } + } + } + + void updateColor(int type) { + //MG/DLT card + if (type == 1) { + if (maleCard == inactiveCardColorGender) { + maleCard = activeCardColorGender; + femaleCard = inactiveCardColorGender; + } else { + maleCard = inactiveCardColorGender; + } + } + if (type == 2) { + if (femaleCard == inactiveCardColorGender) { + femaleCard = activeCardColorGender; + maleCard = inactiveCardColorGender; + } else { + femaleCard = inactiveCardColorGender; + } + } + } + + void calculateBodyFat() { + if (isMale == true) { + bodyFat = 495 / (1.0324 - 0.19077 * (log(_waistValue - _neckValue) / ln10) + 0.15456 * (log(int.parse(_heightController.text)) / ln10)) - 450; + fat = (bodyFat * 10) / 10.round(); + } else if (isMale == false) { + bodyFat = 495 / (1.29579 - 0.35004 * (log(_waistValue + _hipValue - _neckValue) / ln10) + 0.22100 * (log(int.parse(_heightController.text)) / ln10)) - 450; + fat = (bodyFat * 10) / 10.round(); + } + if (fat <= 0) { + fat = 0; + } + } + + void showTextResult(BuildContext context) { + if (isMale == false) { + if (bodyFat > 9 && bodyFat <= 13) { + textResult = TranslationBase.of(context).essential; + } else if (bodyFat > 13 && bodyFat <= 20) { + textResult = TranslationBase.of(context).athlete; + } else if (bodyFat > 20 && bodyFat <= 24) { + textResult = TranslationBase.of(context).fitness; + } else if (bodyFat > 24 && bodyFat <= 31) { + textResult = TranslationBase.of(context).acceptable; + } else if (bodyFat > 31 && bodyFat <= 60) { + textResult = TranslationBase.of(context).underObese; + } else if (bodyFat > 60) { + textResult = TranslationBase.of(context).crossedLimits; + } else if (bodyFat <= 9) { + textResult = TranslationBase.of(context).lowLimits; + } + } else { + if (bodyFat > 5 && fat <= 13) { + textResult = TranslationBase.of(context).essential; + } else if (bodyFat > 13 && bodyFat <= 17) { + textResult = TranslationBase.of(context).athlete; + } else if (bodyFat > 17 && bodyFat <= 24) { + textResult = TranslationBase.of(context).fitness; + } else if (bodyFat > 24 && bodyFat <= 45) { + textResult = TranslationBase.of(context).underObese; + } else if (bodyFat > 45) { + textResult = TranslationBase.of(context).crossedLimits; + } else if (bodyFat <= 5) { + textResult = TranslationBase.of(context).lowLimits; + } + } + } + + @override + Widget build(BuildContext context) { + _neckPopupList = [ + PopupMenuItem( + child: Text(TranslationBase.of(context).kg), + value: true, + ), + PopupMenuItem( + child: Text( + TranslationBase.of(context).lb, + ), + value: false) + ]; + _heightPopupList = [ + PopupMenuItem( + child: Text(TranslationBase.of(context).cm), + value: true, + ), + PopupMenuItem( + child: Text( + TranslationBase.of(context).ft, + ), + value: false) + ]; + + _waistPopupList = [ + PopupMenuItem( + child: Text(TranslationBase.of(context).kg), + value: true, + ), + PopupMenuItem( + child: Text( + TranslationBase.of(context).lb, + ), + value: false) + ]; + _hipPopupList = [ + PopupMenuItem( + child: Text(TranslationBase.of(context).cm), + value: true, + ), + PopupMenuItem( + child: Text( + TranslationBase.of(context).ft, + ), + value: false) + ]; + + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).bodyFatTitle, + appBarIcons: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 7.0), + child: Icon( + Icons.info_outline, + color: Colors.white, + ), + ) + ], + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Container( + padding: EdgeInsets.all(20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).bodyFatDesc, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + color: CustomColors.textColor, + ), + ), + SizedBox( + height: 20, + ), + Text( + TranslationBase.of(context).selectGender, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + color: CustomColors.textColor, + ), + ), + SizedBox( + height: 8.0, + ), + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(1); + isMale = false; + }); + }, + child: Row( + children: [ + Container( + decoration: containerColorRadiusBorderWidth(Colors.white, 1000, CustomColors.darkGreyColor, 1), + width: 24, + height: 24, + padding: EdgeInsets.all(4), + child: Container( + width: double.infinity, + height: double.infinity, + decoration: containerRadius(!isMale ? CustomColors.accentColor : Colors.white, 100), + ), + ), + mWidth(12), + Text( + TranslationBase.of(context).female, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + ), + ), + ], + ), + ), + ), + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(2); + isMale = true; + }); + }, + child: Row( + children: [ + Container( + decoration: containerColorRadiusBorderWidth(Colors.white, 1000, CustomColors.darkGreyColor, 1), + width: 24, + height: 24, + padding: EdgeInsets.all(4), + child: Container( + width: double.infinity, + height: double.infinity, + decoration: containerRadius(isMale ? CustomColors.accentColor : Colors.white, 100), + ), + ), + mWidth(12), + Text( + TranslationBase.of(context).male, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + ), + ), + ], + ), + ), + ), + ], + ), + ), + SizedBox( + height: 12.0, + ), + _commonInputAndUnitRow( + TranslationBase.of(context).height, + _heightController, + 1, + 270, + _heightValue, + (text) { + _heightController.text = text; + }, + (value) { + _heightValue = value; + }, + _isHeightCM ? TranslationBase.of(context).cm : TranslationBase.of(context).ft, + (value) { + if (_isHeightCM != value) { + setState(() { + _isHeightCM = value; + }); + } + }, + _heightPopupList, + ), + SizedBox( + height: 12.0, + ), + _commonInputAndUnitRow( + TranslationBase.of(context).neck, + _neckController, + 1, + 270, + _neckValue, + (text) { + _neckController.text = text; + }, + (value) { + _neckValue = value; + }, + _isNeckKG ? TranslationBase.of(context).cm : TranslationBase.of(context).ft, + (value) { + if (_isNeckKG != value) { + setState(() { + _isNeckKG = value; + }); + } + }, + _neckPopupList, + ), + SizedBox( + height: 12.0, + ), + _commonInputAndUnitRow( + TranslationBase.of(context).waist, + _waistController, + 1, + 270, + _waistValue, + (text) { + _waistController.text = text; + }, + (value) { + _waistValue = value; + }, + _isWaistKG ? TranslationBase.of(context).cm : TranslationBase.of(context).ft, + (value) { + if (_isWaistKG != value) { + setState(() { + _isWaistKG = value; + }); + } + }, + _waistPopupList, + ), + SizedBox( + height: 12.0, + ), + _commonInputAndUnitRow( + TranslationBase.of(context).hip, + _hipController, + 1, + 270, + _hipValue, + (text) { + _hipController.text = text; + }, + (value) { + _hipValue = value; + }, + _isHipKG ? TranslationBase.of(context).cm : TranslationBase.of(context).ft, + (value) { + if (_isHipKG != value) { + setState(() { + _isHipKG = value; + }); + } + }, + _hipPopupList, + ), + SizedBox( + height: 12.0, + ), + ], + ), + ), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + color: Colors.white, + child: SecondaryButton( + label: TranslationBase.of(context).calculate, + color: CustomColors.accentColor, + onTap: () { + setState(() { + calculateBodyFat(); + showTextResult(context); + + { + Navigator.push( + context, + FadePage( + page: FatResult( + bodyFat: bodyFat, + fat: fat, + textResult: textResult, + )), + ); + } + }); + }, + ), + ), + ], + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.number, + controller: _controller, + onChanged: (value) => {}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + + Widget _commonInputAndUnitRow(_title, _controller, double _minValue, double _maxValue, double _valueOrg, Function(String) onTextValueChange, Function(double) onValueChange, String unitTitle, + Function(bool) onUnitTap, _list) { + return Row( + children: [ + Expanded( + flex: 3, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, + ), + ), + TextField( + controller: _controller, + keyboardType: TextInputType.number, + onChanged: (value) { + double _value = double.parse(value); + if (_value > _maxValue) { + onTextValueChange(_maxValue.toStringAsFixed(0)); + onValueChange(_maxValue); + return; + } else if (_value < _minValue) { + onTextValueChange(_minValue.toStringAsFixed(0)); + onValueChange(_minValue); + return; + } else if (_value >= _minValue && _value <= _maxValue) { + onValueChange(_value); + return; + } + }, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp(r'[0-9]')), + ], + style: TextStyle( + color: Color(0xff575757), + letterSpacing: -0.56, + ), + decoration: InputDecoration( + isDense: true, + hintText: "0", + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + Container(height: 34, width: 1, color: Color(0xffE0E0E0), margin: EdgeInsets.only(left: 12, right: 12)), + Expanded( + flex: 1, + child: PopupMenuButton( + child: CommonDropDownView( + TranslationBase.of(context).unit, + unitTitle, + (val) async { + final RenderBox overlay = Overlay.of(context).context.findRenderObject() as RenderBox; + await showMenu( + context: context, + position: RelativeRect.fromRect(val.globalPosition & const Size(40, 40), Offset.zero & overlay.size), + items: _list, + elevation: 8.0, + ).then((val) { + print(val); + onUnitTap(val); + }); + }, + ), + itemBuilder: (context) => _list, + enabled: true, + ), + ) + ], + ).withBorderedContainer; + } +} + +// todo 'sikander' move these to separate file once usability known +class CommonDropDownView extends StatelessWidget { + final String title; + final String value; + void Function(TapDownDetails details) callback; + final IconData? iconData; + + CommonDropDownView(this.title, this.value, this.callback, {Key? key, this.iconData}) : super(key: key); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTapDown: (val) => callback(val), + child: Row( + children: [ + Expanded( + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, + ), + ), + Text( + value, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + ), + ]), + ), + Icon( + iconData ?? Icons.keyboard_arrow_down_sharp, + color: Color(0xff2E303A), + ) + ], + ), + ); + } +} 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 new file mode 100644 index 00000000..79014ba2 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat_result_page.dart @@ -0,0 +1,177 @@ +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_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'; + +class FatResult extends StatelessWidget { + final double bodyFat; + final double fat; + final String textResult; + + FatResult({required this.bodyFat, required this.fat, this.textResult = ''}); + + Color? inductorColor; + + Color colorInductor() { + if (bodyFat >= 17) { + inductorColor = Color(0xffC70D00); + } else if (bodyFat < 20 && bodyFat >= 24) { + inductorColor = Color(0xffC25400); + } else if (bodyFat < 24 && bodyFat >= 31) { + inductorColor = Color(0xff36D600); + } else if (bodyFat > 45) { + inductorColor = Color(0xff1BE0EE); + } + return inductorColor!; + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).bodyFatTitle, + body: Column( + children: [ + Padding( + padding: const EdgeInsets.all(20.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).bodyFatTitle, + style: TextStyle( + fontSize: 19, + letterSpacing: -1.34, + fontWeight: FontWeight.bold, + ), + ), + mHeight(20), + Center( + child: CircularPercentIndicator( + radius: 220.0, + lineWidth: 3.0, + percent: ((fat > 70) ? 100 : fat / 100), + center: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + fat.toStringAsFixed(1) + '%', + style: TextStyle( + fontSize: 17, + letterSpacing: -1.02, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + progressColor: CustomColors.accentColor, + backgroundColor: Colors.white, + ), + ), + mHeight(20), + Text( + textResult, + style: TextStyle(fontSize: 14, letterSpacing: -0.56, fontWeight: FontWeight.w600, color: CustomColors.textColor), + ), + ], + ).withBorderedContainer, + ), + mFlex(1), + Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + color: Colors.white, + child: SecondaryButton( + label: TranslationBase.of(context).viewDocList, + color: CustomColors.accentColor, + onTap: () { + getDoctorsList(context); + }, + ), + ), + ], + ), + ); + } + + getDoctorsList(BuildContext context) { + GifLoaderDialogUtils.showMyDialog(context); + BariatricsService service = new BariatricsService(); + + List doctorsList = []; + List _patientDoctorAppointmentListHospital = []; + + service.getCalculationDoctors(calculationID: 5).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + if (res['List_CalculationTable'].length != 0) { + res['List_CalculationTable'].forEach((item) { + DoctorList docList = new DoctorList(); + docList.clinicID = item['ClinicID']; + docList.clinicName = item['ClinicName']; + docList.doctorID = item['DoctorID']; + docList.doctorImageURL = item['DoctorImageURL']; + docList.name = item['DoctorName']; + docList.doctorTitle = item['DoctorTitle']; + docList.gender = item['Gender']; + docList.genderDescription = item['GenderDescription']; + docList.nationalityName = item['Nationality']; + docList.nationalityFlagURL = item['NationalityFlagURL']; + docList.projectID = item['ProjectID']; + docList.projectName = item['ProjectName']; + docList.actualDoctorRate = 0; + doctorsList.add(docList); + }); + + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: "0", patientDoctorAppointment: element)); + } + }); + + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))); + } + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} + +extension BorderedContainer on Widget { + Widget get withBorderedContainer => Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: this, + ); +} diff --git a/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart new file mode 100644 index 00000000..6916299c --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart @@ -0,0 +1,633 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_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:flutter/services.dart'; +import 'package:provider/provider.dart'; + +import 'calorie_result_page.dart'; + +const activeCardColorGender = Color(0xffC5272D); +const inactiveCardColorGender = Color(0xffFAFAFd); +const activeCardColor = Color(0xff70777A); +const inactiveCardColor = Color(0xffFAFAFd); + +class CalorieCalculator extends StatefulWidget { + @override + _CalorieCalculatorState createState() => _CalorieCalculatorState(); +} + +class _CalorieCalculatorState extends State { + bool isMale = false; + Color maleCard = activeCardColorGender; + Color femaleCard = inactiveCardColorGender; + + final GlobalKey clinicDropdownKey = GlobalKey(); + bool _isHeightCM = true; + bool _isWeightKG = true; + double _heightValue = 150; + double _weightValue = 40; + + TextEditingController ageController = TextEditingController(); + TextEditingController _heightController = TextEditingController(); + TextEditingController _weightController = TextEditingController(); + + List _heightPopupList = []; + List _weightPopupList = []; + + // int age = 0; + // int height = 0; + // int weight = 0; + double? calories; + String? dropdownValue = ''; + + @override + void initState() { + super.initState(); + } + + void updateColor(int type) { + //MG/DLT card + if (type == 1) { + if (maleCard == inactiveCardColorGender) { + maleCard = activeCardColorGender; + femaleCard = inactiveCardColorGender; + } else { + maleCard = inactiveCardColorGender; + } + } + if (type == 2) { + if (femaleCard == inactiveCardColorGender) { + femaleCard = activeCardColorGender; + maleCard = inactiveCardColorGender; + } else { + femaleCard = inactiveCardColorGender; + } + } + } + + void calculateCalories() { + if (isMale == true && int.parse(ageController.text) <121) { + calories = 66.5 + (13.75 * int.parse(_weightController.text)) + (5.003 * int.parse(_heightController.text)) - (6.755 * int.parse(ageController.text)); + } else if (isMale == false && int.parse(ageController.text) <121) { + calories = 655.0955 + (9.5634 * int.parse(_weightController.text)) + (1.850 * int.parse(_heightController.text)) - (4.676 * int.parse(ageController.text)); + } + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + _weightPopupList = [PopupMenuItem(child: Text(TranslationBase.of(context).kg), value: true), PopupMenuItem(child: Text(TranslationBase.of(context).lb), value: false)]; + _heightPopupList = [PopupMenuItem(child: Text(TranslationBase.of(context).cm), value: true), PopupMenuItem(child: Text(TranslationBase.of(context).ft), value: false)]; + dropdownValue = TranslationBase.of(context).almostInactive; + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: "${TranslationBase.of(context).calories} ${TranslationBase.of(context).calcHealth}", + appBarIcons: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 7.0), + child: Icon( + Icons.info_outline, + color: Colors.black, + ), + ) + ], + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + child: Column( + //mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).calorieCalcDesc, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + color: CustomColors.textColor, + ), + ), + SizedBox( + height: 20, + ), + Text( + TranslationBase.of(context).selectGender, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + color: CustomColors.textColor, + ), + ), + SizedBox( + height: 8.0, + ), + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(1); + isMale = false; + }); + }, + child: Row( + children: [ + Container( + decoration: containerColorRadiusBorderWidth(Colors.white, 1000, CustomColors.darkGreyColor, 1), + width: 24, + height: 24, + padding: EdgeInsets.all(4), + child: Container( + width: double.infinity, + height: double.infinity, + decoration: containerRadius(!isMale ? CustomColors.accentColor : Colors.white, 100), + ), + ), + mWidth(12), + Text( + TranslationBase.of(context).female, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + ), + ), + ], + ), + ), + ), + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(2); + isMale = true; + }); + }, + child: Row( + children: [ + Container( + decoration: containerColorRadiusBorderWidth(Colors.white, 1000, CustomColors.darkGreyColor, 1), + width: 24, + height: 24, + padding: EdgeInsets.all(4), + child: Container( + width: double.infinity, + height: double.infinity, + decoration: containerRadius(isMale ? CustomColors.accentColor : Colors.white, 100), + ), + ), + mWidth(12), + Text( + TranslationBase.of(context).male, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + ), + ), + ], + ), + ), + ), + ], + ), + ), + SizedBox( + height: 12.0, + ), + inputWidget(TranslationBase.of(context).age11_120Years, "0", ageController), + SizedBox( + height: 12.0, + ), + _commonInputAndUnitRow( + TranslationBase.of(context).height, + _heightController, + 1, + 270, + _heightValue, + (text) { + _heightController.text = text; + }, + (value) { + _heightValue = value; + }, + _isHeightCM ? TranslationBase.of(context).cm : TranslationBase.of(context).ft, + (value) { + if (_isHeightCM != value) { + setState(() { + _isHeightCM = value; + }); + } + }, + _heightPopupList, + ), + SizedBox( + height: 12.0, + ), + _commonInputAndUnitRow( + TranslationBase.of(context).weight, + _weightController, + 1, + 270, + _weightValue, + (text) { + _weightController.text = text; + }, + (value) { + _weightValue = value; + }, + _isWeightKG ? TranslationBase.of(context).kg : TranslationBase.of(context).pound, + (value) { + if (_isWeightKG != value) { + setState(() { + _isWeightKG = value; + }); + } + }, + _weightPopupList, + ), + SizedBox( + height: 12.0, + ), + InkWell( + onTap: () { + // dropdownKey.currentState; + openDropdown(clinicDropdownKey); + }, + child: Container( + // width: double.infinity, + // decoration: containerRadius(Colors.white, 12), + // padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).activityLevel, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + value: dropdownValue, + key: clinicDropdownKey, + icon: Icon(Icons.arrow_downward), + iconSize: 0, + elevation: 16, + isExpanded: true, + style: TextStyle(color: Colors.black87), + underline: Container( + height: 2, + color: Colors.black54, + ), + onChanged: (String? newValue) { + setState(() { + dropdownValue = newValue!; + }); + }, + items: [ + TranslationBase.of(context).almostInactive, + TranslationBase.of(context).lightActive, + TranslationBase.of(context).lightActive1, + TranslationBase.of(context).superActive, + ].map>((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ), + ), + ), + ], + ), + ), + Icon(Icons.keyboard_arrow_down), + ], + ), + ).withBorderedContainer, + ), + SizedBox( + height: 25.0, + ), + ], + ), + ), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + color: Colors.white, + child: SecondaryButton( + label: TranslationBase.of(context).calculate, + color: ageController.text.isNotEmpty ? int.parse(ageController.text) >120 ? Colors.grey : CustomColors.accentColor : CustomColors.accentColor, + onTap: () { + if(ageController.text.isNotEmpty && int.parse(ageController.text) <121 && int.parse(_heightController.text)<250 && int.parse(_weightController.text) <200) + setState(() { + + calculateCalories(); + + { + Navigator.push( + context, + FadePage( + page: CalorieResultPage( + calorie: calories!, + )), + ); + } + }); + }, + ), + ), + ], + ), + ); + } + + // void openDropdown(GlobalKey key) { + // GestureDetector detector; + // void searchForGestureDetector(BuildContext element) { + // element.visitChildElements((element) { + // if (element.widget != null && element.widget is GestureDetector) { + // detector = element.widget; + // return false; + // } else { + // searchForGestureDetector(element); + // } + // + // return true; + // }); + // } + // + // searchForGestureDetector(key.currentContext); + // assert(detector != null); + // + // detector.onTap(); + // } + // + + void openDropdown(GlobalKey key) { + GestureDetector? detector; + + void searchForGestureDetector(BuildContext element) { + element.visitChildElements((element) { + if (element.widget != null && element.widget is GestureDetector) { + detector = element.widget as GestureDetector?; + //return false; + } else { + searchForGestureDetector(element); + } + + //return true; + }); + } + + searchForGestureDetector(key.currentContext!); + assert(detector != null); + + detector!.onTap!(); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.number, + controller: _controller, + onChanged: (value) => {}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + + Widget _commonInputAndUnitRow(_title, _controller, double _minValue, double _maxValue, double _valueOrg, Function(String) onTextValueChange, Function(double) onValueChange, String unitTitle, + Function(bool) onUnitTap, _list) { + return Row( + children: [ + Expanded( + flex: 3, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, + ), + ), + TextField( + controller: _controller, + keyboardType: TextInputType.number, + onChanged: (value) { + double _value = double.parse(value); + if (_value > _maxValue) { + onTextValueChange(_maxValue.toStringAsFixed(0)); + onValueChange(_maxValue); + return; + } else if (_value < _minValue) { + onTextValueChange(_minValue.toStringAsFixed(0)); + onValueChange(_minValue); + return; + } else if (_value >= _minValue && _value <= _maxValue) { + onValueChange(_value); + return; + } + }, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp(r'[0-9]')), + ], + style: TextStyle( + color: Color(0xff575757), + letterSpacing: -0.56, + ), + decoration: InputDecoration( + isDense: true, + hintText: "0", + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + Container(height: 34, width: 1, color: Color(0xffE0E0E0), margin: EdgeInsets.only(left: 12, right: 12)), + Expanded( + flex: 1, + child: PopupMenuButton( + child: CommonDropDownView( + TranslationBase.of(context).unit, + unitTitle, + (val) async { + final RenderBox overlay = Overlay.of(context).context.findRenderObject() as RenderBox; + await showMenu( + context: context, + position: RelativeRect.fromRect(val.globalPosition & const Size(40, 40), Offset.zero & overlay.size), + items: _list, + elevation: 8.0, + ).then((val) { + print(val); + onUnitTap(val); + }); + }, + ), + itemBuilder: (context) => _list), + ) + ], + ).withBorderedContainer; + } +} + +// todo 'sikander' move these to separate file once usability known +class CommonDropDownView extends StatelessWidget { + final String title; + final String value; + void Function(TapDownDetails details) callback; + final IconData? iconData; + + CommonDropDownView(this.title, this.value, this.callback, {Key? key, this.iconData}) : super(key: key); + + @override + Widget build(BuildContext context) { + return InkWell( + onTapDown: (val) => callback(val), + child: Row( + children: [ + Expanded( + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, + ), + ), + Text( + value, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + ), + ]), + ), + Icon( + iconData ?? Icons.keyboard_arrow_down_sharp, + color: Color(0xff2E303A), + ) + ], + ), + ); + } +} 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 new file mode 100644 index 00000000..5844b006 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_result_page.dart @@ -0,0 +1,183 @@ +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_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'; + +import '../../../../uitl/app_toast.dart'; + +class CalorieResultPage extends StatelessWidget { + final double calorie; + + CalorieResultPage({required this.calorie}); + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: "${TranslationBase.of(context).calories} ${TranslationBase.of(context).calculators}", + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + body: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(20.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).calories, + style: TextStyle( + fontSize: 19, + letterSpacing: -1.34, + fontWeight: FontWeight.bold, + ), + ), + mHeight(20), + Center( + child: CircularPercentIndicator( + radius: 120.0, + lineWidth: 3.0, + percent: ((this.calorie > 3500) ? 100 : this.calorie / 3500), + center: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + calorie.toStringAsFixed(1), + style: TextStyle( + fontSize: 17, + letterSpacing: -1.02, + fontWeight: FontWeight.w600, + ), + ), + SizedBox( + height: 5.0, + ), + Text( + TranslationBase.of(context).calories, + style: TextStyle( + fontSize: 18, + letterSpacing: -1.08, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + progressColor: CustomColors.accentColor, + backgroundColor: Colors.white, + ), + ), + mHeight(20), + Text( + TranslationBase.of(context).dailyIntake+' ${calorie.toStringAsFixed(1)} '+TranslationBase.of(context).calories, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.56, + fontWeight: FontWeight.w600, + color: CustomColors.textColor + ), + ), + ], + ).withBorderedContainer, + ), + mFlex(1), + Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + color: Colors.white, + child: SecondaryButton( + label: TranslationBase.of(context).viewDocList, + color: CustomColors.accentColor, + onTap: () { + getDoctorsList(context); + }, + ), + ), + + ], + ), + ); + } + + getDoctorsList(BuildContext context) { + GifLoaderDialogUtils.showMyDialog(context); + BariatricsService service = new BariatricsService(); + + List doctorsList = []; + List _patientDoctorAppointmentListHospital =[]; + + service.getCalculationDoctors(calculationID: 2).then((res) { + GifLoaderDialogUtils.hideDialog(context); + + if (res!=null && res['MessageStatus'] == 1) { + if (res['List_CalculationTable'].length != 0) { + res['List_CalculationTable'].forEach((item) { + DoctorList docList = new DoctorList(); + docList.clinicID = item['ClinicID']; + docList.clinicName = item['ClinicName']; + docList.doctorID = item['DoctorID']; + docList.doctorImageURL = item['DoctorImageURL']; + docList.name = item['DoctorName']; + docList.doctorTitle = item['DoctorTitle']; + docList.gender = item['Gender']; + docList.genderDescription = item['GenderDescription']; + docList.nationalityName = item['Nationality']; + docList.nationalityFlagURL = item['NationalityFlagURL']; + docList.projectID = item['ProjectID']; + docList.projectName = item['ProjectName']; + docList.actualDoctorRate = 0; + doctorsList.add(docList); + }); + + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: "0", patientDoctorAppointment: element)); + } + }); + + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))); + } + } + }).catchError((err) { + + AppToast.showErrorToast(message: err); + print(err); + }); + } +} + +extension BorderedContainer on Widget { + Widget get withBorderedContainer => Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: this, + ); +} diff --git a/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart b/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart new file mode 100644 index 00000000..5ee8980f --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart @@ -0,0 +1,404 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.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:flutter/services.dart'; +import 'package:provider/provider.dart'; + +import 'carbs_result_page.dart'; + +class Carbs extends StatefulWidget { + @override + _CarbsState createState() => _CarbsState(); +} + +class _CarbsState extends State { + TextEditingController textController = new TextEditingController(); + final GlobalKey clinicDropdownKey = GlobalKey(); + int? calories; + late String dropdownValue; + bool _visible = false; + int? meals; + int? protein; + int? carbs; + + int? fat; + double? pCal; + double? cCal; + double? fCal; + double? pCalGram; + double? cCalGram; + double? fCalGram; + double? pCalMeal; + double? cCalMeal; + double? fCalMeal; + + void calculateDietRatios() { + if (dropdownValue == TranslationBase.of(context).dietVeryLow) { + meals = 3; + protein = 45; + carbs = 10; + fat = 45; + } else if (dropdownValue == TranslationBase.of(context).dietLow) { + meals = 3; + protein = 40; + carbs = 30; + fat = 30; + } else if (dropdownValue == TranslationBase.of(context).dietModerate) { + meals = 3; + protein = 25; + carbs = 50; + fat = 25; + } else if (dropdownValue == TranslationBase.of(context).dietUSDA) { + meals = 3; + protein = 15; + carbs = 55; + fat = 30; + } else if (dropdownValue == TranslationBase.of(context).dietZone) { + meals = 3; + protein = 30; + carbs = 40; + fat = 30; + } + } + + void calculate() { + pCal = (protein! / 100.0) * int.parse(textController.text).ceil(); + cCal = (carbs! / 100.0) * int.parse(textController.text); + + fCal = (fat! / 100) * int.parse(textController.text); + + pCalGram = pCal! / 4.0; + cCalGram = cCal! / 4.0; + fCalGram = fCal! / 9.0; + pCalMeal = pCalGram! / meals!.ceil(); + cCalMeal = cCalGram! / meals!.ceil(); + fCalMeal = fCalGram! / meals!.ceil(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + dropdownValue = TranslationBase.of(context).dietVeryLow; + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).carbohydrate, + appBarIcons: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 7.0), + child: Icon( + Icons.info_outline, + color: Colors.white, + ), + ) + ], + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Container( + padding: EdgeInsets.all(21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).carbProteinDesc, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + color: CustomColors.textColor, + ), + ), + SizedBox( + height: 15.0, + ), + Column( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + inputWidget(TranslationBase.of(context).calDay, "0", textController), + InkWell( + onTap: () { + Navigator.push( + context, + FadePage(page: CalorieCalculator()), + ); + }, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Text( + TranslationBase.of(context).notSure, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.56, color: CustomColors.accentColor, decoration: TextDecoration.underline), + ), + ), + ) + ], + ), + SizedBox( + height: 12.0, + ), + InkWell( + onTap: () { + // dropdownKey.currentState; + openDropdown(clinicDropdownKey); + }, + child: Container( + // width: double.infinity, + // decoration: containerRadius(Colors.white, 12), + // padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectDiet, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + value: dropdownValue, + key: clinicDropdownKey, + icon: Icon(Icons.arrow_downward), + iconSize: 0, + elevation: 16, + isExpanded: true, + style: TextStyle(color: Colors.black87), + underline: Container( + height: 2, + color: Colors.black54, + ), + onChanged: (String? newValue) { + setState(() { + dropdownValue = newValue!; + calculateDietRatios(); + }); + }, + items: [ + TranslationBase.of(context).dietVeryLow, + TranslationBase.of(context).dietLow, + TranslationBase.of(context).dietModerate, + TranslationBase.of(context).dietUSDA, + TranslationBase.of(context).dietZone + ].map>((String value) { + return DropdownMenuItem( + value: value, + child: Text(value, + style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', fontSize: 11, letterSpacing: -0.44, fontWeight: FontWeight.w600)), + ); + }).toList(), + ), + ), + ), + ], + ), + ), + Icon(Icons.keyboard_arrow_down), + ], + ), + ).withBorderedContainer, + ), + SizedBox( + height: 25.0, + ), + SizedBox( + height: 55.0, + ), + ], + ), + ), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + color: Colors.white, + child: SecondaryButton( + label: TranslationBase.of(context).calculate, + color: CustomColors.accentColor, + onTap: () { + setState(() { + { + calculate(); + Navigator.push( + context, + FadePage( + page: CarbsResult( + cCal: cCal!, + pCal: pCal!, + fCal: fCal!, + pCalGram: pCalGram!, + pCalMeal: pCalMeal!, + fCalGram: fCalGram!, + fCalMeal: fCalMeal!, + cCalGram: cCalGram!, + cCalMeal: cCalMeal!, + )), + ); + } + }); + }, + ), + ), + ], + ), + ); + } + + + void openDropdown(GlobalKey key) { + GestureDetector? detector; + + void searchForGestureDetector(BuildContext element) { + element.visitChildElements((element) { + if (element.widget != null && element.widget is GestureDetector) { + detector = element.widget as GestureDetector?; + //return false; + } else { + searchForGestureDetector(element); + } + + //return true; + }); + } + + searchForGestureDetector(key.currentContext!); + assert(detector != null); + + detector!.onTap!(); + } + + // void openDropdown(GlobalKey key) { + // GestureDetector detector; + // void searchForGestureDetector(BuildContext element) { + // element.visitChildElements((element) { + // if (element.widget != null && element.widget is GestureDetector) { + // detector = element.widget; + // return false; + // } else { + // searchForGestureDetector(element); + // } + // + // return true; + // }); + // } + // + // searchForGestureDetector(key.currentContext); + // assert(detector != null); + // + // detector.onTap(); + // } +} + +Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.number, + controller: _controller, + onChanged: (value) => {}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); +} + +extension BorderedContainer on Widget { + Widget get withBorderedContainer => Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: this, + ); +} diff --git a/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart b/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart new file mode 100644 index 00000000..29257ccc --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/carbs/carbs_result_page.dart @@ -0,0 +1,187 @@ +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_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:flutter/painting.dart'; +import 'package:provider/provider.dart'; + +class CarbsResult extends StatelessWidget { + double pCal; + double cCal; + double fCal; + double pCalGram; + double cCalGram; + double fCalGram; + double pCalMeal; + double cCalMeal; + double fCalMeal; + + CarbsResult({required this.pCal, required this.cCal, required this.fCal, required this.pCalGram, required this.cCalGram, required this.fCalGram, required this.fCalMeal, required this.cCalMeal, required this.pCalMeal}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).carbohydrate, + body: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + decoration: containerRadius(Colors.white, 12), + padding: EdgeInsets.all(12), + margin: EdgeInsets.all(20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).carbsProtin, + style: TextStyle( + fontSize: 19, + fontWeight: FontWeight.bold, + letterSpacing: -1.34, + ), + ), + mHeight(12), + Table( + columnWidths: { + 0: FlexColumnWidth(2.4), + 1: FlexColumnWidth(1.8), + 2: FlexColumnWidth(2), + 3: FlexColumnWidth(1), + }, + children: fullData(context, projectViewModel), + ), + ], + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + color: Colors.white, + child: SecondaryButton( + label: TranslationBase.of(context).seeListOfDoctor, + color: CustomColors.accentColor, + onTap: () { + getDoctorsList(context); + }, + ), + ), + + ], + ), + ); + } + + List fullData(BuildContext context, ProjectViewModel projectViewModel) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).description), + Utils.tableColumnTitle(TranslationBase.of(context).Protein), + Utils.tableColumnTitle(TranslationBase.of(context).carbohydrate), + Utils.tableColumnTitle(TranslationBase.of(context).fat), + ], + ), + ); + + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue(TranslationBase.of(context).calDay, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(pCal.ceil().toString() + ' '+TranslationBase.of(context).Cals, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(cCal.ceil().toString() + ' '+TranslationBase.of(context).Cals, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(cCal.ceil().toString() + ' '+TranslationBase.of(context).Cals, isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue(TranslationBase.of(context).gramsPerDay, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(pCalGram.ceil().toString() + ' '+TranslationBase.of(context).gr, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(cCalGram.ceil().toString() + ' '+TranslationBase.of(context).gr, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(fCalGram.ceil().toString() + ' '+TranslationBase.of(context).gr, isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue(TranslationBase.of(context).gramsPerMeal, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(pCalMeal.ceil().toString() + ' '+TranslationBase.of(context).gr, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(cCalMeal.ceil().toString() + ' '+TranslationBase.of(context).gr, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(fCalMeal.ceil().toString() + ' '+TranslationBase.of(context).gr, isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + return tableRow; + } + + getDoctorsList(BuildContext context) { + GifLoaderDialogUtils.showMyDialog(context); + BariatricsService service = new BariatricsService(); + + List doctorsList = []; + List _patientDoctorAppointmentListHospital =[]; + + service.getCalculationDoctors(calculationID: 11).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + if (res['List_CalculationTable'].length != 0) { + res['List_CalculationTable'].forEach((item) { + DoctorList docList = new DoctorList(); + docList.clinicID = item['ClinicID']; + docList.clinicName = item['ClinicName']; + docList.doctorID = item['DoctorID']; + docList.doctorImageURL = item['DoctorImageURL']; + docList.name = item['DoctorName']; + docList.doctorTitle = item['DoctorTitle']; + docList.gender = item['Gender']; + docList.genderDescription = item['GenderDescription']; + docList.nationalityName = item['Nationality']; + docList.nationalityFlagURL = item['NationalityFlagURL']; + docList.projectID = item['ProjectID']; + docList.projectName = item['ProjectName']; + docList.actualDoctorRate = 0; + doctorsList.add(docList); + }); + + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: "0", patientDoctorAppointment: element)); + } + }); + + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))); + } + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} diff --git a/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due.dart b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due.dart new file mode 100644 index 00000000..d6d5ab8a --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due.dart @@ -0,0 +1,160 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_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:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart'; +import 'package:intl/intl.dart'; + +import 'delivery_due_result_page.dart'; + +class DeliveryDue extends StatefulWidget { + @override + _DeliveryDueState createState() => _DeliveryDueState(); +} + +class _DeliveryDueState extends State { + DateTime bloodSugarDate = DateTime.now(); + DateTime timeSugarDate = DateTime.now(); + var dateFrom = DateTime.now(); + var dateTo = DateTime.now(); + var conceivedDate = DateTime.now(); + var deliveryDue = DateTime.now(); + var firstTrimester = DateTime.now(); + var secondTrimester = DateTime.now(); + var thirdTrimester = DateTime.now(); + var dt = DateTime.now(); + var newFormat = DateFormat("yy-MM-dd"); + + String getDate() { + return "${DateUtil.getMonth(bloodSugarDate.month)} ${bloodSugarDate.day}, ${bloodSugarDate.year}"; + } + + String getTime() { + return " ${timeSugarDate.hour}:${timeSugarDate.minute}"; + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).pregnancyTitle, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Container( + padding: EdgeInsets.symmetric(horizontal: 21.0, vertical: 21.0), + child: Column( + children: [ + Text( + TranslationBase.of(context).pregnancyDesc, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + ), + ), + Divider( + //height: 2, + thickness: 1, + ), + Column( + children: [ + Text( + TranslationBase.of(context).pregnancyDateLabel, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + ), + ), + InkWell( + onTap: () { + DatePicker.showDatePicker( + context, + showTitleActions: true, + minTime: DateTime(DateTime.now().year - 1, 1, 1), + maxTime: DateTime.now(), + onConfirm: (date) { + print('confirm $date'); + setState(() { + bloodSugarDate = date; + dateFrom = date.add(Duration(days: 10)); + + dateTo = date.add(Duration(days: 20)); + conceivedDate = date.add(Duration(days: 14)); + deliveryDue = date.add(Duration(days: 280)); + firstTrimester = date.add(Duration(days: 85)); + secondTrimester = date.add(Duration(days: 190)); + thirdTrimester = date.add(Duration(days: 280)); + }); + }, + currentTime: DateTime.now(), + ); + }, + child: Container( + padding: EdgeInsets.all(12), + margin: EdgeInsets.only(top: 15.0), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Icon(Icons.date_range), + Texts(TranslationBase.of(context).date), + ], + ), + Texts(getDate()), + ], + ), + ), + ), + ], + ), + + ], + ), + ), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + color: Colors.white, + child: SecondaryButton( + label: TranslationBase.of(context).calculate, + color: CustomColors.accentColor, + onTap: () { + setState(() { + { + Navigator.push( + context, + FadePage( + page: DeliveryDueResult( + 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 new file mode 100644 index 00000000..84dc5e5e --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/delivery_due/delivery_due_result_page.dart @@ -0,0 +1,203 @@ +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_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'; + +class DeliveryDueResult extends StatelessWidget { + var dateFrom; + var dateTo; + var conceivedDate; + var deliveryDue; + var firstTrimester; + var secondTrimester; + var thirdTrimester; + + DeliveryDueResult({this.dateFrom, this.dateTo, this.conceivedDate, this.deliveryDue, this.firstTrimester, this.secondTrimester, this.thirdTrimester}); + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).pregnancyTitle, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Container( + padding: EdgeInsets.symmetric(horizontal: 21.0, vertical: 21.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Text( + TranslationBase.of(context).pregnancyTitle, + style: TextStyle( + fontSize: 19, + letterSpacing: -1.14, + fontWeight: FontWeight.w600, + ), + ), + Text( + TranslationBase.of(context).ovulationPeriod, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.56, + fontWeight: FontWeight.w600, + color: CustomColors.textColor, + ), + ), + mHeight(20), + showItem(TranslationBase.of(context).from, DateFormat.yMMMEd().format(dateFrom), titleColor: CustomColors.accentColor), + mHeight(12), + showItem(TranslationBase.of(context).to, DateFormat.yMMMEd().format(dateTo), titleColor: CustomColors.accentColor), + mHeight(12), + mDivider(CustomColors.devider), + mHeight(12), + showItem(TranslationBase.of(context).conceive, DateFormat.yMMMEd().format(conceivedDate)), + mHeight(12), + mDivider(CustomColors.devider), + mHeight(12), + showItem(TranslationBase.of(context).firstTri, DateFormat.yMMMEd().format(firstTrimester)), + mHeight(12), + mDivider(CustomColors.devider), + mHeight(12), + showItem(TranslationBase.of(context).secondTri, DateFormat.yMMMEd().format(secondTrimester)), + mHeight(12), + mDivider(CustomColors.devider), + mHeight(12), + showItem(TranslationBase.of(context).thirdTri, DateFormat.yMMMEd().format(thirdTrimester)), + mHeight(12), + mDivider(CustomColors.devider), + mHeight(12), + ], + ).withBorderedContainer, + ), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + color: Colors.white, + child: SecondaryButton( + label: TranslationBase.of(context).seeDoctorsList, + color: CustomColors.accentColor, + onTap: () { + getDoctorsList(context); + }, + ), + ), + ], + ), + ); + } + + Widget showItem(String title, String value, {Color? titleColor}) { + return Container( + width: double.infinity, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.56, + color: titleColor ?? Colors.black, + fontWeight: FontWeight.w500, + // fontWeight: FontWeight.w600, + ), + ), + Text( + value, + style: TextStyle( + fontSize: 18, + letterSpacing: -1.08, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ); + } + + getDoctorsList(BuildContext context) { + GifLoaderDialogUtils.showMyDialog(context); + BariatricsService service = new BariatricsService(); + + List doctorsList = []; + List _patientDoctorAppointmentListHospital =[]; + + service.getCalculationDoctors(calculationID: 6).then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res['List_CalculationTable'].length); + if (res['MessageStatus'] == 1) { + if (res['List_CalculationTable'].length != 0) { + res['List_CalculationTable'].forEach((item) { + DoctorList docList = new DoctorList(); + docList.clinicID = item['ClinicID']; + docList.clinicName = item['ClinicName']; + docList.doctorID = item['DoctorID']; + docList.doctorImageURL = item['DoctorImageURL']; + docList.name = item['DoctorName']; + docList.doctorTitle = item['DoctorTitle']; + docList.gender = item['Gender']; + docList.genderDescription = item['GenderDescription']; + docList.nationalityName = item['Nationality']; + docList.nationalityFlagURL = item['NationalityFlagURL']; + docList.projectID = item['ProjectID']; + docList.projectName = item['ProjectName']; + docList.actualDoctorRate = 0; + doctorsList.add(docList); + }); + + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: "0", patientDoctorAppointment: element)); + } + }); + + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))); + } + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} + +extension BorderedContainer on Widget { + Widget get withBorderedContainer => Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: this, + ); +} 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..04adcfc1 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/doctor_list.dart @@ -0,0 +1,146 @@ +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/theme/colors.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:flutter_rating_bar/flutter_rating_bar.dart'; + +class DoctorList extends StatelessWidget { + DiseasesByClinic diseaseByClinic; + + DoctorList({Key? key, required 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, + // ), + + // Changed By Aamir + RatingBar( + initialRating: 3, + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + ), + tapOnlyMode: true, + unratedColor: Colors.grey[500], + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + ), + 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.dart b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body.dart new file mode 100644 index 00000000..06b59330 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body.dart @@ -0,0 +1,546 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.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:flutter/services.dart'; + +import 'ideal_body_result_page.dart'; + +const activeCardColor = Color(0xff70777A); +const inactiveCardColor = Color(0xffFAFAFd); + +class IdealBody extends StatefulWidget { + @override + _IdealBodyState createState() => _IdealBodyState(); +} + +class _IdealBodyState extends State { + bool isMale = false; + bool isHeightCm = true; + + Color kgCard = activeCardColor; + Color lbCard = inactiveCardColor; + Color cmCard = activeCardColor; + Color ftCard = inactiveCardColor; + + // int age = 0; + // int height = 0; + double? heightInches; + double? minRange; + double? maxRange; + double? overWeightBy; + int weight = 0; + double idealWeight = 0; + late String dropdownValue; + double calories = 0; + String textResult = ''; + double? maxIdealWeight; + double? heightFeet; + + final GlobalKey clinicDropdownKey = GlobalKey(); + bool _isHeightCM = true; + bool _isWeightKG = true; + double _heightValue = 0; + double _weightValue = 0; + + TextEditingController _heightController = new TextEditingController(); + TextEditingController _weightController = TextEditingController(); + + List _heightPopupList = []; + List _weightPopupList = []; + + void calculateIdealWeight() { + var height = int.parse(_heightController.text); + var weight = double.parse(_weightController.text); + var inchesVal = ((height) * .39370078740157477); + var meters = height / 100; + var feetVal = (inchesVal / 12).floor().round(); + inchesVal = (inchesVal % 12).roundToDouble(); + var kgValue = (weight * 2.2).floor(); + var heightFeet = feetVal; + var heightInches = inchesVal; + weight = kgValue.floorToDouble(); + var idealWeight = (((((heightFeet * 12) + heightInches) - 60) * 6) + 106); + if (dropdownValue == TranslationBase.of(context).smallFinger) { + idealWeight = idealWeight - 10; + } else if (dropdownValue == TranslationBase.of(context).mediumFinger) { + idealWeight = idealWeight; + } else if (dropdownValue == TranslationBase.of(context).largeFinger) { + idealWeight = idealWeight + 10; + } + var maxIdealWeight = (((idealWeight).floorToDouble() * 1.1) * 100).round() / 100; + var overWeightBy = ((weight - double.parse(maxIdealWeight.toString())) * 100).round() / 100; + var difference = (((overWeightBy / 2.2) * 100) / 100).round(); //+ Loc.healthCalPage.IBWKg; Loc.healthCalPage.IBWRange + var minRange = ((idealWeight / 2.2) * 10).round() / 10; + var maxRange = ((maxIdealWeight / 2.2) * 100).round() / 100; //+ //Loc.healthCalPage.IBWKg; + idealWeight = weight / idealWeight; + idealWeight = (idealWeight * 100).round() / 100; + this.overWeightBy = overWeightBy; + this.minRange = minRange; + this.maxRange = maxIdealWeight; + this.idealWeight = idealWeight; + } + + @override + Widget build(BuildContext context) { + dropdownValue = TranslationBase.of(context).mediumFinger; + _weightPopupList = [PopupMenuItem(child: Text(TranslationBase.of(context).kg), value: true), PopupMenuItem(child: Text(TranslationBase.of(context).lb), value: false)]; + _heightPopupList = [PopupMenuItem(child: Text(TranslationBase.of(context).cm), value: true), PopupMenuItem(child: Text(TranslationBase.of(context).ft), value: false)]; + + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).idealBody, + showHomeAppBarIcon: false, + appBarIcons: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 7.0), + child: Icon( + Icons.info_outline, + color: Colors.white, + ), + ) + ], + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Container( + padding: EdgeInsets.all(21), + child: Column( + children: [ + Text( + TranslationBase.of(context).idealBodyWeight, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + color: CustomColors.textColor, + ), + ), + SizedBox( + height: 5.0, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 12.0, + ), + _commonInputAndUnitRow( + TranslationBase.of(context).height, + _heightController, + 1, + 270, + _heightValue, + (text) { + _heightController.text = text; + }, + (value) { + _heightValue = value; + }, + _isHeightCM ? TranslationBase.of(context).cm : TranslationBase.of(context).ft, + (value) { + if (_isHeightCM != value) { + setState(() { + _isHeightCM = value; + }); + } + }, + _heightPopupList, + ), + SizedBox( + height: 12.0, + ), + _commonInputAndUnitRow( + TranslationBase.of(context).weight, + _weightController, + 1, + 270, + _weightValue, + (text) { + _weightController.text = text; + }, + (value) { + _weightValue = value; + }, + _isWeightKG ? TranslationBase.of(context).kg : TranslationBase.of(context).pound, + (value) { + if (_isWeightKG != value) { + setState(() { + _isWeightKG = value; + }); + } + }, + _weightPopupList, + ), + SizedBox( + height: 12.0, + ), + InkWell( + onTap: () { + // dropdownKey.currentState; + openDropdown(clinicDropdownKey); + }, + child: Container( + // width: double.infinity, + // decoration: containerRadius(Colors.white, 12), + // padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).bodyFrameSize, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + value: dropdownValue, + icon: Icon(Icons.arrow_downward), + key: clinicDropdownKey, + iconSize: 0, + elevation: 16, + isExpanded: true, + style: TextStyle(color: Colors.black87), + underline: Container( + height: 2, + color: Colors.black54, + ), + onChanged: (String? newValue) { + setState(() { + dropdownValue = newValue!; + }); + }, + items: [ + TranslationBase.of(context).smallFinger, + TranslationBase.of(context).mediumFinger, + TranslationBase.of(context).largeFinger, + ].map>((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ), + ), + ), + ], + ), + ), + Icon(Icons.keyboard_arrow_down), + ], + ), + ).withBorderedContainer, + ), + ], + ), + ], + ), + ), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + color: Colors.white, + child: SecondaryButton( + label: TranslationBase.of(context).calculate, + color: CustomColors.accentColor, + onTap: () { + setState(() { + calculateIdealWeight(); + { + Navigator.push( + context, + FadePage( + page: IdealBodyResult( + idealBodyWeight: idealWeight, + minRange: minRange!, + mixRange: maxRange!, + overWeightBy: overWeightBy!, + textResult: textResult, + )), + ); + } + }); + }, + ), + ), + ], + ), + ); + } + + void openDropdown(GlobalKey key) { + GestureDetector? detector; + + void searchForGestureDetector(BuildContext element) { + element.visitChildElements((element) { + if (element.widget != null && element.widget is GestureDetector) { + detector = element.widget as GestureDetector?; + //return false; + } else { + searchForGestureDetector(element); + } + + //return true; + }); + } + + searchForGestureDetector(key.currentContext!); + assert(detector != null); + + detector!.onTap!(); + } + + // void openDropdown(GlobalKey key) { + // GestureDetector detector; + // void searchForGestureDetector(BuildContext element) { + // element.visitChildElements((element) { + // if (element.widget != null && element.widget is GestureDetector) { + // detector = element.widget; + // return false; + // } else { + // searchForGestureDetector(element); + // } + // + // return true; + // }); + // } + // + // searchForGestureDetector(key.currentContext); + // assert(detector != null); + // + // detector.onTap(); + // } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.number, + controller: _controller, + onChanged: (value) => {}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + + Widget _commonInputAndUnitRow(_title, _controller, double _minValue, double _maxValue, double _valueOrg, Function(String) onTextValueChange, Function(double) onValueChange, String unitTitle, + Function(bool) onUnitTap, _list) { + return Row( + children: [ + Expanded( + flex: 3, + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, + ), + ), + TextField( + controller: _controller, + keyboardType: TextInputType.number, + onChanged: (value) { + double _value = double.parse(value); + if (_value > _maxValue) { + onTextValueChange(_maxValue.toStringAsFixed(0)); + onValueChange(_maxValue); + return; + } else if (_value < _minValue) { + onTextValueChange(_minValue.toStringAsFixed(0)); + onValueChange(_minValue); + return; + } else if (_value >= _minValue && _value <= _maxValue) { + onValueChange(_value); + return; + } + }, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp(r'[0-9]')), + ], + style: TextStyle( + color: Color(0xff575757), + letterSpacing: -0.56, + ), + decoration: InputDecoration( + isDense: true, + hintText: "0", + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + Container(height: 34, width: 1, color: Color(0xffE0E0E0), margin: EdgeInsets.only(left: 12, right: 12)), + Expanded( + flex: 1, + child: PopupMenuButton( + child: CommonDropDownView( + TranslationBase.of(context).unit, + unitTitle, + (val) async { + final RenderBox overlay = Overlay.of(context).context.findRenderObject() as RenderBox; + await showMenu( + context: context, + position: RelativeRect.fromRect(val.globalPosition & const Size(40, 40), Offset.zero & overlay.size), + items: _list, + elevation: 8.0, + ).then((val) { + print(val); + onUnitTap(val); + }); + }, + ), + itemBuilder: (context) => _list), + ) + ], + ).withBorderedContainer; + } +} + +// todo 'sikander' move these to separate file once usability known +class CommonDropDownView extends StatelessWidget { + final String title; + final String value; + void Function(TapDownDetails details) callback; + final IconData? iconData; + + CommonDropDownView(this.title, this.value, this.callback, {Key? key, this.iconData}) : super(key: key); + + @override + Widget build(BuildContext context) { + return InkWell( + onTapDown: (val) => callback(val), + child: Row( + children: [ + Expanded( + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.44, + ), + ), + Text( + value, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + ), + ]), + ), + Icon( + iconData ?? Icons.keyboard_arrow_down_sharp, + color: Color(0xff2E303A), + ) + ], + ), + ); + } +} 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 new file mode 100644 index 00000000..1fa9d2a9 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/ideal_body/ideal_body_result_page.dart @@ -0,0 +1,288 @@ +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_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'; + +class IdealBodyResult extends StatelessWidget { + final double idealBodyWeight; + final double minRange; + final double mixRange; + final double overWeightBy; + final String textResult; + + IdealBodyResult({required this.idealBodyWeight, required this.minRange, required this.mixRange, required this.overWeightBy, required this.textResult}); + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).idealBody, + body: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: const EdgeInsets.all(20.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).idealWeightRange, + style: TextStyle( + fontSize: 19, + letterSpacing: -1.34, + fontWeight: FontWeight.bold, + ), + ), + mHeight(12), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Row( + children: [ + Texts( + minRange.toStringAsFixed(1), + fontSize: 30.0, + ), + Padding( + padding: EdgeInsets.only(top: 8.0, left: 4.0), + child: Text( + " " + TranslationBase.of(context).kg + " ", + style: TextStyle(color: Colors.red), + ), + ), + ], + ), + Icon( + Icons.arrow_forward, + color: Colors.red, + size: 55.0, + ), + Row( + children: [ + Texts( + (mixRange / 2.2).toStringAsFixed(1), + fontSize: 30.0, + ), + Padding( + padding: EdgeInsets.only(top: 8.0, left: 4.0), + child: Text( + " " + TranslationBase.of(context).kg + " ", + style: TextStyle(color: Colors.red), + ), + ), + ], + ), + ], + ), + mHeight(12), + overWeightBy >= 0 && overWeightBy <= 10 + ? Column( + children: [ + Texts( + TranslationBase.of(context).currentWeightPerfect, + fontSize: 20.0, + ), + ], + ) + : overWeightBy > 10 && overWeightBy < 17 + ? Column( + children: [ + Texts(TranslationBase.of(context).littleBitWeightMore), + Texts(overWeightBy.toStringAsFixed(1)), + Texts(TranslationBase.of(context).consultWithDoctor), + ], + ) + : overWeightBy >= 18 + ? Container( + child: Column( + children: [ + Texts( + TranslationBase.of(context).excessiveObesity, + ), + SizedBox( + height: 12.0, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Texts( + (overWeightBy / 2.2).toStringAsFixed(1), + fontSize: 30.0, + ), + Padding( + padding: EdgeInsets.only(top: 8.0, left: 4.0), + child: Text( + " " + TranslationBase.of(context).kg + " ", + style: TextStyle(color: Colors.red), + ), + ), + ], + ), + SizedBox( + height: 12.0, + ), + Texts(TranslationBase.of(context).mayWish), + ], + ), + ) + : overWeightBy < -18 + ? Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + TranslationBase.of(context).underWeight, + fontSize: 18.0, + ), + ), + SizedBox( + height: 12.0, + ), + Text( + overWeightBy.toStringAsFixed(1), + style: TextStyle( + fontSize: 17, + fontWeight: FontWeight.bold, + letterSpacing: -1.34, + ), + ), + ], + ) + : Container( + child: Column( + children: [ + Text( + TranslationBase.of(context).underWeight, + style: TextStyle( + fontSize: 17, + fontWeight: FontWeight.bold, + letterSpacing: -1.34, + ), + ), + SizedBox( + height: 12.0, + ), + Text( + overWeightBy.toStringAsFixed(1), + style: TextStyle( + fontSize: 17, + fontWeight: FontWeight.bold, + letterSpacing: -1.34, + ), + ), + SizedBox( + height: 12.0, + ), + Texts(TranslationBase.of(context).mayWish), + ], + ), + ), + ], + ).withBorderedContainer, + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + color: Colors.white, + child: SecondaryButton( + label: TranslationBase.of(context).viewDocList, + color: CustomColors.accentColor, + onTap: () { + getDoctorsList(context); + }, + ), + ), + ], + ), + ); + } + + getDoctorsList(BuildContext context) { + GifLoaderDialogUtils.showMyDialog(context); + BariatricsService service = new BariatricsService(); + + List doctorsList = []; + List _patientDoctorAppointmentListHospital = []; + + service.getCalculationDoctors(calculationID: 4).then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res['List_CalculationTable'].length); + if (res['MessageStatus'] == 1) { + if (res['List_CalculationTable'].length != 0) { + res['List_CalculationTable'].forEach((item) { + DoctorList docList = new DoctorList(); + docList.clinicID = item['ClinicID']; + docList.clinicName = item['ClinicName']; + docList.doctorID = item['DoctorID']; + docList.doctorImageURL = item['DoctorImageURL']; + docList.name = item['DoctorName']; + docList.doctorTitle = item['DoctorTitle']; + docList.gender = item['Gender']; + docList.genderDescription = item['GenderDescription']; + docList.nationalityName = item['Nationality']; + docList.nationalityFlagURL = item['NationalityFlagURL']; + docList.projectID = item['ProjectID']; + docList.projectName = item['ProjectName']; + docList.actualDoctorRate = 0; + doctorsList.add(docList); + }); + + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: "0", patientDoctorAppointment: element)); + } + }); + + Navigator.push( + context, + FadePage( + page: SearchResults( + isLiveCareAppointment: false, + doctorsList: doctorsList, + patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, + isDoctorSearchResult: false, + ))); + } + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} + +extension BorderedContainer on Widget { + Widget get withBorderedContainer => Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: this, + ); +} diff --git a/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart new file mode 100644 index 00000000..c1fc6097 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart @@ -0,0 +1,249 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_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:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart'; +import 'package:intl/intl.dart'; +import 'package:jiffy/jiffy.dart'; + +import 'ovulation_result_page.dart'; + +class OvulationPeriod extends StatefulWidget { + @override + _OvulationPeriodState createState() => _OvulationPeriodState(); +} + +class _OvulationPeriodState extends State { + DateTime bloodSugarDate = DateTime.now(); + DateTime timeSugarDate = DateTime.now(); + DateTime selectedDateTime = DateTime.now(); + + // int cycleLength = 0; + // int lutealPhaseLength = 0; + late String selectedDate; + var dateFrom = DateTime.now(); + var babyAgeWeeks; + var babyAgeDays; + var dateTo = DateTime.now(); + var conceivedDate = DateTime.now(); + var deliveryDue = DateTime.now(); + var dt = DateTime.now(); + var newFormat = DateFormat("yy-MM-dd"); + String? updatedDt; + + TextEditingController cycleLengthController = new TextEditingController(); + TextEditingController lutelLengthController = new TextEditingController(); + + String getTime() { + return " ${timeSugarDate.hour}:${timeSugarDate.minute}"; + } + + String getDate() { + return "${DateUtil.getMonth(selectedDateTime.month)} ${selectedDateTime.day}, ${selectedDateTime.year}"; + } + + calculateBabyInformation() { + setState(() { + bloodSugarDate = selectedDateTime; + dateFrom = selectedDateTime.add(Duration(days: 10)); + updatedDt = DateFormat.yMMMEd().format(dateFrom); + dateTo = selectedDateTime.add(Duration(days: 20)); + conceivedDate = selectedDateTime.add(Duration(days: 14)); + deliveryDue = selectedDateTime.add(Duration(days: 280)); + + // babyAge = Jiffy([DateTime.now()]).diff(Jiffy([date]), Units.WEEK); + + babyAgeWeeks = + Jiffy.parseFromList([DateTime.now().year, DateTime.now().month, DateTime.now().day]).diff(Jiffy.parseFromList([selectedDateTime.year, selectedDateTime.month, dateTo.day]), unit: Unit.week); + babyAgeDays = + Jiffy.parseFromList([DateTime.now().year, DateTime.now().month, DateTime.now().day]).diff(Jiffy.parseFromList([selectedDateTime.year, selectedDateTime.month, dateTo.day]), unit: Unit.day); + }); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).ovulation, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Container( + padding: EdgeInsets.all(21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).ovulationDesc, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.54, + color: Colors.black, + fontWeight: FontWeight.w600, + ), + ), + SizedBox( + height: 12.0, + ), + InkWell( + onTap: () { + DatePicker.showDatePicker( + context, + showTitleActions: true, + minTime: DateTime(DateTime.now().year - 1, 1, 1), + maxTime: DateTime.now(), + onConfirm: (date) { + print('confirm $date'); + setState(() { + selectedDateTime = date; + }); + }, + currentTime: DateTime.now(), + ); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(TranslationBase.of(context).date), + Texts(getDate()), + ], + ), + ), + ), + SizedBox( + height: 12.0, + ), + inputWidget(TranslationBase.of(context).cycleLabel, "0", cycleLengthController), + SizedBox( + height: 12.0, + ), + inputWidget(TranslationBase.of(context).lutealLabel, "0", lutelLengthController), + ], + ), + ), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + color: Colors.white, + child: SecondaryButton( + label: TranslationBase.of(context).calculate, + color: CustomColors.accentColor, + onTap: () { + calculateBabyInformation(); + Navigator.push( + context, + FadePage( + page: OvulationResult( + conceivedDate: conceivedDate, + dateFrom: dateFrom, + dateTo: dateTo, + deliveryDue: deliveryDue, + babyAge: babyAgeWeeks, + babyAgeDays: babyAgeDays, + ), + ), + ); + }, + ), + ), + ], + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.number, + controller: _controller, + onChanged: (value) => {}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } +} 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 new file mode 100644 index 00000000..8af51a3d --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_result_page.dart @@ -0,0 +1,213 @@ +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/health-calculator/bariatrics-service.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_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'; + +class OvulationResult extends StatelessWidget { + var dateFrom; + var dateTo; + var conceivedDate; + var deliveryDue; + var babyAge; + var babyAgeDays; + + OvulationResult({ + this.dateFrom, + this.dateTo, + this.deliveryDue, + this.conceivedDate, + this.babyAge, + this.babyAgeDays, + }); + + //var newFormat = DateFormat("yy-MM-dd"); + + @override + Widget build(BuildContext context) { + return AppScaffold( + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).ovulation, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).ovulation, + style: TextStyle( + fontSize: 19, + letterSpacing: -1.14, + fontWeight: FontWeight.w600, + ), + ), + mHeight(20), + Text( + TranslationBase.of(context).ovulationPeriod, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.56, + fontWeight: FontWeight.w600, + color: CustomColors.textColor, + ), + ), + mHeight(20), + showItem(TranslationBase.of(context).from, DateFormat.yMMMEd().format(dateFrom), titleColor: CustomColors.accentColor), + mHeight(12), + showItem(TranslationBase.of(context).to, DateFormat.yMMMEd().format(dateTo), titleColor: CustomColors.accentColor), + mHeight(12), + mDivider(CustomColors.devider), + mHeight(12), + Text( + TranslationBase.of(context).useFullInfo, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.56, + color: CustomColors.accentColor, + fontWeight: FontWeight.w500, + ), + ), + mHeight(12), + showItem(TranslationBase.of(context).conceive, DateFormat.yMMMEd().format(conceivedDate)), + mHeight(12), + mDivider(CustomColors.devider), + mHeight(12), + showItem(TranslationBase.of(context).babyAge, babyAge <= 0 ? TranslationBase.of(context).babyAgeAvail : babyAge.toString() + TranslationBase.of(context).week), + mHeight(12), + mDivider(CustomColors.devider), + mHeight(12), + showItem(TranslationBase.of(context).deliveryDue, DateFormat.yMMMEd().format(deliveryDue)), + ], + ).withBorderedContainer, + ), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), + color: Colors.white, + child: SecondaryButton( + label: TranslationBase.of(context).viewDocList, + color: CustomColors.accentColor, + onTap: () { + getDoctorsList(context); + }, + ), + ), + ], + ), + ); + } + + Widget showItem(String title, String value, {Color? titleColor}) { + return Container( + width: double.infinity, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.56, + color: titleColor ?? Colors.black, + fontWeight: FontWeight.w500, + // fontWeight: FontWeight.w600, + ), + ), + Text( + value, + style: TextStyle( + fontSize: 18, + letterSpacing: -1.08, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ); + } + + getDoctorsList(BuildContext context) { + GifLoaderDialogUtils.showMyDialog(context); + BariatricsService service = new BariatricsService(); + + List doctorsList = []; + List _patientDoctorAppointmentListHospital = []; + + service.getCalculationDoctors(calculationID: 6).then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res['List_CalculationTable'].length); + if (res['MessageStatus'] == 1) { + if (res['List_CalculationTable'].length != 0) { + res['List_CalculationTable'].forEach((item) { + DoctorList docList = new DoctorList(); + docList.clinicID = item['ClinicID']; + docList.clinicName = item['ClinicName']; + docList.doctorID = item['DoctorID']; + docList.doctorImageURL = item['DoctorImageURL']; + docList.name = item['DoctorName']; + docList.doctorTitle = item['DoctorTitle']; + docList.gender = item['Gender']; + docList.genderDescription = item['GenderDescription']; + docList.nationalityName = item['Nationality']; + docList.nationalityFlagURL = item['NationalityFlagURL']; + docList.projectID = item['ProjectID']; + docList.projectName = item['ProjectName']; + docList.actualDoctorRate = 0; + doctorsList.add(docList); + }); + + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: "0", patientDoctorAppointment: element)); + } + }); + + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: doctorsList, patientDoctorAppointmentListHospital: _patientDoctorAppointmentListHospital, isDoctorSearchResult: false,))); + } + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} + +extension BorderedContainer on Widget { + Widget get withBorderedContainer => Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: this, + ); +} diff --git a/lib/pages/AlHabibMedicalService/health_converter.dart b/lib/pages/AlHabibMedicalService/health_converter.dart new file mode 100644 index 00000000..484b81d7 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_converter.dart @@ -0,0 +1,91 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; + +import 'health_converter/blood_cholesterol.dart'; +import 'health_converter/blood_sugar.dart'; +import 'health_converter/triglycerides.dart'; + +class HealthConverter extends StatefulWidget { + @override + _HealthConverterState createState() => _HealthConverterState(); +} + +class _HealthConverterState extends State { + @override + Widget build(BuildContext context) { + List myMedicalList = myOptionsList(context); + + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).converters, + body: Column( + children: [ + Padding( + padding: EdgeInsets.only(left: 12, right: 12, top: 20.0), + child: GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + padding: EdgeInsets.zero, + itemCount: myMedicalList.length, + itemBuilder: (BuildContext context, int index) { + return myMedicalList[index]; + }, + ), + ), + ], + ), + ); + } + + List myOptionsList(BuildContext context) { + List medical =[]; + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: BloodSugar()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).bloodSugar, + imagePath: 'sugar-blood-level.svg', + subTitle: TranslationBase.of(context).sugar, + isPngImage: false, + ), + )); + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: BloodCholesterol()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).bloodCholesterol, + imagePath: 'cholesterol.svg', + subTitle: TranslationBase.of(context).cholesterol, + isPngImage: false, + ), + )); + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: Triglycerides()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).triglycerides, + imagePath: 'fat.svg', + subTitle: TranslationBase.of(context).fatInBlood, + isPngImage: false, + ), + )); + return medical; + } +} diff --git a/lib/pages/AlHabibMedicalService/health_converter/blood_cholesterol.dart b/lib/pages/AlHabibMedicalService/health_converter/blood_cholesterol.dart new file mode 100644 index 00000000..29531d6d --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_converter/blood_cholesterol.dart @@ -0,0 +1,298 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +const activeCardColor = CustomColors.green; +const inactiveCardColor = CustomColors.white; + +class BloodCholesterol extends StatefulWidget { + @override + _BloodCholesterolState createState() => _BloodCholesterolState(); +} + +class _BloodCholesterolState extends State { + Color cardMGColor = inactiveCardColor; + Color cardMMOLColor = inactiveCardColor; + + void updateColor(int type) { + if (type == 1) { + if (cardMGColor == inactiveCardColor) { + cardMGColor = activeCardColor; + cardMMOLColor = inactiveCardColor; + } else { + cardMGColor = inactiveCardColor; + } + } + if (type == 2) { + if (cardMMOLColor == inactiveCardColor) { + cardMMOLColor = activeCardColor; + cardMGColor = inactiveCardColor; + } else { + cardMMOLColor = inactiveCardColor; + } + } + } + + void calculateBloodCholesterol() { + if (cardMGColor == activeCardColor) { + inputValue = double.parse(textController.text); + inputValue = inputValue / conversionConst; + unit = 'mmol/l'; + } else if (cardMMOLColor == activeCardColor) { + inputValue = double.parse(textController.text); + inputValue = inputValue * conversionConst; + unit = 'mg/dlt'; + } + } + + bool _visible = false; + TextEditingController textController = new TextEditingController(); + TextEditingController resultTextController = new TextEditingController(); + late String finalValue; + + double inputValue = 0.0; + late String unit; + double conversionConst = 38.67; + + @override + void initState() { + updateColor(1); + unit = 'mmol/l'; + super.initState(); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).cholesTitle, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + body: Padding( + padding: const EdgeInsets.all(16.0), + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container(child: Text(TranslationBase.of(context).cholesTitle, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text(TranslationBase.of(context).convertCholesterolStatement, style: TextStyle(fontWeight: FontWeight.w600, fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + ), + SizedBox( + height: 13.0, + ), + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(top: 12.0), + child: Text(TranslationBase.of(context).convertFrom, style: TextStyle(fontWeight: FontWeight.w600, fontSize: 16.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + ), + SizedBox( + height: 9.0, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(1); + inputValue = double.parse(textController.text); + inputValue = inputValue / conversionConst; + unit = 'mmol/l'; + }); + }, + child: Container( + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0), + ), + border: Border.all(width: 2, color: cardMGColor), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white, + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text('MG/DLt to MMOL/L', + textAlign: TextAlign.center, style: TextStyle(fontWeight: FontWeight.w600, fontSize: 13.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + ), + ), + ), + ), + SizedBox( + width: 12.0, + ), + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(2); + inputValue = double.parse(textController.text); + inputValue = inputValue * conversionConst; + unit = 'mg/dlt'; + }); + }, + child: Container( + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0), + ), + border: Border.all(width: 2, color: cardMMOLColor), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white, + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text('MMOL/L to MG/DLt', + textAlign: TextAlign.center, style: TextStyle(fontWeight: FontWeight.w600, fontSize: 13.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + ), + ), + ), + ), + ], + ), + ], + ), + ), + SizedBox( + height: 12.0, + ), + inputWidget(TranslationBase.of(context).enterReadingValue, '0.0', textController), + SizedBox( + height: 12.0, + ), + Visibility( + visible: _visible, + child: inputWidget(TranslationBase.of(context).result, inputValue.toStringAsFixed(2) + " " + unit.toString(), resultTextController, isEnable: false), + ), + SizedBox( + height: 15.0, + ), + ], + ), + ), + ), + bottomSheet: Container( + color: CustomColors.white, + padding: EdgeInsets.fromLTRB(12.0, 1.0, 12.0, 25.0), + child: DefaultButton( + TranslationBase.of(context).calculate, + () { + setState(() { + _visible == false ? _visible = !_visible : _visible = _visible; + calculateBloodCholesterol(); + }); + }, + color: CustomColors.green, + ), + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: isEnable ? Colors.white : CustomColors.grey2.withOpacity(0.4), + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.numberWithOptions(decimal: true), + controller: _controller, + onChanged: (value) => {}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + fillColor: CustomColors.accentColor, + hintStyle: TextStyle( + fontSize: isEnable ? 14 : 24, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: isEnable ? Color(0xff575757) : CustomColors.black, + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart b/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart new file mode 100644 index 00000000..bbdb0f73 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart @@ -0,0 +1,315 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +const activeCardColor = CustomColors.green; +const activeTextColor = CustomColors.black; +const inactiveCardColor = CustomColors.white; +const inactiveTextColor = CustomColors.black; + +class BloodSugar extends StatefulWidget { + @override + _BloodSugarState createState() => _BloodSugarState(); +} + +Color? color; + +class _BloodSugarState extends State { + Color cardMGColor = inactiveCardColor; + Color cardMMOLColor = inactiveCardColor; + Color textMGColor = inactiveTextColor; + Color textMMOLColor = inactiveTextColor; + + void updateColor(int type) { + if (type == 1) { + if (cardMGColor == inactiveCardColor) { + cardMGColor = activeCardColor; + cardMMOLColor = inactiveCardColor; + } else { + cardMGColor = inactiveCardColor; + } + textMGColor = activeTextColor; + textMMOLColor = inactiveTextColor; + } + if (type == 2) { + if (cardMMOLColor == inactiveCardColor) { + cardMMOLColor = activeCardColor; + cardMGColor = inactiveCardColor; + } else { + cardMMOLColor = inactiveCardColor; + } + textMGColor = inactiveTextColor; + textMMOLColor = activeTextColor; + } + } + + void calculateBloodSugar() { + if (textController.text.isEmpty) return; + if (cardMGColor == activeCardColor) { + inputValue = double.parse(textController.text); + inputValue = inputValue / 18; + unit = 'mmol/l'; + } else if (cardMMOLColor == activeCardColor) { + inputValue = double.parse(textController.text); + inputValue = inputValue * 18; + unit = 'mg/dlt'; + } + setState(() {}); + } + + bool _visible = false; + TextEditingController textController = new TextEditingController(); + TextEditingController resultTextController = new TextEditingController(); + late String finalValue; + + double inputValue = 0; + late String unit; + + @override + void initState() { + updateColor(1); + unit = 'mmol/l'; + super.initState(); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).bloodSugarConversion, + body: Container( + padding: const EdgeInsets.all(16.0), + child: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container(child: Text(TranslationBase.of(context).bloodSugar, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text(TranslationBase.of(context).convertBloodSugarStatement, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + ), + SizedBox( + height: 12.0, + ), + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(top: 12.0), + child: Text(TranslationBase.of(context).convertFrom, style: TextStyle(fontWeight: FontWeight.w600, fontSize: 16.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + ), + SizedBox( + height: 8.0, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(1); + calculateBloodSugar(); + }); + }, + child: Container( + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0), + ), + border: Border.all(width: 2, color: cardMGColor), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white, + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + 'MG/DLt to MMOL/L', + textAlign: TextAlign.center, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 13.0, letterSpacing: -0.64, color: CustomColors.darkGrey), + ), + ), + ), + ), + ), + SizedBox( + width: 12.0, + ), + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(2); + calculateBloodSugar(); + }); + }, + child: Container( + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0), + ), + border: Border.all(width: 2, color: cardMMOLColor), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white, + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + 'MMOL/L to MG/DLt', + textAlign: TextAlign.center, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 13.0, letterSpacing: -0.64, color: CustomColors.darkGrey), + ), + ), + ), + ), + ), + ], + ), + ], + ), + ), + SizedBox( + height: 12.0, + ), + inputWidget(TranslationBase.of(context).enterReadingValue, '0.0', textController), + SizedBox( + height: 12.0, + ), + Visibility( + visible: _visible, + child: inputWidget(TranslationBase.of(context).result, inputValue.toStringAsFixed(2) + " " + unit.toString(), resultTextController, isEnable: false), + ), + ], + ), + ), + ), + ], + ), + ), + bottomSheet: Container( + color: CustomColors.white, + padding: EdgeInsets.fromLTRB(12.0, 1.0, 12.0, 25.0), + child: DefaultButton( + TranslationBase.of(context).calculate, + () { + setState(() { + _visible == false ? _visible = !_visible : _visible = _visible; + calculateBloodSugar(); + }); + }, + color: CustomColors.green, + ), + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: isEnable ? Colors.white : CustomColors.grey2.withOpacity(0.4), + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.numberWithOptions(decimal: true), + controller: _controller, + onChanged: (value) => {}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + fillColor: CustomColors.accentColor, + hintStyle: TextStyle( + fontSize: isEnable ? 14 : 24, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: isEnable ? Color(0xff575757) : CustomColors.black, + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/health_converter/triglycerides.dart b/lib/pages/AlHabibMedicalService/health_converter/triglycerides.dart new file mode 100644 index 00000000..8fd454e8 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/health_converter/triglycerides.dart @@ -0,0 +1,304 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +const activeCardColor = CustomColors.green; +const inactiveCardColor = CustomColors.white; + +class Triglycerides extends StatefulWidget { + @override + _TriglyceridesState createState() => _TriglyceridesState(); +} + +class _TriglyceridesState extends State { + Color cardMGColor = inactiveCardColor; + Color cardMMOLColor = inactiveCardColor; + late int type; + + void updateColor(type) { + //MG/DLT card + if (type == 1) { + if (cardMGColor == inactiveCardColor) { + cardMGColor = activeCardColor; + cardMMOLColor = inactiveCardColor; + } else { + cardMGColor = inactiveCardColor; + } + } + if (type == 2) { + if (cardMMOLColor == inactiveCardColor) { + cardMMOLColor = activeCardColor; + cardMGColor = inactiveCardColor; + } else { + cardMMOLColor = inactiveCardColor; + } + } + } + + void calculateTriglycerides() { + if (cardMGColor == activeCardColor) { + inputValue = double.parse(textController.text); + inputValue = inputValue / conversionConst; + unit = 'mmol/l'; + } else if (cardMMOLColor == activeCardColor) { + inputValue = double.parse(textController.text); + inputValue = inputValue * conversionConst; + unit = 'mg/dlt'; + } + } + + bool _visible = false; + TextEditingController textController = new TextEditingController(); + TextEditingController resultTextController = new TextEditingController(); + late String finalValue; + + double inputValue = 0.0; + late String unit; + double conversionConst = 88.57; + + @override + void initState() { + updateColor(1); + unit = 'mmol/l'; + super.initState(); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).triglycerides, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + body: Padding( + padding: const EdgeInsets.all(16.0), + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container(child: Text(TranslationBase.of(context).triglycerides, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: + Text(TranslationBase.of(context).triglyceridesConvertStatement, style: TextStyle(fontWeight: FontWeight.w600, fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + ), + SizedBox( + height: 12.0, + ), + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(top: 12.0), + child: Text(TranslationBase.of(context).convertFrom, style: TextStyle(fontWeight: FontWeight.w600, fontSize: 16.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + ), + SizedBox( + height: 9.0, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(1); + inputValue = double.parse(textController.text); + inputValue = inputValue / conversionConst; + unit = 'mmol/l'; + }); + }, + child: Container( + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0), + ), + border: Border.all(width: 2, color: cardMGColor), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white, + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + 'MG/DLt to MMOL/L', + textAlign: TextAlign.center, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 13.0, letterSpacing: -0.64, color: CustomColors.darkGrey), + ), + ), + ), + ), + ), + SizedBox( + width: 12.0, + ), + Expanded( + child: GestureDetector( + onTap: () { + setState(() { + updateColor(2); + inputValue = double.parse(textController.text); + inputValue = inputValue * conversionConst; + unit = 'mg/dlt'; + }); + }, + child: Container( + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0), + ), + border: Border.all(width: 2, color: cardMMOLColor), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white, + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + 'MMOL/L to MG/DLt', + textAlign: TextAlign.center, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 13.0, letterSpacing: -0.64, color: CustomColors.darkGrey), + ), + ), + ), + ), + ), + ], + ), + ], + ), + ), + SizedBox( + height: 12.0, + ), + inputWidget(TranslationBase.of(context).enterReadingValue, "0.0", textController), + SizedBox( + height: 12.0, + ), + Visibility( + visible: _visible, + child: inputWidget(TranslationBase.of(context).result, inputValue.toStringAsFixed(2) + " " + unit.toString(), resultTextController, isEnable: false), + ), + ], + ), + ), + ), + bottomSheet: Container( + color: CustomColors.white, + padding: EdgeInsets.fromLTRB(12.0, 1.0, 12.0, 25.0), + child: DefaultButton( + TranslationBase.of(context).calculate.toUpperCase(), + () { + setState(() { + _visible == false ? _visible = !_visible : _visible = _visible; + calculateTriglycerides(); + }); + }, + color: CustomColors.green, + ), + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: isEnable ? Colors.white : CustomColors.grey2.withOpacity(0.4), + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.numberWithOptions(decimal: true), + controller: _controller, + onChanged: (value) => {}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + fillColor: CustomColors.accentColor, + hintStyle: TextStyle( + fontSize: isEnable ? 14 : 24, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: isEnable ? Color(0xff575757) : CustomColors.black, + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/my_web_view.dart b/lib/pages/AlHabibMedicalService/my_web_view.dart new file mode 100644 index 00000000..bd824cd4 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/my_web_view.dart @@ -0,0 +1,60 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:webview_flutter/webview_flutter.dart'; + +class MyWebView extends StatefulWidget { + final String title; + final String selectedUrl; + + MyWebView({ + required this.title, + required this.selectedUrl, + }); + + @override + State createState() => _MyWebViewState(); +} + +class _MyWebViewState extends State { + // final Completer _controller = Completer(); + late final WebViewController _controller; + + @override + void initState() { + super.initState(); + _controller = WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..setNavigationDelegate( + NavigationDelegate( + onProgress: (int progress) { + // Update loading bar. + }, + onPageStarted: (String url) {}, + onPageFinished: (String url) {}, + onHttpError: (HttpResponseError error) {}, + onWebResourceError: (WebResourceError error) {}, + onNavigationRequest: (NavigationRequest request) { + if (request.url.startsWith('https://www.youtube.com/')) { + return NavigationDecision.prevent; + } + return NavigationDecision.navigate; + }, + ), + ) + ..loadRequest(Uri.parse(widget.selectedUrl)); + } + + @override + Widget build(BuildContext context) { + return AppScaffold(isShowAppBar: true, appBarTitle: widget.title, isShowDecPage: false, showNewAppBar: true, showNewAppBarTitle: true, body: WebViewWidget(controller: _controller) + // WebView( + // initialUrl: widget.selectedUrl, + // javascriptMode: JavascriptMode.unrestricted, + // onWebViewCreated: (WebViewController webViewController) { + // _controller.complete(webViewController); + // }, + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/parking_page.dart b/lib/pages/AlHabibMedicalService/parking_page.dart new file mode 100644 index 00000000..9f2216b5 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/parking_page.dart @@ -0,0 +1,197 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/qr_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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:maps_launcher/maps_launcher.dart'; +import 'package:provider/provider.dart'; + +import '../../d_q_icons_icons.dart'; + +class ParkingPage extends StatelessWidget { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getIsSaveParking(), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: 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 + ? Column( + children: [ + Texts( + TranslationBase.of(context).parkingDescription, + fontWeight: FontWeight.normal, + fontSize: 15, + ), + SizedBox( + height: 12, + ), + Image.asset( + 'assets/images/timeline_bg.png', + width: double.infinity, + ) + ], + ) + : Column( + children: [ + Row( + children: [ + Expanded( + child: Container( + child: Icon(/*Icons.landscape*/ DQIcons.parking_icon, size: 130), + ), + ), + SizedBox( + width: 15, + ), + Expanded( + child: Container( + height: 150, + padding: EdgeInsets.all(8), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Texts(model.qrParkingModel!.parkingDescriptionN), + Divider( + height: 3, + ), + Texts(model.qrParkingModel!.rowDescriptionN) + ], + ), + ), + ), + ], + ), + SizedBox( + height: 15, + ), + Container( + padding: EdgeInsets.all(8), + width: double.infinity, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle), + height: 70, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(TranslationBase.of(context).showMyPark), + Texts(projectViewModel.isArabic ? model.qrParkingModel!.floorDescriptionN : model.qrParkingModel!.floorDescription), + ], + ), + ), + SizedBox( + height: 15, + ), + Container( + decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle), + padding: EdgeInsets.all(8), + width: double.infinity, + height: 70, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(TranslationBase.of(context).gate), + Texts(projectViewModel.isArabic ? model.qrParkingModel!.gateDescriptionN : model.qrParkingModel!.gateDescription), + ], + ), + ), + SizedBox( + height: 15, + ), + Container( + decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle), + padding: EdgeInsets.all(8), + width: double.infinity, + height: 70, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(TranslationBase.of(context).building), + Texts(projectViewModel.isArabic ? model.qrParkingModel!.buildingDescriptionN : model.qrParkingModel!.buildingDescription), + ], + ), + ), + SizedBox( + height: 15, + ), + Container( + padding: EdgeInsets.all(8), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: Colors.white, shape: BoxShape.rectangle), + width: double.infinity, + height: 70, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(TranslationBase.of(context).branch), + Texts(projectViewModel.isArabic ? model.qrParkingModel!.branchDescriptionN : model.qrParkingModel!.branchDescription), + ], + ), + ), + SizedBox( + height: 15, + ), + ], + ), + ), + bottomSheet: !model.isSavePark + ? Container( + color: Theme.of(context).scaffoldBackgroundColor, + height: MediaQuery.of(context).size.height * 0.10, + width: double.infinity, + child: Column( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.9, + child: DefaultButton(TranslationBase.of(context).readBarcode, () => {model.readQr()}), + ), + ], + ), + ) + : Container( + height: MediaQuery.of(context).size.height * 0.15, + width: double.infinity, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.9, + child: DefaultButton( + TranslationBase.of(context).showMyPark, + () => { + MapsLauncher.launchCoordinates( + model.qrParkingModel!.latitude!, + model.qrParkingModel!.longitude!, + ), + }), + ), + SizedBox( + height: 12, + ), + InkWell( + onTap: () => model.clearParking(), + child: Texts( + TranslationBase.of(context).clearMyData, + color: Colors.red, + decoration: TextDecoration.underline, + )) + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/​ health_calculators.dart b/lib/pages/AlHabibMedicalService/​ health_calculators.dart new file mode 100644 index 00000000..1fb64dde --- /dev/null +++ b/lib/pages/AlHabibMedicalService/​ health_calculators.dart @@ -0,0 +1,253 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/body_fat/body_fat.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/calorie_calculator/calorie_calculator.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/carbs/carbs.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_calculator/ovulation_period/ovulation_period.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.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'; + +import 'health_calculator/bmi_calculator/bmi_calculator.dart'; +import 'health_calculator/bmr_calculator/bmr_calculator.dart'; +import 'health_calculator/delivery_due/delivery_due.dart'; +import 'health_calculator/ideal_body/ideal_body.dart'; + +class HealthCalculators extends StatefulWidget { + @override + _HealthCalculatorsState createState() => _HealthCalculatorsState(); +} + +class _HealthCalculatorsState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + } + + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + List generalHealthList = getGeneralHealthList(context); + List womenHealthList = getWomenHealthList(context); + + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).calculators, + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [ + Container( + width: MediaQuery.of(context).size.width * 0.35, + child: Center( + child: Text(TranslationBase.of(context).generalHealth), + ), + ), + Container( + width: MediaQuery.of(context).size.width * 0.35, + child: Center( + child: Text(TranslationBase.of(context).womanHealth), + ), + ), + ], + ), + Expanded( + child: TabBarView( + physics: NeverScrollableScrollPhysics(), + controller: _tabController, + children: [ + Container( + // margin: EdgeInsets.all(20.0), + child: Column( + children: [ + Padding( + padding: EdgeInsets.only(left: 12, right: 12, top: 20.0), + child: GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + padding: EdgeInsets.zero, + itemCount: generalHealthList.length, + itemBuilder: (BuildContext context, int index) { + return generalHealthList[index]; + }, + ), + ), + ], + ), + ), + Container( + // margin: EdgeInsets.all(20.0), + child: Column( + children: [ + Padding( + padding: EdgeInsets.only(left: 12, right: 12, top: 20.0), + child: GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + padding: EdgeInsets.zero, + itemCount: womenHealthList.length, + itemBuilder: (BuildContext context, int index) { + return womenHealthList[index]; + }, + ), + ), + ], + ), + ), + ], + ), + ), + ], + ), + ); + } + + List getGeneralHealthList(BuildContext context) { + List medical =[]; + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: BMICalculator()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).bmi, + imagePath: 'bmi.svg', + subTitle: TranslationBase.of(context).calcHealth, + + ), + )); + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: CalorieCalculator()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).calories, + imagePath: 'calories_calc.svg', + subTitle: TranslationBase.of(context).calcHealth, + + ), + )); + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: BmrCalculator()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).bmr, + imagePath: 'bmr_calc.svg', + subTitle: TranslationBase.of(context).calcHealth, + + ), + )); + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: IdealBody()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).idealBody, + imagePath: 'ideal_weight_calc.svg', + subTitle: TranslationBase.of(context).weight, + + ), + )); + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: BodyFat()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).bodyWord, + imagePath: 'bmr_calc.svg', + subTitle: TranslationBase.of(context).fat, + + ), + )); + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: Carbs()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).carbohydrate, + imagePath: 'carbs_proteitn_fat.svg', + subTitle: TranslationBase.of(context).proteinFat, + + ), + )); + + return medical; + } + + List getWomenHealthList(BuildContext context) { + List medical =[]; + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: OvulationPeriod()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).ovulation, + imagePath: 'ovulation.svg', + subTitle: TranslationBase.of(context).period, + ), + )); + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: DeliveryDue()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).delivery, + imagePath: 'delivery.svg', + subTitle: TranslationBase.of(context).dueDate, + ), + )); + + return medical; + } +} diff --git a/lib/pages/Blood/blood_donation.dart b/lib/pages/Blood/blood_donation.dart new file mode 100644 index 00000000..a3a51207 --- /dev/null +++ b/lib/pages/Blood/blood_donation.dart @@ -0,0 +1,824 @@ +// 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'; +// import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +// import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +// import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart'; +// import 'package:diplomaticquarterapp/pages/Blood/user_agreement_page.dart'; +// import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +// import 'package:diplomaticquarterapp/theme/colors.dart'; +// import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +// import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +// import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +// import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +// import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +// import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +// import 'package:diplomaticquarterapp/widgets/show_zoom_image_dialog.dart'; +// import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +// import 'package:flutter/cupertino.dart'; +// import 'package:flutter/material.dart'; +// import 'package:provider/provider.dart'; +// +// enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } +// enum Gender { Male, Female, NON } +// enum Blood { Oplus, Ominus, Aplus, Aminus, Bplus, Bminus, ABplus, ABminus, NON } +// +// class BloodDonationPage extends StatefulWidget { +// @override +// _BloodDonationPageState createState() => _BloodDonationPageState(); +// } +// +// class _BloodDonationPageState extends State { +// BeneficiaryType beneficiaryType = BeneficiaryType.NON; +// +// CitiesModel _selectedHospital; +// +// int _selectedHospitalIndex = 0; +// int _selectedGenderIndex = 1; +// int _selectedBloodTypeIndex = 0; +// String _selectedBloodType = "O+"; +// +// String amount = ""; +// String email; +// +// List_BloodGroupDetailsModel bloodDetails = List_BloodGroupDetailsModel(bloodGroup: "A-"); +// AppSharedPreferences sharedPref = AppSharedPreferences(); +// var checkedValue = false; +// List imagesInfo = List(); +// +// ProjectViewModel projectProvider; +// +// @override +// void initState() { +// 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'), +// ); +// WidgetsBinding.instance.addPostFrameCallback((_) {}); +// super.initState(); +// } +// +// int getSelectedCityID(MyBalanceViewModel model) { +// int cityID = 1; +// model.CitiesModelList.forEach((element) { +// if (element.description == model.bloodModelList[0].city) { +// cityID = element.iD; +// } +// }); +// return cityID; +// } +// +// @override +// Widget build(BuildContext context) { +// projectProvider = Provider.of(context); +// +// return BaseView( +// onModelReady: (model) => model.getCities().then((value) { +// model.getBlood().then((value) { +// if (model.bloodModelList.length > 0) { +// CitiesModel citiesModel = new CitiesModel(); +// citiesModel.iD = getSelectedCityID(model); +// _selectedHospitalIndex = (citiesModel.iD - 1); +// citiesModel.description = model.CitiesModelList[_selectedHospitalIndex].description; +// citiesModel.descriptionN = model.CitiesModelList[_selectedHospitalIndex].descriptionN; +// _selectedHospital = citiesModel; +// _selectedBloodType = model.bloodModelList[0].bloodGroup; +// _selectedBloodTypeIndex = getBloodIndex(_selectedBloodType); +// } else { +// _selectedHospital = model.CitiesModelList[0]; +// } +// }); +// }), +// // { +// // if (projectProvider.isLogin && projectProvider.user != null) { +// // model.getCities().then((value) { +// // model.getBlood().then((value) { +// // if (model.bloodModelList.length > 0) { +// // CitiesModel citiesModel = new CitiesModel(); +// // citiesModel.iD = getSelectedCityID(model); +// // _selectedHospitalIndex = (citiesModel.iD - 1); +// // citiesModel.description = model.CitiesModelList[_selectedHospitalIndex].description; +// // citiesModel.descriptionN = model.CitiesModelList[_selectedHospitalIndex].descriptionN; +// // _selectedHospital = citiesModel; +// // _selectedBloodType = model.bloodModelList[0].bloodGroup; +// // _selectedBloodTypeIndex = getBloodIndex(_selectedBloodType); +// // } else { +// // _selectedHospital = model.CitiesModelList[0]; +// // } +// // }); +// // }); +// // } +// // }, +// builder: (_, model, w) => AppScaffold( +// isShowAppBar: true, +// showNewAppBar: true, +// backgroundColor: Color(0xffF7F7F7), +// showNewAppBarTitle: true, +// baseViewModel: model, +// isShowDecPage: true, +// imagesInfo: imagesInfo, +// description: TranslationBase.of(context).bloodDonationInfo, +// appBarTitle: TranslationBase.of(context).bloodD, +// body: Column( +// children: [ +// Expanded( +// child: SingleChildScrollView( +// physics: BouncingScrollPhysics(), +// padding: EdgeInsets.all(21), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// TranslationBase.of(context).bloodDEnterDesc, +// style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), +// ), +// SizedBox(height: 12), +// if (projectProvider.isLogin && model.state != ViewState.Busy) +// +// CommonDropDownView( +// TranslationBase.of(context).city, +// model.CitiesModelList.isNotEmpty +// ? projectProvider.isArabic +// ? model.CitiesModelList[_selectedHospitalIndex].descriptionN +// : model.CitiesModelList[_selectedHospitalIndex].description +// : "", () { +// List list = [ +// for (int i = 0; i < model.CitiesModelList.length; i++) +// RadioSelectionDialogModel(projectProvider.isArabic ? model.CitiesModelList[i].descriptionN : model.CitiesModelList[i].description, i), +// ]; +// +// showDialog( +// context: context, +// builder: (cxt) => RadioSelectionDialog( +// listData: list, +// selectedIndex: _selectedHospitalIndex, +// isScrollable: true, +// onValueSelected: (index) { +// _selectedHospitalIndex = index; +// _selectedHospital = model.CitiesModelList[index]; +// setState(() {}); +// }, +// ), +// ); +// }).withBorderedContainer, +// SizedBox(height: 12), +// CommonDropDownView(TranslationBase.of(context).gender, _selectedGenderIndex == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female, () { +// List list = [ +// RadioSelectionDialogModel(TranslationBase.of(context).male, 1), +// RadioSelectionDialogModel(TranslationBase.of(context).female, 2), +// ]; +// +// showDialog( +// context: context, +// builder: (cxt) => RadioSelectionDialog( +// listData: list, +// selectedIndex: _selectedGenderIndex, +// onValueSelected: (index) { +// _selectedGenderIndex = index; +// setState(() {}); +// }, +// ), +// ); +// }).withBorderedContainer, +// SizedBox(height: 12), +// CommonDropDownView(TranslationBase.of(context).bloodType, _selectedBloodType, () { +// List list = [ +// RadioSelectionDialogModel("O+", 0), +// RadioSelectionDialogModel("O-", 1), +// RadioSelectionDialogModel("AB+", 2), +// RadioSelectionDialogModel("AB-", 3), +// RadioSelectionDialogModel("A+", 4), +// RadioSelectionDialogModel("A-", 5), +// RadioSelectionDialogModel("B+", 6), +// RadioSelectionDialogModel("B-", 7), +// ]; +// +// showDialog( +// context: context, +// builder: (cxt) => RadioSelectionDialog( +// listData: list, +// selectedIndex: _selectedBloodTypeIndex, +// isScrollable: true, +// onValueSelected: (index) { +// _selectedBloodTypeIndex = index; +// _selectedBloodType = getBlood(index); +// setState(() {}); +// }, +// ), +// ); +// }).withBorderedContainer, +// SizedBox(height: 12), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Text( +// TranslationBase.of(context).viewTermsConditions + ":", +// style: TextStyle(fontWeight: FontWeight.w600, color: Color(0xff2E303A), fontSize: 14, letterSpacing: -0.56), +// ), +// InkWell( +// onTap: () { +// Navigator.of(context).push(FadePage(page: UserAgreementPage())); +// }, +// child: Text( +// TranslationBase.of(context).clickHere, +// style: TextStyle(fontWeight: FontWeight.w600, color: Colors.blue, fontSize: 14, letterSpacing: -0.56), +// ), +// ) +// ], +// ), +// SizedBox(height: 12), +// Row( +// children: [ +// Checkbox( +// onChanged: (bool value) { +// setState(() { +// checkedValue = value; +// }); +// }, +// value: checkedValue, +// activeColor: Color(0xFFc5272d), +// ), +// Text( +// TranslationBase.of(context).iAgreeToTheTermsAndConditions, +// style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold), +// ), +// ], +// ), +// SizedBox( +// height: 10, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.center, +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// Center( +// child: Container( +// color: Theme.of(context).primaryColor, +// width: 350, +// child: InkWell( +// onTap: () { +// showZoomImageDialog(context, 'assets/images/BloodChrt_EN.png', isNetworkImage: false); +// }, +// child: Container(width: 250, height: 200, child: Image.asset('assets/images/BloodChrt_EN.png'), color: Colors.white), +// ), +// ), +// ), +// ], +// ), +// SizedBox( +// height: MediaQuery.of(context).size.height * 0.15, +// ) +// ], +// ), +// ), +// ), +// DefaultButton( +// TranslationBase.of(context).save, +// checkedValue +// ? () async { +// if (_selectedHospital == null) { +// AppToast.showErrorToast(message: TranslationBase.of(context).selectCity); +// return; +// } +// bloodDetails.city = _selectedHospital.description; +// bloodDetails.cityCode = _selectedHospital.iD.toString(); +// bloodDetails.gender = _selectedGenderIndex; +// bloodDetails.bloodGroup = getBlood(_selectedBloodTypeIndex); +// await model.updateBloodGroup(bloodDetails); +// if (model.state == ViewState.Idle) { +// AppToast.showSuccessToast(message: model.updatedRegisterBloodMessage); +// } else { +// AppToast.showErrorToast(message: model.error); +// } +// } +// : null, +// disabledColor: CustomColors.grey2, +// ).insideContainer +// ], +// ), +// ), +// ); +// } +// +// String getBlood(int index) { +// switch (index) { +// case 0: +// return "O+"; +// break; +// case 1: +// return "O-"; +// break; +// case 2: +// return "AB+"; +// break; +// case 3: +// return "AB-"; +// break; +// case 4: +// return "A+"; +// break; +// case 5: +// return "A-"; +// break; +// case 6: +// return "B-"; +// break; +// case 7: +// return "B-"; +// break; +// case 8: +// return "B+"; +// break; +// +// default: +// return ""; +// } +// } +// +// int getBloodIndex(String type) { +// switch (type) { +// case "O+": +// return 0; +// break; +// case "O-": +// return 1; +// break; +// case "AB+": +// return 2; +// break; +// case "AB-": +// return 3; +// break; +// case "A+": +// return 4; +// break; +// case "A-": +// return 5; +// break; +// case "B-": +// return 6; +// break; +// case "B-": +// return 7; +// break; +// case "B+": +// return 8; +// break; +// +// default: +// return 0; +// } +// } +// +// String getHospitalName(ProjectViewModel projectProvider, BuildContext context) { +// if (_selectedHospital != null) +// return projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description; +// else +// return TranslationBase.of(context).selectCity; +// } +// } +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'; +import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart'; +import 'package:diplomaticquarterapp/pages/Blood/blood_donation_book_appointment.dart'; +import 'package:diplomaticquarterapp/pages/Blood/user_agreement_page.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/show_zoom_image_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } + +enum Gender { Male, Female, NON } + +enum Blood { Oplus, Ominus, Aplus, Aminus, Bplus, Bminus, ABplus, ABminus, NON } + +class BloodDonationPage extends StatefulWidget { + @override + _BloodDonationPageState createState() => _BloodDonationPageState(); +} + +class _BloodDonationPageState extends State { + BeneficiaryType beneficiaryType = BeneficiaryType.NON; + + late CitiesModel _selectedHospital; + + int _selectedHospitalIndex = 0; + int _selectedGenderIndex = 1; + int _selectedBloodTypeIndex = 0; + String _selectedBloodType = "O+"; + + String amount = ""; + String? email; + + List_BloodGroupDetailsModel bloodDetails = List_BloodGroupDetailsModel(bloodGroup: "A-"); + AppSharedPreferences sharedPref = AppSharedPreferences(); + var checkedValue = false; + List imagesInfo = []; + + late ProjectViewModel projectProvider; + + @override + void initState() { + 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'), + ); + WidgetsBinding.instance.addPostFrameCallback((_) {}); + super.initState(); + } + + int getSelectedCityID(MyBalanceViewModel model) { + int cityID = 1; + model.CitiesModelList.forEach((element) { + if (element.description == model.bloodModelList[0].city) { + cityID = element.iD!; + } + }); + return cityID; + } + + @override + Widget build(BuildContext context) { + projectProvider = Provider.of(context); + + return BaseView( + onModelReady: (model) => model.getCities().then((value) { + model.getBlood().then((value) { + if (model.bloodModelList.length > 0) { + CitiesModel citiesModel = new CitiesModel(); + citiesModel.iD = getSelectedCityID(model); + _selectedHospitalIndex = (citiesModel.iD! - 1); + citiesModel.description = model.CitiesModelList[_selectedHospitalIndex].description; + citiesModel.descriptionN = model.CitiesModelList[_selectedHospitalIndex].descriptionN; + _selectedHospital = citiesModel; + _selectedBloodType = model.bloodModelList[0].bloodGroup!; + _selectedBloodTypeIndex = getBloodIndex(_selectedBloodType); + } else { + _selectedHospital = model.CitiesModelList[0]; + } + }); + }), + // { + // if (projectProvider.isLogin && projectProvider.user != null) { + // model.getCities().then((value) { + // model.getBlood().then((value) { + // if (model.bloodModelList.length > 0) { + // CitiesModel citiesModel = new CitiesModel(); + // citiesModel.iD = getSelectedCityID(model); + // _selectedHospitalIndex = (citiesModel.iD - 1); + // citiesModel.description = model.CitiesModelList[_selectedHospitalIndex].description; + // citiesModel.descriptionN = model.CitiesModelList[_selectedHospitalIndex].descriptionN; + // _selectedHospital = citiesModel; + // _selectedBloodType = model.bloodModelList[0].bloodGroup; + // _selectedBloodTypeIndex = getBloodIndex(_selectedBloodType); + // } else { + // _selectedHospital = model.CitiesModelList[0]; + // } + // }); + // }); + // } + // }, + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + backgroundColor: Color(0xffF7F7F7), + showNewAppBarTitle: true, + baseViewModel: model, + isShowDecPage: true, + imagesInfo: imagesInfo, + description: TranslationBase.of(context).bloodDonationInfo, + appBarTitle: TranslationBase.of(context).bloodD, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).bloodDEnterDesc, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), + ), + SizedBox(height: 12), + if (projectProvider.isLogin && model.state != ViewState.Busy) + CommonDropDownView( + TranslationBase.of(context).city, + model.CitiesModelList!.isNotEmpty + ? projectProvider.isArabic! + ? model.CitiesModelList[_selectedHospitalIndex].descriptionN! + : model.CitiesModelList[_selectedHospitalIndex].description! + : "", () { + List list = [ + for (int i = 0; i < model.CitiesModelList.length; i++) + RadioSelectionDialogModel(projectProvider.isArabic! ? model.CitiesModelList[i].descriptionN! : model.CitiesModelList[i].description!, i), + ]; + + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: _selectedHospitalIndex, + isScrollable: true, + onValueSelected: (index) { + _selectedHospitalIndex = index; + _selectedHospital = model.CitiesModelList[index]; + setState(() {}); + }, + ), + ); + }).withBorderedContainer, + SizedBox(height: 12), + CommonDropDownView(TranslationBase.of(context).gender, _selectedGenderIndex == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female, () { + List list = [ + RadioSelectionDialogModel(TranslationBase.of(context).male, 1), + RadioSelectionDialogModel(TranslationBase.of(context).female, 2), + ]; + + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: _selectedGenderIndex, + onValueSelected: (index) { + _selectedGenderIndex = index; + setState(() {}); + }, + ), + ); + }).withBorderedContainer, + SizedBox(height: 12), + CommonDropDownView(TranslationBase.of(context).bloodType, _selectedBloodType, () { + List list = [ + RadioSelectionDialogModel("O+", 0), + RadioSelectionDialogModel("O-", 1), + RadioSelectionDialogModel("AB+", 2), + RadioSelectionDialogModel("AB-", 3), + RadioSelectionDialogModel("A+", 4), + RadioSelectionDialogModel("A-", 5), + RadioSelectionDialogModel("B+", 6), + RadioSelectionDialogModel("B-", 7), + ]; + + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: _selectedBloodTypeIndex, + isScrollable: true, + onValueSelected: (index) { + _selectedBloodTypeIndex = index; + _selectedBloodType = getBlood(index); + setState(() {}); + }, + ), + ); + }).withBorderedContainer, + SizedBox(height: 12), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).viewTermsConditions + ":", + style: TextStyle(fontWeight: FontWeight.w600, color: Color(0xff2E303A), fontSize: 14, letterSpacing: -0.56), + ), + InkWell( + onTap: () { + Navigator.of(context).push(FadePage(page: UserAgreementPage())); + }, + child: Text( + TranslationBase.of(context).clickHere, + style: TextStyle(fontWeight: FontWeight.w600, color: Colors.blue, fontSize: 14, letterSpacing: -0.56), + ), + ) + ], + ), + SizedBox(height: 12), + Row( + children: [ + Checkbox( + onChanged: (bool? value) { + setState(() { + checkedValue = value!; + }); + }, + value: checkedValue, + activeColor: Color(0xFFc5272d), + ), + Text( + TranslationBase.of(context).iAgreeToTheTermsAndConditions, + style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold), + ), + ], + ), + SizedBox( + height: 10, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Center( + child: Container( + color: Theme.of(context).primaryColor, + width: 350, + child: InkWell( + onTap: () { + showZoomImageDialog(context, 'assets/images/BloodChrt_EN.png', isNetworkImage: false); + }, + child: Container(width: 250, height: 200, child: Image.asset('assets/images/BloodChrt_EN.png'), color: Colors.white), + ), + ), + ), + ], + ), + SizedBox( + height: MediaQuery.of(context).size.height * 0.15, + ) + ], + ), + ), + ), + Container( + color: CustomColors.appBackgroudGreyColor, + margin: EdgeInsets.all(14), + height: 45.0, + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.green, + elevation: 0, + onPressed: () { + Navigator.push(context, FadePage(page: BloodDonationBookAppointment())); + }, + child: Text(TranslationBase.of(context).bookAppo.toUpperCase(), + style: TextStyle( + fontSize: 16.0, + color: Colors.white, + )), + ), + ), + ), + mWidth(7), + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: Color(0xffc5272d), + elevation: 0, + onPressed: () async { + if (_selectedHospital == null) { + AppToast.showErrorToast(message: TranslationBase.of(context).selectCity); + return; + } + bloodDetails.city = _selectedHospital.description; + bloodDetails.cityCode = _selectedHospital.iD.toString(); + bloodDetails.gender = _selectedGenderIndex; + bloodDetails.bloodGroup = getBlood(_selectedBloodTypeIndex); + await model.updateBloodGroup(bloodDetails); + if (model.state == ViewState.Idle) { + AppToast.showSuccessToast(message: model.updatedRegisterBloodMessage); + } else { + AppToast.showErrorToast(message: model.error); + } + }, + child: Text(TranslationBase.of(context).save.toUpperCase(), style: TextStyle(fontSize: 16.0, color: Colors.white)), + ), + ), + ), + ], + ), + ), + // DefaultButton( + // TranslationBase.of(context).save, + // checkedValue + // ? () async { + // if (_selectedHospital == null) { + // AppToast.showErrorToast(message: TranslationBase.of(context).selectCity); + // return; + // } + // bloodDetails.city = _selectedHospital.description; + // bloodDetails.cityCode = _selectedHospital.iD.toString(); + // bloodDetails.gender = _selectedGenderIndex; + // bloodDetails.bloodGroup = getBlood(_selectedBloodTypeIndex); + // await model.updateBloodGroup(bloodDetails); + // if (model.state == ViewState.Idle) { + // AppToast.showSuccessToast(message: model.updatedRegisterBloodMessage); + // } else { + // AppToast.showErrorToast(message: model.error); + // } + // } + // : null, + // disabledColor: CustomColors.grey2, + // ).insideContainer + ], + ), + ), + ); + } + + String getBlood(int index) { + switch (index) { + case 0: + return "O+"; + break; + case 1: + return "O-"; + break; + case 2: + return "AB+"; + break; + case 3: + return "AB-"; + break; + case 4: + return "A+"; + break; + case 5: + return "A-"; + break; + case 6: + return "B-"; + break; + case 7: + return "B-"; + break; + case 8: + return "B+"; + break; + + default: + return ""; + } + } + + int getBloodIndex(String type) { + switch (type) { + case "O+": + return 0; + break; + case "O-": + return 1; + break; + case "AB+": + return 2; + break; + case "AB-": + return 3; + break; + case "A+": + return 4; + break; + case "A-": + return 5; + break; + case "B-": + return 6; + break; + case "B-": + return 7; + break; + case "B+": + return 8; + break; + + default: + return 0; + } + } + + String getHospitalName(ProjectViewModel projectProvider, BuildContext context) { + if (_selectedHospital != null) + return projectProvider.isArabic ? _selectedHospital.descriptionN! : _selectedHospital.description!; + else + return TranslationBase.of(context).selectCity; + } +} diff --git a/lib/pages/Blood/blood_donation_appointment_terms_conditions.dart b/lib/pages/Blood/blood_donation_appointment_terms_conditions.dart new file mode 100644 index 00000000..14c49722 --- /dev/null +++ b/lib/pages/Blood/blood_donation_appointment_terms_conditions.dart @@ -0,0 +1,43 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_html/flutter_html.dart'; +import 'package:provider/provider.dart'; + +class BloodDonationAppointmentTermsConditions extends StatelessWidget { + String contentEN = + ' DONOR EDUCATION

                                 

DONOR EDUCATION

Why Should I Give Blood?

Because You Can Make a Difference!

Learning more about blood donation and knowing

DEAR DONOR:

This information sheet explains how YOU can help us make the donation process safe for yourself and patients who might receive your blood.

 

PLEASE READ THIS INFORMATION BEFORE YOU DONATE!

ACCURACY & HONESTY ARE ESSENTIAL!

Your complete honesty in answering all questions is very important for the safety of patients who receive your blood. All information you provide is confidential.

 

DONATION RISKS (These are not common 1-2%) Some of the risks and/or problems associated with donating include: dizziness or lightheadedness, nausea and/or vomiting, rapid pulse rate, Itching at the site from an allergy to iodine, bruising (hematoma), pain at the site.

 

  1. DONOR ELIGIBILITY

YOU MAY DONATE :

  1.          If  you are 18 years old or older (17 with parental permission) and weigh at least 110 pounds (50 kg)
  2.          If  you are in good health
  3.          Have not donated whole blood in the past 8 weeks
  4.          Have not donated double red cells in the past 16 weeks

YOU MAY NOT DONATE IF YOU:

  1.          Have had AIDS or a Positive HIV test
  2.          Have participated in activities that put you at risk for acquiring AIDS.

 

Why we ask questions about sexual contact (as required by federal regulations)

Sexual contact may cause contagious diseases like HIV to get into the blood stream and be spread through transfusions to someone else.

PLEASE DO NOT DONATE TO GET AN HIV TEST DONE

  1. DONATION PROCESS
  1.       Registration: PHOTO ID must be presented prior to donation to identify you at every donation.
  2.       Interview: to determine if you are all right to donate we will:
  • Ask questions about health, travel and medicines.
  • Ask questions to see if you might be at risk for hepatitis, HIV or AIDS
  1.       Mini-physical Examination
  • Take your blood pressure, pulse, temperature, weight.
  • Take a small blood sample to make sure your Hemoglobin level is normal.
  1.      Phlebotomy
  • You will be seated in a donor chair, a tourniquet will be applied to your arm, and a suitable vein located.
  • The site will be cleaned with an antiseptic
  • A sterile needle will be gently inserted into your vein and the blood will be collected in a sterile bag for 5-15 minutes
  • After donation, a pressure bandage will be applied to the site and you may rest and enjoy some refreshments.

 

WHAT HAPPENS AFTER YOUR DONATION?

 

  1. Your blood is tested for: HepatitisB and C, HIV, HTLV (associated with a virus that causes    leukemia), Syphilis, Malaria, Sickling and Blood Type.
  2. There are certain conditions like in Emergency situation; there is a chance that your unit is released without completion of infectious disease testing.
  3. If your blood tests Positive it will not be given to a patient. Your blood will be discarded.
  4. You will be notified about test results that may disqualify you from donating in the future. Since confirmatory tests are necessary, it may take up few days before notification.
  5. If your blood tests Positive, your name will be put on a confidential list of Deferred Donors. When required, Blood Bank will report your donor information, including test result, to health departments and regulatory agencies as required by law.
  6. To ensure confidentiality, NO test results (including blood type) will be given by phone. Written approval from you will be required before test results are released.

 

CARE AFTER DONATING

 

When you donate blood, your body needs a few minutes to adjust to the slight change in blood fluid volume. It is important to follow these instructions:

  1. Remain lying on the donor chair until a staff member releases you to the refreshment area.
  2. Remain in the refreshment area for at least 10 minutes. Enjoy juice and a snack. If you cannot stay, please notify donor room staff.
  3. Drink more fluid than usual and eat heartily for today.
  4. Avoid smoking for 2 hours
  5. Refrain from strenuous exercise for 24 hours. If safety risks are a normal part of your routine, ask a donor room staff member how long you should wait before resuming regular activities.
  6. If you become light-headed or dizzy, lie down until the feeling disappears. If the feeling continues, contact Blood Bank or your physician.
  7. Leave your bandage in place for 4 to 5 hours. This will help to prevent bruising. If your arm starts bleeding again, apply direct pressure and elevate your arm.
  8. Make sure you’re eating a nutritious, well-balance diet containing foods rich in iron and high in vitamin C.
  9. However, if you are a frequent donor, iron rich foods in your diet may not be enough to replenish the iron you routinely lose through blood donations. We recommend you to consult with your health-care provider to see if taking an iron supplement is right for you.

 

If after donating, you realize that you should not have donated because of previous Risk Factors, behaviors, or diseases, YOUR BLOOD MUST NOT BE USED FOR TRANSFUSION!

PLEASE CONTACT Blood Bank IMMEDIATELY.

 

 

 

If you become ill within the next 72 hours, or think of any reason your blood should not be transfused, Please call Blood Bank at +966-11-4833672 or Ext 3662.

 

 

 

 

THANK YOU FOR GIVING

THE GIFT OF LIFE!

 

 

 

BB Form 091 - Donor Education Material (English)          HMG/QID/1892

'; + + String contentAR = + '

ﺗﺜﻘﯿﻒ اﻟﻤﺘﺒﺮع

لماذا علي أن أتبرع بالدم؟ أنك تستطیع أن تحدث فرق تعلم أكثر عن التبرع بالدم


ﻣﺎذا ﯾﺤﺪث ﺑﻌﺪ اﻟﺘﺒﺮع ﺑﺎﻟﺪم؟

-1 ﯾﺘﻢ ﻓﺤﺺ اﻻﯾﺪز ، ﻓﯿﺮوس اﻟﻜﺒﺪ اﻟﻮﺑﺎﺋﻲ ب و ج ، ﻓﯿﺮوس ﻛﺮﯾﺎت اﻟﺪم اﻟﺒﯿﻀﺎء )ﻣﺮﺗﺒﻂ ﺑﻔﯿﺮوس ﺗﺴﺒﺐ ﺳﺮطﺎن اﻟﺪم(

،اﻟﺰھﺮي ، اﻻﻧﯿﻤﯿﺎ اﻟﻤﻨﺠﻠﯿﺔ ،ﻓﺼﯿﻠﺔ اﻟﺪم و اﻻﺟﺴﺎم اﻟﻤﻀﺎدة.

-2 ﻓﻲ ﺣﺎل اﻟﻨﺘﯿﺠﺔ ﻛﺎﻧﺖ اﯾﺠﺎﺑﯿﺔ ﻻي ﻣﺮض ﻣﻦ اﻷﻣﺮاض اﻟﺴﺎﺑﻘﺔ ﻧﻘﻮم ﺑﺎﻟﺘﺨﻠﺺ ﻣﻦ اﻟﺪم ﻣﺒﺎﺷﺮة وﻻ ﯾﻌﻄﻰ ﻟﻠﻤﺮﯾﺾ وﯾﺘﻢ

اﺑﻼغ اﻟﻤﺘﺒﺮع ﻷﺧﺬ ﻋﯿﻨﺔ اﺧﺮى ﻟﻠﺘﺄﻛﺪ . وﻓﻲ ﺣﺎل وﺟﻮد ﻣﺮض ﯾﻤﻨﻊ اﻟﺘﺒﺮع ﻓﻲ اﻟﻤﺴﺘﻘﺒﻞ وﯾﺘﻢ اﺑﻼغ اﻟﻤﺘﺒﺮع.

-3 ﻓﻲ ﺣﺎل وﺟﻮد ﻣﺮض ﯾﻤﻨﻊ ﻣﻦ اﻟﺘﺒﺮع ﻣﺴﺘﻘﺒﻼ ﯾﺴﺠﻞ اﺳﻢ اﻟﻤﺘﺒﺮع ﻓﻲ ﻗﺎﺋﻤﺔ اﻟﻤﺘﺒﺮﻋﯿﻦ اﻟﻤﺮﻓﻮﺿﯿﯿﻦ ﻟﺪى ﺑﻨﻚ اﻟﺪم ﻣﻊ

ﻣﻌﻠﻮﻣﺎﺗﮫ وﻧﺘﯿﺠﺔ اﻟﻔﺤﺺ وﺗﻌﻄﻲ اﻟﻤﻌﻠﻮﻣﺎت ﻟﻠﺠﮭﺎت اﻟﻤﺨﺘﺼﺔ إذا طُﻠﺒﺖ ﻗﺎﻧﻮﻧﯿﺎً.

-4 ﻟﺴﺮﯾﺔ ﻧﺘﺎﺋﺞ اﻟﻔﺤﻮﺻﺎت ﺗﻌﻄﻲ اي ﻧﺘﯿﺠﺔ ﺑﺎﻟﮭﺎﺗﻒ وﯾﺠﺐ ﺣﻀﻮر اﻟﻤﺮﯾﺾ ﻣﻊ اﺛﺒﺎﺗﮫ ﻷﺧﺬ اﻟﻨﺘﯿﺠﺔ.

اﺣﺘﯿﺎطﺎت اﻟﺴﻼﻣﺔ ﺑﻌﺪ اﻟﺘﺒﺮع:

ﺑﻌﺪ اﻟﺘﺒﺮع ﺑﺎﻟﺪم ﺟﺴﻤﻚ ﯾﺤﺘﺎج ﻟﺒﻌﺾ اﻟﻮﻗﺖ ﻟﻠﺮاﺣﺔ ﻟﯿﺘﻢ ﺿﺒﻂ اﻟﺘﻐﯿﺮ ﻓﻲ اﻟﺴﻮاﺋﻞ اﻟﺪم ﻟﺬﻟﻚ ﻧﺮﺟﻮ اﺗﺒﺎع اﻻرﺷﺎدات

اﻟﺘﺎﻟﯿﺔ:

 

ﺑﻌﺪ اﻟﺘﺒﺮع ﻣﺒﺎﺷﺮة ﺗﻐﺎدر ﻛﺮﺳﻲ اﻟﺘﺒﺮع اﻻﺑﻌﺪ ارﺷﺎدك ﻣﻦ ﻗﺒﻞ اﻟﻌﺎﻣﻠﯿﻦ ﻟﺘﺠﻠﺲ ﻓﻲ ﻣﻜﺎن

-1

ﻣﺨﺼﺺ ﻟﻠﺮاﺣﺔ

 

اﻟﺠﻠﻮس ﻓﻲ اﻟﻤﻜﺎن اﻟﻤﺨﺼﺺ ﻟﻠﺮاﺣﺔ ﻟﻤﺪة 10 دﻗﺎﺋﻖ ﻣﻊ ﺷﺮب اﻟﻌﺼﯿﺮ واﻟﻤﺎء وﻓﻲ ﺣﺎل رﻏﺒﺘﻚ

-2

ﺑﺎﻟﻤﻐﺎدرة اﻟﺮﺟﺎء اﺧﺒﺎر أﺣﺪ اﻟﻌﺎﻣﻠﯿﻦ.

 

اﻟﺮﺟﺎء ﺷﺮب ﻛﻤﯿﺔ ﻛﺒﯿﺮة ﻣﻦ اﻟﺴﻮاﺋﻞ أﻛﺜﺮ ﻣﻦ اﻟﻤﻌﺘﺎد وﺗﻨﺎول طﻌﺎم ﺻﺤﻲ ﻟﺬﻟﻚ اﻟﯿﻮم.

-3

ﺗﺠﻨﺐ اﻟﺘﺪﺧﯿﻦ ﻟﻤﺪة ﺳﺎﻋﺘﯿﻦ ﺑﻌﺪ اﻟﺘﺒﺮع.

-4

ﺗﺠﻨﺐ اﻻﺟﮭﺎد أو اﻟﻨﺸﺎطﺎت اﻟﻘﻮﯾﺔ ﻟﻤﺪة 24 ﺳﺎﻋﺔ، اﻣﺎ إذا ﻛﺎن ﻟﺪﯾﻚ ﻧﺸﺎطﺎت آﻣﻨﺔ ﺑﺼﻮرة دورﯾﺔ

-5

اﻟﺮﺟﺎء اﻻﺳﺘﻔﺴﺎر ﻣﻦ اﻟﻌﺎﻣﻠﯿﻦ ﻓﻲ وﺣﺪة اﻟﺘﺒﺮع ﺑﺎﻟﺪم.

 

ﻟﻮ ﺷﻌﺮت ﺑﺎﻟﺪوار ﺑﻌﺪ ﻣﻐﺎدرﺗﻚ وﺣﺪة اﻟﺘﺒﺮع ﯾﺠﺐ وﺿﻊ رأﺳﻚ إﻟﻰ اﻻﺳﻔﻞ وﻗﺪﻣﯿﻚ إﻟﻰ اﻷﻋﻠﻰ

-6

ﺣﺘﻰ ﺗﺸﻌﺮ ﺑﺎﻟﺮاﺣﺔ وﻓﻲ ﺣﺎﻟﺔ ﻋﺪم ﺷﻌﻮرك ﺑﺎﻟﺮاﺣﺔ اﻟﺮﺟﺎء اﻟﺘﻮاﺻﻞ ﻣﻊ وﺣﺪة اﻟﺘﺒﺮع ﺑﺎﻟﺪم أو

 

اﻟﺘﺤﺪث ﻣﻊ طﺒﯿﺒﻚ.

 

اﺳﺤﺐ اﻟﻠﺼﻘﺔ ﻣﻦ ﻣﻜﺎن اﻟﺘﺒﺮع ﺑﻌﺪ 4 إﻟﻰ 5 ﺳﺎﻋﺎت ﻣﻦ اﻟﺘﺒﺮع ﻟﺘﺠﻨﺐ ﻧﺰﯾﻒ اﻟﺪم وإذا ﻧﺰف اﻟﺪم

-7

ﻗﻢ ﺑﻮﺿﻌﮭﺎ ﻓﻲ ﻣﻜﺎﻧﮭﺎ ﻣﺮة اﺧﺮى وارﻓﻊ ﯾﺪك إﻟﻰ اﻻﻋﻠﻰ.

 

اﺣﺮص ﻋﻠﻰ اﻟﺤﺼﻮل ﻋﻠﻰ وﺟﺒﺎت ﻏﻨﯿﺔ وﺻﺤﯿﺔ وإذا ﻛﻨﺖ ﺗﺘﺒﻊ ﺣﻤﯿﺔ ﻏﺬاﺋﯿﺔ اﺣﺮص ﻋﻠﻰ أن

-8

ﺗﻜﻮن ﺣﻤﯿﺘﻚ ﻣﺤﺘﻮﯾﺔ ﻋﻠﻰ ﻧﺴﺒﺔ ﻋﺎﻟﯿﺔ ﻣﻦ اﻟﺤﺪﯾﺪ وﻓﯿﺘﺎﻣﯿﻦ ﺳﻲ، ﻋﻠﻰ ﻛﻞ ﺣﺎل إذا ﻛﻨﺖ ﻣﻦ

 

اﻟﻤﺘﺒﺮﻋﯿﻦ اﻟﺪاﺋﻤﯿﻦ ﻓﺈن ﺣﻤﯿﺘﻚ اﻟﻐﺬاﺋﯿﺔ ﻗﺪ ﻻﺗﻜﻮن ﻛﺎﻓﯿﺔ ﻟﺘﻌﻮﯾﺾ ﺟﺴﻤﻚ ﻣﺎ ﯾﻔﻘﺪه ﻣﻦ ﺣﺪﯾﺪ ﻋﻨﺪ

 

ﺗﺒﺮﻋﻚ ﺑﺎﻟﺪم وﻧﻨﺼﺤﻚ ﺑﻤﺮاﺟﻌﺔ أﺧﺼﺎﺋﻲ اﻟﺮﻋﺎﯾﺔ اﻟﺼﺤﯿﺔ ﻟﯿﻘﺮر إذا ﻛﻨﺖ ﺗﺤﺘﺎج إﻟﻰ ﻣﻜﻤﻞ ﻏﺬاﺋﻲ

 

ﻣﺤﺘﻮي ﻋﻠﻰ اﻟﺤﺪﯾﺪ.

 

إذا أدرﻛﺖ ﺑﻌﺪ اﻟﺘﺒﺮع أﻧﻚ ﻗﺪ ﻗﻤﺖ ﺑﻨﺸﺎطﺎت أو ﺗﻌﺮﺿﺖ ﻷﻣﺮاض أو ﺳﻠﻮك ﯾﻤﻨﻌﻚ ﻣﻦ اﻟﺘﺒﺮع ﻧﺮﺟﻮ اﻻﺗﺼﺎل

ﺑﺒﻨﻚ اﻟﺪم ﻟﻌﻤﻞ اﻻﺣﺘﯿﺎطﺎت اﻟﻼزﻣﺔ ﻟﻤﻨﻊ ﻧﻘﻞ دﻣﻚ ﻻي ﻣﺮﯾﺾ. وﻟﻮ ﺷﻌﺮت ﺑﻌﺪ 72ﺳﺎﻋﺔ أﻧﻚ ﺑﺤﺎﻟﺔ ﻏﯿﺮ ﺟﯿﺪة أو دﻣﻚ ﯾﺠﺐ أن ﯾﻌﻄﻰ ﻻي ﻣﺮﯾﺾ ﻻي ﺳﺒﺐ ﻣﻦ اﻷﺳﺒﺎب

ﯾﺠﺐ اﻻﺗﺼﺎل ﺑﺒﻨﻚ اﻟﺪم

(+966114833672)واﻟﺘﺤﻮﯾﻠﺔ ھﻲ 3662

ﺷﻜﺮا ﻟﻌﻄﺎﺋﻚ..

ﻓﻌﻄﺎﺋﻚ ھﻮ ﺣﯿﺎة..

 

'; + + ProjectViewModel? projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + backgroundColor: Color(0xffF7F7F7), + showNewAppBarTitle: true, + description: TranslationBase.of(context).bloodDonationInfo, + appBarTitle: TranslationBase.of(context).bloodD, + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Html( + data: projectViewModel!.isArabic ? contentAR : contentEN, + shrinkWrap: true, + ) + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/Blood/blood_donation_book_appointment.dart b/lib/pages/Blood/blood_donation_book_appointment.dart new file mode 100644 index 00000000..6485b2d8 --- /dev/null +++ b/lib/pages/Blood/blood_donation_book_appointment.dart @@ -0,0 +1,503 @@ +import 'package:diplomaticquarterapp/core/model/blooddonation/blood_donation_free_slots_response.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/blood_donation_projects_list_response.dart'; +import 'package:diplomaticquarterapp/core/service/blood/blood_donation_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart'; +import 'package:diplomaticquarterapp/models/Appointments/timeSlot.dart'; +import 'package:diplomaticquarterapp/pages/Blood/blood_donation_appointment_terms_conditions.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.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'; +import 'package:provider/provider.dart'; +import 'package:syncfusion_flutter_calendar/calendar.dart'; + +import '../AlHabibMedicalService/h2o/h20_setting.dart'; + +class BloodDonationBookAppointment extends StatefulWidget { + const BloodDonationBookAppointment(); + + static bool areSlotsAvailable = false; + static DateTime? selectedAppoDateTime; + static String? selectedDate; + static String? selectedTime; + + @override + State createState() => _BloodDonationBookAppointmentState(); +} + +class _BloodDonationBookAppointmentState extends State with TickerProviderStateMixin { + Map? _events; + AnimationController? _animationController; + CalendarController? _calendarController; + + List bloodDonationProjectsListResponse = []; + int _selectedProjectID = 0; + int _clinicID = 0; + int _doctorID = 0; + + String selectedProjectName = ""; + + List docFreeSlots = []; + List dayEvents = []; + + var selectedDate = ""; + dynamic selectedDateJSON; + dynamic jsonFreeSlots; + + int selectedButtonIndex = 0; + + List bloodDonationFreeSlotsResponse = []; + + ProjectViewModel? projectViewModel; + ScrollController? _scrollController; + + var checkedValue = false; + + @override + void initState() { + final _selectedDay = DateTime.now(); + super.initState(); + + _events = { + _selectedDay: ['Event A0'] + }; + + _scrollController = new ScrollController(); + + _calendarController = CalendarController(); + _animationController = AnimationController( + vsync: this, + duration: const Duration(milliseconds: 50), + ); + + WidgetsBinding.instance.addPostFrameCallback((_) { + getBloodDonationProjectsList(); + }); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + backgroundColor: Color(0xffF7F7F7), + showNewAppBarTitle: true, + isShowDecPage: true, + description: TranslationBase.of(context).bloodDonationInfo, + appBarTitle: TranslationBase.of(context).bloodD, + body: SingleChildScrollView( + child: Padding( + padding: EdgeInsets.all(21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(TranslationBase.of(context).selectHospitalBloodDonation, style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.w600, letterSpacing: -0.64)), + mHeight(12), + CommonDropDownView( + TranslationBase.of(context).selectProject, + selectedProjectName, + () { + List list = []; + bloodDonationProjectsListResponse.forEach((element) { + list.add(RadioSelectionDialogModel(element.projectName!, element.projectID!)); + }); + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: 0, + onValueSelected: (index) { + print(index); + _selectedProjectID = index; + selectedProjectName = bloodDonationProjectsListResponse.firstWhere((element) => element.projectID == index).projectName!; + getBloodDonationFreeSlots(); + setState(() {}); + }, + ), + ); + }, + ).withBorderedContainer, + mHeight(12), + Container( + decoration: cardRadius(12), + child: _buildTableCalendarWithBuilders(projectViewModel!), + ), + mHeight(12), + Text(selectedDate, style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.w600, letterSpacing: -0.64)), + mHeight(8), + BloodDonationBookAppointment.areSlotsAvailable + ? Container( + height: 40, + child: ListView.builder( + controller: _scrollController, + scrollDirection: Axis.horizontal, + itemCount: dayEvents.length, + itemBuilder: (context, index) { + return Container( + margin: EdgeInsets.only(right: (index == dayEvents.length - 1) ? 0 : 5.0, left: index == 0 ? 0 : 5), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(5.0), + side: BorderSide( + color: index == selectedButtonIndex ? CustomColors.green : Colors.black, //Color of the border + style: BorderStyle.solid, //Style of the border + width: 1.5, //width of the border + ), + ), + minWidth: MediaQuery.of(context).size.width * 0.2, + child: index == selectedButtonIndex ? getSelectedButton(index) : getNormalButton(index)), + ); + }, + ), + ) + : Center( + child: Padding( + padding: const EdgeInsets.only(left: 12.0, right: 12.0), + child: Text(TranslationBase.of(context).noSlotsError, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.grey)), + ), + ), + SizedBox(height: 16), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).viewTermsConditions + ":", + style: TextStyle(fontWeight: FontWeight.w600, color: Color(0xff2E303A), fontSize: 14, letterSpacing: -0.56), + ), + InkWell( + onTap: () { + Navigator.of(context).push(FadePage(page: BloodDonationAppointmentTermsConditions())); + }, + child: Text( + TranslationBase.of(context).clickHere, + style: TextStyle(fontWeight: FontWeight.w600, color: Colors.blue, fontSize: 14, letterSpacing: -0.56), + ), + ) + ], + ), + SizedBox(height: 12), + Row( + children: [ + Checkbox( + onChanged: (bool? value) { + setState(() { + checkedValue = value!; + }); + }, + value: checkedValue, + activeColor: Color(0xFFc5272d), + ), + Text( + TranslationBase.of(context).iAgreeToTheTermsAndConditions, + style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold), + ), + ], + ), + ], + ), + ), + ), + bottomSheet: Container( + color: Colors.white, + height: MediaQuery.of(context).size.height * 0.081, + width: double.infinity, + padding: EdgeInsets.all(12.0), + child: Column( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.9, + child: DefaultButton( + TranslationBase.of(context).bookAppo, + () async { + if (BloodDonationBookAppointment.areSlotsAvailable) { + if (checkedValue) { + insertBloodDonationAppointment(); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms); + } + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot); + } + }, + textColor: Colors.white, + color: CustomColors.green, + ), + ), + ], + ), + ), + ); + } + + void insertBloodDonationAppointment() { + DoctorsListService service = new DoctorsListService(); + final timeSlot = BloodDonationBookAppointment.selectedAppoDateTime; + GifLoaderDialogUtils.showMyDialog(context); + service + .insertAppointment(_doctorID, _clinicID, _selectedProjectID, BloodDonationBookAppointment.selectedTime!, BloodDonationBookAppointment.selectedDate!, 45, projectViewModel!.isArabic ? 1 : 2, + context, null, null, null, projectViewModel) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess); + Navigator.of(context).pop(); + } else { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: res['ErrorEndUserMessage'], + okText: TranslationBase.of(context).ok, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () async { + // openAppSettings(); + Navigator.pop(context); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + // AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: err, + okText: TranslationBase.of(context).ok, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () async { + // openAppSettings(); + Navigator.pop(context); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + }); + } + + void _onDaySelected(DateTime day, ProjectViewModel projectViewModel) { + final DateFormat formatter = DateFormat('yyyy-MM-dd'); + setState(() { + this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, projectViewModel.isArabic ? "ar" : "en"); + openTimeSlotsPickerForDate(day, docFreeSlots); + BloodDonationBookAppointment.selectedDate = formatter.format(day); + _calendarController!.selectedDate = day; + print(BloodDonationBookAppointment.selectedDate); + }); + } + + Widget _buildTableCalendarWithBuilders(ProjectViewModel projectViewModel) { + return SfCalendar( + controller: _calendarController, + minDate: DateTime.now(), + showNavigationArrow: true, + headerStyle: CalendarHeaderStyle(textAlign: TextAlign.center, textStyle: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46)), + viewHeaderStyle: ViewHeaderStyle(dayTextStyle: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.black)), + view: CalendarView.month, + todayHighlightColor: CustomColors.green, + selectionDecoration: containerColorRadiusBorderWidthCircular(Colors.transparent, 4, CustomColors.green, 2.5), + cellBorderColor: Colors.white, + dataSource: MeetingDataSource(_getDataSource()), + monthViewSettings: const MonthViewSettings(appointmentDisplayMode: MonthAppointmentDisplayMode.indicator, showTrailingAndLeadingDates: false, appointmentDisplayCount: 1), + onTap: (CalendarTapDetails details) { + _calendarController!.selectedDate = details.date; + _onDaySelected(details.date!, projectViewModel); + }, + ); + } + + Widget getNormalButton(int index) { + return CustomTextButton( + backgroundColor: Colors.white, + elevation: 0, + side: BorderSide( + color: Colors.black, //Color of the border + style: BorderStyle.solid, //Style of the border + width: 1.5 //width of the border + ), + onPressed: () { + final timeslot = dayEvents[index]; + BloodDonationBookAppointment.selectedAppoDateTime = timeslot.end; + + setState(() { + selectedButtonIndex = index; + BloodDonationBookAppointment.selectedTime = dayEvents[index].isoTime; + print(BloodDonationBookAppointment.selectedTime); + }); + }, + child: Text(dayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Color(0xFF60686b))), + ); + } + + Widget getSelectedButton(int index) { + return CustomTextButton( + backgroundColor: CustomColors.green, + elevation: 0, + side: BorderSide( + color: CustomColors.green, //Color of the border + style: BorderStyle.solid, //Style of the border + width: 1.5 //width of the border + ), + onPressed: () { + setState(() { + selectedButtonIndex = index; + BloodDonationBookAppointment.selectedTime = dayEvents[index].isoTime; + print(BloodDonationBookAppointment.selectedTime); + }); + }, + child: Text(dayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Colors.white)), + ); + } + + getBloodDonationFreeSlots() { + BloodDonationService service = new BloodDonationService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getBloodDonationFreeSlots(134, _selectedProjectID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + res['BD_FreeSlots'].forEach((element) { + bloodDonationFreeSlotsResponse.add(BloodDonationFreeSlotsResponseModel.fromJson(element)); + }); + print(bloodDonationFreeSlotsResponse.length); + _getJSONSlots().then((value) => { + setState(() => {_clinicID = bloodDonationFreeSlotsResponse[0].clinicID!, _doctorID = bloodDonationFreeSlotsResponse[0].doctorID!, _events!.clear(), _events = value}) + }); + } else { + AppToast.showErrorToast(message: res["ErrorEndUserMessage"]); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + openTimeSlotsPickerForDate(DateTime dateStart, List freeSlots) { + dayEvents.clear(); + DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0); + + freeSlots.forEach((v) { + if (v.start == dateStartObj) dayEvents.add(v); + }); + + setState(() { + if (dayEvents.length != 0) { + BloodDonationBookAppointment.areSlotsAvailable = true; + selectedButtonIndex = 0; + BloodDonationBookAppointment.selectedTime = dayEvents[selectedButtonIndex].isoTime; + } else + BloodDonationBookAppointment.areSlotsAvailable = false; + }); + } + + Future> _getJSONSlots() async { + Map _eventsParsed; + List slotsList = []; + DateTime date; + final DateFormat formatter = DateFormat('HH:mm'); + final DateFormat dateFormatter = DateFormat('yyyy-MM-dd'); + for (var i = 0; i < bloodDonationFreeSlotsResponse.length; i++) { + date = DateUtil.convertStringToDate(bloodDonationFreeSlotsResponse[i].freeTimeSlots); + slotsList.add(FreeSlot(date, ['slot'])); + docFreeSlots.add(TimeSlot(isoTime: formatter.format(date), start: new DateTime(date.year, date.month, date.day, 0, 0, 0, 0), end: date)); + } + _eventsParsed = Map.fromIterable(slotsList, key: (e) => e.slot, value: (e) => e.event); + setState(() { + BloodDonationBookAppointment.selectedDate = dateFormatter.format(DateUtil.convertStringToDate(bloodDonationFreeSlotsResponse[0].freeTimeSlots)); + selectedDate = DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(bloodDonationFreeSlotsResponse[0].freeTimeSlots)); + selectedDateJSON = bloodDonationFreeSlotsResponse[0].freeTimeSlots; + }); + openTimeSlotsPickerForDate(DateUtil.convertStringToDate(selectedDateJSON), docFreeSlots); + _calendarController!.selectedDate = DateUtil.convertStringToDate(selectedDateJSON); + return _eventsParsed; + } + + getBloodDonationProjectsList() { + BloodDonationService service = new BloodDonationService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getBloodDonationProjectsList().then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res['BD_getProjectsHaveBDClinics']); + if (res["MessageStatus"] == 1) { + res['BD_getProjectsHaveBDClinics'].forEach((element) { + bloodDonationProjectsListResponse.add(BloodDonationProjectsListResponse.fromJson(element)); + }); + print(bloodDonationProjectsListResponse.length); + } else { + AppToast.showErrorToast(message: res["ErrorEndUserMessage"]); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + List _getDataSource() { + final List meetings = []; + _events!.forEach((key, value) { + final DateTime startTime = DateTime(key.year, key.month, key.day, 9, 0, 0); + final DateTime endTime = startTime.add(const Duration(minutes: 20)); + meetings.add(Meeting("", startTime, endTime, CustomColors.green, false, "")); + }); + return meetings; + } +} + +class MeetingDataSource extends CalendarDataSource { + MeetingDataSource(List source) { + appointments = source; + } + + @override + DateTime getStartTime(int index) { + return _getMeetingData(index).from; + } + + @override + DateTime getEndTime(int index) { + return _getMeetingData(index).to; + } + + @override + String getSubject(int index) { + return _getMeetingData(index).eventName; + } + + @override + Color getColor(int index) { + return _getMeetingData(index).background; + } + + @override + bool isAllDay(int index) { + return _getMeetingData(index).isAllDay; + } + + Meeting _getMeetingData(int index) { + final dynamic meeting = appointments![index]; + Meeting? meetingData; + if (meeting is Meeting) { + meetingData = meeting; + } + return meetingData!; + } +} + +class Meeting { + Meeting(this.eventName, this.from, this.to, this.background, this.isAllDay, this.notes); + + String eventName; + DateTime from; + DateTime to; + Color background; + bool isAllDay; + String notes; +} \ No newline at end of file diff --git a/lib/pages/Blood/confirm_payment_page.dart b/lib/pages/Blood/confirm_payment_page.dart new file mode 100644 index 00000000..edf3d0e5 --- /dev/null +++ b/lib/pages/Blood/confirm_payment_page.dart @@ -0,0 +1,304 @@ +import 'dart:js'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +import 'dialogs/ConfirmSMSDialog.dart'; +import 'new_text_Field.dart'; + +class ConfirmPaymentPage extends StatelessWidget { + late AdvanceModel advanceModel; + final PatientInfoAndMobileNumber patientInfoAndMobileNumber; + final String selectedPaymentMethod; + late MyInAppBrowser browser; + AuthenticatedUser authenticatedUser; + AppSharedPreferences sharedPref = AppSharedPreferences(); + late ProjectViewModel projectViewModel; + + ConfirmPaymentPage({required this.advanceModel, required this.patientInfoAndMobileNumber, required this.selectedPaymentMethod, required this.authenticatedUser}); + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + void showSMSDialog() { + showDialog( + context: context, + barrierDismissible: false, + builder: (cxt) => ConfirmSMSDialog( + phoneNumber: patientInfoAndMobileNumber.mobileNumber!, + ), + ).then((value) { + print("dialog dismissed"); + print(value); + if (value != null && value) { + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + appo.projectID = patientInfoAndMobileNumber.projectID; + openPayment(selectedPaymentMethod, authenticatedUser, double.parse(advanceModel.amount!), appo, context); + } + }); + } + + return BaseView( + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).advancePayment, + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Container( + margin: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).confirmThePayment, + textAlign: TextAlign.center, + fontWeight: FontWeight.w500, + fontSize: 24, + ), + SizedBox( + height: 12, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + height: 100.0, + padding: EdgeInsets.all(7.0), + width: MediaQuery.of(context).size.width * 0.45, + child: selectedPaymentMethod == "ApplePay" ? SvgPicture.asset(getImagePath(selectedPaymentMethod)) : Image.asset(getImagePath(selectedPaymentMethod)), + ), + Texts( + advanceModel.hospitalsModel!.projectOutSA! ? '${advanceModel.amount} AED' : '${advanceModel.amount} SAR', + fontSize: 26, + bold: true, + ) + ], + ), + SizedBox( + height: 12, + ), + Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.all(3), + child: NewTextFields( + hintText: TranslationBase.of(context).fileNumber, + initialValue: advanceModel.fileNumber!, + isEnabled: false, + ), + ), + ), + Expanded( + child: Container( + margin: EdgeInsets.all(3), + child: NewTextFields( + hintText: TranslationBase.of(context).name, + initialValue: patientInfoAndMobileNumber.firstName!, + isEnabled: false, + ), + ), + ), + ], + ), + SizedBox( + height: 12, + ), + NewTextFields( + hintText: TranslationBase.of(context).mobileNumber, + initialValue: patientInfoAndMobileNumber.mobileNumber!, + isEnabled: false, + ), + SizedBox( + height: 12, + ), + NewTextFields( + hintText: TranslationBase.of(context).depositorName, + initialValue: advanceModel.depositorName!, + isEnabled: false, + ), + SizedBox( + height: 12, + ), + NewTextFields( + hintText: TranslationBase.of(context).notes, + initialValue: advanceModel.note!, + isEnabled: false, + ), + ], + ), + ), + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.1, + width: double.infinity, + padding: EdgeInsets.all(12), + child: SecondaryButton( + textColor: Colors.white, + label: TranslationBase.of(context).confirm.toUpperCase(), + disabled: model.state == ViewState.Busy, + onTap: () { + GifLoaderDialogUtils.showMyDialog(context); + model.sendActivationCodeForAdvancePayment(patientID: int.parse(advanceModel.fileNumber!), projectID: advanceModel.hospitalsModel!.iD).then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) showSMSDialog(); + }); + }, + ), + ), + ), + ); + } + + String getImagePath(String paymentMethod) { + switch (paymentMethod) { + case "MADA": + return 'assets/images/new-design/mada.png'; + break; + case "SADAD": + return 'assets/images/new-design/sadad.png'; + break; + case "VISA": + return 'assets/images/new-design/visa.png'; + break; + case "MASTERCARD": + return 'assets/images/new-design/mastercard.png'; + break; + case "Installment": + return 'assets/images/new-design/installment.png'; + break; + case "ApplePay": + return 'assets/images/new-design/applepay.svg'; + break; + } + + return 'assets/images/new-design/mada.png'; + } + + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo, BuildContext context) { + browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); + + browser.openPaymentBrowser( + amount, + "Advance Payment", + Utils.getAdvancePaymentTransID(authenticatedUser.projectID!, authenticatedUser.patientID!), + appo.projectID.toString(), + authenticatedUser.emailAddress!, + paymentMethod, + authenticatedUser.patientType, + authenticatedUser.firstName!, + authenticatedUser.patientID, + authenticatedUser, + browser, + false, + "3", + "", + context, + ); + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called!!!!"); + checkPaymentStatus(appo); + } + + checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), false, AppGlobal.context).then((res) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + print("Printing Payment Status Reponse!!!!"); + print(res); + String paymentInfo = res['Response_Message']; + if (paymentInfo == 'Success') { + createAdvancePayment(res, appo); + } else { + AppToast.showErrorToast(message: res['Response_Message']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + String paymentReference = res['Fort_id'].toString(); + GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], AppGlobal.context).then((res) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + addAdvancedNumberRequest( + Utils.isVidaPlusProject(projectViewModel, appo.projectID!) + ? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString() + : res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), + paymentReference, + appo.appointmentNo.toString(), + appo); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + addAdvancedNumberRequest(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + navigateToHome(AppGlobal.context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + Future navigateToHome(context) async { + Navigator.of(context).pushNamed(HOME); + } +} diff --git a/lib/pages/Blood/dialogs/ConfirmSMSDialog.dart b/lib/pages/Blood/dialogs/ConfirmSMSDialog.dart new file mode 100644 index 00000000..40ef3240 --- /dev/null +++ b/lib/pages/Blood/dialogs/ConfirmSMSDialog.dart @@ -0,0 +1,362 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class ConfirmSMSDialog extends StatefulWidget { + final String phoneNumber; + final AdvanceModel? advanceModel; + final PatientInfoAndMobileNumber? patientInfoAndMobileNumber; + final String? selectedPaymentMethod; + + const ConfirmSMSDialog({Key? key, required this.phoneNumber, this.advanceModel, this.selectedPaymentMethod, this.patientInfoAndMobileNumber}) : super(key: key); + + @override + _ConfirmSMSDialogState createState() => _ConfirmSMSDialogState(); +} + +class _ConfirmSMSDialogState extends State { + final verifyAccountForm = GlobalKey(); + Map verifyAccountFormValue = { + 'digit1': null, + 'digit2': null, + 'digit3': null, + 'digit4': null, + }; + + TextEditingController digit1 = TextEditingController(text: ""); + TextEditingController digit2 = TextEditingController(text: ""); + TextEditingController digit3 = TextEditingController(text: ""); + TextEditingController digit4 = TextEditingController(text: ""); + + String timerText = (TIMER_MIN - 1).toString() + ':59'; + int min = TIMER_MIN - 1; + int sec = 59; + late Timer _timer; + + resendCode() { + min = TIMER_MIN - 1; + sec = 59; + _timer = Timer.periodic(Duration(seconds: 1), (Timer timer) { + if (min <= 0 && sec <= 0) { + timer.cancel(); + } else { + setState(() { + sec = sec - 1; + if (sec == 0 && min == 0) { + Navigator.pop(context); + min = 0; + sec = 0; + } else if (sec == 0) { + min = min - 1; + sec = 59; + } + timerText = min.toString() + ':' + sec.toString(); + }); + } + }); + } + + late FocusNode focusD1; + late FocusNode focusD2; + late FocusNode focusD3; + late FocusNode focusD4; + + @override + void initState() { + super.initState(); + resendCode(); + focusD1 = FocusNode(); + focusD2 = FocusNode(); + focusD3 = FocusNode(); + focusD4 = FocusNode(); + } + + @override + void dispose() { + _timer.cancel(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + builder: (_, model, w) => Dialog( + elevation: 0.6, + child: Container( + height: 520, + child: ListView( + children: [ + Container( + width: double.infinity, + height: 40, + color: Theme.of(context).primaryColor, + child: Stack( + children: [ + Center( + child: Texts( + 'SMS', + color: Colors.white, + textAlign: TextAlign.center, + ), + ), + Positioned( + child: Container( + child: InkWell( + onTap: () => Navigator.pop(context), + child: Container( + decoration: BoxDecoration(shape: BoxShape.circle, color: Colors.white), + child: Icon( + Icons.clear, + color: Colors.grey[900], + )), + ), + ), + left: projectViewModel.isArabic ? 2 : 0, + right: projectViewModel.isArabic ? 0 : 2, + ) + ], + ), + ), + Image.asset( + 'assets/images/login/103.png', + height: MediaQuery.of(context).size.width * 0.25, + width: MediaQuery.of(context).size.width * 0.25, + ), + SizedBox( + height: 12, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + TranslationBase.of(context).pleaseEnterTheVerificationCode + '[${widget.phoneNumber}]', + textAlign: TextAlign.center, + ), + ), + SizedBox( + height: 12, + ), + Form( + key: verifyAccountForm, + child: Container( + width: SizeConfig.realScreenWidth! * 0.90, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 30, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Container( + width: 65, + child: TextFormField( + textInputAction: TextInputAction.next, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 3, + ), + focusNode: focusD1, + maxLength: 1, + controller: digit1, + textAlign: TextAlign.center, + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + onSaved: (val) { + verifyAccountFormValue['digit1'] = val; + }, + validator: validateCodeDigit, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD2); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context).requestFocus(focusD2); + } + }, + ), + ), + Container( + width: 65, + child: TextFormField( + focusNode: focusD2, + controller: digit2, + textInputAction: TextInputAction.next, + maxLength: 1, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 3, + ), + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + validator: validateCodeDigit, + onSaved: (val) { + verifyAccountFormValue['digit2'] = val; + }, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD3); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context).requestFocus(focusD3); + } + }, + ), + ), + Container( + width: 65, + child: TextFormField( + focusNode: focusD3, + controller: digit3, + textInputAction: TextInputAction.next, + maxLength: 1, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 3, + ), + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + validator: validateCodeDigit, + onSaved: (val) { + verifyAccountFormValue['digit3'] = val; + }, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD4); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context).requestFocus(focusD4); + } + }, + )), + Container( + width: 65, + child: TextFormField( + focusNode: focusD4, + controller: digit4, + maxLength: 1, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 3, + ), + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + validator: validateCodeDigit, + onSaved: (val) { + verifyAccountFormValue['digit4'] = val; + }, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD4); + submit(model); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context).requestFocus(focusD4); + submit(model); + } + }), + ) + ], + ), + SizedBox( + height: 8, + ), + if (model.state == ViewState.ErrorLocal || model.state == ViewState.Error) + Container( + margin: EdgeInsets.only(left: 8, right: 8), + width: double.maxFinite, + child: Texts( + model.error, + color: Colors.red, + ), + ), + SizedBox(height: 20), + // buildText(), + + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + TranslationBase.of(context).theVerificationCodeExpiresIn + ' $timerText', + textAlign: TextAlign.center, + ), + ), + SizedBox(height: 20), + + Container( + width: double.maxFinite, + padding: EdgeInsets.all(12), + child: SecondaryButton( + textColor: Colors.white, + label: TranslationBase.of(context).submit.toUpperCase(), + onTap: () { + submit(model); + }, + ), + ), + ], + ), + ), + ) + ], + ), + ), + ), + ); + } + + void submit(MyBalanceViewModel model) { + if (verifyAccountForm.currentState!.validate()) { + GifLoaderDialogUtils.showMyDialog(context); + final activationCode = digit1.text + digit2.text + digit3.text + digit4.text; + model.checkActivationCodeForAdvancePayment(activationCode: activationCode).then((value) { + GifLoaderDialogUtils.hideDialog(context); + Navigator.pop(context, true); + }); + } + } + + String validateCodeDigit(value) { + if (value.isEmpty) { + return ''; + } + return 'null'; + } + + InputDecoration buildInputDecoration(BuildContext context) { + return InputDecoration( + // ts/images/password_icon.png + contentPadding: EdgeInsets.only(top: 20, bottom: 20), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5)), + borderSide: BorderSide(color: Colors.black), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + borderSide: BorderSide(color: Theme.of(context).primaryColor), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + borderSide: BorderSide(color: CustomColors.accentColor), + ), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + borderSide: BorderSide(color: CustomColors.accentColor), + ), + ); + } +} diff --git a/lib/pages/Blood/dialogs/SelectBeneficiaryDialog.dart b/lib/pages/Blood/dialogs/SelectBeneficiaryDialog.dart new file mode 100644 index 00000000..c4780f8b --- /dev/null +++ b/lib/pages/Blood/dialogs/SelectBeneficiaryDialog.dart @@ -0,0 +1,177 @@ +import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +//import '../advance_payment_page.dart'; + +class SelectBeneficiaryDialog extends StatefulWidget { + final BeneficiaryType? beneficiaryType; + final Function(BeneficiaryType)? onValueSelected; + + SelectBeneficiaryDialog( + {Key? key, this.beneficiaryType, this.onValueSelected}); + + @override + _SelectBeneficiaryDialogState createState() => + _SelectBeneficiaryDialogState(this.beneficiaryType!); +} + +class _SelectBeneficiaryDialogState extends State { + _SelectBeneficiaryDialogState(this.beneficiaryType); + + BeneficiaryType beneficiaryType; + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Container( + child: Column( + children: [ + Divider(), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + beneficiaryType = BeneficiaryType.MyAccount; + }); + }, + child: ListTile( + title: Text(TranslationBase.of(context).myAccount), + leading: Radio( + value: BeneficiaryType.MyAccount, + groupValue: beneficiaryType, + activeColor: Colors.red[800], + onChanged: (BeneficiaryType? value) { + setState(() { + beneficiaryType = value!; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + beneficiaryType = BeneficiaryType.MyFamilyFiles; + }); + }, + child: ListTile( + title: Text(TranslationBase.of(context).myFamilyFiles), + leading: Radio( + value: BeneficiaryType.MyFamilyFiles, + groupValue: beneficiaryType, + activeColor: Colors.red[800], + onChanged: (BeneficiaryType? value) { + setState(() { + beneficiaryType = value!; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + beneficiaryType = BeneficiaryType.OtherAccount; + }); + }, + child: ListTile( + title: Text(TranslationBase.of(context).otherAccount), + leading: Radio( + value: BeneficiaryType.OtherAccount, + groupValue: beneficiaryType, + activeColor: Colors.red[800], + onChanged: (BeneficiaryType? value) { + setState(() { + beneficiaryType = value!; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected!(beneficiaryType); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + ), + ), + ), + ), + ), + ], + ) + ], + ), + ) + ], + ); + } +} diff --git a/lib/pages/Blood/dialogs/SelectGenderDialog.dart b/lib/pages/Blood/dialogs/SelectGenderDialog.dart new file mode 100644 index 00000000..d1c8a8b2 --- /dev/null +++ b/lib/pages/Blood/dialogs/SelectGenderDialog.dart @@ -0,0 +1,146 @@ +import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SelectGenderDialog extends StatefulWidget { + final Gender beneficiaryType; + final Function(Gender) onValueSelected; + + SelectGenderDialog({Key? key, required this.beneficiaryType, required this.onValueSelected}); + + @override + _SelectGenderDialogState createState() => + _SelectGenderDialogState(this.beneficiaryType); +} + +class _SelectGenderDialogState extends State { + _SelectGenderDialogState(this.beneficiaryType); + Gender beneficiaryType; + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Container( + child: Column( + children: [ + Divider(), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + beneficiaryType = Gender.Male; + }); + }, + child: ListTile( + title: Text(TranslationBase.of(context).male), + leading: Radio( + value: Gender.Male, + groupValue: beneficiaryType, + activeColor: Colors.red[800], + onChanged: (Gender? value) { + setState(() { + beneficiaryType = value!; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + beneficiaryType = Gender.Female; + }); + }, + child: ListTile( + title: Text(TranslationBase.of(context).female), + leading: Radio( + value: Gender.Female, + groupValue: beneficiaryType, + activeColor: Colors.red[800], + onChanged: (Gender? value) { + setState(() { + beneficiaryType = value!; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(beneficiaryType); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + ), + ), + ), + ), + ), + ], + ) + ], + ), + ) + ], + ); + } +} diff --git a/lib/pages/Blood/dialogs/SelectHospitalDialog.dart b/lib/pages/Blood/dialogs/SelectHospitalDialog.dart new file mode 100644 index 00000000..40fbb036 --- /dev/null +++ b/lib/pages/Blood/dialogs/SelectHospitalDialog.dart @@ -0,0 +1,128 @@ +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SelectHospitalDialog extends StatefulWidget { + final List hospitals; + final Function(HospitalsModel) onValueSelected; + HospitalsModel? selectedHospital; + + SelectHospitalDialog( + {Key? key, required this.hospitals, required this.onValueSelected, this.selectedHospital}); + + @override + _SelectHospitalDialogState createState() => _SelectHospitalDialogState(); +} + +class _SelectHospitalDialogState extends State { + @override + void initState() { + super.initState(); + widget.selectedHospital = widget.selectedHospital ?? widget.hospitals[0]; + } + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Column( + children: [ + Divider(), + ...List.generate( + widget.hospitals.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.selectedHospital = widget.hospitals[index]; + }); + }, + child: ListTile( + title: Text(widget.hospitals[index].name!), + leading: Radio( + value: widget.hospitals[index], + groupValue: widget.selectedHospital, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + widget.selectedHospital = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + ], + ), + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(widget.selectedHospital!); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + )), + ), + ), + ), + ], + ) + ], + ) + ], + ); + } +} diff --git a/lib/pages/Blood/dialogs/SelectPatientFamilyDialog.dart b/lib/pages/Blood/dialogs/SelectPatientFamilyDialog.dart new file mode 100644 index 00000000..09495348 --- /dev/null +++ b/lib/pages/Blood/dialogs/SelectPatientFamilyDialog.dart @@ -0,0 +1,128 @@ +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SelectPatientFamilyDialog extends StatefulWidget { + final List getAllSharedRecordsByStatusList; + final Function(GetAllSharedRecordsByStatusList) onValueSelected; + GetAllSharedRecordsByStatusList? selectedPatientFamily; + + SelectPatientFamilyDialog({Key? key, required this.getAllSharedRecordsByStatusList, required this.onValueSelected,this.selectedPatientFamily}); + + @override + _SelectPatientFamilyDialogState createState() => _SelectPatientFamilyDialogState(); +} + +class _SelectPatientFamilyDialogState extends State { + + @override + void initState() { + super.initState(); + widget.selectedPatientFamily = widget.selectedPatientFamily?? widget.getAllSharedRecordsByStatusList[0]; + } + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Column( + children: [ + Divider(), + ...List.generate( + widget.getAllSharedRecordsByStatusList.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.selectedPatientFamily = widget.getAllSharedRecordsByStatusList[index]; + }); + }, + child: ListTile( + title: Text(widget.getAllSharedRecordsByStatusList[index].patientName!), + leading: Radio( + value: widget.getAllSharedRecordsByStatusList[index], + groupValue: widget.selectedPatientFamily, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + widget.selectedPatientFamily = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + ], + ), + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(widget.selectedPatientFamily!); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + )), + ), + ), + ), + ], + ) + ], + ) + ], + ); + } +} diff --git a/lib/pages/Blood/dialogs/SelectPatientInfoDialog.dart b/lib/pages/Blood/dialogs/SelectPatientInfoDialog.dart new file mode 100644 index 00000000..f2368c0d --- /dev/null +++ b/lib/pages/Blood/dialogs/SelectPatientInfoDialog.dart @@ -0,0 +1,128 @@ +import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SelectPatientInfoDialog extends StatefulWidget { + final List patientInfoList ; + final Function(PatientInfo) onValueSelected; + PatientInfo selectedPatientInfo; + + SelectPatientInfoDialog({Key? key, required this.patientInfoList, required this.onValueSelected,required this.selectedPatientInfo}); + + @override + _SelectPatientInfoDialogState createState() => _SelectPatientInfoDialogState(); +} + +class _SelectPatientInfoDialogState extends State { + + @override + void initState() { + super.initState(); + widget.selectedPatientInfo = widget.selectedPatientInfo?? widget.patientInfoList[0]; + } + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Column( + children: [ + Divider(), + ...List.generate( + widget.patientInfoList.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.selectedPatientInfo = widget.patientInfoList[index]; + }); + }, + child: ListTile( + title: Text(widget.patientInfoList[index].fullName!), + leading: Radio( + value: widget.patientInfoList[index], + groupValue: widget.selectedPatientInfo, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + widget.selectedPatientInfo = value!; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + ], + ), + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(widget.selectedPatientInfo); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + )), + ), + ), + ), + ], + ) + ], + ) + ], + ); + } +} diff --git a/lib/pages/Blood/new_text_Field.dart b/lib/pages/Blood/new_text_Field.dart new file mode 100644 index 00000000..61a97eb8 --- /dev/null +++ b/lib/pages/Blood/new_text_Field.dart @@ -0,0 +1,211 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class NumberTextInputFormatter extends TextInputFormatter { + @override + TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) { + final int newTextLength = newValue.text.length; + int selectionIndex = newValue.selection.end; + int usedSubstringIndex = 0; + final StringBuffer newText = StringBuffer(); + if (newTextLength >= 1) { + newText.write('('); + if (newValue.selection.end >= 1) selectionIndex++; + } + if (newTextLength >= 4) { + newText.write(newValue.text.substring(0, usedSubstringIndex = 3) + ') '); + if (newValue.selection.end >= 3) selectionIndex += 2; + } + if (newTextLength >= 7) { + newText.write(newValue.text.substring(3, usedSubstringIndex = 6) + '-'); + if (newValue.selection.end >= 6) selectionIndex++; + } + if (newTextLength >= 11) { + newText.write(newValue.text.substring(6, usedSubstringIndex = 10) + ' '); + if (newValue.selection.end >= 10) selectionIndex++; + } + // Dump the rest. + if (newTextLength >= usedSubstringIndex) newText.write(newValue.text.substring(usedSubstringIndex)); + return TextEditingValue( + text: newText.toString(), + selection: TextSelection.collapsed(offset: selectionIndex), + ); + } +} + +final _mobileFormatter = NumberTextInputFormatter(); + +class NewTextFields extends StatefulWidget { + NewTextFields( + {Key? key, + this.type, + this.hintText, + this.suffixIcon, + this.autoFocus, + this.onChanged, + this.initialValue, + this.minLines, + this.maxLines, + this.inputFormatters, + this.padding, + this.focus = false, + this.maxLengthEnforced = true, + this.suffixIconColor, + this.inputAction, + this.onSubmit, + this.keepPadding = true, + this.textCapitalization = TextCapitalization.none, + this.controller, + this.keyboardType, + this.validator, + this.borderOnlyError = false, + this.onSaved, + this.onSuffixTap, + this.readOnly = false, + this.maxLength, + this.prefixIcon, + this.bare = false, + this.onTap, + this.fontSize = 16.0, + this.fontWeight = FontWeight.w700, + this.hintColor, + this.isEnabled = true}) + : super(key: key); + + final String? hintText; + + // final String initialValue; + final String? type; + final bool? autoFocus; + final IconData? suffixIcon; + final Color? suffixIconColor; + final Icon? prefixIcon; + final VoidCallback? onTap; + final TextEditingController? controller; + final TextInputType? keyboardType; + final FormFieldValidator? validator; + final Function(String?)? onSaved; + final Function? onSuffixTap; + final Function(String)? onChanged; + final Function(String)? onSubmit; + final bool? readOnly; + final int? maxLength; + final int? minLines; + final int? maxLines; + final bool? maxLengthEnforced; + final bool? bare; + final bool? isEnabled; + final TextInputAction? inputAction; + final double? fontSize; + final FontWeight? fontWeight; + final bool? keepPadding; + final TextCapitalization textCapitalization; + final List? inputFormatters; + final EdgeInsets? padding; + final bool? focus; + final bool? borderOnlyError; + final Color? hintColor; + final String? initialValue; + + @override + _NewTextFieldsState createState() => _NewTextFieldsState(); +} + +class _NewTextFieldsState extends State { + final FocusNode _focusNode = FocusNode(); + bool focus = false; + bool view = false; + + @override + void initState() { + super.initState(); + _focusNode.addListener(() { + setState(() { + focus = _focusNode.hasFocus; + }); + }); + } + + @override + void didUpdateWidget(NewTextFields oldWidget) { + if (widget.focus!) _focusNode.requestFocus(); + super.didUpdateWidget(oldWidget); + } + + @override + void dispose() { + _focusNode.dispose(); + super.dispose(); + } + + bool _determineReadOnly() { + if (widget.readOnly != null && widget.readOnly!) { + _focusNode.unfocus(); + return true; + } else { + return false; + } + } + + @override + Widget build(BuildContext context) { + return AnimatedContainer( + duration: Duration(milliseconds: 300), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Container( + margin: EdgeInsets.only(top: 8), + child: TextFormField( + enabled: widget.isEnabled, + initialValue: widget.initialValue, + keyboardAppearance: Theme.of(context).brightness, + scrollPhysics: BouncingScrollPhysics(), + textCapitalization: widget.textCapitalization, + onFieldSubmitted: widget.inputAction == TextInputAction.next + ? (widget.onSubmit != null + ? widget.onSubmit + : (val) { + _focusNode.nextFocus(); + }) + : widget.onSubmit, + textInputAction: widget.inputAction, + minLines: widget.minLines ?? 1, + maxLines: widget.maxLines ?? 1, + // maxLengthEnforced: widget.maxLengthEnforced, + onChanged: widget.onChanged, + focusNode: _focusNode, + maxLength: widget.maxLength ?? null, + controller: widget.controller, + keyboardType: widget.keyboardType, + readOnly: _determineReadOnly(), + obscureText: widget.type == "password" && !view ? true : false, + autofocus: widget.autoFocus ?? false, + validator: widget.validator, + onSaved: widget.onSaved, + + // style: Theme.of(context).textTheme.bodyText2!.copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight), + style: TextStyle(color: Colors.black, letterSpacing: 0.6, fontSize: widget.fontSize, fontWeight: widget.fontWeight), + inputFormatters: widget.keyboardType == TextInputType.phone + ? [ + FilteringTextInputFormatter.digitsOnly, + _mobileFormatter, + ] + : widget.inputFormatters, + decoration: InputDecoration( + labelText: widget.hintText, + labelStyle: TextStyle(color: Colors.black), + errorBorder: OutlineInputBorder(borderSide: BorderSide(color: CustomColors.accentColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(12.0)), + focusedErrorBorder: OutlineInputBorder(borderSide: BorderSide(color: CustomColors.accentColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(8.0)), + focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)), + disabledBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.white, width: 1.0), + borderRadius: BorderRadius.circular(12), + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/Blood/user_agreement_page.dart b/lib/pages/Blood/user_agreement_page.dart new file mode 100644 index 00000000..1f922444 --- /dev/null +++ b/lib/pages/Blood/user_agreement_page.dart @@ -0,0 +1,523 @@ +import 'package:diplomaticquarterapp/core/viewModels/TermsConditionsViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_html/flutter_html.dart'; +import 'package:provider/provider.dart'; + +class UserAgreementPage extends StatefulWidget { + @override + State createState() => _UserAgreementPageState(); +} + +class _UserAgreementPageState extends State { + late ProjectViewModel projectViewModel; + + bool acceptTerms = false; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getUserTermsAndConditions(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).termsConditions, + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).termsHeading, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions1, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions2, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions3, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions4, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions5, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading2, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions6, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading3, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions7, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions8, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions9, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions10, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions11, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions12, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions12a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions12b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions12c, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions13, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions14, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions14a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions14b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading4, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions15, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions16, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions16a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions16b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions17, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions18, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions19, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions19a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions19b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading5, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions20, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions21, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading6, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions21, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions22, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions23, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions24, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading7, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions25, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions25a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions25b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions25c, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions26, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions27, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions28, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions29, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions30, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions31, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions32, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading8, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions33, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions33a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions33b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions34, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions34a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions34b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions34c, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions34d, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions34e, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions35, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions35a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions35b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions35c, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions35d, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions35e, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions36, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions37, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions38, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions39, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions39a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions39b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions39c, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions39d, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading9, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions40, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions41, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading10, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions42, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions43, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading11, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions44, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading12, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions45, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(24.0), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Checkbox( + value: acceptTerms, + onChanged: (v) { + setState(() => acceptTerms = v!); + }), + Expanded( + child: Text( + TranslationBase.of(context).termsConditionsRead, + style: TextStyle( + fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + ), + ], + ), + mHeight(75.0), + ], + ), + ), + ), + bottomSheet: Container( + color: CustomColors.white, + padding: EdgeInsets.fromLTRB(12.0, 1.0, 12.0, 25.0), + child: DefaultButton( + TranslationBase.of(context).acceptLbl.toUpperCase(), + acceptTerms + ? () { + Navigator.pop(context); + } + : null, + color: CustomColors.green, + disabledColor: CustomColors.grey2, + ), + ), + ), + ); + } +} diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart new file mode 100644 index 00000000..cd2d8c7a --- /dev/null +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -0,0 +1,1213 @@ +import 'dart:convert'; +import 'dart:developer'; +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/PayfortEnums.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/ApplePayInsertRequest.dart'; +import 'package:diplomaticquarterapp/models/header_model.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_project_details_resp_model.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.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'; +import 'package:provider/provider.dart'; + +import '../../models/Appointments/PatientPackageComponent.dart'; +import 'book_reminder_page.dart'; +import 'components/DocAvailableAppointments.dart'; + +class BookConfirm extends StatefulWidget { + DoctorList doctor; + String selectedDate; + String selectedTime; + + String appoDateFormatted = ""; + String appoTimeFormatted = ""; + bool isLiveCareAppointment; + int initialSlotDuration; + + bool isWalkinAppointment = false; + + BookConfirm( + {required this.doctor, required this.selectedDate, required this.isLiveCareAppointment, required this.selectedTime, required this.initialSlotDuration, required this.isWalkinAppointment}); + + late DoctorsListService service; + late PatientShareResponse patientShareResponse; + + // AuthenticatedUser authUser; + + @override + _BookConfirmState createState() => _BookConfirmState(); +} + +class _BookConfirmState extends State { + late ProjectViewModel projectViewModel; + late ToDoCountProviderModel toDoProvider; + + AppSharedPreferences sharedPref = new AppSharedPreferences(); + + bool isInsured = false; + bool isEligible = false; + bool isCash = false; + + String? selectedPaymentMethod = ""; + String? selectedInstallments = ""; + String? tamaraPaymentStatus; + String? tamaraOrderID; + String? transID; + late MyInAppBrowser browser; + + @override + void initState() { + // widget.authUser = new AuthenticatedUser(); + // getPatientData(); + widget.service = new DoctorsListService(); + widget.patientShareResponse = new PatientShareResponse(); + super.initState(); + } + + @override + Widget build(BuildContext context) { + toDoProvider = Provider.of(context); + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: widget.doctor.doctorTitle! + " " + widget.doctor.name!, + isShowDecPage: false, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + body: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + DoctorHeader( + headerModel: HeaderModel( + widget.doctor.name!, + widget.doctor.doctorID!, + widget.doctor.doctorImageURL!, + widget.doctor.speciality!, + "", + widget.doctor.projectName!, + null, + null, + widget.doctor.nationalityFlagURL ?? "", + widget.doctor.doctorRate, + null, + widget.doctor.noOfPatientsRate, + "", + ), + isNeedToShowButton: false, + ), + Padding( + padding: const EdgeInsets.all(20.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).confirmAppoHeading, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 16.0, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + mHeight(20), + Container( + decoration: cardRadius(12), + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.fromLTRB(16, 20, 16, 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).appoInfo, + style: TextStyle( + fontSize: 14.0, + color: Colors.black, + letterSpacing: -0.36, + fontWeight: FontWeight.w600, + ), + ), + mHeight(16), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + if (!widget.isLiveCareAppointment) showInfo(TranslationBase.of(context).hospital, widget.doctor.projectName!), + showInfo(TranslationBase.of(context).clinic, widget.doctor.clinicName!), + showInfo(TranslationBase.of(context).date, getDate()), + showInfo(TranslationBase.of(context).time, widget.selectedTime) + ], + ), + ], + ), + ), + ), + mHeight(12), + Container( + decoration: cardRadius(12), + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.fromLTRB(16, 20, 16, 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).patientInfo, + style: TextStyle( + fontSize: 14.0, + color: Colors.black, + letterSpacing: -0.36, + fontWeight: FontWeight.w600, + ), + ), + mHeight(16), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + showInfo(TranslationBase.of(context).name, projectViewModel.user!.firstName! + " " + projectViewModel.user!.lastName!), + showInfo(TranslationBase.of(context).gender, projectViewModel.user!.genderDescription!), + showInfo(TranslationBase.of(context).age, projectViewModel.user!.age.toString()) + ], + ), + ], + ), + ), + ), + ], + ), + ), + SizedBox( + height: 120.0, + ), + ], + ), + ), + bottomSheet: Container( + color: CustomColors.appBackgroudGreyColor, + child: Container( + width: MediaQuery.of(context).size.width, + height: 45.0, + margin: EdgeInsets.all(16), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width * 0.7, + height: 40.0, + child: CustomTextButton( + backgroundColor: CustomColors.green, + disabledForegroundColor: new Color(0xFFbcc2c4).withOpacity(0.38), + disabledBackgroundColor: new Color(0xFFbcc2c4).withOpacity(0.12), + elevation: 0, + onPressed: () async { + bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) ?? false; + + if (widget.isWalkinAppointment) { + getWalkinAppointmentPatientShare(); + } else { + if (isLiveCareSchedule) { + insertLiveCareScheduledAppointment(context, widget.doctor); + } else { + checkPatientHasDermaPackage(widget.doctor, projectViewModel.user.patientID!); + } + } + }, + child: Text(widget.isWalkinAppointment ? TranslationBase.of(context).addToWaitingList : TranslationBase.of(context).bookAppo, + style: TextStyle(fontSize: 16.0, letterSpacing: -0.48, color: Colors.white)), + ), + ), + ), + ), + ); + } + + getWalkinAppointmentPatientShare() { + String errorMsg = ""; + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + GifLoaderDialogUtils.showMyDialog(context); + appo.doctorTitle = widget.doctor.doctorTitle; + appo.doctorNameObj = widget.doctor.name; + appo.appointmentDate = DateUtil.convertDateToString(DateTime.now()); + appo.projectName = widget.doctor.projectName; + + widget.service + .getPatientShareForWalkInAppointment( + widget.doctor.clinicID!, + widget.doctor.projectID!, + widget.doctor.doctorID!, + ) + .then((res) { + widget.patientShareResponse = new PatientShareResponse.fromJson(res["OnlineCheckInAppointmentsWalkInModel"]); + GifLoaderDialogUtils.hideDialog(context); + + isInsured = res["IsInsured"]; + isEligible = res["IsEligible"]; + isCash = res["IsCash"]; + + if (isCash) { + if (widget.patientShareResponse.patientShareWithTax != 0 || widget.patientShareResponse.patientShareWithTax != 0.0) { + openPaymentDialog(appo, widget.patientShareResponse!); + } else { + insertWalkInAppointment(context, widget.doctor, widget.initialSlotDuration, null); + } + } else { + if (isInsured && isEligible) { + if (widget.patientShareResponse.patientShareWithTax != 0 || widget.patientShareResponse.patientShareWithTax != 0.0) { + openPaymentDialog(appo, widget.patientShareResponse!); + } else { + insertWalkInAppointment(context, widget.doctor, widget.initialSlotDuration, null); + } + } else { + if (isInsured && !isEligible) { + errorMsg = TranslationBase.of(context).invalidEligibility; + } else { + errorMsg = TranslationBase.of(context).invalidInsurance; + } + ConfirmDialog dialog = new ConfirmDialog( + isDissmissable: false, + context: context, + confirmMessage: errorMsg, + okText: TranslationBase.of(context).updateInsuranceText, + cancelText: TranslationBase.of(context).continueCash, + okFunction: () => {openUpdateInsurance()}, + cancelFunction: () => {continueAsCashForWalkIn(widget.doctor.projectID!)}); + dialog.showAlertDialog(context); + } + } + + // widget.patientShareResponse = new PatientShareResponse.fromJson(res["OnlineCheckInAppointmentsWalkInModel"]); + // GifLoaderDialogUtils.hideDialog(context); + // if (widget.patientShareResponse.patientShareWithTax != 0 || widget.patientShareResponse.patientShareWithTax != 0.0) { + // openPaymentDialog(appo, widget.patientShareResponse!); + // } else { + // insertWalkInAppointment(context, widget.doctor, widget.initialSlotDuration, null); + // } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + openPaymentDialog(AppoitmentAllHistoryResultList appo, PatientShareResponse patientShareResponse) { + showGeneralDialog( + barrierColor: Colors.black.withOpacity(0.5), + transitionBuilder: (context, a1, a2, widget) { + final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0; + return Transform( + transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), + child: Opacity( + opacity: a1.value, + child: PaymentDialog( + appo: appo, + patientShareResponse: patientShareResponse, + isCashPatient: isCash, + onPaymentMethodSelected: () {}, + ), + ), + ); + }, + transitionDuration: Duration(milliseconds: 500), + barrierDismissible: false, + barrierLabel: '', + context: context, + pageBuilder: (context, animation1, animation2) => SizedBox()).then((value) { + print(value); + if (value != null) { + navigateToPaymentMethod(context, value as PatientShareResponse); + // projectViewModel.analytics.todoList.to_do_list_confirm_payment_details(appo); + } else { + // projectViewModel.analytics.todoList.to_do_list_cancel_payment_details(appo); + } + }); + } + + Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse) async { + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + appo.projectID = widget.doctor.projectID; + appo.clinicID = widget.doctor.clinicID; + appo.clinicName = widget.doctor.clinicName; + appo.projectName = widget.doctor.projectName; + appo.appointmentNo = DateTime.now().millisecondsSinceEpoch; + appo.isLiveCareAppointment = false; + appo.doctorID = widget.doctor.doctorID; + appo.appointmentDate = DateUtil.convertDateToString(DateTime.now()); //widget.patientShareResponse.appointmentDate; + appo.serviceID = widget.patientShareResponse.serviceID; + + Navigator.push( + context, + FadePage( + page: PaymentMethod( + onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) { + setState(() {}); + }, + patientShare: widget.patientShareResponse.patientShareWithTax))) + .then((value) { + selectedPaymentMethod = value[0]; + if (value != null) { + if (selectedPaymentMethod == "ApplePay") { + if (projectViewModel.havePrivilege(103)) { + startApplePay(appo, patientShareResponse); + } else { + openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo); + } + } else { + openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo); + } + projectViewModel.analytics.appointment.payment_method(appointment_type: 'Walk-In', clinic: widget.doctor.clinicName, payment_method: value[0], payment_type: 'appointment'); + } + }); + } + + void startApplePay(AppoitmentAllHistoryResultList appo, PatientShareResponse patientShareResponse) async { + transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo); + print("TransactionID: $transID"); + GifLoaderDialogUtils.showMyDialog(context); + + LiveCareService service = new LiveCareService(); + ApplePayInsertRequest applePayInsertRequest = new ApplePayInsertRequest(); + + PayfortProjectDetailsRespModel? payfortProjectDetailsRespModel; + await context.read().getProjectDetailsForPayfort(projectId: appo.projectID, serviceId: ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum()).then((value) { + payfortProjectDetailsRespModel = value!; + }); + + applePayInsertRequest.clientRequestID = transID; + applePayInsertRequest.clinicID = appo.clinicID; + applePayInsertRequest.currency = projectViewModel.user.outSA == 1 ? "AED" : "SAR"; + // applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress; + applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com"; + applePayInsertRequest.customerID = projectViewModel.user.patientID; + applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!; + applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); + applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); + applePayInsertRequest.doctorID = appo.doctorID; + applePayInsertRequest.projectID = appo.projectID.toString(); + applePayInsertRequest.serviceID = ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum().toString(); + applePayInsertRequest.channelID = 3; + applePayInsertRequest.patientID = projectViewModel.user.patientID; + applePayInsertRequest.patientTypeID = projectViewModel.user.patientType; + applePayInsertRequest.patientOutSA = projectViewModel.user.outSA; + applePayInsertRequest.appointmentDate = appo.appointmentDate; + applePayInsertRequest.appointmentNo = appo.appointmentNo; + applePayInsertRequest.orderDescription = "Appointment Payment"; + applePayInsertRequest.liveServiceID = "0"; + applePayInsertRequest.latitude = "0.0"; + applePayInsertRequest.longitude = "0.0"; + applePayInsertRequest.amount = patientShareResponse.patientShareWithTax.toString(); + applePayInsertRequest.isSchedule = appo.isLiveCareAppointment! ? "1" : "0"; + applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en'; + applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2; + applePayInsertRequest.userName = projectViewModel.user.patientID; + applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html"; + applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html"; + applePayInsertRequest.paymentOption = "ApplePay"; + + applePayInsertRequest.isMobSDK = true; + applePayInsertRequest.merchantReference = transID; + applePayInsertRequest.merchantIdentifier = payfortProjectDetailsRespModel!.merchantIdentifier!; + applePayInsertRequest.commandType = "PURCHASE"; + applePayInsertRequest.signature = payfortProjectDetailsRespModel!.signature; + applePayInsertRequest.accessCode = payfortProjectDetailsRespModel!.accessCode; + applePayInsertRequest.shaRequestPhrase = payfortProjectDetailsRespModel!.shaRequest; + applePayInsertRequest.shaResponsePhrase = payfortProjectDetailsRespModel!.shaResponse; + applePayInsertRequest.returnURL = ""; + + service.applePayInsertRequest(applePayInsertRequest, context).then((res) async { + if (res["MessageStatus"] == 1) { + await context.read().initiateApplePayWithPayfort( + customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, + // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, + customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com", + orderDescription: "Walk-In appointment payment", + orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()), + merchantReference: transID, + payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, + currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", + onFailed: (failureResult) async { + GifLoaderDialogUtils.hideDialog(context); + log("failureResult: ${failureResult.message.toString()}"); + AppToast.showErrorToast(message: failureResult.message.toString()); + }, + onSuccess: (successResult) async { + log("Payfort: ${successResult.responseMessage}"); + await context.read().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult); + checkPaymentStatus(appo); + }, + projectId: appo.projectID, + serviceTypeEnum: ServiceTypeEnum.appointmentPayment, + ); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: "An error occurred while processing your request"); + } + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + }); + } + + openPayment(List paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async { + browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); + selectedPaymentMethod = paymentMethod[0]; + selectedInstallments = paymentMethod[1]; + transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo); + browser.openPaymentBrowser( + amount, + "Walk-In appointment payment", + transID!, + appo.projectID.toString(), + authenticatedUser.emailAddress!, + paymentMethod[0]!, + authenticatedUser.patientType, + authenticatedUser.firstName!, + authenticatedUser.patientID, + authenticatedUser, + browser, + widget.patientShareResponse.isLiveCareAppointment!, + "2", + widget.patientShareResponse.isLiveCareAppointment! ? widget.patientShareResponse.clinicID.toString() : "", + context, + widget.patientShareResponse.appointmentDate, + widget.patientShareResponse.appointmentNo, + widget.patientShareResponse.clinicID, + widget.patientShareResponse.doctorID, + paymentMethod[1]); + // } + } + + onBrowserLoadStart(String url) { + if (selectedPaymentMethod == "TAMARA") { + if (Platform.isAndroid) { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['status']; + tamaraOrderID = uri.queryParameters['AuthorizePaymentId']; + } else { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['paymentStatus']; + tamaraOrderID = uri.queryParameters['orderId']; + } + } + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + try { + if (selectedPaymentMethod == "TAMARA") { + checkTamaraPaymentStatus(transID!, appo); + // if (tamaraPaymentStatus != null && tamaraPaymentStatus!.toLowerCase() == "approved") { + // updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID!, num.parse(selectedInstallments!), appo); + // } else { + // updateTamaraRequestStatus( + // "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID! != null ? tamaraOrderID! : "", num.parse(selectedInstallments!), appo); + // } + } else { + checkPaymentStatus(appo); + } + } catch (err) { + print(err); + } + } + + checkTamaraPaymentStatus(String orderID, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getTamaraPaymentStatus(orderID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["status"].toString().toLowerCase() == "success") { + updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID!, int.parse(selectedInstallments!), appo); + } else { + updateTamaraRequestStatus( + "Failed", "00", Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), tamaraOrderID != null ? tamaraOrderID! : "", int.parse(selectedInstallments!), appo); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, num selectedInstallments, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + try { + DoctorsListService service = new DoctorsListService(); + service.updateTamaraRequestStatus(responseMessage, status, clientRequestID, tamaraOrderID, selectedInstallments).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (tamaraPaymentStatus!.toLowerCase() == "approved") { + insertWalkInAppointment(context, widget.doctor, widget.initialSlotDuration, tamaraOrderID); + } + }).catchError((err) { + print(err); + AppToast.showErrorToast(message: err); + GifLoaderDialogUtils.hideDialog(context); + }); + } catch (err) { + print(err); + } + } + + addAdvancedNumberRequestTamara(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) {}).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + markAppointmentForTamara(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.markAppointmentForTamara(appo.projectID!, appo.appointmentNo.toString()).then((res) { + GifLoaderDialogUtils.hideDialog(context); + sendNfcCheckInRequest(projectViewModel.waitingAppointmentNFCCode, 2, int.parse(appo.appointmentNo), projectViewModel.waitingAppointmentProjectID, appo.clinicID); + }).catchError((err) { + print(err); + AppToast.showErrorToast(message: err); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + String txn_ref; + num amount; + String payment_method; + final currency = projectViewModel.user!.outSA == 0 ? "sar" : 'aed'; + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.checkPaymentStatus(transID!, false, context).then((res) { + String paymentInfo = res['Response_Message']; + if (paymentInfo == 'Success') { + txn_ref = res['Merchant_Reference']; + amount = res['Amount']; + payment_method = res['PaymentMethod']; + GifLoaderDialogUtils.hideDialog(context); + insertWalkInAppointment(context, widget.doctor, widget.initialSlotDuration, res); + projectViewModel.analytics.appointment.payment_success( + appointment_type: 'Walk-In', payment_method: payment_method, clinic: appo.clinicName, hospital: appo.projectName, txn_amount: "$amount", txn_currency: currency, txn_number: txn_ref); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['Response_Message']); + projectViewModel.analytics.appointment.payment_fail( + appointment_type: 'Walk-In', + payment_method: selectedPaymentMethod, + clinic: appo.clinicName, + hospital: appo.projectName, + txn_amount: widget.patientShareResponse.patientShareWithTax.toString(), + txn_currency: currency, + error_type: res['Response_Message']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err.toString()); + print(err); + }); + } + + Widget showInfo(String title, String des) { + return Container( + child: Row( + children: [ + Text( + title + ": ", + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Color(0xFF575757), + letterSpacing: -0.4, + ), + ), + Text( + des, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Colors.black, + letterSpacing: -0.48, + ), + ), + ], + ), + ); + } + + cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, BuildContext context, {int? invoiceNumber, int? lineItemNo, String? invoiceNoVP}) async { + ConfirmDialog.closeAlertDialog(context); + GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false); + DoctorsListService service = new DoctorsListService(); + bool isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) ?? false; + service.cancelAppointment(appo, context, isReschedule: true).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + Future.delayed(Duration(milliseconds: 500), () async { + if (isLiveCareSchedule != null && isLiveCareSchedule) { + insertLiveCareScheduledAppointment(context, widget.doctor); + } else { + insertAppointment(context, widget.doctor, widget.initialSlotDuration, invoiceNumber: invoiceNumber, lineItemNo: lineItemNo, invoiceNoVP: invoiceNoVP); + } + }); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + }); + } + + checkPatientNphiesEligibility(DoctorList docObject, String appointmentNo, BuildContext context) { + widget.service.checkPatientNphiesEligibility(docObject.projectID!).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["isNphiesMatchedWithVida"]) { + getPatientShare(context, appointmentNo, docObject.clinicID!, docObject.projectID!, docObject); + getToDoCount(); + } else { + ConfirmDialog dialog = ConfirmDialog( + isDissmissable: false, + context: context, + confirmMessage: res['ErrorEndUserMessage'], + okText: "Update insurance", + cancelText: "Continue as cash", + okFunction: () => {openUpdateInsurance()}, + cancelFunction: () => {continueAsCash(docObject, appointmentNo, false)}); + dialog.showAlertDialog(context); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + void openUpdateInsurance() { + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + } + + void continueAsCash(DoctorList docObject, String appointmentNo, bool isLiveCareAppointment) { + GifLoaderDialogUtils.showMyDialog(context); + widget.service.convertPatientToCash(docObject.projectID!).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + if (isLiveCareAppointment) { + getLiveCareAppointmentPatientShare(context, appointmentNo, docObject!.clinicID!, docObject.projectID!, docObject); + } else { + getPatientShare(context, appointmentNo, docObject.clinicID!, docObject.projectID!, docObject); + } + getToDoCount(); + } else { + AppToast.showErrorToast(message: res["ErrorEndUserMessage"]); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + void continueAsCashForWalkIn(int projectID) { + GifLoaderDialogUtils.showMyDialog(context); + widget.service.convertPatientToCash(projectID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + getWalkinAppointmentPatientShare(); + } else { + AppToast.showErrorToast(message: res["ErrorEndUserMessage"]); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + insertWalkInAppointment(context, DoctorList docObject, int initialSlotDuration, paymentRes) async { + GifLoaderDialogUtils.showMyDialog( + context, + ); + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + appo.doctorID = docObject.doctorID; + appo.clinicID = docObject.clinicID; + appo.projectID = docObject.projectID; + + widget.service + .insertWalkInAppointment( + docObject.doctorID!, docObject.clinicID!, docObject.projectID!, widget.selectedTime, widget.selectedDate, initialSlotDuration, projectViewModel.isArabic ? 1 : 2, context) + .then((res) { + if (res['MessageStatus'] == 1) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess); + appo.appointmentNo = res["AppointmentNo"]; // Add appointment No to the appointment project + Future.delayed(Duration(milliseconds: 500), () { + if (selectedPaymentMethod == "TAMARA") { + markAppointmentForTamara(appo); + addAdvancedNumberRequestTamara("Tamara-Advance-0000", paymentRes, res["AppointmentNo"].toString(), appo); + } else { + if (widget.patientShareResponse.patientShareWithTax != 0 || widget.patientShareResponse.patientShareWithTax != 0.0) { + createAdvancePayment(paymentRes, appo); + } else { + sendNfcCheckInRequest(projectViewModel.waitingAppointmentNFCCode, 2, int.parse(res["AppointmentNo"]), projectViewModel.waitingAppointmentProjectID, appo.clinicID); + } + } + }); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + }); + } + + createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog( + context, + ); + DoctorsListService service = new DoctorsListService(); + String paymentReference = res['Fort_id'].toString(); + service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + addAdvancedNumberRequest( + Utils.isVidaPlusProject(projectViewModel, appo.projectID!) + ? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString() + : res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), + paymentReference, + appo.appointmentNo.toString(), + appo); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + addAdvancedNumberRequest(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog( + context, + ); + DoctorsListService service = new DoctorsListService(); + service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + sendNfcCheckInRequest(projectViewModel.waitingAppointmentNFCCode, 2, int.parse(appointmentID), projectViewModel.waitingAppointmentProjectID, appo.clinicID); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + sendNfcCheckInRequest(String nfcId, int checkInBy, int appoNo, int projectID, int clinicID) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.sendCheckinNfcRequest(appoNo, nfcId, projectID, checkInBy, clinicID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + _showMyDialog(res["SuccessMsg"], this.context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + _showMyDialog(err, this.context); + }); + } + + checkPatientHasDermaPackage(DoctorList doctor, int patientID) { + GifLoaderDialogUtils.showMyDialog(context); + widget.service + .checkPatientHasDermaPackage( + patientID!, + doctor.clinicID!, + doctor.projectID!, + doctor.doctorID!, + projectViewModel.isArabic ? 1 : 2, + context, + ) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1 && res['PatientPackageComponent']['Message'] == 'Success') { + PatientPackageComponent package = PatientPackageComponent.fromJson(res['PatientPackageComponent']); + + ConfirmDialog dialog = ConfirmDialog( + context: context, + confirmMessage: "${TranslationBase.of(context).existingPackage} ${package.patientPackageComponents![0].procedureName}, ${TranslationBase.of(context).continueOrbookNew}", + okText: TranslationBase.of(context).proceedPackage, + cancelText: TranslationBase.of(context).newAppointment, + okFunction: () => { + ConfirmDialog.closeAlertDialog(context), + insertAppointment(context, widget.doctor, widget.initialSlotDuration, + invoiceNumber: package.patientPackageComponents![0].invoiceNo, + lineItemNo: package.patientPackageComponents![0].lineItemNo, + invoiceNoVP: package.patientPackageComponents![0].invoiceNo_VP.toString()) + }, + cancelFunction: () => {insertAppointment(context, widget.doctor, widget.initialSlotDuration)}, + ); + dialog.showAlertDialog(context); + } else { + insertAppointment(context, widget.doctor, widget.initialSlotDuration); + } + }).onError((error, stackTrace) { + insertAppointment(context, widget.doctor, widget.initialSlotDuration); + }); + } + + insertAppointment(context, DoctorList docObject, int initialSlotDuration, {int? invoiceNumber, int? lineItemNo, String? invoiceNoVP}) async { + final timeSlot = DocAvailableAppointments.selectedAppoDateTime; + String logs = await sharedPref.getString('selectedLogSlots'); + List decodedLogs = json.decode(logs); + GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false); + AppoitmentAllHistoryResultList appo; + widget.service + // .insertAppointment(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, widget.selectedTime, widget.selectedDate, initialSlotDuration, context, 'null', null, null, projectViewModel) + .insertAppointment(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, widget.selectedTime, widget.selectedDate, initialSlotDuration, projectViewModel.isArabic ? 1 : 2, context, + null, null, null, projectViewModel, invoiceNumber, lineItemNo, invoiceNoVP) + .then((res) { + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess); + + Future.delayed(Duration(milliseconds: 500), () { + // checkPatientNphiesEligibility(docObject, res['AppointmentNo'], context); + getToDoCount(); + getPatientShare(context, res['AppointmentNo'], docObject.clinicID!, docObject.projectID!, docObject); + }); + widget.service.logDoctorFreeSlots(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, decodedLogs, res['AppointmentNo'], context).then((res) { + if (res['MessageStatus'] == 1) { + print("Logs Saved"); + } else { + print("Error Saving logs"); + } + }); + projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'regular', dateTime: timeSlot!, doctor: widget.doctor); + } else { + GifLoaderDialogUtils.hideDialog(context); + appo = AppoitmentAllHistoryResultList(); + appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo']; + appo.clinicID = res['SameClinicApptList'][0]['DoctorID']; + appo.projectID = res['SameClinicApptList'][0]['ProjectID']; + appo.endTime = res['SameClinicApptList'][0]['EndTime']; + appo.startTime = res['SameClinicApptList'][0]['StartTime']; + appo.doctorID = res['SameClinicApptList'][0]['DoctorID']; + appo.isLiveCareAppointment = false; + appo.originalClinicID = 0; + appo.originalProjectID = 0; + appo.appointmentDate = res['SameClinicApptList'][0]['AppointmentDate']; + + ConfirmDialog dialog = ConfirmDialog( + context: context, + confirmMessage: res['ErrorEndUserMessage'], + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => {cancelAppointment(docObject, appo, context, invoiceNumber: invoiceNumber, lineItemNo: lineItemNo)}, + cancelFunction: () => {}, + ); + dialog.showAlertDialog(context); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err, localContext: context); + }); + projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'regular', dateTime: timeSlot!, doctor: widget.doctor); + } + + insertLiveCareScheduledAppointment(context, DoctorList docObject) { + final timeSlot = DocAvailableAppointments.selectedAppoDateTime; + widget.selectedDate = timeSlot!.toUtc().add(Duration(hours: 3)).toString().split(" ")[0]; + widget.selectedTime = timeSlot.toUtc().add(Duration(hours: 3)).toString().split(" ")[1].substring(0, 5); + GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false); + AppoitmentAllHistoryResultList appo; + widget.service + .insertLiveCareScheduleAppointment( + docObject!.doctorID!, docObject.clinicID!, docObject.projectID!, docObject.serviceID, widget.selectedTime, widget.selectedDate, projectViewModel.isArabic ? 1 : 2, context) + .then((res) { + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess); + print(res['AppointmentNo']); + + Future.delayed(new Duration(milliseconds: 500), () { + getLiveCareAppointmentPatientShare(context, res['AppointmentNo'], docObject!.clinicID!, docObject.projectID!, docObject); + getToDoCount(); + }); + projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'livecare', dateTime: timeSlot, doctor: widget.doctor); + } else { + GifLoaderDialogUtils.hideDialog(context); + appo = new AppoitmentAllHistoryResultList(); + appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo']; + appo.clinicID = res['SameClinicApptList'][0]['DoctorID']; + appo.projectID = res['SameClinicApptList'][0]['ProjectID']; + appo.endTime = res['SameClinicApptList'][0]['EndTime']; + appo.startTime = res['SameClinicApptList'][0]['StartTime']; + appo.doctorID = res['SameClinicApptList'][0]['DoctorID']; + appo.isLiveCareAppointment = true; + appo.originalClinicID = 0; + appo.originalProjectID = 0; + appo.appointmentDate = res['SameClinicApptList'][0]['AppointmentDate']; + + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: res['ErrorEndUserMessage'], + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => {cancelAppointment(docObject, appo, context)}, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + + projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'livecare', dateTime: timeSlot, doctor: widget.doctor); + } + + getToDoCount() { + toDoProvider.setState(0, 0, true, toDoProvider.notificationsCount); + ClinicListService service = new ClinicListService(); + service.getActiveAppointmentNo(context).then((res) { + print(res['AppointmentActiveNumber']); + if (res['MessageStatus'] == 1) { + toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider.notificationsCount); + // toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount); + } else {} + }).catchError((err) { + print(err); + }); + } + + getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) { + int languageID = projectViewModel.isArabic ? 1 : 2; + String errorMsg = ""; + GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false); + widget.service.getPatientShare(appointmentNo, clinicID, projectID, languageID, context).then((res) { + projectViewModel.selectedBodyPartList.clear(); + projectViewModel.laserSelectionDuration = 0; + if (res['OnlineCheckInAppointments'].length != 0) { + widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]); + } + + isInsured = res["IsInsured"]; + isEligible = res["IsEligible"]; + isCash = res["IsCash"]; + + if (isCash) { + navigateToBookSuccess(context, docObject, widget.patientShareResponse, isCash); + } else { + if (isInsured && isEligible) { + navigateToBookSuccess(context, docObject, widget.patientShareResponse, isCash); + } else { + if (isInsured && !isEligible) { + errorMsg = TranslationBase.of(context).invalidEligibility; + } else { + errorMsg = TranslationBase.of(context).invalidInsurance; + } + ConfirmDialog dialog = new ConfirmDialog( + isDissmissable: false, + context: context, + confirmMessage: errorMsg, + okText: TranslationBase.of(context).updateInsuranceText, + cancelText: TranslationBase.of(context).continueCash, + okFunction: () => {openUpdateInsurance()}, + cancelFunction: () => {continueAsCash(docObject, appointmentNo, false)}); + dialog.showAlertDialog(context); + } + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + // AppToast.showErrorToast(message: err); + projectViewModel.selectedBodyPartList.clear(); + projectViewModel.laserSelectionDuration = 0; + navigateToHome(context); + print(err); + }); + } + + getLiveCareAppointmentPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) { + String errorMsg = ""; + + widget.service.getLiveCareAppointmentPatientShare(appointmentNo, clinicID, projectID, projectViewModel.isArabic ? 1 : 2, context).then((res) { + widget.patientShareResponse = new PatientShareResponse.fromJson(res); + GifLoaderDialogUtils.hideDialog(context); + + isInsured = res["IsInsured"]; + isEligible = res["IsEligible"]; + isCash = res["IsCash"]; + + if (isCash) { + navigateToBookSuccess(context, docObject, widget.patientShareResponse, isCash); + } else { + if (isInsured && isEligible) { + navigateToBookSuccess(context, docObject, widget.patientShareResponse, isCash); + } else { + if (isInsured && !isEligible) { + errorMsg = TranslationBase.of(context).invalidEligibility; + } else { + errorMsg = TranslationBase.of(context).invalidInsurance; + } + ConfirmDialog dialog = new ConfirmDialog( + isDissmissable: false, + context: context, + confirmMessage: errorMsg, + okText: TranslationBase.of(context).updateInsuranceText, + cancelText: TranslationBase.of(context).continueCash, + okFunction: () => {openUpdateInsurance()}, + cancelFunction: () => {continueAsCash(docObject, appointmentNo, true)}); + dialog.showAlertDialog(context); + } + } + + // navigateToBookSuccess(context, docObject, widget.patientShareResponse, false); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + navigateToHome(context); + print(err); + }); + } + + String getTime(DateTime dateTime) { + final DateFormat formatter = DateFormat('HH:mm'); + setState(() { + widget.appoTimeFormatted = formatter.format(dateTime); + print(widget.appoTimeFormatted); + }); + return widget.appoTimeFormatted; + } + + String getDate() { + var dateObj = new DateTime(int.parse(widget.selectedDate.split("-")[0]), int.parse(widget.selectedDate.split("-")[1]), int.parse(widget.selectedDate.split("-")[2]), 0, 0, 0, 0); + + setState(() { + widget.appoDateFormatted = DateUtil.getWeekDay(dateObj.weekday) + ", " + dateObj.day.toString() + " " + DateUtil.getMonth(dateObj.month) + " " + dateObj.year.toString(); + }); + + return DateUtil.getDayMonthYearDateFormatted(dateObj); + } + + DateTime getDateTime() { + var parts = widget.selectedTime.split(':'); + + try { + var dateObj = new DateTime(int.parse(widget.selectedDate.split("-")[0]), int.parse(widget.selectedDate.split("-")[1]), int.parse(widget.selectedDate.split("-")[2]), int.parse(parts[0].trim()), + int.parse(parts[1].trim()), 0, 0); + return dateObj; + } catch (e) { + var dateObj = new DateTime(int.parse(widget.selectedDate.split("-")[0]), int.parse(widget.selectedDate.split("-")[1]), int.parse(widget.selectedDate.split("-")[2]), 0, 0, 0, 0); + return dateObj; + } + } + + String getDoctorSpeciality(List docSpecial) { + String docSpeciality = ""; + docSpecial.forEach((v) { + docSpeciality = docSpeciality + v + "\n"; + }); + return docSpeciality; + } + + // getPatientData() async { + // AppSharedPreferences sharedPref = AppSharedPreferences(); + // if (await sharedPref.getObject(USER_PROFILE) != null) { + // var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); + // setState(() { + // print(data); + // widget.authUser = data; + // }); + // } + // } + + Future navigateToHome(context) async { + Navigator.of(context).popAndPushNamed(HOME); + } + + Future navigateToBookSuccess(context, DoctorList docObject, PatientShareResponse patientShareResponse, bool isCash) async { + GifLoaderDialogUtils.hideDialog(context); + this.sharedPref.remove(IS_LIVECARE_APPOINTMENT); + Navigator.push( + context, + FadePage( + page: BookReminderPage( + docObject: docObject, + patientShareResponse: patientShareResponse, + appoDateFormatted: widget.appoDateFormatted, + appoTimeFormatted: widget.selectedTime, + dateTime: getDateTime(), + isCash: isCash, + ), + ), + ); + } + + 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(); + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + }, + ), + ], + ); + }, + ); + } +} diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart new file mode 100644 index 00000000..61b0f9d9 --- /dev/null +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -0,0 +1,1181 @@ +import 'dart:developer'; +import 'dart:io'; + +import 'package:diplomaticquarterapp/core/enum/PayfortEnums.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/ApplePayInsertRequest.dart'; +import 'package:diplomaticquarterapp/models/header_model.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_project_details_resp_model.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.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:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +import '../../config/shared_pref_kay.dart'; +import 'QRCode.dart'; + +class BookSuccess extends StatefulWidget { + PatientShareResponse patientShareResponse; + DoctorList docObject; + + late MyInAppBrowser browser; + + // final ChromeSafariBrowser chromeBrowser = new MyChromeSafariBrowser(new MyInAppBrowser()); + + String appoDateFormatted; + String appoTimeFormatted; + bool isCash = false; + + BookSuccess({required this.patientShareResponse, required this.docObject, required this.appoDateFormatted, required this.appoTimeFormatted, this.isCash = false}); + + @override + _BookSuccessState createState() => _BookSuccessState(); +} + +class _BookSuccessState extends State { + AppSharedPreferences sharedPref = AppSharedPreferences(); + + // AuthenticatedUser authUser; + + late ProjectViewModel projectViewModel; + String? selectedPaymentMethod = ""; + String? selectedInstallments = ""; + String? tamaraPaymentStatus; + String? tamaraOrderID; + String? transID; + + @override + initState() { + WidgetsBinding.instance.addPostFrameCallback((_) async { + if (widget.patientShareResponse.isLiveCareAppointment! && + (widget.patientShareResponse.patientShareWithTax.toString() == "0" || widget.patientShareResponse.patientShareWithTax.toString() == "0.0")) { + setOnlineCheckInForAppointment(); + } + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: widget.docObject.doctorTitle! + " " + widget.docObject.name!, + isShowDecPage: false, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + body: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + DoctorHeader( + headerModel: HeaderModel( + widget.docObject.name!, + widget.docObject.doctorID!, + widget.docObject.doctorImageURL!, + widget.docObject.speciality!, + "", + widget.docObject.projectName!, + null, + null, + widget.docObject.nationalityFlagURL ?? "", + widget.docObject.doctorRate, + null, + widget.docObject.noOfPatientsRate, + "", + ), + isNeedToShowButton: false, + ), + Container( + alignment: Alignment.center, + color: CustomColors.green, + child: Table( + border: TableBorder(verticalInside: BorderSide(width: 0.5, color: Colors.white)), + children: [ + TableRow( + children: [ + TableCell(child: _getNormalText(TranslationBase.of(context).patientShare)), + TableCell(child: _getNormalText(TranslationBase.of(context).patientShareWithTax)), + ], + ), + TableRow( + children: [ + TableCell(child: _getHeadingText(widget.patientShareResponse.patientShare.toString())), + TableCell(child: _getHeadingText(widget.patientShareResponse.patientShareWithTax.toString())), + ], + ), + ], + ), + ), + getNextActionWidget()!, + ], + ), + ), + bottomSheet: getBottomContainer(), + ); + } + + Widget? getBottomContainer() { + switch (widget.patientShareResponse.nextAction) { + case 0: + return Container(); + break; + case 10: + return _getConfirmAppoButtons(); + break; + case 15: + return _getPaymentPendingAppo(); + break; + case 20: + return _getPayNowButtons(); + break; + case 30: + return _getQRButtons(); + break; + case 50: + return _getConfirmAppoButtons(); + break; + case 90: + return _getQRButtons(); + } + } + + Widget _getQRButtons() { + return Container( + alignment: Alignment.bottomCenter, + margin: EdgeInsets.all(14), + height: MediaQuery.of(context).size.height * 0.18, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Row( + children: [ + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width * 0.7, + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.green, + elevation: 0, + onPressed: () { + GifLoaderDialogUtils.showMyDialog(context); + getAppoQR(context); + }, + child: Text(TranslationBase.of(context).checkinOptions, style: TextStyle(fontSize: 18.0, color: Colors.white)), + ), + ), + ), + mWidth(7), + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width * 0.7, + height: 45.0, + child: CustomTextButton( + backgroundColor: Color(0xffc5272d), + elevation: 0, + onPressed: () { + navigateToHome(context); + // GifLoaderDialogUtils.showMyDialog(context); + // getAppoQR(context); + }, + child: Text(TranslationBase.of(context).done, style: TextStyle(fontSize: 18.0, color: Colors.white)), + ), + ), + ), + ], + ), + ], + ), + ); + } + + Widget _getPayNowButtons() { + return Container( + color: CustomColors.appBackgroudGreyColor, + child: Container( + color: CustomColors.appBackgroudGreyColor, + margin: EdgeInsets.all(14), + height: widget.isCash ? 150.0 : 50, + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.green, + elevation: 0, + onPressed: () { + startPaymentProcess(); + projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: true); + }, + child: Text(TranslationBase.of(context).payNow.toUpperCase(), + style: TextStyle( + fontSize: 18.0, + color: Colors.white, + )), + ), + ), + ), + mWidth(7), + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: Color(0xffc5272d), + elevation: 0, + onPressed: () { + navigateToHome(context); + projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: false); + }, + child: Text(TranslationBase.of(context).payLater.toUpperCase(), style: TextStyle(fontSize: 18.0, color: Colors.white)), + ), + ), + ), + ], + ), + widget.isCash + ? Column( + children: [ + mHeight(10.0), + Text( + TranslationBase.of(context).cashAmountUpdateInsurance, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + ), + ), + mHeight(5.0), + DefaultButton( + TranslationBase.of(context).updateInsuranceText, + () { + Navigator.pop(context, null); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }, + color: Color(0xffEAA118), + textColor: Colors.white, + ), + ], + ) + : Container(), + ], + ), + ), + ); + } + + Widget _getConfirmAppoButtons() { + return Container( + color: CustomColors.appBackgroudGreyColor, + child: Container( + color: CustomColors.appBackgroudGreyColor, + margin: EdgeInsets.all(14), + height: 45.0, + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: Color(0xffc5272d), + elevation: 0, + onPressed: () { + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + appo.clinicID = widget.docObject.clinicID; + appo.projectID = widget.docObject.projectID; + appo.appointmentNo = widget.patientShareResponse.appointmentNo; + appo.serviceID = widget.patientShareResponse.serviceID; + appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment; + appo.doctorID = widget.patientShareResponse.doctorID; + appo.appointmentDate = widget.patientShareResponse.appointmentDate; + if (appo.isLiveCareAppointment!) + insertLiveCareVIDARequest(appo); + else + navigateToHome(context); + }, + child: Text(TranslationBase.of(context).confirmLater, style: TextStyle(fontSize: 16.0, color: Colors.white)), + ), + ), + ), + mWidth(7), + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.green, + elevation: 0, + onPressed: () { + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + appo.clinicID = widget.docObject.clinicID; + appo.projectID = widget.docObject.projectID; + appo.appointmentNo = widget.patientShareResponse.appointmentNo; + appo.serviceID = widget.patientShareResponse.serviceID; + appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment; + appo.doctorID = widget.patientShareResponse.doctorID; + if (appo.isLiveCareAppointment!) { + navigateToHome(context); + } else { + confirmAppointment(appo); + } + }, + child: Text(widget.patientShareResponse.isLiveCareAppointment! ? TranslationBase.of(context).confirmLiveCare : TranslationBase.of(context).confirm, + style: TextStyle(fontSize: 16.0, color: Colors.white)), + ), + ), + ), + ], + ), + ), + ); + } + + Widget? getNextActionWidget() { + switch (widget.patientShareResponse.nextAction) { + case 0: + return Container(); + break; + case 10: + return _getConfirmAppo(); + break; + case 15: + return _getPaymentPendingAppo(); + break; + case 20: + return _getPayNowAppo(); + break; + case 30: + return _getQRAppo(); + break; + case 50: + return _getConfirmAppo(); + break; + case 90: + return _getQRAppo(); + } + } + + String? getNextAction() { + switch (widget.patientShareResponse.nextAction) { + case 0: + return 'No Action'; + break; + case 10: + return 'Confirm'; + break; + case 15: + return 'Payment Pending'; + break; + case 20: + return 'Pay Now'; + break; + case 30: + return 'QR Code'; + break; + case 50: + return 'Confirm LiveCare'; + break; + case 90: + return 'QR Code'; + break; + } + } + + Widget _getConfirmAppo() { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Container( + margin: EdgeInsets.only(top: 30.0, bottom: 40.0), + alignment: Alignment.center, + child: Text(TranslationBase.of(context).confirmAppo, style: TextStyle(fontSize: 18.0, letterSpacing: 0.8)), + ), + Flex( + direction: Axis.horizontal, + children: [ + Expanded( + child: Container( + padding: EdgeInsets.only(left: 10.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + _getBulletPoint("1"), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Text(TranslationBase.of(context).upcomingConfirm, overflow: TextOverflow.clip, style: TextStyle(fontSize: 13.0)), + ), + ], + ), + ), + ), + ], + ), + Flex( + direction: Axis.horizontal, + children: [ + Expanded( + child: Container( + padding: EdgeInsets.only(top: 20.0, left: 10.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + _getBulletPoint("2"), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Text(TranslationBase.of(context).upcomingConfirmMore, overflow: TextOverflow.clip, style: TextStyle(fontSize: 13.0)), + ), + ], + ), + ), + ), + ], + ), + Container(margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 5.0), child: getPaymentMethods()), + ], + ); + } + + Widget _getPaymentPendingAppo() { + return Container(); + } + + setOnlineCheckInForAppointment() { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.setOnlineCheckInForAppointment(widget.patientShareResponse.appointmentNo.toString(), widget.patientShareResponse.projectID!, projectViewModel.isArabic ? 1 : 2, context).then((res) { + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + appo.clinicID = widget.docObject.clinicID; + appo.projectID = widget.docObject.projectID; + appo.appointmentNo = widget.patientShareResponse.appointmentNo; + appo.serviceID = widget.patientShareResponse.serviceID; + appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment; + appo.doctorID = widget.patientShareResponse.doctorID; + appo.appointmentDate = widget.patientShareResponse.appointmentDate; + insertLiveCareVIDARequest(appo, isMoveHome: false); + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + confirmAppointment(AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.confirmAppointment(appo.appointmentNo!, appo.clinicID!, appo.projectID!, appo.isLiveCareAppointment!, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); + if (appo.isLiveCareAppointment!) { + insertLiveCareVIDARequest(appo); + } else { + navigateToHome(context); + } + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo, {bool isMoveHome = true}) { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, appo.appointmentDate!, + Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), projectViewModel.isArabic ? 1 : 2, context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + if (isMoveHome) navigateToHome(context); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + Widget _getPayNowAppo() { + return Padding( + padding: const EdgeInsets.only(left: 20, right: 20, top: 24), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Text( + TranslationBase.of(context).payNowBookSuccess, + style: TextStyle( + fontSize: 24.0, + letterSpacing: -1.44, + fontWeight: FontWeight.bold, + ), + ), + Text( + TranslationBase.of(context).neverWait, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.54, + fontWeight: FontWeight.w600, + ), + ), + mHeight(24), + Text(TranslationBase.of(context).payNowBookSuccesstext1, + overflow: TextOverflow.fade, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.36, + )), + Container(margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), child: getPaymentMethods()), + Text( + TranslationBase.of(context).payNowBookSuccesstext2, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.36, + ), + ), + ], + ), + ); + } + + startPaymentProcess() { + navigateToPaymentMethod(context, widget.patientShareResponse); + } + + Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse) async { + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + appo.projectID = widget.patientShareResponse.projectID; + appo.clinicID = widget.patientShareResponse.clinicID; + appo.clinicName = widget.patientShareResponse.clinicName; + appo.projectName = widget.patientShareResponse.projectName; + appo.appointmentNo = widget.patientShareResponse.appointmentNo; + appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment; + appo.doctorID = widget.patientShareResponse.doctorID; + appo.appointmentDate = widget.patientShareResponse.appointmentDate; + appo.serviceID = widget.patientShareResponse.serviceID; + + Navigator.push( + context, + FadePage( + page: PaymentMethod( + onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) { + setState(() {}); + }, + patientShare: widget.patientShareResponse.patientShareWithTax))) + .then((value) { + selectedPaymentMethod = value[0]; + if (value != null) { + if (selectedPaymentMethod == "ApplePay") { + if (projectViewModel.havePrivilege(103)) { + startApplePay(appo, patientShareResponse); + } else { + openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo); + } + } else { + openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo); + } + projectViewModel.analytics.appointment.payment_method(appointment_type: 'regular', clinic: widget.docObject.clinicName, payment_method: value[0], payment_type: 'appointment'); + } + }); + } + + void startApplePay(AppoitmentAllHistoryResultList appo, PatientShareResponse patientShareResponse) async { + transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo); + print("TransactionID: $transID"); + GifLoaderDialogUtils.showMyDialog(context); + + LiveCareService service = new LiveCareService(); + ApplePayInsertRequest applePayInsertRequest = new ApplePayInsertRequest(); + + PayfortProjectDetailsRespModel? payfortProjectDetailsRespModel; + await context.read().getProjectDetailsForPayfort(projectId: appo.projectID, serviceId: ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum()).then((value) { + payfortProjectDetailsRespModel = value!; + }); + + applePayInsertRequest.clientRequestID = transID; + applePayInsertRequest.clinicID = appo.clinicID; + applePayInsertRequest.currency = projectViewModel.user.outSA == 1 ? "AED" : "SAR"; + // applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress; + applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com"; + applePayInsertRequest.customerID = projectViewModel.user.patientID; + applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!; + applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); + applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); + applePayInsertRequest.doctorID = appo.doctorID; + applePayInsertRequest.projectID = appo.projectID.toString(); + applePayInsertRequest.serviceID = ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum().toString(); + applePayInsertRequest.channelID = 3; + applePayInsertRequest.patientID = projectViewModel.user.patientID; + applePayInsertRequest.patientTypeID = projectViewModel.user.patientType; + applePayInsertRequest.patientOutSA = projectViewModel.user.outSA; + applePayInsertRequest.appointmentDate = appo.appointmentDate; + applePayInsertRequest.appointmentNo = appo.appointmentNo; + applePayInsertRequest.orderDescription = "Appointment Payment"; + applePayInsertRequest.liveServiceID = "0"; + applePayInsertRequest.latitude = "0.0"; + applePayInsertRequest.longitude = "0.0"; + applePayInsertRequest.amount = patientShareResponse.patientShareWithTax.toString(); + applePayInsertRequest.isSchedule = appo.isLiveCareAppointment! ? "1" : "0"; + applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en'; + applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2; + applePayInsertRequest.userName = projectViewModel.user.patientID; + applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html"; + applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html"; + applePayInsertRequest.paymentOption = "ApplePay"; + + applePayInsertRequest.isMobSDK = true; + applePayInsertRequest.merchantReference = transID; + applePayInsertRequest.merchantIdentifier = payfortProjectDetailsRespModel!.merchantIdentifier!; + applePayInsertRequest.commandType = "PURCHASE"; + applePayInsertRequest.signature = payfortProjectDetailsRespModel!.signature; + applePayInsertRequest.accessCode = payfortProjectDetailsRespModel!.accessCode; + applePayInsertRequest.shaRequestPhrase = payfortProjectDetailsRespModel!.shaRequest; + applePayInsertRequest.shaResponsePhrase = payfortProjectDetailsRespModel!.shaResponse; + applePayInsertRequest.returnURL = ""; + + service.applePayInsertRequest(applePayInsertRequest, context).then((res) async { + if (res["MessageStatus"] == 1) { + await context.read().initiateApplePayWithPayfort( + customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, + // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, + customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com", + orderDescription: "Appointment Payment", + orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()), + merchantReference: transID, + payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, + currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", + onFailed: (failureResult) async { + GifLoaderDialogUtils.hideDialog(context); + log("failureResult: ${failureResult.message.toString()}"); + AppToast.showErrorToast(message: failureResult.message.toString()); + }, + onSuccess: (successResult) async { + log("Payfort: ${successResult.responseMessage}"); + await context.read().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult); + checkPaymentStatus(appo); + }, + projectId: appo.projectID, + serviceTypeEnum: ServiceTypeEnum.appointmentPayment, + ); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: "An error occurred while processing your request"); + } + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + }); + } + + openPayment(List paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async { + widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); + selectedPaymentMethod = paymentMethod[0]; + selectedInstallments = paymentMethod[1]; + transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo); + widget.browser.openPaymentBrowser( + amount, + "Appointment check in", + transID!, + appo.projectID.toString(), + authenticatedUser.emailAddress!, + paymentMethod[0]!, + authenticatedUser.patientType, + authenticatedUser.firstName!, + authenticatedUser.patientID, + authenticatedUser, + widget.browser, + widget.patientShareResponse.isLiveCareAppointment!, + "2", + widget.patientShareResponse.isLiveCareAppointment! ? widget.patientShareResponse.clinicID.toString() : "", + context, + widget.patientShareResponse.appointmentDate, + widget.patientShareResponse.appointmentNo, + widget.patientShareResponse.clinicID, + widget.patientShareResponse.doctorID, + paymentMethod[1]); + // } + } + + onBrowserLoadStart(String url) { + if (selectedPaymentMethod == "TAMARA") { + if (Platform.isAndroid) { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['status']; + tamaraOrderID = uri.queryParameters['AuthorizePaymentId']; + } else { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['paymentStatus']; + tamaraOrderID = uri.queryParameters['orderId']; + } + } + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (widget.browser.isOpened()) widget.browser.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (widget.browser.isOpened()) widget.browser.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + try { + if (selectedPaymentMethod == "TAMARA") { + checkTamaraPaymentStatus(transID!, appo); + if (tamaraPaymentStatus != null && tamaraPaymentStatus!.toLowerCase() == "approved") { + updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID!, num.parse(selectedInstallments!), appo); + } else { + updateTamaraRequestStatus( + "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID! != null ? tamaraOrderID! : "", num.parse(selectedInstallments!), appo); + } + } else { + checkPaymentStatus(appo); + } + } catch (err) { + print(err); + } + } + + checkTamaraPaymentStatus(String orderID, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getTamaraPaymentStatus(orderID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["status"].toString().toLowerCase() == "success") { + updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID!, int.parse(selectedInstallments!), appo); + } else { + updateTamaraRequestStatus( + "Failed", "00", Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), tamaraOrderID != null ? tamaraOrderID! : "", int.parse(selectedInstallments!), appo); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + addAdvancedNumberRequestTamara(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) {}).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, num selectedInstallments, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + try { + DoctorsListService service = new DoctorsListService(); + service.updateTamaraRequestStatus(responseMessage, status, clientRequestID, tamaraOrderID, selectedInstallments).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (tamaraPaymentStatus!.toLowerCase() == "approved") { + markAppointmentForTamara(appo); + addAdvancedNumberRequestTamara("Tamara-Advance-0000", tamaraOrderID, appo.appointmentNo.toString(), appo); + } + }).catchError((err) { + print(err); + AppToast.showErrorToast(message: err); + GifLoaderDialogUtils.hideDialog(context); + }); + } catch (err) { + print(err); + } + } + + markAppointmentForTamara(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.markAppointmentForTamara(appo.projectID!, appo.appointmentNo.toString()).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (appo.isLiveCareAppointment!) + insertLiveCareVIDARequest(appo); + else + getAppoQR(context); + }).catchError((err) { + print(err); + AppToast.showErrorToast(message: err); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + autoGenerateInvoiceTamara(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.autoGenerateInvoiceTamara(appo.projectID!, appo.appointmentNo.toString(), projectViewModel.user!.mobileNumber!).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (appo.isLiveCareAppointment!) + insertLiveCareVIDARequest(appo); + else + getAppoQR(context); + }).catchError((err) { + print(err); + AppToast.showErrorToast(message: err); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + String txn_ref; + num amount; + String payment_method; + final currency = projectViewModel.user!.outSA == 0 ? "sar" : 'aed'; + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.checkPaymentStatus(transID!, false, context).then((res) { + String paymentInfo = res['Response_Message']; + if (paymentInfo == 'Success') { + txn_ref = res['Merchant_Reference']; + amount = res['Amount']; + payment_method = res['PaymentMethod']; + createAdvancePayment(res, appo); + projectViewModel.analytics.appointment.payment_success( + appointment_type: 'regular', payment_method: payment_method, clinic: appo.clinicName, hospital: appo.projectName, txn_amount: "$amount", txn_currency: currency, txn_number: txn_ref); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['Response_Message']); + projectViewModel.analytics.appointment.payment_fail( + appointment_type: 'regular', + payment_method: selectedPaymentMethod, + clinic: appo.clinicName, + hospital: appo.projectName, + txn_amount: widget.patientShareResponse.patientShareWithTax.toString(), + txn_currency: currency, + error_type: res['Response_Message']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err.toString()); + print(err); + }); + } + + getApplePayAPQ(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!), false, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + + String paymentInfo = res['Response_Message']; + if (paymentInfo == 'Success') { + createAdvancePayment(res, appo); + } else { + AppToast.showErrorToast(message: res['Response_Message']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + String paymentReference = res['Fort_id'].toString(); + service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context).then((res) { + addAdvancedNumberRequest( + Utils.isVidaPlusProject(projectViewModel, appo.projectID!) + ? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString() + : res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), + paymentReference, + appo.appointmentNo.toString(), + appo); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + addAdvancedNumberRequest(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) { + if (appo.isLiveCareAppointment!) { + insertLiveCareVIDARequest(appo); + } else { + getAppoQR(context); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + Widget _getQRAppo() { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Container( + margin: EdgeInsets.only(top: 30.0, bottom: 40.0), + alignment: Alignment.center, + child: Text(TranslationBase.of(context).noNeedToWaitInLine, style: TextStyle(fontSize: 18.0, letterSpacing: 0.8)), + ), + Container( + alignment: Alignment.center, + child: Image.asset("assets/images/new-design/device_icon.png", width: 120.0, height: 120.0), + ), + Flex( + direction: Axis.horizontal, + children: [ + Expanded( + child: Container( + padding: EdgeInsets.only(left: 10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Container( + margin: EdgeInsets.only(top: 15.0), + child: Row( + children: [ + _getBulletPoint("1"), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Text(TranslationBase.of(context).useQRAppoAttend, overflow: TextOverflow.fade, style: TextStyle(fontSize: 13.0)), + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 15.0), + child: Row( + children: [ + _getBulletPoint("2"), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Text(TranslationBase.of(context).passQRAppoAttend, overflow: TextOverflow.fade, style: TextStyle(fontSize: 13.0)), + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 15.0), + child: Row( + children: [ + _getBulletPoint("3"), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Text(TranslationBase.of(context).sitWaitingQR, overflow: TextOverflow.fade, style: TextStyle(fontSize: 13.0)), + ), + ], + ), + ), + ], + ), + ), + ), + ], + ), +// Container( +// alignment: Alignment.bottomCenter, +// height: MediaQuery.of(context).size.height * 0.18, +// child: Column( +// mainAxisAlignment: MainAxisAlignment.end, +// children: [ +// ButtonTheme( +// shape: RoundedRectangleBorder( +// borderRadius: BorderRadius.circular(10.0), +// ), +// minWidth: MediaQuery.of(context).size.width * 0.7, +// height: 45.0, +// child: RaisedButton( +// color: new Color(0xFF60686b), +// textColor: Colors.white, +// disabledTextColor: Colors.white, +// disabledColor: new Color(0xFFbcc2c4), +// onPressed: () { +// // navigateToQR(context); +// getAppoQR(context); +// }, +// child: Text(TranslationBase.of(context).viewQR.toUpperCase(), +// style: TextStyle(fontSize: 18.0)), +// ), +// ), +// ], +// ), +// ), + ], + ); + } + + _getBulletPoint(bulletPoint) { + return Container( + margin: EdgeInsets.only(left: 20.0, right: 20.0), + decoration: BoxDecoration(shape: BoxShape.circle, color: Colors.black), + width: 20.0, + height: 20.0, + child: Center( + child: Text(bulletPoint, + style: TextStyle( + color: Colors.white, + fontSize: 12.0, + )), + ), + ); + } + + _getHeadingText(text) { + return Container( + padding: EdgeInsets.only(bottom: 10.0, left: 20, right: 20), + child: Row( + children: [ + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16, color: Colors.white), + mWidth(6), + Text( + text, + textAlign: TextAlign.start, + style: TextStyle( + fontSize: 16.0, + letterSpacing: -0.64, + color: Colors.white, + fontWeight: FontWeight.w600, + ), + ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16, color: Colors.white) : Container(), + ], + ), + ); + } + + Future navigateToHome(context) async { + Navigator.of(context).popAndPushNamed(HOME); + } + + getAppoQR(context) { + DoctorsListService service = new DoctorsListService(); + service.generateAppointmentQR(widget.patientShareResponse, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + navigateToQR(context, res['AppointmentQR']); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + Future navigateToQR(context, String appoQR) async { + AppoitmentAllHistoryResultList appointment = new AppoitmentAllHistoryResultList(); + + appointment.doctorTitle = "Dr. "; + appointment.doctorNameObj = widget.patientShareResponse.doctorNameObj; + appointment.doctorImageURL = widget.patientShareResponse.doctorImageURL; + appointment.doctorSpeciality = (widget.patientShareResponse.doctorSpeciality != null) ? widget.patientShareResponse.doctorSpeciality as List : [""]; + appointment.projectName = widget.patientShareResponse.projectName; + appointment.projectID = widget.patientShareResponse.projectID; + appointment.appointmentDate = widget.patientShareResponse.appointmentDate; + appointment.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment; + appointment.startTime = widget.patientShareResponse.startTime; + appointment.doctorRate = 5; + appointment.actualDoctorRate = 5; + appointment.noOfPatientsRate = 0; + appointment.clinicName = widget.patientShareResponse.clinicName; + + Navigator.push( + context, + FadePage( + page: QRCode( + patientShareResponse: widget.patientShareResponse, + appoQR: appoQR, + appointment: appointment, + ))); + } + + _getNormalText(text) { + return Container( + margin: EdgeInsets.only(top: 5.0, left: 20, right: 20), + padding: EdgeInsets.only(top: 5.0, bottom: 0), + child: Text(text, + textAlign: TextAlign.start, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.36, + color: Colors.white, + fontWeight: FontWeight.w600, + )), + ); + } + + _getTextStyling() { + return TextStyle(fontSize: 14.0, color: Colors.white, letterSpacing: 0.7); + } +} diff --git a/lib/pages/BookAppointment/BookingOptions.dart b/lib/pages/BookAppointment/BookingOptions.dart new file mode 100644 index 00000000..791631dc --- /dev/null +++ b/lib/pages/BookAppointment/BookingOptions.dart @@ -0,0 +1,76 @@ +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/CardCommon.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; + +import '../../uitl/translations_delegate_base.dart'; + +class BookingOptions extends StatefulWidget { + final bool isAppbar; + + BookingOptions({this.isAppbar = false}); + + @override + _BookingOptionsState createState() => _BookingOptionsState(); +} + +class _BookingOptionsState extends State { + late LocationUtils locationUtils; + + @override + void initState() { + locationUtils = + new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance + .addPostFrameCallback((_) => locationUtils.getCurrentLocation()); + + super.initState(); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: widget.isAppbar, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).bookAppo, + body: Container( + margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(TranslationBase.of(context).searchBy, + style: TextStyle( + fontSize: 24.0, + letterSpacing: 1.0, + fontWeight: FontWeight.bold, + color: new Color(0xFF60686b))), + Container( + margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: CardCommon( + image: 'assets/images/new-design/search_by_clinic.png', + text: TranslationBase.of(context).clinic, + subText: TranslationBase.of(context).name, + type: 0, + ), + ), + Expanded( + child: CardCommon( + image: 'assets/images/new-design/search_by_doctor.png', + text: TranslationBase.of(context).doctor, + subText: TranslationBase.of(context).name, + type: 1), + ) + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/BookAppointment/DentalComplaints.dart b/lib/pages/BookAppointment/DentalComplaints.dart new file mode 100644 index 00000000..99f40cef --- /dev/null +++ b/lib/pages/BookAppointment/DentalComplaints.dart @@ -0,0 +1,360 @@ +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DentalProceduresModel.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DentalComplaintCard.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class DentalComplaints extends StatefulWidget { + SearchInfo searchInfo; + Function? onSelectedMethod; + bool isDoctorNameSearch; + bool isFromHospitalSearchPage; + + DentalComplaints({required this.searchInfo, this.onSelectedMethod, this.isDoctorNameSearch = false, this.isFromHospitalSearchPage = false}); + + @override + _DentalComplaintsState createState() => _DentalComplaintsState(); +} + +class _DentalComplaintsState extends State { + List complaintsList = []; + AppSharedPreferences sharedPref = AppSharedPreferences(); + bool isDataLoaded = false; + bool hasDentalPlan = false; + var languageID; + int totalAppointmentTime = 0; + + List doctorsList = []; + + late DentalProceduresModel dentalProceduresModel; + List patientDoctorAppointmentListHospital = []; + + late ProjectViewModel projectViewModel; + + bool isDoctorsList = false; + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((_) => checkIfHasDentalPlan()); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).chiefComplaints, + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + backgroundColor: CustomColors.appBackgroudGreyColor, + body: Container( + child: !hasDentalPlan + ? isDoctorsList + ? Container( + child: SingleChildScrollView( + child: Column( + children: [ + ...List.generate( + patientDoctorAppointmentListHospital.length, + (index) => Padding( + padding: const EdgeInsets.all(14.0), + child: AppExpandableNotifier( + isExpand: true, + title: patientDoctorAppointmentListHospital[index].filterName! + + " - " + + patientDoctorAppointmentListHospital[index].distanceInKMs! + + " " + + TranslationBase.of(context).km, + bodyWidget: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList!.map((doctor) { + return DoctorView( + doctor: doctor, + isLiveCareAppointment: false, + isContinueDentalPlan: hasDentalPlan, + ); + }).toList(), + )), + ), + ) + ], + ), + ), + ) + : ListView.separated( + itemCount: complaintsList.length, + itemBuilder: (BuildContext context, int index) { + return Container( + child: DentalComplaintCard( + listDentalChiefComplain: complaintsList[index], + languageID: languageID, + isDoctorNameSearch: widget.isDoctorNameSearch, + onSelectedMethod: widget.onSelectedMethod, + isFromHospitalSearchPage: widget.isFromHospitalSearchPage, + onDoctorFetched: widget.isFromHospitalSearchPage + ? (doctorsList) { + if (doctorsList.registeredDoctorMap?.isNotEmpty == true) { + Navigator.pop(context, doctorsList); + } else { + Utils.showErrorToast(TranslationBase.of(context).noDataAvailable); + } + } + : null, + )..logAnalytics = () { + final info = widget.searchInfo; + locator() + .appointment + .book_appointment_chief_complaints(appointment_type: 'regular', hospital: info.hospital, clinic: info.clinic, treatment: complaintsList[index]); + }, + ); + }, + separatorBuilder: (BuildContext context, int index) { + return Padding( + padding: const EdgeInsets.only(left: 14, right: 14), + child: mDivider(CustomColors.devider), + ); + }, + ) + : Container( + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(top: 12.0, left: 12.0, right: 12.0), + child: Text(TranslationBase.of(context).dentalProcedureList, style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold, letterSpacing: -0.46)), + ), + Container( + decoration: cardRadius(10), + margin: EdgeInsets.all(12.0), + child: Table( + children: getProceduresData(), + ), + ), + ...List.generate( + patientDoctorAppointmentListHospital.length, + (index) => AppExpandableNotifier( + isExpand: true, + title: patientDoctorAppointmentListHospital[index].filterName! + " - " + patientDoctorAppointmentListHospital[index].distanceInKMs! + " " + TranslationBase.of(context).km, + bodyWidget: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList!.map((doctor) { + return DoctorView( + doctor: doctor, + isLiveCareAppointment: false, + isContinueDentalPlan: hasDentalPlan, + ); + }).toList(), + )), + ) + ], + ), + ), + ), + ), + ); + } + + getLanguageID() async { + languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + } + + checkIfHasDentalPlan() { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.checkIfHasDentalPlan(widget.searchInfo!.ProjectID!, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + if (res['List_IsPatientHasOnGoingEstimation'].length != 0) { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).continuePlan, + okText: TranslationBase.of(context).yes, + cancelText: TranslationBase.of(context).no, + okFunction: () => {Navigator.of(context).pop(), continueDentalPlan(), hasDentalPlan = true}, + cancelFunction: () => {getChiefComplaintsList(), hasDentalPlan = false}); + dialog.showAlertDialog(context); + } else { + getChiefComplaintsList(); + } + } + }).catchError((err) { + print(err); + }); + } + + List getProceduresData() { + List tableRow = []; + + tableRow.add( + TableRow( + children: [ + Container( + child: Container( + margin: EdgeInsets.all(12.0), + child: Text(TranslationBase.of(context).procedureName, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.46)), + ), + ), + Container( + child: Container( + margin: EdgeInsets.all(12.0), + child: Text(TranslationBase.of(context).timeNeeded, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.46)), + ), + ), + ], + ), + ); + dentalProceduresModel.listIsPatientHasOnGoingEstimation!.forEach((procedure) { + tableRow.add(TableRow(children: [ + Container( + margin: EdgeInsets.all(12.0), + child: Text(procedure!.procedureName!, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.46)), + ), + Container( + margin: EdgeInsets.all(12.0), + child: Text(procedure.neededTime.toString() + " " + TranslationBase.of(context).minute, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.46)), + ), + ])); + }); + tableRow.add( + TableRow( + children: [ + Container( + margin: EdgeInsets.all(12.0), + child: Text(TranslationBase.of(context).totalTimeNeeded, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.46)), + ), + Container( + margin: EdgeInsets.all(12.0), + child: Text(totalAppointmentTime.toString() + " " + TranslationBase.of(context).minute, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.46)), + ), + ], + ), + ); + return tableRow; + } + + continueDentalPlan() { + int languageID = projectViewModel.isArabic ? 1 : 2; + DoctorsListService service = new DoctorsListService(); + + GifLoaderDialogUtils.showMyDialog(context); + int appoTime = 0; + service.getDoctorsList(int.parse("17"), widget.searchInfo!.ProjectID!, false, languageID, context, isContinueDentalPlan: true).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + dentalProceduresModel = DentalProceduresModel.fromJson(res as Map); + //Changed by Aamir added Map into string dynamic + dentalProceduresModel.listIsPatientHasOnGoingEstimation!.forEach((procedure) { + appoTime += procedure!.neededTime!; + }); + setState(() { + hasDentalPlan = true; + totalAppointmentTime = appoTime; + }); + + if (res['DoctorList'].length != 0) { + doctorsList.clear(); + res['DoctorList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson(v)); + }); + doctorsList.forEach((element) { + List doctorByHospital = patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList( + filterName: element.projectName, + distanceInKMs: element.projectDistanceInKiloMeters.toString(), + projectTopName: element.projectTopName, + projectBottomName: element.projectBottomName, + patientDoctorAppointment: element)); + } + }); + } else {} + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); + } + + getChiefComplaintsList() { + int languageID = projectViewModel.isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + getLanguageID(); + hasDentalPlan = false; + ClinicListService service = new ClinicListService(); + int? patientID = projectViewModel.isLogin ? projectViewModel.user.patientID : -1; + service.getChiefComplaintsList(patientID!, widget.searchInfo.ClinicID!, widget.searchInfo.ProjectID!, languageID, false, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + if (res['DoctorList'].length != 0) { + isDoctorsList = true; + doctorsList.clear(); + res['DoctorList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson(v)); + }); + doctorsList.forEach((element) { + List doctorByHospital = patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + patientDoctorAppointmentListHospital[patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList( + filterName: element.projectName, + distanceInKMs: element.projectDistanceInKiloMeters.toString(), + projectTopName: element.projectTopName, + projectBottomName: element.projectBottomName, + patientDoctorAppointment: element)); + } + }); + } else { + isDoctorsList = false; + res['List_DentalChiefComplain'].forEach((v) { + complaintsList.add(new ListDentalChiefComplain.fromJson(v)); + }); + } + }); + } else {} + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart new file mode 100644 index 00000000..2072109b --- /dev/null +++ b/lib/pages/BookAppointment/DoctorProfile.dart @@ -0,0 +1,650 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart'; +import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart'; +import 'package:diplomaticquarterapp/models/header_model.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/LaserBooking.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/components/LaserClinic.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/doctor_post_pre_images_page.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/waiting_appointment/waiting_appointment_info.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/SchedulePage.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.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:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:provider/provider.dart'; + +import 'BookConfirm.dart'; +import 'components/DocAvailableAppointments.dart'; +import 'components/DocInfo.dart'; + +class DoctorProfile extends StatefulWidget { + DoctorList doctor; + DoctorProfileList docProfileList; + final bool isOpenAppt; + bool isLiveCareAppointment; + bool isDoctorNameSearch; + bool isContinueDentalPlan; + + DoctorProfile({required this.doctor, required this.docProfileList, required this.isLiveCareAppointment, this.isOpenAppt = false, this.isDoctorNameSearch = false, this.isContinueDentalPlan = false}); + + late AuthenticatedUser authUser; + + @override + _DoctorProfileState createState() => _DoctorProfileState(); +} + +class _DoctorProfileState extends State with TickerProviderStateMixin { + late TabController _tabController; + bool showFooterButton = false; + var event = RobotProvider(); + dynamic doctorSchedule; + AppSharedPreferences sharedPref = AppSharedPreferences(); + + List doctorDetailsList = []; + + @override + void initState() { + _tabController = new TabController(length: 2, vsync: this, initialIndex: widget.isOpenAppt == true ? 1 : 0); + _tabController = new TabController(length: 2, vsync: this); + widget.authUser = new AuthenticatedUser(); + widget.doctor.speciality = widget.docProfileList.specialty; + getPatientData(); + super.initState(); + } + + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: widget.doctor.doctorTitle! + " " + widget.doctor.name!, + isShowAppBar: true, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + bottomSheet: showFooterButton + ? Container( + color: CustomColors.appBackgroudGreyColor, + child: Container( + width: MediaQuery.of(context).size.width, + height: 45.0, + color: CustomColors.appBackgroudGreyColor, + margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width * 0.7, + height: 40.0, + child: CustomTextButton( + backgroundColor: CustomColors.accentColor, + elevation: 0, + onPressed: goToBookConfirm, + child: Text(TranslationBase.of(context).reviewAppointment, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48, color: Colors.white, fontWeight: FontWeight.w600)), + ), + ), + ), + ) + : null, + body: Container( + color: new Color(0xFFF8F8F8), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + DoctorHeader( + headerModel: HeaderModel( + widget.doctor.name!, + widget.doctor.doctorID!, + widget.doctor.doctorImageURL!, + widget.doctor.speciality!, + "", + widget.doctor.projectName!, + null, + null, + widget.doctor.nationalityFlagURL!, + widget.doctor.doctorRate, + widget.doctor.actualDoctorRate!, + widget.docProfileList.noOfPatientsRate!, + "", + decimalDoctorRate: widget.docProfileList.decimalDoctorRate.toString(), + ), + buttonIcon: 'assets/images/new/Boo_ Appointment.svg', + showConfirmMessageDialog: false, + isNeedToShowButton: !widget.isLiveCareAppointment, + onTap: () { + Navigator.push( + context, + FadePage( + page: SchedulePage(doctorList: widget.doctor), + ), + ).then((value) { + setState(() { + if (_tabController.index == 0) { + _tabController.animateTo((_tabController.index + 1) % 2); + showFooterButton = true; + } + this.doctorSchedule = value; + }); + }); + projectViewModel.analytics.appointment.book_appointment_schedule(appointment_type: 'regular', doctor: widget.doctor); + }, + onRatingAndReviewTap: () { + getDoctorRatingsDetails(); + }, + buttonTitle: TranslationBase.of(context).schedule, + ), + mDivider(Colors.grey[300]!), + if (widget.docProfileList.isDoctorHasPrePostImages == true) Container(height: 50, alignment: Alignment.center, child: prePostImagesButton(context)), + TabBar( + onTap: (index) { + setState(() { + if (index == 1) { + if (widget.doctor.clinicID == 23 || widget.doctor.clinicID == 47 || widget.isLiveCareAppointment) { + _tabController.index = _tabController.previousIndex; + showFooterButton = false; + } else { + showFooterButton = true; + } + } + print(showFooterButton); + }); + }, + tabs: [ + Tab( + child: Text( + TranslationBase.of(context).docInfo, + style: TextStyle( + color: Colors.black, + fontSize: 12, + letterSpacing: -0.36, + fontWeight: FontWeight.w600, + ), + ), + ), + Tab( + child: Text( + TranslationBase.of(context).availableAppo, + style: TextStyle( + color: widget.isLiveCareAppointment ? Colors.grey : Colors.black, + fontSize: 12, + letterSpacing: -0.36, + fontWeight: FontWeight.w600, + ), + ), + ) + ], + controller: _tabController, + ), + Container( + height: MediaQuery.of(context).size.height * 1.5, + child: TabBarView( + physics: NeverScrollableScrollPhysics(), + children: [ + DoctorInformation(docProfileList: widget.docProfileList), + DocAvailableAppointments( + doctor: widget.doctor, + isLiveCareAppointment: widget.isLiveCareAppointment, + doctorSchedule: doctorSchedule, + isContinueDentalPlan: widget.isContinueDentalPlan, + ), + ], + controller: _tabController, + ), + ), + ], + ), + ), + ), + ); + } + + Widget prePostImagesButton(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(10), + child: MaterialButton( + height: 50, + color: Theme.of(context).appBarTheme.backgroundColor, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), + onPressed: () => openDoctorPrePostImages(), + child: Text( + TranslationBase.of(context).beforeAfterImages, + style: TextStyle(color: Colors.white, fontSize: 15, letterSpacing: 1), + ), + ), + ); + } + + getDoctorRatings() { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getDoctorsRating(widget.doctor.doctorID!, projectViewModel.isArabic ? 1 : 2, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + print(res['NotesDoctorRatingList']); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + getDoctorRatingsDetails() { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getDoctorsRatingDetails(widget.doctor.doctorID!, projectViewModel.isArabic ? 1 : 2, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + doctorDetailsList.clear(); + res['DoctorRatingDetailsList'].forEach((v) { + doctorDetailsList.add(new DoctorRateDetails.fromJson(v)); + }); + showRatingDialog(doctorDetailsList); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + openDoctorPrePostImages() { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService().getDoctorPrePostImages(widget.docProfileList, context).then((images) { + GifLoaderDialogUtils.hideDialog(context); + showDialog( + context: context, + barrierDismissible: true, + builder: (ctx) { + return DoctorPostPreImagesContent(doctorPrePostImages: images); + }); + // Navigator.push( + // context, + // FadePage( + // page: DoctorPostPreImagesPage(doctorPrePostImages: images,) + // ) + // ); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + void showRatingDialog(List doctorDetailsList) { + showGeneralDialog( + barrierColor: Colors.black.withOpacity(0.5), + transitionBuilder: (context, a1, a2, widget) { + final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0; + return Transform( + transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), + child: Opacity( + opacity: a1.value, + child: Dialog( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + // height: 400.0, + width: MediaQuery.of(context).size.width * 0.8, + color: Colors.white, + child: Column( + children: [ + Container( + alignment: Alignment.center, + width: MediaQuery.of(context).size.width, + color: Theme.of(context).primaryColor, + margin: EdgeInsets.only(bottom: 5.0), + padding: EdgeInsets.all(10.0), + child: Text(TranslationBase.of(context).doctorRating, style: TextStyle(fontSize: 22.0, color: Colors.white))), + Container( + margin: EdgeInsets.only(top: 0.0), child: Text(this.widget.doctor.actualDoctorRate!.ceilToDouble().toString(), style: TextStyle(fontSize: 32.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 5.0), + alignment: Alignment.center, + // child: RatingBar.readOnly( + // initialRating: this.widget.doctor.actualDoctorRate!.toDouble(), + // size: 35.0, + // filledColor: Colors.yellow[700], + // emptyColor: Colors.grey[500], + // isHalfAllowed: true, + // halfFilledIcon: Icons.star_half, + // filledIcon: Icons.star, + // emptyIcon: Icons.star, + // ), + child: RatingBar( + itemSize: 20.0, + allowHalfRating: true, + ignoreGestures: true, + initialRating: this.widget.doctor.actualDoctorRate!.toDouble(), + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star_border, + color: CustomColors.accentColor, + ), + ), + onRatingUpdate: (double value) {}, + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text(this.widget.doctor.noOfPatientsRate.toString() + " " + TranslationBase.of(context).reviews, style: TextStyle(fontSize: 14.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[0].patientNumber), + height: 6.0, + child: Container( + color: Colors.green[700], + ), + ), + ), + ], + ), + ), + Container( + child: Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).v_good, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[1].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffB7B723), + ), + ), + ), + ], + ), + ), + Container( + child: Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).good, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[2].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffEBA727), + ), + ), + ), + ], + ), + ), + Container( + child: Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).average, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[3].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffEB7227), + ), + ), + ), + ], + ), + ), + Container( + child: Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).below_average, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[4].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffE20C0C), + ), + ), + ), + ], + ), + ), + Container(margin: EdgeInsets.only(top: 40.0), child: Divider()), + Container( + margin: EdgeInsets.only(top: 0.0), + child: Align( + alignment: FractionalOffset.bottomCenter, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width, + height: 40.0, + child: CustomTextButton( + elevation: 0.0, + backgroundColor: Colors.white, + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0, color: Colors.red)), + ), + ), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ); + }, + transitionDuration: Duration(milliseconds: 500), + barrierDismissible: true, + barrierLabel: '', + context: context, + pageBuilder: (context, animation1, animation2) { + return SizedBox(); + }); + } + + double getRatingWidth(int patientNumber) { + var width = (patientNumber / this.widget.docProfileList.noOfPatientsRate!) * 100; + return width; + } + + getPatientData() async { + if (await sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); + setState(() { + print(data); + widget.authUser = data; + }); + } + } + + void goToBookConfirm() async { + // if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17) { + // navigateToDentalComplaints(context); + // } else { + if (DocAvailableAppointments.selectedTime == TranslationBase.of(context).waitingAppointment) { + if (projectViewModel.isLogin) { + canPayForWalkInAppointment(); + } else { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).loginToUseService, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => {navigateToLogin()}, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + } else { + if (DocAvailableAppointments.areSlotsAvailable) { + if (projectViewModel.isLogin) { + // if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17 && projectViewModel.user!.age! > 12) { + if (widget.isDoctorNameSearch && widget.doctor.clinicID == 17) { + navigateToDentalComplaints(context); + } else if (widget.isDoctorNameSearch && widget.doctor.clinicID == 253) { + navigateToLaserClinic(context); + } else { + final timeSlot = DocAvailableAppointments.selectedAppoDateTime; + navigateToBookConfirm(context); + projectViewModel.analytics.appointment.book_appointment_review(appointment_type: 'regular', dateTime: timeSlot!, doctor: widget.doctor); + } + } else { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).loginToUseService, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => {navigateToLogin()}, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot); + } + } + } + + Future navigateToLaserClinic(BuildContext context) async { + HospitalsModel tempselectedHospital = new HospitalsModel(); + tempselectedHospital.iD = widget.doctor.projectID; + Navigator.push( + context, + FadePage( + page: LaserClinic(selectedHospital: tempselectedHospital!), + ), + ); + } + + Future navigateToDentalComplaints(BuildContext context) async { + HospitalsModel selectedHospital = new HospitalsModel(); + selectedHospital.name = widget.doctor.projectName; + ListClinicCentralized selectedClinic = new ListClinicCentralized(); + selectedClinic.clinicDescription = widget.doctor.clinicName; + + SearchInfo searchInfo = new SearchInfo(); + searchInfo.ProjectID = widget.doctor.projectID; + searchInfo.ClinicID = widget.doctor.clinicID; + searchInfo.date = DateTime.now(); + searchInfo.hospital = selectedHospital; + searchInfo.clinic = selectedClinic; + + Navigator.push( + context, + FadePage( + page: DentalComplaints(searchInfo: searchInfo), + ), + ).then((value) { + // setState(() { + // dropdownValue = null; + // }); + }); + } + + navigateToLogin() { + ConfirmDialog.closeAlertDialog(context); + Navigator.of(context).pushNamed( + WELCOME_LOGIN, + ); + } + + Future navigateToBookConfirm(context) async { + Navigator.push( + context, + FadePage( + page: BookConfirm( + doctor: widget.doctor, + isLiveCareAppointment: widget.isLiveCareAppointment, + selectedDate: DocAvailableAppointments.selectedDate!, + selectedTime: DocAvailableAppointments.selectedTime!, + initialSlotDuration: DocAvailableAppointments.initialSlotDuration!, + isWalkinAppointment: false, + ), + ), + ); + } + + Future navigateToWaitingAppointment(context) async { + projectViewModel.setWaitingAppointmentProjectID(widget.doctor.projectID!); + projectViewModel.setWaitingAppointmentDoctor(widget.doctor); + Navigator.push( + context, + FadePage( + page: WaitingAppointmentInfo(), + ), + ); + } + + canPayForWalkInAppointment() { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.canPayForWalkInAppointment(widget.doctor.clinicID!, widget.doctor.projectID!, widget.doctor.doctorID!).then((res) { + GifLoaderDialogUtils.hideDialog(context); + navigateToWaitingAppointment(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err, localContext: context); + print(err); + }); + } +} diff --git a/lib/pages/BookAppointment/LaserBooking.dart b/lib/pages/BookAppointment/LaserBooking.dart new file mode 100644 index 00000000..942e5e18 --- /dev/null +++ b/lib/pages/BookAppointment/LaserBooking.dart @@ -0,0 +1,15 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; + +class LaserBooking extends StatefulWidget { + @override + _LaserBookingState createState() => _LaserBookingState(); +} + +class _LaserBookingState extends State { + @override + Widget build(BuildContext context) { + return AppScaffold(isShowDecPage: false, isShowAppBar: true, showNewAppBarTitle: true, showNewAppBar: true, appBarTitle: TranslationBase.of(context).laserClinic, body: Container()); + } +} diff --git a/lib/pages/BookAppointment/QRCode.dart b/lib/pages/BookAppointment/QRCode.dart new file mode 100644 index 00000000..c79e1fcf --- /dev/null +++ b/lib/pages/BookAppointment/QRCode.dart @@ -0,0 +1,428 @@ +import 'dart:typed_data'; + +import 'package:barcode_scan2/barcode_scan2.dart'; +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/privilege/ProjectDetailListModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/header_model.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; +import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_nfc_kit/flutter_nfc_kit.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class QRCode extends StatefulWidget { + late PatientShareResponse? patientShareResponse; + late AppoitmentAllHistoryResultList? appointment; + late String? appoQR; + AuthenticatedUser? authUser; + AppSharedPreferences sharedPref = AppSharedPreferences(); + + QRCode({required this.patientShareResponse, required this.appoQR, this.appointment}); + + @override + _QRCodeState createState() => _QRCodeState(); +} + +class _QRCodeState extends State { + late Uint8List _bytes; + bool _supportsNFC = false; + late BuildContext _context; + + late ProjectViewModel projectViewModel; + late LocationUtils locationUtils; + ProjectDetailListModel projectDetailListModel = ProjectDetailListModel(); + + @override + void initState() { + // TODO: implement initState + + // _bytes = base64.decode(widget.appoQR.split(',').last); + widget.authUser = new AuthenticatedUser(); + + // WidgetsBinding.instance.addPostFrameCallback((timeStamp) { + // startNFCScan(); + // }); + + super.initState(); + } + + startNFCScan() { + Future.delayed(const Duration(milliseconds: 500), () { + showNfcReader(context, onNcfScan: (String nfcId) { + Future.delayed(const Duration(milliseconds: 100), () { + sendNfcCheckInRequest(nfcId, 2); + locator().todoList.to_do_list_nfc(widget.appointment!); + }); + }, onCancel: () { + // Navigator.of(context).pop(); + locator().todoList.to_do_list_nfc_cancel(widget.appointment!); + }); + }); + } + + startQRCodeScan() async { + String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent)); + if (onlineCheckInQRCode != "") { + sendNfcCheckInRequest(onlineCheckInQRCode, 2); + locator().todoList.to_do_list_nfc(widget.appointment!); + } else {} + } + + startLocationCheckIn() async { + GifLoaderDialogUtils.showMyDialog(context); + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + locationUtils.getCurrentLocation(callBack: (value) { + projectDetailListModel = Utils.getProjectDetailObj(projectViewModel, widget.appointment!.projectID); + double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000; + print(dist); + if (dist <= projectDetailListModel.geofenceRadius!) { + sendNfcCheckInRequest(projectDetailListModel.checkInQrCode!, 2); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError); + } + }); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + _context = context; + FlutterNfcKit.nfcAvailability.then((value) { + _supportsNFC = (value == NFCAvailability.available); + }); + List checkInOptionsList = getCheckInOptionsList(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).onlineCheckIn, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + body: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + DoctorHeader( + headerModel: HeaderModel( + widget.appointment!.doctorTitle! + " " + widget.appointment!.doctorNameObj!, + widget.appointment!.doctorID ?? 0, + widget.appointment!.doctorImageURL!, + widget.appointment!.doctorSpeciality!, + "", + widget.appointment!.projectName!, + DateUtil.convertStringToDate(widget.appointment!.appointmentDate!), + widget.appointment!.isLiveCareAppointment! + ? DateUtil.convertStringToDate(widget.appointment!.appointmentDate!).toString().split(" ")[1].substring(0, 5) + : widget.appointment!.startTime!.substring(0, 5), + "null", + widget.appointment!.doctorRate, + widget.appointment!.actualDoctorRate, + widget.appointment!.noOfPatientsRate, + "", + ), + isShowName: true, + isNeedToShowButton: false, + buttonTitle: '', + onTap: () {}, + onRatingAndReviewTap: () {}, + ), + InkWell( + child: Container( + margin: EdgeInsets.only(top: 30.0), + padding: EdgeInsets.all(8), + child: SvgPicture.asset( + "assets/images/nfc/contactless.svg", + width: 80.0, + height: 80.0, + ), + ), + onTap: () { + showNfcReader(context, onNcfScan: (String nfcId) { + Future.delayed(const Duration(milliseconds: 100), () { + sendNfcCheckInRequest(nfcId, 2); + + locator().todoList.to_do_list_nfc(widget.appointment!); + }); + }, onCancel: () { + // Navigator.of(context).pop(); + locator().todoList.to_do_list_nfc_cancel(widget.appointment!); + }); + }, + ), + Row( + children: [ + Expanded( + child: Container( + width: double.infinity, + margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), + child: Text(TranslationBase.of(context).scanQRHospital, + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + )), + ), + ), + ], + ), + mHeight(21), + Padding( + padding: EdgeInsets.only(left: 21, right: 21), + child: GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + padding: EdgeInsets.zero, + itemCount: checkInOptionsList.length, + itemBuilder: (BuildContext context, int index) { + return checkInOptionsList[index]; + }, + ), + ), + ], + ), + ), + // bottomSheet: Container( + // color: CustomColors.appBackgroudGreyColor, + // padding: EdgeInsets.all(21), + // // height: 45.0, + // child: Row( + // children: [ + // Expanded( + // flex: 1, + // child: ButtonTheme( + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(10.0), + // ), + // height: 45.0, + // child: CustomTextButton( + // backgroundColor: CustomColors.green, + // elevation: 0, + // onPressed: () { + // startNFCScan(); + // }, + // child: Text(TranslationBase.of(context).scanNFC, + // style: TextStyle( + // fontSize: 18.0, + // color: Colors.white, + // )), + // ), + // ), + // ), + // ], + // ), + // ), + ); + } + + List getCheckInOptionsList(BuildContext context) { + List optionsList = []; + + optionsList.add( + InkWell( + onTap: () { + if (projectViewModel.havePrivilege(102)) { + startLocationCheckIn(); + } + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).checkInViaLocation, + imagePath: 'location.svg', + subTitle: "", + isEnable: projectViewModel.havePrivilege(102), + width: 70.0, + height: 70.0, + ), + ), + ); + + optionsList.add( + InkWell( + onTap: () { + if (projectViewModel.havePrivilege(79)) { + startQRCodeScan(); + } + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).pharmaLiveCareScanQR, + imagePath: 'qr_code.svg', + subTitle: "", + isEnable: projectViewModel.havePrivilege(79), + width: 80.0, + height: 80.0, + ), + ), + ); + + optionsList.add( + InkWell( + onTap: () { + if (projectViewModel.havePrivilege(80) && _supportsNFC) { + startNFCScan(); + } else { + Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported); + } + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).scanNFC, + imagePath: 'contactless.svg', + subTitle: "", + isEnable: projectViewModel.havePrivilege(80), + width: 80.0, + height: 80.0, + ), + ), + ); + + return optionsList; + } + + sendEmail() async { + DoctorsListService service = new DoctorsListService(); + + if (await widget.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await widget.sharedPref.getObject(USER_PROFILE)); + setState(() { + widget.authUser = data; + }); + } + + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: "Send a copy of this QR to the email " + widget.authUser!.emailAddress! + "?", + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () { + GifLoaderDialogUtils.showMyDialog(context); + service + .sendAppointmentQREmail( + widget.authUser!.emailAddress!, + widget.patientShareResponse!.appointmentDate!, + widget.patientShareResponse!.appointmentNo!.toString(), + //Changed By Aamir + widget.patientShareResponse!.doctorNameObj, + widget.patientShareResponse!.projectName, + widget.appoQR!, + getDoctorSpeciality(widget.patientShareResponse!.doctorSpeciality as List), + context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + ConfirmDialog.closeAlertDialog(context); + }).catchError((err) { + ConfirmDialog.closeAlertDialog(context); + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + + Future navigateToHome(context) async { + Navigator.of(context).pushNamed(HOME); + } + + getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {} + + String getDate(String appoDate) { + var appoDateFormatted = ""; + + var dateObj = DateUtil.convertStringToDate(appoDate); + + setState(() { + appoDateFormatted = DateUtil.getWeekDay(dateObj.weekday) + + ", " + + dateObj.day.toString() + + " " + + DateUtil.getMonth(dateObj.month) + + " " + + dateObj.year.toString() + + ", " + + dateObj.hour.toString() + + ":" + + dateObj.minute.toString() + + ":00"; + }); + + return appoDateFormatted; + } + + String getDoctorSpeciality(List docSpecial) { + String docSpeciality = ""; + if (docSpecial != null && docSpecial.length != 0) { + docSpecial.forEach((v) { + docSpeciality = docSpeciality + v + "\n"; + }); + } + return docSpeciality; + } + + sendNfcCheckInRequest(String nfcId, int checkInBy) { + GifLoaderDialogUtils.showMyDialog(context); + + DoctorsListService service = new DoctorsListService(); + + service.sendCheckinNfcRequest(widget!.patientShareResponse!.appointmentNo!, nfcId, widget.patientShareResponse!.projectID!, checkInBy, widget.patientShareResponse!.clinicID!, context).then((res) { + print(res); + GifLoaderDialogUtils.hideDialog(context); + _showMyDialog(res["SuccessMsg"], this.context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + _showMyDialog(err, this.context); + }); + } + + Future _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(); + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + }, + ), + ], + ); + }, + ); + } +} diff --git a/lib/pages/BookAppointment/QRCode.dart.orig b/lib/pages/BookAppointment/QRCode.dart.orig new file mode 100644 index 00000000..83249dee --- /dev/null +++ b/lib/pages/BookAppointment/QRCode.dart.orig @@ -0,0 +1,355 @@ +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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:flutter_nfc_kit/flutter_nfc_kit.dart'; + +class QRCode extends StatefulWidget { + PatientShareResponse patientShareResponse; + String appoQR; + AuthenticatedUser authUser; + AppSharedPreferences sharedPref = AppSharedPreferences(); + + QRCode({@required this.patientShareResponse, @required this.appoQR}); + + @override + _QRCodeState createState() => _QRCodeState(); +} + +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(); + + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { + FlutterNfcKit.nfcAvailability.then((value) { + setState(() { + _supportsNFC = (value == NFCAvailability.available); + }); + }); + }); + + super.initState(); + } + + @override + Widget build(BuildContext context) { + _context = context; + return AppScaffold( + appBarTitle: TranslationBase.of(context).attendRegisterCode, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + body: SingleChildScrollView( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Container( + width: double.infinity, + height: MediaQuery.of(context).size.width / 3, + child: Row( + children: [ +<<<<<<< HEAD + _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: () { + locator().analytics.todoList.to_do_list_nfc(); + showNfcReader(context, onNcfScan: (String nfcId) { + Future.delayed(const Duration(milliseconds: 100), () { + sendNfcCheckInRequest(nfcId); + }); + }, onCancel: (){ + locator().analytics.todoList.to_do_list_nfc_cancel(); + }); + }, + ), + ], +======= + // _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"), +>>>>>>> 259e27d4a7e8d7ddf751de88de36fe901df0e2da + ), + 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), + child: Divider( + color: Colors.red[700], + thickness: 0.8, + ), + ), + Container( + child: Row( + children: [ + Container( + margin: EdgeInsets.only(top: 10.0, left: 40.0, bottom: 10.0), + child: Image.asset("assets/images/new-design/device_icon.png", width: MediaQuery.of(context).size.width / 3.4, height: MediaQuery.of(context).size.width / 3.4), + ), + 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)), + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0), + child: Divider( + color: Colors.red[700], + thickness: 0.8, + ), + ), + Container( + margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), + child: Text(TranslationBase.of(context).appoInfo, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)), + ), + Container( + margin: EdgeInsets.only(left: 20.0, bottom: 20.0, right: 20.0), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.grey[200], + boxShadow: [ + BoxShadow(color: Colors.grey, spreadRadius: 2), + ], + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), + child: Text(widget.patientShareResponse.doctorNameObj, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)), + ), + if (getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality) != "null\n") + Container( + margin: EdgeInsets.only(bottom: 10.0, left: 20.0, right: 20.0), + child: Text(getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])), + ), + Container( + margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0), + child: Text(widget.patientShareResponse.projectName, style: TextStyle(fontSize: 18.0, color: Colors.grey[700])), + ), + Container( + margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0), + child: Text(getDate(widget.patientShareResponse.appointmentDate), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])), + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 15.0), + alignment: Alignment.bottomCenter, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + DefaultButton(TranslationBase.of(context).sendEmail.toUpperCase(), () => {sendEmail()}) + ], + ), + ), + ], + ), + ), + ), + ); + } + + sendEmail() async { + DoctorsListService service = new DoctorsListService(); + + if (await widget.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await widget.sharedPref.getObject(USER_PROFILE)); + setState(() { + widget.authUser = data; + }); + } + + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: "Send a copy of this QR to the email " + widget.authUser.emailAddress + "?", + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () { + GifLoaderDialogUtils.showMyDialog(context); + service + .sendAppointmentQREmail(widget.authUser.emailAddress, widget.patientShareResponse.appointmentDate, widget.patientShareResponse.appointmentNo.toString(), + widget.patientShareResponse.doctorNameObj, widget.patientShareResponse.projectName, widget.appoQR, getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality), context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + ConfirmDialog.closeAlertDialog(context); + }).catchError((err) { + ConfirmDialog.closeAlertDialog(context); + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + + Future navigateToHome(context) async { + Navigator.of(context).pushNamed(HOME); + } + + getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {} + + String getDate(String appoDate) { + var appoDateFormatted = ""; + + var dateObj = DateUtil.convertStringToDate(appoDate); + + setState(() { + appoDateFormatted = DateUtil.getWeekDay(dateObj.weekday) + + ", " + + dateObj.day.toString() + + " " + + DateUtil.getMonth(dateObj.month) + + " " + + dateObj.year.toString() + + ", " + + dateObj.hour.toString() + + ":" + + dateObj.minute.toString() + + ":00"; + }); + + return appoDateFormatted; + } + + String getDoctorSpeciality(List docSpecial) { + String docSpeciality = ""; + if (docSpecial != null && docSpecial.length != 0) { + docSpecial.forEach((v) { + docSpeciality = docSpeciality + v + "\n"; + }); + } + 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/Search.dart b/lib/pages/BookAppointment/Search.dart new file mode 100644 index 00000000..efdf79dc --- /dev/null +++ b/lib/pages/BookAppointment/Search.dart @@ -0,0 +1,121 @@ +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/components/search_by_hospital_name.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class Search extends StatefulWidget { + final int type; + final List? clnicIds; + Function()? onBackClick; + + Search({this.type = 0, this.clnicIds, this.onBackClick}); + + @override + _SearchState createState() => _SearchState(); +} + +class _SearchState extends State with TickerProviderStateMixin { + late TabController _tabController; + + @override + void initState() { + _tabController = new TabController( + length: 3, + vsync: this, + initialIndex: widget.type, + ); + super.initState(); + } + + @override + Widget build(BuildContext context) { + AppGlobal.context = context; + // ProjectViewModel projectViewModel = Provider.of(context); + GAnalytics.TREATMENT_TYPE = + null; // reset treatment type on start new booking + + return AppScaffold( + isShowAppBar: false, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).bookAppo, + backgroundColor: Color(0xFFF7F7F7), + onTap: widget.onBackClick, + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: + EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: context.read().isArabic + ? 'Cairo' + : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: context.read().isArabic + ? 'Cairo' + : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [ + Text( + TranslationBase.of(context).hospitalName, + style: TextStyle(fontSize: 12), + ), + Text( + TranslationBase.of(context).clinicName, + style: TextStyle(fontSize: 12), + ), + Text( + TranslationBase.of(context).doctorName, + style: TextStyle(fontSize: 12), + ) + ], + onTap: (idx) { + if (idx == 0) + context + .read() + .analytics + .appointment + .book_appointment_by_clinic(); + else + context + .read() + .analytics + .appointment + .book_appointment_by_doctor(); + }, + ), + Expanded( + child: TabBarView( + physics: NeverScrollableScrollPhysics(), + children: [ + SearchByHospital(), + SearchByClinic(clnicIds: widget.clnicIds), + SearchByDoctor(), + ], + controller: _tabController, + ), + ) + ], + ), + ); + } +} diff --git a/lib/pages/BookAppointment/SearchResults.dart b/lib/pages/BookAppointment/SearchResults.dart new file mode 100644 index 00000000..97946268 --- /dev/null +++ b/lib/pages/BookAppointment/SearchResults.dart @@ -0,0 +1,95 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class SearchResults extends StatelessWidget { + List doctorsList = []; + List patientDoctorAppointmentListHospital; + bool isLiveCareAppointment; + bool isObGyneAppointment; + bool isDoctorNameSearch; + OBGyneProcedureListResponse? obGyneProcedureListResponse; + bool isDoctorSearchResult; + + SearchResults( + {required this.doctorsList, + required this.patientDoctorAppointmentListHospital, + this.isObGyneAppointment = false, + this.isDoctorNameSearch = false, + required this.isLiveCareAppointment, + required this.isDoctorSearchResult, + this.obGyneProcedureListResponse}); + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).bookAppo, + isShowDecPage: false, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: patientDoctorAppointmentListHospital.isNotEmpty + ? ListView.separated( + addAutomaticKeepAlives: true, + physics: BouncingScrollPhysics(), + separatorBuilder: (context, index) { + return Container( + height: 12, + margin: EdgeInsets.only(left: 21, right: 21), + ); + }, + itemBuilder: (context, index) { + return AppExpandableNotifier( + title: (patientDoctorAppointmentListHospital[index].distanceInKMs != "0") + ? patientDoctorAppointmentListHospital[index].filterName! + " - " + patientDoctorAppointmentListHospital[index].distanceInKMs! + " " + TranslationBase.of(context).km + : patientDoctorAppointmentListHospital[index].filterName, + projectTitleTop: patientDoctorAppointmentListHospital[index].projectTopName, + projectTitleBottom: (patientDoctorAppointmentListHospital[index].distanceInKMs != "0") + ? patientDoctorAppointmentListHospital[index].projectBottomName.toString() + + " - " + + patientDoctorAppointmentListHospital[index].distanceInKMs! + + " " + + TranslationBase.of(context).km + : patientDoctorAppointmentListHospital[index].projectBottomName.toString(), + isTitleSingleLine: false, + isHMC: patientDoctorAppointmentListHospital[index].isHMC ?? + false, + isForAppointmentSearch: true, + isDoctorSearchResult: isDoctorSearchResult, + isExpand: patientDoctorAppointmentListHospital.length == 1 ? true : false, + bodyWidget: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(bottom: 10, top: 10, left: 21, right: 21), + itemBuilder: (context, _index) { + final doctor = patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList![_index]; + return DoctorView( + doctor: doctor, + isLiveCareAppointment: isLiveCareAppointment, + isObGyneAppointment: isObGyneAppointment, + isDoctorNameSearch: isDoctorNameSearch, + obGyneProcedureListResponse: obGyneProcedureListResponse, + isShowDate: false, + onTap: () { + context.read().analytics.appointment.book_appointment_select_doctor(appointment_type: 'regular', doctor: doctor); + }); + }, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemCount: patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList!.length), + ); + }, + itemCount: patientDoctorAppointmentListHospital.length, + ) + : getNoDataWidget(context), + ); + } +} diff --git a/lib/pages/BookAppointment/SearchResultsByRegion.dart b/lib/pages/BookAppointment/SearchResultsByRegion.dart new file mode 100644 index 00000000..a1666ffc --- /dev/null +++ b/lib/pages/BookAppointment/SearchResultsByRegion.dart @@ -0,0 +1,380 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class SearchResultsByRegion extends StatelessWidget { + List doctorsList = []; + RegionList patientDoctorAppointmentListHospital; + bool isLiveCareAppointment; + bool isObGyneAppointment; + bool isDoctorNameSearch; + OBGyneProcedureListResponse? obGyneProcedureListResponse; + bool isDoctorSearchResult; + + SearchResultsByRegion( + {required this.doctorsList, + required this.patientDoctorAppointmentListHospital, + this.isObGyneAppointment = false, + this.isDoctorNameSearch = false, + required this.isLiveCareAppointment, + required this.isDoctorSearchResult, + this.obGyneProcedureListResponse}); + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).bookAppo, + isShowDecPage: false, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: patientDoctorAppointmentListHospital + .registeredDoctorMap?.isNotEmpty == + true + ? ListView.separated( + addAutomaticKeepAlives: true, + physics: BouncingScrollPhysics(), + separatorBuilder: (context, index) { + return Material( + color: Color(0xFFf5f5f5), + child: SizedBox( + height: 12, + ), + ); + }, + itemBuilder: (context, index) { + String key = patientDoctorAppointmentListHospital + .registeredDoctorMap?.keys + .toList()[index] ?? + ''; + + return AppExpandableNotifier( + paddingValue: 10, + applyBackgroundToOnlyHeader: true, + completeHeaderColor: CustomColors.appBackgroudGrey2Color, + headerWidget: RegionTitle( + title: key, + hmcCount: + "${patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmcSize ?? 0}", + hmgCount: + "${patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmgSize ?? 0}", + ), + showDropDownIconWithCustomHeader: true, + isTitleSingleLine: false, + isDoctorSearchResult: isDoctorSearchResult, + widgetColor: Color(0xFFF8F8F8), + bodyWidget: Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: AppExpandableNotifier( + paddingValue: 8, + applyBackgroundColor: false, + applyBackgroundToOnlyHeader: true, + completeHeaderColor: Colors.white, + headerRadius: BorderRadius.circular(16), + headerWidget: HospitalTitle( + iconUrl: 'assets/images/svg/HMG.svg', + title: TranslationBase.of(context).hmgHospital, + isHMC: false, + itemCount: + "${patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmgSize ?? 0}", + ), + showDropDownIconWithCustomHeader: true, + bodyWidget: HospitalBodyWidget( + patientDoctorAppointmentListHospital: + patientDoctorAppointmentListHospital + .registeredDoctorMap?[key]?.hmgDoctorList, + isLiveCareAppointment: isLiveCareAppointment, + isObGyneAppointment: isObGyneAppointment, + isDoctorNameSearch: isDoctorNameSearch, + isDoctorSearchResult: isDoctorSearchResult, + ), + ), + ), + Padding( + padding: const EdgeInsets.only( + bottom: 8.0, left: 8, right: 8), + child: AppExpandableNotifier( + paddingValue: 8, + applyBackgroundColor: false, + applyBackgroundToOnlyHeader: true, + completeHeaderColor: Colors.white, + headerRadius: BorderRadius.circular(16), + headerWidget: HospitalTitle( + iconUrl: 'assets/images/svg/HMC.svg', + title: TranslationBase.of(context).hmcHospital, + isHMC: true, + itemCount: + "${patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmcSize ?? 0}", + ), + showDropDownIconWithCustomHeader: true, + bodyWidget: HospitalBodyWidget( + patientDoctorAppointmentListHospital: + patientDoctorAppointmentListHospital + .registeredDoctorMap?[key]?.hmcDoctorList, + isLiveCareAppointment: isLiveCareAppointment, + isObGyneAppointment: isObGyneAppointment, + isDoctorNameSearch: isDoctorNameSearch, + isDoctorSearchResult: isDoctorSearchResult, + ), + ), + ), + ], + )); + // return AppExpandableNotifier( + // title: (patientDoctorAppointmentListHospital[index].distanceInKMs != "0") + // ? patientDoctorAppointmentListHospital[index].filterName! + " - " + patientDoctorAppointmentListHospital[index].distanceInKMs! + " " + TranslationBase.of(context).km + // : patientDoctorAppointmentListHospital[index].filterName, + // projectTitleTop: patientDoctorAppointmentListHospital[index].projectTopName, + // projectTitleBottom: (patientDoctorAppointmentListHospital[index].distanceInKMs != "0") + // ? patientDoctorAppointmentListHospital[index].projectBottomName.toString() + + // " - " + + // patientDoctorAppointmentListHospital[index].distanceInKMs! + + // " " + + // TranslationBase.of(context).km + // : patientDoctorAppointmentListHospital[index].projectBottomName.toString(), + // isTitleSingleLine: false, + // isDoctorSearchResult: isDoctorSearchResult, + // isExpand: patientDoctorAppointmentListHospital.length == 1 ? true : false, + // bodyWidget: ListView.separated( + // shrinkWrap: true, + // physics: NeverScrollableScrollPhysics(), + // padding: EdgeInsets.only(bottom: 10, top: 10, left: 21, right: 21), + // itemBuilder: (context, _index) { + // final doctor = patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList![_index]; + // return DoctorView( + // doctor: doctor, + // isLiveCareAppointment: isLiveCareAppointment, + // isObGyneAppointment: isObGyneAppointment, + // isDoctorNameSearch: isDoctorNameSearch, + // obGyneProcedureListResponse: obGyneProcedureListResponse, + // isShowDate: false, + // onTap: () { + // context.read().analytics.appointment.book_appointment_select_doctor(appointment_type: 'regular', doctor: doctor); + // }); + // }, + // separatorBuilder: (context, index) => SizedBox(height: 14), + // itemCount: patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList!.length), + // ); + }, + itemCount: patientDoctorAppointmentListHospital + .registeredDoctorMap?.length ?? + 0, + ) + : getNoDataWidget(context), + ); + } +} + +class HospitalBodyWidget extends StatelessWidget { + final List? + patientDoctorAppointmentListHospital; + final bool isLiveCareAppointment; + final bool isObGyneAppointment; + final bool isDoctorNameSearch; + final bool isDoctorSearchResult; + final OBGyneProcedureListResponse? obGyneProcedureListResponse; + + const HospitalBodyWidget({ + super.key, + this.patientDoctorAppointmentListHospital, + required this.isLiveCareAppointment, + required this.isObGyneAppointment, + required this.isDoctorNameSearch, + required this.isDoctorSearchResult, + this.obGyneProcedureListResponse, + }); + + @override + Widget build(BuildContext context) { + return ListView.separated( + addAutomaticKeepAlives: true, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemCount: patientDoctorAppointmentListHospital?.length ?? 0, + separatorBuilder: (context, index) { + return Container( + height: 12, + margin: EdgeInsets.only(left: 21, right: 21), + ); + }, + itemBuilder: (context, index) { + return AppExpandableNotifier( + applyBackgroundColor: false, + widgetColor: CustomColors.appBackgroudGrey2Color, + title: (patientDoctorAppointmentListHospital?[index].distanceInKMs != + "0") + ? patientDoctorAppointmentListHospital![index].filterName! + + " - " + + patientDoctorAppointmentListHospital![index].distanceInKMs! + + " " + + TranslationBase.of(context).km + : patientDoctorAppointmentListHospital![index].filterName, + projectTitleTop: + patientDoctorAppointmentListHospital![index].projectTopName, + projectTitleBottom: (patientDoctorAppointmentListHospital![index] + .distanceInKMs != + "0") + ? patientDoctorAppointmentListHospital![index] + .projectBottomName + .toString() + + " - " + + patientDoctorAppointmentListHospital![index].distanceInKMs! + + " " + + TranslationBase.of(context).km + : patientDoctorAppointmentListHospital![index] + .projectBottomName + .toString(), + isTitleSingleLine: false, + isDoctorSearchResult: isDoctorSearchResult, + isExpand: + patientDoctorAppointmentListHospital?.length == 1 ? true : false, + bodyWidget: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + padding: + EdgeInsets.only(bottom: 10, top: 10, left: 21, right: 21), + itemBuilder: (context, _index) { + // print("the index of patientDoctorAppointmentList is ${_index}"); + // print("the index of parent is ${index}"); + final doctor = patientDoctorAppointmentListHospital![index] + .patientDoctorAppointmentList![_index]; + // print('the doctor is ${doctor.toJson()}'); + return DoctorView( + doctor: doctor, + isLiveCareAppointment: isLiveCareAppointment, + isObGyneAppointment: isObGyneAppointment, + isDoctorNameSearch: isDoctorNameSearch, + obGyneProcedureListResponse: obGyneProcedureListResponse, + isShowDate: false, + onTap: () { + context + .read() + .analytics + .appointment + .book_appointment_select_doctor( + appointment_type: 'regular', doctor: doctor); + }); + }, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemCount: patientDoctorAppointmentListHospital?[index].patientDoctorAppointmentList?.length ?? 0), + ); + }, + ); + } +} + +class RegionTitle extends StatelessWidget { + final String title; + final String hmcCount; + final String hmgCount; + + const RegionTitle( + {super.key, + required this.title, + required this.hmcCount, + required this.hmgCount}); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: TextStyle( + fontSize: 22, color: Colors.black, fontWeight: FontWeight.w700), + ), + SizedBox( + height: 8, + ), + Row( + children: [ + Text( + "${TranslationBase.of(context).HospitalString(num.parse(hmgCount)).replaceAll("@", hmgCount)} ,", + style: TextStyle( + fontSize: 14, + color: Color(0xFFD02127), + fontWeight: FontWeight.w600), + ), + SizedBox( + width: 8, + ), + Text( + "${TranslationBase.of(context).MedicalCenterString(num.parse(hmcCount)).replaceAll("@", hmcCount)}", + style: TextStyle( + fontSize: 14, + color: Color(0xFF40ACC9), + fontWeight: FontWeight.w600), + ), + ], + ), + ], + ), + ); + } +} + +class HospitalTitle extends StatelessWidget { + final String title; + final String iconUrl; + final bool isHMC; + final String itemCount; + + const HospitalTitle( + {super.key, + required this.title, + required this.iconUrl, + required this.isHMC, + required this.itemCount}); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + SvgPicture.asset(iconUrl), + SizedBox( + width: 8, + ), + Text( + title, + style: TextStyle( + fontSize: 18, + color: isHMC ? Color(0xFF40ACC9) : Color(0xFFD02127), + fontWeight: FontWeight.w600), + ), + ], + ), + SizedBox( + height: 6, + ), + Text( + isHMC + ? "${TranslationBase.of(context).MedicalCenterString(num.parse(itemCount)).replaceAll("@", itemCount)}" + : "${TranslationBase.of(context).HospitalString(num.parse(itemCount)).replaceAll("@", itemCount)}", + style: TextStyle( + fontSize: 12, color: Colors.black, fontWeight: FontWeight.w600), + ), + ], + ), + ); + } +} diff --git a/lib/pages/BookAppointment/book_reminder_page.dart b/lib/pages/BookAppointment/book_reminder_page.dart new file mode 100644 index 00000000..547ab901 --- /dev/null +++ b/lib/pages/BookAppointment/book_reminder_page.dart @@ -0,0 +1,227 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; +import 'package:diplomaticquarterapp/models/header_model.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.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:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; + +import 'BookSuccess.dart'; + +class BookReminderPage extends StatefulWidget { + PatientShareResponse patientShareResponse; + DoctorList docObject; + + String appoDateFormatted; + String appoTimeFormatted; + DateTime? dateTime; + bool isCash; + + BookReminderPage({required this.patientShareResponse, required this.docObject, required this.appoDateFormatted, required this.appoTimeFormatted, this.dateTime, this.isCash = false}); + + @override + _BookReminderPageState createState() => _BookReminderPageState(); +} + +class _BookReminderPageState extends State { + late MyInAppBrowser browser; + + // final ChromeSafariBrowser chromeBrowser = new MyChromeSafariBrowser(new MyInAppBrowser()); + + String? selectedTime; + bool isSuccessShow = true; + + @override + void initState() { + // TODO: implement initState + super.initState(); + Future.delayed(const Duration(seconds: 2), () { +// Here you can write your code + + setState(() { + isSuccessShow = false; + }); + }); + } + + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: widget.docObject.doctorTitle! + " " + widget.docObject.name!, + isShowDecPage: false, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + DoctorHeader( + headerModel: HeaderModel( + widget.docObject.name!, + widget.docObject.doctorID!, + widget.docObject.doctorImageURL!, + widget.docObject.speciality!, + "", + widget.docObject.projectName!, + null, + null, + widget.docObject.nationalityFlagURL ?? "", + widget.docObject.doctorRate ?? 0, + null, + widget.docObject.noOfPatientsRate ?? 0, + "", + ), + isNeedToShowButton: false, + ), + Expanded( + child: Container( + width: double.infinity, + height: double.infinity, + padding: EdgeInsets.only(bottom: 70), + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Icon( + Icons.notifications_active, + size: 60, + ), + Text( + TranslationBase.of(context).appointmentCalendar, + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ), + mFlex(1), + if (isSuccessShow) + Container( + width: double.infinity, + child: Container( + decoration: cardRadius(12), + margin: EdgeInsets.all(10), + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Row( + children: [ + circularAviator( + 30, + icon: Icons.done_rounded, + iconColor: Colors.white, + bcColor: CustomColors.green, + brColor: CustomColors.green, + ), + mWidth(10), + Expanded( + child: AutoSizeText( + TranslationBase.of(context).appointmentSuccess, + maxLines: 1, + minFontSize: 6, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.65, + ), + ), + ) + ], + ), + ), + ), + ), + ], + ), + ), + ), + ), + ], + ), + bottomSheet: Container( + color: CustomColors.appBackgroudGreyColor, + child: Container( + color: CustomColors.white, + margin: EdgeInsets.all(14), + height: 45.0, + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Expanded( + flex: 1, + child: CustomTextButton( + backgroundColor: CustomColors.accentColor, + elevation: 0, + onPressed: () { + navigateToBookSuccess(context); + projectViewModel.analytics.appointment.appointment_reminder(false); + }, + child: Text(TranslationBase.of(context).no, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48, color: Colors.white)), + ), + ), + mWidth(7), + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.green, + elevation: 0, + onPressed: () async { + showReminderDialog(context, widget.dateTime!, widget.docObject.name!, widget.patientShareResponse.appointmentNo.toString(), widget.appoDateFormatted, widget.appoTimeFormatted, + onSuccess: () { + AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); + navigateToBookSuccess(context); + }, title: null, description: null); + projectViewModel.analytics.appointment.appointment_reminder(true); + }, + child: Text(TranslationBase.of(context).yes, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48, color: Colors.white)), + ), + ), + ), + ], + ), + ), + ), + ); + } + + Future navigateToBookSuccess(BuildContext context) async { + Navigator.push( + context, + FadePage( + page: BookSuccess( + docObject: widget.docObject, + patientShareResponse: widget.patientShareResponse, + appoDateFormatted: widget.appoDateFormatted, + appoTimeFormatted: widget.appoTimeFormatted, + isCash: widget.isCash, + ), + ), + ); + } + + Future> requestPermissions() async { + var permissionResults = [Permission.calendarFullAccess].request(); + return permissionResults; + } +} diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart new file mode 100644 index 00000000..67a795da --- /dev/null +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -0,0 +1,599 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart'; +import 'package:diplomaticquarterapp/models/Appointments/timeSlot.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; +import 'package:provider/provider.dart'; +import 'package:syncfusion_flutter_calendar/calendar.dart'; +import 'dart:convert'; +import '../../../uitl/date_uitl.dart'; + +class DocAvailableAppointments extends StatefulWidget { + DoctorList doctor; + static bool areSlotsAvailable = false; + static bool areAppointmentsAvailable = false; + static DateTime? selectedAppoDateTime; + static String? selectedDate; + static String? selectedTime; + bool isLiveCareAppointment; + bool isContinueDentalPlan; + final dynamic doctorSchedule; + static int? initialSlotDuration; + + DocAvailableAppointments({required this.doctor, this.doctorSchedule, required this.isLiveCareAppointment, this.isContinueDentalPlan = false}); + + @override + _DocAvailableAppointmentsState createState() => _DocAvailableAppointmentsState(); +} + +class _DocAvailableAppointmentsState extends State with TickerProviderStateMixin { + late Map _events; + late AnimationController _animationController; + late CalendarController _calendarController; + + AppSharedPreferences sharedPref = new AppSharedPreferences(); + + var selectedDate = ""; + var selectedNextDate = ""; + dynamic selectedDateJSON; + dynamic jsonFreeSlots; + final DateFormat dateFormatter = DateFormat('yyyy-MM-dd'); + List docFreeSlots = []; + List dayEvents = []; + List nextDayEvents = []; + int selectedButtonIndex = 0; + int selectedNextDayButtonIndex = -1; + dynamic freeSlotsResponse; + + // String nextDayAppointmentDate =""; + late ScrollController _scrollController; + + var language; + bool isLiveCareSchedule = false; + + bool isWaitingAppointmentAvailable = false; + + // String selectedLogSlots =''; + + @override + void didUpdateWidget(covariant DocAvailableAppointments oldWidget) { + if (oldWidget.doctorSchedule != widget.doctorSchedule) { + _onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date'])); + _calendarController.selectedDate = DateUtil.convertStringToDate(widget.doctorSchedule['Date']); + } + super.didUpdateWidget(oldWidget); + } + + @override + void initState() { + // TODO: implement initState + super.initState(); + final _selectedDay = DateTime.now(); + + _scrollController = new ScrollController(); + + _events = { + _selectedDay: ['Event A0'] + }; + + WidgetsBinding.instance.addPostFrameCallback((_) async { + getCurrentLanguage(); + isLiveCareSchedule = await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) ?? false; + if (isLiveCareSchedule != null && isLiveCareSchedule) + getDoctorScheduledFreeSlots(context, widget.doctor); + else { + getDoctorFreeSlots(context, widget.doctor); + } + }); + + _calendarController = CalendarController(); + _animationController = AnimationController( + vsync: this, + duration: const Duration(milliseconds: 50), + ); + + _animationController.forward(); + } + + @override + void dispose() { + _animationController.dispose(); + _calendarController.dispose(); + super.dispose(); + } + + void _onDaySelected(DateTime day) { + final DateFormat formatter = DateFormat('yyyy-MM-dd'); + setState(() { + this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, language); + this.selectedNextDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day.add(Duration(days: 1)), language); + _calendarController.selectedDate = day; + openTimeSlotsPickerForDate(day, docFreeSlots); + DocAvailableAppointments.selectedDate = formatter.format(day); + selectedNextDayButtonIndex = -1; + print(_calendarController.selectedDate); + }); + } + + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return SingleChildScrollView( + child: Container( + child: Column( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _buildTableCalendarWithBuilders(), + Padding( + padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16), + child: Text(selectedDate, style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.w600, letterSpacing: -0.64)), + ), + DocAvailableAppointments.areSlotsAvailable + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + height: 40, + child: ListView.builder( + controller: _scrollController, + scrollDirection: Axis.horizontal, + itemCount: dayEvents.length, + itemBuilder: (context, index) { + return Container( + margin: EdgeInsets.only(right: (index == dayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5), + child: index == selectedButtonIndex ? getSelectedButton(index) : getNormalButton(index), + ); + }, + ), + ), + SizedBox( + height: 20, + ), + nextDayEvents.isNotEmpty && projectViewModel.havePrivilege(110) + ? Container( + padding: EdgeInsets.only(left: 20, right: 20, bottom: 20), + child: Text( + selectedNextDate, + style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.black), + ), + ) + : SizedBox(), + Container( + height: 40, + padding: EdgeInsets.only(left: 0, right: 0), + child: ListView.builder( + controller: _scrollController, + scrollDirection: Axis.horizontal, + itemCount: nextDayEvents.length, + itemBuilder: (context, index) { + return Container( + margin: EdgeInsets.only(right: (index == nextDayEvents.length - 1) ? 16 : 5.0, left: index == 0 ? 16 : 5), + child: index == selectedNextDayButtonIndex ? getSelectedNextDayButton(index) : getNormalNextDayButton(index), + ); + }, + ), + ) + ], + ) + : Center( + child: Padding( + padding: const EdgeInsets.only(left: 12.0, right: 12.0), + child: Text(TranslationBase.of(context).noSlotsError, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.grey)), + )), + ], + ), + ), + ); + } + + Widget _buildTableCalendarWithBuilders() { + return Container( + decoration: cardRadius(12), + margin: EdgeInsets.all(16), + clipBehavior: Clip.antiAlias, + child: Padding( + padding: const EdgeInsets.only(bottom: 12), + child: Container( + child: SfCalendar( + controller: _calendarController, + minDate: DateTime.now(), + // showNavigationArrow: true, + headerStyle: CalendarHeaderStyle(textAlign: TextAlign.center, textStyle: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46)), + viewHeaderStyle: ViewHeaderStyle(dayTextStyle: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.black)), + view: CalendarView.month, + todayHighlightColor: Colors.transparent, + todayTextStyle: TextStyle(color: Colors.black), + selectionDecoration: containerColorRadiusBorderWidthCircular(Colors.transparent, 4, CustomColors.green, 2.5), + cellBorderColor: Colors.white, + dataSource: MeetingDataSource(_getDataSource()), + monthViewSettings: const MonthViewSettings(appointmentDisplayMode: MonthAppointmentDisplayMode.indicator, showTrailingAndLeadingDates: false, appointmentDisplayCount: 1), + onTap: (CalendarTapDetails details) { + _calendarController.selectedDate = details.date; + _onDaySelected(details.date!); + }, + ), + ), + )); + } + + List _getDataSource() { + final List meetings = []; + + _events.forEach((key, value) { + final DateTime startTime = DateTime(key.year, key.month, key.day, 9, 0, 0); + final DateTime endTime = startTime.add(const Duration(hours: 2)); + meetings.add(Meeting("", startTime, endTime, CustomColors.green, false, "")); + }); + return meetings; + } + + openTimeSlotsPickerForDate(DateTime dateStart, List freeSlots) { + dayEvents.clear(); + DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0); + if (isWaitingAppointmentAvailable && DateUtils.isSameDay(dateStart, DateTime.now())) { + dayEvents.add(TimeSlot(isoTime: TranslationBase.of(context).waitingAppointment, start: DateTime.now(), end: DateTime.now(), vidaDate: "")); + } + freeSlots.forEach((v) { + if (v.start == dateStartObj) dayEvents.add(v); + }); + + setState(() { + if (dayEvents.length != 0) { + DocAvailableAppointments.areSlotsAvailable = true; + selectedButtonIndex = 0; + // selectedLogSlots = dayEvents[selectedButtonIndex].toString(); + List> timeList = []; + for (var i = 0; i < dayEvents.length; i++) { + Map timeSlot = {"isoTime": dayEvents[i].isoTime, "start": dayEvents[i].start.toString(), "end": dayEvents[i].end.toString(), "vidaDate": dayEvents[i].vidaDate}; + timeList.add(timeSlot); + } + filterNextDayAppo(freeSlots, timeList.last); + AppSharedPreferences sharedPref = new AppSharedPreferences(); + sharedPref.setString('selectedLogSlots', json.encode(timeList)); + DocAvailableAppointments.selectedTime = dayEvents[selectedButtonIndex].isoTime; + } else + DocAvailableAppointments.areSlotsAvailable = false; + }); + } + + filterNextDayAppo(List freeSlots, Map listList) { + DateTime dateStart = DateTime.parse(listList['end']).add(Duration(days: 1)); + + DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0); + nextDayEvents = []; + DateTime beforeHour = new DateTime(dateStart.year, dateStart.month, dateStart.day, 6, 0, 0, 0, 0); + if (projectViewModel.havePrivilege(110)) { + freeSlots.forEach((v) { + if (v.start == dateStartObj && v.end!.isBefore(beforeHour)) nextDayEvents.add(v); + }); + } else { + nextDayEvents = []; + } + // print(nextDayEvents); + } + + Future> _getJSONSlots() async { + Map _eventsParsed; + List slotsList = []; + DateTime date; + final DateFormat formatter = DateFormat('HH:mm'); + for (var i = 0; i < freeSlotsResponse.length; i++) { + date = (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[i]) + : DateUtil.convertStringToDateSaudiTimezone(freeSlotsResponse[i], int.parse(widget.doctor.projectID.toString())); + slotsList.add(FreeSlot(date, ['slot'])); + docFreeSlots.add(TimeSlot(isoTime: formatter.format(date), start: new DateTime(date.year, date.month, date.day, 0, 0, 0, 0), end: date, vidaDate: freeSlotsResponse[i])); + } + _eventsParsed = Map.fromIterable(slotsList, key: (e) => e.slot, value: (e) => e.event); + setState(() { + DocAvailableAppointments.selectedDate = dateFormatter.format( + (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]) + : DateUtil.convertStringToDateSaudiTimezone( + freeSlotsResponse[0], + int.parse( + widget.doctor.projectID.toString(), + ), + ), + ); + + DocAvailableAppointments.selectedAppoDateTime = (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]) + : DateUtil.convertStringToDateSaudiTimezone( + freeSlotsResponse[0], + int.parse( + widget.doctor.projectID.toString(), + ), + ); + selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted( + (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]) + : DateUtil.convertStringToDateSaudiTimezone( + freeSlotsResponse[0], + int.parse( + widget.doctor.projectID.toString(), + ), + ), + language); + selectedNextDate = DateUtil.getWeekDayMonthDayYearDateFormatted( + (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(freeSlotsResponse[0]).add(Duration(days: 1)) + : DateUtil.convertStringToDateSaudiTimezone( + freeSlotsResponse[0], + int.parse( + widget.doctor.projectID.toString(), + ), + ).add(Duration(days: 1)), + language); + selectedDateJSON = freeSlotsResponse[0]; + }); + openTimeSlotsPickerForDate( + isWaitingAppointmentAvailable + ? DateTime.now() + : (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(selectedDateJSON) + : DateUtil.convertStringToDateSaudiTimezone( + selectedDateJSON, + int.parse( + widget.doctor.projectID.toString(), + ), + ), + docFreeSlots); + _calendarController.selectedDate = isWaitingAppointmentAvailable + ? DateTime.now() + : (isLiveCareSchedule != null && isLiveCareSchedule) + ? DateUtil.convertStringToDate(selectedDateJSON) + : DateUtil.convertStringToDateSaudiTimezone( + selectedDateJSON, + int.parse( + widget.doctor.projectID.toString(), + ), + ); + _calendarController.displayDate = _calendarController.selectedDate; + return _eventsParsed; + } + + Widget getNormalButton(int index) { + return CustomTextButton( + backgroundColor: Colors.white, + elevation: 0, + side: BorderSide( + color: Colors.black, //Color of the border + style: BorderStyle.solid, //Style of the border + width: 1.5 //width of the border + ), + onPressed: () { + final timeslot = dayEvents[index]; + DocAvailableAppointments.selectedAppoDateTime = timeslot.end; + + setState(() { + selectedButtonIndex = index; + selectedNextDayButtonIndex = -1; + DocAvailableAppointments.selectedTime = dayEvents[index].isoTime; + print(DocAvailableAppointments.selectedTime); + DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!); + }); + projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); + }, + child: Text(dayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Color(0xFF60686b))), + ); + } + + Widget getSelectedButton(int index) { + return CustomTextButton( + backgroundColor: dayEvents[index].isoTime == TranslationBase.of(context).waitingAppointment ? CustomColors.darkOrange : CustomColors.green, + elevation: 0, + side: BorderSide( + color: dayEvents[index].isoTime == TranslationBase.of(context).waitingAppointment ? CustomColors.darkOrange : CustomColors.green, //Color of the border + style: BorderStyle.solid, //Style of the border + width: 1.5 //width of the border + ), + onPressed: () { + setState(() { + selectedButtonIndex = index; + DocAvailableAppointments.selectedTime = dayEvents[index].isoTime; + DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!); + print(DocAvailableAppointments.selectedTime); + }); + }, + child: Text(dayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Colors.white)), + ); + } + + Widget getNormalNextDayButton(int index) { + return CustomTextButton( + backgroundColor: Colors.white, + elevation: 0, + side: BorderSide( + color: Colors.black, //Color of the border + style: BorderStyle.solid, //Style of the border + width: 1.5 //width of the border + ), + onPressed: () { + final timeslot = nextDayEvents[index]; + DocAvailableAppointments.selectedAppoDateTime = timeslot.end; + + setState(() { + selectedButtonIndex = -1; + selectedNextDayButtonIndex = index; + DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime; + DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!.add(Duration(days: 1))); + print(DocAvailableAppointments.selectedTime); + }); + projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor); + }, + child: Text(nextDayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Color(0xFF60686b))), + ); + } + + Widget getSelectedNextDayButton(int index) { + return CustomTextButton( + backgroundColor: nextDayEvents[index].isoTime == TranslationBase.of(context).waitingAppointment ? CustomColors.darkOrange : CustomColors.green, + elevation: 0, + side: BorderSide( + color: nextDayEvents[index].isoTime == TranslationBase.of(context).waitingAppointment ? CustomColors.darkOrange : CustomColors.green, //Color of the border + style: BorderStyle.solid, //Style of the border + width: 1.5 //width of the border + ), + onPressed: () { + setState(() { + selectedButtonIndex = -1; + selectedNextDayButtonIndex = index; + DocAvailableAppointments.selectedTime = nextDayEvents[index].isoTime; + DocAvailableAppointments.selectedDate = dateFormatter.format(_calendarController.selectedDate!.add(Duration(days: 1))); + print(DocAvailableAppointments.selectedTime); + }); + }, + child: Text(nextDayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, color: Colors.white)), + ); + } + + getDoctorFreeSlots(context, DoctorList docObject) { + print(DocAvailableAppointments.initialSlotDuration); + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getDoctorFreeSlots(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, widget.isContinueDentalPlan, context, projectViewModel).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + if (res['FreeTimeSlots'].length != 0) { + isWaitingAppointmentAvailable = res['IsAllowToBookWaitingAppointment']; // true; + // isWaitingAppointmentAvailable = true; // true; + DocAvailableAppointments.initialSlotDuration = res['InitialSlotDuration']; + DocAvailableAppointments.areAppointmentsAvailable = true; + freeSlotsResponse = res['FreeTimeSlots']; + _getJSONSlots().then((value) { + setState(() { + _events.clear(); + _events = value; + if (widget.doctorSchedule != null) { + _onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date'])); + _calendarController.selectedDate = DateUtil.convertStringToDate( + widget.doctorSchedule['Date'], + ); + } + ; + }); + }); + } else { + DocAvailableAppointments.areAppointmentsAvailable = false; + DocAvailableAppointments.areSlotsAvailable = false; + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + getDoctorScheduledFreeSlots(context, DoctorList docObject) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service + .getDoctorScheduledFreeSlots( + int.parse(docObject.doctorID.toString()), + int.parse(docObject.clinicID.toString()), + int.parse(docObject.projectID.toString()), + docObject.serviceID, + context, + ) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + if (res['PatientER_DoctorFreeSlots'].length != 0) { + DocAvailableAppointments.initialSlotDuration = res['InitialSlotDuration']; + DocAvailableAppointments.areAppointmentsAvailable = true; + freeSlotsResponse = res['PatientER_DoctorFreeSlots']; + _getJSONSlots().then((value) => { + setState(() => {_events.clear(), _events = value}) + }); + } else { + DocAvailableAppointments.areAppointmentsAvailable = false; + } + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + getCurrentLanguage() async { + this.language = projectViewModel.isArabic ? "ar" : "en"; + // var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + // setState(() { + // this.language = languageID; + // }); + } +} + +class MeetingDataSource extends CalendarDataSource { + MeetingDataSource(List source) { + appointments = source; + } + + @override + DateTime getStartTime(int index) { + return _getMeetingData(index)!.from; + } + + @override + DateTime getEndTime(int index) { + return _getMeetingData(index)!.to; + } + + @override + String getSubject(int index) { + return _getMeetingData(index)!.eventName; + } + + @override + Color getColor(int index) { + return _getMeetingData(index)!.background; + } + + @override + bool isAllDay(int index) { + return _getMeetingData(index)!.isAllDay; + } + + Meeting? _getMeetingData(int index) { + final dynamic meeting = appointments?[index]; + Meeting? meetingData; + if (meeting is Meeting) { + meetingData = meeting; + } + return meetingData; + } +} + +class Meeting { + Meeting(this.eventName, this.from, this.to, this.background, this.isAllDay, this.notes); + + String eventName; + DateTime from; + DateTime to; + Color background; + bool isAllDay; + String notes; +} diff --git a/lib/pages/BookAppointment/components/DocInfo.dart b/lib/pages/BookAppointment/components/DocInfo.dart new file mode 100644 index 00000000..eda3a1e4 --- /dev/null +++ b/lib/pages/BookAppointment/components/DocInfo.dart @@ -0,0 +1,130 @@ +import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; + +class DoctorInformation extends StatelessWidget { + DoctorProfileList docProfileList; + + DoctorInformation({required this.docProfileList}); + + @override + Widget build(BuildContext context) { + return Container( + margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + width: double.infinity, + child: Container( + decoration: cardRadius(12), + child: Padding( + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).docInfo, + style: TextStyle( + fontSize: 16.0, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + mHeight(10), + Row( + children: [ + Text( + TranslationBase.of(context).gender + ":", + style: TextStyle( + fontSize: 10, + letterSpacing: -0.4, + color: Color(0xFF575757), + fontWeight: FontWeight.w600, + ), + ), + mWidth(2), + Text( + docProfileList.genderDescription!, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + color: Color(0xFF575757), + fontWeight: FontWeight.w600, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).nationality + ":", + style: TextStyle( + fontSize: 10, + letterSpacing: -0.4, + color: Color(0xFF575757), + fontWeight: FontWeight.w600, + ), + ), + mWidth(2), + Text( + docProfileList.nationalityName!, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + color: Color(0xFF575757), + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ], + ), + ), + ), + ), + mHeight(8), + Container( + width: double.infinity, + child: Container( + decoration: cardRadius(12), + child: Padding( + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).docQualifications, + style: TextStyle( + fontSize: 16.0, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + mHeight(10), + Text( + docProfileList.doctorProfileInfo != null ? docProfileList.doctorProfileInfo! : "", + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + color: Color(0xFF575757), + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ), + ), + ], + ), + ); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('docProfileList', docProfileList)); + } +} diff --git a/lib/pages/BookAppointment/components/LaserClinic.dart b/lib/pages/BookAppointment/components/LaserClinic.dart new file mode 100644 index 00000000..f1b9be57 --- /dev/null +++ b/lib/pages/BookAppointment/components/LaserClinic.dart @@ -0,0 +1,529 @@ +import 'dart:collection'; + +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/laser_body_parts.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/laser_body_parts_data.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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'; + +class LaserClinic extends StatefulWidget { + HospitalsModel selectedHospital; + + LaserClinic({required this.selectedHospital}); + + @override + _LaserClinicState createState() { + return _LaserClinicState(); + } +} + +class _LaserClinicState extends State with SingleTickerProviderStateMixin { + List _laserCategoryList = [1, 2, 11]; + List _selectedBodyPartList = []; + bool _isFullBody = false; + late LaserBodyPart fullBody; + int _selectedCategoryIndex = 0; + List laserBodyPartsList = []; + + late TabController _tabController; + int _duration = 0; + + List maleLaserCategory = []; + List femaleLaserCategory = []; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + _tabController.addListener(() { + if (_tabController.indexIsChanging) { + } else { + _selectedBodyPartList = []; + laserBodyPartsList = []; + _selectedCategoryIndex = 0; + setState(() {}); + if (_tabController.index == 0) { + callLaserBodyPartsAPI(maleLaserCategory[_selectedCategoryIndex].laserCategoryID); + } else { + callLaserBodyPartsAPI(femaleLaserCategory[_selectedCategoryIndex].laserCategoryID); + } + } + }); + Future.delayed(Duration.zero, () { + callLaserBodyPartsAPI(maleLaserCategory[_selectedCategoryIndex].laserCategoryID); + }); + } + + callLaserBodyPartsAPI(int laserCategoryId) async { + GifLoaderDialogUtils.showMyDialog(context); + + DoctorsListService service = new DoctorsListService(); + service.getLaserBodyPartsList(laserCategoryId, widget.selectedHospital.iD, projectViewModel.isArabic ? 1 : 2).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + if (res['Laser_GetBodyPartsByCategoryList'].length != 0) { + List _tempList = []; + res['Laser_GetBodyPartsByCategoryList'].forEach((v) { + _tempList.add(LaserBodyPart.fromJson(v)); + }); + // if (_tempList[0].category == 1 || _tempList[0].category == 11 || _tempList[0].category == 2 || _tempList[0].category == 10) { + if (_tempList[0].category == 2 || _tempList[0].category == 10) { + // fullBody = _tempList[0]; + _tempList.removeAt(0); + } + laserBodyPartsList = _tempList; + } else {} + setState(() {}); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); + } + + bool lastIndexIsFirst = false; + bool isLastIndexIsBack = false; + late ProjectViewModel projectViewModel; + + bool get isMale => _tabController.index == 0; + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + maleLaserCategory = [ + LaserCategoryType(1, TranslationBase.of(context).bodyString), + LaserCategoryType(2, TranslationBase.of(context).face), + LaserCategoryType(11, TranslationBase.of(context).retouch), + ]; + femaleLaserCategory = [ + LaserCategoryType(1, TranslationBase.of(context).bodyString), + LaserCategoryType(2, TranslationBase.of(context).face), + LaserCategoryType(10, TranslationBase.of(context).bikini), + LaserCategoryType(11, TranslationBase.of(context).retouch), + ]; + return AppScaffold( + appBarTitle: TranslationBase.of(context).laserClinic, + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + backgroundColor: Color(0xfff7f7f7), + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).male), Text(TranslationBase.of(context).female)], + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [male(), female()], + ), + ), + Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).totalMinutes + ":", + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + letterSpacing: -0.48, + ), + ), + Text( + "${getDuration()} / 90", + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + color: Color(0xff2E303A), + letterSpacing: -0.64, + ), + ), + ], + ), + ), + Expanded( + child: DefaultButton( + TranslationBase.of(context).continues, + getDuration() != 0 + ? () { + callDoctorsSearchAPI(); + } + : null, + color: CustomColors.green, + disabledColor: CustomColors.grey2, + ), + ), + ], + ).insideContainer, + ], + ), + ); + } + + callDoctorsSearchAPI() { + int languageID = projectViewModel.isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false); + List doctorsList = []; + List arr = []; + List arrDistance = []; + List result; + int numAll; + List _patientDoctorAppointmentListHospital = []; + + DoctorsListService service = new DoctorsListService(); + projectViewModel.selectedBodyPartList = _selectedBodyPartList; + service.getDoctorsList(253, 0, false, languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + if (res['DoctorList'].length != 0) { + doctorsList.clear(); + res['DoctorList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson(v)); + }); + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList( + filterName: element.projectName, + distanceInKMs: element.projectDistanceInKiloMeters.toString(), + projectTopName: element.projectTopName, + projectBottomName: element.projectBottomName, + patientDoctorAppointment: element)); + } + }); + } else {} + }); + + result = LinkedHashSet.from(arr).toList(); + numAll = result.length; + projectViewModel.laserSelectionDuration = _duration; + navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); + } + + Future navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) async { + Navigator.push( + context, + FadePage( + page: SearchResults( + isLiveCareAppointment: false, + doctorsList: docList, + patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, + isDoctorSearchResult: true, + ))).then((value) { + setState(() { + // dropdownValue = null; + }); + // getProjectsList(); + }); + } + + int getDuration() { + int duration = 0; + if (_isFullBody) { + _duration = int.parse(fullBody.timeDuration!); + projectViewModel.laserSelectionDuration = duration; + return _duration; + } + + var lowerUpperLegsList = _selectedBodyPartList.where((element) => element.mappingCode == "47" || element.mappingCode == "48")?.toList() ?? []; + var upperLowerArmsList = _selectedBodyPartList.where((element) => element.mappingCode == "40" || element.mappingCode == "41")?.toList() ?? []; + + if (_selectedBodyPartList.length > 0) { + duration = _selectedBodyPartList.fold(0, (previousValue, element) => previousValue + int.parse(element.timeDuration!)); + } + if (lowerUpperLegsList.length == 2) { + duration -= 30; + } + if (upperLowerArmsList.length == 2) { + duration -= 15; + } + _duration = duration; + projectViewModel.laserSelectionDuration = duration; + return duration; + } + + Widget laserCategoryWidget(List list, VoidCallback onTap) { + return SizedBox( + height: 40, + child: ListView.separated( + itemCount: list.length, + physics: BouncingScrollPhysics(), + scrollDirection: Axis.horizontal, + separatorBuilder: (cxt, index) => SizedBox(width: 8), + itemBuilder: (cxt, index) { + return InkWell( + onTap: () { + // setState(() { + _selectedCategoryIndex = index; + // }); + onTap(); + }, + child: Container( + decoration: BoxDecoration( + color: _selectedCategoryIndex == index ? Color(0xffD02127) : Colors.white, + borderRadius: BorderRadius.circular(36), + border: Border.all( + width: 1, + color: _selectedCategoryIndex == index ? Colors.transparent : Color(0xffEAEAEA), + ), + ), + padding: EdgeInsets.symmetric(vertical: 8, horizontal: 26), + child: Text( + list[index].title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: _selectedCategoryIndex == index ? Colors.white : Color(0xff535353), + letterSpacing: -0.48, + ), + ), + ), + ); + }, + ), + ); + } + + Widget bodyPartsGridView() { + return Container( + padding: EdgeInsets.symmetric(vertical: 21, horizontal: 14), + margin: EdgeInsets.only(top: 16), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(15.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + // if (fullBody != null) + // Row( + // children: [ + // SizedBox( + // width: 22, + // height: 22, + // child: Theme( + // data: Theme.of(context).copyWith( + // unselectedWidgetColor: Color(0xffEAEAEA), + // ), + // child: Checkbox( + // value: _isFullBody, + // onChanged: (value) { + // setState(() { + // if (value!) { + // _selectedBodyPartList.clear(); + // _selectedBodyPartList.add(fullBody); + // } else { + // _selectedBodyPartList.clear(); + // } + // _isFullBody = !_isFullBody; + // }); + // }, + // activeColor: Color(0xffD02127), + // ), + // ), + // ), + // SizedBox(width: 12), + // Text( + // projectViewModel.isArabic ? fullBody.bodyPartN! : fullBody.bodyPart!, + // style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.6, height: 21 / 14), + // ), + // ], + // ), + GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 85 / 107, crossAxisSpacing: 4, mainAxisSpacing: 21), + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: laserBodyPartsList.length, + // padding: fullBody != null ? EdgeInsets.only(top: 16) : EdgeInsets.zero, + padding: EdgeInsets.zero, + itemBuilder: (BuildContext context, int index) { + bool _isSelected = _selectedBodyPartList.any((file) => file.id == laserBodyPartsList[index].id); + return InkWell( + onTap: _isFullBody + ? null + : () { + if (_duration >= 90) { + if (_isSelected) { + _selectedBodyPartList.removeWhere((element) => element.id == laserBodyPartsList[index].id); + + // _selectedBodyPartList.remove(laserBodyPartsList[index]); + setState(() {}); + return; + } + AppToast.showToast(message: TranslationBase.of(context).laserMaxLimitReach, timeInSeconds: 3); + return; + } + if (_isSelected) { + _selectedBodyPartList.removeWhere((element) => element.id == laserBodyPartsList[index].id); + // _selectedBodyPartList.remove(laserBodyPartsList[index]); + } else { + if (_duration + int.parse(laserBodyPartsList[index].timeDuration!) > 90) { + AppToast.showToast(message: TranslationBase.of(context).laserMaxLimitReach); + return; + } + _selectedBodyPartList.add(laserBodyPartsList[index]); + } + setState(() {}); + }, + child: AnimatedOpacity( + opacity: _isFullBody ? 0.25 : 1.0, + duration: Duration(milliseconds: 200), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AspectRatio( + aspectRatio: 97 / 97, + child: FittedBox( + fit: BoxFit.fitWidth, + child: Stack( + alignment: Alignment.topRight, + children: [ + Container( + margin: EdgeInsets.only(top: 5, right: 5), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15.0), + border: Border.all(color: _isSelected ? Color(0xffD02127) : Color(0xffEAEAEA), width: 2), + ), + child: LaserBodyParts() + .getCategoryImage(isMale, (isMale ? maleLaserCategory : femaleLaserCategory)[_selectedCategoryIndex].laserCategoryID, laserBodyPartsList[index].mappingCode!), + ), + if (_isSelected) + Container( + width: 18, + height: 18, + child: Icon(Icons.done, color: Colors.white, size: 12), + decoration: BoxDecoration( + color: Color(0xffD02127), + borderRadius: BorderRadius.circular(30.0), + ), + ), + ], + ), + ), + ), + SizedBox(height: 6), + Expanded( + child: Text( + projectViewModel.isArabic ? laserBodyPartsList[index].bodyPartN! : laserBodyPartsList[index].bodyPart!, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.48, + ), + maxLines: 1, + ), + ), + ], + ), + ), + ); + }, + ), + ], + ), + ); + } + + Widget male() { + return ListView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + children: [ + laserCategoryWidget(maleLaserCategory, () { + callLaserBodyPartsAPI(maleLaserCategory[_selectedCategoryIndex].laserCategoryID); + }), + if (laserBodyPartsList.isNotEmpty) bodyPartsGridView() + ], + ); + } + + Widget female() { + return ListView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + children: [ + laserCategoryWidget(femaleLaserCategory, () { + callLaserBodyPartsAPI(femaleLaserCategory[_selectedCategoryIndex].laserCategoryID); + }), + if (laserBodyPartsList.isNotEmpty) bodyPartsGridView() + ], + ); + } +} + +class LaserCategoryType { + int laserCategoryID; + String title; + + LaserCategoryType(this.laserCategoryID, this.title); +} diff --git a/lib/pages/BookAppointment/components/LiveCareBookAppointment.dart b/lib/pages/BookAppointment/components/LiveCareBookAppointment.dart new file mode 100644 index 00000000..28c07be1 --- /dev/null +++ b/lib/pages/BookAppointment/components/LiveCareBookAppointment.dart @@ -0,0 +1,356 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class LiveCareBookAppointment extends StatefulWidget { + final dynamic clinicName; + final dynamic liveCareClinicID; + final dynamic liveCareServiceID; + + LiveCareBookAppointment( + {this.clinicName, this.liveCareClinicID, this.liveCareServiceID}); + + @override + _LiveCareBookAppointmentState createState() => + _LiveCareBookAppointmentState(); +} + +class _LiveCareBookAppointmentState extends State { + AppSharedPreferences sharedPref = AppSharedPreferences(); + + @override + Widget build(BuildContext context) { + return AppScaffold( + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).bookAppo, + isShowAppBar: true, + isShowDecPage: false, + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.all(10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + margin: EdgeInsets.all(5.0), + child: Text(TranslationBase.of(context).clinicAcceptLivecare, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.black, + fontSize: 16.0, + letterSpacing: 0.5)), + ), + Container( + margin: EdgeInsets.all(15.0), + padding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + decoration: BoxDecoration( + color: Color(0xff20bc44), + borderRadius: BorderRadius.all(Radius.circular(8.0))), + child: Text(TranslationBase.of(context).livecareModalTop, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontSize: 16.0, + fontWeight: FontWeight.w600, + letterSpacing: 0.5)), + ), + Container( + margin: EdgeInsets.all(15.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SvgPicture.asset( + "assets/images/new-design/liveCare_mobile_care.svg", + ), + Flexible( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(bottom: 7.0), + child: Text( + TranslationBase.of(context).whyLivecare, + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.w600, + letterSpacing: 1.0, + color: Colors.black)), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: + MediaQuery.of(context).size.width * 0.4, + margin: EdgeInsets.only( + left: 5.0, right: 5.0, bottom: 10.0), + child: Text( + TranslationBase.of(context) + .livecarePoint1, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: + MediaQuery.of(context).size.width * 0.4, + margin: EdgeInsets.only( + left: 5.0, right: 5.0, bottom: 10.0), + child: Text( + TranslationBase.of(context) + .livecarePoint5, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: + MediaQuery.of(context).size.width * 0.4, + margin: EdgeInsets.only( + left: 5.0, right: 5.0, bottom: 10.0), + child: Text( + TranslationBase.of(context) + .livecarePoint2, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: + MediaQuery.of(context).size.width * 0.4, + margin: EdgeInsets.only( + left: 5.0, right: 5.0, bottom: 10.0), + child: Text( + TranslationBase.of(context) + .livecarePoint3, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: + MediaQuery.of(context).size.width * 0.4, + margin: + EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context) + .livecarePoint4, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + ], + ), + ], + ), + ), + ) + ], + ), + ), + Container( + child: Text(TranslationBase.of(context).livecareSummary, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 12.0, + letterSpacing: 0.5, + color: Colors.black)), + ), + Container( + child: InkWell( + onTap: () { + sharedPref.setString( + LIVECARE_CLINIC_DATA, + widget.clinicName + + "-" + + widget.liveCareClinicID + + "-" + + widget.liveCareServiceID); + Navigator.pop(context, "livecare"); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.grey[700], + borderRadius: + BorderRadius.all(Radius.circular(10.0))), + margin: EdgeInsets.only(top: 10.0), + padding: EdgeInsets.all(10.0), + child: Row( + children: [ + Container( + margin: EdgeInsets.only(left: 10.0, right: 10.0), + child: SvgPicture.asset( + "assets/images/new-design/liveCare_logo_icon_white.svg", + width: 70), + ), + Container( + width: MediaQuery.of(context).size.width * 0.58, + margin: EdgeInsets.fromLTRB(0.0, 5.0, 0.0, 0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB( + 10.0, 0.0, 10.0, 0.0), + child: Text( + TranslationBase.of(context) + .bookImmediateLivecare, + overflow: TextOverflow.clip, + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 16.0, + letterSpacing: 0.7, + color: Colors.white)), + ), + Container( + margin: + EdgeInsets.only(top: 5.0, left: 10.0), + child: Text( + TranslationBase.of(context) + .bookVideoLivecare2, + textAlign: TextAlign.start, + style: TextStyle( + fontSize: 13.0, + color: Colors.white)), + ) + ], + ), + ), + ], + )), + ), + ), + Container( + child: InkWell( + onTap: () { + Navigator.pop(context, "schedule"); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.grey[700], + borderRadius: + BorderRadius.all(Radius.circular(10.0))), + margin: EdgeInsets.only(top: 10.0), + padding: EdgeInsets.all(10.0), + child: Row( + children: [ + Container( + margin: EdgeInsets.only(left: 10.0, right: 10.0), + child: Image.asset( + "assets/images/new-design/doctor_white.png", + width: 50), + ), + Container( + width: MediaQuery.of(context).size.width * 0.58, + margin: EdgeInsets.fromLTRB(0.0, 5.0, 0.0, 0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB( + 28.0, 0.0, 28.0, 0.0), + child: Text( + TranslationBase.of(context).noThankyou, + overflow: TextOverflow.clip, + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 16.0, + letterSpacing: 0.7, + color: Colors.white)), + ), + Container( + margin: EdgeInsets.only( + top: 5.0, left: 28.0, right: 28.0), + child: Text( + TranslationBase.of(context).visitClinic, + textAlign: TextAlign.start, + style: TextStyle( + fontSize: 13.0, + color: Colors.white)), + ) + ], + ), + ), + ], + )), + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: InkWell( + onTap: () { + Navigator.pop(context, "false"); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Text(TranslationBase.of(context).cancel, + style: TextStyle( + fontSize: 16.0, + letterSpacing: 0.5, + color: Color(0xffc5272d))), + ], + ), + ), + ), + ], + ), + ), + )); + } +} diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart new file mode 100644 index 00000000..53bc10f2 --- /dev/null +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -0,0 +1,764 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/LaserBooking.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/dialog/clinic_list_dialog.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/SearchResultWithTab.dart'; +import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/doctor_response_mapper.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'LaserClinic.dart'; +import 'LiveCareBookAppointment.dart'; + +class SearchByClinic extends StatefulWidget { + final List? clnicIds; + + SearchByClinic({required this.clnicIds}); + + @override + _SearchByClinicState createState() => _SearchByClinicState(); +} + +class _SearchByClinicState extends State { + bool nearestAppo = false; + String? dropdownValue; + String dropdownTitle = ""; + String? projectDropdownValue; + + // var event = RobotProvider(); + List clinicsList = []; + List projectsList = []; + bool isMobileAppDentalAllow = false; + bool isLoaded = false; + bool isProjectLoaded = false; + + ListClinicCentralized? selectedClinic; + HospitalsModel? selectedHospital; + + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + + final GlobalKey clinicDropdownKey = GlobalKey(); + final GlobalKey projectDropdownKey = GlobalKey(); + TextEditingController ageController = new TextEditingController(); + + String radioValue = ""; + + late LocationUtils locationUtils; + + @override + void initState() { + locationUtils = new LocationUtils(isShowConfirmDialog: true, isShowLocationTimeoutDialog: false, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList()); + checkPVM(); + super.initState(); + } + + void checkPVM() { + if (context.read().isLogin) { + if (radioValue == null) { + if (context.read().user.gender == 1) { + radioValue = TranslationBase.of(context).male; + } else { + radioValue = TranslationBase.of(context).female; + } + } + } else if (radioValue == null) { + radioValue = TranslationBase.of(context).female; + } + if (ageController.text.isEmpty) { + ageController.text = context.read().isLogin ? context.read().user!.age.toString() : ""; + ageController.selection = TextSelection.fromPosition(TextPosition(offset: ageController.text.length)); + } + } + + @override + Widget build(BuildContext context) { + AppGlobal.context = context; + return Container( + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (context.read().isLogin) + Column( + children: [ + Padding( + padding: const EdgeInsets.only( + left: 20, + right: 20, + top: 20, + ), + child: Text( + TranslationBase.of(context).doctorFilter, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + ), + mHeight(30), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(left: 20, right: 20), + child: Text( + TranslationBase.of(context).gender, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + color: Colors.black, + fontWeight: FontWeight.w600, + ), + ), + ), + Container( + padding: EdgeInsets.only(left: 6, right: 6), + child: Row( + children: [ + Flexible( + child: Row( + children: [ + Radio( + value: TranslationBase.of(context).female, + groupValue: radioValue, + onChanged: (v) { + setState(() { + radioValue = v!; + }); + }, + ), + Text( + TranslationBase.of(context).female, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + )), + Flexible( + child: Row( + children: [ + Radio( + value: TranslationBase.of(context).male, + groupValue: radioValue, + onChanged: (v) { + setState(() { + radioValue = v!; + }); + }, + ), + Text( + TranslationBase.of(context).male, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + )), + ], + ), + ), + ], + ), + Container( + child: inputWidget("Age", "", ageController), + margin: EdgeInsets.only(left: 20, right: 20), + ), + ], + ), + Padding( + padding: const EdgeInsets.only(left: 6, right: 6, top: 16), + child: Row( + children: [ + Checkbox( + activeColor: CustomColors.accentColor, + value: nearestAppo, + onChanged: (bool? value) { + setState(() { + nearestAppo = value!; + if (nearestAppo) + getProjectsList(); + else + isProjectLoaded = false; + }); + }, + ), + AutoSizeText( + TranslationBase.of(context).nearestAppo.trim(), + maxLines: 1, + minFontSize: 10, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 1.4, + fontWeight: FontWeight.w600, + letterSpacing: -0.39, + height: 0.8, + ), + ), + // Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56)), + ], + ), + ), + widget.clnicIds != null && widget.clnicIds!.length > 1 && isLoaded == true + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: clinicsList.map((result) { + return RoundedContainer( + child: ListTile( + onTap: () { + // setState(() { + dropdownValue = result.clinicID.toString(); + setState(() { + if (!isDentalSelectedAndSupported()) { + dropdownValue = ""; + projectDropdownValue = ""; + getDoctorsList(context); + } else {} + }); + }, + title: Text(result.clinicDescription!, style: TextStyle(fontSize: 14.0, color: Colors.grey[700], letterSpacing: 1.0)))); + }).toList()) + : InkWell( + onTap: () { + showClickListDialog(context, clinicsList, onSelection: (ListClinicCentralized clincs) { + selectedClinic = clincs; + Navigator.pop(context); + setState(() { + dropdownTitle = clincs.clinicDescription!; + dropdownValue = + clincs.clinicID.toString() + "-" + clincs.isLiveCareClinicAndOnline.toString() + "-" + clincs.liveCareClinicID.toString() + "-" + clincs.liveCareServiceID.toString(); + if (dropdownValue == "253-false-0-0") { + // Navigator.push(context, FadePage(page: LaserClinic())); + } else if (!isDentalSelectedAndSupported()) { + projectDropdownValue = ""; + if (!nearestAppo) getDoctorsList(context); + } else {} + }); + context.read().analytics.appointment.book_appointment_select_clinic(appointment_type: 'regular', clinic: clincs.clinicDescription); + }); + }, + child: Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + margin: EdgeInsets.only(left: 20, right: 20), + padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 8), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectClinic, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Padding( + padding: const EdgeInsets.only(top: 4, bottom: 2), + child: Text( + dropdownTitle, + style: TextStyle( + fontSize: 13, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + ), + ], + ), + ), + Icon(Icons.keyboard_arrow_down), + ], + ), + ), + ), + mHeight(20), + isDentalSelectedAndSupported() == true || (nearestAppo && isProjectLoaded) + ? InkWell( + onTap: () { + openDropdown(projectDropdownKey); + }, + child: Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + margin: EdgeInsets.only(left: 20, right: 20), + padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectHospital, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + key: projectDropdownKey, + hint: Text(TranslationBase.of(context).selectHospital), + value: selectedHospital, + iconSize: 0, + isExpanded: true, + style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black), + items: projectsList.map((HospitalsModel item) { + return DropdownMenuItem( + value: item, + child: AutoSizeText( + item.name!, + maxLines: 1, + minFontSize: 10, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 1.6, + fontWeight: FontWeight.w600, + letterSpacing: -0.39, + height: 0.8, + ), + ), + // Text('${item.name!}'), + ); + }).toList(), + onChanged: (HospitalsModel? newValue) async { + setState(() { + HospitalsModel tempselectedHospital = new HospitalsModel.fromJson(newValue!.toJson()); + projectDropdownValue = newValue.mainProjectID.toString(); + if (dropdownValue!.split("-")[0] == "253") { + Navigator.push( + context, + FadePage( + page: LaserClinic(selectedHospital: tempselectedHospital!), + ), + ); + } else { + getDoctorsList(context); + } + }); + }, + ), + ), + ), + ], + ), + ), + Icon(Icons.keyboard_arrow_down), + ], + )), + ) + : Container(), + ], + ), + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.number, + controller: _controller, + onChanged: (value) => {}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + +//Changed By Aamir + void openDropdown(GlobalKey key) { + GestureDetector? detector; + + void searchForGestureDetector(BuildContext element) { + element.visitChildElements((element) { + if (element.widget != null && element.widget is GestureDetector) { + detector = element.widget as GestureDetector?; + //return false; + } else { + searchForGestureDetector(element); + } + + //return true; + }); + } + + searchForGestureDetector(key.currentContext!); + assert(detector != null); + + detector!.onTap!(); + } + + // void openDropdown(GlobalKey key) { + // GestureDetector detector; + // void searchForGestureDetector(BuildContext element) { + // element.visitChildElements((element) { + // if (element.widget != null && element.widget is GestureDetector) { + // detector = element.widget; + // return false; + // } else { + // searchForGestureDetector(element); + // } + // + // return true; + // }); + // } + // + // searchForGestureDetector(key.currentContext); + // assert(detector != null); + // + // detector.onTap(); + // } + + bool isDentalSelectedAndSupported() { + if (dropdownValue != null) + return dropdownValue != "" && (dropdownValue!.split("-")[0] == "17" || dropdownValue!.split("-")[0] == "253") && isMobileAppDentalAllow; + else + return false; + } + + getClinicsList() async { + AppGlobal.context = context; + if (await sharedPref.getObject(CLINICS_LIST) != null) { + dynamic res = await sharedPref.getObject(CLINICS_LIST); + setState(() { + isMobileAppDentalAllow = res['ISMobileAppDentalAllow']; + res['ListClinicCentralized'].forEach((v) { + clinicsList.add(new ListClinicCentralized.fromJson(v)); + }); + }); + getProjectsList(); + // GifLoaderDialogUtils.hideDialog(context); + } else { + GifLoaderDialogUtils.showMyDialog(context); + ClinicListService service = new ClinicListService(); + service.getClinicsList(context).then((res) { + if (res['MessageStatus'] == 1) { + setState(() { + isMobileAppDentalAllow = res['ISMobileAppDentalAllow']; + res['ListClinicCentralized'].forEach((v) { + clinicsList.add(new ListClinicCentralized.fromJson(v)); + }); + }); + getProjectsList(); + GifLoaderDialogUtils.hideDialog(context); + } else {} + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + }); + } + } + + getProjectsList() { + int languageID = context.read().isArabic ? 1 : 2; + ClinicListService service = new ClinicListService(); + List projectsListLocal = []; + service + .getProjectsList(languageID, context) + .then((res) { + if (res['MessageStatus'] == 1) { + setState(() { + res['ListProject'].forEach((v) { + projectsListLocal.add(new HospitalsModel.fromJson(v)); + }); + projectsList = projectsListLocal; + }); + filterClinic(); + isProjectLoaded = true; + } else { + isProjectLoaded = false; + } + locationUtils.getCurrentLocation(); + }) + .catchError((err) {}) + .catchError((err) { + print(err); + }); + } + + // TODO Mosa_REMARk to come back later + getDoctorsList(BuildContext context) { + SearchInfo searchInfo = new SearchInfo(); + if (dropdownValue != null) if (dropdownValue!.split("-")[0] == "17") { + searchInfo.ProjectID = int.parse(projectDropdownValue!); + searchInfo.ClinicID = int.parse(dropdownValue!.split("-")[0]); + searchInfo.hospital = selectedHospital; + searchInfo.clinic = selectedClinic; + searchInfo.date = DateTime.now(); + + if (context.read().isLogin) { + if (context.read().user.age! > 12) { + navigateToDentalComplaints(context, searchInfo); + } else { + callDoctorsSearchAPI(17); + } + } else { + navigateToDentalComplaints(context, searchInfo); + } + } else if (dropdownValue!.split("-")[0] == "253") { + navigateToLaserClinic(context); + // callDoctorsSearchAPI(); + } else if (dropdownValue!.split("-")[1] == "true" + // && authProvider.isLogin && + // authUser.patientType == 1 + ) { + Navigator.push( + context, + FadePage( + page: LiveCareBookAppointment(clinicName: dropdownTitle, liveCareClinicID: dropdownValue!.split("-")[2], liveCareServiceID: dropdownValue!.split("-")[3]), + ), + ).then((value) { + setState(() { + if (value == "false") dropdownValue = "null"; + }); + if (value == "livecare") { + Navigator.push(context, FadePage(page: LiveCareHome())); + } + if (value == "schedule") { + callDoctorsSearchAPI(int.parse(dropdownValue!.split("-")[0])); + } + }); + } else { + callDoctorsSearchAPI(int.parse(dropdownValue!.split("-")[0])); + } + } + + callDoctorsSearchAPI(int clinicID) { + bool isArabic = context.read().isArabic; + int languageID = context.read().isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + List doctorsList = []; + List arr = []; + List arrDistance = []; + List result; + int numAll; + List _patientDoctorAppointmentListHospital = []; + + DoctorsListService service = new DoctorsListService(); + service.getDoctorsList(clinicID, projectDropdownValue != "" ? int.parse(projectDropdownValue!) : 0, nearestAppo, languageID, context).then((res) async { + GifLoaderDialogUtils.hideDialog(context); + RegionList regionHospitalList = RegionList(); + + if (res['MessageStatus'] == 1) { + if (res['DoctorList'].length != 0) { + res['DoctorList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson( + v, + )); + }); + if (nearestAppo) { + doctorsList.forEach((element) { + List doctorByHospital = + _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.getProjectCompleteName()).toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList( + filterName: element.getProjectCompleteName(), + distanceInKMs: element.projectDistanceInKiloMeters.toString(), + projectTopName: element.projectTopName, + projectBottomName: element.projectBottomName, + patientDoctorAppointment: element, + isHMC: element.isHMC, + )); + } + }); + navigateToSearchResultsForNearestAppointment(context, doctorsList, _patientDoctorAppointmentListHospital); + return; + } + + regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, isArabic: isArabic); + var lat = await sharedPref.getDouble(USER_LAT); + + var lng = await sharedPref.getDouble(USER_LONG); + var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0); + regionHospitalList = await DoctorMapper.sortList(isLocationEnabled, regionHospitalList); + + setState(() {}); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['ErrorSearchMsg']); + } + + GifLoaderDialogUtils.hideDialog(context); + // navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); + navigateToSearchResults(context, regionHospitalList); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err, localContext: context); + }); + } + + Future navigateToDentalComplaints(BuildContext context, SearchInfo searchInfo) async { + Navigator.push( + context, + FadePage( + page: DentalComplaints(searchInfo: searchInfo), + ), + ).then((value) { + setState(() { + dropdownValue = "null"; + }); + }); + } + + navigateToSearchResultsForNearestAppointment(context, List docList, List patientDoctorAppointmentListHospital) { + Navigator.push( + context, + FadePage( + page: SearchResults( + isLiveCareAppointment: false, + isDoctorNameSearch: true, + doctorsList: docList, + patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, + isDoctorSearchResult: true, + ))); + } + + Future navigateToLaserClinic(BuildContext context) async { + Navigator.push( + context, + FadePage( + page: LaserBooking(), + ), + ).then((value) { + setState(() { + dropdownValue = "null"; + }); + }); + } + + navigateToSearchResults(context, RegionList regionHospitalList) { + // Navigator.push(context, + // FadePage(page: SearchResults(isLiveCareAppointment: false, isDoctorNameSearch: true, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: true,))); + Navigator.push( + context, + FadePage( + page: SearchResultWithTab( + doctorsList: [], + patientDoctorAppointmentListHospital: regionHospitalList, + isLiveCareAppointment: false, + isDoctorSearchResult: true, + ))); + } + + filterClinic() { + setState(() { + if (widget.clnicIds != null && widget.clnicIds!.length > 0) { + clinicsList = clinicsList.where((i) => widget.clnicIds!.indexOf(i.clinicID) > -1).toList(); + isLoaded = true; + } + }); + } +} diff --git a/lib/pages/BookAppointment/components/SearchByDoctor.dart b/lib/pages/BookAppointment/components/SearchByDoctor.dart new file mode 100644 index 00000000..7676b3d4 --- /dev/null +++ b/lib/pages/BookAppointment/components/SearchByDoctor.dart @@ -0,0 +1,284 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class SearchByDoctor extends StatefulWidget { + @override + _SearchByDoctorState createState() => _SearchByDoctorState(); +} + +class _SearchByDoctorState extends State { + TextEditingController doctorNameController = new TextEditingController(); + late bool _isButtonDisabled; + late LocationUtils locationUtils; + + @override + void initState() { + super.initState(); + locationUtils = + new LocationUtils(isShowConfirmDialog: true, context: context); + locationUtils.getCurrentLocation(); + _isButtonDisabled = true; + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.all(20.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Container( + margin: EdgeInsets.only(top: 10.0, bottom: 15.0), + child: Text( + TranslationBase.of(context).searchByDocText, + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.9, + fontWeight: FontWeight.w600, + ), + ), + ), + inputWidget(TranslationBase.of(context).enterDocName, '', + doctorNameController), + ], + ), + ), + ), + _buildCounterButton(), + ], + ); + } + + Widget _buildCounterButton() { + return Container( + width: double.infinity, + padding: EdgeInsets.all(16), + color: Colors.white, + child: new ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width, + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.accentColor, + elevation: 0, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + onPressed: () { + if (_isButtonDisabled == false) { + FocusManager.instance.primaryFocus?.unfocus(); + _searchDoctor(context); + } + }, + child: Text(TranslationBase.of(context).search, + style: TextStyle(fontSize: 18.0, color: Colors.white)), + ), + ), + ); + } + + getDoctorsList(BuildContext context) { + int languageID = context.read().isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + List doctorsList = []; + DoctorsListService service = new DoctorsListService(); + + List _patientDoctorAppointmentListHospital = + []; + + service + .getDoctorsListByName(doctorNameController.text, languageID, context) + .then((res) { + // GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + if (res['DoctorList'].length != 0) { + res['DoctorList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson(v)); + }); + + doctorsList.forEach((element) { + List doctorByHospital = + _patientDoctorAppointmentListHospital + .where((elementClinic) => + elementClinic.filterName == + element.getProjectCompleteName()) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[ + _patientDoctorAppointmentListHospital + .indexOf(doctorByHospital[0])] + .patientDoctorAppointmentList! + .add(element); + } else { + _patientDoctorAppointmentListHospital.add( + PatientDoctorAppointmentList( + filterName: element.getProjectCompleteName(), + distanceInKMs: + element.projectDistanceInKiloMeters.toString(), + projectTopName: element.projectTopName, + projectBottomName: element.projectBottomName, + patientDoctorAppointment: element, + isHMC: element.isHMC, + )); + } + }); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['ErrorSearchMsg']); + } + }); + GifLoaderDialogUtils.hideDialog(context); + navigateToSearchResults( + context, doctorsList, _patientDoctorAppointmentListHospital); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + _onDocTextChanged(content) { + print(content); + if (content.length >= 3) { + setState(() { + _isButtonDisabled = false; + }); + } else { + setState(() { + _isButtonDisabled = true; + }); + } + print(_isButtonDisabled); + } + + _searchDoctor(BuildContext context) { + getDoctorsList(context); + context + .read() + .analytics + .appointment + .book_appointment_doctor_search(query: doctorNameController.text); + } + + navigateToSearchResults(context, List docList, + List patientDoctorAppointmentListHospital) { + Navigator.push( + context, + FadePage( + page: SearchResults( + isLiveCareAppointment: false, + isDoctorNameSearch: true, + doctorsList: docList, + patientDoctorAppointmentListHospital: + patientDoctorAppointmentListHospital, + isDoctorSearchResult: true, + ))); + } + + Widget inputWidget( + String _labelText, String _hintText, TextEditingController _controller, + {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.text, + controller: _controller, + onChanged: (value) => {_onDocTextChanged(value)}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } +} diff --git a/lib/pages/BookAppointment/components/search_by_hospital_name.dart b/lib/pages/BookAppointment/components/search_by_hospital_name.dart new file mode 100644 index 00000000..b6b04e30 --- /dev/null +++ b/lib/pages/BookAppointment/components/search_by_hospital_name.dart @@ -0,0 +1,549 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/components/LaserClinic.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/SearchResultWithTab.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/SearchResultWithTabForHospital.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/doctor_response_mapper.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../../core/model/hospitals/hospitals_model.dart'; +import '../../../core/viewModels/project_view_model.dart'; +import '../../../models/Appointments/DoctorListResponse.dart'; +import '../../../models/Appointments/SearchInfoModel.dart'; +import '../../../models/Clinics/ClinicListResponse.dart'; +import '../../../services/appointment_services/GetDoctorsList.dart'; +import '../../../services/authentication/auth_provider.dart'; +import '../../../services/clinic_services/get_clinic_service.dart'; +import '../../../uitl/app_toast.dart'; +import '../../../uitl/gif_loader_dialog_utils.dart'; +import '../../../uitl/translations_delegate_base.dart'; +import '../../../widgets/transitions/fade_page.dart'; +import '../../livecare/livecare_home.dart'; +import '../DentalComplaints.dart'; +import 'LiveCareBookAppointment.dart'; + +class SearchByHospital extends StatefulWidget { + @override + State createState() => _SearchByHospitalState(); +} + +class _SearchByHospitalState extends State { + HospitalsModel? selectedHospital; + bool nearestAppo = false; + RegionList? hospitalList; + + String? selectedClinicName; + List projectsList = []; + List? clinicIds = List.empty(); + + final GlobalKey projectDropdownKey = GlobalKey(); + + List clinicsList = []; + bool isMobileAppDentalAllow = false; + ListClinicCentralized? selectedClinic; + + String? dropdownValue; + String dropdownTitle = ""; + late LocationUtils locationUtils; + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((_) { + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + locationUtils.getCurrentLocation(); + getProjectsList(); + }); + } + + @override + void deactivate() { + super.deactivate(); + } + + @override + void reassemble() { + super.reassemble(); + } // @override + // void didChangeDependencies() { + // WidgetsBinding.instance.addPostFrameCallback((_) { + // getProjectsList(); + // }); + // } + + // @override + // void didUpdateWidget(SearchByHospital oldWidget) { + // WidgetsBinding.instance.addPostFrameCallback((_) { + // getProjectsList(); + // }); + // } + + @override + Widget build(BuildContext context) { + AppGlobal.context = context; + return (hospitalList != null) + ? SearchResultWithTabForHospital( + patientDoctorAppointmentListHospital: hospitalList!, + doctorsList: [], + isDoctorSearchResult: false, + isLiveCareAppointment: false, + ) + : SizedBox.shrink(); + // return Column( + // children: [ + // Padding( + // padding: const EdgeInsets.only(left: 6, right: 6, top: 16), + // child: Row( + // children: [ + // Checkbox( + // activeColor: CustomColors.accentColor, + // value: nearestAppo, + // onChanged: (bool? value) { + // nearestAppo = value ?? false; + // setState(() {}); + // }, + // ), + // AutoSizeText( + // TranslationBase.of(context).nearestAppo.trim(), + // maxLines: 1, + // minFontSize: 10, + // style: TextStyle( + // fontSize: SizeConfig.textMultiplier! * 1.4, + // fontWeight: FontWeight.w600, + // letterSpacing: -0.39, + // height: 0.8, + // ), + // ), + // // Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56)), + // ], + // ), + // ), + // mHeight(8), + // InkWell( + // onTap: () { + // openDropdown(projectDropdownKey); + // }, + // child: Container( + // width: double.infinity, + // decoration: containerRadius(Colors.white, 12), + // margin: EdgeInsets.only(left: 20, right: 20), + // padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + // child: Row( + // children: [ + // Flexible( + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Text( + // TranslationBase.of(context).selectHospital, + // style: TextStyle( + // fontSize: 11, + // letterSpacing: -0.44, + // fontWeight: FontWeight.w600, + // ), + // ), + // Container( + // height: 18, + // width: double.infinity, + // child: DropdownButtonHideUnderline( + // child: DropdownButton( + // key: projectDropdownKey, + // hint: Text(TranslationBase.of(context).selectHospital), + // value: selectedHospital, + // iconSize: 0, + // isExpanded: true, + // style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black), + // items: projectsList.map((HospitalsModel item) { + // return DropdownMenuItem( + // value: item, + // child: AutoSizeText( + // item.name!, + // maxLines: 1, + // minFontSize: 10, + // style: TextStyle( + // fontSize: SizeConfig.textMultiplier! * 1.6, + // fontWeight: FontWeight.w600, + // letterSpacing: -0.39, + // height: 0.8, + // ), + // ), + // // Text('${item.name!}'), + // ); + // }).toList(), + // onChanged: (HospitalsModel? newValue) { + // getClinicWrtHospital(newValue); + // setState(() { + // selectedHospital = newValue; + // }); + // }, + // ), + // ), + // ), + // ], + // ), + // ), + // Icon(Icons.keyboard_arrow_down), + // ], + // )), + // ), + // if (clinicIds?.isNotEmpty == true) ...[ + // mHeight(8), + // InkWell( + // onTap: () { + // showClickListDialog(context, clinicIds ?? List.empty(), onSelection: (ListClinicCentralized clincs) { + // selectedClinic = clincs; + // Navigator.pop(context); + // setState(() { + // dropdownTitle = clincs.clinicDescription!; + // dropdownValue = clincs.clinicID.toString() + "-" + clincs.isLiveCareClinicAndOnline.toString() + "-" + clincs.liveCareClinicID.toString() + "-" + clincs.liveCareServiceID.toString(); + // }); + // getDoctorsList(context); + // + // context.read().analytics.appointment.book_appointment_select_clinic(appointment_type: 'regular', clinic: clincs.clinicDescription); + // }); + // }, + // child: Container( + // width: double.infinity, + // decoration: containerRadius(Colors.white, 12), + // margin: EdgeInsets.only(left: 20, right: 20), + // padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 8), + // child: Row( + // children: [ + // Expanded( + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Text( + // TranslationBase.of(context).selectClinic, + // style: TextStyle( + // fontSize: 11, + // letterSpacing: -0.44, + // fontWeight: FontWeight.w600, + // ), + // ), + // Padding( + // padding: const EdgeInsets.only(top: 4, bottom: 2), + // child: Text( + // dropdownTitle, + // style: TextStyle( + // fontSize: 13, + // letterSpacing: -0.44, + // fontWeight: FontWeight.w600, + // ), + // ), + // ), + // ], + // ), + // ), + // Icon(Icons.keyboard_arrow_down), + // ], + // ), + // ), + // ) + // ] + // ], + // ); + } + + void openDropdown(GlobalKey key) { + GestureDetector? detector; + + void searchForGestureDetector(BuildContext element) { + element.visitChildElements((element) { + if (element.widget != null && element.widget is GestureDetector) { + detector = element.widget as GestureDetector?; + //return false; + } else { + searchForGestureDetector(element); + } + + //return true; + }); + } + + searchForGestureDetector(key.currentContext!); + assert(detector != null); + + detector!.onTap!(); + } + + GestureDetector? searchForGestureDetector(BuildContext element) { + GestureDetector? detector; + element.visitChildElements((element) { + if (element.widget != null && element.widget is GestureDetector) { + detector = element.widget as GestureDetector?; + //return false; + } else { + searchForGestureDetector(element); + } + }); + return detector; + } + + getProjectsList() { + AppGlobal.context = context; + GifLoaderDialogUtils.showMyDialog(context); + int languageID = context.read().isArabic ? 1 : 2; + ClinicListService service = new ClinicListService(); + List projectsListLocal = []; + service.getProjectsList(languageID, context).then((res) async { + if (res['MessageStatus'] == 1) { + res['ListProject'].forEach((v) { + projectsListLocal.add(new HospitalsModel.fromJson(v)); + }); + projectsList = projectsListLocal; + hospitalList = await DoctorMapper.getMappedHospitals(projectsList, isArabic: context.read().isArabic); + var lat = await sharedPref.getDouble(USER_LAT); + + var lng = await sharedPref.getDouble(USER_LONG); + var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0); + hospitalList = await DoctorMapper.sortList(isLocationEnabled, hospitalList!); + setState(() {}); + GifLoaderDialogUtils.hideDialog(context); + } else {} + GifLoaderDialogUtils.hideDialog(context); + locationUtils.getCurrentLocation(); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + locationUtils.getCurrentLocation(); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + locationUtils.getCurrentLocation(); + print(err); + }); + } + + void getClinicWrtHospital(HospitalsModel? newValue) async { + GifLoaderDialogUtils.showMyDialog(context); + ClinicListService service = new ClinicListService(); + List projectsListLocal = []; + setState(() { + clinicIds = List.empty(); + }); + List clinicId = []; + try { + Map res = await service.getClinicByHospital(projectID: newValue?.mainProjectID.toString() ?? ""); + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + List list = res['ListClinic']; + + if (list.isEmpty) { + AppToast.showErrorToast( + message: TranslationBase.of(context).NoClinicFound, + ); + } + res['ListClinic'].forEach((v) { + clinicId.add(ListClinicCentralized.fromJson(v)); + }); + clinicIds = clinicId; + setState(() {}); + } else { + AppToast.showErrorToast( + message: TranslationBase.of(context).NoClinicFound, + ); + } + } catch (e) { + print("the error is $e"); + AppToast.showErrorToast( + message: TranslationBase.of(context).NoClinicFound, + ); + GifLoaderDialogUtils.hideDialog(context); + } + + // .then((res) { + // print("the result is obtained"); + // GifLoaderDialogUtils.hideDialog(context); + // if (res['MessageStatus'] == 1) { + // List list = res['ListClinic']; + // + // if(list.isEmpty){ + // AppToast.showErrorToast(message: + // TranslationBase.of(context).NoClinicFound, + // ); + // + // } + // res['ListClinic'].forEach((v) { + // clinicId?.add(ListClinicCentralized.fromJson(v)); + // }); + // clinicIds = clinicId; + // setState(() { + // + // }); + // } else { + // AppToast.showErrorToast(message: + // TranslationBase.of(context).NoClinicFound, + // ); + // } + // }).catchError((err) { + // print('the error is $err'); + // AppToast.showErrorToast(message: + // TranslationBase.of(context).NoClinicFound, + // ); + // GifLoaderDialogUtils.hideDialog(context); + // }).catchError((err) { + // AppToast.showErrorToast(message: + // TranslationBase.of(context).NoClinicFound, + // ); + // GifLoaderDialogUtils.hideDialog(context); + // + // print(err); + // }); + } + + @override + void dispose() { + super.dispose(); + } + + Future navigateToDentalComplaints(BuildContext context, SearchInfo searchInfo) async { + Navigator.push( + context, + FadePage( + page: DentalComplaints(searchInfo: searchInfo), + ), + ).then((value) { + setState(() { + dropdownValue = null; + selectedHospital = null; + dropdownTitle = ""; + clinicIds = List.empty(); + }); + }); + } + + callDoctorsSearchAPI(int clinicID) { + var isArabic = context.read().isArabic; + int languageID = isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + List doctorsList = []; + List arr = []; + List arrDistance = []; + List result; + int numAll; + List _patientDoctorAppointmentListHospital = []; + + DoctorsListService service = new DoctorsListService(); + service + .getDoctorsList(clinicID, selectedHospital?.mainProjectID.toString() != "" ? int.parse(selectedHospital?.mainProjectID.toString() ?? "-1") : 0, nearestAppo, languageID, null) + .then((res) async { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + RegionList regionHospitalList = RegionList(); + + if (res['DoctorList'].length != 0) { + res['DoctorList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson( + v, + )); + }); + + regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, isArabic: isArabic); + var lat = await sharedPref.getDouble(USER_LAT); + + var lng = await sharedPref.getDouble(USER_LONG); + var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0); + regionHospitalList = await DoctorMapper.sortList(isLocationEnabled, regionHospitalList); + + setState(() {}); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['ErrorSearchMsg']); + } + + GifLoaderDialogUtils.hideDialog(context); + // navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); + navigateToSearchResults(context, regionHospitalList); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err, localContext: context); + }); + } + + navigateToSearchResults(context, RegionList regionHospitalList) { + // Navigator.push(context, + // FadePage(page: SearchResults(isLiveCareAppointment: false, isDoctorNameSearch: true, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: true,))); + Navigator.push( + context, + FadePage( + page: SearchResultWithTab( + doctorsList: [], + patientDoctorAppointmentListHospital: regionHospitalList, + isLiveCareAppointment: false, + isDoctorSearchResult: true, + ), + ), + ); + } + + Future navigateToLaserClinic(BuildContext context) async { + Navigator.push( + context, + FadePage( + page: LaserClinic(selectedHospital: selectedHospital!), + ), + ).then((value) { + print("LaserBooking navigation return "); + setState(() { + dropdownValue = null; + selectedHospital = null; + dropdownTitle = ""; + clinicIds = List.empty(); + }); + }); + } + + getDoctorsList(BuildContext context) { + SearchInfo searchInfo = new SearchInfo(); + if (dropdownValue != null) if (dropdownValue!.split("-")[0] == "17") { + searchInfo.ProjectID = int.parse(selectedHospital?.mainProjectID.toString() ?? ""); + searchInfo.ClinicID = int.parse(dropdownValue!.split("-")[0]); + searchInfo.hospital = selectedHospital; + searchInfo.clinic = selectedClinic; + searchInfo.date = DateTime.now(); + + if (context.read().isLogin) { + if (context.read().user.age! > 12) { + navigateToDentalComplaints(context, searchInfo); + } else { + callDoctorsSearchAPI(17); + } + } else { + navigateToDentalComplaints(context, searchInfo); + } + } else if (dropdownValue!.split("-")[0] == "253") { + navigateToLaserClinic(context); + // callDoctorsSearchAPI(); + } else if (dropdownValue!.split("-")[1] == "true" + // && authProvider.isLogin && + // authUser.patientType == 1 + ) { + Navigator.push( + context, + FadePage( + page: LiveCareBookAppointment(clinicName: dropdownTitle, liveCareClinicID: dropdownValue!.split("-")[2], liveCareServiceID: dropdownValue!.split("-")[3]), + ), + ).then((value) { + print("navigation return "); + if (value == "false") dropdownValue = null; + + // setState(() { + // }); + if (value == "livecare") { + Navigator.push(context, FadePage(page: LiveCareHome())); + } + if (value == "schedule") { + callDoctorsSearchAPI(int.parse(dropdownValue!.split("-")[0])); + } + }); + setState(() {}); + } else { + callDoctorsSearchAPI(int.parse(dropdownValue!.split("-")[0])); + } + } +} diff --git a/lib/pages/BookAppointment/dialog/clinic_list_dialog.dart b/lib/pages/BookAppointment/dialog/clinic_list_dialog.dart new file mode 100644 index 00000000..c3d82c74 --- /dev/null +++ b/lib/pages/BookAppointment/dialog/clinic_list_dialog.dart @@ -0,0 +1,141 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:flutter_svg/svg.dart'; + +showClickListDialog(BuildContext context, List clinicsList, {Function(ListClinicCentralized)? onSelection}) { + showDialog( + context: context, + builder: (BuildContext context) { + return Dialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(4.0), + ), //this right here + child: Container( + width: double.infinity, + // width: MediaQuery.of(context).size.width - 10, + height: MediaQuery.of(context).size.height - 80, + child: ClickListDialog( + clinicsList: clinicsList, + onSelection: onSelection!, + ), + ), + ); + }, + ); +} + +class ClickListDialog extends StatefulWidget { + List? clinicsList; + Function(ListClinicCentralized)? onSelection; + + ClickListDialog({this.clinicsList, this.onSelection}); + + @override + _ClickListDialogState createState() => _ClickListDialogState(); +} + +class _ClickListDialogState extends State { + TextEditingController controller = new TextEditingController(); + List tempClinicsList = []; + + @override + void initState() { + // TODO: implement initState + super.initState(); + addAllData(); + } + + addAllData() { + tempClinicsList.clear(); + for (int i = 0; i < widget.clinicsList!.length; i++) { + tempClinicsList.add(widget.clinicsList![i]); + } + setState(() {}); + } + + @override + Widget build(BuildContext context) { + return Container( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + controller: controller, + onChanged: (v) { + if (v.length > 0) { + tempClinicsList.clear(); + for (int i = 0; i < widget.clinicsList!.length; i++) { + if (widget.clinicsList![i].clinicDescription!.toLowerCase().contains(v.toLowerCase())) { + tempClinicsList.add(widget.clinicsList![i]); + } + } + } else { + addAllData(); + } + setState(() {}); + }, + decoration: InputDecoration( + hintStyle: TextStyle(fontSize: 17), + hintText: TranslationBase.of(context).searchClinic, + suffixIcon: Icon(Icons.search), + border: InputBorder.none, + contentPadding: EdgeInsets.all(12), + ), + ), + ), + Expanded( + child: ListView.separated( + padding: EdgeInsets.all(12), + itemBuilder: (context, index) { + return InkWell( + onTap: () { + widget.onSelection!(tempClinicsList[index]); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: AutoSizeText( + tempClinicsList[index].clinicDescription!.trim(), + maxLines: 1, + minFontSize: 10, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 1.4, + fontWeight: FontWeight.w600, + letterSpacing: -0.39, + height: 0.8, + ), + ), + ), + tempClinicsList[index].isLiveCareClinicAndOnline == true + ? SvgPicture.asset( + 'assets/images/new-design/video_icon_green_right.svg', + height: 12, + width: 12, + fit: BoxFit.cover, + ) + : Container(), + ], + ), + ), + ); + }, + itemCount: tempClinicsList.length, + separatorBuilder: (BuildContext context, int index) { + return mHeight(8); + }, + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/BookAppointment/doctor_post_pre_images_page.dart b/lib/pages/BookAppointment/doctor_post_pre_images_page.dart new file mode 100644 index 00000000..f3cdc0c5 --- /dev/null +++ b/lib/pages/BookAppointment/doctor_post_pre_images_page.dart @@ -0,0 +1,74 @@ +import 'package:diplomaticquarterapp/models/Appointments/doctor_pre_post_image.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class DoctorPostPreImagesContent extends StatefulWidget { + final DoctorPrePostImages doctorPrePostImages; + + const DoctorPostPreImagesContent({required this.doctorPrePostImages}); + + @override + DoctorPostPreImagesContentState createState() => DoctorPostPreImagesContentState(); +} + +class DoctorPostPreImagesContentState extends State { + @override + Widget build(BuildContext context) { + var images = widget.doctorPrePostImages; + return Center( + child: Material( + color: Colors.transparent, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + children: [ + Expanded( + child: Column( + children: [ + Text( + "Before", + style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1), + ), + SizedBox( + height: 10, + ), + Image.memory( + images.getPreBytes(), + errorBuilder: (ctx, err, trace) { + return Container( + color: Colors.grey.withOpacity(0.25), + ); + }, + ) + ], + )), + Divider(color: Colors.grey.withOpacity(0.5)), + Expanded( + child: Column( + children: [ + Text( + "After", + style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold, letterSpacing: 1), + ), + SizedBox( + height: 10, + ), + Image.memory( + images.getPostBytes(), + errorBuilder: (ctx, err, trace) { + return Container( + color: Colors.grey.withOpacity(0.25), + ); + }, + ) + ], + )) + ], + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/BookAppointment/search_result/ResultByClinic.dart b/lib/pages/BookAppointment/search_result/ResultByClinic.dart new file mode 100644 index 00000000..15fc79f3 --- /dev/null +++ b/lib/pages/BookAppointment/search_result/ResultByClinic.dart @@ -0,0 +1,261 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart'; +import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/components/LaserClinic.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/components/LiveCareBookAppointment.dart'; +import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/doctor_response_mapper.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../../config/shared_pref_kay.dart'; +import '../../../models/Appointments/DoctorListResponse.dart'; +import '../../../services/authentication/auth_provider.dart'; +import '../../../theme/colors.dart'; +import '../../../uitl/gif_loader_dialog_utils.dart'; + +class ResultByClinic extends StatefulWidget { + HospitalsModel? selectedValue; + Function(RegionList, int?) onClinicSelected; + + ResultByClinic({super.key, this.selectedValue, required this.onClinicSelected}); + + @override + State createState() => _ResultByClinicState(); +} + +class _ResultByClinicState extends State { + List? clinicIds = List.empty(); + + @override + void initState() { + super.initState(); + WidgetsBinding.instance.addPostFrameCallback((_) => getClinicWrtHospital(widget.selectedValue)); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Expanded( + child: clinicIds?.isNotEmpty == true + ? ListView.builder( + itemBuilder: (_, index) => InkWell( + onTap: () { + getDoctorsList( + context, + "${clinicIds?[index].clinicID.toString() ?? ''}-${clinicIds?[index].isLiveCareClinicAndOnline!.toString()}-${clinicIds?[index].liveCareClinicID.toString()}-${clinicIds?[index].liveCareServiceID.toString()}", + clinicIds?[index].clinicDescription!, + widget.selectedValue, + clinicIds?[index]); + }, + child: Material( + color: CustomColors.white, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 24), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + clinicIds?[index].clinicDescription ?? '', + style: TextStyle(fontSize: 22, color: Colors.black, fontWeight: FontWeight.w700), + ), + ], + ), + ), + Padding( + padding: EdgeInsets.all(8), + child: Center( + child: Icon( + Icons.arrow_forward_ios, + color: CustomColors.black, + size: 16, + ), + ), + ), + ], + )), + ), + ), + itemCount: clinicIds?.length ?? 0, + ) + : getNoDataWidget(context)), + ], + ); + } + + getDoctorsList(BuildContext context, String? dropdownValue, String? dropdownTitle, HospitalsModel? selectedHospital, ListClinicCentralized? selectedClinic) { + SearchInfo searchInfo = new SearchInfo(); + if (dropdownValue != null) if (dropdownValue!.split("-")[0] == "17") { + searchInfo.ProjectID = int.parse(selectedHospital?.mainProjectID.toString() ?? ""); + searchInfo.ClinicID = int.parse(dropdownValue!.split("-")[0]); + searchInfo.hospital = selectedHospital; + searchInfo.clinic = selectedClinic; + searchInfo.date = DateTime.now(); + + if (context.read().isLogin) { + if (context.read().user.age! > 12) { + navigateToDentalComplaints(context, searchInfo); + } else { + callDoctorsSearchAPI(17); + } + } else { + navigateToDentalComplaints(context, searchInfo); + } + } else if (dropdownValue!.split("-")[0] == "253") { + navigateToLaserClinic(context); + // callDoctorsSearchAPI(); + } else if (dropdownValue!.split("-")[1] == "true" + // && authProvider.isLogin && + // authUser.patientType == 1 + ) { + Navigator.push( + context, + FadePage( + page: LiveCareBookAppointment(clinicName: dropdownTitle, liveCareClinicID: dropdownValue!.split("-")[2], liveCareServiceID: dropdownValue!.split("-")[3]), + ), + ).then((value) { + print("navigation return "); + if (value == "false") return; + + // setState(() { + // }); + if (value == "livecare") { + Navigator.push(context, FadePage(page: LiveCareHome())); + } + if (value == "schedule") { + callDoctorsSearchAPI(int.parse(dropdownValue!.split("-")[0])); + } + }); + setState(() {}); + } else { + callDoctorsSearchAPI(int.parse(dropdownValue!.split("-")[0])); + } + } + + Future navigateToLaserClinic(BuildContext context) async { + Navigator.push( + context, + FadePage( + page: LaserClinic(selectedHospital: widget.selectedValue!), + ), + ).then((value) {}); + } + + Future navigateToDentalComplaints(BuildContext context, SearchInfo searchInfo) async { + Navigator.push( + context, + FadePage( + page: DentalComplaints( + searchInfo: searchInfo, + isFromHospitalSearchPage: true, + ), + ), + ).then((value) { + if (value is RegionList) { + widget.onClinicSelected(value,null); + } + }); + } + + callDoctorsSearchAPI(int clinicID) { + var isArabic = context.read().isArabic; + int languageID = isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + List doctorsList = []; + List arr = []; + List arrDistance = []; + List result; + int numAll; + List _patientDoctorAppointmentListHospital = []; + + DoctorsListService service = new DoctorsListService(); + service + .getDoctorsList(clinicID, widget.selectedValue?.mainProjectID.toString() != "" ? int.parse(widget.selectedValue?.mainProjectID.toString() ?? "-1") : 0, false, languageID, null) + .then((res) async { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + RegionList regionHospitalList = RegionList(); + + if (res['DoctorList'].length != 0) { + res['DoctorList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson( + v, + )); + }); + + regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, isArabic: isArabic); + var lat = await sharedPref.getDouble(USER_LAT); + + var lng = await sharedPref.getDouble(USER_LONG); + var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0); + regionHospitalList = await DoctorMapper.sortList(isLocationEnabled, regionHospitalList); + widget.onClinicSelected(regionHospitalList, clinicID); + setState(() {}); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['ErrorSearchMsg']); + } + + GifLoaderDialogUtils.hideDialog(context); + // navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err, localContext: context); + }); + } + + void getClinicWrtHospital(HospitalsModel? newValue) async { + AppGlobal.context = context; + GifLoaderDialogUtils.showMyDialog(context); + ClinicListService service = new ClinicListService(); + List projectsListLocal = []; + clinicIds = List.empty(); + List clinicId = []; + try { + Map res = await service.getClinicByHospital(projectID: newValue?.mainProjectID.toString() ?? ""); + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + List list = res['ListClinic']; + + if (list.isEmpty) { + AppToast.showErrorToast( + message: TranslationBase.of(context).NoClinicFound, + ); + } + res['ListClinic'].forEach((v) { + clinicId.add(ListClinicCentralized.fromJson(v)); + }); + clinicIds = clinicId; + setState(() {}); + } else { + AppToast.showErrorToast( + message: TranslationBase.of(context).NoClinicFound, + ); + } + } catch (e) { + print("the error is $e"); + AppToast.showErrorToast( + message: TranslationBase.of(context).NoClinicFound, + ); + GifLoaderDialogUtils.hideDialog(context); + } + } +} diff --git a/lib/pages/BookAppointment/search_result/ResultByDoctors.dart b/lib/pages/BookAppointment/search_result/ResultByDoctors.dart new file mode 100644 index 00000000..bdb74688 --- /dev/null +++ b/lib/pages/BookAppointment/search_result/ResultByDoctors.dart @@ -0,0 +1,130 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class ResultByDoctor extends StatefulWidget { + List doctorsList = []; + List? patientDoctorAppointmentListHospital; + final bool isLiveCareAppointment; + final bool isObGyneAppointment; + final bool isDoctorNameSearch; + final bool isDoctorSearchResult; + final bool showNearestAppointment; + final bool nearestAppointmentDoctors; + final OBGyneProcedureListResponse? obGyneProcedureListResponse; + final Function(bool)? refreshDoctorList; + + ResultByDoctor({ + required this.doctorsList, + required this.patientDoctorAppointmentListHospital, + required this.isLiveCareAppointment, + required this.isObGyneAppointment, + required this.isDoctorNameSearch, + required this.isDoctorSearchResult, + this.showNearestAppointment = false, + this.nearestAppointmentDoctors = false, + this.obGyneProcedureListResponse, + this.refreshDoctorList + }); + + @override + State createState() => _ResultByDoctorState(); +} + +class _ResultByDoctorState extends State { + + bool nearestAppo = false; + + @override + void initState() { + nearestAppo = widget.nearestAppointmentDoctors; + super.initState(); + } + @override + Widget build(BuildContext context) { + return Column( + children: [ + + Visibility( + visible: widget.showNearestAppointment, + child: Padding( + padding: const EdgeInsets.only(left: 6, right: 6,), + child: Row( + children: [ + Checkbox( + activeColor: CustomColors.accentColor, + value: nearestAppo, + onChanged: (bool? value) { + setState(() { + nearestAppo = value ?? false; + }); + widget.refreshDoctorList?.call(nearestAppo); + }, + ), + AutoSizeText( + TranslationBase.of(context).nearestAppo.trim(), + maxLines: 1, + minFontSize: 10, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 1.4, + fontWeight: FontWeight.w600, + letterSpacing: -0.39, + height: 0.8, + ), + ), + // Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56)), + ], + ), + ), + ), + widget.patientDoctorAppointmentListHospital?.isNotEmpty == true + ? Expanded( + child: ListView.separated( + addAutomaticKeepAlives: true, + physics: BouncingScrollPhysics(), + separatorBuilder: (context, index) { + return Material( + color: Color(0xFFf5f5f5), + child: SizedBox( + height: 12, + ), + ); + }, + itemBuilder: (context, index) { + final doctor = widget.patientDoctorAppointmentListHospital![index]; + + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 12.0), + child: DoctorView( + doctor: doctor, + isLiveCareAppointment: widget.isLiveCareAppointment, + isObGyneAppointment: widget.isObGyneAppointment, + isDoctorNameSearch: widget.isDoctorNameSearch, + obGyneProcedureListResponse: widget.obGyneProcedureListResponse, + isShowDate: false, + onTap: () { + context.read().analytics.appointment.book_appointment_select_doctor(appointment_type: 'regular', doctor: doctor); + }), + ); + }, + itemCount: widget.patientDoctorAppointmentListHospital?.length ?? 0, + ), + ) + : getNoDataWidget(context), + ], + ); + } + + @override + void dispose() { + super.dispose(); + } +} diff --git a/lib/pages/BookAppointment/search_result/ResultByFacility.dart b/lib/pages/BookAppointment/search_result/ResultByFacility.dart new file mode 100644 index 00000000..f1f7ba88 --- /dev/null +++ b/lib/pages/BookAppointment/search_result/ResultByFacility.dart @@ -0,0 +1,173 @@ +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +typedef OnFacilitySelected = Function(bool); + +class ResultByFacility extends StatelessWidget { + List doctorsList = []; + String selectedRegion = ''; + RegionList patientDoctorAppointmentListHospital; + OnFacilitySelected onFacilitySelected; + + ResultByFacility( + {required this.doctorsList, + required this.patientDoctorAppointmentListHospital, + required this.onFacilitySelected, + required this.selectedRegion}); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Visibility( + visible: patientDoctorAppointmentListHospital + .registeredDoctorMap?[selectedRegion]?.hmgSize != + 0, + child: InkWell( + onTap: () { + if (patientDoctorAppointmentListHospital + .registeredDoctorMap?[selectedRegion]?.hmgSize == + 0) return; + onFacilitySelected(false); + }, + child: HospitalTitle( + iconUrl: 'assets/images/svg/HMG.svg', + title: TranslationBase.of(context).hmgHospital, + isHMC: false, + itemCount: + "${patientDoctorAppointmentListHospital.registeredDoctorMap?[selectedRegion]?.hmgSize ?? 0}", + nearest: patientDoctorAppointmentListHospital + .registeredDoctorMap?[selectedRegion]?.hmgDistance), + ), + ), + SizedBox(height: 16,), + Visibility( + visible: patientDoctorAppointmentListHospital + .registeredDoctorMap?[selectedRegion]?.hmcSize != + 0, + child: InkWell( + onTap: () { + if (patientDoctorAppointmentListHospital + .registeredDoctorMap?[selectedRegion]?.hmcSize == + 0) return; + onFacilitySelected(true); + }, + child: HospitalTitle( + iconUrl: 'assets/images/svg/HMC.svg', + title: TranslationBase.of(context).hmcHospital, + isHMC: true, + itemCount: + "${patientDoctorAppointmentListHospital.registeredDoctorMap?[selectedRegion]?.hmcSize ?? 0}", + nearest: patientDoctorAppointmentListHospital + .registeredDoctorMap?[selectedRegion]?.hmcDistance), + ), + ) + ]); + } +} + +class HospitalTitle extends StatelessWidget { + final String title; + final String iconUrl; + final bool isHMC; + final num? nearest; + final String itemCount; + + const HospitalTitle( + {super.key, + required this.title, + required this.iconUrl, + required this.isHMC, + required this.itemCount,this.nearest}); + + @override + Widget build(BuildContext context) { + return Material( + color: Colors.white, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 24), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + SvgPicture.asset(iconUrl), + SizedBox( + width: 8, + ), + Text( + title, + style: TextStyle( + fontSize: 18, + color: + isHMC ? Color(0xFF40ACC9) : Color(0xFFD02127), + fontWeight: FontWeight.w600), + ), + ], + ), + SizedBox( + height: 6, + ), + Row( + children: [ + Text( + isHMC + ? "${TranslationBase.of(context).MedicalCenterString(num.parse(itemCount)).replaceAll("@", itemCount)}" + : "${TranslationBase.of(context).HospitalString(num.parse(itemCount)).replaceAll("@", itemCount)}", + style: TextStyle( + fontSize: 12, + color: Colors.black, + fontWeight: FontWeight.w600), + ), + Visibility( + visible: nearest != double.infinity && + nearest != "0" && + nearest != 0, + child: Row( + children: [ + SizedBox( + width: 8, + ), + SvgPicture.asset( + 'assets/images/svg/location.svg', + ), + SizedBox( + width: 8, + ), + Text( + "${TranslationBase.of(context).nearest}: $nearest ${TranslationBase.of(context).kilometerUnit}", + style: TextStyle( + fontSize: 12, + color: Colors.black, + fontWeight: FontWeight.w600), + ), + ], + ), + ), + ], + ), + ], + ), + ), + Padding( + padding: EdgeInsets.all(8), + child: Center( + child: Icon( + Icons.arrow_forward_ios, + color: CustomColors.black, + size: 16, + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/BookAppointment/search_result/ResultByHospital.dart b/lib/pages/BookAppointment/search_result/ResultByHospital.dart new file mode 100644 index 00000000..b487094e --- /dev/null +++ b/lib/pages/BookAppointment/search_result/ResultByHospital.dart @@ -0,0 +1,248 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +typedef OnHospitalSelected = Function(String, int); + +class ResultByHospital extends StatelessWidget { + List doctorsList = []; + List? paitientDoctorAppointmentList; + bool isHMCSelected; + + bool isLiveCareAppointment; + bool isObGyneAppointment; + bool isDoctorNameSearch; + OBGyneProcedureListResponse? obGyneProcedureListResponse; + bool isDoctorSearchResult; + OnHospitalSelected onHospitalSelected; + + ResultByHospital( + {required this.doctorsList, + required this.paitientDoctorAppointmentList, + required this.isHMCSelected, + this.isObGyneAppointment = false, + this.isDoctorNameSearch = false, + required this.isLiveCareAppointment, + required this.isDoctorSearchResult, + this.obGyneProcedureListResponse, + required this.onHospitalSelected}); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Expanded( + child: HospitalBodyWidget( + patientDoctorAppointmentListHospital: paitientDoctorAppointmentList, + isLiveCareAppointment: isLiveCareAppointment, + isObGyneAppointment: isObGyneAppointment, + isDoctorNameSearch: isDoctorNameSearch, + isDoctorSearchResult: isDoctorSearchResult, + onHospitalSelected: onHospitalSelected, + isHMC: isHMCSelected), + ), + ], + ); + } +} + +class HospitalBodyWidget extends StatelessWidget { + final List? + patientDoctorAppointmentListHospital; + final bool isLiveCareAppointment; + final bool isObGyneAppointment; + final bool isDoctorNameSearch; + final bool isDoctorSearchResult; + final OBGyneProcedureListResponse? obGyneProcedureListResponse; + final OnHospitalSelected onHospitalSelected; + final bool isHMC; + + const HospitalBodyWidget( + {super.key, + this.patientDoctorAppointmentListHospital, + required this.isLiveCareAppointment, + required this.isObGyneAppointment, + required this.isDoctorNameSearch, + required this.isDoctorSearchResult, + this.obGyneProcedureListResponse, + required this.onHospitalSelected, + required this.isHMC}); + + @override + Widget build(BuildContext context) { + return ListView.separated( + addAutomaticKeepAlives: true, + shrinkWrap: true, + physics: BouncingScrollPhysics(), + itemCount: patientDoctorAppointmentListHospital?.length ?? 0, + separatorBuilder: (context, index) { + return Container( + height: 12, + margin: EdgeInsets.only(left: 21, right: 21), + ); + }, + itemBuilder: (context, index) { + return InkWell( + onTap: () { + onHospitalSelected( + patientDoctorAppointmentListHospital![index].filterName ?? '', + index); + }, + child: Material( + color: CustomColors.white, + child: Padding( + padding: + const EdgeInsets.symmetric(horizontal: 16, vertical: 24), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Padding( + padding: const EdgeInsets.all(6.0), + child: SvgPicture.asset( + isHMC + ? 'assets/images/svg/HMC.svg' + : 'assets/images/svg/HMG.svg', + ), + ), + Expanded( + child: Directionality( + textDirection: (context + .read() + .isArabic == + true) + ? TextDirection.rtl + : TextDirection.ltr, + child: Text( + patientDoctorAppointmentListHospital![index] + .filterName ?? + '', + style: TextStyle( + fontSize: 22, + color: isHMC + ? Color(0xFF40ACC9) + : Color(0xFFD02127), + fontWeight: FontWeight.w700), + ), + ), + ), + ], + ), + SizedBox( + height: 8, + ), + Visibility( + visible: + (patientDoctorAppointmentListHospital?[index] + .distanceInKMs != + "0"), + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/svg/location.svg', + ), + SizedBox( + width: 8, + ), + Text( + // "${TranslationBase.of(context).nearest}: ${patientDoctorAppointmentListHospital?[index].distanceInKMs} ${TranslationBase.of(context).kilometerUnit}", + "${patientDoctorAppointmentListHospital?[index].distanceInKMs} ${TranslationBase.of(context).kilometerUnit}", + style: TextStyle( + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w600), + ), + ], + ), + ), + ], + ), + ), + Padding( + padding: EdgeInsets.all(8), + child: Center( + child: Icon( + Icons.arrow_forward_ios, + color: CustomColors.black, + size: 16, + ), + ), + ), + ], + )), + ), + ); + // return AppExpandableNotifier( + // applyBackgroundColor: false, + // widgetColor: CustomColors.appBackgroudGrey2Color, + // title: (patientDoctorAppointmentListHospital?[index].distanceInKMs != + // "0") + // ? patientDoctorAppointmentListHospital![index].filterName! + + // " - " + + // patientDoctorAppointmentListHospital![index].distanceInKMs! + + // " " + + // TranslationBase.of(context).km + // : patientDoctorAppointmentListHospital![index].filterName, + // projectTitleTop: + // patientDoctorAppointmentListHospital![index].projectTopName, + // projectTitleBottom: (patientDoctorAppointmentListHospital![index] + // .distanceInKMs != + // "0") + // ? patientDoctorAppointmentListHospital![index] + // .projectBottomName + // .toString() + + // " - " + + // patientDoctorAppointmentListHospital![index].distanceInKMs! + + // " " + + // TranslationBase.of(context).km + // : patientDoctorAppointmentListHospital![index] + // .projectBottomName + // .toString(), + // isTitleSingleLine: false, + // isDoctorSearchResult: isDoctorSearchResult, + // isDisabled: true, + // isExpand: + // patientDoctorAppointmentListHospital?.length == 1 ? true : false, + // // bodyWidget: ListView.separated( + // // shrinkWrap: true, + // // physics: NeverScrollableScrollPhysics(), + // // padding: + // // EdgeInsets.only(bottom: 10, top: 10, left: 21, right: 21), + // // itemBuilder: (context, _index) { + // // // print("the index of patientDoctorAppointmentList is ${_index}"); + // // // print("the index of parent is ${index}"); + // // final doctor = patientDoctorAppointmentListHospital![index] + // // .patientDoctorAppointmentList![_index]; + // // // print('the doctor is ${doctor.toJson()}'); + // // return DoctorView( + // // doctor: doctor, + // // isLiveCareAppointment: isLiveCareAppointment, + // // isObGyneAppointment: isObGyneAppointment, + // // isDoctorNameSearch: isDoctorNameSearch, + // // obGyneProcedureListResponse: obGyneProcedureListResponse, + // // isShowDate: false, + // // onTap: () { + // // context + // // .read() + // // .analytics + // // .appointment + // // .book_appointment_select_doctor( + // // appointment_type: 'regular', doctor: doctor); + // // }); + // // }, + // // separatorBuilder: (context, index) => SizedBox(height: 14), + // // itemCount: patientDoctorAppointmentListHospital?[index].patientDoctorAppointmentList?.length ?? 0), + // ); + }, + ); + } +} diff --git a/lib/pages/BookAppointment/search_result/ResultByRegion.dart b/lib/pages/BookAppointment/search_result/ResultByRegion.dart new file mode 100644 index 00000000..6eaa83d2 --- /dev/null +++ b/lib/pages/BookAppointment/search_result/ResultByRegion.dart @@ -0,0 +1,170 @@ +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +typedef OnRegionSelected = Function(String); +class ResultByRegion extends StatelessWidget { + List doctorsList = []; + RegionList patientDoctorAppointmentListHospital; + OnRegionSelected onRegionSelected; + ResultByRegion( + {required this.doctorsList, + required this.patientDoctorAppointmentListHospital, + required this.onRegionSelected + }); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Expanded( + child: patientDoctorAppointmentListHospital + .registeredDoctorMap?.isNotEmpty == + true + ? ListView.separated( + addAutomaticKeepAlives: true, + physics: BouncingScrollPhysics(), + separatorBuilder: (context, index) { + return Material( + color: Color(0xFFf5f5f5), + child: SizedBox( + height: 12, + ), + ); + }, + itemBuilder: (context, index) { + String key = patientDoctorAppointmentListHospital + .registeredDoctorMap?.keys + .toList()[index] ?? + ''; + + return InkWell( + onTap: (){ + onRegionSelected(key); + }, + child: RegionTitle( + title: key, + hmcCount: + "${patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmcSize ?? 0}", + hmgCount: + "${patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmgSize ?? 0}", + ), + ); + + }, + itemCount: patientDoctorAppointmentListHospital + .registeredDoctorMap?.length ?? + 0, + ) + : getNoDataWidget(context), + ), + ], + ); + } +} + + +class RegionTitle extends StatelessWidget { + final String title; + final String hmcCount; + final String hmgCount; + + const RegionTitle( + {super.key, + required this.title, + required this.hmcCount, + required this.hmgCount}); + + @override + Widget build(BuildContext context) { + return Material( + color: CustomColors.white, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 24), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: TextStyle( + fontSize: 22, color: Colors.black, fontWeight: FontWeight.w700), + ), + SizedBox( + height: 8, + ), + Row( + children: [ + Visibility( + visible: hmgCount != "0", + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/svg/HMG.svg', + width: 10, + height: 10, + ), + SizedBox( + width: 8, + ), + Text( + "${TranslationBase.of(context).HospitalString(num.parse(hmgCount)).replaceAll("@", hmgCount)}", + style: TextStyle( + fontSize: 14, + color: Color(0xFFD02127), + fontWeight: FontWeight.w600), + ), + ], + ), + ), + Visibility( + visible: hmcCount != "0" && hmgCount != "0", + child: Text(", ")), + Visibility( + visible: hmcCount != "0", + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/svg/HMC.svg', + width: 10, + height: 10, + ), + SizedBox( + width: 8, + ), + Text( + "${TranslationBase.of(context).MedicalCenterString(num.parse(hmcCount)).replaceAll("@", hmcCount)}", + style: TextStyle( + fontSize: 14, + color: Color(0xFF40ACC9), + fontWeight: FontWeight.w600), + ), + ], + ), + ), + ], + ), + ], + ), + ), + Padding( + padding: EdgeInsets.all(8), + child: Center( + child: Icon( + Icons.arrow_forward_ios, + color: CustomColors.black, + size: 16, + ), + ), + ), + ], + ) + ), + ); + } +} diff --git a/lib/pages/BookAppointment/search_result/SearchResultWithTab.dart b/lib/pages/BookAppointment/search_result/SearchResultWithTab.dart new file mode 100644 index 00000000..25d527b9 --- /dev/null +++ b/lib/pages/BookAppointment/search_result/SearchResultWithTab.dart @@ -0,0 +1,725 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultByDoctors.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultByFacility.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultByHospital.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultByRegion.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class SearchResultWithTab extends StatefulWidget { + List doctorsList = []; + RegionList patientDoctorAppointmentListHospital; + bool isLiveCareAppointment; + bool isObGyneAppointment; + bool isDoctorNameSearch; + OBGyneProcedureListResponse? obGyneProcedureListResponse; + bool isDoctorSearchResult; + + bool isForHospital; + + SearchResultWithTab({required this.doctorsList, + required this.patientDoctorAppointmentListHospital, + this.isObGyneAppointment = false, + this.isDoctorNameSearch = false, + required this.isLiveCareAppointment, + required this.isDoctorSearchResult, + this.obGyneProcedureListResponse, + this.isForHospital = false, + }); + + @override + State createState() => _SearchResultWithTabState(); +} + +class _SearchResultWithTabState extends State { + int _currentIndex = 0; + late PageController _controller; + String selectedRegion = ""; + bool isHMCSelected = false; + int selectedHospitalIndex = -1; + ScrollController scrollController = ScrollController(); + + @override + void initState() { + super.initState(); + _controller = new PageController(); + } + + changePageViewIndex(pageIndex) { + _controller.jumpToPage(pageIndex); + // scrollController.jumpTo(pageIndex); + } + + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).bookAppo, + isShowDecPage: false, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: widget.patientDoctorAppointmentListHospital + .registeredDoctorMap?.isNotEmpty == + true + ? SizedBox( + height: SizeConfig.realScreenHeight! * .9, + width: SizeConfig.realScreenWidth, + child: Column(children: [ + Container( + width: double.infinity, + padding: EdgeInsets.only(left: 20, right: 20, top: 12), + child: SizedBox( + height: 100, + child: ListView( + scrollDirection: Axis.horizontal, + controller: scrollController, + children: [ + SizedBox( + width: MediaQuery.of(context).size.width / 4, + child: showProgress( + title: TranslationBase.of(context).selectRegion, + status: _currentIndex == 0 + ? TranslationBase.of(context).inPrgress + : _currentIndex > 0 + ? TranslationBase.of(context).completed + : TranslationBase.of(context).locked, + color: _currentIndex == 0 + ? CustomColors.orange + : CustomColors.green, + onTap: () { + setState(() { + selectedHospitalIndex = -1; + selectedRegion = ""; + _currentIndex = 0; + changePageViewIndex(0); + }); + }, + ), + ), + SizedBox( + width: MediaQuery.of(context).size.width / 4, + child: showProgress( + title: TranslationBase.of(context).selectFacitlity, + status: _currentIndex == 1 + ? TranslationBase.of(context).inPrgress + : _currentIndex > 1 + ? TranslationBase.of(context).completed + : TranslationBase.of(context).locked, + color: _currentIndex == 1 + ? CustomColors.orange + : _currentIndex > 1 + ? CustomColors.green + : CustomColors.grey2, + onTap: () { + setState(() { + selectedHospitalIndex = -1; + _currentIndex = 1; + changePageViewIndex(1); + }); + }, + ), + ), + SizedBox( + width: MediaQuery.of(context).size.width / 4, + child: showProgress( + title: TranslationBase.of(context).selectBranch, + status: _currentIndex == 2 + ? TranslationBase.of(context).inPrgress + : _currentIndex > 1 + ? TranslationBase.of(context).completed + : TranslationBase.of(context).locked, + color: _currentIndex == 2 + ? CustomColors.orange + : _currentIndex > 2 + ? CustomColors.green + : CustomColors.grey2, + onTap: () { + setState(() { + selectedHospitalIndex = -1; + _currentIndex = 2; + changePageViewIndex(2); + }); + }, + ), + ), + (widget.isForHospital) + ? SizedBox( + width: MediaQuery.of(context).size.width / 4, + child: showProgress( + title: + TranslationBase.of(context).selectClinic, + status: _currentIndex == 3 + ? TranslationBase.of(context).inPrgress + : TranslationBase.of(context).locked, + color: _currentIndex == 3 + ? CustomColors.orange + : _currentIndex > 4 + ? CustomColors.green + : CustomColors.grey2, + isNeedBorder: false, + onTap: () { + setState(() { + _currentIndex = 3; + changePageViewIndex(3); + }); + }, + ), + ) + : SizedBox.shrink(), + SizedBox( + width: MediaQuery.of(context).size.width / 4, + child: showProgress( + title: TranslationBase.of(context).selectDoctor, + status: _currentIndex == + ((widget.isForHospital) ? 4 : 3) + ? TranslationBase.of(context).inPrgress + : TranslationBase.of(context).locked, + color: _currentIndex == + ((widget.isForHospital) ? 4 : 3) + ? CustomColors.orange + : _currentIndex == + ((widget.isForHospital) ? 5 : 4) + ? CustomColors.green + : CustomColors.grey2, + isNeedBorder: false, + onTap: () { + setState(() { + _currentIndex = + ((widget.isForHospital) ? 4 : 3); + changePageViewIndex(_currentIndex); + }); + }, + ), + ), + ], + ), + ), + ), + Padding( + padding: + const EdgeInsetsDirectional.fromSTEB(10.0, 18, 0, 24), + child: Row( + children: [ + (_currentIndex != 0) + ? InkWell( + onTap: () { + handleBackClick(); + }, + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 0, 0, 04, 0), + child: Icon( + Icons.arrow_back, + color: Theme.of(context).primaryColor, + ), + ), + ) + : mWidth(24), + Text( + getTitle(), + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w600, + color: Colors.black), + ) + ], + ), + ), + // mHeight(24), + Expanded( + child: PageView( + physics: NeverScrollableScrollPhysics(), + controller: _controller, + onPageChanged: (index) { + setState(() { + _currentIndex = index; + }); + }, + scrollDirection: Axis.horizontal, + children: [ + ResultByRegion( + doctorsList: widget.doctorsList, + patientDoctorAppointmentListHospital: + widget.patientDoctorAppointmentListHospital, + onRegionSelected: (key) { + setState(() { + selectedRegion = key; + _currentIndex = 1; + changePageViewIndex(1); + }); + }), + (selectedRegion != "") + ? ResultByFacility( + doctorsList: widget.doctorsList, + patientDoctorAppointmentListHospital: + widget.patientDoctorAppointmentListHospital, + selectedRegion: selectedRegion, + onFacilitySelected: (isHMCSelected) { + setState(() { + this.isHMCSelected = isHMCSelected; + _currentIndex = 2; + changePageViewIndex(2); + }); + }, + ) : SizedBox.shrink(), + (selectedRegion != '') ? + ResultByHospital(doctorsList: widget.doctorsList, + paitientDoctorAppointmentList: (isHMCSelected) ? + widget.patientDoctorAppointmentListHospital + .registeredDoctorMap![selectedRegion]! + .hmcDoctorList ?? + [] + : widget + .patientDoctorAppointmentListHospital + .registeredDoctorMap?[selectedRegion] + ?.hmgDoctorList ?? + [], + isHMCSelected: isHMCSelected, + isLiveCareAppointment: widget.isLiveCareAppointment, + isDoctorSearchResult: widget.isDoctorSearchResult, + onHospitalSelected: (hospital, index) { + setState(() { + selectedHospitalIndex = index; + _currentIndex = 3; + changePageViewIndex(3); + }); + }) + : SizedBox.shrink(), + (selectedRegion != '' && selectedHospitalIndex != -1) + ? ResultByDoctor( + doctorsList: widget.doctorsList, + patientDoctorAppointmentListHospital: (!isHMCSelected) + ? widget + .patientDoctorAppointmentListHospital + .registeredDoctorMap![selectedRegion]! + .hmgDoctorList![selectedHospitalIndex] + .patientDoctorAppointmentList ?? + [] + : widget + .patientDoctorAppointmentListHospital + .registeredDoctorMap?[selectedRegion] + ?.hmcDoctorList?[ + selectedHospitalIndex] + .patientDoctorAppointmentList ?? + [], + isLiveCareAppointment: + widget.isLiveCareAppointment, + isDoctorSearchResult: widget.isDoctorSearchResult, + isObGyneAppointment: widget.isObGyneAppointment, + isDoctorNameSearch: widget.isDoctorNameSearch) + : SizedBox.shrink(), + ], + ), + ), + ]), + ) + : getNoDataWidget(context),); + } + + String getTitle() { + switch (_currentIndex) { + case 0: + return TranslationBase + .of(context) + .selectRegion; + case 1: + return TranslationBase + .of(context) + .selectFacitlity; + case 2: + return TranslationBase + .of(context) + .selectBranch; + case 3: + return TranslationBase + .of(context) + .selectDoctor; + } + return ""; + } + + void handleBackClick() { + switch (_currentIndex) { + case 1: + selectedHospitalIndex = -1; + selectedRegion = ""; + _currentIndex = 0; + changePageViewIndex(0); + break; + case 2: + selectedHospitalIndex = -1; + _currentIndex = 1; + changePageViewIndex(1); + break; + case 3: + selectedHospitalIndex = -1; + _currentIndex = 2; + changePageViewIndex(2); + break; + } + } + + Widget showProgress( + {String? title, + String? status, + Color? color, + bool isNeedBorder = true, + Function()? onTap}) { + return InkWell( + onTap: () { + if (status == TranslationBase + .of(context) + .completed) { + onTap?.call(); + } + }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 26, + height: 26, + decoration: containerRadius(color!, 200), + child: Icon( + Icons.done, + color: Colors.white, + size: 16, + ), + ), + if (isNeedBorder) + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: mDivider(Colors.grey), + )), + ], + ), + mHeight(8), + Text( + title!, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + letterSpacing: -0.44, + ), + ), + mHeight(2), + Container( + padding: EdgeInsets.all(5), + decoration: containerRadius(color!.withOpacity(0.2), 4), + child: Text( + status!, + style: TextStyle( + fontSize: 8, + fontWeight: FontWeight.w600, + letterSpacing: -0.32, + color: color, + ), + ), + ), + ], + ) + ], + ), + ); + } +} + +class HospitalBodyWidget extends StatelessWidget { + final List? + patientDoctorAppointmentListHospital; + final bool isLiveCareAppointment; + final bool isObGyneAppointment; + final bool isDoctorNameSearch; + final bool isDoctorSearchResult; + final OBGyneProcedureListResponse? obGyneProcedureListResponse; + + const HospitalBodyWidget({ + super.key, + this.patientDoctorAppointmentListHospital, + required this.isLiveCareAppointment, + required this.isObGyneAppointment, + required this.isDoctorNameSearch, + required this.isDoctorSearchResult, + this.obGyneProcedureListResponse, + }); + + @override + Widget build(BuildContext context) { + return ListView.separated( + addAutomaticKeepAlives: true, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemCount: patientDoctorAppointmentListHospital?.length ?? 0, + separatorBuilder: (context, index) { + return Container( + height: 12, + margin: EdgeInsets.only(left: 21, right: 21), + ); + }, + itemBuilder: (context, index) { + return AppExpandableNotifier( + applyBackgroundColor: false, + widgetColor: CustomColors.appBackgroudGrey2Color, + title: (patientDoctorAppointmentListHospital?[index].distanceInKMs != + "0") + ? patientDoctorAppointmentListHospital![index].filterName! + + " - " + + patientDoctorAppointmentListHospital![index].distanceInKMs! + + " " + + TranslationBase + .of(context) + .km + : patientDoctorAppointmentListHospital![index].filterName, + projectTitleTop: + patientDoctorAppointmentListHospital![index].projectTopName, + projectTitleBottom: (patientDoctorAppointmentListHospital![index] + .distanceInKMs != + "0") + ? patientDoctorAppointmentListHospital![index] + .projectBottomName + .toString() + + " - " + + patientDoctorAppointmentListHospital![index].distanceInKMs! + + " " + + TranslationBase + .of(context) + .km + : patientDoctorAppointmentListHospital![index] + .projectBottomName + .toString(), + isTitleSingleLine: false, + isDoctorSearchResult: isDoctorSearchResult, + isExpand: + patientDoctorAppointmentListHospital?.length == 1 ? true : false, + bodyWidget: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + padding: + EdgeInsets.only(bottom: 10, top: 10, left: 21, right: 21), + itemBuilder: (context, _index) { + // print("the index of patientDoctorAppointmentList is ${_index}"); + // print("the index of parent is ${index}"); + final doctor = patientDoctorAppointmentListHospital![index] + .patientDoctorAppointmentList![_index]; + // print('the doctor is ${doctor.toJson()}'); + return DoctorView( + doctor: doctor, + isLiveCareAppointment: isLiveCareAppointment, + isObGyneAppointment: isObGyneAppointment, + isDoctorNameSearch: isDoctorNameSearch, + obGyneProcedureListResponse: obGyneProcedureListResponse, + isShowDate: false, + onTap: () { + context + .read() + .analytics + .appointment + .book_appointment_select_doctor( + appointment_type: 'regular', doctor: doctor); + }); + }, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemCount: patientDoctorAppointmentListHospital?[index] + .patientDoctorAppointmentList?.length ?? 0), + ); + }, + ); + } +} + +class RegionTitle extends StatelessWidget { + final String title; + final String hmcCount; + final String hmgCount; + + const RegionTitle({super.key, + required this.title, + required this.hmcCount, + required this.hmgCount}); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: TextStyle( + fontSize: 22, color: Colors.black, fontWeight: FontWeight.w700), + ), + SizedBox( + height: 8, + ), + Row( + children: [ + Text( + "${TranslationBase.of(context).HospitalString(num.parse(hmgCount)).replaceAll("@", hmgCount)} ,", + style: TextStyle( + fontSize: 14, + color: Color(0xFFD02127), + fontWeight: FontWeight.w600), + ), + SizedBox( + width: 8, + ), + Text( + "${TranslationBase.of(context).MedicalCenterString(num.parse(hmcCount)).replaceAll("@", hmcCount)}", + style: TextStyle( + fontSize: 14, + color: Color(0xFF40ACC9), + fontWeight: FontWeight.w600), + ), + ], + ), + ], + ), + ); + } +} + +class HospitalTitle extends StatelessWidget { + final String title; + final String iconUrl; + final bool isHMC; + final String itemCount; + + const HospitalTitle({super.key, + required this.title, + required this.iconUrl, + required this.isHMC, + required this.itemCount}); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + SvgPicture.asset(iconUrl), + SizedBox( + width: 8, + ), + Text( + title, + style: TextStyle( + fontSize: 18, + color: isHMC ? Color(0xFF40ACC9) : Color(0xFFD02127), + fontWeight: FontWeight.w600), + ), + ], + ), + SizedBox( + height: 6, + ), + Text( + isHMC + ? "${TranslationBase.of(context).MedicalCenterString(num.parse(itemCount)).replaceAll("@", itemCount)}" + : "${TranslationBase.of(context).HospitalString(num.parse(itemCount)).replaceAll("@", itemCount)}", + style: TextStyle( + fontSize: 12, color: Colors.black, fontWeight: FontWeight.w600), + ), + ], + ), + ); + } +} + + +///todo the current content of the application +/// return AppExpandableNotifier( +// paddingValue: 10, +// applyBackgroundToOnlyHeader: true, +// completeHeaderColor: CustomColors.appBackgroudGrey2Color, +// headerWidget: RegionTitle( +// title: key, +// hmcCount: +// "${widget.patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmcSize ?? 0}", +// hmgCount: +// "${widget.patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmgSize ?? 0}", +// ), +// showDropDownIconWithCustomHeader: true, +// isTitleSingleLine: false, +// isDoctorSearchResult: widget.isDoctorSearchResult, +// widgetColor: Color(0xFFF8F8F8), +// bodyWidget: Column( +// children: [ +// Padding( +// padding: const EdgeInsets.all(8.0), +// child: AppExpandableNotifier( +// paddingValue: 8, +// applyBackgroundColor: false, +// applyBackgroundToOnlyHeader: true, +// completeHeaderColor: Colors.white, +// headerRadius: BorderRadius.circular(16), +// headerWidget: HospitalTitle( +// iconUrl: 'assets/images/svg/HMG.svg', +// title: TranslationBase.of(context).hmgHospital, +// isHMC: false, +// itemCount: +// "${widget.patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmgSize ?? 0}", +// ), +// showDropDownIconWithCustomHeader: true, +// bodyWidget: HospitalBodyWidget( +// patientDoctorAppointmentListHospital: +// widget.patientDoctorAppointmentListHospital +// .registeredDoctorMap?[key]?.hmgDoctorList, +// isLiveCareAppointment: widget.isLiveCareAppointment, +// isObGyneAppointment: widget.isObGyneAppointment, +// isDoctorNameSearch: widget.isDoctorNameSearch, +// isDoctorSearchResult: widget.isDoctorSearchResult, +// ), +// ), +// ), +// Padding( +// padding: const EdgeInsets.only( +// bottom: 8.0, left: 8, right: 8), +// child: AppExpandableNotifier( +// paddingValue: 8, +// applyBackgroundColor: false, +// applyBackgroundToOnlyHeader: true, +// completeHeaderColor: Colors.white, +// headerRadius: BorderRadius.circular(16), +// headerWidget: HospitalTitle( +// iconUrl: 'assets/images/svg/HMC.svg', +// title: TranslationBase.of(context).hmcHospital, +// isHMC: true, +// itemCount: +// "${widget.patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmcSize ?? 0}", +// ), +// showDropDownIconWithCustomHeader: true, +// bodyWidget: HospitalBodyWidget( +// patientDoctorAppointmentListHospital: +// widget.patientDoctorAppointmentListHospital +// .registeredDoctorMap?[key]?.hmcDoctorList, +// isLiveCareAppointment: widget.isLiveCareAppointment, +// isObGyneAppointment: widget.isObGyneAppointment, +// isDoctorNameSearch: widget.isDoctorNameSearch, +// isDoctorSearchResult: widget.isDoctorSearchResult, +// ), +// ), +// ), +// ], +// )); diff --git a/lib/pages/BookAppointment/search_result/SearchResultWithTabForHospital.dart b/lib/pages/BookAppointment/search_result/SearchResultWithTabForHospital.dart new file mode 100644 index 00000000..4f0e94cd --- /dev/null +++ b/lib/pages/BookAppointment/search_result/SearchResultWithTabForHospital.dart @@ -0,0 +1,853 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultByClinic.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultByDoctors.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultByFacility.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultByHospital.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/search_result/ResultByRegion.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/doctor_response_mapper.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +import '../../../config/shared_pref_kay.dart'; +import '../../../core/service/client/base_app_client.dart'; + +class SearchResultWithTabForHospital extends StatefulWidget { + List doctorsList = []; + RegionList patientDoctorAppointmentListHospital; + bool isLiveCareAppointment; + bool isObGyneAppointment; + bool isDoctorNameSearch; + OBGyneProcedureListResponse? obGyneProcedureListResponse; + bool isDoctorSearchResult; + + bool isForHospital; + + SearchResultWithTabForHospital({ + required this.doctorsList, + required this.patientDoctorAppointmentListHospital, + this.isObGyneAppointment = false, + this.isDoctorNameSearch = false, + required this.isLiveCareAppointment, + required this.isDoctorSearchResult, + this.obGyneProcedureListResponse, + this.isForHospital = true, + }); + + @override + State createState() => + _SearchResultWithTabForHospitalState(); +} + +class _SearchResultWithTabForHospitalState + extends State { + int _currentIndex = 0; + late PageController _controller; + String selectedRegion = ""; + HospitalsModel? selectedHospital; + bool isHMCSelected = false; + int selectedHospitalIndex = -1; + ScrollController scrollController = ScrollController(); + RegionList? doctorList; + bool nearestAppointment= false; + int clinicId = -1; + + @override + void initState() { + super.initState(); + _controller = new PageController(); + } + + changePageViewIndex(pageIndex) { + _controller.jumpToPage(pageIndex); + // if (scrollController.hasClients) { + // print("it has clients"); + // scrollController.animateTo(pageIndex.toDouble(),curve: Curves.easeOut, + // duration: const Duration(milliseconds: 300),);} + } + + void handleBackClick() { + switch (_currentIndex) { + case 1: + selectedHospitalIndex = -1; + selectedRegion = ""; + doctorList = null; + _currentIndex = 0; + changePageViewIndex(0); + break; + case 2: + selectedHospitalIndex = -1; + doctorList = null; + _currentIndex = 1; + changePageViewIndex(1); + break; + case 3: + selectedHospitalIndex = -1; + doctorList = null; + _currentIndex = 2; + changePageViewIndex(2); + break; + case 4: + _currentIndex = 3; + doctorList = null; + changePageViewIndex(3); + } + } + + @override + Widget build(BuildContext context) { + return SizedBox( + child: widget.patientDoctorAppointmentListHospital.registeredDoctorMap + ?.isNotEmpty == + true + ? SizedBox( + height: SizeConfig.realScreenHeight! * .9, + width: SizeConfig.realScreenWidth, + child: Column(children: [ + Container( + width: double.infinity, + padding: EdgeInsets.only(left: 20, right: 20, top: 12), + child: SizedBox( + height: 100, + child: ListView( + scrollDirection: Axis.horizontal, + controller: scrollController, + children: [ + SizedBox( + width: MediaQuery.of(context).size.width / 5.2, + child: showProgress( + title: TranslationBase.of(context).selectRegion, + status: _currentIndex == 0 + ? TranslationBase.of(context).inPrgress + : _currentIndex > 0 + ? TranslationBase.of(context).completed + : TranslationBase.of(context).locked, + color: _currentIndex == 0 + ? CustomColors.orange + : CustomColors.green, + onTap: () { + setState(() { + selectedHospitalIndex = -1; + selectedRegion = ""; + doctorList = null; + _currentIndex = 0; + changePageViewIndex(0); + nearestAppointment = false; + clinicId = -1; + }); + }, + ), + ), + SizedBox( + width: MediaQuery.of(context).size.width / 5.2, + child: showProgress( + title: TranslationBase.of(context).selectFacitlity, + status: _currentIndex == 1 + ? TranslationBase.of(context).inPrgress + : _currentIndex > 1 + ? TranslationBase.of(context).completed + : TranslationBase.of(context).locked, + color: _currentIndex == 1 + ? CustomColors.orange + : _currentIndex > 1 + ? CustomColors.green + : CustomColors.grey2, + onTap: () { + setState(() { + selectedHospitalIndex = -1; + doctorList = null; + _currentIndex = 1; + changePageViewIndex(1); + nearestAppointment = false; + clinicId = -1; + + }); + }, + ), + ), + SizedBox( + width: MediaQuery.of(context).size.width / 5.2, + child: showProgress( + title: TranslationBase.of(context).selectBranch, + status: _currentIndex == 2 + ? TranslationBase.of(context).inPrgress + : _currentIndex > 1 + ? TranslationBase.of(context).completed + : TranslationBase.of(context).locked, + color: _currentIndex == 2 + ? CustomColors.orange + : _currentIndex > 2 + ? CustomColors.green + : CustomColors.grey2, + onTap: () { + setState(() { + selectedHospitalIndex = -1; + doctorList = null; + _currentIndex = 2; + changePageViewIndex(2); + nearestAppointment = false; + clinicId = -1; + + }); + }, + ), + ), + SizedBox( + width: MediaQuery.of(context).size.width / 5.2, + child: showProgress( + title: TranslationBase.of(context).selectClinic, + status: _currentIndex == 3 + ? TranslationBase.of(context).inPrgress + : _currentIndex > 3 + ? TranslationBase.of(context).completed + : TranslationBase.of(context).locked, + color: _currentIndex == 3 + ? CustomColors.orange + : _currentIndex > 3 + ? CustomColors.green + : CustomColors.grey2, + onTap: () { + setState(() { + doctorList = null; + changePageViewIndex(3); + _currentIndex = 3; + nearestAppointment= false; + clinicId = -1; + + }); + }, + ), + ), + SizedBox( + width: MediaQuery.of(context).size.width / 5.2, + child: showProgress( + title: TranslationBase.of(context).selectDoctor, + status: _currentIndex == + ((widget.isForHospital) ? 4 : 3) + ? TranslationBase.of(context).inPrgress + : TranslationBase.of(context).locked, + color: _currentIndex == + ((widget.isForHospital) ? 4 : 3) + ? CustomColors.orange + : _currentIndex == + ((widget.isForHospital) ? 5 : 4) + ? CustomColors.green + : CustomColors.grey2, + isNeedBorder: false, + onTap: () { + setState(() { + _currentIndex = + ((widget.isForHospital) ? 4 : 3); + changePageViewIndex(_currentIndex); + }); + }, + ), + ), + ], + ), + ), + ), + Padding( + padding: + const EdgeInsetsDirectional.fromSTEB(10.0, 18, 0, 24), + child: Row( + children: [ + (_currentIndex != 0) + ? InkWell( + onTap: () { + handleBackClick(); + }, + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 0, 0, 04, 0), + child: Icon( + Icons.arrow_back, + color: Theme.of(context).primaryColor, + ), + ), + ) + : mWidth(24), + Text( + getTitle(), + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w600, + color: Colors.black), + ) + ], + ), + ), + // mHeight(24), + Expanded( + child: PageView( + physics: NeverScrollableScrollPhysics(), + controller: _controller, + onPageChanged: (index) { + setState(() { + _currentIndex = index; + }); + }, + scrollDirection: Axis.horizontal, + children: [ + ResultByRegion( + doctorsList: widget.doctorsList, + patientDoctorAppointmentListHospital: + widget.patientDoctorAppointmentListHospital, + onRegionSelected: (key) { + setState(() { + selectedRegion = key; + _currentIndex = 1; + changePageViewIndex(1); + }); + }), + (selectedRegion != "") + ? ResultByFacility( + doctorsList: widget.doctorsList, + patientDoctorAppointmentListHospital: + widget.patientDoctorAppointmentListHospital, + selectedRegion: selectedRegion, + onFacilitySelected: (isHMCSelected) { + setState(() { + this.isHMCSelected = isHMCSelected; + _currentIndex = 2; + changePageViewIndex(2); + }); + }, + ) + : SizedBox.shrink(), + (selectedRegion != '') + ? ResultByHospital( + doctorsList: widget.doctorsList, + paitientDoctorAppointmentList: (isHMCSelected) + ? widget + .patientDoctorAppointmentListHospital + .registeredDoctorMap![selectedRegion]! + .hmcDoctorList ?? + [] + : widget + .patientDoctorAppointmentListHospital + .registeredDoctorMap?[selectedRegion] + ?.hmgDoctorList ?? + [], + isHMCSelected: isHMCSelected, + isLiveCareAppointment: + widget.isLiveCareAppointment, + isDoctorSearchResult: widget.isDoctorSearchResult, + onHospitalSelected: (hospitalName, index) { + setState(() { + selectedHospitalIndex = index; + selectedHospital = (!isHMCSelected) + ? widget + .patientDoctorAppointmentListHospital + .registeredDoctorMap![selectedRegion]! + .hmgDoctorList![selectedHospitalIndex] + .hospitalList + .first + : widget + .patientDoctorAppointmentListHospital + .registeredDoctorMap![selectedRegion]! + .hmcDoctorList![selectedHospitalIndex] + .hospitalList + .first; + _currentIndex = 3; + changePageViewIndex(3); + }); + }) + : SizedBox.shrink(), + (selectedHospital != null && + selectedRegion != '' && + selectedHospitalIndex != -1) + ? ResultByClinic( + onClinicSelected: (doctorList, clinicId) { + setState(() { + this.nearestAppointment = false; + this.doctorList = doctorList; + _currentIndex = 4; + changePageViewIndex(4); + if(clinicId != null) + this.clinicId = clinicId; + }); + }, + selectedValue: selectedHospital) + : SizedBox.shrink(), + (selectedRegion != '' && + selectedHospitalIndex != -1 && + doctorList != null) + ? ResultByDoctor( + doctorsList: widget.doctorsList, + patientDoctorAppointmentListHospital: + (!isHMCSelected) + ? doctorList! + .registeredDoctorMap![ + selectedRegion]! + .hmgDoctorList! + .first + .patientDoctorAppointmentList ?? + [] + : doctorList! + .registeredDoctorMap?[ + selectedRegion] + ?.hmcDoctorList! + .first + .patientDoctorAppointmentList ?? + [], + isLiveCareAppointment: + widget.isLiveCareAppointment, + isDoctorSearchResult: widget.isDoctorSearchResult, + isObGyneAppointment: widget.isObGyneAppointment, + isDoctorNameSearch: widget.isDoctorNameSearch, + showNearestAppointment: clinicId != -1 , + nearestAppointmentDoctors: nearestAppointment, + refreshDoctorList: (isNearestAppointmentChecked){ + setState(() { + // changePageViewIndex(3); + // _currentIndex = 3; + nearestAppointment= false; + }); + callDoctorsSearchAPI(clinicId, isNearestAppointmentChecked); + }, + + ) + : SizedBox.shrink(), + ], + ), + ), + ]), + ) + : getNoDataWidget(context), + ); + } + + callDoctorsSearchAPI(int clinicID, bool nearestAppointment) { + var isArabic = context.read().isArabic; + int languageID = isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + List doctorsList = []; + List arr = []; + List arrDistance = []; + List result; + int numAll; + List _patientDoctorAppointmentListHospital = []; + + DoctorsListService service = new DoctorsListService(); + service + .getDoctorsList(clinicID, selectedHospital?.mainProjectID.toString() != "" ? int.parse(selectedHospital?.mainProjectID.toString() ?? "-1") : 0, nearestAppointment, languageID, null) + .then((res) async { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + RegionList regionHospitalList = RegionList(); + + if (res['DoctorList'].length != 0) { + res['DoctorList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson( + v, + )); + }); + + regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, isArabic: isArabic); + var lat = await sharedPref.getDouble(USER_LAT); + + var lng = await sharedPref.getDouble(USER_LONG); + var isLocationEnabled = (lat != null && lat != 0.0) && (lng != null && lng != 0.0); + regionHospitalList = await DoctorMapper.sortList(isLocationEnabled, regionHospitalList); + + setState(() { + this.doctorList = regionHospitalList; + _currentIndex = 4; + changePageViewIndex(4); + this.nearestAppointment = nearestAppointment; + }); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['ErrorSearchMsg']); + } + + GifLoaderDialogUtils.hideDialog(context); + // navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err, localContext: context); + }); + } + String getTitle() { + switch (_currentIndex) { + case 0: + return TranslationBase.of(context).selectRegion; + case 1: + return TranslationBase.of(context).selectFacitlity; + case 2: + return TranslationBase.of(context).selectBranch; + case 3: + return TranslationBase.of(context).selectClinic; + case 4: + return TranslationBase.of(context).selectDoctor; + } + return ""; + } + + Widget showProgress( + {String? title, + String? status, + Color? color, + bool isNeedBorder = true, + Function()? onTap}) { + return InkWell( + onTap: () { + if (status == TranslationBase.of(context).completed) { + onTap?.call(); + } + }, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 26, + height: 26, + decoration: containerRadius(color!, 200), + child: Icon( + Icons.done, + color: Colors.white, + size: 16, + ), + ), + if (isNeedBorder) + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: mDivider(Colors.grey), + )), + ], + ), + mHeight(8), + Text( + title!, + style: TextStyle( + fontSize: 10, + fontWeight: FontWeight.w500, + letterSpacing: -0.44, + ), + ), + mHeight(2), + Container( + padding: EdgeInsets.all(5), + decoration: containerRadius(color!.withOpacity(0.2), 4), + child: Text( + status!, + style: TextStyle( + fontSize: 8, + fontWeight: FontWeight.w600, + letterSpacing: -0.32, + color: color, + ), + ), + ), + ], + ) + ], + ), + ); + } +} + +class HospitalBodyWidget extends StatelessWidget { + final List? + patientDoctorAppointmentListHospital; + final bool isLiveCareAppointment; + final bool isObGyneAppointment; + final bool isDoctorNameSearch; + final bool isDoctorSearchResult; + final OBGyneProcedureListResponse? obGyneProcedureListResponse; + + const HospitalBodyWidget({ + super.key, + this.patientDoctorAppointmentListHospital, + required this.isLiveCareAppointment, + required this.isObGyneAppointment, + required this.isDoctorNameSearch, + required this.isDoctorSearchResult, + this.obGyneProcedureListResponse, + }); + + @override + Widget build(BuildContext context) { + return ListView.separated( + addAutomaticKeepAlives: true, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemCount: patientDoctorAppointmentListHospital?.length ?? 0, + separatorBuilder: (context, index) { + return Container( + height: 12, + margin: EdgeInsets.only(left: 21, right: 21), + ); + }, + itemBuilder: (context, index) { + return AppExpandableNotifier( + applyBackgroundColor: false, + widgetColor: CustomColors.appBackgroudGrey2Color, + title: (patientDoctorAppointmentListHospital?[index].distanceInKMs != + "0") + ? patientDoctorAppointmentListHospital![index].filterName! + + " - " + + patientDoctorAppointmentListHospital![index].distanceInKMs! + + " " + + TranslationBase.of(context).km + : patientDoctorAppointmentListHospital![index].filterName, + projectTitleTop: + patientDoctorAppointmentListHospital![index].projectTopName, + projectTitleBottom: (patientDoctorAppointmentListHospital![index] + .distanceInKMs != + "0") + ? patientDoctorAppointmentListHospital![index] + .projectBottomName + .toString() + + " - " + + patientDoctorAppointmentListHospital![index].distanceInKMs! + + " " + + TranslationBase.of(context).km + : patientDoctorAppointmentListHospital![index] + .projectBottomName + .toString(), + isTitleSingleLine: false, + isDoctorSearchResult: isDoctorSearchResult, + isExpand: + patientDoctorAppointmentListHospital?.length == 1 ? true : false, + bodyWidget: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + padding: + EdgeInsets.only(bottom: 10, top: 10, left: 21, right: 21), + itemBuilder: (context, _index) { + // print("the index of patientDoctorAppointmentList is ${_index}"); + // print("the index of parent is ${index}"); + final doctor = patientDoctorAppointmentListHospital![index] + .patientDoctorAppointmentList![_index]; + // print('the doctor is ${doctor.toJson()}'); + return DoctorView( + doctor: doctor, + isLiveCareAppointment: isLiveCareAppointment, + isObGyneAppointment: isObGyneAppointment, + isDoctorNameSearch: isDoctorNameSearch, + obGyneProcedureListResponse: obGyneProcedureListResponse, + isShowDate: false, + onTap: () { + context + .read() + .analytics + .appointment + .book_appointment_select_doctor( + appointment_type: 'regular', doctor: doctor); + }); + }, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemCount: patientDoctorAppointmentListHospital?[index] + .patientDoctorAppointmentList + ?.length ?? + 0), + ); + }, + ); + } +} + +class RegionTitle extends StatelessWidget { + final String title; + final String hmcCount; + final String hmgCount; + + const RegionTitle( + {super.key, + required this.title, + required this.hmcCount, + required this.hmgCount}); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: TextStyle( + fontSize: 22, color: Colors.black, fontWeight: FontWeight.w700), + ), + SizedBox( + height: 8, + ), + Row( + children: [ + Text( + "${TranslationBase.of(context).HospitalString(num.parse(hmgCount)).replaceAll("@", hmgCount)} ,", + style: TextStyle( + fontSize: 14, + color: Color(0xFFD02127), + fontWeight: FontWeight.w600), + ), + SizedBox( + width: 8, + ), + Text( + "${TranslationBase.of(context).MedicalCenterString(num.parse(hmcCount)).replaceAll("@", hmcCount)}", + style: TextStyle( + fontSize: 14, + color: Color(0xFF40ACC9), + fontWeight: FontWeight.w600), + ), + ], + ), + ], + ), + ); + } +} + +class HospitalTitle extends StatelessWidget { + final String title; + final String iconUrl; + final bool isHMC; + final String itemCount; + + const HospitalTitle( + {super.key, + required this.title, + required this.iconUrl, + required this.isHMC, + required this.itemCount}); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + SvgPicture.asset(iconUrl), + SizedBox( + width: 8, + ), + Text( + title, + style: TextStyle( + fontSize: 18, + color: isHMC ? Color(0xFF40ACC9) : Color(0xFFD02127), + fontWeight: FontWeight.w600), + ), + ], + ), + SizedBox( + height: 6, + ), + Text( + isHMC + ? "${TranslationBase.of(context).MedicalCenterString(num.parse(itemCount)).replaceAll("@", itemCount)}" + : "${TranslationBase.of(context).HospitalString(num.parse(itemCount)).replaceAll("@", itemCount)}", + style: TextStyle( + fontSize: 12, color: Colors.black, fontWeight: FontWeight.w600), + ), + ], + ), + ); + } +} + +///todo the current content of the application +/// return AppExpandableNotifier( +// paddingValue: 10, +// applyBackgroundToOnlyHeader: true, +// completeHeaderColor: CustomColors.appBackgroudGrey2Color, +// headerWidget: RegionTitle( +// title: key, +// hmcCount: +// "${widget.patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmcSize ?? 0}", +// hmgCount: +// "${widget.patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmgSize ?? 0}", +// ), +// showDropDownIconWithCustomHeader: true, +// isTitleSingleLine: false, +// isDoctorSearchResult: widget.isDoctorSearchResult, +// widgetColor: Color(0xFFF8F8F8), +// bodyWidget: Column( +// children: [ +// Padding( +// padding: const EdgeInsets.all(8.0), +// child: AppExpandableNotifier( +// paddingValue: 8, +// applyBackgroundColor: false, +// applyBackgroundToOnlyHeader: true, +// completeHeaderColor: Colors.white, +// headerRadius: BorderRadius.circular(16), +// headerWidget: HospitalTitle( +// iconUrl: 'assets/images/svg/HMG.svg', +// title: TranslationBase.of(context).hmgHospital, +// isHMC: false, +// itemCount: +// "${widget.patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmgSize ?? 0}", +// ), +// showDropDownIconWithCustomHeader: true, +// bodyWidget: HospitalBodyWidget( +// patientDoctorAppointmentListHospital: +// widget.patientDoctorAppointmentListHospital +// .registeredDoctorMap?[key]?.hmgDoctorList, +// isLiveCareAppointment: widget.isLiveCareAppointment, +// isObGyneAppointment: widget.isObGyneAppointment, +// isDoctorNameSearch: widget.isDoctorNameSearch, +// isDoctorSearchResult: widget.isDoctorSearchResult, +// ), +// ), +// ), +// Padding( +// padding: const EdgeInsets.only( +// bottom: 8.0, left: 8, right: 8), +// child: AppExpandableNotifier( +// paddingValue: 8, +// applyBackgroundColor: false, +// applyBackgroundToOnlyHeader: true, +// completeHeaderColor: Colors.white, +// headerRadius: BorderRadius.circular(16), +// headerWidget: HospitalTitle( +// iconUrl: 'assets/images/svg/HMC.svg', +// title: TranslationBase.of(context).hmcHospital, +// isHMC: true, +// itemCount: +// "${widget.patientDoctorAppointmentListHospital.registeredDoctorMap?[key]?.hmcSize ?? 0}", +// ), +// showDropDownIconWithCustomHeader: true, +// bodyWidget: HospitalBodyWidget( +// patientDoctorAppointmentListHospital: +// widget.patientDoctorAppointmentListHospital +// .registeredDoctorMap?[key]?.hmcDoctorList, +// isLiveCareAppointment: widget.isLiveCareAppointment, +// isObGyneAppointment: widget.isObGyneAppointment, +// isDoctorNameSearch: widget.isDoctorNameSearch, +// isDoctorSearchResult: widget.isDoctorSearchResult, +// ), +// ), +// ), +// ], +// )); diff --git a/lib/pages/BookAppointment/waiting_appointment/waiting_appointment_info.dart b/lib/pages/BookAppointment/waiting_appointment/waiting_appointment_info.dart new file mode 100644 index 00000000..f1f8d934 --- /dev/null +++ b/lib/pages/BookAppointment/waiting_appointment/waiting_appointment_info.dart @@ -0,0 +1,113 @@ +import 'package:diplomaticquarterapp/pages/BookAppointment/waiting_appointment/waiting_appointment_verification.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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:flutter_svg/flutter_svg.dart'; + +class WaitingAppointmentInfo extends StatelessWidget { + const WaitingAppointmentInfo({super.key}); + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).waitingAppointment, + isShowAppBar: true, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context).size.width, + decoration: containerRadius(Colors.white, 10), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SvgPicture.asset( + "assets/images/new/waitingAppo.svg", + width: 52.0, + height: 52.0, + ), + mHeight(11), + Text( + TranslationBase.of(context).whatWaitingAppointment, + maxLines: 1, + style: TextStyle(fontSize: 17, fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(11), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Text( + TranslationBase.of(context).waitingAppointmentText1, + style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.04, height: 35 / 24, overflow: TextOverflow.clip), + ), + ), + mHeight(18), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Text( + TranslationBase.of(context).waitingAppointmentText2, + style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.04, height: 35 / 24, overflow: TextOverflow.clip), + ), + ), + mHeight(24), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Icon( + Icons.warning, + size: 20, + color: Color(0xffA78618), + ), + mWidth(10), + Container( + width: MediaQuery.of(context).size.width * 0.7, + child: Text( + TranslationBase.of(context).waitingAppointmentText3, + style: TextStyle( + fontSize: 14, fontStyle: FontStyle.italic, fontWeight: FontWeight.w600, color: Color(0xffA78618), letterSpacing: -1.04, height: 35 / 24, overflow: TextOverflow.clip), + ), + ), + ], + ), + ], + ), + ), + ), + ], + ), + ), + ), + bottomSheet: Container( + height: 80, + color: CustomColors.white, + padding: EdgeInsets.fromLTRB(12.0, 12.0, 12.0, 25.0), + child: Container( + child: DefaultButton( + TranslationBase.of(context).continues, + () { + Navigator.push( + context, + FadePage( + page: WaitingAppointmentVerification(), + ), + ); + }, + color: CustomColors.accentColor, + ), + ), + ), + ); + } +} diff --git a/lib/pages/BookAppointment/waiting_appointment/waiting_appointment_verification.dart b/lib/pages/BookAppointment/waiting_appointment/waiting_appointment_verification.dart new file mode 100644 index 00000000..6853c6d9 --- /dev/null +++ b/lib/pages/BookAppointment/waiting_appointment/waiting_appointment_verification.dart @@ -0,0 +1,292 @@ +import 'package:barcode_scan2/barcode_scan2.dart'; +import 'package:diplomaticquarterapp/core/model/privilege/ProjectDetailListModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:intl/intl.dart'; +import 'package:provider/provider.dart'; + +import '../../../uitl/utils.dart'; + +class WaitingAppointmentVerification extends StatefulWidget { + const WaitingAppointmentVerification({super.key}); + + @override + State createState() => _WaitingAppointmentVerificationState(); +} + +class _WaitingAppointmentVerificationState extends State { + String selectedVerificationMethod = "QR"; + + late ProjectViewModel projectViewModel; + late LocationUtils locationUtils; + ProjectDetailListModel projectDetailListModel = ProjectDetailListModel(); + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).waitingAppointment, + isShowAppBar: true, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + mHeight(11), + Text( + TranslationBase.of(context).waitingAppointmentVerificationMethod, + maxLines: 1, + style: TextStyle(fontSize: 18, fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.04, height: 35 / 24), + ), + mHeight(12), + Container( + width: MediaQuery.of(context).size.width, + decoration: containerRadius(Colors.white, 10), + child: Padding( + padding: const EdgeInsets.fromLTRB(16.0, 0.0, 16.0, 0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InkWell( + onTap: () { + setState(() { + selectedVerificationMethod = "QR"; + }); + }, + child: Row( + children: [ + Container( + width: 20, + height: 20, + decoration: containerColorRadiusBorderWidth(selectedVerificationMethod == "QR" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5), + ), + mWidth(6), + Container( + height: 40.0, + width: 40.0, + padding: EdgeInsets.all(7.0), + child: SvgPicture.asset( + "assets/images/new/services/qr_code.svg", + ), + ), + Text( + TranslationBase.of(context).pharmaLiveCareScanQR, + style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, fontWeight: FontWeight.w600, letterSpacing: -1.04, height: 35 / 24, overflow: TextOverflow.clip), + ), + ], + ), + ), + Divider(), + InkWell( + onTap: () { + setState(() { + selectedVerificationMethod = "NFC"; + }); + }, + child: Row( + children: [ + Container( + width: 20, + height: 20, + decoration: containerColorRadiusBorderWidth(selectedVerificationMethod == "NFC" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5), + ), + mWidth(6), + Container( + height: 40.0, + width: 40.0, + padding: EdgeInsets.all(7.0), + child: SvgPicture.asset( + "assets/images/new/services/contactless.svg", + ), + ), + Text( + TranslationBase.of(context).scanNFC, + style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, fontWeight: FontWeight.w600, letterSpacing: -1.04, height: 35 / 24, overflow: TextOverflow.clip), + ), + ], + ), + ), + Divider(), + InkWell( + onTap: () { + setState(() { + selectedVerificationMethod = "Location"; + }); + }, + child: Row( + children: [ + Container( + width: 20, + height: 20, + decoration: containerColorRadiusBorderWidth(selectedVerificationMethod == "Location" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5), + ), + mWidth(6), + Container( + height: 40.0, + width: 40.0, + padding: EdgeInsets.all(7.0), + child: SvgPicture.asset( + "assets/images/new/services/location.svg", + ), + ), + Text( + TranslationBase.of(context).checkInViaLocation, + style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, fontWeight: FontWeight.w600, letterSpacing: -1.04, height: 35 / 24, overflow: TextOverflow.clip), + ), + ], + ), + ), + mHeight(6), + ], + ), + ), + ), + mHeight(12), + Container( + width: MediaQuery.of(context).size.width, + decoration: containerRadius(Colors.white, 10), + child: Padding( + padding: const EdgeInsets.fromLTRB(16.0, 0.0, 16.0, 0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + mHeight(12), + Text( + TranslationBase.of(context).howToUseVerificationMethod, + maxLines: 1, + style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -1.04, height: 35 / 24), + ), + mHeight(12), + Image.asset( + 'assets/images/new/NFCCheckIn_QR_gps_HMG.png', + fit: BoxFit.fitWidth, + width: MediaQuery.of(context).size.width, + ), + mHeight(12), + ], + ), + ), + ), + ], + ), + ), + ), + bottomSheet: Container( + height: 80, + color: CustomColors.white, + padding: EdgeInsets.fromLTRB(12.0, 12.0, 12.0, 25.0), + child: Container( + child: DefaultButton( + TranslationBase.of(context).continues, + () { + startVerification(); + }, + color: CustomColors.accentColor, + ), + ), + ), + ); + } + + startVerification() { + switch (selectedVerificationMethod) { + case "QR": + startQRCodeScan(); + break; + case "NFC": + startNFCScan(); + break; + case "Location": + startLocationCheckIn(); + break; + } + } + + checkScannedNFCAndQRCode(String nfcId) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.checkScannedNFCAndQRCode(nfcId, projectViewModel.waitingAppointmentDoctor!.projectID!).then((res) { + GifLoaderDialogUtils.hideDialog(context); + projectViewModel.setWaitingAppointmentNFCCode(nfcId); + if (res["returnValue"] == 1) { + navigateToBookConfirm(context); + } else { + AppToast.showErrorToast(message: "Invalid verification point scanned."); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + Future navigateToBookConfirm(context) async { + final DateFormat formatter = DateFormat('yyyy-MM-dd'); + Navigator.push( + context, + FadePage( + page: BookConfirm( + doctor: projectViewModel.waitingAppointmentDoctor!, + isLiveCareAppointment: false, + selectedDate: formatter.format(DateTime.now()), + selectedTime: TranslationBase.of(context).waitingAppointment, + initialSlotDuration: 15, + isWalkinAppointment: true, + ), + ), + ); + } + + startLocationCheckIn() async { + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + locationUtils.getCurrentLocation(callBack: (value) { + projectDetailListModel = Utils.getProjectDetailObj(projectViewModel, projectViewModel.waitingAppointmentProjectID); + double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000; + projectViewModel.setWaitingAppointmentNFCCode(projectDetailListModel.checkInQrCode!); + print(dist); + if (dist <= projectDetailListModel.geofenceRadius!) { + navigateToBookConfirm(context); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError); + } + }); + } + + startNFCScan() { + Future.delayed(const Duration(milliseconds: 500), () { + showNfcReader(context, onNcfScan: (String nfcId) { + Future.delayed(const Duration(milliseconds: 100), () { + checkScannedNFCAndQRCode(nfcId); + }); + }, onCancel: () { + // Navigator.of(context).pop(); + // locator().todoList.to_do_list_nfc_cancel(widget.appointment!); + }); + }); + } + + startQRCodeScan() async { + String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent)); + if (onlineCheckInQRCode != "") { + checkScannedNFCAndQRCode(onlineCheckInQRCode); + } else {} + } +} diff --git a/lib/pages/BookAppointment/widgets/BranchView.dart b/lib/pages/BookAppointment/widgets/BranchView.dart new file mode 100644 index 00000000..3312b337 --- /dev/null +++ b/lib/pages/BookAppointment/widgets/BranchView.dart @@ -0,0 +1,215 @@ +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; + +import 'DoctorView.dart'; + +class BranchView extends StatefulWidget { + final List doctorsList; + + final List result; + final List resultDistance; + final int num; + + const BranchView( + {Key? key, required this.doctorsList, required this.result, required this.resultDistance, required this.num}) + : super(key: key); + + @override + _BranchViewState createState() => _BranchViewState(); +} + +class _BranchViewState extends State { + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).bookAppo, + isShowAppBar: true, + isShowDecPage: false, + isBottomBar: false, + body: new ListView.builder( + itemBuilder: (BuildContext context, int index) { + return new ExpandableListView( + isExpanded: index == 0 ? true : false, + result2: widget.result, + resultDistance: widget.resultDistance, + val: index, + doctorsList2: widget.doctorsList); + }, + itemCount: widget.num, //5, + ), + ); + } +} + +class ExpandableListView extends StatefulWidget { + final List? result2; + final List? resultDistance; + final List? doctorsList2; + final val; + static int doctorListheight = 0; + final bool? isExpanded; + const ExpandableListView( + {Key? key, + this.result2, + this.resultDistance, + this.val, + this.doctorsList2, + this.isExpanded}) + : super(key: key); + + @override + _ExpandableListViewState createState() => new _ExpandableListViewState(); +} + +class _ExpandableListViewState extends State { + bool expandFlag = false; + @override + void initState() { + setState(() { + expandFlag = widget.isExpanded!; + setDoctorViewHeight(widget.result2![widget.val].toString()); + }); + super.initState(); + } + @override + Widget build(BuildContext context) { + + return new Container( + width: MediaQuery.of(context).size.width * 0.6, + margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 0.0), + child: Card( + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + ), + child: Container( + decoration: BoxDecoration(), + padding: EdgeInsets.all(5.0), + width: MediaQuery.of(context).size.width, + child: new Column( + children: [ + new Container( + margin: EdgeInsets.only(left: 5.0, right: 5.0), + color: Colors.white, + child: new Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + new Text( + widget.result2![widget.val].toString() + + " " + + getProjectDistance( + widget.resultDistance![widget.val].toString()), + style: new TextStyle( + fontWeight: FontWeight.bold, color: Colors.black), + ), + new IconButton( + icon: new Container( + height: 28.0, + width: 30.0, + decoration: new BoxDecoration( + color: Color(0xFF40ACC9), + shape: BoxShape.circle, + ), + child: new Center( + child: new Icon( + expandFlag + ? Icons.keyboard_arrow_up + : Icons.keyboard_arrow_down, + color: Colors.white, + size: 30.0, + ), + ), + ), + onPressed: () { + setState(() { + expandFlag = !expandFlag; + if (expandFlag == true) { + setDoctorViewHeight( + widget.result2![widget.val].toString()); + } + }); + }), + ], + ), + ), + // SizedBox(height: 15), + new ExpandableContainer( + expanded: expandFlag, + child: ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + padding: EdgeInsets.all(0.0), + itemCount: widget.doctorsList2!.length, + itemBuilder: (context, index) { + return widget.result2![widget.val].toString() == + widget.doctorsList2![index].projectName.toString() + ? DoctorView( + //AJ note + doctor: widget.doctorsList2![index], + isLiveCareAppointment: false, + // widget.doctorsList2[index] + ) + : Container(); + }, + ), + ) + ], + ), + ), + ), + ); + } + + setDoctorViewHeight(name) { + ExpandableListView.doctorListheight = + widget.doctorsList2!.where((e) => e.projectName == name).toList().length; + } + + String getProjectDistance(String distance) { + if (distance != "0") + return " - " + distance + " " + TranslationBase.of(context).km; + else { + return ""; + } + } + + sortByProject() {} + sortByClinic() {} +} + +class ExpandableContainer extends StatelessWidget { + final bool expanded; + final double collapsedHeight; + final double expandedHeight; + final Widget child; + + ExpandableContainer({ + required this.child, + this.collapsedHeight = 0.0, + this.expandedHeight = 300.0, + this.expanded = true, + }); + + @override + Widget build(BuildContext context) { + double screenWidth = MediaQuery.of(context).size.width; + return new AnimatedContainer( + duration: new Duration(milliseconds: 500), + curve: Curves.easeInOut, + width: screenWidth, + height: expanded + ? (ExpandableListView.doctorListheight * 160).toDouble() + : collapsedHeight, + child: new Container( + child: child, + padding: EdgeInsets.only(bottom: 30), + decoration: new BoxDecoration( + border: new Border.all(width: 1.0, color: Colors.white)), + ), + ); + } +} diff --git a/lib/pages/BookAppointment/widgets/CardBottom.dart b/lib/pages/BookAppointment/widgets/CardBottom.dart new file mode 100644 index 00000000..a50faf82 --- /dev/null +++ b/lib/pages/BookAppointment/widgets/CardBottom.dart @@ -0,0 +1,75 @@ +import 'package:flutter/material.dart'; + +class CardBottom extends StatelessWidget { + final backgroundImage; + final text; + final subtext; + + const CardBottom( + {@required this.backgroundImage, + @required this.text, + @required this.subtext}); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () {}, + child: Container( + height: 110, + margin: EdgeInsets.all(4.0), + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.grey[300]!, + blurRadius: 3.0, + spreadRadius: 0.0, +// offset: Offset(2.0), // shadow direction: bottom right + ) + ], + image: DecorationImage( + image: AssetImage(this.backgroundImage), fit: BoxFit.fill), + borderRadius: BorderRadius.circular(5)), + child: Column( + children: [ + Container( + margin: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 5.0), + child: null, + ), + Container( + width: MediaQuery.of(context).size.width * 0.48, + padding: EdgeInsets.fromLTRB(12.0, 0.0, 0.0, 0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(this.text, + textAlign: TextAlign.start, + overflow: TextOverflow.clip, + style: TextStyle( + color: Colors.white, + fontSize: 16.0, + fontWeight: FontWeight.bold)), + Container( + padding: EdgeInsets.fromLTRB(0.0, 5.0, 0.0, 0.0), + child: Text(this.subtext, + textAlign: TextAlign.start, + overflow: TextOverflow.clip, + style: TextStyle(color: Colors.white, fontSize: 12.0)), + ), + Container( + padding: EdgeInsets.fromLTRB(0.0, 25.0, 0.0, 0.0), + child: Text("View All", + overflow: TextOverflow.clip, + style: TextStyle( + color: Colors.white, + fontSize: 16.0, + fontWeight: FontWeight.bold)), + ), + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/BookAppointment/widgets/CardCommon.dart b/lib/pages/BookAppointment/widgets/CardCommon.dart new file mode 100644 index 00000000..f871a7d6 --- /dev/null +++ b/lib/pages/BookAppointment/widgets/CardCommon.dart @@ -0,0 +1,68 @@ +import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; + +import '../../../Constants.dart'; + +class CardCommon extends StatelessWidget { + final image; + final text; + final subText; + final type; + + const CardCommon( + {required this.image, + required this.text, + required this.subText, + required this.type}); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () { + navigateToSearch(context, this.type); + }, + child: Container( + margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0), + decoration: BoxDecoration(boxShadow: [ + BoxShadow(color: Colors.grey[400]!, blurRadius: 2.0, spreadRadius: 0.0) + ], borderRadius: BorderRadius.circular(10), color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), + child: Text(this.text, + overflow: TextOverflow.clip, + style: TextStyle( + color: secondaryColor, + letterSpacing: 1.0, + fontSize: 20.0)), + ), + Container( + margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0), + child: Text(this.subText, + overflow: TextOverflow.clip, + style: TextStyle( + color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)), + ), + Container( + alignment: Alignment.bottomRight, + margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0), + child: Image.asset(this.image, width: 60.0, height: 60.0), + ), + ], + ), + ), + ); + } + + Future navigateToSearch(context, type) async { + Navigator.push( + context, + FadePage( + page: Search( + type: type, + ))); + } +} diff --git a/lib/pages/BookAppointment/widgets/CardHome.dart b/lib/pages/BookAppointment/widgets/CardHome.dart new file mode 100644 index 00000000..5ee62977 --- /dev/null +++ b/lib/pages/BookAppointment/widgets/CardHome.dart @@ -0,0 +1,55 @@ +import 'package:flutter/material.dart'; + +class CardHome extends StatelessWidget { + final image; + final backgroundImage; + final text; + final textColor; + + const CardHome( + {required this.image, + required this.backgroundImage, + required this.text, + required this.textColor}); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () {}, + child: Container( + height: 140.0, + margin: EdgeInsets.fromLTRB(9.0, 9.0, 8.0, 9.0), + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.grey[400]!, + blurRadius: 2.0, + spreadRadius: 0.0 + ) + ], + image: DecorationImage( + image: AssetImage(this.backgroundImage), fit: BoxFit.fill), + borderRadius: BorderRadius.circular(5)), + child: Column( + children: [ + Container( + margin: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 5.0), + child: Image.asset(this.image, width: 60.0, height: 60.0), + ), + Container( + width: MediaQuery.of(context).size.width * 0.29, + padding: EdgeInsets.all(5.0), + child: Text(this.text, + textAlign: TextAlign.center, + overflow: TextOverflow.clip, + style: TextStyle( + color: this.textColor, + fontSize: 15.0, + fontWeight: FontWeight.w500)), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart b/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart new file mode 100644 index 00000000..bfd0c60c --- /dev/null +++ b/lib/pages/BookAppointment/widgets/DentalComplaintCard.dart @@ -0,0 +1,161 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/doctor_response_mapper.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +// ignore: must_be_immutable +class DentalComplaintCard extends StatefulWidget { + final ListDentalChiefComplain listDentalChiefComplain; + late Function logAnalytics; + var languageID; + Function? onSelectedMethod; + bool isDoctorNameSearch; + bool isFromHospitalSearchPage; + Function(RegionList)? onDoctorFetched; + + DentalComplaintCard({required this.listDentalChiefComplain, + this.languageID, + this.onSelectedMethod, + this.isDoctorNameSearch = false, + this.isFromHospitalSearchPage = false, + this.onDoctorFetched}); + + @override + _DentalComplaintCardState createState() => _DentalComplaintCardState(); +} + +class _DentalComplaintCardState extends State { + @override + Widget build(BuildContext context) { + return Container( + child: InkWell( + onTap: () { + if (widget.logAnalytics != null) widget.logAnalytics(); + // if(widget.isDoctorNameSearch) { + // widget.onSelectedMethod(); + // } else { + if (widget.isFromHospitalSearchPage) { + getChiefComplaintsDoctorMappedList(); + } else + getChiefComplaintsList(); + // } + }, + child: Container( + width: double.infinity, + padding: EdgeInsets.all(14.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Container( + child: Text( + widget.listDentalChiefComplain!.name!, + style: TextStyle( + fontSize: 16.0, + color: Colors.black, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + ), + ], + ), + ), + ), + ); + } + + getChiefComplaintsList() { + int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2; + List doctorsList = []; + List _patientDoctorAppointmentListHospital = []; + + GifLoaderDialogUtils.showMyDialog(context); + ClinicListService service = new ClinicListService(); + service.getChiefComplaintDoctorList(widget.listDentalChiefComplain!.iD!, widget.listDentalChiefComplain.projectID!, languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + print(res['List_DentalDoctorChiefComplaintMapping']); + setState(() { + doctorsList.clear(); + res['List_DentalDoctorChiefComplaintMapping'].forEach((v) { + doctorsList.add(new DoctorList.fromJson(v)); + }); + + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientDoctorAppointmentListHospital.add(PatientDoctorAppointmentList( + filterName: element.projectName, + distanceInKMs: element.projectDistanceInKiloMeters.toString(), + projectTopName: element.projectTopName, + projectBottomName: element.projectBottomName, + patientDoctorAppointment: element)); + } + }); + navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); + }); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + Future navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) async { + Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isLiveCareAppointment: false, isDoctorSearchResult: true,))); + } + + void getChiefComplaintsDoctorMappedList() { + var isArabic = context.read().isArabic; + int languageID = + Provider.of(context, listen: false).isArabic ? 1 : 2; + List doctorsList = []; + List _patientDoctorAppointmentListHospital = + []; + + GifLoaderDialogUtils.showMyDialog(context); + ClinicListService service = new ClinicListService(); + service + .getChiefComplaintDoctorList(widget.listDentalChiefComplain!.iD!, + widget.listDentalChiefComplain.projectID!, languageID, context) + .then((res) async { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + RegionList regionHospitalList = RegionList(); + print(res['List_DentalDoctorChiefComplaintMapping']); + setState(() async { + doctorsList.clear(); + res['List_DentalDoctorChiefComplaintMapping'].forEach((v) { + doctorsList.add(new DoctorList.fromJson(v)); + }); + + regionHospitalList = await DoctorMapper.getMappedDoctor(doctorsList, + isArabic: isArabic); + widget.onDoctorFetched?.call(regionHospitalList); + }); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} diff --git a/lib/pages/BookAppointment/widgets/DoctorView.dart b/lib/pages/BookAppointment/widgets/DoctorView.dart new file mode 100644 index 00000000..5e5d2775 --- /dev/null +++ b/lib/pages/BookAppointment/widgets/DoctorView.dart @@ -0,0 +1,316 @@ +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; +import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart'; +import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/ObGyne/ObGyne-TimeSlots.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; +import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:provider/provider.dart'; + +import '../DoctorProfile.dart'; + +class DoctorView extends StatefulWidget { + final DoctorList doctor; + bool? isLiveCareAppointment; + bool isObGyneAppointment; + bool isShowFlag; + bool isDoctorNameSearch; + bool isContinueDentalPlan; + OBGyneProcedureListResponse? obGyneProcedureListResponse; + final VoidCallback? onTap; + bool isShowDate; + + DoctorView( + {required this.doctor, + this.isLiveCareAppointment, + this.isObGyneAppointment = false, + this.isDoctorNameSearch = false, + this.isContinueDentalPlan = false, + this.isShowFlag = true, + this.isShowDate = true, + this.onTap, + this.obGyneProcedureListResponse}); + + @override + State createState() => _DoctorViewState(); +} + +class _DoctorViewState extends State { + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return InkWell( + onTap: () { + if (widget.isObGyneAppointment) { + next(context); + } else { + // if (doctor.clinicID == 17 && isDoctorNameSearch) { + // showDentalChiefComplaintsList(context); + // } else + if (widget.isShowFlag) { + getDoctorsProfile(context, widget.doctor, isAppo: true, isContinueDentalPlan: widget.isContinueDentalPlan); + } + (widget.onTap ?? () {})(); // For log analytics of doctor click from book appointment + } + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 5, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Padding( + padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Expanded( + child: Text( + widget.doctor.name ?? "", + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + ), + // widget.isShowDate + // ? Text( + // DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.doctor.date)), + // style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), + // ) + // : Container(), + ], + ), + if (widget.doctor.doctorTitle != null) SizedBox(height: 6), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + LargeAvatar( + name: widget.doctor.name ?? "", + url: widget.doctor.doctorImageURL!, + width: 48, + height: 48, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + if (widget.doctor.clinicName != null) MyRichText(TranslationBase.of(context).clinic + ":", widget.doctor.clinicName!, context.read().isArabic), + if (widget.doctor.projectName != null) MyRichText(TranslationBase.of(context).branch, widget.doctor.projectName!, context.read().isArabic), + if (!projectViewModel.isArabic) + if (widget.doctor.speciality != null && widget.doctor.speciality!.length > 0) + Text( + this.widget.doctor.speciality![0].trim(), + // getDoctorSpeciality(this.doctor.speciality).trim(), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12), + ), + if (projectViewModel.isArabic) + if (widget.doctor.specialityN != null && widget.doctor.specialityN!.length > 0) + Text( + this.widget.doctor.specialityN![0].trim(), + // getDoctorSpeciality(this.doctor.speciality).trim(), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12), + ), + if (widget.doctor.nearestFreeSlot != null) + Text( + getDate(widget.doctor.nearestFreeSlot), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff359846), letterSpacing: -0.48, height: 18 / 12), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisSize: MainAxisSize.max, + children: [ + //changed By Aamir + RatingBar( + initialRating: 3, + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + ), + tapOnlyMode: true, + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + unratedColor: Colors.grey[500], + onRatingUpdate: (rating) { + print(rating); + }, + ), + // RatingBar.readOnly( + // initialRating: this.doctor.actualDoctorRate!.toDouble(), + // size: 16.0, + // filledColor: Color(0XFFD02127), + // emptyColor: Color(0XFFD02127), + // isHalfAllowed: true, + // halfFilledIcon: Icons.star_half, + // filledIcon: Icons.star, + // emptyIcon: Icons.star_border, + // ), + if (widget.isShowFlag) + Icon( + Icons.arrow_forward, + color: Theme.of(context).primaryColor, + ), + // if (isShowFlag) Image.network(this.doctor.nationalityFlagURL, width: 22.0, height: 22.0) + ], + ), + ], + ), + ), + ], + ), + ], + ), + ), + ), + ); + } + + showDentalChiefComplaintsList(BuildContext context) { + HospitalsModel selectedHospital = new HospitalsModel(); + selectedHospital.name = widget.doctor.projectName; + ListClinicCentralized selectedClinic = new ListClinicCentralized(); + selectedClinic.clinicDescription = widget.doctor.clinicName; + + SearchInfo searchInfo = new SearchInfo(); + searchInfo.ProjectID = widget.doctor.projectID; + searchInfo.ClinicID = widget.doctor.clinicID; + searchInfo.date = DateTime.now(); + searchInfo.hospital = selectedHospital; + searchInfo.clinic = selectedClinic; + + showDraggableDialog( + context, + DentalComplaints( + isDoctorNameSearch: true, + onSelectedMethod: () { + Navigator.pop(context); + }, + searchInfo: searchInfo)); + } + + String getDoctorSpeciality(List docSpecial) { + String docSpeciality = ""; + docSpecial.forEach((v) { + docSpeciality = docSpeciality + v + "\n"; + }); + return docSpeciality; + } + + getDoctorsProfile(context, DoctorList docObject, {isAppo, bool isContinueDentalPlan = false}) { + int languageID = projectViewModel.isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + List docProfileList = []; + DoctorsListService service = new DoctorsListService(); + service.getDoctorsProfile(docObject.doctorID!, docObject.clinicID!, docObject!.projectID!, languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + if (res['DoctorProfileList'].length != 0) { + res['DoctorProfileList'].forEach((v) { + docProfileList.add(new DoctorProfileList.fromJson(v)); + }); + } else {} + navigateToDoctorProfile(context, docObject, docProfileList[0], isAppo: isAppo, isContinueDentalPlan: isContinueDentalPlan); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err, localContext: context); + print(err); + }); + } + + String getDate(String date) { + DateTime dateObj = DateUtil.convertStringToDate(date); + return DateUtil.getWeekDay(dateObj.weekday) + + ", " + + dateObj.day.toString() + + " " + + DateUtil.getMonth(dateObj.month) + + " " + + dateObj.year.toString() + + " " + + dateObj.hour.toString() + + ":" + + getMinute(dateObj); + } + + String getMinute(DateTime dateObj) { + if (dateObj.minute == 0) { + return dateObj.minute.toString() + "0"; + } else { + return dateObj.minute.toString(); + } + } + + void next(BuildContext context) { + Navigator.push( + context, + FadePage( + page: ObGyneTimeSlots( + projectID: widget.doctor.projectID!, + selectedClinicID: widget.doctor.clinicID!, + selectedDoctorID: widget.doctor.doctorID!, + obGyneProcedureListResponse: widget.obGyneProcedureListResponse!))); + } + + Future navigateToDoctorProfile(context, docObject, docProfile, {isAppo, bool isContinueDentalPlan = false}) async { + Navigator.push( + context, + FadePage( + page: DoctorProfile( + doctor: docObject, + isLiveCareAppointment: widget.isLiveCareAppointment!, + docProfileList: docProfile, + isOpenAppt: isAppo, + isDoctorNameSearch: widget.isDoctorNameSearch, + isContinueDentalPlan: isContinueDentalPlan, + ), + ), + ); + } + + @override + // TODO: implement wantKeepAlive + bool get wantKeepAlive => true; +} diff --git a/lib/pages/BookAppointment/widgets/TopCard.dart b/lib/pages/BookAppointment/widgets/TopCard.dart new file mode 100644 index 00000000..5291e524 --- /dev/null +++ b/lib/pages/BookAppointment/widgets/TopCard.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class TopCard extends StatelessWidget { + TopCard({required this.image, required this.isSVG}); + + final String image; + final bool isSVG; + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () {}, + child: Card( + margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), + color: Colors.white.withOpacity(0.3), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + ), + child: Container( + height: 100.0, + padding: EdgeInsets.all(7.0), + width: MediaQuery.of(context).size.width * 0.45, + child: this.isSVG ? SvgPicture.asset(this.image) : Image.asset(this.image), + ), + ), + ); + } +} diff --git a/lib/pages/BookAppointment/widgets/reminder_dialog.dart b/lib/pages/BookAppointment/widgets/reminder_dialog.dart new file mode 100644 index 00000000..b3c39861 --- /dev/null +++ b/lib/pages/BookAppointment/widgets/reminder_dialog.dart @@ -0,0 +1,259 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:flutter/material.dart'; +import 'package:jiffy/jiffy.dart'; +import 'package:permission_handler/permission_handler.dart'; + +Future> requestPermissions() async { + var permissionResults = [Permission.calendarFullAccess].request(); + return permissionResults; +} + +showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted, + {required Function() onSuccess, String? title, String? description, Function(int)? onMultiDateSuccess, bool isMultiAllowed = false}) async { + if (Platform.isAndroid) { + if (await PermissionService.isCalendarPermissionEnabled()) { + _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, + onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess, isMultiAllowed: isMultiAllowed); + } else { + Utils.showPermissionConsentDialog(context, TranslationBase.of(context).calendarPermission, () async { + if (await Permission.calendarFullAccess.request().isGranted) { + _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, + onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess, isMultiAllowed: isMultiAllowed); + } + }); + } + } else { + if (await Permission.calendarWriteOnly.request().isGranted) { + if (await Permission.calendarFullAccess.request().isGranted) { + _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, + onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess, isMultiAllowed: isMultiAllowed); + } + } + } +} + +Future _showReminderDialog(BuildContext providedContext, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted, + {required Function onSuccess, String? title, String? description, Function(int)? onMultiDateSuccess, bool? isMultiAllowed}) async { + return showDialog( + context: providedContext, + barrierDismissible: true, // user must tap button! + builder: (BuildContext context) { + return Dialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(0.0)), + insetPadding: EdgeInsets.all(21), + child: ReminderDialog( + onClick: (int i) async { + String text = ""; + if (i == 0) { + // Before 30 mints + dateTime = Jiffy.parseFromDateTime(dateTime).subtract(minutes: 30).dateTime; + text = "30 minutes"; + // dateTime.add(new Duration(minutes: -30)); + } else if (i == 1) { + // Before 1 hour + // dateTime.add(new Duration(minutes: -60)); + dateTime = Jiffy.parseFromDateTime(dateTime).subtract(hours: 1).dateTime; + text = "1 hours"; + } else if (i == 2) { + // Before 1 hour and 30 mints + // dateTime.add(new Duration(minutes: -90)); + dateTime = Jiffy.parseFromDateTime(dateTime).subtract(hours: 1, minutes: 30).dateTime; + text = "1 hours 30 minutes"; + } else if (i == 3) { + // Before 2 hours + // dateTime.add(new Duration(minutes: -120)); + dateTime = Jiffy.parseFromDateTime(dateTime).subtract(hours: 2).dateTime; + text = "2 hours"; + } + if (!isMultiAllowed!) { + if (onMultiDateSuccess == null) { + CalendarUtils calendarUtils = await CalendarUtils.getInstance(); + await calendarUtils.createOrUpdateEvent( + title: title ?? TranslationBase.of(providedContext).reminderTitle + " " + doctorName, + description: description ?? "At " + appoDateFormatted + " " + appoTimeFormatted, + scheduleDateTime: dateTime, + eventId: eventId); + onSuccess(); + } + } else { + onMultiDateSuccess!(i); + } + locator().appointment.appointment_reminder_time(reminde_before: text); + }, + ), + ); + }, + ); +} + +class ReminderDialog extends StatefulWidget { + Function? onClick; + + ReminderDialog({this.onClick}); + + @override + _ReminderDialogState createState() => _ReminderDialogState(); +} + +class _ReminderDialogState extends State { + int i = 0; + + @override + Widget build(BuildContext context) { + return Container( + //width: MediaQuery.of(context).size.width / 0.8, + padding: const EdgeInsets.all(20.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Icon( + Icons.notifications_active, + color: Color(0xff2B353E), + size: 50, + ), + IconButton( + icon: Icon(Icons.clear), + color: Color(0xff2B353E), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ), + mHeight(20), + Text( + TranslationBase.of(context).appointmentReminder, + style: TextStyle( + fontSize: 16, + color: Color(0xff2B353E), + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ), + mHeight(20), + Text( + TranslationBase.of(context).pleaseSelectFromBelowOptions, + style: TextStyle( + fontSize: 12, + color: Color(0xff2B353E), + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ), + Row( + children: [ + Radio( + value: 0, + groupValue: i, + onChanged: (int? value) { + setState(() { + i = value!; + }); + }, + ), + Text( + TranslationBase.of(context).appoReminder30, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Radio( + value: 1, + groupValue: i, + onChanged: (int? value) { + setState(() { + i = value!; + }); + }, + ), + Text( + TranslationBase.of(context).appoReminder60, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Radio( + value: 2, + groupValue: i, + onChanged: (int? value) { + setState(() { + i = value!; + }); + }, + ), + Text( + TranslationBase.of(context).appoReminder90, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Radio( + value: 3, + groupValue: i, + onChanged: (int? value) { + setState(() { + i = value!; + }); + }, + ), + Text( + TranslationBase.of(context).appoReminder120, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ), + ], + ), + mHeight(12), + DefaultButton( + TranslationBase.of(context).save, + () { + widget.onClick!(i); + Navigator.pop(context); + }, + color: CustomColors.green, + ), + ], + ), + ); + } +} diff --git a/lib/pages/ChildVaccines/add_newchild_page.dart b/lib/pages/ChildVaccines/add_newchild_page.dart new file mode 100644 index 00000000..19ccae1e --- /dev/null +++ b/lib/pages/ChildVaccines/add_newchild_page.dart @@ -0,0 +1,387 @@ +import 'package:device_calendar/device_calendar.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/add_new_child_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/active_medications/DayCheckBoxDialog.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart'; + +enum Gender { Male, Female, NON } +enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } + +class AddNewChildPage extends StatefulWidget { + final int? frequency; + final int? days; + final String? itemDescription; + String? dateAdd; + + List _scheduleList =[]; + List daysOfWeek = [DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday, DayOfWeek.Saturday, DayOfWeek.Sunday]; + + DateTime? startDay; + DateTime? endDay; + + //AddNewChildPage({Key key, this.frequency, this.days, this.itemDescription}) : super(key: key); + AddNewChildPage({Key? key, this.frequency, this.days, this.itemDescription}) { + startDay = DateTime.now(); + endDay = DateTime.now(); //endDay = DateTime.now().add(Duration(days: days)); + int hour = 24; //(24 / frequency).round(); + int durations = 24 ~/ hour; + for (int count = 0; count < durations; count++) { + _scheduleList.add(DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day, (hour * count))); + } + } + + @override + _AddNewChildPageState createState() => _AddNewChildPageState(); +} + +class _AddNewChildPageState extends State { + late int tappedIndex; + int checkedValue =0; + + @override + void initState() { + super.initState(); + tappedIndex = -1; + } + + TextEditingController _firstTextController = TextEditingController(); + TextEditingController _secondTextController = TextEditingController(); + TextEditingController _notesTextController = TextEditingController(); + BeneficiaryType beneficiaryType = BeneficiaryType.NON; + Gender gender = Gender.Male; + CreateNewUser_New newUserChild = CreateNewUser_New(); + + //ChildVaccinesViewModel addvancedModel = ChildVaccinesViewModel(); + List_BabyInformationModel addvancedModel = List_BabyInformationModel(); + CreateNewBaby newChild = CreateNewBaby(); + List_UserInformationModel informationModel = List_UserInformationModel(); + + @override + Widget build(BuildContext context) { + return BaseView( + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).vaccination, + showNewAppBarTitle: true, + showNewAppBar: true, + body: Container( + child: Column( + children: [ + Expanded( + child: Padding( + padding: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).vaccinationAddChildMsg, + //+model.user.firstName, + style: TextStyle( + fontSize: 16, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + SizedBox( + height: 12, + ), + inputWidget(TranslationBase.of(context).firstName, "", _firstTextController), + SizedBox( + height: 12, + ), + inputWidget(TranslationBase.of(context).middleName, "", _secondTextController), + + SizedBox( + height: 12, + ), + Text( + TranslationBase.of(context).selectGender, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ), + Row( + children: [ + Expanded( + child: Row( + children: [ + Radio( + value: checkedValue, + groupValue: 1, + onChanged: (v) { + setState(() { + checkedValue = 1; + }); + }), + Text( + TranslationBase.of(context).male, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ) + ], + ), + ), + Expanded( + child: Row( + children: [ + Radio( + value: checkedValue, + groupValue: 2, + onChanged: (v) { + setState(() { + checkedValue = 2; + }); + }), + Text( + TranslationBase.of(context).female, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ) + ], + ), + ), + ], + ), + + //========== + SizedBox( + height: 6, + ), + + InkWell( + onTap: () { + DatePicker.showDatePicker( + context, + showTitleActions: true, + // minTime: DateTime( + // DateTime.now().year, DateTime.now().month - 1, 1), + minTime: DateTime(1, 1, 1), + maxTime: DateTime.now(), + onConfirm: (date) { + setState(() { + widget.startDay = date; + }); + }, + currentTime: widget.startDay, + // locale: projectViewModel.localeType + ); + }, + child: Container( + width: double.infinity, + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).dob, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + Text( + //getStartDay() + // DateUtil.yearMonthDay(DateTime.now()) + getStartDay(), + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + ), + ], + ), + Icon( + Icons.calendar_today, + color: Color(0xff575757), + size: 18, + ) + ], + ), + ), + ), + SizedBox( + height: 12, + ), + + //========= + ], + ), + ), + ), + Container( + width: double.infinity, + padding: EdgeInsets.all(16), + color: Colors.white, + child: DefaultButton( + TranslationBase.of(context).add, + () async { + newChild.babyName = _firstTextController.text + " " + _secondTextController.text; + newChild.gender = checkedValue.toString(); + newChild.strDOB = getStartDay(); + newChild.tempValue = true; + newChild.isLogin = true; + + await model.createNewBabyOrders(newChild: newChild); + if (model.isAdded) { + AppToast.showSuccessToast(message: TranslationBase.of(context).childAddedSuccessfully); + Navigator.pop(context, model.isAdded); + } else { + //TODO handling error + } + }, + ), + ), + ], + ), + ), + // bottomSheet: + ), + ); + } + + String getStartDay() { + return "${DateUtil.getMonth(widget.startDay!.month)} ${widget.startDay!.day}, ${widget.startDay!.year}"; + } + + String getEndDay() { + return "${DateUtil.getMonth(widget.endDay!.month)} ${widget.endDay!.day}, ${widget.endDay!.year}"; + } + + String getDateTime(DateTime dateTime) { + return '${dateTime.hour}:${dateTime.minute}'; + } + + String getDays() { + String days = ""; + widget.daysOfWeek.forEach((element) { + days += "${DateUtil.getDay(element)},"; + }); + return days; + } + + void confirmSelectDayDialog() { + showDialog( + context: context, + builder: (cxt) => DayCheckBoxDialog( + title: 'Select Day', + selectedDaysOfWeek: widget.daysOfWeek, + onValueSelected: (value) { + setState(() { + widget.daysOfWeek = value; + }); + }, + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, + {VoidCallback? suffixTap, bool isEnable = true, bool hasSelection = false, int? lines, bool isInputTypeNum = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: isInputTypeNum ? TextInputType.number : TextInputType.text, + controller: _controller, + maxLines: lines, + onChanged: (value) => {setState(() {})}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + suffixIconConstraints: BoxConstraints(minWidth: 50), + suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } +} diff --git a/lib/pages/ChildVaccines/child_page.dart b/lib/pages/ChildVaccines/child_page.dart new file mode 100644 index 00000000..a5b65067 --- /dev/null +++ b/lib/pages/ChildVaccines/child_page.dart @@ -0,0 +1,184 @@ +import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; +import 'package:diplomaticquarterapp/pages/ChildVaccines/add_newchild_page.dart'; +import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_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/cupertino.dart'; +import 'package:flutter/material.dart'; + +class ChildPage extends StatefulWidget { + @override + _ChildPageState createState() => _ChildPageState(); +} + +class _ChildPageState extends State with SingleTickerProviderStateMixin { + DeleteBaby deleteBaby = DeleteBaby(); + + @override + Widget build(BuildContext context) { + var size = MediaQuery.of(context).size; + final double height = (size.height - kToolbarHeight - 60); + final double itemWidth = size.width / 2; + final double itemHeight = height / 2 + 40; + + var checkedValue = true; + return BaseView( + onModelReady: (model) => model.getNewUserOrders(), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).vaccination, + baseViewModel: model, + body: Container( + height: height * 0.85, + child: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(left: 8, right: 8, top: 16), + child: GridView.count( + crossAxisCount: 2, + childAspectRatio: (itemWidth / (itemHeight + 0)), + crossAxisSpacing: 10, + mainAxisSpacing: 10, + controller: ScrollController(keepScrollOffset: true), + shrinkWrap: true, + padding: const EdgeInsets.all(4.0), + children: [ + ...List.generate( + model.babyInformationModelList.length, + (index) => InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: VaccinationTablePage(model.babyInformationModelList[index]), + ), + ); + }, + child: Container( + margin: EdgeInsets.only(left: 0, right: 0, bottom: 20), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + border: Border.all(color: Colors.white, width: 0.5), + borderRadius: BorderRadius.all(Radius.circular(5)), + color: Colors.white, + ), + padding: EdgeInsets.all(12), + //double.infinity, + child: Column( + children: [ + Row(children: [ + Texts(TranslationBase.of(context).childName), + ]), + Row(children: [ + Texts(model.babyInformationModelList[index].babyName!.trim()), + ]), + Row(children: [ + IconButton( + icon: Image.asset(model.babyInformationModelList[index].gender == 1 ? 'assets/images/new-design/male.png' : 'assets/images/new-design/female.png'), + tooltip: '', + onPressed: () { + setState(() { + // _volume += 10; + // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); + }); + }, + ), + Texts(model.babyInformationModelList[index].genderDescription), + IconButton( + icon: Icon( + Icons.remove_red_eye, + color: Colors.red, + ), + tooltip: '', + onPressed: () { + Navigator.push( + context, + FadePage( + page: VaccinationTablePage(model.babyInformationModelList[index]), + ), + ); + }, + ) + ]), + Row(children: [ + Texts(TranslationBase.of(context).dob), + ]), + Row(children: [ + IconButton( + icon: new Image.asset('assets/images/new-design/calender-secondary.png'), + tooltip: '', + onPressed: () { + setState(() {}); + }, + ), + Texts(DateUtil.yearMonthDay(model.babyInformationModelList[index].dOB!)), + ]), + Row(children: [ + IconButton( + icon: new Image.asset('assets/images/new-design/garbage.png'), + tooltip: '', + onPressed: () async { + //===================== + await model.deleteBabyOrders(newChild: deleteBaby); + + deleteBaby.babyID = model.babyInformationModelList[index].babyID; + + await model.deleteBabyOrders(newChild: deleteBaby); + if (model.isDeleted) { + AppToast.showSuccessToast(message: TranslationBase.of(context).recordDeleted); + Navigator.pop(context, model.isDeleted); + } else { + //TODO handling error + } + }, + ), + Texts(TranslationBase.of(context).deleteView), + ]), + SizedBox( + height: 12, + ), + ], + ), + ), + ), + ) + ], + ))), + ), + bottomSheet: Container( + height: height * 0.15, + width: double.infinity, + padding: EdgeInsets.all(16), + child: SecondaryButton( + textColor: Colors.white, + color: checkedValue == false + ? Colors.white24 + : Color.fromRGBO( + 63, + 72, + 74, + 1, + ), + label: TranslationBase.of(context).addNewChild, + // + onTap: () { + Navigator.push( + context, + FadePage( + page: AddNewChildPage(), + ), + ).then((value) { + if (value) model.getNewUserOrders(); + }); + }, + ), + ), + )); + } +} diff --git a/lib/pages/ChildVaccines/child_vaccines_page.dart b/lib/pages/ChildVaccines/child_vaccines_page.dart new file mode 100644 index 00000000..d48811be --- /dev/null +++ b/lib/pages/ChildVaccines/child_vaccines_page.dart @@ -0,0 +1,235 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart'; +import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.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/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import '../Blood/new_text_Field.dart'; + +class ChildVaccinesPage extends StatefulWidget { + @override + _ChildVaccinesPageState createState() => _ChildVaccinesPageState(); +} + +class _ChildVaccinesPageState extends State with SingleTickerProviderStateMixin { + TextEditingController titleController = TextEditingController(); + var checkedValue = false; + String addEmail = ""; + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getUserInformationRequestOrders(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + isShowDecPage: true, + description: TranslationBase.of(context).childVaccineInfo, + imagesInfo: [ + ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/0.png', + imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/0.png'), + ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/1.png', + imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/1.png') + ], + appBarTitle: TranslationBase.of(context).vaccination, + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + SizedBox( + height: 20, + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: Container( + child: Texts( + TranslationBase.of(context).welcomeBack, + fontSize: 20, + ), + ), + ), + Divider( + color: Colors.black, + indent: 10, + endIndent: 10, + ), + SizedBox( + height: 20, + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: Container( + child: Texts( + TranslationBase.of(context).msg_email_address_up_to_date, + fontSize: 20, + ), + ), + ), + + Divider( + color: Colors.black, + indent: 10, + endIndent: 10, + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: Container( + margin: EdgeInsets.only(left: 10, right: 10, top: 15), + child: NewTextFields( + // fillColor: Colors.red, + hintText: model.user != null ? model.user!.emailAddress : "", + controller: titleController, + fontSize: 20, + hintColor: Colors.black, + fontWeight: FontWeight.w600, + onChanged: (text) { + addEmail = text; + model.user!.emailAddress == addEmail ? checkedValue = false : checkedValue = true; + }, + validator: (value) { + if (value == null) { + return model.user!.emailAddress; + } else { + return model.user!.emailAddress; + } + }, + ), + ), + ), + Container( + height: MediaQuery.of(context).size.height * 0.12, + width: double.infinity, + padding: EdgeInsets.all(15), + child: SecondaryButton( + textColor: Colors.white, + color: checkedValue == false + ? Colors.white24 + : Color.fromRGBO( + 63, + 72, + 74, + 1, + ), + label: TranslationBase.of(context).updateEmail, + // + onTap: () { + model.user!.emailAddress = addEmail.toString(); + AppToast.showSuccessToast(message: TranslationBase.of(context).updateEmailMsg); + // bloodDetails.city=_selectedHospital.toString(); + + // bloodDetails. + }, + ), + ), + Container( + height: MediaQuery.of(context).size.height * 0.12, + width: double.infinity, + padding: EdgeInsets.all(15), + child: SecondaryButton( + textColor: Colors.white, + color: Color.fromRGBO( + 63, + 72, + 74, + 1, + ), + label: TranslationBase.of(context).viewListChildren, + // + onTap: () => Navigator.push( + context, + FadePage( + page: ChildPage(), + ), + ), + ), + ), + + // Texts( + // // TranslationBase.of(context).advancePaymentLabel, + // model.user.emailAddress, + // textAlign: TextAlign.center, + // ), + SizedBox( + height: 12, + ), + SizedBox( + height: 12, + ), + SizedBox( + height: 12, + ), + + SizedBox( + height: 12, + ), + + SizedBox( + height: 12, + ), + + SizedBox( + height: 10, + ), + // Row( + // mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.center, + // children: [ + // Center( + // child: Container( + // color: Colors.white, + // width: 350, + // child: InkWell( + // onTap: () { + // showDialog( + // context: context, + // builder: (_) => + // AssetGiffyDialog( + // title: Text( + // "", + // style: TextStyle( + // fontSize: 22.0, + // fontWeight: + // FontWeight + // .w600), + // ), + // image: Image.asset( + // 'assets/images/BloodChrt_EN.png'), + // buttonCancelText: + // Text('cancel'), + // buttonCancelColor: + // Colors.grey, + // onlyCancelButton: true, + // )); + // }, + // child: Container( + // width: 250, + // height: 200, + // child:Image.asset( + // 'assets/images/BloodChrt_EN.png')), + // ), + // ), + // ), + // ], + // ), + + SizedBox( + height: MediaQuery.of(context).size.height * 0.15, + ) + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart b/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart new file mode 100644 index 00000000..92bd248e --- /dev/null +++ b/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart @@ -0,0 +1,107 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SelectGenderDialog extends StatefulWidget { + final Email; + final Function okFunction; + + const SelectGenderDialog({Key? key, this.Email, required this.okFunction}) + : super(key: key); + + @override + _SelectGenderDialogState createState() => _SelectGenderDialogState(); +} + +class _SelectGenderDialogState extends State { + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Container( + child: Column( + children: [ + Divider(), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + //beneficiaryType = Gender.Male; + }); + }, + child: ListTile( + title: Text( + "${TranslationBase.of(context).sendChildEmailMsg}\n Tamer.dasdasdas@gmail.com "), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + SizedBox( + height: 5.0, + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.okFunction(); + // widget.onValueSelected(beneficiaryType); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + ), + ), + ), + ), + ), + ], + ) + ], + ), + ) + ], + ); + } +} diff --git a/lib/pages/ChildVaccines/dialogs/delete_child.dart b/lib/pages/ChildVaccines/dialogs/delete_child.dart new file mode 100644 index 00000000..9eb49d27 --- /dev/null +++ b/lib/pages/ChildVaccines/dialogs/delete_child.dart @@ -0,0 +1,102 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + + +class DeleteChild extends StatefulWidget { + @override + _DeleteChildState createState() => _DeleteChildState(); +} + +class _DeleteChildState extends State { + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Container( + child: Column( + children: [ + Divider(), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + //beneficiaryType = Gender.Male; + }); + }, + child: ListTile( + title: Text("Delete the child "), + + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + + SizedBox( + height: 5.0, + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + // widget.onValueSelected(beneficiaryType); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + ), + ), + ), + ), + ), + ], + ) + ], + ), + ) + ], + ); + } +} diff --git a/lib/pages/ChildVaccines/new/child_initial_page.dart b/lib/pages/ChildVaccines/new/child_initial_page.dart new file mode 100644 index 00000000..aba29817 --- /dev/null +++ b/lib/pages/ChildVaccines/new/child_initial_page.dart @@ -0,0 +1,147 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'child_vaccine_page.dart'; + +class ChildInitialPage extends StatefulWidget { + @override + _ChildVaccinesPageState createState() => _ChildVaccinesPageState(); +} + +class _ChildVaccinesPageState extends State with SingleTickerProviderStateMixin { + TextEditingController titleController = TextEditingController(); + var checkedValue = false; + String addEmail = ""; + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getUserInformationRequestOrders(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + isShowDecPage: true, + showNewAppBarTitle: true, + showNewAppBar: true, + description: TranslationBase.of(context).childVaccineInfo, + imagesInfo: [ + ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/0.png', + imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/0.png'), + ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/1.png', + imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/1.png') + ], + appBarTitle: TranslationBase.of(context).vaccination, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).welcomeBack, + style: TextStyle( + fontSize: 16, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + SizedBox( + height: 16, + ), + Text( + TranslationBase.of(context).msg_email_address_up_to_date, + style: TextStyle( + fontSize: 16, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + SizedBox( + height: 20, + ), + NewTextFields( + /// fillColor: Colors.red, + //Changed By Aamir + hintText: model.user != null ? model.user!.emailAddress : "", + controller: titleController, + fontSize: 14, + hintColor: Colors.black, + fontWeight: FontWeight.w600, + suffixIcon: checkedValue ? Icons.check_box : Icons.check_box_outline_blank, + onSuffixTap: () { + setState(() { + checkedValue = !checkedValue; + }); + }, + onChanged: (text) { + addEmail = text; + model.user!.emailAddress == addEmail ? checkedValue = false : checkedValue = true; + }, + validator: (value) { + if (value == null) { + return model.user!.emailAddress; + } else { + return model.user!.emailAddress; + } + }, + ), + ], + ), + ), + mFlex(1), + Container( + width: double.infinity, + color: Colors.white, + padding: EdgeInsets.all(16), + child: Column( + children: [ + if (checkedValue) + SecondaryButton( + textColor: Colors.white, + color: checkedValue == false ? Colors.white24 : CustomColors.green, + label: TranslationBase.of(context).updateEmail, + // + onTap: () { + model.user!.emailAddress = addEmail.toString(); + AppToast.showSuccessToast(message: TranslationBase.of(context).updateEmailMsg); + // bloodDetails.city=_selectedHospital.toString(); + + // bloodDetails. + }, + ), + if (checkedValue) mHeight(16), + DefaultButton( + TranslationBase.of(context).viewListChildren, + () => Navigator.push( + context, + FadePage( + page: ChildVaccinePage(), + ), + ), + ), + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/ChildVaccines/new/child_vaccine_page.dart b/lib/pages/ChildVaccines/new/child_vaccine_page.dart new file mode 100644 index 00000000..ddbbf198 --- /dev/null +++ b/lib/pages/ChildVaccines/new/child_vaccine_page.dart @@ -0,0 +1,206 @@ +import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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:flutter/rendering.dart'; + +import '../add_newchild_page.dart'; +import '../vaccinationtable_page.dart'; + +class ChildVaccinePage extends StatefulWidget { + @override + _ChildPageState createState() => _ChildPageState(); +} + +class _ChildPageState extends State with SingleTickerProviderStateMixin { + DeleteBaby deleteBaby = DeleteBaby(); + + @override + Widget build(BuildContext context) { + var size = MediaQuery.of(context).size; + final double height = (size.height - kToolbarHeight - 60); + final double itemWidth = size.width / 2; + final double itemHeight = height / 2 + 40; + + var checkedValue = true; + return BaseView( + onModelReady: (model) => model.getNewUserOrders(), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).vaccination, + baseViewModel: model, + showNewAppBarTitle: true, + showNewAppBar: true, + body: Column( + children: [ + Expanded( + child: ListView.separated( + itemBuilder: (context, index) { + Color selectedColor = model.babyInformationModelList[index].gender == 1 ? Color(0xFF5A282E) : Colors.white; + return InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: VaccinationTablePage(model.babyInformationModelList[index]), + ), + ); + }, + child: Container( + margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 0, bottom: index == model.babyInformationModelList.length - 1 ? 16 : 0), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.all(Radius.circular(12)), + color: Colors.white, + gradient: LinearGradient( + colors: model.babyInformationModelList[index].gender == 2 + ? [ + Color(0xFFFDA4B0), + Color(0xFFFBC8CC), + ] + : [ + Color(0xFF6EA8FF), + Color(0xFF7AB8FD), + ], + begin: Alignment.centerLeft, + end: Alignment.centerRight, + ), + ), + padding: EdgeInsets.all(12), + //double.infinity, + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + model.babyInformationModelList[index].babyName!.trim(), + style: TextStyle( + fontSize: 14, + letterSpacing: -0.46, + fontWeight: FontWeight.bold, + color: selectedColor, + ), + ), + Text( + model.babyInformationModelList[index].genderDescription!, + style: TextStyle( + fontSize: 11, + color: selectedColor, + ), + ), + Row( + children: [ + Text( + TranslationBase.of(context).dob, + style: TextStyle( + fontSize: 11, + color: selectedColor, + ), + ), + Text(" " + DateUtil.getDayMonthYearDateFormatted(model.babyInformationModelList[index].dOB!), + style: TextStyle( + fontSize: 11, + color: selectedColor, + )), + ], + ), + mHeight(20), + ], + ), + ), + Column( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Icon( + Icons.arrow_forward, + size: 18, + ), + mHeight(12), + InkWell( + onTap: () async { + await model.deleteBabyOrders(newChild: deleteBaby); + + deleteBaby.babyID = model.babyInformationModelList[index].babyID; + + await model.deleteBabyOrders(newChild: deleteBaby); + if (model.isDeleted) { + AppToast.showSuccessToast(message: TranslationBase.of(context).recordDeleted); + Navigator.pop(context, model.isDeleted); + } else { + //TODO handling error + } + }, + child: Container( + decoration: containerRadius(Colors.grey.withOpacity(0.2), 2000), + padding: EdgeInsets.only(left: 12, right: 12, top: 8, bottom: 8), + child: Row( + children: [ + Image.asset( + 'assets/images/new-design/garbage.png', + width: 16, + color: selectedColor, + ), + mWidth(8), + Text( + TranslationBase.of(context).deleteView, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + letterSpacing: -0.33, + color: selectedColor, + ), + ), + ], + ), + ), + ), + ], + ), + ], + ), + ), + ); + }, + separatorBuilder: (BuildContext context, int index) { + return mHeight(12); + }, + itemCount: model.babyInformationModelList.length, + ), + ), + Container( + width: double.infinity, + padding: EdgeInsets.all(16), + color: Colors.white, + child: DefaultButton( + TranslationBase.of(context).addNewChild, + () { + Navigator.push( + context, + FadePage( + page: AddNewChildPage(), + ), + ).then((value) { + if (value) model.getNewUserOrders(); + }); + }, + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/ChildVaccines/vaccinationtable_page.dart b/lib/pages/ChildVaccines/vaccinationtable_page.dart new file mode 100644 index 00000000..c909875c --- /dev/null +++ b/lib/pages/ChildVaccines/vaccinationtable_page.dart @@ -0,0 +1,200 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/vaccination_table_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.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:flutter_html/flutter_html.dart'; +import 'package:provider/provider.dart'; + +import 'dialogs/SelectGenderDialog.dart'; + +class VaccinationTablePage extends StatelessWidget { + final List_BabyInformationModel babyInfo; + + VaccinationTablePage(this.babyInfo); + + @override + Widget build(BuildContext context) { + var size = MediaQuery.of(context).size; + final double height = (size.height - kToolbarHeight - 60); + ProjectViewModel projectViewModel = Provider.of(context); + + var checkedValue; + return BaseView( + onModelReady: (model) => model.getCreateVaccinationTable(babyInfo, false), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + baseViewModel: model, + appBarTitle: TranslationBase.of(context).vaccination, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Container( + height: double.infinity, + child: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(left: 16, right: 16, top: 16), + child: Column( + children: [ + Container( + decoration: containerRadius(Colors.white, 12), + padding: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + babyInfo.babyName!, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + mHeight(8), + Row( + children: [ + Text( + TranslationBase.of(context).gender + " :", + style: TextStyle( + fontSize: 10, + fontWeight: FontWeight.w600, + letterSpacing: -0.4, + color: CustomColors.textColor, + ), + ), + Text( + babyInfo.gender == 1 ? TranslationBase.of(context).female : TranslationBase.of(context).male, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.4, + color: CustomColors.black, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).dateOfBirth + " :", + style: TextStyle( + fontSize: 10, + fontWeight: FontWeight.w600, + letterSpacing: -0.4, + color: CustomColors.textColor, + ), + ), + Text( + DateUtil.getFormattedDate(babyInfo.dOB!, "MMM dd,yyyy"), + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.4, + color: CustomColors.black, + ), + ), + ], + ), + ], + ), + ), + mHeight(12), + Container( + decoration: containerRadius(Colors.white, 12), + padding: EdgeInsets.all(12), + child: Table( + columnWidths: { + 0: FlexColumnWidth(1.8), + 1: FlexColumnWidth(1.8), + 2: FlexColumnWidth(1.8), + }, + children: fullData(context, model, projectViewModel), + ), + ), + ], + ), + ), + ), + ), + Container( + width: double.infinity, + padding: EdgeInsets.all(12), + color: Colors.white, + child: SecondaryButton( + textColor: Colors.white, + color: CustomColors.accentColor, + label: TranslationBase.of(context).sendEmail, + // + onTap: () { + //SelectGenderDialog(); +//=============== + showDialog( + context: context, + builder: (cxt) => SelectGenderDialog( + okFunction: () async { + await model.getCreateVaccinationTable(babyInfo, true); + if (model.state == ViewState.Idle) { + AppToast.showSuccessToast(message: TranslationBase.of(context).emailSentSuccessfully); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).EmailSentError); + } + }, + ), + ); + //========= + }, + ), + ), + ], + ), + ), + ), + ); + } + + List fullData(BuildContext context, VaccinationTableViewModel model, ProjectViewModel projectViewModel) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).visit), + Utils.tableColumnTitle(TranslationBase.of(context).description), + Utils.tableColumnTitle(TranslationBase.of(context).dueDate), + ], + ), + ); + model.creteVaccinationTableModelList.forEach( + (diabtec) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue(diabtec.visit!, isCapitable: false, mProjectViewModel: projectViewModel), + // Utils.tableColumnValue(diabtec.vaccinesDescription, isCapitable: false, mProjectViewModel: projectViewModel), + Html( + // data:"
BCG
HEPATITIS B
"//model.creteVaccinationTableModelList[index].vaccinesDescription + data: diabtec.vaccinesDescription, + ), + Utils.tableColumnValue(diabtec.givenAt!, isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + }, + ); + return tableRow; + } +} diff --git a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart new file mode 100644 index 00000000..6abd177c --- /dev/null +++ b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart @@ -0,0 +1,123 @@ +import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_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/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class HospitalsLiveChatPage extends StatefulWidget { + @override + _HospitalsLiveChatPageState createState() => _HospitalsLiveChatPageState(); +} + +class _HospitalsLiveChatPageState extends State { + int? tappedIndex; + String? chat; + + @override + void initState() { + super.initState(); + tappedIndex = -1; + chat = ""; + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getLiveChatRequestOrders(), + builder: (_, model, widget) => AppScaffold( + baseViewModel: model, + isShowDecPage: false, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + TranslationBase.of(context).instructions, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + SizedBox(height: 20), + Text( + TranslationBase.of(context).selectHospitalDec + " :", + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + SizedBox(height: 20), + ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + separatorBuilder: (context, index) => SizedBox(height: 14), + itemCount: model.LiveChatModelList.length, + itemBuilder: (context, index) => InkWell( + onTap: () { + setState(() { + tappedIndex = index; + chat = + "http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user!.firstName}&PatientID=${model.user!.patientID}&MobileNo=${model.user!.mobileNumber}&Language=${projectViewModel.currentLanguage}&WorkGroup=${model.LiveChatModelList[index].value}"; + }); + }, + child: Container( + padding: EdgeInsets.only(right: 12, left: 18, top: 16, bottom: 16), + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: tappedIndex == index ? Color(0xff28323A).withOpacity(.7) : Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Text( + model.LiveChatModelList[index].projectName.toString() + "\n" + model.LiveChatModelList[index].distanceInKilometers.toString() + " " + TranslationBase.of(context).km_ ?? "", + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: tappedIndex == index ? Colors.white : Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + ), + Icon( + Icons.arrow_forward, + color: tappedIndex == index ? Colors.white : Colors.black, + ), + ], + ), + ), + ), + ), + ], + ), + ), + ), + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).start, + //Changed By Aamir URL + chat!.isEmpty ? null : () => {launch(chat!)}, + color: Color(0xffD02127), + textColor: chat!.isEmpty ? Color(0xff000000) : Colors.white, + disabledColor: Color(0xffEAEAEA), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/ContactUs/LiveChat/livechat_page.dart b/lib/pages/ContactUs/LiveChat/livechat_page.dart new file mode 100644 index 00000000..4d5c9c88 --- /dev/null +++ b/lib/pages/ContactUs/LiveChat/livechat_page.dart @@ -0,0 +1,52 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'hospitalsLivechat_page.dart'; + +class LiveChatPage extends StatefulWidget { + @override + _LiveChatPageState createState() => _LiveChatPageState(); +} + +class _LiveChatPageState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + List imagesInfo =[]; + + @override + void initState() { + super.initState(); + imagesInfo + .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/0.png')); + imagesInfo + .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/1.png')); + imagesInfo + .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/2.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/2.png')); + + _tabController = TabController(length: 2, vsync: this); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + imagesInfo: imagesInfo, + title: TranslationBase.of(context).liveChat, + description: TranslationBase.of(context).infoChat, + appBarTitle: TranslationBase.of(context).liveChat, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: HospitalsLiveChatPage(), + ); + } +} \ No newline at end of file diff --git a/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart b/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart new file mode 100644 index 00000000..e5b0647a --- /dev/null +++ b/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart @@ -0,0 +1,61 @@ +import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_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/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class PharmaciesLiveChatPage extends StatelessWidget { + PharmaciesLiveChatPage({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + builder: (_, model, widget) => AppScaffold( + baseViewModel: model, + isShowDecPage: false, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(height: 20), + Text( + TranslationBase.of(context).instructions, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + ], + ), + ), + ), + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).start, + null, + // () { + // String chat; + // chat = + // "http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.isArabic ? 1 : 2}"; + // launch(chat); + // }, + disabledColor: Color(0xffEAEAEA), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/ContactUs/contact_us_page.dart b/lib/pages/ContactUs/contact_us_page.dart new file mode 100644 index 00000000..2334b00f --- /dev/null +++ b/lib/pages/ContactUs/contact_us_page.dart @@ -0,0 +1,108 @@ +import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; + +import '../../uitl/translations_delegate_base.dart'; +import 'LiveChat/livechat_page.dart'; +import 'findus/findus_page.dart'; + +class ContactUsPage extends StatefulWidget { + @override + _ContactUsPageState createState() => _ContactUsPageState(); +} + +class _ContactUsPageState extends State { + late LocationUtils locationUtils; + + @override + void initState() { + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) => locationUtils.getCurrentLocation()); + + super.initState(); + } + + @override + Widget build(BuildContext context) { + List myMedicalList = myOptionsList(context); + + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).contactUs, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF8F8F8), + body: Column( + children: [ + Container( + width: double.infinity, + height: 30, + ), + Padding( + padding: EdgeInsets.only(left: 12, right: 12), + child: GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + padding: EdgeInsets.zero, + itemCount: myMedicalList.length, + itemBuilder: (BuildContext context, int index) { + return myMedicalList[index]; + }, + ), + ), + ], + ), + ); + } + + List myOptionsList(BuildContext context) { + List medical =[]; + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: FindUsPage()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).findUs, + imagePath: 'assets/images/new-design/find_us_icon.png', + subTitle: "", + isPngImage: true, + ), + )); + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: FeedbackHomePage()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).feedback, + imagePath: 'assets/images/new-design/feedback_icon.png', + subTitle: "", + isPngImage: true, + ), + )); + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: LiveChatPage()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).liveChat, + imagePath: 'assets/images/new-design/live_chat_icon.png', + subTitle: "", + isPngImage: true, + ), + )); + + return medical; + } +} diff --git a/lib/pages/ContactUs/findus/findus_page.dart b/lib/pages/ContactUs/findus/findus_page.dart new file mode 100644 index 00000000..78bb4e7e --- /dev/null +++ b/lib/pages/ContactUs/findus/findus_page.dart @@ -0,0 +1,81 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; +import 'package:diplomaticquarterapp/pages/ContactUs/findus/hospitrals_page.dart'; +import 'package:diplomaticquarterapp/pages/ContactUs/findus/pharmacies_page.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class FindUsPage extends StatefulWidget { + @override + _FindUsPageState createState() => _FindUsPageState(); +} + +class _FindUsPageState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + @override + Widget build(BuildContext context) { + return BaseView( + allowAny: true, + onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).location, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF8F8F8), + baseViewModel: model, + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).hospitals), Text(TranslationBase.of(context).pharmacies)], + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + HospitalsPage(findusHospitalModelList: model.FindusHospitalModelList), //SendFeedbackPage(), + PharmaciesPage(findusPharmaciesModelList: model.FindusPharmaciesModelList) //StatusFeedbackPage() + ], + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/ContactUs/findus/hospitrals_page.dart b/lib/pages/ContactUs/findus/hospitrals_page.dart new file mode 100644 index 00000000..6f48deb6 --- /dev/null +++ b/lib/pages/ContactUs/findus/hospitrals_page.dart @@ -0,0 +1,97 @@ +import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; +import 'package:diplomaticquarterapp/widgets/hospital_location.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class HospitalsPage extends StatefulWidget { + final List findusHospitalModelList; + + HospitalsPage({Key? key, required this.findusHospitalModelList}); + + @override + _HospitalsPageState createState() => _HospitalsPageState(); +} + +class _HospitalsPageState extends State { + @override + Widget build(BuildContext context) { + return SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(bottom: 21, top: 21, left: 21, right: 21), + child: Column( + children: [ + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + padding: EdgeInsets.zero, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemBuilder: (context, index) => HospitalLocation(widget.findusHospitalModelList[index]), + itemCount: widget.findusHospitalModelList.length, + ), + Container( + margin: EdgeInsets.only(top: 14), + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + IconButton( + icon: new Image.asset('assets/images/new-design/youtube.png'), + iconSize: 48, + tooltip: 'Youtube', + onPressed: () { + setState(() { + launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/linkedin.png'), + tooltip: 'LinkedIn', + iconSize: 48, + onPressed: () { + setState(() { + launch("https://www.linkedin.com/company/drsulaiman-alhabib-medical-group"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/twitter.png'), + tooltip: 'Twitter', + iconSize: 48, + onPressed: () { + setState(() { + launch("https://twitter.com/HMG"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/facebook.png'), + tooltip: 'facebook', + iconSize: 48, + onPressed: () { + setState(() { + launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); + }); + }, + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/ContactUs/findus/pharmacies_page.dart b/lib/pages/ContactUs/findus/pharmacies_page.dart new file mode 100644 index 00000000..529319f1 --- /dev/null +++ b/lib/pages/ContactUs/findus/pharmacies_page.dart @@ -0,0 +1,97 @@ +import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; +import 'package:diplomaticquarterapp/widgets/hospital_location.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class PharmaciesPage extends StatefulWidget { + final List findusPharmaciesModelList; + + PharmaciesPage({Key? key, required this.findusPharmaciesModelList}); + + @override + _PharmaciesPageState createState() => _PharmaciesPageState(); +} + +class _PharmaciesPageState extends State { + @override + Widget build(BuildContext context) { + return SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(bottom: 21, top: 21, left: 21, right: 21), + child: Column( + children: [ + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + padding: EdgeInsets.zero, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemBuilder: (context, index) => HospitalLocation(widget.findusPharmaciesModelList[index], showCity: true), + itemCount: widget.findusPharmaciesModelList.length, + ), + Container( + margin: EdgeInsets.only(top: 14), + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + IconButton( + icon: new Image.asset('assets/images/new-design/youtube.png'), + iconSize: 48, + tooltip: 'Youtube', + onPressed: () { + setState(() { + launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/linkedin.png'), + tooltip: 'LinkedIn', + iconSize: 48, + onPressed: () { + setState(() { + launch("https://www.linkedin.com/company/drsulaiman-alhabib-medical-group"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/twitter.png'), + tooltip: 'Twitter', + iconSize: 48, + onPressed: () { + setState(() { + launch("https://twitter.com/HMG"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/facebook.png'), + tooltip: 'facebook', + iconSize: 48, + onPressed: () { + setState(() { + launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); + }); + }, + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/ContactUs/widgets/card_common_contat.dart b/lib/pages/ContactUs/widgets/card_common_contat.dart new file mode 100644 index 00000000..b4cfe95f --- /dev/null +++ b/lib/pages/ContactUs/widgets/card_common_contat.dart @@ -0,0 +1,99 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/livechat_page.dart'; +import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; +import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/my_trackers/Weight/WeightHomePage.dart'; +import 'package:diplomaticquarterapp/pages/medical/my_trackers/blood_pressure/BloodPressureHomePage.dart'; +import 'package:diplomaticquarterapp/pages/medical/my_trackers/blood_suger/blood_sugar_home_page.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; + +class CardCommonContact extends StatelessWidget { + final image; + final text; + final subText; + final type; + final width; + final height; + final ProjectViewModel projectViewModel; + final ToDoCountProviderModel model; + + const CardCommonContact({required this.image, required this.text, required this.subText, required this.type, this.width, this.height, required this.projectViewModel, required this.model}); + + @override + Widget build(BuildContext context) { + // ProjectViewModel projectViewModel = Provider.of(context); + // ToDoCountProviderModel model = Provider.of(context); + return GestureDetector( + onTap: () { + navigateToSearch(context, this.type); + }, + child: Container( + padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Image.asset( + this.image, + width: width != null ? width : 42.0, + height: height != null ? height : 42.0, + ), + Text( + text + "${subText.isEmpty ? "" : "\n$subText"}", + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16), + ), + ], + ), + ), + ); + } + + Future navigateToSearch(context, type) async { + if (type == 0) { + Navigator.push(context, FadePage(page: FindUsPage())); + } else if (type == 1) { + Navigator.push(context, FadePage(page: FeedbackHomePage())); + } else if (type == 2) { + Navigator.push(context, FadePage(page: LiveChatPage())); + } else if (type == 3) { + Navigator.push(context, FadePage(page: BloodSugarHomePage())); + } else if (type == 4) { + Navigator.push(context, FadePage(page: BloodPressureHomePage())); + } else if (type == 5) { + Navigator.push(context, FadePage(page: WeightHomePage())); + } else if (type == 6) { + Navigator.push(context, FadePage(page: AdvancePaymentPage())); + } else if (type == 7) { + navigateToToDoPage(context); + } else if (type == 8) { + Navigator.push(context, FadePage(page: MyBalancePage())); + } + } + + navigateToToDoPage(BuildContext context) { + if (projectViewModel.isLogin) { + if (model.count != 0) { + Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty); + } + } else { + Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))); + } + } +} diff --git a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart new file mode 100644 index 00000000..88be72dd --- /dev/null +++ b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart @@ -0,0 +1,595 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +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/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart'; +import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCenterModel.dart'; +import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-alert.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.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'; +import 'package:provider/provider.dart'; +import 'package:syncfusion_flutter_calendar/calendar.dart'; + +class CovidTimeSlots extends StatefulWidget { + int? projectID; + static bool areSlotsAvailable = false; + static DateTime? selectedAppoDateTime; + static String? selectedDate; + static String? selectedTime; + CovidTestProceduresResponse? selectedProcedure; + DriveThroughTestingCenterModel? selectedProject; + + int? selectedClinicID; + int? selectedDoctorID; + + var language; + + PatientShareResponse? patientShareResponse; + + CovidTimeSlots({required this.projectID, required this.selectedProcedure, required this.selectedProject}); + + @override + _CovidTimeSlotsState createState() => _CovidTimeSlotsState(); +} + +class _CovidTimeSlotsState extends State with TickerProviderStateMixin { + late Map _events; + late AnimationController _animationController; + late CalendarController _calendarController; + + AppSharedPreferences sharedPref = new AppSharedPreferences(); + + var selectedDate = ""; + dynamic selectedDateJSON; + dynamic jsonFreeSlots; + + List docFreeSlots = []; + List dayEvents = []; + + int selectedButtonIndex = 0; + + dynamic freeSlotsResponse; + + late ScrollController _scrollController; + + late ToDoCountProviderModel toDoProvider; + late ProjectViewModel projectViewModel; + + @override + void initState() { + final _selectedDay = DateTime.now(); + + widget.patientShareResponse = new PatientShareResponse(); + + _scrollController = new ScrollController(); + + _events = { + _selectedDay: ['Event A0'] + }; + + WidgetsBinding.instance.addPostFrameCallback((_) => getCovidFreeSlots(context, widget.projectID!)); + + _calendarController = CalendarController(); + _animationController = AnimationController( + vsync: this, + duration: const Duration(milliseconds: 50), + ); + + _animationController.forward(); + super.initState(); + } + + @override + void dispose() { + _animationController.dispose(); + _calendarController.dispose(); + super.dispose(); + } + + void _onDaySelected(DateTime day, ProjectViewModel projectViewModel) { + final DateFormat formatter = DateFormat('yyyy-MM-dd'); + setState(() { + this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, projectViewModel.isArabic ? "ar" : "en"); + openTimeSlotsPickerForDate(day, docFreeSlots); + CovidTimeSlots.selectedDate = formatter.format(day); + _calendarController.selectedDate = day; + print(CovidTimeSlots.selectedDate); + }); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + toDoProvider = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).covidTest, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Container( + margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Text( + TranslationBase.of(context).selectAppo, + style: TextStyle( + color: Colors.black, + fontSize: 16.0, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + mHeight(12), + Container( + decoration: cardRadius(12), + child: _buildTableCalendarWithBuilders(projectViewModel), + ), + mHeight(12), + Text( + selectedDate, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: -0.64, + ), + ), + mHeight(8), + CovidTimeSlots.areSlotsAvailable + ? Container( + height: 40, + child: ListView.builder( + controller: _scrollController, + scrollDirection: Axis.horizontal, + itemCount: dayEvents.length, + itemBuilder: (context, index) { + return Container( + margin: EdgeInsets.only(right: (index == dayEvents.length - 1) ? 0 : 5.0, left: index == 0 ? 0 : 5), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(5.0), + side: BorderSide( + color: index == selectedButtonIndex ? CustomColors.green : Colors.black, //Color of the border + style: BorderStyle.solid, //Style of the border + width: 1.5, //width of the border + ), + ), + minWidth: MediaQuery.of(context).size.width * 0.2, + child: index == selectedButtonIndex ? getSelectedButton(index) : getNormalButton(index)), + ); + }, + ), + ) + : Center( + child: Padding( + padding: const EdgeInsets.only(left: 12.0, right: 12.0), + child: Text(TranslationBase.of(context).noSlotsError, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.grey)), + )), + ], + ), + ), + SizedBox( + height: 100.0, + ), + ], + ), + ), + ), + ), + Container( + margin: EdgeInsets.zero, + decoration: cardRadius(0), + child: Container( + width: double.infinity, + padding: EdgeInsets.all(12), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width * 0.7, + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.green, + elevation: 0, + onPressed: () { + bookCovidTestAppointment(); + }, + child: Text( + TranslationBase.of(context).bookAppo, + style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, color: Colors.white), + ), + ), + ), + ), + ) + ], + ), + ); + } + + Widget _buildTableCalendarWithBuilders(ProjectViewModel projectViewModel) { + return SfCalendar( + controller: _calendarController, + minDate: DateTime.now(), + showNavigationArrow: true, + headerStyle: CalendarHeaderStyle(textAlign: TextAlign.center, textStyle: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46)), + viewHeaderStyle: ViewHeaderStyle(dayTextStyle: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.black)), + view: CalendarView.month, + todayHighlightColor: CustomColors.green, + selectionDecoration: containerColorRadiusBorderWidthCircular(Colors.transparent, 4, CustomColors.green, 2.5), + cellBorderColor: Colors.white, + dataSource: MeetingDataSource(_getDataSource()), + monthViewSettings: const MonthViewSettings(appointmentDisplayMode: MonthAppointmentDisplayMode.indicator, showTrailingAndLeadingDates: false, appointmentDisplayCount: 1), + onTap: (CalendarTapDetails details) { + _calendarController.selectedDate = details.date; + _onDaySelected(details.date!, projectViewModel); + }, + ); + } + + List _getDataSource() { + final List meetings = []; + _events.forEach((key, value) { + final DateTime startTime = DateTime(key.year, key.month, key.day, 9, 0, 0); + final DateTime endTime = startTime.add(const Duration(minutes: 20)); + meetings.add(Meeting("", startTime, endTime, CustomColors.green, false, "")); + }); + return meetings; + } + + openTimeSlotsPickerForDate(DateTime dateStart, List freeSlots) { + dayEvents.clear(); + DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0); + + freeSlots.forEach((v) { + if (v.start == dateStartObj) dayEvents.add(v); + }); + + setState(() { + if (dayEvents.length != 0) { + CovidTimeSlots.areSlotsAvailable = true; + selectedButtonIndex = 0; + CovidTimeSlots.selectedTime = dayEvents[selectedButtonIndex].isoTime; + } else + CovidTimeSlots.areSlotsAvailable = false; + }); + } + + Future> _getJSONSlots() async { + Map _eventsParsed; + List slotsList = []; + DateTime date; + final DateFormat formatter = DateFormat('HH:mm'); + final DateFormat dateFormatter = DateFormat('yyyy-MM-dd'); + for (var i = 0; i < freeSlotsResponse.length; i++) { + date = DateUtil.convertStringToDate(freeSlotsResponse[i]['FreeTimeSlots']); + slotsList.add(FreeSlot(date, ['slot'])); + docFreeSlots.add(TimeSlot(isoTime: formatter.format(date), start: new DateTime(date.year, date.month, date.day, 0, 0, 0, 0), end: date)); + } + _eventsParsed = Map.fromIterable(slotsList, key: (e) => e.slot, value: (e) => e.event); + setState(() { + CovidTimeSlots.selectedDate = dateFormatter.format(DateUtil.convertStringToDate(freeSlotsResponse[0]['FreeTimeSlots'])); + selectedDate = DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(freeSlotsResponse[0]['FreeTimeSlots'])); + selectedDateJSON = freeSlotsResponse[0]['FreeTimeSlots']; + }); + openTimeSlotsPickerForDate(DateUtil.convertStringToDate(selectedDateJSON), docFreeSlots); + _calendarController.selectedDate = DateUtil.convertStringToDate(selectedDateJSON); + return _eventsParsed; + } + + // Widget _buildEventsMarker(DateTime date, List events) { + // return Container( + // // decoration: BoxDecoration( + // // shape: BoxShape.circle, + // // color: _calendarController.isSelected(date) + // // ? Colors.green[400] + // // : _calendarController.isToday(date) + // // ? Colors.brown[300] + // // : Colors.blue[400], + // // ), + // + // decoration: containerColorRadiusBorderWidth( + // _calendarController.isSelected(date) + // ? CustomColors.green + // : _calendarController.isToday(date) + // ? CustomColors.green.withOpacity(0.5) + // : Colors.white, + // 200, + // _calendarController.isSelected(date) ? CustomColors.green : Colors.black, + // 2), + // width: 40.0, + // height: 40.0, + // child: Center( + // child: Text( + // '${date.day}', + // style: TextStyle().copyWith( + // color: _calendarController.isSelected(date) ? Colors.white : Colors.black, + // fontSize: 13.0, + // ), + // ), + // ), + // ); + // } + + Widget getNormalButton(int index) { + return CustomTextButton( + backgroundColor: Colors.white, + elevation: 0, + onPressed: () { + setState(() { + selectedButtonIndex = index; + CovidTimeSlots.selectedTime = dayEvents[index].isoTime; + print(CovidTimeSlots.selectedTime); + }); + }, + child: Text(dayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.bold, color: Color(0xFF60686b))), + ); + } + + Widget getSelectedButton(int index) { + return CustomTextButton( + backgroundColor: CustomColors.green, + elevation: 0, + onPressed: () { + setState(() { + selectedButtonIndex = index; + CovidTimeSlots.selectedTime = dayEvents[index].isoTime; + print(CovidTimeSlots.selectedTime); + }); + }, + child: Text(dayEvents[index].isoTime!, style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.bold, color: Color(0xFF60686b))), + ); + } + + bookCovidTestAppointment() { + if (CovidTimeSlots.areSlotsAvailable) { + var messageEn = "This Appointment is being booked for patient " + + projectViewModel.authenticatedUserObject.user!.firstName! + + " " + + projectViewModel.authenticatedUserObject.user!.lastName! + + ", Having file number " + + projectViewModel.authenticatedUserObject.user!.patientID.toString() + + ". Please confirm!"; + var messageAr = "يتم حجز هذا الموعد المراجع " + + projectViewModel.authenticatedUserObject.user!.firstName! + + " " + + projectViewModel.authenticatedUserObject.user!.lastName! + + ", وجود رقم الملف " + + projectViewModel.authenticatedUserObject.user!.patientID.toString() + + ". يرجى تأكيد!"; + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: projectViewModel.isArabic ? messageAr : messageEn, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () { + GifLoaderDialogUtils.showMyDialog(context); + DoctorList docObject = new DoctorList(); + docObject.doctorID = widget.selectedDoctorID; + docObject.clinicID = widget.selectedClinicID; + docObject.projectID = widget.projectID; + insertCovidQuestionnaire(context, docObject); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot); + } + } + + insertCovidQuestionnaire(context, DoctorList docObject) async { + DoctorsListService service = new DoctorsListService(); + List qa = await sharedPref.getObject(COVID_QA_LIST); + service.insertCovidQuestionnaire(qa, widget.projectID!, widget.selectedProject!.testTypeEnum!, projectViewModel.isArabic ? 1 : 2, widget.selectedProject!.testProcedureEnum!).then((res) { + insertAppointmentCovidTest(context, docObject); + }).catchError((err) { + print(err); + }); + } + + updateCovidQuestionnaire(context, String appoNo) async { + DoctorsListService service = new DoctorsListService(); + service.updateCovidQuestionnaire(appoNo, widget.projectID!, widget.selectedProject!.testTypeEnum!, widget.selectedProject!.testProcedureEnum!).then((res) {}).catchError((err) { + print(err); + }); + } + + insertAppointmentCovidTest(context, DoctorList docObject) { + DoctorsListService service = new DoctorsListService(); + AppoitmentAllHistoryResultList appo; + service + .insertAppointment(docObject.doctorID!, docObject.clinicID!, docObject.projectID!, CovidTimeSlots.selectedTime!, CovidTimeSlots.selectedDate!, 0, projectViewModel.isArabic ? 1 : 2, context, + widget.selectedProcedure!.procedureID!, widget.selectedProject!.testTypeEnum!, widget.selectedProject!.testProcedureEnum) + .then((res) { + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess); + getToDoCount(); + getPatientShare(context, res['AppointmentNo'], docObject.clinicID!, docObject.projectID!, docObject); + } else { + GifLoaderDialogUtils.hideDialog(context); + appo = new AppoitmentAllHistoryResultList(); + appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo']; + appo.clinicID = res['SameClinicApptList'][0]['DoctorID']; + appo.projectID = res['SameClinicApptList'][0]['ProjectID']; + appo.endTime = res['SameClinicApptList'][0]['EndTime']; + appo.startTime = res['SameClinicApptList'][0]['StartTime']; + appo.doctorID = res['SameClinicApptList'][0]['DoctorID']; + appo.isLiveCareAppointment = false; + appo.originalClinicID = 0; + appo.originalProjectID = 0; + appo.appointmentDate = res['SameClinicApptList'][0]['AppointmentDate']; + + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: res['ErrorEndUserMessage'], + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => {cancelAppointment(docObject, appo, context)}, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + }).catchError((err) { + AppToast.showErrorToast(message: err); + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + getToDoCount() { + toDoProvider.setState(0, 0, true, toDoProvider.notificationsCount); + ClinicListService service = new ClinicListService(); + service.getActiveAppointmentNo(context).then((res) { + print(res['AppointmentActiveNumber']); + if (res['MessageStatus'] == 1) { + toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider.notificationsCount); + // toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount); + } else {} + }).catchError((err) { + print(err); + }); + } + + cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, BuildContext context) { + ConfirmDialog.closeAlertDialog(context); + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.cancelAppointment(appo, context).then((res) { + if (res['MessageStatus'] == 1) { + // Future.delayed(new Duration(milliseconds: 1500), () { + insertAppointmentCovidTest(context, docObject); + // }); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + print(err); + }); + } + + getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) { + int languageID = projectViewModel.isArabic ? 1 : 2; + DoctorsListService service = new DoctorsListService(); + service.getPatientShare(appointmentNo, clinicID, projectID, languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + res = res['OnlineCheckInAppointments'][0]; + widget.patientShareResponse = PatientShareResponse.fromJson(res); + updateCovidQuestionnaire(context, appointmentNo); + navigateToPaymentAlert(); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + navigateToPaymentAlert() { + Navigator.push( + context, + FadePage( + page: CovidPaymentAlert(patientShareResponse: widget.patientShareResponse!), + ), + ); + } + + getCovidFreeSlots(BuildContext context, int projectID) { + CovidDriveThruService service = new CovidDriveThruService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getCovidFreeSlots(context, projectID, widget.selectedProject!.testTypeEnum!, widget.selectedProject!.testProcedureEnum!).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + if (res['COVID19_FreeTimeSlots'].length != 0) { + freeSlotsResponse = res['COVID19_FreeTimeSlots']; + _getJSONSlots().then((value) => { + setState(() => {widget.selectedClinicID = freeSlotsResponse[0]['ClinicID'], widget.selectedDoctorID = freeSlotsResponse[0]['DoctorID'], _events.clear(), _events = value}) + }); + } else {} + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err.toString()); + print(err); + }); + } +} + +class MeetingDataSource extends CalendarDataSource { + MeetingDataSource(List source) { + appointments = source; + } + + @override + DateTime getStartTime(int index) { + return _getMeetingData(index)!.from; + } + + @override + DateTime getEndTime(int index) { + return _getMeetingData(index)!.to; + } + + @override + String getSubject(int index) { + return _getMeetingData(index)!.eventName; + } + + @override + Color getColor(int index) { + return _getMeetingData(index)!.background; + } + + @override + bool isAllDay(int index) { + return _getMeetingData(index)!.isAllDay; + } + + Meeting? _getMeetingData(int index) { + final dynamic meeting = appointments![index]; + Meeting? meetingData; + if (meeting is Meeting) { + meetingData = meeting; + } + return meetingData; + } +} + +class Meeting { + Meeting(this.eventName, this.from, this.to, this.background, this.isAllDay, this.notes); + + String eventName; + DateTime from; + DateTime to; + Color background; + bool isAllDay; + String notes; +} diff --git a/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart b/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart new file mode 100644 index 00000000..334bf759 --- /dev/null +++ b/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart @@ -0,0 +1,324 @@ +import 'dart:convert'; + +import 'package:diplomaticquarterapp/config/shared_pref_kay.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/medical/labs/passport_update_page.dart'; +import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'covid-payment-details.dart'; + +class CovidDirveThruQuestions extends StatefulWidget { + final String projectId; + final List proceduresList; + DriveThroughTestingCenterModel selectedProject; + + CovidDirveThruQuestions({required this.projectId, required this.proceduresList, required this.selectedProject}); + + @override + CovidDirveThruQuestionsState createState() => CovidDirveThruQuestionsState(); +} + +class CovidDirveThruQuestionsState extends State { + late List qa; + + @override + void initState() { + super.initState(); + qa = getQuestionsFromJson(); + } + + late TranslationBase localize; + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + localize = TranslationBase.of(context); + var isArabic = localize.isArabic(); + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).covidTest, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: double.infinity, + child: Container( + decoration: cardRadius(12), + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).covidBookAppo, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + letterSpacing: -0.64, + ), + ), + mHeight(6), + Row( + children: [ + Text( + TranslationBase.of(context).patientName + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel.user!.firstName! + " " + projectViewModel.user!.lastName!, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).nationalIdNumber + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel.user!.patientIdentificationNo!, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + ], + ), + ), + ), + ), + mHeight(12), + Text( + TranslationBase.of(context).covidQuestionnaire, + style: TextStyle( + fontSize: 16, + letterSpacing: -0.64, + fontWeight: FontWeight.bold, + ), + ), + mHeight(12), + ListView.separated( + itemCount: qa.length, + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (ctx, idx) { + var obj = qa[idx]; + var qtext = isArabic ? obj["questionAR"] : obj["questionEN"]; + + return Padding( + padding: const EdgeInsets.symmetric(vertical: 10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + qtext, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + Row( + children: [ + Expanded( + child: Row( + children: [ + Radio( + value: 1, + groupValue: obj["ans"], + onChanged: (newValue) { + setState(() { + obj["ans"] = newValue; + checkAllChecked(); + }); + }), + Text( + localize.yes, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + Expanded( + child: Row( + children: [ + Radio( + value: 0, + groupValue: obj["ans"], + onChanged: (newValue) { + setState(() { + obj["ans"] = newValue; + checkAllChecked(); + }); + }), + Text( + localize.no, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ) + ], + ), + ], + ), + ); + }, + separatorBuilder: (ctx, idx) => Container(), + ), + ], + ), + ), + ), + ), + Card( + margin: EdgeInsets.zero, + elevation: 0, + child: Container( + padding: EdgeInsets.all(12), + child: FractionallySizedBox( + widthFactor: 1, + child: MaterialButton( + height: 50, + elevation: 0, + color: all2 ? CustomColors.accentColor : CustomColors.grey, + disabledColor: Theme.of(context).appBarTheme.backgroundColor!.withOpacity(0.25), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), + child: Text( + localize.next, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + letterSpacing: -0.44, + color: Colors.white, + ), + ), + onPressed: next, + ), + ), + ), + ), + ], + )); + } + + bool all2 = false; + + checkAllChecked() { + all2 = true; + qa.forEach((element) { + if (element["ans"] == 2 || element["ans"] == null) { + all2 = false; + } + }); + } + + next() async { + var sharedPref = new AppSharedPreferences(); + bool all = true; + qa.forEach((element) { + all = all && (element["ans"] == 1 || element["ans"] == 0); + }); + if (all) if (qa[0]["ans"] == 1) { + sharedPref.setObject(COVID_QA_LIST, qa); + openPassportUpdatePage(); + } else { + sharedPref.setObject(COVID_QA_LIST, qa); + getPaymentInfo(context, widget.projectId); + } + else + AppToast.showErrorToast(message: localize.pleaseSelectAllQuestionToContinue); + } + + openPassportUpdatePage() { + Navigator.push(context, FadePage(page: PassportUpdatePage())).then((value) { + print(value); + if (value != null && value == true) { + getPaymentInfo(context, widget.projectId); + } + }); + } + + List getQuestionsFromJson() { + var questionsJson = """ + [{ "id": 1, "questionEN": "Is the test intended for travel?", "questionAR": "هل تجري التحليل بغرض السفر؟", "ans": 2 }, { "id": 2, "questionEN": "Coming from outside KSA within last 2 weeks?", "questionAR": "هل قدمت من خارج المملكة خلال الأسبوعين الماضيين؟", "ans": 2 }, { "id": 3, "questionEN": "Do you currently have fever?", "questionAR": "هل تعاني حاليا من حرارة؟", "ans": 2 }, { "id": 4, "questionEN": "Did you have fever in last 2 weeks?", "questionAR": "هل عانيت من حرارة في الأسبوعين الماضيين؟", "ans": 2 }, { "id": 5, "questionEN": "Do you have a sore throat?", "questionAR": "هل لديك التهاب في الحلق؟", "ans": 2 }, { "id": 6, "questionEN": "Do you have a runny nose?", "questionAR": "هل لديك سيلان بالأنف؟" }, { "id": 7, "questionEN": "Do you have a cough?", "questionAR": "هل لديك سعال؟", "ans": 2 }, { "id": 8, "questionEN": "Do you have shortness of breath?", "questionAR": "هل تعاني من ضيق في التنفس؟", "ans": 2 }, { "id": 9, "questionEN": "Do you have nausea?", "questionAR": "هل تعاني من غثيان؟", "ans": 2 }, { "id": 10, "questionEN": "Do you have vomiting?", "questionAR": "هل تعاني من القيء؟", "ans": 2 }, { "id": 11, "questionEN": "Do you have a headache?", "questionAR": "هل تعاني من صداع في الرأس؟", "ans": 2 }, { "id": 12, "questionEN": "Do you have muscle pain?", "questionAR": "هل تعانين من آلام عضلية؟", "ans": 2 }, { "id": 13, "questionEN": "Do you have joint pain?", "questionAR": "هل تعاني من آلام المفاصل؟", "ans": 2 }, { "id": 14, "questionEN": "Do you have diarrhea?", "questionAR": "هل لديك اسهال؟", "ans": 2 } ]"""; + var map = json.decode(questionsJson) as List; + return map; + } + + getPaymentInfo(BuildContext context, String projectID) { + CovidDriveThruService service = new CovidDriveThruService(); + CovidPaymentInfoResponse covidPaymentInfoResponse = new CovidPaymentInfoResponse(); + GifLoaderDialogUtils.showMyDialog(context); + service.getCovidPaymentInformation(context, int.parse(projectID), widget.proceduresList[0].procedureID!, widget.selectedProject.testTypeEnum!, widget.selectedProject.testProcedureEnum!).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']); + Navigator.push( + context, + FadePage( + page: CovidPaymentDetails( + covidPaymentInfoResponse: covidPaymentInfoResponse, + projectID: int.parse(projectID), + proceduresList: widget.proceduresList, + selectedProject: widget.selectedProject, + ))); + } else {} + }).catchError((err) { + print(err); + }); + } +} diff --git a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart new file mode 100644 index 00000000..2c0c1164 --- /dev/null +++ b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart @@ -0,0 +1,366 @@ +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'; +import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.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:flutter_svg/flutter_svg.dart'; +import 'package:maps_launcher/maps_launcher.dart'; +import 'package:provider/provider.dart'; + +import 'covid-dirvethru-questions.dart'; + +class CovidDrivethruLocation extends StatefulWidget { + @override + _CovidDrivethruLocationState createState() => _CovidDrivethruLocationState(); +} + +class _CovidDrivethruLocationState extends State { + String projectDropdownValue = ''; + List projectsList = []; + List proceduresList = []; + bool isLocationSelected = false; + String projectLat = ""; + String projectLong = ""; + String projectName = ""; + String projectID = ""; + List imagesInfo = []; + + DriveThroughTestingCenterModel? selectedProject; + final GlobalKey locationDropdownKey = GlobalKey(); + + late ProjectViewModel projectViewModel; + + @override + void initState() { + imagesInfo.add( + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'), + ); + WidgetsBinding.instance.addPostFrameCallback((_) { + if (projectViewModel.isLogin) { + getProjectsList(context); + } + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).covidTest, + isShowAppBar: true, + imagesInfo: imagesInfo, + description: TranslationBase.of(context).covidInfo, + isShowDecPage: true, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Container( + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Padding( + padding: const EdgeInsets.only(left: 14, right: 14), + child: Column( + children: [ + Container( + alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft, + child: Text(TranslationBase.of(context).resultHeader, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, color: Colors.black, letterSpacing: -1.14)), + ), + Container( + margin: EdgeInsets.only(top: 6.0), + child: Text(TranslationBase.of(context).covidInfo, style: TextStyle(fontSize: 14.0, color: Colors.black, letterSpacing: -0.56)), + ), + Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + margin: EdgeInsets.only(top: 12), + padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectLocation, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 20, + child: DropdownButtonHideUnderline( + //Dropdown duplicate issue + child: DropdownButton( + onTap: () { + print("Clicked"); + }, + key: locationDropdownKey, + hint: new Text( + TranslationBase.of(context).selectAddress, + ), + value:selectedProject ==null || selectedProject!.projectName.isNotEmpty ?selectedProject :null, + iconSize: 0, + isExpanded: true, + style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), + items: projectsList.map((DriveThroughTestingCenterModel item) { + return new DropdownMenuItem( + value: item, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [Text(item.projectName==null ? "" : item.projectName), getCovidTestTypeImage(item)], + ), + ); + }).toList(), + onChanged: (newValue) { + setState(() { + selectedProject = newValue!; + setProjectLocation(newValue); + }); + }, + ), + ), + ), + ], + ), + ), + Icon(Icons.keyboard_arrow_down), + ], + ), + ), + ], + ), + ), + mHeight(20), + isLocationSelected + ? Stack( + children: [ + Container( + margin: EdgeInsets.only(top: 5.0), + child: Image.network("https://maps.googleapis.com/maps/api/staticmap?center=" + + this.projectLat + + "," + + this.projectLong + + "&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" + + this.projectLat + + "," + + this.projectLong + + "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"), + ), + Row( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + InkWell( + onTap: () { + getDirections(); + }, + child: Container( + decoration: cardRadius(1000), + margin: EdgeInsets.all(12), + child: Padding( + padding: const EdgeInsets.only(left: 12, right: 12, top: 6, bottom: 6), + child: Row( + children: [ + Padding( + padding: const EdgeInsets.all(3.0), + child: SvgPicture.asset( + "assets/images/new/direction.svg", + width: 13, + height: 13, + ), + ), + mWidth(6), + Text( + TranslationBase.of(context).getDirections, + style: TextStyle( + color: Colors.black, + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ) + ], + ), + ), + ), + ), + ], + ), + ], + ) + : SizedBox( + height: MediaQuery.of(context).size.height * 0.35, + ), + mHeight(12), + ], + ), + ), + ), + ), + Card( + elevation: 0, + margin: EdgeInsets.zero, + child: Container( + width: double.infinity, + padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width * 0.7, + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.accentColor, + disabledForegroundColor: CustomColors.accentColor.withOpacity(0.38), + disabledBackgroundColor: CustomColors.accentColor.withOpacity(0.12), + elevation: 0, + onPressed: () { + next(); + }, + child: Text( + TranslationBase.of(context).next, + style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, letterSpacing: -0.44, color: Colors.white), + ), + ), + )), + ), + ], + ), + ); + } + + Widget getCovidTestTypeImage(DriveThroughTestingCenterModel item) { + if (item.testTypeEnum == 1) { + return Container(child: SvgPicture.asset("assets/images/new/DriveThru.svg", width: 20.0)); + } + if (item.testTypeEnum == 2) { + return Container(child: SvgPicture.asset("assets/images/new/WalkIn.svg", width: 10.0)); + } + if (item.testTypeEnum == 3) { + return Row( + children: [ + Container(child: SvgPicture.asset("assets/images/new/WalkIn.svg", width: 10.0)), + Container(padding: EdgeInsets.only(left: 5.0, right: 5.0), child: SvgPicture.asset("assets/images/new/DriveThru.svg", width: 20.0)), + ], + ); + } else { + return SizedBox(); + } + } + + getDirections() { + if (isLocationSelected) { + MapsLauncher.launchCoordinates(double.parse(projectLat), double.parse(projectLong), this.projectName); + } else { + Utils.showErrorToast("Please select address from the dropdown menu to get directions"); + } + } + + next() { + if (isLocationSelected) { + Navigator.push(context, FadePage(page: CovidDirveThruQuestions(projectId: projectID, proceduresList: proceduresList, selectedProject: selectedProject!))); + } else { + Utils.showErrorToast("Please select address from the dropdown menu to continue"); + } + } + + back() { + Navigator.of(context).popAndPushNamed(HOME); + } + + setProjectLocation(DriveThroughTestingCenterModel newValue) { + setState(() { + this.projectLat = newValue.latitude.toString(); + this.projectLong = newValue.longitude.toString(); + this.projectName = newValue.projectName; + this.projectID = newValue.projectID.toString(); + isLocationSelected = true; + }); + getTestProcedures(context); + } + + getPaymentInfo(BuildContext context, String projectID) { + CovidDriveThruService service = new CovidDriveThruService(); + CovidPaymentInfoResponse covidPaymentInfoResponse = new CovidPaymentInfoResponse(); + GifLoaderDialogUtils.showMyDialog(context); + service.getCovidPaymentInformation(context, int.parse(projectID), proceduresList[0].procedureID!, selectedProject!.testTypeEnum!, selectedProject!.testProcedureEnum!).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']); + }); + Navigator.push( + context, + FadePage( + page: CovidPaymentDetails( + covidPaymentInfoResponse: covidPaymentInfoResponse, + projectID: int.parse(projectID), + proceduresList: proceduresList, + selectedProject: selectedProject!, + ))); + } else {} + }).catchError((err) { + print(err); + }); + } + + getTestProcedures(BuildContext context) { + CovidDriveThruService service = new CovidDriveThruService(); + GifLoaderDialogUtils.showMyDialog(context); + + service.getCovidTestProceduresList(context, selectedProject!.testTypeEnum!, selectedProject!.testProcedureEnum!, selectedProject!.projectID!).then((res) { + if (res['MessageStatus'] == 1) { + setState(() { + res['COVID19_TestProceduresList'].forEach((v) { + proceduresList.add(new CovidTestProceduresResponse.fromJson(v)); + }); + }); + print(proceduresList.length); + print(proceduresList[0].procedureName); + GifLoaderDialogUtils.hideDialog(context); + } else {} + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + getProjectsList(BuildContext context) { + CovidDriveThruService service = new CovidDriveThruService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getCovidProjectsList(context).then((res) { + projectsList.clear(); + if (res['MessageStatus'] == 1) { + setState(() { + res['List_COVID19_ProjectDriveThroughTestingCenter'].forEach((v) { + projectsList.add(new DriveThroughTestingCenterModel.fromJson(v)); + }); + }); + GifLoaderDialogUtils.hideDialog(context); + } else {} + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} diff --git a/lib/pages/Covid-DriveThru/covid-payment-alert.dart b/lib/pages/Covid-DriveThru/covid-payment-alert.dart new file mode 100644 index 00000000..60ab52c0 --- /dev/null +++ b/lib/pages/Covid-DriveThru/covid-payment-alert.dart @@ -0,0 +1,272 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-summary.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; + +class CovidPaymentAlert extends StatefulWidget { + PatientShareResponse patientShareResponse; + + CovidPaymentAlert({required this.patientShareResponse}); + + @override + _CovidPaymentAlertState createState() => _CovidPaymentAlertState(); +} + +class _CovidPaymentAlertState extends State { + AppSharedPreferences sharedPref = AppSharedPreferences(); + late AuthenticatedUser authUser; + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).covidTest, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + color: new Color(0xFFc5272d), + padding: EdgeInsets.all(20), + child: Row( + children: [ + Icon( + Icons.warning_outlined, + color: Colors.white, + ), + mWidth(12), + Expanded( + child: Text( + TranslationBase.of(context).covidAlertHeader, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.w600, + fontSize: 16.0, + letterSpacing: -0.64, + ), + ), + ) + ], + ), + ), + Container( + margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 30.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).covidAlertMins, + style: TextStyle( + fontSize: 19.0, + letterSpacing: -1.6, + fontWeight: FontWeight.bold, + ), + ), + Text( + TranslationBase.of(context).covidAlertInfo, + style: TextStyle( + color: Colors.grey[700], + fontSize: 14.0, + letterSpacing: -0.56, + ), + ), + mHeight(20), + Container( + width: double.infinity, + child: Container( + margin: EdgeInsets.zero, + decoration: cardRadius(12), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).appoInfo, + style: TextStyle( + fontSize: 16.0, + letterSpacing: -0.64, + fontWeight: FontWeight.bold, + ), + ), + mHeight(16), + Row( + children: [ + _getNormalText( + TranslationBase.of(context).hospital + ":", + ), + mWidth(6), + _getNormalText( + widget.patientShareResponse.projectName != null ? widget.patientShareResponse.projectName : "NULL", + isBold: true, + ), + ], + ), + mHeight(4), + Row( + children: [ + _getNormalText( + TranslationBase.of(context).date + ":", + ), + mWidth(6), + _getNormalText( + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.patientShareResponse.appointmentDate)), + isBold: true, + ), + ], + ), + mHeight(4), + Row( + children: [ + _getNormalText( + TranslationBase.of(context).time + ":", + ), + mWidth(6), + _getNormalText( + DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(widget.patientShareResponse.appointmentDate), false), + isBold: true, + ), + ], + ), + mHeight(4), + Row( + children: [ + _getNormalText( + TranslationBase.of(context).route + ":", + ), + mWidth(6), + _getNormalText( + widget.patientShareResponse.doctorNameObj != null ? widget.patientShareResponse.doctorNameObj : "NULL", + isBold: true, + ), + ], + ), + ], + ), + ), + ), + ), + ], + ), + ), + ], + ), + ), + ), + Card( + margin: EdgeInsets.zero, + elevation: 0, + child: Container( + margin: EdgeInsets.all(12), + width: double.infinity, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width * 0.7, + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.accentColor, + disabledForegroundColor: Colors.grey[500]!.withOpacity(0.38), + disabledBackgroundColor: Colors.grey[500]!.withOpacity(0.12), + elevation: 0, + onPressed: () { + startPaymentProcess(); + }, + child: Text( + TranslationBase.of(context).next, + style: TextStyle( + fontSize: 16.0, + letterSpacing: -0.48, + color: Colors.white, + ), + ), + ), + ), + ), + ), + ], + ), + ); + } + + _getNormalText(text, {bool isBold = false}) { + return Text( + text, + style: TextStyle( + fontSize: isBold ? 12 : 10, + letterSpacing: -0.5, + color: isBold ? Colors.black : Colors.grey[700], + fontWeight: FontWeight.w600, + ), + ); + } + + startPaymentProcess() { + navigateToPaymentMethod(context, widget.patientShareResponse); + } + + Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse) async { + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + setState(() { + authUser = data; + }); + } + + Navigator.push( + context, + FadePage( + page: CovidPaymentSummary(patientShareResponse: widget.patientShareResponse, selectedPaymentMethod: "MADA"), + ), + ); + // Navigator.push(context, FadePage(page: PaymentMethod())).then((value) { + // print(value); + // if (value != null) { + // Navigator.push( + // context, + // FadePage( + // page: CovidPaymentSummary(patientShareResponse: widget.patientShareResponse, selectedPaymentMethod: value.toString()), + // ), + // ); + // } + // }); + } + + String getDate(String appoDate) { + var appoDateFormatted = ""; + + var dateObj = DateUtil.convertStringToDate(appoDate); + + setState(() { + appoDateFormatted = DateUtil.getWeekDay(dateObj.weekday) + + ", " + + dateObj.day.toString() + + " " + + DateUtil.getMonth(dateObj.month) + + " " + + dateObj.year.toString() + + " " + + dateObj.hour.toString() + + ":" + + dateObj.minute.toString() + + ":00"; + }); + return appoDateFormatted; + } +} diff --git a/lib/pages/Covid-DriveThru/covid-payment-details.dart b/lib/pages/Covid-DriveThru/covid-payment-details.dart new file mode 100644 index 00000000..fe8c64dc --- /dev/null +++ b/lib/pages/Covid-DriveThru/covid-payment-details.dart @@ -0,0 +1,339 @@ +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-TimeSlots.dart'; +import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.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'; +import 'package:url_launcher/url_launcher.dart'; + +class CovidPaymentDetails extends StatefulWidget { + CovidPaymentInfoResponse covidPaymentInfoResponse; + int projectID; + List proceduresList; + late CovidTestProceduresResponse selectedProcedure; + DriveThroughTestingCenterModel selectedProject; + + CovidPaymentDetails({required this.covidPaymentInfoResponse, required this.projectID, required this.proceduresList, required this.selectedProject}); + + @override + _CovidPaymentDetailsState createState() => _CovidPaymentDetailsState(); +} + +class _CovidPaymentDetailsState extends State { + bool isAgree = false; + + @override + void initState() { + widget.selectedProcedure = widget.proceduresList[0]; + super.initState(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).covidTest, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Container( + // margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 100.0), + + child: Column( + children: [ + Expanded( + child: Padding( + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(TranslationBase.of(context).covidSelectProcedure, style: TextStyle(color: Colors.black, fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold)), + ...List.generate( + widget.proceduresList.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 1, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.selectedProcedure = widget.proceduresList[index]; + getPaymentInfo(context, widget.projectID.toString(), widget.selectedProcedure.procedureID!); + }); + }, + child: Row( + children: [ + Radio( + value: widget.proceduresList[index], + groupValue: widget.selectedProcedure, + activeColor: Colors.red[800], + toggleable: true, + onChanged: (value) { + setState(() { + widget.selectedProcedure = value!; + print(widget.selectedProcedure.procedureName); + getPaymentInfo(context, widget.projectID.toString(), widget.selectedProcedure.procedureID!); + }); + }, + ), + Text( + projectViewModel.isArabic ? widget.proceduresList[index].procedureNameN! : widget.proceduresList[index].procedureName!, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ) + ], + ), + ], + ), + ), + Container( + decoration: cardRadius(12), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(TranslationBase.of(context).testFee, + style: TextStyle( + color: Colors.black, + fontSize: 16.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + )), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 10, bottom: 3), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).patientShareToDo), + ), + Expanded( + child: _getNormalText(widget.covidPaymentInfoResponse.patientShareField.toString(), isBold: true), + ) + ], + ), + ), + mDivider(Colors.grey[200]!), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 3, bottom: 3), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).patientTaxToDo), + ), + Expanded( + child: _getNormalText(widget.covidPaymentInfoResponse.patientTaxAmountField.toString(), isBold: true), + ) + ], + ), + ), + mDivider(Colors.grey[200]!), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 3, bottom: 3), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo), + ), + Expanded( + child: _getNormalText(widget.covidPaymentInfoResponse.patientShareWithTaxField.toString(), isBold: true), + ) + ], + ), + ), + ], + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 0.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Checkbox( + value: isAgree, + onChanged: (value) { + setState(() { + isAgree = !isAgree; + }); + }, + activeColor: Color(0xffB8382C), + ), + Text( + TranslationBase.of(context).agreeTo, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + mWidth(3), + InkWell( + onTap: () { + launch("https://hmg.com/en/Pages/Privacy.aspx"); + }, + child: Text( + TranslationBase.of(context).termsConditoins, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + color: CustomColors.accentColor, + fontWeight: FontWeight.w600, + decoration: TextDecoration.underline, + ), + ), + ), + ], + ), + ), + mFlex(1), + Text( + TranslationBase.of(context).payOptions, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 12.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + Container(margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), child: getPaymentMethods()), + ], + ), + ), + ), + Container( + width: double.infinity, + child: Card( + elevation: 0, + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.only(top: 12, bottom: 12, left: 12, right: 12), + child: Row( + children: [ + Expanded( + flex: 1, + child: Container( + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width * 0.7, + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.accentColor, + disabledForegroundColor: Colors.grey[500]!.withOpacity(0.38), + disabledBackgroundColor: Colors.grey[500]!.withOpacity(0.12), + elevation: 0, + onPressed: () { + cancel(); + }, + child: Text( + TranslationBase.of(context).cancel_nocaps, + style: TextStyle( + fontSize: 16.0, + letterSpacing: -0.48, + color: Colors.white, + fontWeight: FontWeight.w600, + ), + ), + ), + ), + ), + ), + mWidth(12), + Expanded( + flex: 1, + child: Container( + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width * 0.7, + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.green, + disabledForegroundColor: Colors.grey[500]!.withOpacity(0.38), + disabledBackgroundColor: Colors.grey[500]!.withOpacity(0.12), + elevation: 0, + onPressed: isAgree ? next : null, + child: Text( + TranslationBase.of(context).next, + style: TextStyle(fontSize: 16.0, letterSpacing: -0.48, fontWeight: FontWeight.w600, color: Colors.white), + ), + ), + ), + ), + ), + ], + ), + ), + ), + ) + ], + ), + ), + ); + } + + void next() { + Navigator.push(context, FadePage(page: CovidTimeSlots(projectID: widget.projectID, selectedProcedure: widget.selectedProcedure, selectedProject: widget.selectedProject))); + } + + cancel() { + Navigator.pop(context); + } + + getPaymentInfo(BuildContext context, String projectID, String selectedProcedureID) { + CovidDriveThruService service = new CovidDriveThruService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getCovidPaymentInformation(context, int.parse(projectID), selectedProcedureID, widget.selectedProject.testTypeEnum!, widget.selectedProject.testProcedureEnum!).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + widget.covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']); + }); + } else {} + }).catchError((err) { + print(err); + }); + } + + _getNormalText(text, {bool isBold = false}) { + return Text( + text, + style: TextStyle( + fontSize: isBold ? 12 : 10, + letterSpacing: -0.5, + color: isBold ? Colors.black : Colors.grey[700], + fontWeight: FontWeight.w600, + ), + ); + } +} diff --git a/lib/pages/Covid-DriveThru/covid-payment-summary.dart b/lib/pages/Covid-DriveThru/covid-payment-summary.dart new file mode 100644 index 00000000..384b2422 --- /dev/null +++ b/lib/pages/Covid-DriveThru/covid-payment-summary.dart @@ -0,0 +1,481 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.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'; + +class CovidPaymentSummary extends StatefulWidget { + PatientShareResponse? patientShareResponse; + String selectedPaymentMethod; + String? selectedInstallmentPlan; + MyInAppBrowser? browser; + AuthenticatedUser? authenticatedUser; + AppSharedPreferences sharedPref = AppSharedPreferences(); + + CovidPaymentSummary({required this.patientShareResponse, required this.selectedPaymentMethod}); + + @override + _CovidPaymentSummaryState createState() => _CovidPaymentSummaryState(); +} + +class _CovidPaymentSummaryState extends State { + late ProjectViewModel projectViewModel; + late String tamaraPaymentStatus; + late String tamaraOrderID; + + String transID = ""; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).covidTest, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Container( + margin: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).confirmThePayment, + style: TextStyle( + fontSize: 19, + fontWeight: FontWeight.bold, + letterSpacing: -1.46, + ), + ), + SizedBox( + height: 12, + ), + Row( + children: [ + Text( + TranslationBase.of(context).totalBalance + ": ", + style: TextStyle( + fontSize: 12, + letterSpacing: -0.60, + ), + ), + Text( + '${widget.patientShareResponse!.patientShareWithTax} ' + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.60, + ), + ) + ], + ), + SizedBox( + height: 12, + ), + Row( + children: [ + Container( + width: 20, + height: 20, + decoration: containerColorRadiusBorderWidth(CustomColors.accentColor, 200, Colors.white, 4), + ), + Container( + height: 100.0, + padding: EdgeInsets.all(7.0), + child: Image.asset(getImagePath(widget.selectedPaymentMethod!), width: 100, height: 100), + ), + mFlex(1), + InkWell( + onTap: () { + showDraggableDialog( + context, + PaymentMethod( + onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) { + widget.selectedPaymentMethod = metohd; + widget.selectedInstallmentPlan = selectedInstallmentPlan; + setState(() {}); + }, + patientShare: widget.patientShareResponse!.patientShareWithTax, + )); + }, + child: Text( + TranslationBase.of(context).changePayment, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 12, letterSpacing: -0.48, decoration: TextDecoration.underline, color: CustomColors.accentColor), + ), + ) + ], + ), + SizedBox( + height: 12, + ), + Row( + children: [ + Expanded( + flex: 1, + child: showDetail( + TranslationBase.of(context).fileNumber, + projectViewModel.user!.patientID.toString(), + ), + ), + mWidth(6), + Expanded( + flex: 1, + child: showDetail( + TranslationBase.of(context).name, + projectViewModel.user!.firstName.toString(), + ), + ), + ], + ), + SizedBox( + height: 6, + ), + showDetail(TranslationBase.of(context).mobileNumber, projectViewModel.user!.mobileNumber!), + SizedBox( + height: 6, + ), + showDetail( + TranslationBase.of(context).depositorName, + projectViewModel.user!.firstName! + " " + projectViewModel.user!.middleName! + " " + projectViewModel.user!.lastName!, + ) + ], + ), + ), + ), + bottomSheet: Container( + color: Theme.of(context).scaffoldBackgroundColor, + margin: EdgeInsets.only(bottom: 5.0), + width: double.infinity, + padding: EdgeInsets.all(12), + child: DefaultButton( + TranslationBase.of(context).confirm.toUpperCase(), + () { + startPaymentProcess(projectViewModel.user!); + }, + color: CustomColors.green, + ), + ), + ); + } + + Widget showDetail(String title, String value) { + return Container( + width: double.infinity, + child: Container( + decoration: cardRadius(12), + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + title, + style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600, letterSpacing: -0.64), + ), + Text( + value, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.64, color: Colors.grey), + ), + ], + ), + ), + ), + ); + } + + startPaymentProcess(AuthenticatedUser authenticatedUser) { + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + appo.projectID = widget.patientShareResponse!.projectID; + appo.clinicID = widget.patientShareResponse!.clinicID; + appo.appointmentNo = widget.patientShareResponse!.appointmentNo; + + openPayment(widget.selectedPaymentMethod, authenticatedUser, double.parse(widget.patientShareResponse!.patientShareWithTax.toString()), widget.patientShareResponse!, appo); + } + + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async { + widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); + transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo); + widget.browser!.openPaymentBrowser( + amount, + "Covid appointment payment", + Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), + appo.projectID.toString(), + authenticatedUser.emailAddress!, + paymentMethod, + authenticatedUser.patientType, + authenticatedUser.firstName!, + authenticatedUser.patientID, + authenticatedUser, + widget.browser!, + widget.patientShareResponse!.isLiveCareAppointment!, + "2", + "", + widget.patientShareResponse!.appointmentDate, + widget.patientShareResponse!.appointmentNo, + widget.patientShareResponse!.clinicID, + widget.patientShareResponse!.doctorID, + widget.selectedInstallmentPlan); + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + + if (widget.selectedPaymentMethod == "TAMARA") { + if (Platform.isAndroid) { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['status']!; + tamaraOrderID = uri.queryParameters['AuthorizePaymentId']!; + } else { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['paymentStatus']!; + tamaraOrderID = uri.queryParameters['orderId']!; + } + } + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (widget.browser!.isOpened()) widget.browser!.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (widget.browser!.isOpened()) widget.browser!.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called!!!!"); + try { + if (widget.selectedPaymentMethod == "TAMARA") { + // checkTamaraPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), appo); + checkTamaraPaymentStatus(transID, appo); + // if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { + // updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(widget.selectedInstallmentPlan), appo); + // } else { + // updateTamaraRequestStatus("Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", + // num.parse(widget.selectedInstallmentPlan), appo); + // } + } else { + checkPaymentStatus(appo); + } + } catch (err) { + print(err); + } + } + + checkTamaraPaymentStatus(String orderID, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getTamaraPaymentStatus(orderID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["status"].toString().toLowerCase() == "success") { + updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID, int.parse(widget.selectedInstallmentPlan!), appo); + } else { + updateTamaraRequestStatus("Failed", "00", transID, tamaraOrderID != null ? tamaraOrderID : "", + num.parse(widget.selectedInstallmentPlan!), appo); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + addAdvancedNumberRequestTamara(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) {}).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, num selectedInstallments, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + try { + DoctorsListService service = new DoctorsListService(); + service.updateTamaraRequestStatus(responseMessage, status, clientRequestID, tamaraOrderID, selectedInstallments).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (tamaraPaymentStatus.toLowerCase() == "approved") { + markAppointmentForTamara(appo); + addAdvancedNumberRequestTamara("Tamara-Advance-0000", tamaraOrderID, appo.appointmentNo.toString(), appo); + } + }).catchError((err) { + print(err); + AppToast.showErrorToast(message: err); + GifLoaderDialogUtils.hideDialog(context); + }); + } catch (err) { + print(err); + } + } + + markAppointmentForTamara(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.markAppointmentForTamara(appo.projectID!, appo.appointmentNo.toString()).then((res) { + GifLoaderDialogUtils.hideDialog(context); + getAppoQR(context); + // autoGenerateInvoiceTamara(appo); + }).catchError((err) { + print(err); + AppToast.showErrorToast(message: err); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + autoGenerateInvoiceTamara(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + var apptData = { + "AppointmentNo": appo.appointmentNo.toString(), + "DoctorID": appo.doctorID.toString(), + "ServiceID": appo.serviceID.toString(), + "ProjectID": appo.projectID.toString(), + "ClinicID": appo.clinicID.toString(), + "AppointmentDate": appo.appointmentDate.toString(), + }; + DoctorsListService service = new DoctorsListService(); + service.autoGenerateInvoiceTamara(appo.projectID!, appo.appointmentNo.toString(), projectViewModel.user!.mobileNumber!).then((res) { + GifLoaderDialogUtils.hideDialog(context); + getAppoQR(context); + }).catchError((err) { + print(err); + AppToast.showErrorToast(message: err); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.checkPaymentStatus(transID, false, context).then((res) { + print("Printing Payment Status Reponse!!!!"); + print(res); + String paymentInfo = res['Response_Message']; + if (paymentInfo == 'Success') { + createAdvancePayment(res, appo); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['Response_Message']); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + String paymentReference = res['Fort_id'].toString(); + service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context).then((res) { + addAdvancedNumberRequest( + Utils.isVidaPlusProject(projectViewModel, appo.projectID!) + ? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString() + : res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), + paymentReference, + appo.appointmentNo.toString()); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + addAdvancedNumberRequest(String advanceNumber, String paymentReference, String appointmentID) { + DoctorsListService service = new DoctorsListService(); + service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) { + getAppoQR(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + getAppoQR(context) { + DoctorsListService service = new DoctorsListService(); + service.generateAppointmentQR(widget.patientShareResponse!, context).then((res) { + print(res); + GifLoaderDialogUtils.hideDialog(context); + navigateToQR(context, res['AppointmentQR']); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + Future navigateToQR(context, String appoQR) async { + Navigator.push( + context, + FadePage( + page: QRCode( + patientShareResponse: widget.patientShareResponse, + appoQR: appoQR, + ))); + } + + String getImagePath(String paymentMethod) { + switch (paymentMethod) { + case "MADA": + return 'assets/images/new/payment/Mada.png'; + break; + // case "SADAD": + // return 'assets/images/new-design/sadad.png'; + // break; + case "VISA": + return 'assets/images/new/payment/visa.png'; + break; + case "MASTERCARD": + return 'assets/images/new/payment/Mastercard.png'; + break; + case "Installment": + return 'assets/images/new/payment/installments.png'; + break; + case "ApplePay": + return 'assets/images/new/payment/Apple_Pay.png'; + break; + case "TAMARA": + return 'assets/images/new/payment/tamara.png'; + break; + } + + return 'assets/images/new/payment/Mada.png'; + } +} diff --git a/lib/pages/DrawerPages/family/add-family-member.dart b/lib/pages/DrawerPages/family/add-family-member.dart new file mode 100644 index 00000000..c29c8b20 --- /dev/null +++ b/lib/pages/DrawerPages/family/add-family-member.dart @@ -0,0 +1,334 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/model/family-file/add_family_file_request.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart'; +import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'add-family_type.dart'; + +class AddMember extends StatefulWidget { + @override + _AddMember createState() => _AddMember(); +} + +class _AddMember extends State { + final util = Utils(); + final nationalIDorFile = TextEditingController(); + final int loginType = AddFamilyMemberType.loginType; + String? mobileNo; + String countryCode = '966'; + bool isButtonDisabled = true; + var sharedPref = new AppSharedPreferences(); + final authService = new AuthProvider(); + bool isLoading = false; + var familyFileProvider = FamilyFilesProvider(); + + var patientShareRequestID; + var patientShareResponseID; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).myFamilyFiles, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + body: isLoading == true + ? AppCircularProgressIndicator() + : SingleChildScrollView( + child: Container( + padding: EdgeInsets.all(21.0), + height: SizeConfig.realScreenHeight! * .9, + width: SizeConfig.realScreenWidth, + child: Column( + children: [ + Expanded( + flex: 1, + child: Text( + loginType == 1 ? TranslationBase.of(context).enterNationalId : TranslationBase.of(context).enterFile, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + )), + Expanded( + flex: 4, + child: Column( + children: [ + PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value), + SizedBox( + height: 12, + ), + inputWidget(loginType == 1 ? TranslationBase.of(context).nationalIdNumber : TranslationBase.of(context).medicalFileNumber, "Xxxxxxxxx", nationalIDorFile), + ], + ), + ), + // Expanded( + // flex: 3, + // child: Column( + // mainAxisAlignment: MainAxisAlignment.end, + // children: [ + // Row( + // children: [ + // Expanded( + // child: DefaultButton( + // TranslationBase.of(context).add, + // () => {this.addMember()}, + // color: isButtonDisabled == true ? Colors.grey : CustomColors.accentColor, + // textColor: Colors.white, + // ), + // ) + // ], + // ), + // ], + // ), + // ) + ], + ), + ), + ), + bottomSheet: Container( + color: Colors.white, + padding: EdgeInsets.all(21.0), + child: DefaultButton( + TranslationBase.of(context).add, + () => {this.addMember()}, + color: isButtonDisabled == true ? Colors.grey : CustomColors.accentColor, + textColor: Colors.white, + )), + ); + } + + void validateForm() { + if (util.validateIDBox(nationalIDorFile.text, loginType) == true && mobileNo!.length >= 9 && util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true) { + setState(() { + isButtonDisabled = false; + }); + } else { + setState(() { + isButtonDisabled = true; + }); + } + } + + addMember() { + var request = AddFamilyFileReq(); + if (this.loginType == 1) { + request.sharedPatientID = 0; + request.sharedPatientIdentificationID = this.nationalIDorFile.text; + } else if (this.loginType == 2) { + request.sharedPatientID = int.parse(this.nationalIDorFile.text); + request.sharedPatientIdentificationID = ''; + } + request.searchType = this.loginType; + request.sharedPatientMobileNumber = this.mobileNo; + request.zipCode = countryCode; + request.isRegister = false; + request.patientStatus = 2; + loading(true); + familyFileProvider.addFamilyFile(request).then((value) => manageFamily(value)).catchError((err) { + loading(false); + }); + } + + manageFamily(addMemberResult) { + loading(false); + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: addMemberResult['ShareFamilyFileObj']['Message'], + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => {insertFamilyData(addMemberResult), ConfirmDialog.closeAlertDialog(context)}, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + + insertFamilyData(addMemberResult) { + + sendActivationCode(addMemberResult, addMemberResult['ShareFamilyFileObj']['IsPatientExcluded']); + // var request = InsertSharePatientFileReq(); + // request.responseID = addMemberResult['ShareFamilyFileObj']['ReponseID']; + // request.shareFamilyPatientName = addMemberResult['ShareFamilyFileObj']['SharedPatientName']; + // request.status = 2; + // if (request.patientOutSA == 1) { + // request.regionID = 2; + // } else { + // request.regionID = 1; + // } + // loading(true); + // familyFileProvider.insertNewMember(request).then((value) => sendActivationCode(value)).catchError((err) { + // loading(false); + // AppToast.showErrorToast(message: err); + // }); + } + + sendActivationCode(result, bool isExcluded) { + // var request = this.getCommonRequest(); + loading(true); + patientShareResponseID = result['ShareFamilyFileObj']['ReponseID']; + familyFileProvider.sendActivationCode(mobileNo, countryCode, nationalIDorFile.text, patientShareResponseID, isExcluded).then((res) { + patientShareRequestID = res['PatientShareRequestID']; + if (res != null && res['isSMSSent'] == true) + { + this.startSMSService(1, res); + + }else + { + this.checkActivationCodeExcluded('0000', res); + } + + }); + } + + var tempType; + + startSMSService(type, result) { + tempType = type; + loading(false); + SMSOTP( + context, + type, + mobileNo, + (value) { + this.checkActivationCode(value, result); + }, + () => { + Navigator.pop(context), + }, + ).displayDialog(context); + } + + checkActivationCodeExcluded(value, result){ + familyFileProvider.checkActivationCode(result['LogInTokenID'], value, nationalIDorFile.text, mobileNo, patientShareRequestID, patientShareResponseID).then((result) { + SMSOTP.hideSMSBox(context); + handleFamilyRequests(); + }); + } + + checkActivationCode(value, result) { + Navigator.pop(context); + GifLoaderDialogUtils.showMyDialog(context); + familyFileProvider.checkActivationCode(result['LogInTokenID'], value, nationalIDorFile.text, mobileNo, patientShareRequestID, patientShareResponseID).then((result) { + SMSOTP.hideSMSBox(context); + handleFamilyRequests(); + }).catchError((err) { + Future.delayed(Duration(seconds: 1), () { + AppToast.showErrorToast(message: err); + startSMSService(tempType, result); + }); + }); + } + + handleFamilyRequests() { + Navigator.pop(context); + sharedPref.remove(FAMILY_FILE); + Navigator.of(context).pushNamed( + MY_FAMILIY + ); + } + + loading(flag) { + setState(() { + isLoading = flag; + }); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.number, + controller: _controller, + onChanged: (value) => {validateForm()}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } +} diff --git a/lib/pages/DrawerPages/family/add-family_type.dart b/lib/pages/DrawerPages/family/add-family_type.dart new file mode 100644 index 00000000..60e396c6 --- /dev/null +++ b/lib/pages/DrawerPages/family/add-family_type.dart @@ -0,0 +1,219 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:diplomaticquarterapp/widgets/habib_logo_widget.dart'; + +class AddFamilyMemberType extends StatelessWidget { + static int loginType = 0; + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).myFamilyFiles, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + body: Padding( + padding: EdgeInsets.only(bottom: 20, left: 21, right: 21), + child: Column(children: [ + Expanded( + child: ListView( + padding: EdgeInsets.zero, + physics: BouncingScrollPhysics(), + children: [ + SizedBox(height: 21), + HabibLogoWidget(), + SizedBox(height: 21), + Text( + TranslationBase.of(context).registerInfoFamily, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + GridView( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9), + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(top: 25), + shrinkWrap: true, + children: [ + getButton(context, TranslationBase.of(context).nationalIdNumber, 'assets/images/new/national_id.svg', 1), + getButton(context, TranslationBase.of(context).medicalFileNumber, 'assets/images/new/medical_file.svg', 2), + ], + ), + SizedBox(height: 20), + // RichText( + // text: TextSpan( + // text: TranslationBase.of(context).forgotPassword, + // style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffC9272B), letterSpacing: -0.48, height: 18 / 12), + // recognizer: TapGestureRecognizer()..onTap = () => Navigator.of(context).push(FadePage(page: ForgotPassword())), + // ), + // ), + ], + ), + ), + // SizedBox( + // height: 43, + // width: double.infinity, + // child: FlatButton( + // onPressed: () {}, + // child: Text( + // TranslationBase.of(context).registerNow, + // style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.48), + // ), + // color: Color(0xffD02127), + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(6), + // ), + // ), + // ), + ]), + )); + // body: Padding( + // padding: EdgeInsets.all(20), + // child: Column( + // children: [ + // Expanded( + // flex: 6, + // child: Column( + // // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Image.asset( + // 'assets/images/habib-logo.png', + // height: 80, + // width: 80, + // ), + // Padding( + // padding: EdgeInsets.all(20), + // child: AppText( + // TranslationBase.of(context).registerInfoFamily, + // fontSize: SizeConfig.textMultiplier * 3.5, + // textAlign: TextAlign.left, + // ), + // ), + // Padding( + // padding: EdgeInsets.all(20), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Expanded( + // child: InkWell( + // onTap: () => {AddFamilyMemberType.loginType = 1, Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER)}, + // child: RoundedContainer( + // borderColor: Colors.grey, + // showBorder: true, + // child: Padding( + // padding: EdgeInsets.fromLTRB(20, 10, 20, 10), + // child: Column( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Image.asset( + // 'assets/images/id_card_icon.png', + // height: SizeConfig.imageSizeMultiplier * 12, + // width: SizeConfig.imageSizeMultiplier * 15, + // ), + // SizedBox( + // height: 20, + // ), + // AppText( + // TranslationBase.of(context).idNo, + // fontSize: SizeConfig.textMultiplier * 2, + // ) + // ], + // ), + // )))), + // Expanded( + // child: InkWell( + // onTap: () => {AddFamilyMemberType.loginType = 2, Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER)}, + // child: RoundedContainer( + // borderColor: Colors.grey, + // showBorder: true, + // child: Padding( + // padding: EdgeInsets.fromLTRB(25, 10, 25, 10), + // child: Column( + // children: [ + // Image.asset( + // 'assets/images/my_file_white_icon.png', + // height: SizeConfig.imageSizeMultiplier * 12, + // width: SizeConfig.imageSizeMultiplier * 15, + // ), + // SizedBox( + // height: 20, + // ), + // AppText( + // TranslationBase.of(context).fileNo, + // fontSize: SizeConfig.textMultiplier * 2, + // ) + // ], + // ), + // )))) + // ], + // )), + // Divider( + // color: Colors.grey, + // height: 2, + // ), + // ]), + // ), + // // Expanded( + // // flex: 2, + // // child: Column( + // // mainAxisAlignment: MainAxisAlignment.end, + // // children: [ + // // Row( + // // children: [ + // // Expanded( + // // child: DefaultButton( + // // TranslationBase.of(context).registerNow, + // // () => { + // // Navigator.of(context).pushNamed( + // // REGISTER, + // // ) + // // }, + // // )) + // // ], + // // ), + // // ], + // // )) + // ], + // ))); + } + + Widget getButton(BuildContext _context, String _title, String _icon, int _flag) { + return InkWell( + onTap: () { + AddFamilyMemberType.loginType = _flag; + Navigator.of(_context).pushNamed(ADD_FAMILY_MEMBER); + }, + child: Container( + padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SvgPicture.asset( + _icon, + height: 38, + width: 38, + ), + Text( + _title, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart new file mode 100644 index 00000000..fa256d11 --- /dev/null +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -0,0 +1,681 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart' as list; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class MyFamily extends StatefulWidget { + final bool isAppbarVisible; + Function()? onBackClick; + + MyFamily({this.isAppbarVisible = true, this.onBackClick}); + + @override + _MyFamily createState() => _MyFamily(); +} + +class _MyFamily extends State with TickerProviderStateMixin { + List imagesInfo = []; + final familyFileProvider = FamilyFilesProvider(); + AppSharedPreferences sharedPref = AppSharedPreferences(); + var userID; + late TabController _tabController; + int _tabIndex = 0; + AuthenticatedUserObject authenticatedUserObject = locator(); + AppointmentRateViewModel appointmentRateViewModel = locator(); + late ProjectViewModel projectViewModel; + AuthenticatedUser user = AuthenticatedUser(); + VitalSignService _vitalSignService = locator(); + PharmacyModuleViewModel pharmacyModuleViewModel = locator(); + late ToDoCountProviderModel toDoProvider; + var isVaiable = false; + bool isSwitchUser = false; + + @override + void initState() { + _tabController = new TabController(length: 2, vsync: this, initialIndex: 0); + checkUserData(); + super.initState(); + } + + bool expandFlag = false; + + Widget build(BuildContext context) { + imagesInfo.add( + ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/0.png'), + ); + + imagesInfo.add( + ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/1.png'), + ); + projectViewModel = Provider.of(context); + toDoProvider = Provider.of(context, listen: false); + return AppScaffold( + appBarTitle: TranslationBase.of(context).myFamilyFiles, + isShowAppBar: widget.isAppbarVisible, + imagesInfo: imagesInfo, + showNewAppBar: true, + showNewAppBarTitle: true, + onTap: widget.isAppbarVisible == false ? widget.onBackClick : null, + icon: "assets/images/new/bottom_nav/family_files.svg", + description: TranslationBase.of(context).familyInfo, + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).family), Text(TranslationBase.of(context).request)], + ), + Expanded( + child: (user != null && projectViewModel.isLogin) + ? TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [myFamilyDetails(context), myFamilyRequest(context)], + ) + : Container(child: AppText('')), + ), + DefaultButton( + TranslationBase.of(context).addFamilyMember, + () async { + Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER_TYPE); + }, + ).insideContainer, + ], + ), + ); + } + + Widget myFamilyDetails(context) { + return (familySharedRecordsList.length ?? 0) > 0 + ? ListView.separated( + padding: EdgeInsets.all(21), + itemBuilder: (context, index) { + bool isFemale = familySharedRecordsList[index].gender == 2; + if (familySharedRecordsList[index].status == 3) { + return Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(15), + ), + gradient: LinearGradient( + colors: isFemale + ? [ + Color(0xFFFBC8CC), + Color(0xFFFDA4B0), + ] + : [ + Color(0xFF7AB8FD), + Color(0xFF6EA8FF), + ], + begin: Alignment.topRight, + end: Alignment.bottomLeft, + ), + ), + child: Container( + width: MediaQuery.of(context).size.width, + padding: EdgeInsets.all(15), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + familySharedRecordsList[index].patientName!.toLowerCase().capitalizeFirstofEach, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w700, color: isFemale ? Color(0xff5A282E) : Colors.white, letterSpacing: -0.42), + ), + Text( + TranslationBase.of(context).fileNumber + ': ' + familySharedRecordsList[index].responseID.toString(), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w400, color: isFemale ? Color(0xff5A282E) : Colors.white, letterSpacing: -0.4, height: 16 / 10), + ), + Text( + familySharedRecordsList[index].age.toString() + ' ' + TranslationBase.of(context).years + ', ' + familySharedRecordsList[index].genderDescription!, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w400, color: isFemale ? Color(0xff5A282E) : Colors.white, letterSpacing: -0.4, height: 16 / 10), + ), + ], + ), + ), + SizedBox(width: 4), + Column( + children: [ + InkWell( + onTap: () { + switchUser(familySharedRecordsList[index], context); + }, + child: Container( + decoration: BoxDecoration(color: Colors.black.withOpacity(0.1), borderRadius: BorderRadius.circular(20)), + padding: EdgeInsets.fromLTRB(10, 8, 12, 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SvgPicture.asset("assets/images/new-design/switch.svg", height: 16, color: isFemale ? Color(0Xff5A282E) : Colors.white), + SizedBox(width: 4), + Texts(TranslationBase.of(context).switchUser, color: isFemale ? Color(0Xff5A282E) : Colors.white, fontSize: 12, fontWeight: FontWeight.w600) + ], + ), + ), + ), + SizedBox(height: 8), + InkWell( + onTap: () { + deleteFamily(familySharedRecordsList[index], context); + }, + child: Container( + decoration: BoxDecoration(color: Colors.black.withOpacity(0.1), borderRadius: BorderRadius.circular(20)), + padding: EdgeInsets.fromLTRB(10, 8, 12, 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SvgPicture.asset("assets/images/new-design/delete.svg", height: 22, color: isFemale ? Color(0Xff5A282E) : Colors.white), + SizedBox(width: 4), + Texts(TranslationBase.of(context).delete, color: isFemale ? Color(0Xff5A282E) : Colors.white, fontSize: 12, fontWeight: FontWeight.w600), + ], + ), + ), + ), + ], + ), + ], + ), + ), + ); + } else + return SizedBox(height: 0); + }, + separatorBuilder: (context, index) => SizedBox(height: 12), + itemCount: familySharedRecordsList.length) + : getNoDataWidget(context); + } + + int checkActive(List list) { + return list.where((o) => o.status == 3).toList().length; + } + + Widget myFamilyRequest(context) { + return ListView( + children: [ + SizedBox(height: 21), + pendingRequestView(), + SizedBox(height: 12), + sentRequestView(), + SizedBox(height: 12), + approvedRequestView(), + ], + ); + } + + Widget requestDecoratedContainerWithExpandable(String title, List columns, List rows) { + return AppExpandableNotifier( + title: title, + bodyWidget: Container( + margin: EdgeInsets.only(left: 21, right: 21, bottom: 21), + padding: EdgeInsets.only(top: 12, bottom: 12, left: 14, right: 14), + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: Border.all(width: 1, color: CustomColors.backgroudGreyColor), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Column(children: [ + Row(children: columns), + SizedBox(height: 6), + Divider(color: CustomColors.textDarkColor, height: 1, thickness: 1), + SizedBox(height: 8), + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + padding: EdgeInsets.zero, + itemBuilder: (cxt, index) => rows[index], + separatorBuilder: (cxt, index) => SizedBox(height: 12), + itemCount: rows.length), + ]), + ), + ); + } + + Widget pendingRequestView() { + return requestDecoratedContainerWithExpandable( + TranslationBase.of(context).userViewRequest, + [ + Expanded(flex: 3, child: columnText(TranslationBase.of(context).name)), + Expanded(flex: 1, child: columnText(TranslationBase.of(context).allow)), + Expanded(flex: 1, child: columnText(TranslationBase.of(context).reject)), + ], + pendingRecordsList.map((result) { + return pendingItemView(result); + }).toList()); + } + + Widget pendingItemView(GetAllSharedRecordsByStatusList result) { + return Row( + children: [ + Expanded(flex: 3, child: rowText(result.patientName!)), + Expanded( + flex: 1, + child: Align( + alignment: Alignment.centerLeft, + child: InkWell( + child: SvgPicture.asset("assets/images/new-design/allow.svg", height: 17), + onTap: () { + acceptRemoveRequest(result.iD, 3, context); + }, + ), + ), + ), + Expanded( + flex: 1, + child: Align( + alignment: Alignment.centerLeft, + child: InkWell( + child: SvgPicture.asset("assets/images/new-design/reject.svg", height: 17), + onTap: () { + acceptRemoveRequest(result.iD, 4, context); + }, + ), + ), + ), + ], + ); + } + + Widget sentRequestView() { + return requestDecoratedContainerWithExpandable( + TranslationBase.of(context).sentRequest, + [ + Expanded(flex: 3, child: columnText(TranslationBase.of(context).name)), + Expanded(flex: 1, child: columnText(TranslationBase.of(context).status)), + ], + sentRecordsList.map((result) { + return sentItemView(result); + }).toList()); + } + + Widget sentItemView(GetAllSharedRecordsByStatusList result) { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded(flex: 3, child: rowText(result.patientName!)), + Expanded( + flex: 1, + child: Container( + padding: EdgeInsets.only(top: 3, bottom: 3, left: 8, right: 8), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(50), + color: result.status == 3 ? Color(0xff349745) : Color(0xffD02127), + ), + child: Text( + result.statusDescription != null ? result.statusDescription! : "", + style: TextStyle( + fontSize: 10, + color: Colors.white, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + ), + ), + ], + ); + } + + Widget approvedRequestView() { + return requestDecoratedContainerWithExpandable( + TranslationBase.of(context).userView, + [ + Expanded(flex: 4, child: columnText(TranslationBase.of(context).name)), + Expanded(flex: 2, child: columnText(TranslationBase.of(context).delete)), + ], + approvedRecordsList.map((result) { + return approvedItemView(result); + }).toList()); + } + + Widget approvedItemView(GetAllSharedRecordsByStatusList result) { + return Row( + children: [ + Expanded(flex: 4, child: rowText(result.patientName!)), + Expanded( + flex: 2, + child: Align( + alignment: Alignment.centerLeft, + child: InkWell( + child: Icon( + Icons.delete, + color: Colors.red, + size: 22, + ), + onTap: () { + acceptRemoveRequest(result.iD, 4, context); + }, + ), + ), + ), + ], + ); + } + + String isAvailable() { + if (isVaiable == false) { + this.isVaiable = true; + return TranslationBase.of(context).noDataAvailable; + } else { + return ""; + } + } + + deleteFamily(family, context) { + showDialog( + context: context, + builder: (cxt) => ConfirmWithMessageDialog( + message: TranslationBase.of(context).removeFamilyMember, + onTap: () { + removeFamily(family, context); + }, + ), + ); + } + + removeFamily(GetAllSharedRecordsByStatusList family, context) { + GifLoaderDialogUtils.showMyDialog(context); + this.userID = family.iD; + Map request = {}; + request['ID'] = this.userID; + request['IsActive'] = false; + this.familyFileProvider.deativateActivateMemberFile(request).then((value) { + refreshFamily(context); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + refreshFamily(context) async { + await sharedPref.remove(FAMILY_FILE); + await checkUserData(); + } + + switchUser(user, context) { + GifLoaderDialogUtils.showMyDialog(context); + int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2; + // this + // .familyFileProvider + // .silentLoggin(user) + // .then((value) => loginAfter(value, context)); + + // Utils.showProgressDialog(context); + this.familyFileProvider.silentLoggin(user is AuthenticatedUser ? null : user, languageID, mainUser: user is AuthenticatedUser).then((value) => loginAfter(value, context)).catchError((err) { + print("err:$err"); + AppToast.showErrorToast(message: err.toString(), localContext: context); + Navigator.of(context).pop(); + }); + } + + checkIfIsInPatient(BuildContext context) { + bool isAdmitted = false; + bool hasAdmissionRequest = false; + GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; + GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel; + ClinicListService service = new ClinicListService(); + service.checkIfInPatientAPI(context).then((res) { + if (res['MessageStatus'] == 1) { + isAdmitted = res['isAdmitted']; + hasAdmissionRequest = res['hasAdmissionRequests']; + print("IS ADMITTED: $isAdmitted"); + print("Has Admission Request: $hasAdmissionRequest"); + if (isAdmitted) { + if (res['PatientAdmittedInformation'].length != 0) { + getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); + projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); + projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); + projectViewModel.setIsPatientAdmitted(true); + } + } + if (hasAdmissionRequest) { + if (res['MedicalInstruction'].length != 0) { + getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]); + // projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']); + projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['projectId']); + projectViewModel.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel); + projectViewModel.setPatientHasAdmissionRequest(true); + } + } + } else {} + }).catchError((err) { + projectViewModel.setIsPatientAdmitted(false); + projectViewModel.setPatientHasAdmissionRequest(false); + }); + } + + loginAfter(result, context) async { + var currentLang = await sharedPref.getString(APP_LANGUAGE); + Provider.of(AppGlobal.context, listen: false).setPrivilege(privilegeList: result, isLoginChild: true); + result = list.CheckActivationCode.fromJson(result); + var familyFile = await sharedPref.getObject(FAMILY_FILE); + var bloodType = await sharedPref.getString(BLOOD_TYPE); + var mainUser = await sharedPref.getObject(MAIN_USER); + var loginType = await sharedPref.getInt(LAST_LOGIN); + var pushToken = await sharedPref.getString(PUSH_TOKEN); + // var oneSignalPushToken = await sharedPref.getString(ONESIGNAL_APNS_TOKEN ?? ""); + this.sharedPref.clear(); + if (mainUser["PatientID"] != result.list.patientID) { + result.list.isFamily = true; + } + this.sharedPref.setString(APP_LANGUAGE, currentLang); + this.sharedPref.setString(BLOOD_TYPE, bloodType); + this.sharedPref.setString(PUSH_TOKEN, pushToken); + // this.sharedPref.setString(ONESIGNAL_APNS_TOKEN, oneSignalPushToken); + this.sharedPref.setInt(LAST_LOGIN, loginType ?? 1); + await this.sharedPref.setObject(MAIN_USER, mainUser); + await this.sharedPref.setObject(USER_PROFILE, result.list); + await this.sharedPref.setObject(FAMILY_FILE, familyFile); + await this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); + await this.sharedPref.setString(TOKEN, result.authenticationTokenID); + _vitalSignService.heightCm = ""; + _vitalSignService.weightKg = ""; + Provider.of(context, listen: false).user = result.list; + Provider.of(context, listen: false).setUser(result.list); + Provider.of(context, listen: false).authenticatedUserObject.user = result.list; + + await this.sharedPref.remove(APPOINTMENT_HISTORY_MEDICAL); + + try { + // await appointmentRateViewModel.getIsLastAppointmentRatedList(); + checkIfIsInPatient(context); + await getToDoCount(); + if (appointmentRateViewModel.isHaveAppointmentNotRate) { + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: RateAppointmentDoctor(), + ), + (r) => false); + } else { + Navigator.pushAndRemoveUntil(AppGlobal.context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + } + } catch (er) { + GifLoaderDialogUtils.hideDialog(context); + } + } + + deactivateRequest(ID, status, context) { + GifLoaderDialogUtils.showMyDialog(context); + Map request = {}; + request["ID"] = ID; + request["Status"] = status; + this.familyFileProvider.deactivateFamily(request).then((value) => {GifLoaderDialogUtils.hideDialog(context), refreshFamily(context)}); + } + + acceptRemoveRequest(ID, status, context) { + GifLoaderDialogUtils.showMyDialog(context); + Map request = {}; + request["ID"] = ID; + request["Status"] = status; + this.familyFileProvider.acceptRejectFamily(request).then((value) async { + await refreshFamily(context); + await GifLoaderDialogUtils.hideDialog(context); + }); + } + + checkUserData() async { + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + await getFamilyFiles(); + setState(() { + this.user = data; + }); + } + } + + List familySharedRecordsList = []; + List pendingRecordsList = []; + List approvedRecordsList = []; + List sentRecordsList = []; + + Future getFamilyFiles() async { + int languageID = projectViewModel.isArabic ? 1 : 2; + GetAllSharedRecordsByStatusResponse? familySharedRecords; + if (await sharedPref.getObject(FAMILY_FILE) != null) { + familySharedRecords = GetAllSharedRecordsByStatusResponse.fromJson(await sharedPref.getObject(FAMILY_FILE)); + } + GifLoaderDialogUtils.showMyDialog(context); + try { + if (familySharedRecords == null) { + familySharedRecords = await familyFileProvider.getSharedRecordByStatus(languageID); + } + familySharedRecordsList = []; + sentRecordsList = []; + familySharedRecords!.getAllSharedRecordsByStatusList!.forEach((element) { + if (element.status == 3) { + familySharedRecordsList.add(element); + } + sentRecordsList.add(element); + }); + approvedRecordsList = []; + pendingRecordsList = []; + GetAllSharedRecordsByStatusResponse pendingAndApprovedRecords = await getUserViewRequest(languageID); + + pendingAndApprovedRecords.getAllSharedRecordsByStatusList!.forEach((element) { + print(element.toJson()); + if (element.status == 2) { + pendingRecordsList.add(element); + } else if (element.status == 3) { + approvedRecordsList.add(element); + } + }); + GifLoaderDialogUtils.hideDialog(context); + } catch (ex) { + familySharedRecords = GetAllSharedRecordsByStatusResponse(getAllSharedRecordsByStatusList: []); + GifLoaderDialogUtils.hideDialog(context); + } + } + + Future getUserViewRequest(int languageID) async { + var user = await sharedPref.getObject(USER_PROFILE); + return familyFileProvider.getUserViewRequest(user['PatientID'], languageID); + } + + Future getSentRequest() async { + // var user = await sharedPref.getObject(USER_PROFILE); + return familyFileProvider.getUserSentRequest(); + } + + getToDoCount() async { + toDoProvider.setState(0, 0, true, toDoProvider.notificationsCount); + ClinicListService service = ClinicListService(); + try { + var res = await service.getActiveAppointmentNo(context); + print(res['AppointmentActiveNumber']); + if (res['MessageStatus'] == 1 && res['AppointmentActiveNumber'] != null) { + // toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount); + toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider.notificationsCount); + } else {} + } catch (ex) { + print("getToDoCount:$ex"); + } + } + + Widget columnText(String title) { + return Text( + title, + // textAlign: TextAlign.left, + style: TextStyle( + fontSize: 12, + color: CustomColors.textDarkColor, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ); + } + + Widget rowText(String title) { + return Text( + title, + // textAlign: TextAlign.left, + style: TextStyle( + fontSize: 10, + color: CustomColors.textColor, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ); + } +} diff --git a/lib/pages/DrawerPages/notifications/notification_details_page.dart b/lib/pages/DrawerPages/notifications/notification_details_page.dart new file mode 100644 index 00000000..8b670190 --- /dev/null +++ b/lib/pages/DrawerPages/notifications/notification_details_page.dart @@ -0,0 +1,140 @@ +import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_response_model.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; +import 'package:flutter/material.dart'; +import 'package:youtube_player_flutter/youtube_player_flutter.dart'; + +class NotificationsDetailsPage extends StatefulWidget { + final GetNotificationsResponseModel notification; + + NotificationsDetailsPage({required this.notification}); + + @override + State createState() => _NotificationsDetailsPageState(); +} + +class _NotificationsDetailsPageState extends State { + late YoutubePlayerController _controller; + + @override + void initState() { + _controller = YoutubePlayerController( + initialVideoId: getVideoURL(), + flags: YoutubePlayerFlags( + autoPlay: true, + mute: false, + ), + ); + super.initState(); + } + + getDateForm(String date) { + DateTime d = DateUtil.convertStringToDate(date); + String monthName = DateUtil.getMonth(d.month).toString(); + TimeOfDay timeOfDay = TimeOfDay(hour: d.hour, minute: d.minute); + String minute = timeOfDay.minute < 10 ? timeOfDay.minute.toString().padLeft(2, '0') : timeOfDay.minute.toString(); + + String hour = '${timeOfDay.hourOfPeriod}:$minute'; + if (timeOfDay.period == DayPeriod.am) { + hour = hour + "AM"; + } else { + { + hour = hour + "PM"; + } + } + return monthName + ',${d.day},${d.year}, $hour'; + } + + String getVideoURL() { + if (widget.notification.videoURL != null && widget.notification.notificationType == "2") { + String videoId; + videoId = YoutubePlayer.convertUrlToId(widget.notification.videoURL)!; + print(videoId); // BBAyRBTfsOU + return videoId; + }else{ + return ""; + } + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).notificationDetails, + body: ListView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + children: [ + Text( + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.notification.createdOn!)) + + " " + + DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(widget.notification.createdOn!), false), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.64, + ), + ), + SizedBox(height: 18), + Text( + widget.notification.message ?? "", + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + letterSpacing: -0.48, + ), + ), + if (widget.notification.notificationType == "2") + Padding( + padding: const EdgeInsets.only(top: 18), + child: YoutubePlayer( + controller: _controller, + showVideoProgressIndicator: true, + ), + ), + if (widget.notification.messageTypeData != null) + if (widget.notification.messageTypeData!.length != 0 && widget.notification.notificationType != "2") + Padding( + padding: const EdgeInsets.only(top: 18), + child: Image.network(widget.notification.messageTypeData!, loadingBuilder: (BuildContext context, Widget child, ImageChunkEvent? loadingProgress) { + if (loadingProgress == null) return child; + return Center( + child: SizedBox( + width: 40.0, + height: 40.0, + child: AppCircularProgressIndicator(), + ), + ); + }, fit: BoxFit.fill), + ), + SizedBox(height: 18), + // Text( + // widget.notification.message!.trim(), + // style: TextStyle( + // fontSize: 12, + // fontWeight: FontWeight.w600, + // color: Color(0xff575757), + // letterSpacing: -0.48, + // ), + // ), + // Text( + // widget.notification.message.trim(), + // style: TextStyle( + // fontSize: 12, + // fontWeight: FontWeight.w600, + // color: Color(0xff575757), + // letterSpacing: -0.48, + // ), + // ), + ], + ), + ); + } +} diff --git a/lib/pages/DrawerPages/notifications/notifications_page.dart b/lib/pages/DrawerPages/notifications/notifications_page.dart new file mode 100644 index 00000000..b5373131 --- /dev/null +++ b/lib/pages/DrawerPages/notifications/notifications_page.dart @@ -0,0 +1,156 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_request_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/notifications_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notification_details_page.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:provider/provider.dart'; + +// ignore: must_be_immutable +class NotificationsPage extends StatelessWidget { + int currentIndex = 0; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + AppGlobal.context = context; + return BaseView( + onModelReady: (model) { + GetNotificationsRequestModel getNotificationsRequestModel = new GetNotificationsRequestModel(currentPage: currentIndex, pagingSize: 14, notificationStatusID: 2); + + model.getNotifications(getNotificationsRequestModel, context); + }, + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).notifications, + baseViewModel: model, + body: ListView.separated( + physics: BouncingScrollPhysics(), + itemBuilder: (context, index) { + if (index == model.notifications.length) { + return InkWell( + onTap: () async { + GifLoaderDialogUtils.showMyDialog(context); + currentIndex++; + GetNotificationsRequestModel getNotificationsRequestModel = new GetNotificationsRequestModel(currentPage: currentIndex, pagingSize: 14, notificationStatusID: 2); + + await model.getNotifications(getNotificationsRequestModel, context); + GifLoaderDialogUtils.hideDialog(context); + }, + child: Padding( + padding: const EdgeInsets.only(top: 12, bottom: 12), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + Icons.notifications_active, + color: CustomColors.accentColor, + size: 24, + ), + SizedBox(width: 8), + Text(TranslationBase.of(context).moreNotifications, + style: TextStyle(color: CustomColors.accentColor, fontWeight: FontWeight.w600, letterSpacing: -0.42, decoration: TextDecoration.underline)), + ], + ), + ), + ); + } + return InkWell( + onTap: () async { + if (!model.notifications[index].isRead!) { + model.markAsRead(model.notifications[index].id); + } + Navigator.push( + context, + FadePage( + page: NotificationsDetailsPage( + notification: model.notifications[index], + ), + ), + ); + }, + child: Container( + width: double.infinity, + padding: EdgeInsets.fromLTRB(15.0, 14, 21, 12), + decoration: BoxDecoration( + color: model.notifications[index].isRead! ? Theme.of(context).scaffoldBackgroundColor : CustomColors.accentColor.withOpacity(0.05), + border: projectViewModel.isArabic + ? Border( + right: BorderSide( + color: model.notifications[index].isRead! ? Theme.of(context).scaffoldBackgroundColor : CustomColors.accentColor, + width: 6.0, + ), + ) + : Border( + left: BorderSide( + color: model.notifications[index].isRead! ? Theme.of(context).scaffoldBackgroundColor : CustomColors.accentColor, + width: 6.0, + ), + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Expanded( + child: Text( + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.notifications[index].createdOn!)) + + " " + + DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(model.notifications[index].createdOn!), false), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.64, + ), + ), + ), + if (model.notifications[index].messageType == "image") + Icon( + FontAwesomeIcons.image, + color: Color(0xffC9C9C9), + ) + ], + ), + SizedBox(height: 4), + Text( + model.notifications[index].message!.trim(), + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + letterSpacing: -0.48, + ), + ), + ], + ), + ), + ); + }, + separatorBuilder: (context, index) { + return Column( + children: [ + Divider( + color: Color(0xffEFEFEF), + thickness: 2.0, + height: 1, + ), + ], + ); + }, + itemCount: model.notifications.length + 1), + ), + ); + } +} diff --git a/lib/pages/ErService/AmbulanceReq.dart b/lib/pages/ErService/AmbulanceReq.dart new file mode 100644 index 00000000..afcf4e58 --- /dev/null +++ b/lib/pages/ErService/AmbulanceReq.dart @@ -0,0 +1,99 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/am_request_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/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart'; +import 'OrderLogPage.dart'; + +class AmbulanceReq extends StatefulWidget { + @override + _AmbulanceReqState createState() => _AmbulanceReqState(); +} + +class _AmbulanceReqState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + List imagesInfo =[]; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/Ambulance/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/Ambulance/ar/0.png')); + + return BaseView( + onModelReady: (model) => model.getAmRequestOrders(projectViewModel.isArabic ? 1 : 2), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).transportationService, + description: TranslationBase.of(context).infoAmbulance, + imagesInfo: imagesInfo, + baseViewModel: model, + body: Column( + children: [ + TabBar( + isScrollable: false, + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 15, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 15, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [ + Text(TranslationBase.of(context).transportationService), + Text(TranslationBase.of(context).ordersLog), + ], + ), + Expanded( + child: TabBarView( + physics: NeverScrollableScrollPhysics(), + controller: _tabController, + children: [ + AmbulanceRequestIndexPage( + amRequestViewModel: model, + tabController: _tabController, + ), + OrderLogPage( + amRequestViewModel: model, + ) + ], + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart new file mode 100644 index 00000000..fc4155ca --- /dev/null +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart @@ -0,0 +1,401 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/er/AmbulanceRequestOrdersModel.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/ErService/widgets/StepsWidget.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'BillAmount.dart'; +import 'PickupLocation.dart'; +import 'SelectTransportationMethod.dart'; +import 'Summary.dart'; + +class AmbulanceRequestIndexPage extends StatefulWidget { + final AmRequestViewModel amRequestViewModel; + final TabController tabController; + AmbulanceRequestIndexPage({Key? key, required this.amRequestViewModel, required this.tabController}); + + @override + _AmbulanceRequestIndexPageState createState() => _AmbulanceRequestIndexPageState(); +} + +class _AmbulanceRequestIndexPageState extends State { + int currentIndex = 0; + late PageController pageController; + PatientER _patientER = PatientER(); + + PatientER_RC _patientER_RC = PatientER_RC(); + + TransportationDetails transportationDetails = new TransportationDetails(); + + late int status; + late String _statusDisp; + late Color _color; + + _changeCurrentTab(int tab) { + setState(() { + currentIndex = tab; + }); + pageController.animateToPage(tab, duration: Duration(milliseconds: 800), curve: Curves.easeOutQuart); + } + + @override + void initState() { + super.initState(); + pageController = new PageController(); + _patientER_RC.transportationDetails = transportationDetails; + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + AmbulanceRequestOrdersModel order = widget.amRequestViewModel.pendingAmbulanceRequestOrder ?? AmbulanceRequestOrdersModel(); + + if(widget.amRequestViewModel.pendingAmbulanceRequestOrder != null) { + int status = order.statusId!; + _statusDisp = order.statusText!; + if (status == 1) { + //pending + _color = Color(0xffCC9B14); + } else if (status == 2) { + //processing + _color = Color(0xff2E303A); + } else if (status == 3) { + //completed + _color = Color(0xff359846); + } else if (status == 4 || status == 6 || status == 7) { + //cancel // Rejected + _color = Color(0xffD02127); + } + } + + return AppScaffold( + body: widget.amRequestViewModel.pendingAmbulanceRequestOrder != null && order != null + ? SingleChildScrollView( + child: Column( + children: [ + SizedBox( + height: 10, + ), + Container( + margin: EdgeInsets.all(21), + decoration: BoxDecoration( + color: _color, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Container( + margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), + padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _statusDisp, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _color, letterSpacing: -0.4, height: 16 / 10), + ), + SizedBox(height: 6), + Text( + '${TranslationBase.of(context).requestID}: ${order.iD}', + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).pickupDate + ": ", + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Expanded( + child: Text( + DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(order.created!)!), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 16 / 10), + ), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).transportMethod + ": ", + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Expanded( + child: Text( + order.serviceText!, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 16 / 10), + ), + ), + ], + ), + SizedBox( + height: 20.0, + ), + ], + ), + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + SizedBox(height: 12), + if (order.statusId == 1 || order.statusId == 2) + InkWell( + onTap: () { + showConfirmMessage(widget.amRequestViewModel, order.iD!, context); + }, + child: Container( + padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), + decoration: BoxDecoration( + color: Color(0xffD02127), + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.circular(10), + ), + child: Text( + TranslationBase.of(context).cancel_nocaps, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4), + ), + ), + ), + ], + ), + ], + ), + Row( + children: [ + Container( + margin: projectViewModel.isArabic ? EdgeInsets.only(left: 10.0) : EdgeInsets.only(right: 10.0), + width: 8, + height: 8, + decoration: containerRadius( + CustomColors.textColor, + 100, + ), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).pickupLocation + ": ", + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Container( + width: MediaQuery.of(context).size.width * 0.7, + child: Text( + order.pickupLocation!.trim().toString(), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48), + ), + ), + ], + ), + ], + ), + Container( + height: 20.0, + width: 1.0, + color: CustomColors.grey2, + margin: const EdgeInsets.only(left: 3.0, right: 3.0), + ), + Row( + children: [ + Container( + margin: projectViewModel.isArabic ? EdgeInsets.only(left: 10.0) : EdgeInsets.only(right: 10.0), + width: 8, + height: 8, + decoration: containerRadius( + CustomColors.accentColor, + 100, + ), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).dropoffLocation + ": ", + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Text( + order.dropOffLocation!.trim().toString(), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48), + ), + ], + ), + ], + ), + ], + ), + ), + ), + + // Container( + // margin: EdgeInsets.only(left: 18, right: 18), + // decoration: BoxDecoration( + // color: Colors.white, + // borderRadius: BorderRadius.circular(2), + // ), + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // OrderLogItem( + // title: TranslationBase.of(context).reqId, + // value: widget.amRequestViewModel.pendingAmbulanceRequestOrder.iD.toString(), + // ), + // OrderLogItem( + // title: TranslationBase.of(context).status, + // value: widget.amRequestViewModel.pendingAmbulanceRequestOrder.statusText, + // ), + // OrderLogItem( + // title: TranslationBase.of(context).pickupDate, + // value: DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.amRequestViewModel.pendingAmbulanceRequestOrder.created)), + // ), + // OrderLogItem( + // title: TranslationBase.of(context).pickupLocation, + // value: widget.amRequestViewModel.pendingAmbulanceRequestOrder.pickupLocation, + // ), + // OrderLogItem( + // title: TranslationBase.of(context).dropoffLocation, + // value: widget.amRequestViewModel.pendingAmbulanceRequestOrder.dropOffLocation, + // ), + // OrderLogItem( + // title: TranslationBase.of(context).transportMethod, + // value: widget.amRequestViewModel.pendingAmbulanceRequestOrder.serviceText, + // ), + // Container( + // padding: EdgeInsets.all(10), + // width: double.maxFinite, + // margin: EdgeInsets.only(bottom: 4, left: 4, right: 4), + // decoration: BoxDecoration( + // borderRadius: BorderRadius.only( + // bottomRight: Radius.circular(12), + // bottomLeft: Radius.circular(12), + // ), + // color: Colors.white), + // child: SecondaryButton( + // color: Colors.red[900], + // textColor: Colors.white, + // label: TranslationBase.of(context).cancel, + // onTap: () { + // widget.amRequestViewModel.updatePressOrder(presOrderID: widget.amRequestViewModel.pendingAmbulanceRequestOrder.iD); + // }, + // ), + // ) + // ], + // ), + // ), + ], + ), + ) + : Column( + children: [ + SizedBox( + height: 20, + ), + Container( + margin: EdgeInsets.only(left: 12, right: 12), + child: StepsWidget( + index: currentIndex, + changeCurrentTab: _changeCurrentTab, + ), + ), + Expanded( + child: PageView( + physics: NeverScrollableScrollPhysics(), + controller: pageController, + children: [ + //Container(), + SelectTransportationMethod( + changeCurrentTab: _changeCurrentTab, + patientER: _patientER, + patientER_RC: _patientER_RC, + amRequestViewModel: widget.amRequestViewModel, + ), + PickupLocation( + changeCurrentTab: _changeCurrentTab, + patientER: _patientER, + patientER_RC: _patientER_RC, + amRequestViewModel: widget.amRequestViewModel, + ), + Container(), + // BillAmount( + // changeCurrentTab: _changeCurrentTab, + // patientER: _patientER, + // patientER_RC: _patientER_RC, + // amRequestViewModel: widget.amRequestViewModel, + // ), + Summary( + changeCurrentTab: _changeCurrentTab, + patientER: _patientER, + patientER_RC: _patientER_RC, + amRequestViewModel: widget.amRequestViewModel, + tabController: widget.tabController, + ), + ], + ), + ), + ], + ), + ); + } + + void showConfirmMessage(AmRequestViewModel model, int presOrderID, BuildContext context) { + showDialog( + context: context, + builder: (cxt) => ConfirmWithMessageDialog( + message: TranslationBase.of(context).cancelOrderMsg, + onTap: () { + Future.delayed(new Duration(milliseconds: 300)).then((value) async { + // GifLoaderDialogUtils.showMyDialog(context); + await model.updatePressOrder(presOrderID: presOrderID); + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + // GifLoaderDialogUtils.hideDialog(context); + } else { + AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); + // GifLoaderDialogUtils.hideDialog(context); + } + }); + }, + )); + return; + } +} diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/BillAmount.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/BillAmount.dart new file mode 100644 index 00000000..0371fd24 --- /dev/null +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/BillAmount.dart @@ -0,0 +1,337 @@ +import 'package:diplomaticquarterapp/core/enum/Ambulate.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class BillAmount extends StatefulWidget { + final Function changeCurrentTab; + final PatientER patientER; + final PatientER_RC patientER_RC; + final AmRequestViewModel amRequestViewModel; + + BillAmount({Key? key, required this.changeCurrentTab, required this.patientER, required this.patientER_RC, required this.amRequestViewModel}); + + @override + _BillAmountState createState() => _BillAmountState(); +} + +class _BillAmountState extends State { + Ambulate _ambulate = Ambulate.None; + String note = ""; + + @override + void initState() { + // if (widget.patientER_RC.transportationDetails.ambulate != null) { + // setState(() { + // _ambulate = widget.patientER.ambulate; + // note = widget.patientER.requesterNote; + // }); + // } + super.initState(); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowDecPage: false, + isShowAppBar: false, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Container( + margin: EdgeInsets.only(left: 12, right: 12, top: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(TranslationBase.of(context).billAmount, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + SizedBox( + height: 10, + ), + Container( + decoration: cardRadius(12), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 10, bottom: 3), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).patientShareToDo), + ), + Expanded( + child: _getNormalText(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod!.price}', isBold: true), + ) + ], + ), + ), + mDivider(Colors.grey[200]!), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 3, bottom: 3), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).patientTaxToDo), + ), + Expanded( + child: _getNormalText(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod!.priceVAT}', isBold: true), + ) + ], + ), + ), + mDivider(Colors.grey[200]!), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 3, bottom: 3), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo), + ), + Expanded( + child: Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + _getNormalText(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}', isBold: true, isTotal: true), + ], + ), + ) + ], + ), + ), + ], + ), + ), + ), + SizedBox( + height: 10, + ), + Text(TranslationBase.of(context).selectAmbulate, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + SizedBox( + height: 5, + ), + Row( + children: [ + InkWell( + onTap: () { + setState(() { + _ambulate = Ambulate.Wheelchair; + }); + }, + child: Container( + width: MediaQuery.of(context).size.width * 0.9, + child: ListTile( + contentPadding: EdgeInsets.only(left: 0.0, right: 0.0), + title: Row( + children: [ + Radio( + value: Ambulate.Wheelchair, + groupValue: _ambulate, + onChanged: (value) { + setState(() { + _ambulate = value!; + }); + }, + ), + Text( + TranslationBase.of(context).wheelchair, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ), + ), + ], + ), + Row( + children: [ + InkWell( + onTap: () { + setState(() { + _ambulate = Ambulate.Walker; + }); + }, + child: Container( + width: MediaQuery.of(context).size.width * 0.9, + child: ListTile( + contentPadding: EdgeInsets.only(left: 0.0, right: 0.0), + title: Row( + children: [ + Radio( + value: Ambulate.Walker, + groupValue: _ambulate, + onChanged: (value) { + setState(() { + _ambulate = value!; + }); + }, + ), + Text( + TranslationBase.of(context).walker, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ), + ), + ], + ), + Row( + children: [ + InkWell( + onTap: () { + setState(() { + _ambulate = Ambulate.Stretcher; + }); + }, + child: Container( + width: MediaQuery.of(context).size.width * 0.9, + child: ListTile( + contentPadding: EdgeInsets.only(left: 0.0, right: 0.0), + title: Row( + children: [ + Radio( + value: Ambulate.Stretcher, + groupValue: _ambulate, + onChanged: (value) { + setState(() { + _ambulate = value!; + }); + }, + ), + Text( + TranslationBase.of(context).stretcher, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ), + ), + ], + ), + Row( + children: [ + InkWell( + onTap: () { + setState(() { + _ambulate = Ambulate.None; + }); + }, + child: Container( + width: MediaQuery.of(context).size.width * 0.9, + child: ListTile( + contentPadding: EdgeInsets.only(left: 0.0, right: 0.0), + title: Row( + children: [ + Radio( + value: Ambulate.None, + groupValue: _ambulate, + onChanged: (value) { + setState(() { + _ambulate = value!; + }); + }, + ), + Text( + TranslationBase.of(context).none, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ), + ), + ], + ), + SizedBox( + height: 12, + ), + Container( + decoration: cardRadius(10), + child: Padding( + padding: EdgeInsets.all(8.0), + child: TextField( + maxLines: 5, + decoration: InputDecoration.collapsed( + hintText: TranslationBase.of(context).notes, hintStyle: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16)), + onChanged: (value) { + setState(() { + note = value; + }); + }, + ), + ), + ), + SizedBox( + height: 100, + ), + ], + ), + ), + ), + bottomSheet: Container( + color: Theme.of(context).scaffoldBackgroundColor, + padding: EdgeInsets.all(12.0), + child: DefaultButton( + TranslationBase.of(context).next, + () { + setState(() { + widget.patientER_RC.transportationDetails!.ambulate = _ambulate.selectAmbulateNumber(); + widget.patientER_RC.transportationDetails!.ambulateTitle = _ambulate.getAmbulateTitle(context); + widget.patientER_RC.transportationDetails!.notes = note; + // widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber(); + widget.changeCurrentTab(3); + }); + }, + // label: TranslationBase.of(context).next, + ), + ), + ); + } + + _getNormalText(text, {bool isBold = false, bool isTotal = false}) { + return Text( + text, + style: TextStyle( + fontSize: isBold + ? isTotal + ? 16 + : 12 + : 10, + letterSpacing: -0.5, + color: isBold ? Colors.black : Colors.grey[700], + fontWeight: FontWeight.w600, + ), + ); + } +} diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart new file mode 100644 index 00000000..d0beeab7 --- /dev/null +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart @@ -0,0 +1,715 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/ambulanceRequest/locationDetails.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/ProgressDialog.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +import '../AvailableAppointmentsPage.dart'; + +enum HaveAppointment { YES, NO } + +class PickupLocation extends StatefulWidget { + final Function changeCurrentTab; + final PatientER patientER; + final PatientER_RC patientER_RC; + final AmRequestViewModel amRequestViewModel; + + PickupLocation({Key? key, required this.changeCurrentTab, required this.patientER, required this.patientER_RC, required this.amRequestViewModel}); + + @override + _PickupLocationState createState() => _PickupLocationState(); +} + +class _PickupLocationState extends State { + bool _isInsideHome = false; + HaveAppointment _haveAppointment = HaveAppointment.NO; + + // double _latitude; + // double _longitude; + AppoitmentAllHistoryResultList? myAppointment; + HospitalsModel? _selectedHospital; + LocationDetails? _result; + + LocationUtils? locationUtils; + late ProjectViewModel projectViewModel; + + @override + void initState() { + super.initState(); + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) => locationUtils!.getCurrentLocation()); + setState(() {}); + } + + // _getCurrentLocation() async { + // await Geolocator.getLastKnownPosition().then((value) { + // _latitude = value.latitude; + // _longitude = value.longitude; + // }).catchError((e) { + // _longitude = 0; + // _latitude = 0; + // }); + // } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: false, + isShowDecPage: false, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Container( + margin: EdgeInsets.only(left: 12, right: 12, top: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (widget.patientER_RC.transportationDetails!.direction == 0) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(TranslationBase.of(context).pickupLocation, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + SizedBox( + height: 15, + ), + Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: () { + if (projectViewModel.latitude != null && projectViewModel.longitude != null) { + Navigator.push( + context, + FadePage( + page: PickupLocationFromMap( + latitude: projectViewModel.latitude ?? 0, + longitude: projectViewModel.longitude ?? 0, + onPick: (value) { + setState(() { + _result = value; + }); + }, + )), + ); + } else { + locationUtils!.getCurrentLocation(); + } + }, + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectMap, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + Text( + getSelectFromMapName(context), + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + ], + ), + ), + Icon(Icons.arrow_drop_down), + ], + ), + ), + ), + SizedBox( + height: 12, + ), + Text(TranslationBase.of(context).pickupSpot, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + SizedBox( + height: 5, + ), + InkWell( + onTap: () { + setState(() { + _isInsideHome = !_isInsideHome; + }); + }, + child: Container( + child: ListTile( + contentPadding: EdgeInsets.only(left: 0.0, right: 0.0), + title: Row( + children: [ + Checkbox( + value: _isInsideHome, + onChanged: (value) { + setState(() { + _isInsideHome = value!; + }); + }, + ), + Text( + TranslationBase.of(context).insideHome, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ), + ), + SizedBox( + height: 12, + ), + Text(TranslationBase.of(context).haveAppo, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + SizedBox( + height: 5, + ), + Row( + children: [ + Expanded( + child: InkWell( + onTap: () { + if (myAppointment == null) { + getAppointment(); + setState(() { + _haveAppointment = HaveAppointment.YES; + }); + } + }, + child: Container( + child: ListTile( + contentPadding: EdgeInsets.only(left: 0.0, right: 0.0), + title: Row( + children: [ + Radio( + value: HaveAppointment.YES, + groupValue: _haveAppointment, + onChanged: (value) { + if (myAppointment == null) { + getAppointment(); + setState(() { + _haveAppointment = value!; + }); + } + }, + ), + Text( + TranslationBase.of(context).yes, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ), + ), + ), + Expanded( + child: InkWell( + onTap: () { + setState(() { + _haveAppointment = HaveAppointment.NO; + myAppointment = AppoitmentAllHistoryResultList(); + }); + }, + child: Container( + child: ListTile( + contentPadding: EdgeInsets.only(left: 0.0, right: 0.0), + title: Row( + children: [ + Radio( + value: HaveAppointment.NO, + groupValue: _haveAppointment, + onChanged: (value) { + setState(() { + _haveAppointment = value!; + myAppointment = AppoitmentAllHistoryResultList(); + }); + }, + ), + Text( + TranslationBase.of(context).no, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ), + ), + ), + ], + ), + if (myAppointment != null) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 12, + ), + DoctorCard( + isInOutPatient: myAppointment!.isInOutPatient, + name: myAppointment!.doctorTitle! + " " + myAppointment!.doctorNameObj!, + profileUrl: myAppointment!.doctorImageURL, + subName: myAppointment!.clinicName, + isLiveCareAppointment: myAppointment!.isLiveCareAppointment, + date: DateUtil.convertStringToDate(myAppointment!.appointmentDate!), + isSortByClinic: false, + rating: myAppointment!.actualDoctorRate! + 0.0, + appointmentTime: myAppointment!.isLiveCareAppointment! + ? DateUtil.convertStringToDate(myAppointment!.appointmentDate!).toString().split(" ")[1].substring(0, 5) + : myAppointment!.startTime!.substring(0, 5), + remainingTimeInMinutes: null), + ], + ), + SizedBox( + height: 12, + ), + if (_haveAppointment == HaveAppointment.NO) Text(TranslationBase.of(context).dropoffLocation, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + SizedBox( + height: 8, + ), + if (_haveAppointment == HaveAppointment.NO) + Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: () { + confirmSelectHospitalDialog(widget.amRequestViewModel.hospitals); + }, + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectHospital, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + Text( + getHospitalName(""), + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + ], + ), + ), + Icon(Icons.arrow_drop_down), + ], + ), + ), + ), + ], + ), + if (widget.patientER_RC.transportationDetails!.direction == 1) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(TranslationBase.of(context).pickupLocation, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + SizedBox( + height: 15, + ), + Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: () { + confirmSelectHospitalDialog(widget.amRequestViewModel.hospitals); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectHospital, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + Text( + getHospitalName(""), + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + ], + ), + ), + Icon( + Icons.arrow_drop_down, + size: 24, + color: Colors.black, + ) + ], + ), + ), + ), + SizedBox( + height: 12, + ), + Text(TranslationBase.of(context).dropoffLocation, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + SizedBox( + height: 8, + ), + Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: () { + if (projectViewModel.latitude != null && projectViewModel.longitude != null) { + Navigator.push( + context, + FadePage( + page: PickupLocationFromMap( + latitude: projectViewModel.latitude, + longitude: projectViewModel.longitude, + onPick: (value) { + setState(() { + _result = value; + }); + }, + ), + ), + ); + } else { + locationUtils!.getCurrentLocation(); + } + }, + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectMap, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + Text( + getSelectFromMapName(context), + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + ], + ), + ), + Icon(Icons.arrow_drop_down), + ], + ), + ), + ), + ], + ), + // SizedBox( + // height: 45, + // ), + // if (myAppointment != null) + // SizedBox( + // height: 100, + // ), + Container( + margin: EdgeInsets.only(top: 12), + decoration: cardRadius(12), + padding: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(TranslationBase.of(context).billAmount + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + SizedBox(height: 16.0), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + Row( + children: [ + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + (widget.patientER_RC.transportationDetails!.tripType == 1 + ? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}' + : ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'), + style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold), + ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ], + ) + ], + ), + ), + SizedBox( + height: 100, + ), + ], + ), + ), + ), + bottomSheet: Container( + color: Theme.of(context).scaffoldBackgroundColor, + padding: EdgeInsets.all(12.0), + child: Row( + children: [ + Expanded( + flex: 1, + child: DefaultButton( + TranslationBase.of(context).back, + () { + widget.changeCurrentTab(0); + }, + ), + ), + SizedBox(width: 12.0), + Expanded( + flex: 1, + child: DefaultButton( + TranslationBase.of(context).next, + () { + if (_result == null || _selectedHospital == null) + AppToast.showErrorToast(message: TranslationBase.of(context).selectAll); + else + setState(() { + widget.patientER_RC.transportationDetails!.pickupSpot = _isInsideHome ? 1 : 0; + if (widget.patientER_RC.transportationDetails!.direction == 0) { + // To Hospital + widget.patientER_RC.transportationDetails!.dropoffLatitude = _result!.lat.toStringAsFixed(6); + widget.patientER_RC.transportationDetails!.dropoffLongitude = _result!.long.toStringAsFixed(6); + widget.patientER_RC.transportationDetails!.pickupLatitude = _selectedHospital!.latitude; + widget.patientER_RC.transportationDetails!.pickupLongitude = _selectedHospital!.longitude; + } else { + // From Hospital + widget.patientER_RC.transportationDetails!.pickupLatitude = _selectedHospital!.latitude; + widget.patientER_RC.transportationDetails!.pickupLongitude = _selectedHospital!.longitude; + widget.patientER_RC.transportationDetails!.dropoffLatitude = _result!.lat.toStringAsFixed(6); + widget.patientER_RC.transportationDetails!.dropoffLongitude = _result!.long.toStringAsFixed(6); + } + + widget.patientER_RC.transportationDetails!.dropoffLocationName = widget.patientER_RC.transportationDetails!.direction == 1 ? _result!.formattedAddress : _selectedHospital!.name; + + widget.patientER_RC.patientIdentificationID = widget.amRequestViewModel.user.patientIdentificationNo; + widget.patientER_RC.transportationDetails!.pickupDateTime = DateUtil.convertDateToStringLocation(DateTime.now()); + widget.patientER_RC.transportationDetails!.pickupLocationName = widget.patientER_RC.transportationDetails!.direction == 1 ? _selectedHospital!.name : _result!.formattedAddress; + widget.patientER_RC.projectID = widget.amRequestViewModel.user.projectID; + widget.patientER_RC.patientID = widget.amRequestViewModel.user.patientID; + widget.patientER_RC.transportationDetails!.requesterIsOutSA = false; + widget.patientER_RC.transportationDetails!.requesterMobileNo = widget.amRequestViewModel.user.mobileNumber; + widget.patientER_RC.transportationDetails!.requesterFileNo = widget.amRequestViewModel.user.patientID; + + if (_haveAppointment == HaveAppointment.YES) { + widget.patientER_RC.transportationDetails!.appointmentNo = myAppointment!.appointmentNo.toString(); + widget.patientER_RC.transportationDetails!.appointmentClinicName = myAppointment!.clinicName; + widget.patientER_RC.transportationDetails!.appointmentDoctorName = myAppointment!.doctorNameObj; + widget.patientER_RC.transportationDetails!.appointmentBranch = myAppointment!.projectName; + widget.patientER_RC.transportationDetails!.appointmentTime = myAppointment!.appointmentDate; + widget.patientER_RC.transportationDetails!.haveAppointment = 1; + widget.patientER_RC.transportationDetails!.dropoffLatitude = myAppointment!.latitude; + widget.patientER_RC.transportationDetails!.dropoffLongitude = myAppointment!.longitude; + widget.patientER_RC.transportationDetails!.dropoffLocationName = myAppointment!.projectName; + } else { + widget.patientER_RC.transportationDetails!.appointmentNo = "0"; + widget.patientER_RC.transportationDetails!.appointmentClinicName = ""; + widget.patientER_RC.transportationDetails!.appointmentDoctorName = ""; + widget.patientER_RC.transportationDetails!.appointmentBranch = ""; + widget.patientER_RC.transportationDetails!.appointmentTime = ""; + widget.patientER_RC.transportationDetails!.haveAppointment = 0; + } + + widget.patientER_RC.transportationDetails!.pickupSpot = _isInsideHome ? 1 : 0; + + widget.patientER_RC.transportationDetails!.ambulate = 3; + widget.patientER_RC.transportationDetails!.ambulateTitle = "none"; + widget.patientER_RC.transportationDetails!.notes = ""; + + widget.changeCurrentTab(3); + }); + }, + color: CustomColors.green, + ), + ), + ], + ), + ), + ); + } + + int _selectedHospitalIndex = -1; + + void confirmSelectHospitalDialog(List hospitals) { + List list = [ + for (int i = 0; i < hospitals.length; i++) RadioSelectionDialogModel(hospitals[i].name! + ' ${hospitals[i].distanceInKilometers} ' + TranslationBase.of(context).km, i), + ]; + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: _selectedHospitalIndex, + isScrollable: true, + onValueSelected: (index) { + _selectedHospitalIndex = index; + _selectedHospital = hospitals[index]; + setState(() {}); + }, + ), + ); + } + + String getHospitalName(String title) { + return _selectedHospital == null ? title : _selectedHospital!.name!; + } + + String getSelectFromMapName(context) { + return _result != null + ? _result!.formattedAddress != null + ? _result!.formattedAddress! + : "" + : ""; + } + + getAppointment() { + GifLoaderDialogUtils.showMyDialog(context); + widget.amRequestViewModel.getAppointmentHistory().then((value) { + if (widget.amRequestViewModel.state == ViewState.Error || widget.amRequestViewModel.state == ViewState.ErrorLocal) { + AppToast.showErrorToast(message: widget.amRequestViewModel.error); + } else if (widget.amRequestViewModel.appoitmentAllHistoryResultList.length > 0) { + GifLoaderDialogUtils.hideDialog(context); + Navigator.push( + context, + FadePage( + page: AvailableAppointmentsPage( + appointmentsAllHistoryList: widget.amRequestViewModel.appoitmentAllHistoryResultList, + ), + ), + ).then((value) { + if (value != null) + setState(() { + myAppointment = value; + HospitalsModel hospitalsModel = HospitalsModel(); + hospitalsModel.name = myAppointment!.projectName; + hospitalsModel.iD = myAppointment!.projectID; + hospitalsModel.mainProjectID = myAppointment!.projectID; + hospitalsModel.latitude = myAppointment!.latitude; + hospitalsModel.longitude = myAppointment!.longitude; + _selectedHospital = hospitalsModel; + }); + else { + ProgressDialogUtil.hideProgressDialog(context); + setState(() { + _haveAppointment = HaveAppointment.NO; + }); + } + }); + } else { + GifLoaderDialogUtils.hideDialog(context); + setState(() { + _haveAppointment = HaveAppointment.NO; + }); + AppToast.showErrorToast(message: TranslationBase.of(context).noAppointment); + } + }).catchError((e) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: e); + }); + } +} diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart new file mode 100644 index 00000000..1dac66a0 --- /dev/null +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart @@ -0,0 +1,417 @@ +import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; +import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +enum Direction { ToHospital, FromHospital } + +enum Way { OneWay, TwoWays } + +class SelectTransportationMethod extends StatefulWidget { + final Function changeCurrentTab; + final PatientER patientER; + final PatientER_RC patientER_RC; + final AmRequestViewModel amRequestViewModel; + + SelectTransportationMethod({Key? key, required this.changeCurrentTab, required this.patientER, required this.patientER_RC, required this.amRequestViewModel}); + + @override + _SelectTransportationMethodState createState() => _SelectTransportationMethodState(); +} + +class _SelectTransportationMethodState extends State { + PatientERTransportationMethod _erTransportationMethod = PatientERTransportationMethod(); + Direction _direction = Direction.FromHospital; + Way _way = Way.OneWay; + + OrderService _orderService = OrderService.AMBULANCE; + + @override + void initState() { + super.initState(); + // if (widget.patientER.direction != null) { + // _direction = widget.patientER.direction == 0 ? Direction.ToHospital : Direction.FromHospital; + // _way = widget.patientER.tripType == 1 ? Way.OneWay : Way.TwoWays; + // _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[(widget.patientER.selectedAmbulate - 1)]; + // } else { + // if (widget.amRequestViewModel.amRequestModeList.length != 0) _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[widget.amRequestViewModel.amRequestModeList.length - 1]; + // } + + //RC API Revamp + if (widget.patientER_RC.transportationDetails!.direction != null) { + _direction = widget.patientER_RC.transportationDetails!.direction == 0 ? Direction.ToHospital : Direction.FromHospital; + _way = widget.patientER_RC.transportationDetails!.tripType == 1 ? Way.OneWay : Way.TwoWays; + _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[(widget.patientER_RC.transportationDetails!.ambulate! - 1)]; + } else { + if (widget.amRequestViewModel.amRequestModeList.length != 0) _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[widget.amRequestViewModel.amRequestModeList.length - 1]; + } + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: false, + isShowDecPage: false, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Container( + margin: EdgeInsets.only(left: 12, right: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 12, + ), + Text(TranslationBase.of(context).transportHeading, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + Container( + margin: EdgeInsets.only(top: 12), + decoration: cardRadius(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ...List.generate( + widget.amRequestViewModel.amRequestModeList.length, + (index) => InkWell( + onTap: () { + setState(() { + _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[index]; + }); + }, + child: Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 4, + child: ListTile( + contentPadding: EdgeInsets.only(left: 0.0, right: 0.0), + title: Row( + children: [ + Radio( + value: widget.amRequestViewModel.amRequestModeList[index], + groupValue: _erTransportationMethod, + onChanged: (value) { + setState(() { + _erTransportationMethod = value!; + }); + }, + ), + Flexible( + child: Text( + projectViewModel.isArabic ? widget.amRequestViewModel.amRequestModeList[index].textN! : widget.amRequestViewModel.amRequestModeList[index].text!, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ), + ], + ), + ), + ), + Expanded( + flex: 1, + child: Row( + children: [ + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + ' ${widget.amRequestViewModel.amRequestModeList[index].priceTotal}', + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ) + ], + ), + ), + ), + ), + ], + ), + ), + SizedBox( + height: 12, + ), + Text(TranslationBase.of(context).directionHeading, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + Container( + width: double.maxFinite, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: InkWell( + onTap: () { + setState(() { + _direction = Direction.ToHospital; + }); + }, + child: Container( + width: double.maxFinite, + child: ListTile( + contentPadding: EdgeInsets.only(left: 0.0, right: 0.0), + title: Row( + children: [ + Radio( + value: Direction.ToHospital, + groupValue: _direction, + onChanged: (value) { + setState(() { + _direction = value!; + }); + }, + ), + Text(TranslationBase.of(context).toHospital, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + )), + ], + ), + ), + ), + ), + ), + Expanded( + child: InkWell( + onTap: () { + setState(() { + _direction = Direction.FromHospital; + }); + }, + child: Container( + width: double.maxFinite, + child: ListTile( + contentPadding: EdgeInsets.only(left: 0.0, right: 0.0), + title: Row( + children: [ + Radio( + value: Direction.FromHospital, + groupValue: _direction, + onChanged: (value) { + setState(() { + _direction = value!; + }); + }, + ), + Text(TranslationBase.of(context).fromHospital, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + )), + ], + ), + ), + ), + ), + ), + ], + ), + ), + if (_direction == Direction.ToHospital) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 8, + ), + Text(TranslationBase.of(context).wayHeading, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + SizedBox( + height: 5, + ), + Container( + child: Row( + children: [ + Expanded( + child: InkWell( + onTap: () { + setState(() { + _way = Way.OneWay; + }); + }, + child: Container( + child: ListTile( + contentPadding: EdgeInsets.only(left: 0.0, right: 0.0), + title: Row( + children: [ + Radio( + value: Way.OneWay, + groupValue: _way, + onChanged: (value) { + setState(() { + _way = value!; + }); + }, + ), + Text(TranslationBase.of(context).oneDirec, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + )), + ], + ), + ), + ), + ), + ), + Expanded( + child: InkWell( + onTap: () { + setState(() { + _way = Way.TwoWays; + }); + }, + child: Container( + child: ListTile( + contentPadding: EdgeInsets.only(left: 0.0, right: 0.0), + title: Row( + children: [ + Radio( + value: Way.TwoWays, + groupValue: _way, + onChanged: (value) { + setState(() { + _way = value!; + }); + }, + ), + Text( + TranslationBase.of(context).twoDirec, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ), + ), + ), + ], + ), + ), + // SizedBox( + // height: 30, + // ), + ], + ), + Container( + margin: EdgeInsets.only(top: 12), + decoration: cardRadius(12), + padding: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(TranslationBase.of(context).billAmount + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + SizedBox(height: 16.0), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + Row( + children: [ + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + (_way == Way.OneWay ? ' ${_erTransportationMethod.priceTotal}' : ' ${(_erTransportationMethod.priceTotal * 2)}'), + style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold), + ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ], + ) + ], + ), + ), + SizedBox( + height: 100, + ), + ], + ), + ), + ), + bottomSheet: Container( + color: Theme.of(context).scaffoldBackgroundColor, + padding: EdgeInsets.all(12.0), + child: Row( + children: [ + Expanded( + flex: 1, + child: DefaultButton( + TranslationBase.of(context).back, + () { + Navigator.pop(context); + }, + )), + SizedBox(width: 12.0), + Expanded( + flex: 1, + child: DefaultButton( + TranslationBase.of(context).next, + () { + setState(() { + // widget.patientER.transportationMethodId = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); + // widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 0; + // widget.patientER.tripType = _way == Way.TwoWays ? 0 : 1; + // widget.patientER.selectedAmbulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); + // widget.patientER.patientERTransportationMethod = _erTransportationMethod; + // widget.patientER.orderServiceID = _orderService.getIdOrderService(); + // widget.patientER.pickupUrgency = 1; + // widget.patientER.lineItemNo = 1; + // widget.patientER.cost = _erTransportationMethod.price.toDouble(); + // widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0; + // widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble(); + // widget.changeCurrentTab(1); + + // widget.patientER_RC.transportationDetails.id = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); + widget.patientER_RC.transportationDetails!.direction = _direction == Direction.ToHospital ? 0 : 1; + widget.patientER_RC.transportationDetails!.tripType = _way == Way.TwoWays ? 0 : 1; + widget.patientER_RC.transportationDetails!.ambulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); + widget.patientER_RC.transportationDetails!.transportationType = _erTransportationMethod.iD.toString(); + widget.patientER_RC.patientERTransportationMethod = _erTransportationMethod; + widget.patientER_RC.transportationDetails!.pickupUrgency = 1; + // widget.patientER.orderServiceID = _orderService.getIdOrderService(); + // widget.patientER.lineItemNo = 1; + // widget.patientER.cost = _erTransportationMethod.price.toDouble(); + // widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0; + // widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble(); + widget.changeCurrentTab(1); + }); + }, + color: CustomColors.green, + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart new file mode 100644 index 00000000..86442ce6 --- /dev/null +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart @@ -0,0 +1,234 @@ +import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class Summary extends StatefulWidget { + final Function(int)? changeCurrentTab; + final PatientER patientER; + final PatientER_RC patientER_RC; + final AmRequestViewModel amRequestViewModel; + final TabController tabController; + + Summary({Key? key, required this.changeCurrentTab, required this.patientER, required this.patientER_RC, required this.amRequestViewModel, required this.tabController}); + + @override + _SummaryState createState() => _SummaryState(); +} + +class _SummaryState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return AppScaffold( + isShowDecPage: false, + isShowAppBar: false, + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(left: 12, right: 12, top: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(TranslationBase.of(context).RRTSummary, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + SizedBox( + height: 5, + ), + Container( + width: double.infinity, + padding: EdgeInsets.all(10), + // margin: EdgeInsets.only(top: 12), + decoration: cardRadius(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _getNormalText(TranslationBase.of(context).transportMethod), + projectViewModel.isArabic + ? _getNormalText( + '${widget.patientER_RC.patientERTransportationMethod!.textN}', + isBold: true, + ) + : _getNormalText( + '${widget.patientER_RC.patientERTransportationMethod!.text}', + isBold: true, + ), + SizedBox( + height: 8, + ), + _getNormalText(TranslationBase.of(context).directions), + _getNormalText( + widget.patientER_RC.transportationDetails!.direction == 0 ? TranslationBase.of(context).toHospital : TranslationBase.of(context).fromHospital, + isBold: true, + ), + SizedBox( + height: 8, + ), + _getNormalText( + TranslationBase.of(context).pickupLocation, + ), + _getNormalText( + '${widget.patientER_RC.transportationDetails!.pickupLocationName}', + isBold: true, + ), + SizedBox( + height: 8, + ), + _getNormalText(TranslationBase.of(context).dropoffLocation), + _getNormalText( + '${widget.patientER_RC.transportationDetails!.dropoffLocationName}', + isBold: true, + ), + SizedBox( + height: 8, + ), + _getNormalText(TranslationBase.of(context).way), + _getNormalText( + widget.patientER_RC.transportationDetails!.tripType == 0 ? TranslationBase.of(context).twoDirec : TranslationBase.of(context).oneDirec, + isBold: true, + ), + SizedBox( + height: 8, + ), + // // _getNormalText(TranslationBase.of(context).notes), + // // _getNormalText( + // // '${widget.patientER_RC.transportationDetails.notes ?? '---'}', + // // isBold: true, + // // ), + // SizedBox( + // height: 8, + // ), + ], + ), + ), + // SizedBox( + // height: 20, + // ), + // Text(TranslationBase.of(context).billAmount, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + // SizedBox( + // height: 5, + // ), + Container( + margin: EdgeInsets.only(top: 12), + decoration: cardRadius(12), + padding: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(TranslationBase.of(context).billAmount + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + SizedBox(height: 16.0), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + Row( + children: [ + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + (widget.patientER_RC.transportationDetails!.tripType == 1 + ? ' ${widget.patientER_RC.patientERTransportationMethod!.priceTotal}' + : ' ${(widget.patientER_RC.patientERTransportationMethod!.priceTotal * 2)}'), + style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold), + ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ], + ) + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 12), + decoration: cardRadius(12), + padding: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(TranslationBase.of(context).contactRRT + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)), + SizedBox(height: 16.0), + InkWell( + onTap: () { + launchUrl( + Uri.parse("tel://0115259555"), + ); + }, + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text("0115259555", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold)), + Icon( + Icons.headset_mic_rounded, + size: 30.0, + ) + ], + ), + ) + ], + ), + ), + SizedBox(height: 80), + ], + ), + ), + ), + bottomSheet: Container( + color: Theme.of(context).scaffoldBackgroundColor, + padding: EdgeInsets.all(12.0), + child: Row( + children: [ + Expanded( + flex: 1, + child: DefaultButton( + TranslationBase.of(context).back, + () { + widget.changeCurrentTab!(1); + }, + ), + ), + SizedBox(width: 12.0), + Expanded( + flex: 1, + child: DefaultButton( + TranslationBase.of(context).submit, + () async { + await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC); + widget.tabController.animateTo(1); + }, + color: CustomColors.green, + ), + ), + ], + ), + ), + ); + } + + _getNormalText(text, {bool isBold = false, bool isTotal = false}) { + return Text( + text, + style: TextStyle( + fontSize: isBold + ? isTotal + ? 16 + : 12 + : 10, + letterSpacing: -0.5, + color: isBold ? Colors.black : Colors.grey[700], + fontWeight: FontWeight.w600, + ), + ); + } +} diff --git a/lib/pages/ErService/AvailableAppointmentsPage.dart b/lib/pages/ErService/AvailableAppointmentsPage.dart new file mode 100644 index 00000000..58d23080 --- /dev/null +++ b/lib/pages/ErService/AvailableAppointmentsPage.dart @@ -0,0 +1,58 @@ +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class AvailableAppointmentsPage extends StatelessWidget { + final List appointmentsAllHistoryList; + + const AvailableAppointmentsPage({Key? key, required this.appointmentsAllHistoryList}) : super(key: key); + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).myAppointmentsList, + showNewAppBar: true, + backgroundColor: Color(0xffF8F8F8), + showNewAppBarTitle: true, + body: SingleChildScrollView( + child: Container( + padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + height: 12, + ), + ...List.generate( + appointmentsAllHistoryList.length, + (index) => InkWell( + onTap: () { + Navigator.pop(context, appointmentsAllHistoryList[index]); + }, + child: DoctorCard( + isInOutPatient: appointmentsAllHistoryList[index].isInOutPatient, + name: appointmentsAllHistoryList[index].doctorTitle! + " " + appointmentsAllHistoryList[index].doctorNameObj!, + profileUrl: appointmentsAllHistoryList[index].doctorImageURL, + subName: appointmentsAllHistoryList[index].clinicName, + isLiveCareAppointment: appointmentsAllHistoryList[index].isLiveCareAppointment, + date: DateUtil.convertStringToDate(appointmentsAllHistoryList[index].appointmentDate!), + isSortByClinic: false, + rating: appointmentsAllHistoryList[index].actualDoctorRate! + 0.0, + appointmentTime: appointmentsAllHistoryList[index].isLiveCareAppointment! + ? DateUtil.convertStringToDate(appointmentsAllHistoryList[index].appointmentDate!).toString().split(" ")[1].substring(0, 5) + : appointmentsAllHistoryList[index].startTime!.substring(0, 5), + remainingTimeInMinutes: null), + ), + ) + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInBookAppointment.dart b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInBookAppointment.dart new file mode 100644 index 00000000..946f6003 --- /dev/null +++ b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInBookAppointment.dart @@ -0,0 +1,203 @@ +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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'; + +class EROnlineCheckInBookAppointment extends StatefulWidget { + const EROnlineCheckInBookAppointment(); + + @override + State createState() => _EROnlineCheckInBookAppointmentState(); +} + +class _EROnlineCheckInBookAppointmentState extends State with SingleTickerProviderStateMixin { + late ProjectViewModel projectViewModel; + List projectsList = []; + final GlobalKey projectDropdownKey = GlobalKey(); + HospitalsModel? selectedHospital; + String projectDropdownValue = ""; + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((_) { + getProjectsList(); + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).emergency + " ${TranslationBase.of(context).checkinOptions}", + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF8F8F8), + body: Padding( + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InkWell( + onTap: () { + openDropdown(projectDropdownKey); + }, + child: Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectHospital, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + key: projectDropdownKey, + hint: new Text(TranslationBase.of(context).selectHospital), + value: selectedHospital, + iconSize: 0, + isExpanded: true, + style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black), + items: projectsList.map((item) { + return new DropdownMenuItem( + value: item, + child: new Text(item.name! + " - " + item.distanceInKilometers.toString() + " " + TranslationBase.of(context).km), + ); + }).toList(), + onChanged: (newValue) async { + setState(() { + selectedHospital = newValue; + projectDropdownValue = newValue!.mainProjectID.toString(); + }); + }, + ), + ), + ), + ], + ), + ), + Icon(Icons.keyboard_arrow_down), + ], + ), + ), + ), + mHeight(16), + Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).clinicName, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Text( + "ER Clinic", + style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black), + ), + ], + ), + ), + ], + ), + ), + bottomSheet: Container( + height: 80, + color: CustomColors.white, + padding: EdgeInsets.fromLTRB(12.0, 12.0, 12.0, 25.0), + child: DefaultButton( + TranslationBase.of(context).bookAppo, + () { + if (projectDropdownValue == "" || selectedHospital == null) { + AppToast.showErrorToast(message: TranslationBase.of(context).selectHospital); + } else { + Navigator.push( + context, + FadePage( + page: EROnlineCheckInPaymentDetails( + projectID: selectedHospital!.iD, + isERBookAppointment: true, + projectName: selectedHospital!.name ?? "", + ), + ), + ); + } + }, + color: CustomColors.accentColor, + ), + ), + ); + } + + getProjectsList() { + int languageID = projectViewModel.isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + ClinicListService service = new ClinicListService(); + List projectsListLocal = []; + service.getProjectsList(languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + res['ListProject'].forEach((v) { + projectsListLocal.add(new HospitalsModel.fromJson(v)); + }); + projectsList = projectsListLocal; + }); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + void openDropdown(GlobalKey key) { + GestureDetector? detector; + void searchForGestureDetector(BuildContext element) { + element.visitChildElements((element) { + if (element.widget != null && element.widget is GestureDetector) { + detector = element.widget as GestureDetector?; + // return false; + } else { + searchForGestureDetector(element); + } + // return true; + }); + } + + searchForGestureDetector(key.currentContext!); + assert(detector != null); + detector!.onTap!(); + } +} diff --git a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInHome.dart b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInHome.dart new file mode 100644 index 00000000..d1ecc3ad --- /dev/null +++ b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInHome.dart @@ -0,0 +1,556 @@ +import 'package:barcode_scan2/barcode_scan2.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInBookAppointment.dart'; +import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInNFCQRCLocation.dart'; +import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/bottom_options/bottom_sheet.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_nfc_kit/flutter_nfc_kit.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class EROnlineCheckInHomePage extends StatefulWidget { + const EROnlineCheckInHomePage(); + + @override + State createState() => _EROnlineCheckInHomePageState(); +} + +class _EROnlineCheckInHomePageState extends State with SingleTickerProviderStateMixin { + late ProjectViewModel projectViewModel; + bool _supportsNFC = false; + bool isPatientArrived = false; + + late LocationUtils locationUtils; + + @override + void initState() { + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) { + // checkIfPatientHasArrived(); + if (projectViewModel.isLogin) checkPatientERAdvanceBalance(); + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + FlutterNfcKit.nfcAvailability.then((value) { + _supportsNFC = (value == NFCAvailability.available); + }); + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).emergency + " ${TranslationBase.of(context).checkinOptions}", + isShowDecPage: true, + showNewAppBar: true, + showNewAppBarTitle: true, + description: TranslationBase.of(context).HHCNotAuthMsg, + imagesInfo: [ImagesInfo(imageAr: 'https://hmgwebservices.com/Images/MobileApp/HHC/ar/0.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/HHC/en/0.png')], + backgroundColor: Color(0xffF8F8F8), + body: SingleChildScrollView( + child: Padding( + padding: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10), bottomLeft: Radius.circular(10), bottomRight: Radius.circular(10)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + spreadRadius: 5, + blurRadius: 7, + offset: Offset(0, 3), // changes position of shadow + ), + ], + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Icon( + Icons.check_circle, + size: 50, + color: CustomColors.green, + ), + mHeight(6), + Text( + TranslationBase.of(context).whatIsOnlineCheckIn, + maxLines: 1, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12), + Text( + TranslationBase.of(context).EROnlineCheckInDesc1, + style: TextStyle(fontSize: 13, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(16), + // Text( + // TranslationBase.of(context).EROnlineCheckInHow, + // maxLines: 1, + // style: TextStyle( + // fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + // ), + // Text( + // "Online check-in lets patients fill out forms, share insurance details, and book appointments online, making their visit smoother and quicker.", + // style: TextStyle(fontSize: 14, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24), + // ), + ], + ), + ), + ), + mHeight(24), + Container( + width: double.infinity, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10), bottomLeft: Radius.circular(10), bottomRight: Radius.circular(10)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + spreadRadius: 5, + blurRadius: 7, + offset: Offset(0, 3), // changes position of shadow + ), + ], + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 35, + height: 35, + decoration: BoxDecoration( + color: CustomColors.green, + borderRadius: BorderRadius.circular(50), + ), + child: Center( + child: Text( + "1", + style: TextStyle(fontSize: 22, fontWeight: FontWeight.w700, color: CustomColors.white, letterSpacing: -1.44, height: 35 / 24), + ), + ), + ), + mWidth(12), + SvgPicture.asset( + "assets/images/new/tap.svg", + width: 35, + height: 35, + ), + ], + ), + Padding( + padding: const EdgeInsets.only(left: 50, right: 50), + child: Text( + TranslationBase.of(context).EROnlineCheckInTapOn, + maxLines: 1, + style: TextStyle( + fontSize: 20, + fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), + fontWeight: FontWeight.w700, + color: Color(0xff2B353E), + letterSpacing: -1.44, + height: 35 / 24), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 50, right: 50), + child: Text( + TranslationBase.of(context).EROnlineCheckInTapOnCheckIn, + style: TextStyle(fontSize: 13, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w600, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24), + ), + ), + mHeight(16), + Row( + children: [ + Container( + width: 35, + height: 35, + decoration: BoxDecoration( + color: CustomColors.green, + borderRadius: BorderRadius.circular(50), + ), + child: Center( + child: Text( + "2", + style: TextStyle(fontSize: 22, fontWeight: FontWeight.w700, color: CustomColors.white, letterSpacing: -1.44, height: 35 / 24), + ), + ), + ), + mWidth(12), + SvgPicture.asset( + "assets/images/new/NFC_Hold.svg", + width: 35, + height: 35, + ), + ], + ), + Padding( + padding: const EdgeInsets.only(left: 50, right: 50), + child: Text( + TranslationBase.of(context).EROnlineCheckInHoldPhone, + maxLines: 1, + style: TextStyle( + fontSize: 20, + fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), + fontWeight: FontWeight.w700, + color: Color(0xff2B353E), + letterSpacing: -1.44, + height: 35 / 24), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 50, right: 50), + child: Text( + TranslationBase.of(context).EROnlineCheckInHoldPhoneInstruction, + style: TextStyle(fontSize: 13, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w600, color: CustomColors.textDarkColor, letterSpacing: -1.44, height: 35 / 24), + ), + ), + mHeight(16), + Row( + children: [ + Container( + width: 35, + height: 35, + decoration: BoxDecoration( + color: CustomColors.green, + borderRadius: BorderRadius.circular(50), + ), + child: Center( + child: Text( + "3", + style: TextStyle(fontSize: 22, fontWeight: FontWeight.w700, color: CustomColors.white, letterSpacing: -1.44, height: 35 / 24), + ), + ), + ), + mWidth(12), + SvgPicture.asset( + "assets/images/new/hourglass.svg", + width: 35, + height: 35, + ), + ], + ), + Padding( + padding: const EdgeInsets.only(left: 50, right: 50), + child: Text( + TranslationBase.of(context).EROnlineCheckInWaitTurn, + maxLines: 1, + style: TextStyle( + fontSize: 20, + fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), + fontWeight: FontWeight.w700, + color: Color(0xff2B353E), + letterSpacing: -1.44, + height: 35 / 24), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 50, right: 50), + child: Text( + TranslationBase.of(context).EROnlineCheckInWaitTurnInstruction, + style: TextStyle(fontSize: 13, color: CustomColors.textDarkColor, fontWeight: FontWeight.w600, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), letterSpacing: -1.44, height: 35 / 24), + ), + ), + ], + ), + ), + ), + ], + ), + ), + ), + bottomSheet: Container( + height: projectViewModel.isLogin ? 80 : 1, + color: CustomColors.white, + padding: EdgeInsets.fromLTRB(12.0, 12.0, 12.0, 25.0), + child: isPatientArrived + ? Container( + child: DefaultButton( + TranslationBase.of(context).arrived, + () { + // showMyBottomSheet(context, + // callBackFunc: () {}, + // child: Padding( + // padding: const EdgeInsets.all(21.0), + // child: Column( + // children: [ + // Text(TranslationBase.of(context).scanQRHospital, + // style: TextStyle( + // fontSize: 20, + // fontWeight: FontWeight.w600, + // letterSpacing: -0.48, + // )), + // mHeight(21), + // GridView( + // physics: const NeverScrollableScrollPhysics(), + // shrinkWrap: true, + // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + // crossAxisCount: (MediaQuery.of(context).size.width < 550) ? 3 : 5, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 12), + // children: [ + // attendanceMethod(TranslationBase.of(context).scanNFC, "assets/images/nfc/contactless.svg", true, () { + // if (_supportsNFC) { + // Future.delayed(const Duration(milliseconds: 500), () { + // showNfcReader(context, onNcfScan: (String nfcId) { + // Future.delayed(const Duration(milliseconds: 100), () { + // print(nfcId); + // getProjectIDFromNFC(nfcId, true); + // // Navigator.push(context, FadePage(page: EROnlineCheckInPaymentDetails())); + // }); + // }, onCancel: () { + // Navigator.of(context).pop(); + // }); + // }); + // } else { + // //NFCNotSupported + // AppToast.showErrorToast(message: TranslationBase.of(context).NFCNotSupported); + // } + // }), + // attendanceMethod(TranslationBase.of(context).pharmaLiveCareScanQR, "assets/images/new/services/qr_code.svg", true, () async { + // String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent)); + // if (onlineCheckInQRCode != "") { + // print(onlineCheckInQRCode); + // getProjectIDFromNFC(onlineCheckInQRCode, true); + // // sendNfcCheckInRequest(onlineCheckInQRCode, 2); + // } else {} + // }), + // attendanceMethod(TranslationBase.of(context).checkInViaLocation, "assets/images/new/services/location.svg", true, () {}) + // ], + // ), + // ], + // ), + // )); + + // Navigator.push(context, FadePage(page: EROnlineCheckInNFCQRLocation(projectID: 15))).then((value) {}); + + if (_supportsNFC) { + Future.delayed(const Duration(milliseconds: 500), () { + showNfcReader(context, onNcfScan: (String nfcId) { + Future.delayed(const Duration(milliseconds: 100), () { + print(nfcId); + getProjectIDFromNFC(nfcId, true); + // Navigator.push(context, FadePage(page: EROnlineCheckInPaymentDetails())); + }); + }, onCancel: () { + Navigator.of(context).pop(); + }); + }); + } else { + //NFCNotSupported + AppToast.showErrorToast(message: TranslationBase.of(context).NFCNotSupported); + } + }, + color: CustomColors.accentColor, + ), + ) + : Row( + children: [ + // Expanded( + // flex: 1, + // child: DefaultButton( + // TranslationBase.of(context).checkinOptions, + // () { + // // Navigator.push(context, FadePage(page: EROnlineCheckInNFCQRLocation(projectID: 15))).then((value) {}); + // + // if (_supportsNFC) { + // Future.delayed(const Duration(milliseconds: 500), () { + // showNfcReader(context, onNcfScan: (String nfcId) { + // Future.delayed(const Duration(milliseconds: 100), () { + // print(nfcId); + // getProjectIDFromNFC(nfcId, false); + // }); + // }, onCancel: () { + // Navigator.of(context).pop(); + // }); + // }); + // } else { + // //NFCNotSupported + // AppToast.showErrorToast(message: TranslationBase.of(context).NFCNotSupported, localContext: context); + // } + // }, + // color: CustomColors.green, + // ), + // ), + // mWidth(12), + Expanded( + flex: 1, + child: DefaultButton( + TranslationBase.of(context).bookAppo, + () { + Navigator.push(context, FadePage(page: EROnlineCheckInBookAppointment())); + }, + color: CustomColors.accentColor, + ), + ), + ], + ), + ), + ); + } + + void getProjectIDFromNFC(String nfcID, bool isArrived) { + GifLoaderDialogUtils.showMyDialog(context); + ClinicListService ancillaryOrdersService = new ClinicListService(); + ancillaryOrdersService.getProjectIDFromNFC(nfcID).then((response) { + if (response["GetProjectByNFC"].length != 0) { + print(response["GetProjectByNFC"]); + int projectID = response['GetProjectByNFC'][0]["ProjectID"]; + String projectName = response['GetProjectByNFC'][0]["ProjectName"]; + GifLoaderDialogUtils.hideDialog(context); + if (isArrived) { + autoGenerateInvoiceER(projectID); + } else { + Navigator.push( + context, + FadePage( + page: EROnlineCheckInPaymentDetails( + projectID: projectID, + isERBookAppointment: false, + projectName: projectName, + ), + ), + ); + } + } else { + AppToast.showErrorToast(message: "Invalid NFC Card Scanned."); + } + }).catchError((err) { + AppToast.showErrorToast(message: err.toString()); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + autoGenerateInvoiceER(int projectID) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.autoGenerateInvoiceERClinic(projectID, 4, null, null, null, null, null, null, true).then((res) { + GifLoaderDialogUtils.hideDialog(context); + _showMyDialog(TranslationBase.of(context).ERCheckInSuccess, context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + 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(); + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + }, + ), + ], + ); + }, + ); + } + + void checkIfPatientHasArrived() { + GifLoaderDialogUtils.showMyDialog(context); + ClinicListService ancillaryOrdersService = new ClinicListService(); + ancillaryOrdersService.checkIfPatientHasArrived(15, 10).then((response) { + print(response["IsPatientArrivedResponse"]); + isPatientArrived = response['IsPatientArrivedResponse']["IsPatientArrived"]; + GifLoaderDialogUtils.hideDialog(context); + // erOnlineCheckInPaymentDetailsResponse = EROnlineCheckInPaymentDetailsResponse.fromJson(response["ResponsePatientShare"]); + setState(() {}); + }).catchError((err) { + AppToast.showErrorToast(message: err.toString()); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + Widget markCheckInWidget() { + return GridView( + physics: const NeverScrollableScrollPhysics(), + shrinkWrap: true, + padding: const EdgeInsets.only(bottom: 0, top: 21), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: (MediaQuery.of(context).size.width < 550) ? 3 : 5, childAspectRatio: 1 / 1, crossAxisSpacing: 8, mainAxisSpacing: 8), + children: [], + ); + } + + Widget attendanceMethod(String title, String image, bool isEnabled, VoidCallback onPress) => InkWell( + onTap: () { + Navigator.pop(context); + onPress(); + }, + child: Container( + decoration: containerColorRadiusBorderWidth(Colors.white, 15, CustomColors.darkGreyColor, 1), + clipBehavior: Clip.antiAlias, + padding: const EdgeInsets.only(left: 10, right: 10, top: 14, bottom: 14), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded(child: SvgPicture.asset(image, color: Colors.black, alignment: Alignment.topLeft)), + Text( + title, + style: TextStyle(color: Colors.black, fontSize: 14, letterSpacing: -0.68, fontWeight: FontWeight.bold), + ), + // title.toText17(isBold: true, color: Colors.white), + ], + ), + ), + ); + + // .onPress( + // () { + // if (!isEnabled) return; + // onPress(); + // }, + // ); + + void checkPatientERAdvanceBalance() { + locationUtils.getCurrentLocation(); + GifLoaderDialogUtils.showMyDialog(context); + ClinicListService ancillaryOrdersService = new ClinicListService(); + ancillaryOrdersService.checkPatientERAdvanceBalance(10).then((response) { + print(response["BalanceAmount"]); + isPatientArrived = response['BalanceAmount'] > 0; + GifLoaderDialogUtils.hideDialog(context); + setState(() {}); + }).catchError((err) { + AppToast.showErrorToast(message: err.toString()); + GifLoaderDialogUtils.hideDialog(context); + }); + } +} diff --git a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInNFCQRCLocation.dart b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInNFCQRCLocation.dart new file mode 100644 index 00000000..d3f1e20f --- /dev/null +++ b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInNFCQRCLocation.dart @@ -0,0 +1,374 @@ +import 'dart:typed_data'; + +import 'package:barcode_scan2/barcode_scan2.dart'; +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/privilege/ProjectDetailListModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/header_model.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; +import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_nfc_kit/flutter_nfc_kit.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class EROnlineCheckInNFCQRLocation extends StatefulWidget { + // late PatientShareResponse? patientShareResponse; + // late AppoitmentAllHistoryResultList? appointment; + // late String? appoQR; + // AuthenticatedUser? authUser; + // AppSharedPreferences sharedPref = AppSharedPreferences(); + + int projectID; + + EROnlineCheckInNFCQRLocation({required this.projectID}); + + @override + _EROnlineCheckInNFCQRLocationState createState() => _EROnlineCheckInNFCQRLocationState(); +} + +class _EROnlineCheckInNFCQRLocationState extends State { + late Uint8List _bytes; + bool _supportsNFC = false; + late BuildContext _context; + + late ProjectViewModel projectViewModel; + late LocationUtils locationUtils; + ProjectDetailListModel projectDetailListModel = ProjectDetailListModel(); + + @override + void initState() { + super.initState(); + } + + startNFCScan() { + Future.delayed(const Duration(milliseconds: 500), () { + showNfcReader(context, onNcfScan: (String nfcId) { + Future.delayed(const Duration(milliseconds: 100), () { + sendNfcCheckInRequest(nfcId, 2); + }); + }, onCancel: () { + // Navigator.of(context).pop(); + }); + }); + } + + startQRCodeScan() async { + String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent)); + if (onlineCheckInQRCode != "") { + sendNfcCheckInRequest(onlineCheckInQRCode, 2); + } else {} + } + + startLocationCheckIn() async { + GifLoaderDialogUtils.showMyDialog(context); + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + locationUtils.getCurrentLocation(callBack: (value) { + projectDetailListModel = Utils.getProjectDetailObj(projectViewModel, widget.projectID); + double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000; + print(dist); + if (dist <= projectDetailListModel.geofenceRadius!) { + sendNfcCheckInRequest(projectDetailListModel.checkInQrCode!, 2); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError); + } + }); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + _context = context; + FlutterNfcKit.nfcAvailability.then((value) { + _supportsNFC = (value == NFCAvailability.available); + }); + List checkInOptionsList = getCheckInOptionsList(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).onlineCheckIn, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + body: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // DoctorHeader( + // headerModel: HeaderModel( + // widget.appointment!.doctorTitle! + " " + widget.appointment!.doctorNameObj!, + // widget.appointment!.doctorID ?? 0, + // widget.appointment!.doctorImageURL!, + // widget.appointment!.doctorSpeciality!, + // "", + // widget.appointment!.projectName!, + // DateUtil.convertStringToDate(widget.appointment!.appointmentDate!), + // widget.appointment!.isLiveCareAppointment! + // ? DateUtil.convertStringToDate(widget.appointment!.appointmentDate!).toString().split(" ")[1].substring(0, 5) + // : widget.appointment!.startTime!.substring(0, 5), + // "null", + // widget.appointment!.doctorRate, + // widget.appointment!.actualDoctorRate, + // widget.appointment!.noOfPatientsRate, + // "", + // ), + // isShowName: true, + // isNeedToShowButton: false, + // buttonTitle: '', + // onTap: () {}, + // onRatingAndReviewTap: () {}, + // ), + InkWell( + child: Container( + margin: EdgeInsets.only(top: 30.0), + padding: EdgeInsets.all(8), + child: SvgPicture.asset( + "assets/images/nfc/contactless.svg", + width: 80.0, + height: 80.0, + ), + ), + onTap: () { + showNfcReader(context, onNcfScan: (String nfcId) { + Future.delayed(const Duration(milliseconds: 100), () { + sendNfcCheckInRequest(nfcId, 2); + }); + }, onCancel: () { + // Navigator.of(context).pop(); + }); + }, + ), + Row( + children: [ + Expanded( + child: Container( + width: double.infinity, + margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), + child: Text(TranslationBase.of(context).scanQRHospital, + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + )), + ), + ), + ], + ), + mHeight(21), + Padding( + padding: EdgeInsets.only(left: 21, right: 21), + child: GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + padding: EdgeInsets.zero, + itemCount: checkInOptionsList.length, + itemBuilder: (BuildContext context, int index) { + return checkInOptionsList[index]; + }, + ), + ), + ], + ), + ), + // bottomSheet: Container( + // color: CustomColors.appBackgroudGreyColor, + // padding: EdgeInsets.all(21), + // // height: 45.0, + // child: Row( + // children: [ + // Expanded( + // flex: 1, + // child: ButtonTheme( + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(10.0), + // ), + // height: 45.0, + // child: CustomTextButton( + // backgroundColor: CustomColors.green, + // elevation: 0, + // onPressed: () { + // startNFCScan(); + // }, + // child: Text(TranslationBase.of(context).scanNFC, + // style: TextStyle( + // fontSize: 18.0, + // color: Colors.white, + // )), + // ), + // ), + // ), + // ], + // ), + // ), + ); + } + + List getCheckInOptionsList(BuildContext context) { + List optionsList = []; + + optionsList.add( + InkWell( + onTap: () { + if (projectViewModel.havePrivilege(102)) { + startLocationCheckIn(); + } + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).checkInViaLocation, + imagePath: 'location.svg', + subTitle: "", + isEnable: projectViewModel.havePrivilege(102), + width: 70.0, + height: 70.0, + ), + ), + ); + + optionsList.add( + InkWell( + onTap: () { + if (projectViewModel.havePrivilege(79)) { + startQRCodeScan(); + } + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).pharmaLiveCareScanQR, + imagePath: 'qr_code.svg', + subTitle: "", + isEnable: projectViewModel.havePrivilege(79), + width: 80.0, + height: 80.0, + ), + ), + ); + + optionsList.add( + InkWell( + onTap: () { + if (projectViewModel.havePrivilege(80) && _supportsNFC) { + startNFCScan(); + } else { + Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported); + } + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).scanNFC, + imagePath: 'contactless.svg', + subTitle: "", + isEnable: projectViewModel.havePrivilege(80), + width: 80.0, + height: 80.0, + ), + ), + ); + + return optionsList; + } + + Future navigateToHome(context) async { + Navigator.of(context).pushNamed(HOME); + } + + getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {} + + String getDate(String appoDate) { + var appoDateFormatted = ""; + + var dateObj = DateUtil.convertStringToDate(appoDate); + + setState(() { + appoDateFormatted = DateUtil.getWeekDay(dateObj.weekday) + + ", " + + dateObj.day.toString() + + " " + + DateUtil.getMonth(dateObj.month) + + " " + + dateObj.year.toString() + + ", " + + dateObj.hour.toString() + + ":" + + dateObj.minute.toString() + + ":00"; + }); + + return appoDateFormatted; + } + + String getDoctorSpeciality(List docSpecial) { + String docSpeciality = ""; + if (docSpecial != null && docSpecial.length != 0) { + docSpecial.forEach((v) { + docSpeciality = docSpeciality + v + "\n"; + }); + } + return docSpeciality; + } + + sendNfcCheckInRequest(String nfcId, int checkInBy) { + GifLoaderDialogUtils.showMyDialog(context); + + DoctorsListService service = new DoctorsListService(); + + // service.sendCheckinNfcRequest(widget!.patientShareResponse!.appointmentNo!, nfcId, widget.patientShareResponse!.projectID!, checkInBy, widget.patientShareResponse!.clinicID!, context).then((res) { + // print(res); + // + // GifLoaderDialogUtils.hideDialog(context); + // _showMyDialog(res["SuccessMsg"], this.context); + // }).catchError((err) { + // GifLoaderDialogUtils.hideDialog(context); + // print(err); + // _showMyDialog(err, this.context); + // }); + } + + Future _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(); + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + }, + ), + ], + ); + }, + ); + } +} diff --git a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart new file mode 100644 index 00000000..560d6d9b --- /dev/null +++ b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInPaymentDetails.dart @@ -0,0 +1,663 @@ +import 'dart:developer'; + +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/PayfortEnums.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/Clinics/EROnlineCheckInPaymentDetailsResponse.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/ApplePayInsertRequest.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_project_details_resp_model.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.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:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class EROnlineCheckInPaymentDetails extends StatefulWidget { + int projectID = 0; + bool isERBookAppointment = false; + String projectName = ""; + + EROnlineCheckInPaymentDetails({required this.projectID, required this.isERBookAppointment, required this.projectName}); + + @override + State createState() => _EROnlineCheckInPaymentDetailsState(); +} + +class _EROnlineCheckInPaymentDetailsState extends State with SingleTickerProviderStateMixin { + late ProjectViewModel projectViewModel; + EROnlineCheckInPaymentDetailsResponse? erOnlineCheckInPaymentDetailsResponse; + String? selectedPaymentMethod; + String? selectedInstallmentPlan; + String transID = ""; + late MyInAppBrowser browser; + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((_) { + getEROnlineCheckInPaymentDetails(); + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).emergency + " ${TranslationBase.of(context).checkinOptions}", + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF8F8F8), + body: Padding( + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: double.infinity, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10), bottomLeft: Radius.circular(10), bottomRight: Radius.circular(10)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + spreadRadius: 5, + blurRadius: 7, + offset: Offset(0, 3), // changes position of shadow + ), + ], + ), + child: Padding( + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).patientInfo, + style: TextStyle( + fontSize: 18, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12), + Row( + children: [ + Text( + TranslationBase.of(context).patientName + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 14, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).mrn + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel.user.patientID.toString(), + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 14, + letterSpacing: -0.48, + ), + ), + ], + ), + ], + ), + ), + ), + mHeight(24), + Container( + width: double.infinity, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10), bottomLeft: Radius.circular(10), bottomRight: Radius.circular(10)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + spreadRadius: 5, + blurRadius: 7, + offset: Offset(0, 3), // changes position of shadow + ), + ], + ), + child: Padding( + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "ER Visit Details", + style: TextStyle( + fontSize: 18, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12), + Row( + children: [ + Text( + TranslationBase.of(context).hospital + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + widget.projectName, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 14, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).clinicName + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + "ER Clinic", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 14, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Text( + "Time Check-In" + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + DateUtil.getMonthDayYearDateFormatted(DateTime.now()), + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 14, + letterSpacing: -0.48, + ), + ), + ], + ), + ], + ), + ), + ) + ], + ), + ), + bottomSheet: erOnlineCheckInPaymentDetailsResponse != null + ? Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10), bottomLeft: Radius.circular(10), bottomRight: Radius.circular(10)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 5, + blurRadius: 7, + offset: Offset(0, 3), // changes position of shadow + ), + ], + ), + padding: EdgeInsets.only(left: 21, right: 21, top: 15, bottom: 15), + width: double.infinity, + // color: Colors.white, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(height: 12), + Text( + TranslationBase.of(context).YouCanPayByTheFollowingOptions, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + SizedBox( + width: MediaQuery.of(context).size.width * 0.75, + child: getPaymentMethods(), + ), + + _amountView(TranslationBase.of(context).patientShareTotalToDo, erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax.toString(), isBold: true, isTotal: true), + SizedBox(height: 12), + Column(children: [ + DefaultButton( + TranslationBase.of(context).payNow.toUpperCase(), + () { + makePayment(); + }, + color: CustomColors.green, + disabledColor: CustomColors.grey2, + ), + erOnlineCheckInPaymentDetailsResponse!.isCash == true + ? Column( + children: [ + mHeight(10.0), + Text( + TranslationBase.of(context).cashAmountUpdateInsurance, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + ), + ), + mHeight(5.0), + DefaultButton( + TranslationBase.of(context).updateInsuranceText, + () { + Navigator.pop(context, null); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }, + color: Color(0xffEAA118), + textColor: Colors.white, + ), + ], + ) : SizedBox() + ], + )]), + ) + : Container(), + ); + } + + makePayment() { + showDraggableDialog( + context, + PaymentMethod( + onSelectedMethod: (String method, [String? selectedInstallmentPlan]) { + selectedPaymentMethod = method; + this.selectedInstallmentPlan = selectedInstallmentPlan; + if (selectedPaymentMethod == "ApplePay") { + if (projectViewModel.havePrivilege(103)) { + startApplePay(); + } else { + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + appo.projectID = widget.projectID; + openPayment(selectedPaymentMethod!, projectViewModel.user, erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax!, AppoitmentAllHistoryResultList()); + } + } else { + openPayment(selectedPaymentMethod!, projectViewModel.user, erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax!, AppoitmentAllHistoryResultList()); + } + }, + patientShare: erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax, + isFromAdvancePayment: false, + ), + ); + } + + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo) { + transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID!); + + browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); + + browser.openPaymentBrowser(amount, "ER Online Check-In Payment", transID, widget.projectID.toString(), authenticatedUser.emailAddress!, paymentMethod, authenticatedUser.patientType, + authenticatedUser.firstName!, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "", context); + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called!!!!"); + checkPaymentStatus(appo); + } + + void startApplePay() async { + transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.user.patientID!); + + print("TransactionID: $transID"); + GifLoaderDialogUtils.showMyDialog(context); + + LiveCareService service = new LiveCareService(); + ApplePayInsertRequest applePayInsertRequest = new ApplePayInsertRequest(); + + PayfortProjectDetailsRespModel? payfortProjectDetailsRespModel; + await context.read().getProjectDetailsForPayfort(projectId: widget.projectID, serviceId: ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum()).then((value) { + payfortProjectDetailsRespModel = value!; + }); + + applePayInsertRequest.clientRequestID = transID; + applePayInsertRequest.clinicID = 0; + applePayInsertRequest.currency = projectViewModel.user.outSA == 1 ? "AED" : "SAR"; + // applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress; + applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com"; + applePayInsertRequest.customerID = projectViewModel.user.patientID; + applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!; + applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); + applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); + applePayInsertRequest.doctorID = 0; + applePayInsertRequest.projectID = widget.projectID.toString(); + applePayInsertRequest.serviceID = ServiceTypeEnum.advancePayment.getIdFromServiceEnum().toString(); + applePayInsertRequest.channelID = 3; + applePayInsertRequest.patientID = projectViewModel.user.patientID; + applePayInsertRequest.patientTypeID = projectViewModel.user.patientType; + applePayInsertRequest.patientOutSA = projectViewModel.user.outSA; + applePayInsertRequest.appointmentDate = null; + applePayInsertRequest.appointmentNo = 0; + applePayInsertRequest.orderDescription = "ER Online Check-In Payment"; + applePayInsertRequest.liveServiceID = "0"; + applePayInsertRequest.latitude = "0.0"; + applePayInsertRequest.longitude = "0.0"; + applePayInsertRequest.amount = erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax.toString(); + applePayInsertRequest.isSchedule = "0"; + applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en'; + applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2; + applePayInsertRequest.userName = projectViewModel.user.patientID; + applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html"; + applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html"; + applePayInsertRequest.paymentOption = "ApplePay"; + + applePayInsertRequest.isMobSDK = true; + applePayInsertRequest.merchantReference = transID; + applePayInsertRequest.merchantIdentifier = payfortProjectDetailsRespModel!.merchantIdentifier; + applePayInsertRequest.commandType = "PURCHASE"; + applePayInsertRequest.signature = payfortProjectDetailsRespModel!.signature; + applePayInsertRequest.accessCode = payfortProjectDetailsRespModel!.accessCode; + applePayInsertRequest.shaRequestPhrase = payfortProjectDetailsRespModel!.shaRequest; + applePayInsertRequest.shaResponsePhrase = payfortProjectDetailsRespModel!.shaResponse; + applePayInsertRequest.returnURL = ""; + + service.applePayInsertRequest(applePayInsertRequest, context).then((res) async { + if (res["MessageStatus"] == 1) { + await context.read().initiateApplePayWithPayfort( + customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, + // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, + customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com", + orderDescription: "ER Online Check-In Payment", + orderAmount: erOnlineCheckInPaymentDetailsResponse!.patientShareWithTax, + merchantReference: transID, + payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, + currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", + onFailed: (failureResult) async { + GifLoaderDialogUtils.hideDialog(context); + log("failureResult: ${failureResult.message.toString()}"); + AppToast.showErrorToast(message: failureResult.message.toString()); + }, + onSuccess: (successResult) async { + log("Payfort: ${successResult.responseMessage}"); + await context.read().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult); + GifLoaderDialogUtils.hideDialog(context); + checkPaymentStatus(AppoitmentAllHistoryResultList()); + }, + projectId: widget.projectID, + serviceTypeEnum: ServiceTypeEnum.appointmentPayment, + ); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: "An error occurred while processing your request"); + } + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + }); + } + + checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.checkPaymentStatus(transID, false, context).then((res) { + String paymentInfo = res['Response_Message']; + if (paymentInfo == 'Success') { + GifLoaderDialogUtils.hideDialog(context); + if (widget.isERBookAppointment) { + // createAdvancePayment(res, appo); + ER_createAdvancePayment(res, appo); + } else { + autoGenerateInvoiceER(res); + } + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: res['Response_Message']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + ER_createAdvancePayment(payment_res, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + String paymentReference = payment_res['Fort_id'].toString(); + service.ER_createAdvancePayment(appo, widget.projectID.toString(), payment_res['Amount'], payment_res['Fort_id'], payment_res['PaymentMethod'], context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + addAdvancedNumberRequest( + // Utils.isVidaPlusProject(projectViewModel, widget.projectID) + // ? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString() + // : res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), + res['ER_AdvancePaymentResponse']['AdvanceNumber'].toString(), + paymentReference, + 0, + appo, + payment_res); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + createAdvancePayment(paymentRes, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + String paymentReference = paymentRes['Fort_id'].toString(); + service.HIS_createAdvancePayment(appo, widget.projectID.toString(), paymentRes['Amount'], paymentRes['Fort_id'], paymentRes['PaymentMethod'], projectViewModel.user.patientType, + projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, projectViewModel.user.patientID, context) + .then((res) { + addAdvancedNumberRequest( + Utils.isVidaPlusProject(projectViewModel, widget.projectID) + ? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString() + : res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), + paymentReference, + 0, + appo, + paymentRes); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, AppoitmentAllHistoryResultList appo, paymentRes) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (widget.isERBookAppointment) { + AppToast.showSuccessToast(message: "Your appointment has been booked successfully. Please perform Check-In once you arrive at the hospital."); + // Navigator.pop(context); + // Navigator.pop(context); + // Navigator.pop(context); + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + } else { + autoGenerateInvoiceER(paymentRes); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err.toString()); + print(err); + }); + } + + autoGenerateInvoiceER(res) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.autoGenerateInvoiceERClinic(widget.projectID, 4, res['Fort_id'], res['Amount'], res['PaymentMethod'], res['CardNumber'], res['Merchant_Reference'], res['RRN'], false).then((res) { + GifLoaderDialogUtils.hideDialog(context); + _showMyDialog(TranslationBase.of(context).ERCheckInSuccess, context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + 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(); + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + }, + ), + ], + ); + }, + ); + } + + getEROnlineCheckInPaymentDetails() { + GifLoaderDialogUtils.showMyDialog(context); + ClinicListService ancillaryOrdersService = new ClinicListService(); + ancillaryOrdersService.getEROnlineCheckInPaymentDetails(widget.projectID, 10).then((response) { + erOnlineCheckInPaymentDetailsResponse = EROnlineCheckInPaymentDetailsResponse.fromJson(response["ResponsePatientShare"]); + GifLoaderDialogUtils.hideDialog(context); + setState(() {}); + }).catchError((err) { + AppToast.showErrorToast(message: err.toString()); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + _amountView(String title, String value, {bool isBold = false, bool isTotal = false}) { + return Padding( + padding: const EdgeInsets.only(top: 10, bottom: 10), + child: Row(children: [ + Expanded( + child: _getNormalText(title), + ), + Expanded( + child: Row( + children: [ + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + _getNormalText(value, isBold: isBold, isTotal: isTotal), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ), + ]), + ); + } + + _getNormalText(text, {bool isBold = false, bool isTotal = false}) { + return Text( + text, + style: TextStyle( + fontSize: isBold + ? isTotal + ? 16 + : 12 + : 11, + letterSpacing: -0.5, + color: isBold ? Color(0xff2E303A) : Color(0xff575757), + fontWeight: isTotal ? FontWeight.bold : FontWeight.w600, + ), + ); + } +} diff --git a/lib/pages/ErService/EdOnline/DdServicesPage.dart b/lib/pages/ErService/EdOnline/DdServicesPage.dart new file mode 100644 index 00000000..47d31a21 --- /dev/null +++ b/lib/pages/ErService/EdOnline/DdServicesPage.dart @@ -0,0 +1,79 @@ +import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart'; +import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'EdOnlineAgreementPage.dart'; +import 'EdOnlineNotesPage.dart'; +import 'EdOnlineQuestionsPage.dart'; +import 'EdOnlineSelectedHospitalPage.dart'; +import 'EdPaymentInformationPage.dart'; + +class DdServicesPage extends StatefulWidget { + @override + _DdServicesPageState createState() => _DdServicesPageState(); +} + +class _DdServicesPageState extends State { + late PageController pageController; + + bool isAgree = false; + TriageInformationRequest triageInformationRequest = new TriageInformationRequest(); + + List selectedQuestions =[]; + + @override + void initState() { + super.initState(); + pageController = new PageController(); + } + + _changePageViewIndex(int tab) { + setState(() { + pageController.jumpToPage(tab); + pageController.animateToPage(tab, duration: Duration(milliseconds: 800), curve: Curves.easeOutQuart); + }); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: 'ED Online', + showNewAppBarTitle: true, + isShowDecPage: true, + isShowAppBar: true, + showNewAppBar: true, + body: PageView( + physics: NeverScrollableScrollPhysics(), + controller: pageController, + onPageChanged: _changePageViewIndex, + children: [ + EdOnlineSelectedHospitalPage( + changePageViewIndex: _changePageViewIndex, + triageInformationRequest: triageInformationRequest, + ), + EdOnlineAgreementPage( + changePageViewIndex: _changePageViewIndex, + isAgree: isAgree, + ), + EdOnlineQuestionsPage( + changePageViewIndex: _changePageViewIndex, + selectedQuestions: selectedQuestions, + selectedHospital: triageInformationRequest.selectedHospital, + ), + EdOnlineNotesPage( + changePageViewIndex: _changePageViewIndex, + selectedQuestions: selectedQuestions, + triageInformationRequest: triageInformationRequest, + ), + EdPaymentInformationPage( + selectedHospital: triageInformationRequest.selectedHospital, + ) + ], + ), + ); + } +} diff --git a/lib/pages/ErService/EdOnline/EdOnlineAgreementPage.dart b/lib/pages/ErService/EdOnline/EdOnlineAgreementPage.dart new file mode 100644 index 00000000..d0e01f57 --- /dev/null +++ b/lib/pages/ErService/EdOnline/EdOnlineAgreementPage.dart @@ -0,0 +1,99 @@ +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.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'; + +class EdOnlineAgreementPage extends StatefulWidget { + final HospitalsModel? selectedHospital; + final Function? changePageViewIndex; + bool isAgree; + EdOnlineAgreementPage({Key? key, this.selectedHospital, this.changePageViewIndex,required this.isAgree}) : super(key: key); + + @override + _EdOnlineAgreementPageState createState() => _EdOnlineAgreementPageState(); +} + +class _EdOnlineAgreementPageState extends State { + + + @override + Widget build(BuildContext context) { + return AppScaffold( + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + children: [ + SizedBox(), + InkWell( + onTap: (){ + setState(() { + widget.isAgree = !widget.isAgree; + }); + }, + child: Row( + children: [ + Checkbox( + value: widget.isAgree, + activeColor: Colors.red[800], + onChanged: (bool? newValue) { + setState(() { + widget.isAgree = !widget.isAgree; + }); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Texts( + TranslationBase.of(context).onlineCheckInAgreement, + fontSize: 15, + ), + ), + ), + ], + ), + ), + SizedBox(), + ], + ), + ), + bottomSheet: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + height: 56, + child: Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(left: 5,right: 5), + child: SecondaryButton( + textColor: Colors.white, + color: Theme.of(context).primaryColor, + label: TranslationBase.of(context).back.toUpperCase(), + onTap: () => widget.changePageViewIndex!(0), + ), + ), + ), + SizedBox(width: 10,), + Expanded( + child: Container( + margin: EdgeInsets.only(left: 5,right: 5), + child: SecondaryButton( + textColor: Colors.white, + color: Theme.of(context).primaryColor, + label: TranslationBase.of(context).next.toUpperCase(), + disabled: !widget.isAgree, + onTap: () => widget.changePageViewIndex!(2), + ), + ), + ), + + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/ErService/EdOnline/EdOnlineNotesPage.dart b/lib/pages/ErService/EdOnline/EdOnlineNotesPage.dart new file mode 100644 index 00000000..2ed77c2e --- /dev/null +++ b/lib/pages/ErService/EdOnline/EdOnlineNotesPage.dart @@ -0,0 +1,174 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart'; +import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.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:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart'; +import 'package:provider/provider.dart'; + +class EdOnlineNotesPage extends StatefulWidget { + final List? selectedQuestions; + final Function? changePageViewIndex; + TriageInformationRequest? triageInformationRequest; + + EdOnlineNotesPage({Key? key, this.selectedQuestions, this.changePageViewIndex, this.triageInformationRequest}); + + @override + _EdOnlineNotesPageState createState() => _EdOnlineNotesPageState(); +} + +class _EdOnlineNotesPageState extends State { + TextEditingController _chiefComplaintsTextController = TextEditingController(); + TextEditingController _noteTextController = TextEditingController(); + late DateTime selectedTime; + final _formKey = GlobalKey(); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Form( + key: _formKey, + child: NewTextFields( + controller: _chiefComplaintsTextController, + maxLines: 15, + minLines: 5, + hintText: TranslationBase.of(context).chiefComplaints, + validator: (value) { + if (value.isEmpty) return TranslationBase.of(context).errorChiefComplaints; + return null; + }, + ), + ), + SizedBox( + height: 8, + ), + InkWell( + onTap: () { + DatePicker.showDateTimePicker( + context, + showTitleActions: true, + minTime: DateTime.now(), + maxTime: DateTime.now().add(Duration(hours: 24)), + onConfirm: (date) { + setState(() { + selectedTime = date; + }); + }, + currentTime: DateTime.now(), + locale: projectViewModel.localeType, + ); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + // height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(selectedTime == null ? TranslationBase.of(context).errorExpectedArrivalTime : TranslationBase.of(context).expectedArrivalTime), + Texts(getDate(context)), + ], + ), + ), + ), + SizedBox( + height: 8, + ), + NewTextFields( + controller: _noteTextController, + maxLines: 15, + minLines: 5, + hintText: TranslationBase.of(context).notes, + ), + ], + ), + ), + ), + bottomSheet: Container( + height: 56, + margin: EdgeInsets.only(bottom: 5), + width: double.infinity, + child: Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(left: 5, right: 5), + child: SecondaryButton( + textColor: Colors.white, + color: Theme.of(context).primaryColor, + label: TranslationBase.of(context).back.toUpperCase(), + onTap: () => widget.changePageViewIndex!(2), + ), + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: Container( + margin: EdgeInsets.only(left: 5, right: 5), + child: SecondaryButton( + textColor: Colors.white, + color: Theme.of(context).primaryColor, + label: TranslationBase.of(context).save.toUpperCase(), + disabled: selectedTime == null, + onTap: () async { + if (_formKey.currentState!.validate()) { + GifLoaderDialogUtils.showMyDialog(context); + model + .saveQuestionsInformation( + chiefComplaint: _chiefComplaintsTextController.text.toString(), + notes: _noteTextController.text.toString(), + selectedQuestions: widget.selectedQuestions, + projectId: widget.triageInformationRequest!.projectID!, + selectedTime: selectedTime) + .then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (model.state == ViewState.ErrorLocal) + AppToast.showErrorToast(message: model.error); + else { + widget.changePageViewIndex!(4); + } + }).catchError((onError) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: onError.toString()); + }); + } + }), + ), + ), + ], + ), + ), + ), + ); + } + + getDate(BuildContext context) { + String message = ""; + if (selectedTime != null) { + message = "${selectedTime.hour}:${selectedTime.minute}"; + } + return message; + } +} diff --git a/lib/pages/ErService/EdOnline/EdOnlineQuestionsPage.dart b/lib/pages/ErService/EdOnline/EdOnlineQuestionsPage.dart new file mode 100644 index 00000000..e5d819b1 --- /dev/null +++ b/lib/pages/ErService/EdOnline/EdOnlineQuestionsPage.dart @@ -0,0 +1,196 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// ignore: must_be_immutable +class EdOnlineQuestionsPage extends StatefulWidget { + final HospitalsModel? selectedHospital; + final Function? changePageViewIndex; + List? selectedQuestions; + + EdOnlineQuestionsPage({Key? key, this.selectedHospital, this.selectedQuestions, this.changePageViewIndex}); + + @override + _EdOnlineQuestionsPageState createState() => _EdOnlineQuestionsPageState(); +} + +class _EdOnlineQuestionsPageState extends State { + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getQuestions(), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + children: [ + ...List.generate( + model.triageQuestionsModelList.length, + (index) => InkWell( + onTap: () { + setState(() { + if (widget.selectedQuestions!.contains(model.triageQuestionsModelList[index])) { + widget.selectedQuestions!.remove(model.triageQuestionsModelList[index]); + } else { + widget.selectedQuestions!.add(model.triageQuestionsModelList[index]); + } + }); + }, + child: Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Row( + children: [ + Checkbox( + value: widget.selectedQuestions!.contains(model.triageQuestionsModelList[index]), + activeColor: Color(0xffD02127), + tristate: false, + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + onChanged: (bool? newValue) { + setState(() { + if (widget.selectedQuestions!.contains(model.triageQuestionsModelList[index])) { + widget.selectedQuestions!.remove(model.triageQuestionsModelList[index]); + } else { + widget.selectedQuestions!.add(model.triageQuestionsModelList[index]); + } + }); + }), + SizedBox(width: 6), + Expanded( + child: Text( + model.triageQuestionsModelList[index].question!, + overflow: TextOverflow.clip, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), + ), + ), + ], + ), + ), + ), + ), + SizedBox( + height: 120, + ) + ], + ), + ), + bottomSheet: Container( + color: CustomColors.appBackgroudGreyColor, + child: Container( + color: CustomColors.appBackgroudGreyColor, + margin: EdgeInsets.all(14), + height: 45.0, + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: Color(0xffc5272d), + disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38), + disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12), + elevation: 0, + onPressed: () { + widget.changePageViewIndex!(0); + }, + child: Text(TranslationBase.of(context).back, style: TextStyle(fontSize: 16.0, color: Colors.white)), + ), + ), + ), + mWidth(7), + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.green, + disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38), + disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12), + elevation: 0, + onPressed: widget.selectedQuestions!.isEmpty + ? null + : () { + GifLoaderDialogUtils.showMyDialog(context); + model + .saveQuestionsInformation( + chiefComplaint: "", notes: "", selectedQuestions: widget.selectedQuestions, projectId: widget.selectedHospital!.iD, selectedTime: DateTime.now()) + .then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (model.state == ViewState.ErrorLocal) + AppToast.showErrorToast(message: model.error); + else { + widget.changePageViewIndex!(4); + } + }).catchError((onError) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: onError.toString()); + }); + // widget.changePageViewIndex(4); + }, + child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 16.0, color: Colors.white)), + ), + ), + ), + ], + ), + ), + ), + // Padding( + // padding: const EdgeInsets.all(8.0), + // child: Container( + // height: 56, + // child: Row( + // children: [ + // Expanded( + // child: Container( + // margin: EdgeInsets.only(left: 5, right: 5), + // child: SecondaryButton( + // textColor: Colors.white, + // color: Theme.of(context).primaryColor, + // label: TranslationBase.of(context).back.toUpperCase(), + // onTap: () => widget.changePageViewIndex(1), + // ), + // ), + // ), + // SizedBox( + // width: 10, + // ), + // Expanded( + // child: Container( + // margin: EdgeInsets.only(left: 5, right: 5), + // child: SecondaryButton( + // textColor: Colors.white, + // color: Theme.of(context).primaryColor, + // label: TranslationBase.of(context).next.toUpperCase(), + // disabled: widget.selectedQuestions.isEmpty, + // onTap: () => widget.changePageViewIndex(3), + // ), + // ), + // ), + // ], + // ), + // ), + // ), + ), + ); + } +} diff --git a/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart b/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart new file mode 100644 index 00000000..c41c2fc2 --- /dev/null +++ b/lib/pages/ErService/EdOnline/EdOnlineSelectedHospitalPage.dart @@ -0,0 +1,198 @@ +import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class EdOnlineSelectedHospitalPage extends StatefulWidget { + final Function changePageViewIndex; + TriageInformationRequest triageInformationRequest; + + EdOnlineSelectedHospitalPage( + {Key? key, + required this.changePageViewIndex, + required this.triageInformationRequest}) + : super(key: key); + + @override + _EdOnlineSelectedHospitalPageState createState() => + _EdOnlineSelectedHospitalPageState(); +} + +class _EdOnlineSelectedHospitalPageState + extends State { + HospitalsModel? selectedProject; + final GlobalKey locationDropdownKey = GlobalKey(); + late ProjectViewModel projectViewModel; + int _selected = 0; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getHospitals(projectViewModel.isArabic ? 1 : 2), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + children: [ + Container( + margin: EdgeInsets.all(12.0), + child: Text(TranslationBase.of(context).onlineCheckInAgreement, + style: TextStyle( + fontSize: 14.0, + color: Colors.black, + letterSpacing: -0.56)), + ), + Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + margin: EdgeInsets.all(12.0), + padding: + EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectLocation, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 20, + child: DropdownButtonHideUnderline( + child: DropdownButton( + onTap: () { + print("Clicked"); + }, + key: locationDropdownKey, + hint: new Text( + TranslationBase.of(context).selectHospital, + ), + value: selectedProject, + iconSize: 0, + isExpanded: true, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.56, + color: Colors.black, + fontFamily: projectViewModel.isArabic + ? 'Cairo' + : 'Poppins'), + items: + model.hospitals.map((HospitalsModel item) { + return DropdownMenuItem( + value: item, + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Text(item.name! + + " - " + + item.distanceInKilometers + .toString() + + " " + + TranslationBase.of(context).km_) + ], + ), + ); + }).toList(), + onChanged: (HospitalsModel? newValue) { + if (newValue != null) { + setState(() { + selectedProject = newValue; + widget.triageInformationRequest + .selectedHospital = selectedProject; + }); + } + }, + ), + ), + ), + ], + ), + ), + Icon(Icons.keyboard_arrow_down), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Radio( + value: 1, + groupValue: _selected, + onChanged: onRadioChanged, + ), + Text( + TranslationBase.of(context).agreeTo, + style: new TextStyle( + fontSize: 12.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + color: CustomColors.textColor, + ), + ), + mWidth(4), + InkWell( + onTap: () { + launch("https://hmg.com/en/Pages/Privacy.aspx"); + }, + child: Text( + TranslationBase.of(context).termsConditoins, + style: new TextStyle( + fontSize: 12.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + color: CustomColors.accentColor, + ), + ), + ), + ], + ), + ), + ], + ), + ), + bottomSheet: Container( + color: CustomColors.appBackgroudGreyColor, + padding: EdgeInsets.all(12.0), + child: DefaultButton( + TranslationBase.of(context).next, + (widget.triageInformationRequest.selectedHospital == null || + _selected == 0) + ? null + : () { + widget.changePageViewIndex(2); + }, + color: CustomColors.green, + disabledColor: CustomColors.grey2, + ), + ), + ), + ); + } + + void onRadioChanged(int? value) { + setState(() { + _selected = value!; + }); + } +} diff --git a/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart b/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart new file mode 100644 index 00000000..705a6e59 --- /dev/null +++ b/lib/pages/ErService/EdOnline/EdPaymentInformationPage.dart @@ -0,0 +1,244 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/EdOnlineViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class EdPaymentInformationPage extends StatefulWidget { + final HospitalsModel? selectedHospital; + + const EdPaymentInformationPage({Key? key, this.selectedHospital}) : super(key: key); + + @override + _EdPaymentInformationPageState createState() => _EdPaymentInformationPageState(); +} + +class _EdPaymentInformationPageState extends State { + late MyInAppBrowser browser; + late ProjectViewModel projectViewModel; + String transID = ""; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) async => await model.getPatientPaymentInformation(), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + children: [ + model.erPatientShareModel != null ? Container( + decoration: cardRadius(12), + margin: EdgeInsets.fromLTRB(12.0, 30.0, 12.0, 5.0), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(TranslationBase.of(context).payment, + style: TextStyle( + color: Colors.black, + fontSize: 16.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + )), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 10, bottom: 3), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).patientShareToDo), + ), + Expanded( + child: _getNormalText(model.erPatientShareModel!.patientShare!.toStringAsFixed(2) ?? "0", isBold: true), + ) + ], + ), + ), + mDivider(Colors.grey[200]!), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 3, bottom: 3), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).patientTaxToDo), + ), + Expanded( + child: _getNormalText(model.erPatientShareModel!.patientTaxAmount!.toStringAsFixed(2) ?? "0", isBold: true), + ) + ], + ), + ), + mDivider(Colors.grey[200]!), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 3, bottom: 3), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo), + ), + Expanded( + child: _getNormalText(model.erPatientShareModel!.patientShareWithTax!.toStringAsFixed(2) ?? "0", isBold: true), + ) + ], + ), + ), + ], + ), + ), + ) : Container(), + mHeight(50.0), + Text( + TranslationBase.of(context).payOptions, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 12.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + Container(margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), child: getPaymentMethods()), + ], + ), + ), + bottomSheet: Container( + color: CustomColors.appBackgroudGreyColor, + padding: EdgeInsets.all(12.0), + child: DefaultButton( + TranslationBase.of(context).payNow.toUpperCase(), + () { + Navigator.push(context, FadePage(page: PaymentMethod( + onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) { + setState(() {}); + }, patientShare: model.erPatientShareModel!.patientShareWithTax!, isFromAdvancePayment: true, + ))).then( + (value) { + print(value); + if (value != null) { + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + appo.projectID = widget.selectedHospital!.iD; + openPayment(value[0], projectViewModel.user, model.erPatientShareModel!.patientShareWithTax!, appo); + } + }, + ); + }, + color: CustomColors.green, + disabledColor: CustomColors.grey2, + ), + ), + ), + ); + } + + _getNormalText(text, {bool isBold = false}) { + return Text( + text, + style: TextStyle( + fontSize: isBold ? 12 : 10, + letterSpacing: -0.5, + color: isBold ? Colors.black : Colors.grey[700], + fontWeight: FontWeight.w600, + ), + ); + } + + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo) { + browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); + transID = Utils.getAdvancePaymentTransID(widget.selectedHospital!.iD, projectViewModel.user!.patientID!); + browser.openPaymentBrowser(amount, "ER Online Check-In", transID, appo.projectID.toString(), authenticatedUser.emailAddress!, paymentMethod, authenticatedUser.patientType, + authenticatedUser.firstName!, authenticatedUser.patientID, authenticatedUser, browser, false, "3", "", context); + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called!!!!"); + checkPaymentStatus(appo); + } + + checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + service.checkPaymentStatus(transID, false, AppGlobal.context).then((res) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + String paymentInfo = res['Response_Message']; + if (paymentInfo == 'Success') { + ER_createAdvancePayment(res, appo); + } else { + AppToast.showErrorToast(message: res['Response_Message']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + ER_createAdvancePayment(payment_res, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + service.ER_createAdvancePayment(appo, appo.projectID.toString(), payment_res['Amount'], payment_res['Fort_id'], payment_res['PaymentMethod'], AppGlobal.context).then((res) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + ER_InsertEROnlinePaymentDetails(payment_res, appo); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + ER_InsertEROnlinePaymentDetails(payment_res, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + service.ER_InsertEROnlinePaymentDetails(appo, appo.projectID.toString(), payment_res['Amount'], payment_res['Fort_id'], payment_res['PaymentMethod'], AppGlobal.context).then((res) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showSuccessToast(message: TranslationBase.of(context).success); + Navigator.of(context).pop(); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showErrorToast(message: err); + print(err); + }); + } +} diff --git a/lib/pages/ErService/ErOptions.dart b/lib/pages/ErService/ErOptions.dart new file mode 100644 index 00000000..9253dd52 --- /dev/null +++ b/lib/pages/ErService/ErOptions.dart @@ -0,0 +1,106 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.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'; + +import '../../uitl/translations_delegate_base.dart'; +import 'AmbulanceReq.dart'; +import 'EdOnline/DdServicesPage.dart'; +import 'NearestEr.dart'; + +class ErOptions extends StatefulWidget { + final bool isAppbar; + + const ErOptions({Key? key, required this.isAppbar}) : super(key: key); + + @override + _ErOptionsState createState() => _ErOptionsState(); +} + +class _ErOptionsState extends State { + late LocationUtils locationUtils; + late ProjectViewModel projectViewModel; + + @override + void initState() { + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) => locationUtils.getCurrentLocation()); + + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + final rrtLocked = projectViewModel.havePrivilege(68); + + return AppScaffold( + isShowAppBar: widget.isAppbar, + appBarTitle: TranslationBase.of(context).emergencyServices, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF8F8F8), + body: GridView( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.all(21), + shrinkWrap: true, + children: [ + InkWell( + onTap: () { + if (projectViewModel.havePrivilege(63)) Navigator.push(context, FadePage(page: AmbulanceReq())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).ambulancerequest, + imagePath: 'assets/images/new-design/AM.PNG', + subTitle: TranslationBase.of(context).requestA, + isPngImage: true, + isEnable: projectViewModel.havePrivilege(63), + ), + ), + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: NearestEr())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).nearester, + imagePath: 'assets/images/new-design/emergency_icon.png', + subTitle: TranslationBase.of(context).locationa, + isPngImage: true, + ), + ), + InkWell( + onTap: () { + if (rrtLocked) Navigator.push(context, FadePage(page: RRTMainScreen())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).RRTTitle, + imagePath: 'assets/images/new-design/AM.PNG', + subTitle: TranslationBase.of(context).RRTSubTitle, + isPngImage: true, + isEnable: rrtLocked, + ), + ), + InkWell( + onTap: () { + if (projectViewModel.havePrivilege(81)) Navigator.push(context, FadePage(page: DdServicesPage())); + // Navigator.push(context, FadePage(page: DdServicesPage())); + }, + child: MedicalProfileItem( + title: "ED", + imagePath: 'assets/images/new-design/AM.PNG', + subTitle: TranslationBase.of(context).service, + isPngImage: true, + isEnable: projectViewModel.havePrivilege(81), + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/ErService/NearestEr.dart b/lib/pages/ErService/NearestEr.dart new file mode 100644 index 00000000..20b664d9 --- /dev/null +++ b/lib/pages/ErService/NearestEr.dart @@ -0,0 +1,119 @@ +import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; +import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart'; +import 'package:diplomaticquarterapp/core/service/er/er_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/hospital_location.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import '../../uitl/translations_delegate_base.dart'; + +class NearestEr extends StatefulWidget { + static const String _url = "assets/images/"; + + int? appointmentNo; + int? projectID; + + NearestEr({ this.appointmentNo, this.projectID}); + + @override + _NearestErState createState() => _NearestErState(); +} + +class _NearestErState extends State { + List projectAvgERWaitingTimeModelList =[]; + + late bool isDataLoaded; + late LocationUtils locationUtils; + + @override + void initState() { + isDataLoaded = false; + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) { + locationUtils.getCurrentLocation(); + getERList(); + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + var size = MediaQuery.of(context).size; + final double itemHeight = (size.height - kToolbarHeight - 24) / 2; + final double itemWidth = size.width / 2; + + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).NearestEr, + body: isDataLoaded != null + ? isDataLoaded + ? ListView( + padding: EdgeInsets.all(21), + physics: BouncingScrollPhysics(), + children: [ + Text( + TranslationBase.of(context).NearestErDesc, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + SizedBox(height: 21), + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + padding: EdgeInsets.zero, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemBuilder: (context, index) { + GetHMGLocationsModel location = GetHMGLocationsModel(); + location.locationName = projectAvgERWaitingTimeModelList[index].projectName; + location.cityName = projectAvgERWaitingTimeModelList[index].projectName; + location.projectImageURL = projectAvgERWaitingTimeModelList[index].projectImageURL; + print(projectAvgERWaitingTimeModelList[index].phonenumber); + location.phoneNumber = projectAvgERWaitingTimeModelList[index].phonenumber; + location.latitude = projectAvgERWaitingTimeModelList[index].latitude; + location.longitude = projectAvgERWaitingTimeModelList[index].longitude; + location.distanceInKilometers = projectAvgERWaitingTimeModelList[index].distanceInKilometers; + return HospitalLocation(location, waitingTime: projectAvgERWaitingTimeModelList[index].avgTimeInHHMM.toString()); + }, + itemCount: projectAvgERWaitingTimeModelList.length, + ), + ], + ) + : Center( + child: Texts('No Data'), + ) + : SizedBox(), + ); + } + + getERList() async { + GifLoaderDialogUtils.showMyDialog(context); + ErService service = new ErService(); + service.getProjectAvgERWaitingTimeOrders().then((response) { + if (response != null && response['MessageStatus'] == 1) { + setState(() { + projectAvgERWaitingTimeModelList.clear(); + response['List_ProjectAvgERWaitingTime'].forEach((vital) { + projectAvgERWaitingTimeModelList.add(ProjectAvgERWaitingTime.fromJson(vital)); + }); + isDataLoaded = true; + }); + GifLoaderDialogUtils.hideDialog(context); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: TranslationBase.of(context).serviceNotAvailable); + isDataLoaded = false; + } + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err.toString()); + }); + } +} diff --git a/lib/pages/ErService/OrderLogPage.dart b/lib/pages/ErService/OrderLogPage.dart new file mode 100644 index 00000000..a551bda6 --- /dev/null +++ b/lib/pages/ErService/OrderLogPage.dart @@ -0,0 +1,260 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/er/AmbulanceRequestOrdersModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class OrderLogPage extends StatelessWidget { + final AmRequestViewModel amRequestViewModel; + + OrderLogPage({Key? key, required this.amRequestViewModel}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + void showConfirmMessage(AmRequestViewModel model, int presOrderID, BuildContext context) { + showDialog( + context: context, + builder: (cxt) => ConfirmWithMessageDialog( + message: TranslationBase.of(context).cancelOrderMsg, + onTap: () { + Future.delayed(new Duration(milliseconds: 300)).then((value) async { + // GifLoaderDialogUtils.showMyDialog(context); + await model.updatePressOrder(presOrderID: presOrderID); + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + // GifLoaderDialogUtils.hideDialog(context); + } else { + AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); + // GifLoaderDialogUtils.hideDialog(context); + } + }); + }, + )); + return; + } + + return Container( + // margin: EdgeInsets.all(10), + padding: EdgeInsets.all(8), + child: amRequestViewModel.patientAmbulanceRequestOrdersList.length > 0 + ? ListView.builder( + padding: EdgeInsets.all(21), + reverse: false, + itemCount: amRequestViewModel.patientAmbulanceRequestOrdersList.length, + itemBuilder: (context, index) { + AmbulanceRequestOrdersModel order = amRequestViewModel.patientAmbulanceRequestOrdersList.reversed.toList()[index]; + + int status = order.statusId!; + String _statusDisp = order.statusText!; + Color? _color; + if (status == 1) { + //pending + _color = Color(0xffCC9B14); + } else if (status == 2) { + //processing + _color = Color(0xff2E303A); + } else if (status == 3) { + //completed + _color = Color(0xff359846); + } else if (status == 4 || status == 6 || status == 7) { + //cancel // Rejected + _color = Color(0xffD02127); + } + + return Container( + margin: EdgeInsets.only(bottom: 12.0), + decoration: BoxDecoration( + color: _color, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Container( + margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), + padding: EdgeInsets.symmetric(vertical: 13, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _statusDisp, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _color, letterSpacing: -0.4, height: 16 / 10), + ), + SizedBox(height: 6), + Text( + '${TranslationBase.of(context).requestID}: ${order.iD}', + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).pickupDate + ": ", + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Expanded( + child: Text( + DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(order.created!)!), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 16 / 10), + ), + ), + ], + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).transportMethod + ": ", + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Expanded( + child: Text( + order.serviceText!, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 16 / 10), + ), + ), + ], + ), + SizedBox( + height: 13.0, + ), + ], + ), + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + SizedBox(height: 12), + if (order.statusId == 1 || order.statusId == 2) + InkWell( + onTap: () { + showConfirmMessage(amRequestViewModel, order.iD!, context); + }, + child: Container( + padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), + decoration: BoxDecoration( + color: Color(0xffD02127), + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.circular(10), + ), + child: Text( + TranslationBase.of(context).cancel_nocaps, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4), + ), + ), + ), + ], + ), + ], + ), + Row( + children: [ + Container( + margin: projectViewModel.isArabic ? EdgeInsets.only(left: 10.0) : EdgeInsets.only(right: 10.0), + width: 8, + height: 8, + decoration: containerRadius( + CustomColors.textColor, + 100, + ), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).pickupLocation + ": ", + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Container( + width: MediaQuery.of(context).size.width * 0.7, + child: Text( + order.pickupLocation!.trim().toString(), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, overflow: TextOverflow.clip), + ), + ), + ], + ), + ], + ), + Container( + height: 20.0, + width: 1.0, + color: CustomColors.grey2, + margin: const EdgeInsets.only(left: 3.0, right: 3.0), + ), + Row( + children: [ + Container( + margin: projectViewModel.isArabic ? EdgeInsets.only(left: 10.0) : EdgeInsets.only(right: 10.0), + width: 8, + height: 8, + decoration: containerRadius( + CustomColors.accentColor, + 100, + ), + ), + Expanded(child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).dropoffLocation + ": ", + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Text( + order.dropOffLocation!.trim().toString(), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48), overflow: TextOverflow.ellipsis, + ), + ], + )), + ], + ), + ], + ), + ), + ); + }) + : getNoDataWidget(context), + ); + } + + String getDate(String date) { + return date.split("T")[0]; + } +} diff --git a/lib/pages/ErService/rapid-response-team/rrt-agreement-page.dart b/lib/pages/ErService/rapid-response-team/rrt-agreement-page.dart new file mode 100644 index 00000000..8be47868 --- /dev/null +++ b/lib/pages/ErService/rapid-response-team/rrt-agreement-page.dart @@ -0,0 +1,48 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class RRTAgreementPage extends StatelessWidget{ + late TranslationBase localize; + + @override + Widget build(BuildContext context) { + localize = TranslationBase.of(context); + + return AppScaffold( + appBarTitle: localize.userAgreement, + isShowAppBar: true, + showHomeAppBarIcon: false, + body: SingleChildScrollView( + padding: EdgeInsets.all(20), + child: Column( + children: [ + Text(localize.rrtUserAgreementTitle, style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500, fontSize: 22), maxLines: 100, textAlign: TextAlign.center), + SizedBox(height: 20), + text(localize.rrtUserAgreementP1), + text(localize.rrtUserAgreementP2), + text(localize.rrtUserAgreementP3) + ], + ), + ) + ); + } + + Widget text(String string)=> Padding( + padding: const EdgeInsets.symmetric(vertical: 15), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + clipBehavior: Clip.hardEdge, + width: 10, height: 10, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(20), color: Colors.black) + ), + SizedBox(width: 20), + Expanded(child: Text(string, style: TextStyle(color: Colors.black87, fontSize: 18), maxLines: 100, textAlign: TextAlign.justify)), + ], + ), + ); + +} \ No newline at end of file diff --git a/lib/pages/ErService/rapid-response-team/rrt-logs-page.dart b/lib/pages/ErService/rapid-response-team/rrt-logs-page.dart new file mode 100644 index 00000000..314abf9a --- /dev/null +++ b/lib/pages/ErService/rapid-response-team/rrt-logs-page.dart @@ -0,0 +1,63 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; +import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart'; +import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-order-list-item.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class RRTLogPage extends StatefulWidget { + final List orders; + + const RRTLogPage({required this.orders}); + + @override + State createState() => RRTLogPageState(); +} + +class RRTLogPageState extends State { + late RRTViewModel viewModel; + + @override + void initState() { + setState(() {}); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (vm) => { + viewModel = vm, + }, + builder: (ctx, vm, widgetState) { + return widget.orders.length > 0 + ? ListView.builder( + itemCount: widget.orders.length, + padding: EdgeInsets.all(21), + itemBuilder: (ctx, idx) { + var order = widget.orders.reversed.toList()[idx]; + return RRTLogListItem(order, onCancel: deleteOrder); + }) + : getNoDataWidget(context); + }); + } + + deleteOrder(GetCMCAllOrdersResponseModel order) async { + GifLoaderDialogUtils.showMyDialog(context); + var success = await viewModel.cancelOrderRC(order); + + if (success) { + viewModel.setState(ViewState.Busy); + await viewModel.getAllOrdersRC(); + viewModel.setState(ViewState.Idle); + Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RRTMainScreen)); + Navigator.push(context, FadePage(page: RRTMainScreen())); + } + } +} \ No newline at end of file diff --git a/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart b/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart new file mode 100644 index 00000000..83451428 --- /dev/null +++ b/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart @@ -0,0 +1,140 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/rrt/service_price.dart'; +import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-logs-page.dart'; +import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-page.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class RRTMainScreen extends StatefulWidget { + final index = 0; + + RRTMainScreen({index}); + + @override + State createState() => RRTMainScreenState(); +} + +class RRTMainScreenState extends State with SingleTickerProviderStateMixin { + int currentIndex = 0; + late TabController tabController; + PageController pageController = PageController(initialPage: 0, keepPage: true); + + late RRTViewModel viewModel; + late bool loadingData; + + List imagesInfo =[]; + + late ProjectViewModel projectViewModel; + + @override + void initState() { + super.initState(); + imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/RRT/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/RRT/ar/0.png')); + tabController = TabController(length: 2, vsync: this); + } + + late TranslationBase localize; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + localize = TranslationBase.of(context); + + return AppScaffold( + appBarTitle: localize.rapidResponseTeam, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + description: TranslationBase.of(context).rrtDDetails, + imagesInfo: imagesInfo, + body: BaseView( + onModelReady: (vm) async { + viewModel = vm; + loadingData = true; + await vm.loadRequiredData(projectViewModel.isArabic ? 1 : 2).then((value) {}).whenComplete(() => setState(() => loadingData = false)); + }, + builder: (ctx, vm, widget) => content(), + )); + } + + Widget content() { + if (loadingData == true) { + return Center(child: CircularProgressIndicator()); + // else if(viewModel.state == ViewState.Error) + + } else if (viewModel.rrtServiceData != null && viewModel.rrtProcedureList != null) { + return Column( + children: [tabBar(), Expanded(child: contentPager())], + ); + } else { + return Container( + alignment: Alignment.center, + child: Text( + localize.somethingWentWrongTryLater, + style: TextStyle(color: Colors.red), + maxLines: 5, + ), + ); + } + } + + Widget tabBar() => Container( + margin: EdgeInsets.all(0.0), + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)), + child: TabBar( + onTap: onPageChanged, + controller: tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 5, bottom: 5), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 15, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 15, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [ + Tab( + child: Text( + localize.rapidResponseTeam, + style: TextStyle(color: Theme.of(context).appBarTheme.backgroundColor), + ), + ), + Tab( + child: Text( + localize.orderLog, + style: TextStyle(color: Theme.of(context).appBarTheme.backgroundColor!), + ), + ), + ]), + ); + + Widget contentPager() => PageView( + onPageChanged: onPageChanged, + controller: pageController, + children: [ + RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders, viewModel: viewModel), + RRTLogPage(orders: viewModel.rrtServiceData.completedOrders), + ], + ); + + void onPageChanged(int index) { + pageController.animateToPage(index, duration: Duration(milliseconds: 200), curve: Curves.easeInOut); + tabController.animateTo(index); + } +} diff --git a/lib/pages/ErService/rapid-response-team/rrt-order-list-item.dart b/lib/pages/ErService/rapid-response-team/rrt-order-list-item.dart new file mode 100644 index 00000000..50df1033 --- /dev/null +++ b/lib/pages/ErService/rapid-response-team/rrt-order-list-item.dart @@ -0,0 +1,242 @@ +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; + +final _item_content_seperator = Container(height: 0.25, padding: EdgeInsets.all(10), color: Colors.grey.withOpacity(0.5)); + +class RRTLogListItem extends StatefulWidget { + final GetCMCAllOrdersResponseModel? order; + final Function(GetCMCAllOrdersResponseModel)? onCancel; + + RRTLogListItem(this.order, {this.onCancel}); + + @override + State createState() => RRTLogListItemState(); + late BuildContext _context; +} + +class RRTLogListItemState extends State { + late RRTViewModel viewModel; + late TranslationBase localize; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + localize = TranslationBase.of(context); + int status = widget.order!.statusId!; + String _statusDisp = widget.order!.statusText!; + Color? _color; + if (status == 1) { + //pending + _color = Color(0xffCC9B14); + } else if (status == 2) { + //processing + _color = Color(0xff2E303A); + } else if (status == 3) { + //completed + _color = Color(0xff359846); + } else if (status == 4 || status == 6 || status == 7) { + //cancel // Rejected + _color = Color(0xffD02127); + } + return BaseView( + onModelReady: (vm) => { + viewModel = vm, + }, + builder: (ctx, vm, widgetState) { + return Container( + margin: EdgeInsets.all(5), + decoration: BoxDecoration( + color: _color, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Container( + // decoration: containerColorRadiusLeft(Colors.white, 12), + margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), + padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + ), + ), + // clipBehavior: Clip.antiAlias, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _statusDisp, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _color, letterSpacing: -0.4, height: 16 / 10), + ), + SizedBox(height: 6), + Text( + '${TranslationBase.of(context).requestID}: ${widget.order!.iD}', + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + // Row( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Text( + // TranslationBase.of(context).locationa + ": ", + // style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + // ), + // Expanded( + // child: Text( + // widget.order.projectName.toString(), + // style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), + // ), + // ), + // ], + // ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + localize.pickupDate + ": ", + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + Expanded( + child: Text( + DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.order!.created!)!), + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), + ), + ), + ], + ), + ], + ), + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text( + DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.order!.created!)!), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10), + ), + SizedBox(height: 12), + if (widget.order!.statusId == 1 || widget.order!.statusId == 2) + InkWell( + onTap: () { + //onCancel(order); + cancelOrders(widget.order); + }, + child: Container( + padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), + decoration: BoxDecoration( + color: Color(0xffD02127), + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.circular(10), + ), + child: Text( + TranslationBase.of(context).cancel_nocaps, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4), + ), + ), + ), + ], + ), + ], + ), + ), + ); + }); + + // return Container( + // padding: EdgeInsets.all(15), + // margin: EdgeInsets.symmetric(horizontal: 15, vertical: 10), + // decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(15), boxShadow: [BoxShadow(color: Colors.grey.withOpacity(0.25), spreadRadius: 1, blurRadius: 3)]), + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.stretch, + // children: [ + // _contentItem(label: localize.reqId, value: order.iD.toString()), + // _item_content_seperator, + // _contentItem(label: localize.status, value: projectViewModel.isArabic ? order.descriptionN.toString() : order.description.toString()), //order.getStatusName(localize)), + // _item_content_seperator, + // _contentItem(label: localize.pickupDate, value: order.getFormattedDateTime()), + // _item_content_seperator, + // _contentItem(label: localize.location, value: order.getNearestProjectDescription()), + // _item_content_seperator, + // SizedBox(height: 10), + // if (order.status == 1 || order.status == 2) Container(child: cancelButton()) + // ], + // ), + // ); + } + + // Widget _contentItem({@required String label, String value}) { + // return Container( + // padding: EdgeInsets.symmetric(vertical: 10), + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Text( + // label, + // style: TextStyle(color: Theme.of(_context).appBarTheme.color, fontSize: 9, letterSpacing: 1), + // ), + // SizedBox( + // height: 5, + // ), + // Text( + // value, + // style: TextStyle(color: Theme.of(_context).appBarTheme.color, fontWeight: FontWeight.bold, fontSize: 14), + // ), + // ], + // ), + // ); + // } + + // Widget cancelButton() => MaterialButton( + // height: 45, + // color: Color(0xFFc5272d), + // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), + // onPressed: () => onCancel(order), + // child: Text( + // localize.cancel, + // style: TextStyle(color: Colors.white, fontSize: 13), + // ), + // ); + cancelOrders(order) async { + GifLoaderDialogUtils.showMyDialog(context); + var success = await viewModel.cancelOrderRC(order); + + if (success) { + viewModel.setState(ViewState.Busy); + await viewModel.getAllOrdersRC(); + viewModel.setState(ViewState.Idle); + Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RRTMainScreen)); + Navigator.push(context, FadePage(page: RRTMainScreen())); + } + } +} diff --git a/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart b/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart new file mode 100644 index 00000000..dd5ce2fa --- /dev/null +++ b/lib/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart @@ -0,0 +1,353 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/rrt/RRTProcedureList.dart'; +import 'package:diplomaticquarterapp/models/rrt/service_price.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/app_map/google_huawei_map.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:geolocator/geolocator.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; + +import 'rrt-place-order.dart'; + +class RRTRequestPickupAddressPage extends StatefulWidget { + final ServicePrice servicePrice; + final VidaProcedureList selectedProcedure; + + RRTRequestPickupAddressPage({required this.servicePrice, required this.selectedProcedure}); + + @override + State createState() => RRTRequestPickupAddressPageState(); +} + +class RRTRequestPickupAddressPageState extends State with SingleTickerProviderStateMixin { + bool acceptTerms = false; + + bool mapIdle = true; + Completer mapController = Completer(); + + static CameraPosition cameraPosition = CameraPosition( + target: LatLng(37.42796133580664, -122.085749655962), + zoom: 17, + ); + + late LatLng currentPostion; + List myAddresses = []; + AddressInfo selectedAddress = new AddressInfo(); + StreamController addressStreamController = StreamController(); + late Stream addressStream; + StreamController addressLoadingStreamController = StreamController(); + late Stream addressLoadingStream; + + // AddressInfo _selectedAddress; + double latitude = 0; + double longitude = 0; + late AppMap appMap; + bool showCurrentLocation = false; + AppSharedPreferences sharedPref = AppSharedPreferences(); + late LocationUtils locationUtils; + + @override + void initState() { + super.initState(); + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) => locationUtils.getCurrentLocation()); + + appMap = AppMap( + cameraPosition.toMap() as Map, + //Changed by Aamir + onCameraMove: _updatePosition!, + + onMapCreated: () { + _getUserLocation(); + setState(() {}); + }, + ); + } + + setLatitudeAndLongitude({bool isSetState = false, String? latLong}) async { + if (latLong == null) { + if (myAddresses.isEmpty) { + setState(() { + showCurrentLocation = true; + }); + } else { + latLong = myAddresses[myAddresses.length - 1].latLong; + } + } + + if (!showCurrentLocation) { + List latLongArr = latLong!.split(','); + + latitude = double.parse(latLongArr[0]); + longitude = double.parse(latLongArr[1]); + currentPostion = LatLng(latitude, longitude); + setMap(); + } + } + + setMap() { + setState(() { + cameraPosition = CameraPosition( + target: currentPostion, + zoom: 16, + ); + appMap.moveTo(cameraPostion: cameraPosition); + selectedAddress.latLong = currentPostion.latitude.toString() + "," + currentPostion.longitude.toString(); + }); + } + + void loadAddresses() async { + await viewModel.getCustomerInfo(); + + if (viewModel.addressesList.isNotEmpty) setState(() {}); + } + + late TranslationBase localize; + late RRTViewModel viewModel; + + @override + Widget build(BuildContext context) { + localize = TranslationBase.of(context); + ProjectViewModel projectViewModel = Provider.of(context); + + addressStreamController.sink.add(0); + + return BaseView( + onModelReady: (vm) { + viewModel = vm; + loadAddresses(); + myAddresses = viewModel.addressesList; + }, + builder: (ctx, vm, widget) => AppScaffold( + appBarTitle: localize.pickupLocation, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + baseViewModel: viewModel, + body: Column( + children: [ + Container( + margin: EdgeInsets.only(left: 12, right: 12, bottom: 12, top: 12), + decoration: cardRadius(12), + child: Container( + child: InkWell( + onTap: () => confirmSelectLocationDialog(myAddresses), + child: Container( + padding: EdgeInsets.all(8), + width: double.infinity, + // height: 65, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + getAddressName(), + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.45, + ), + ), + ), + Icon(Icons.arrow_drop_down) + ], + ), + ), + ), + height: 50, + width: double.infinity, + ), + ), + InkWell( + onTap: () async { + Navigator.push( + context, + FadePage( + page: LocationPage( + // latitude: latitude, + // longitude: longitude, + ), + ), + ); + }, + child: Padding( + padding: EdgeInsets.only(left: 12, right: 12, bottom: 16, top: 8), + child: Row( + children: [ + Icon(Icons.add_circle_outline_sharp), + mWidth(12), + Text( + TranslationBase.of(context).addNewAddress, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + ], + ), + ), + ), + Expanded( + child: Stack( + alignment: Alignment.center, + children: [ + if (appMap != null) appMap, + Icon( + Icons.place, + color: CustomColors.accentColor, + size: 50, + ), + ], + ), + ), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14), + child: continueButton(), + ), + ], + ))); + } + + void _updatePosition() { + latitude = cameraPosition.target.latitude; + longitude = cameraPosition.target.longitude; + selectedAddress.latLong = latitude.toString() + "," + longitude.toString(); + } + + Widget centerTargetPoint() { + double size = mapIdle ? 20 : 30; + double margin = mapIdle ? 3 : 10; + return Center( + child: Container( + width: size, + height: size, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(20), border: Border.all(width: 2, color: Theme.of(context).appBarTheme.backgroundColor!)), + child: Container(margin: EdgeInsets.all(margin), decoration: BoxDecoration(color: Theme.of(context).appBarTheme.backgroundColor, borderRadius: BorderRadius.circular(20))), + ), + ); + } + + Widget continueButton() { + return Padding( + padding: const EdgeInsets.all(0.0), + child: DefaultButton(TranslationBase.of(context).continues, () { + Navigator.push( + context, + FadePage( + page: RRTPlaceOrderPage( + selectedAddress: selectedAddress, + servicePrice: widget.servicePrice, + selectedProcedure: widget.selectedProcedure, + ))); + }), + ); + } + + void confirmSelectLocationDialog(List addresses) { + showDialog( + context: context, + builder: (cxt) => SelectLocationDialog( + addresses: addresses, + selectedAddress: selectedAddress, + onValueSelected: (value) { + showCurrentLocation = false; + setLatitudeAndLongitude(latLong: value.latLong); + + setState(() { + selectedAddress = value; + }); + }, + ), + ); + } + + String getAddressName() { + if (selectedAddress != null && selectedAddress.address1 != null) + return selectedAddress.address1!; + else + return TranslationBase.of(context).selectAddress; + } + + moveToLocation(LatLng location, {bool animate = true}) async { + await Future.delayed(Duration(milliseconds: 200)); + cameraPosition = CameraPosition( + target: location, + zoom: 16.4746, + ); + if (animate) + (await mapController.future).animateCamera( + CameraUpdate.newCameraPosition(cameraPosition), + ); + else + (await mapController.future).moveCamera( + CameraUpdate.newCameraPosition(cameraPosition), + ); + } + + void _getUserLocation() async { + + LocationSettings locationSettings = LocationSettings( + accuracy: LocationAccuracy.low + ); + + if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { + var lat = await this.sharedPref.getDouble(USER_LAT); + var long = await this.sharedPref.getDouble(USER_LONG); + latitude = lat; + longitude = long; + currentPostion = LatLng(lat, long); + setMap(); + } else { + if (await Permission.location.request().isGranted) { + var position = await GeolocatorPlatform.instance.getCurrentPosition(locationSettings: locationSettings); + currentPostion = LatLng(position.latitude, position.longitude); + latitude = position.latitude; + longitude = position.longitude; + setMap(); + } else { + requestPermissions().then( + (value) async { + if (value[Permission.location]!.isGranted) { + var position = await GeolocatorPlatform.instance.getCurrentPosition(locationSettings: locationSettings); + currentPostion = LatLng(position.latitude, position.longitude); + latitude = position.latitude; + longitude = position.longitude; + setMap(); + } + }, + ); + } + } + } + + goToCurrentLocation() async { + Geolocator.getCurrentPosition().then((value) { + selectedAddress = AddressInfo(latLong: '${value.latitude},${value.longitude}'); + moveToLocation(LatLng(value.latitude, value.longitude)); + }); + } +} diff --git a/lib/pages/ErService/rapid-response-team/rrt-place-order.dart b/lib/pages/ErService/rapid-response-team/rrt-place-order.dart new file mode 100644 index 00000000..6384f2fa --- /dev/null +++ b/lib/pages/ErService/rapid-response-team/rrt-place-order.dart @@ -0,0 +1,253 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/rrt/RRTProcedureList.dart'; +import 'package:diplomaticquarterapp/models/rrt/RRTRequestModel.dart'; +import 'package:diplomaticquarterapp/models/rrt/service_price.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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:flutter_svg/flutter_svg.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:provider/provider.dart'; + +class RRTPlaceOrderPage extends StatelessWidget { + late TranslationBase localize; + RRTViewModel? viewModel; + AddressInfo selectedAddress; + final ServicePrice servicePrice; + final VidaProcedureList selectedProcedure; + + RRTPlaceOrderPage({required this.selectedAddress, required this.servicePrice, required this.selectedProcedure}); + + TextEditingController noteController = TextEditingController(text: ''); + late BuildContext _context; + + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + _context = context; + localize = TranslationBase.of(context); + var lat = selectedAddress.latLong!.split(',').first; + var lng = selectedAddress.latLong!.split(',').last; + + return BaseView( + onModelReady: (vm) => viewModel = vm, + builder: (ctx, vm, wState) { + return AppScaffold( + appBarTitle: localize.rapidResponseTeam, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + body: SingleChildScrollView( + padding: EdgeInsets.all(20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text( + localize.selectedLocation, + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18), + ), + selectedAddressField(), + AspectRatio( + aspectRatio: 3 / 1, + child: ClipRRect( + clipBehavior: Clip.hardEdge, + borderRadius: BorderRadius.circular(10), + child: Image.network( + "https://maps.googleapis.com/maps/api/staticmap?center=$lat,$lng &zoom=17&size=800x600&maptype=roadmap&markers=color:red%7C$lat,$lng&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8", + fit: BoxFit.cover, + ), + ), + ), + SizedBox( + height: 10, + ), + Container( + height: 85, + margin: EdgeInsets.symmetric(vertical: 5), + padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10), + decoration: BoxDecoration( + color: Colors.white, borderRadius: BorderRadius.circular(10), boxShadow: [BoxShadow(blurRadius: 5, spreadRadius: 2, offset: Offset(2, 2), color: Colors.grey.withOpacity(0.25))]), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + localize.patientShareWithTax, + style: TextStyle(fontSize: 13), + ), + SizedBox( + height: 5, + ), + Row( + children: [ + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 18, height: 18), + mWidth(6), + Text( + "${selectedProcedure.patientShareWithTax ?? '- - -'}", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18), + ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 18, height: 18) : Container(), + ], + ), + ], + ), + ), + Container( + height: 70, + margin: EdgeInsets.symmetric(vertical: 5), + padding: EdgeInsets.symmetric(horizontal: 0, vertical: 10), + decoration: BoxDecoration( + color: Colors.white, borderRadius: BorderRadius.circular(10), boxShadow: [BoxShadow(blurRadius: 5, spreadRadius: 2, offset: Offset(2, 2), color: Colors.grey.withOpacity(0.25))]), + child: TextField( + controller: noteController, + style: TextStyle(fontSize: 18.0), + decoration: InputDecoration( + filled: true, + fillColor: Colors.white, + labelText: localize.notes, + contentPadding: const EdgeInsets.only(left: 14.0, bottom: 8.0, top: 8.0), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.white), + borderRadius: BorderRadius.circular(10), + ), + enabledBorder: UnderlineInputBorder( + borderSide: BorderSide(color: Colors.white), + borderRadius: BorderRadius.circular(10), + ), + )), + ), + ], + ), + ), + bottomSheet: submitButton(context), + ); + }, + ); + } + + Widget selectedAddressField() { + var address = "${selectedAddress.address1 ?? ''} ${selectedAddress.address2 ?? ''}"; + return selectedAddress.address1 != null + ? Container( + margin: EdgeInsets.symmetric(vertical: 10), + child: MaterialButton( + height: 50, + color: Colors.white, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), + onPressed: () {}, + child: Row( + children: [ + Expanded(child: Text(address, style: TextStyle(color: Colors.black87, fontSize: 12, letterSpacing: 1))), + Icon( + Icons.location_on_rounded, + size: 30, + color: Colors.black, + ) + ], + ), + ), + ) + : SizedBox(); + } + + Widget submitButton(BuildContext context) { + return Container( + color: Theme.of(context).scaffoldBackgroundColor, + child: Padding( + padding: const EdgeInsets.all(15), + child: DefaultButton( + localize.submit, + () => placeOrder(), + color: CustomColors.green, + ), + ), + ); + } + + placeOrder() async { + if (selectedAddress != null && selectedAddress.latLong != null && selectedAddress.latLong!.isNotEmpty && selectedAddress.latLong!.split(',').length > 1) { + GifLoaderDialogUtils.showMyDialog(_context); + + RRTRequestModel rrtRequestModel = new RRTRequestModel(); + Procedures procedures = new Procedures(); + rrtRequestModel.procedures = []; + + Map params = {}; + var cordinates = selectedAddress.latLong!.split(','); + var latlng = LatLng(double.parse(cordinates.first), double.parse(cordinates.last)); + + procedures.serviceID = selectedProcedure.procedureID; + + rrtRequestModel.latitude = latlng.latitude; + rrtRequestModel.longitude = latlng.longitude; + rrtRequestModel.additionalDetails = noteController.text; + rrtRequestModel.nationality = projectViewModel.user!.nationalityID; + rrtRequestModel.paymentAmount = selectedProcedure.patientShareWithTax; + rrtRequestModel.nearestProjectId = 0; + rrtRequestModel.patientId = projectViewModel.user!.patientID; + rrtRequestModel.patientOutSa = projectViewModel.user!.outSA; + rrtRequestModel.procedures!.add(procedures); + + // params['latitude'] = latlng.latitude; + // params['longitude'] = latlng.longitude; + // params['additionalDetails'] = noteController.text; + // params['nationality'] = projectViewModel.user.nationalityID; + // params['paymentAmount'] = selectedProcedure.patientShareWithTax; + // params['procedureId'] = selectedProcedure.procedureID; + + await viewModel!.createOrderRC(rrtRequestModel.toJson()); + + GifLoaderDialogUtils.hideDialog(_context); + + if (viewModel!.createdRequestNo != null) { + showCMCConfirmDialog( + _context, + viewModel!.createdRequestNo.toString(), + onClick: () { + Navigator.pop(_context); + Navigator.pop(_context); + gotoRRTRoot(); + }, + ); + } + + // if (requestId != null) { + // AlertDialogBox( + // context: _context, + // title: '', + // confirmMessage: localize.rrtOrderSuccessMessage, + // okText: localize.ok, + // okFunction: () { + // AlertDialogBox.closeAlertDialog(_context); + // gotoRRTRoot(); + // }).showAlertDialog(_context); + // } + } else { + AppToast.showErrorToast(message: 'Invalid location selected'); + } + } + + gotoRRTRoot() async { + viewModel!.setState(ViewState.Busy); + await viewModel!.getAllOrdersRC(); + viewModel!.setState(ViewState.Idle); + Navigator.popUntil(_context, (route) => Utils.route(route, equalsTo: RRTMainScreen)); + Navigator.push(_context, FadePage(page: RRTMainScreen())); + } +} diff --git a/lib/pages/ErService/rapid-response-team/rrt-request-page.dart b/lib/pages/ErService/rapid-response-team/rrt-request-page.dart new file mode 100644 index 00000000..0420bb54 --- /dev/null +++ b/lib/pages/ErService/rapid-response-team/rrt-request-page.dart @@ -0,0 +1,433 @@ +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/rrt/RRTProcedureList.dart'; +import 'package:diplomaticquarterapp/models/rrt/service_price.dart'; +import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-order-list-item.dart'; +import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/reports/user_agreement_page.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class RRTRequestPage extends StatefulWidget { + final List pendingOrders; + final ServicePrice servicePrice; + RRTViewModel viewModel; + + RRTRequestPage({required this.pendingOrders, required this.servicePrice, required this.viewModel}); + + @override + State createState() => RRTRequestPageState(); +} + +class RRTRequestPageState extends State { + bool acceptTerms = false; + late VidaProcedureList selectedProcedure; + + ProjectViewModel? projectViewModel; + + @override + void initState() { + // getProcedureDetails(); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (vm) { + // viewModel = vm; + selectedProcedure = widget.viewModel.rrtProcedureList[0]; + }, + builder: (ctx, vm, widgetState) { + if (widget.pendingOrders.isNotEmpty) + return currentOrderContent(); + else + return requestContent(); + }, + ); + } + + Widget requestContent() { + return Column( + children: [ + Expanded( + child: ListView( + padding: EdgeInsets.symmetric(horizontal: 20, vertical: 15), + children: [ + serviceDescription(context), + SizedBox(height: 20), + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ...List.generate( + widget.viewModel.rrtProcedureList.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 1, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + selectedProcedure = widget.viewModel.rrtProcedureList[index]; + // getPaymentInfo(context, widget.projectID.toString(), widget.selectedProcedure.procedureID); + }); + }, + child: Row( + children: [ + Radio( + value: widget.viewModel.rrtProcedureList[index], + groupValue: selectedProcedure, + activeColor: Colors.red[800], + toggleable: true, + onChanged: (value) { + setState(() { + selectedProcedure = value!; + print(selectedProcedure.procedureName); + // getPaymentInfo(context, widget.projectID.toString(), widget.selectedProcedure.procedureID); + }); + }, + ), + Expanded( + child: Text( + // projectViewModel.isArabic ? widget.proceduresList[index].procedureNameN : widget.proceduresList[index].procedureName, + widget.viewModel.rrtProcedureList[index].procedureName!, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ), + ], + ), + ), + ) + ], + ), + ], + ), + ), + ], + ), + ), + priceTable(context), + acceptPolicy(), + Container(height: 0.5, color: Theme.of(context).appBarTheme.backgroundColor), // Seperator + + Container( + padding: EdgeInsets.only(top: 20, bottom: 5), + alignment: Alignment.center, + child: Text(TranslationBase.of(context).youCanPayByTheFollowingOptions, + style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.backgroundColor, fontWeight: FontWeight.w500), maxLines: 2)), + + Container(margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0), child: getPaymentMethods()) + ], + ), + ), + actionButtons() + ], + ); + } + + Widget currentOrderContent() { + var orders = widget.pendingOrders; + return ListView.builder( + itemCount: orders.length, + padding: EdgeInsets.all(21), + itemBuilder: (ctx, idx) { + var order = orders[idx]; + return RRTLogListItem(order, onCancel: deleteOrder); + }); + } + + Widget serviceDescription(BuildContext context) => Padding( + padding: const EdgeInsets.symmetric(horizontal: 10), + child: Text( + TranslationBase.of(context).rrtDDetails, + textAlign: TextAlign.justify, + style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w300), + ), + ); + + Widget priceTable(BuildContext context) { + var radius = Radius.circular(8); + String amount = selectedProcedure.patientShare.toString(); + String vat = selectedProcedure.patientTaxAmount.toString(); + String total = selectedProcedure.patientShareWithTax.toString(); + return Container( + decoration: cardRadius(12), + padding: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).billAmount, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + mHeight(10), + Row( + children: [ + Expanded( + child: Text( + TranslationBase.of(context).patientShareToDo, + style: TextStyle( + fontSize: 10, + letterSpacing: -0.4, + color: CustomColors.textColor, + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: Row( + children: [ + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + amount, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ), + ], + ), + mHeight(4), + mDivider(CustomColors.lightGreyColor), + mHeight(4), + Row( + children: [ + Expanded( + child: Text( + TranslationBase.of(context).patientTaxToDo, + style: TextStyle( + fontSize: 10, + letterSpacing: -0.4, + color: CustomColors.textColor, + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: Row( + children: [ + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + vat, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ), + ], + ), + mHeight(4), + mDivider(CustomColors.lightGreyColor), + mHeight(4), + Row( + children: [ + Expanded( + child: Text( + TranslationBase.of(context).patientShareTotalToDo, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.4, + color: CustomColors.textColor, + fontWeight: FontWeight.bold, + ), + ), + ), + Expanded( + child: Row( + children: [ + projectViewModel!.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 14, height: 14), + mWidth(6), + Text( + total, + style: TextStyle(fontSize: 14, letterSpacing: -0.48, fontWeight: FontWeight.bold, color: CustomColors.black), + ), + mWidth(6), + projectViewModel!.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ), + ), + ], + ), + ], + ), + ); + // Column( + // crossAxisAlignment: CrossAxisAlignment.stretch, + // children: [ + // Container( + // height: 30, + // decoration: BoxDecoration(color: Theme.of(context).appBarTheme.color, borderRadius: BorderRadius.only(topLeft: radius, topRight: radius)), + // child: Center(child: Text(TranslationBase.of(context).approximateServiceFee, style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))), + // ), + // pricingRow(label: TranslationBase.of(context).patientShare, value: '$amount ${TranslationBase.of(context).sar}'), + // Container(height: 0.5, color: Theme.of(context).appBarTheme.color), + // pricingRow(label: TranslationBase.of(context).patientTaxToDo, value: '$vat ${TranslationBase.of(context).sar}'), + // Container(height: 0.5, color: Theme.of(context).appBarTheme.color), + // pricingRow(label: TranslationBase.of(context).patientShareWithTax, value: '$total ${TranslationBase.of(context).sar}', labelBold: true), + // Container(height: 0.5, color: Theme.of(context).appBarTheme.color), + // ], + // ); + } + + Widget pricingRow({required String label, required String value, bool labelBold = false, bool valueBold = false}) { + return Container( + height: 35, + margin: EdgeInsets.symmetric(horizontal: 10), + child: Row( + children: [ + Text(label, style: TextStyle(fontSize: 12, color: CustomColors.textColor, fontWeight: labelBold ? FontWeight.bold : FontWeight.normal)), + Spacer(), + Container( + height: 35, + color: Theme.of(context).appBarTheme.backgroundColor, + width: 0.5, + ), + Container( + alignment: Alignment.center, + width: MediaQuery.of(context).size.width * 0.25, + child: Text(value, style: TextStyle(fontSize: 12, color: CustomColors.textColor, fontWeight: valueBold ? FontWeight.bold : FontWeight.normal))), + ], + ), + ); + } + + Widget acceptPolicy() { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 10), + child: Row( + children: [ + Checkbox( + value: acceptTerms, + onChanged: (v) { + setState(() => acceptTerms = v!); + }), + SizedBox(width: 10), + Expanded(child: Text(TranslationBase.of(context).iAcceptTermsConditions, style: TextStyle(fontSize: 12, color: CustomColors.textColor), maxLines: 2)), + Container( + alignment: Alignment.center, + width: MediaQuery.of(context).size.width * 0.25, + child: TextButton( + child: Text(TranslationBase.of(context).clickHere, style: TextStyle(fontSize: 12, color: Colors.blue, fontWeight: FontWeight.w400)), + onPressed: () { + Navigator.push( + context, + FadePage( + page: UserAgreementContent(), + ), + ); + }), + ) + ], + ), + ); + } + + Widget paymentOptions() => Container( + height: 30, + alignment: Alignment.center, + child: Image.asset( + "assets/payment_options/payment_options.png", + fit: BoxFit.fill, + )); + + Widget actionButtons() { + return Container( + margin: EdgeInsets.all(15), + child: Row( + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).next, + () { + if (acceptTerms && selectedProcedure != null) + goToPickupAddress(); + else + AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms); + }, + color: acceptTerms ? CustomColors.accentColor : Colors.grey, + ), + ), + ], + ), + ); + } + + getProcedureDetails() { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getRRTProcedures(15, projectViewModel!.isArabic ? 1 : 2).then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res['Vida_ProcedureList']); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + goToPickupAddress() async { + Navigator.push( + context, + FadePage( + page: RRTRequestPickupAddressPage( + servicePrice: widget.servicePrice, + selectedProcedure: selectedProcedure, + ))); + } + + deleteOrder(GetCMCAllOrdersResponseModel order) async { + GifLoaderDialogUtils.showMyDialog(context); + var success = await widget.viewModel.cancelOrderRC(order); + GifLoaderDialogUtils.hideDialog(context); + if (success) + setState(() { + widget.pendingOrders.remove(order); + }); + await widget.viewModel.getAllOrdersRC(); + } +} diff --git a/lib/pages/ErService/widgets/AppointmentCard.dart b/lib/pages/ErService/widgets/AppointmentCard.dart new file mode 100644 index 00000000..3dd13ce9 --- /dev/null +++ b/lib/pages/ErService/widgets/AppointmentCard.dart @@ -0,0 +1,47 @@ +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class AppointmentCard extends StatelessWidget { + final AppoitmentAllHistoryResultList appointment; + + const AppointmentCard({Key? key, required this.appointment}) : super(key: key); + @override + Widget build(BuildContext context) { + return Container( + width: double.infinity, + margin: EdgeInsets.all(8), + padding: EdgeInsets.all(10), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Row( + children: [ + LargeAvatar( + url: appointment.doctorImageURL!, + name: appointment.doctorNameObj!, + ), + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(appointment.doctorNameObj,bold: true,), + SizedBox(height: 4,), + Texts(appointment.projectName), + Texts(appointment.clinicName), + Texts(DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointment.bookDate!))), + ], + ), + ), + ) + ], + ), + ); + } +} diff --git a/lib/pages/ErService/widgets/StepsWidget.dart b/lib/pages/ErService/widgets/StepsWidget.dart new file mode 100644 index 00000000..97acd38f --- /dev/null +++ b/lib/pages/ErService/widgets/StepsWidget.dart @@ -0,0 +1,345 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class StepsWidget extends StatelessWidget { + final int index; + final Function changeCurrentTab; + + StepsWidget({Key? key, required this.index, required this.changeCurrentTab}); + + @override + Widget build(BuildContext context) { + return Container( + width: double.infinity, + padding: EdgeInsets.only(left: 12, right: 12, bottom: 12), + child: Row( + children: [ + Expanded( + child: showProgress( + title: TranslationBase.of(context).transportation, + status: index == 0 + ? TranslationBase.of(context).inPrgress + : index > 0 + ? TranslationBase.of(context).completed + : TranslationBase.of(context).locked, + color: index == 0 ? CustomColors.orange : CustomColors.green, + ), + ), + Expanded( + child: showProgress( + title: TranslationBase.of(context).locationa, + status: index == 1 + ? TranslationBase.of(context).inPrgress + : index > 1 + ? TranslationBase.of(context).completed + : TranslationBase.of(context).locked, + color: index == 1 + ? CustomColors.orange + : index > 1 + ? CustomColors.green + : CustomColors.grey2, + ), + ), + // Expanded( + // child: showProgress( + // title: TranslationBase.of(context).otherInfo, + // status: index == 2 + // ? TranslationBase.of(context).inPrgress + // : index > 2 + // ? TranslationBase.of(context).completed + // : TranslationBase.of(context).locked, + // color: index == 2 + // ? CustomColors.orange + // : index > 2 + // ? CustomColors.green + // : CustomColors.grey2, + // ), + // ), + showProgress( + title: TranslationBase.of(context).RRTSummary, + status: index == 3 ? TranslationBase.of(context).inPrgress : TranslationBase.of(context).locked, + color: index == 3 + ? CustomColors.orange + : index > 4 + ? CustomColors.green + : CustomColors.grey2, + isNeedBorder: false, + ), + ], + ), + ); + + // return projectViewModel.isArabic? + // Stack( + // children: [ + // Container( + // height: 50, + // width: MediaQuery.of(context).size.width, + // color: Colors.transparent, + // child: Center( + // child: Divider( + // color: Colors.grey, + // height: 0.75, + // thickness: 0.75, + // ), + // ), + // ), + // Positioned( + // top: 10, + // right: 0, + // child: InkWell( + // onTap: () => changeCurrentTab(0), + // child: Container( + // width: 35, + // height: 35, + // decoration: BoxDecoration( + // border: index > 0 ? null:Border.all(color: Colors.black,width: 0.75), + // shape: BoxShape.circle, + // color: index == 0 ? Colors.grey[800] : index > 0 ?Colors.green: Colors.white, + // ), + // child: Center( + // child: Texts( + // '1', + // color: index == 0 ? Colors.white : index > 0 ?Colors.white: Colors.grey[800], + // ), + // ), + // ), + // ), + // ), + // Positioned( + // top: 10, + // right: MediaQuery.of(context).size.width * 0.3, + // child: InkWell( + // onTap: () => index >= 2 ? changeCurrentTab(1) : null, + // child: Container( + // width: 35, + // height: 35, + // decoration: BoxDecoration( + // border: index > 1 ? null:Border.all(color: Colors.black,width: 0.75), + // shape: BoxShape.circle, + // color: index == 1 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white, + // ), + // child: Center( + // child: Texts( + // '2', + // color: index == 1? Colors.white : index > 1 ?Colors.white: Colors.grey[800], + // ), + // ), + // ), + // ), + // ), + // Positioned( + // top: 10, + // right: MediaQuery.of(context).size.width * 0.6, + // child: InkWell( + // onTap: () => index >= 3 ? changeCurrentTab(2) : null, + // child: Container( + // width: 35, + // height: 35, + // decoration: BoxDecoration( + // shape: BoxShape.circle, + // border: index > 2 ? null:Border.all(color: Colors.black,width: 0.75), + // color: index == 2 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white, + // ), + // child: Center( + // child: Texts( + // '3', + // color: index == 2? Colors.white : index > 1 ?Colors.white: Colors.grey[800], + // ), + // ), + // ), + // ), + // ), + // Positioned( + // top: 10, + // left: 0, + // child: InkWell( + // onTap: () => index == 2 ?changeCurrentTab(3):null, + // child: Container( + // width: 35, + // height: 35, + // decoration: BoxDecoration( + // border: Border.all(color: Colors.black,width: 0.75), + // + // shape: BoxShape.circle, + // color: index == 3 ? Colors.grey[800] : Colors.white, + // ), + // child: Center( + // child: Texts( + // '4', + // color: index == 3 ? Colors.white : Colors.grey[800], + // ), + // ), + // ), + // ), + // ), + // ], + // ): + // Stack( + // children: [ + // Container( + // height: 50, + // width: MediaQuery.of(context).size.width, + // color: Colors.transparent, + // child: Center( + // child: Divider( + // color: Colors.grey, + // height: 0.75, + // thickness: 0.75, + // ), + // ), + // ), + // Positioned( + // top: 10, + // left: 0, + // child: InkWell( + // onTap: () => changeCurrentTab(0), + // child: Container( + // width: 35, + // height: 35, + // decoration: BoxDecoration( + // border: index > 0 ? null:Border.all(color: Colors.black,width: 0.75), + // shape: BoxShape.circle, + // color: index == 0 ? Colors.grey[800] : index > 0 ?Colors.green: Colors.white, + // ), + // child: Center( + // child: Texts( + // '1', + // color: index == 0 ? Colors.white : index > 0 ?Colors.white: Colors.grey[800], + // ), + // ), + // ), + // ), + // ), + // Positioned( + // top: 10, + // left: MediaQuery.of(context).size.width * 0.3, + // child: InkWell( + // onTap: () => index >= 2 ? changeCurrentTab(1) : null, + // child: Container( + // width: 35, + // height: 35, + // decoration: BoxDecoration( + // border: index > 1 ? null:Border.all(color: Colors.black,width: 0.75), + // shape: BoxShape.circle, + // color: index == 1 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white, + // ), + // child: Center( + // child: Texts( + // '2', + // color: index == 1? Colors.white : index > 1 ?Colors.white: Colors.grey[800], + // ), + // ), + // ), + // ), + // ), + // Positioned( + // top: 10, + // left: MediaQuery.of(context).size.width * 0.6, + // child: InkWell( + // onTap: () => index >= 3 ? changeCurrentTab(2) : null, + // child: Container( + // width: 35, + // height: 35, + // decoration: BoxDecoration( + // shape: BoxShape.circle, + // border: index > 2 ? null:Border.all(color: Colors.black,width: 0.75), + // color: index == 2 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white, + // ), + // child: Center( + // child: Texts( + // '3', + // color: index == 2? Colors.white : index > 1 ?Colors.white: Colors.grey[800], + // ), + // ), + // ), + // ), + // ), + // Positioned( + // top: 10, + // right: 0, + // child: InkWell( + // onTap: () => index == 2 ?changeCurrentTab(3):null, + // child: Container( + // width: 35, + // height: 35, + // decoration: BoxDecoration( + // border: Border.all(color: Colors.black,width: 0.75), + // + // shape: BoxShape.circle, + // color: index == 3 ? Colors.grey[800] : Colors.white, + // ), + // child: Center( + // child: Texts( + // '4', + // color: index == 3 ? Colors.white : Colors.grey[800], + // ), + // ), + // ), + // ), + // ), + // ], + // ); + } + + Widget showProgress({required String title, required String status, required Color color, bool isNeedBorder = true}) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 26, + height: 26, + decoration: containerRadius(color, 200), + child: Icon( + Icons.done, + color: Colors.white, + size: 16, + ), + ), + if (isNeedBorder) + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: mDivider(Colors.grey), + )), + ], + ), + mHeight(8), + Text( + title, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + letterSpacing: -0.44, + ), + ), + mHeight(2), + Container( + padding: EdgeInsets.all(5), + decoration: containerRadius(color.withOpacity(0.2), 4), + child: Text( + status, + style: TextStyle( + fontSize: 8, + fontWeight: FontWeight.w600, + letterSpacing: -0.32, + color: color, + ), + ), + ), + ], + ) + ], + ); + } +} diff --git a/lib/pages/InPatientServices/admission_notice.dart b/lib/pages/InPatientServices/admission_notice.dart new file mode 100644 index 00000000..313d4551 --- /dev/null +++ b/lib/pages/InPatientServices/admission_notice.dart @@ -0,0 +1,218 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class AdmissionNotice extends StatefulWidget { + const AdmissionNotice(); + + @override + State createState() => _AdmissionNoticeState(); +} + +class _AdmissionNoticeState extends State { + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + List inPatientServiceList = getAdmissionNoticeServicesList(context); + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).admissionNoticeTitle, + body: Container( + margin: EdgeInsets.all(20.0), + child: Column( + children: [ + Padding( + padding: EdgeInsets.only(left: 12, right: 12), + child: GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + padding: EdgeInsets.zero, + itemCount: inPatientServiceList.length, + itemBuilder: (BuildContext context, int index) { + return inPatientServiceList[index]; + }, + ), + ), + ], + ), + ), + ); + } + + List getAdmissionNoticeServicesList(BuildContext context) { + List serviceList = []; + + serviceList.add( + InkWell( + onTap: () { + // openBirthNotificationsPage(context); + viewModalBottomSheet(); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).admissionNoticeTitle, + imagePath: 'admission.svg', + subTitle: TranslationBase.of(context).insuranceSubtitle, + width: 50.0, + height: 40.0, + isInPatient: true, + ), + ), + ); + + return serviceList; + } + + void viewModalBottomSheet() { + showModalBottomSheet( + context: context, + builder: (context) { + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.only(left: 20, right: 20, top: 20), + child: Text( + "Admission Card", + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 21, + letterSpacing: -0.25, + height: 25 / 17, + ), + ), + ), + Container( + padding: EdgeInsets.all(16.0), + height: 250, + child: Container( + decoration: cardRadius(20, color: Color(0xFFF2B353E)), + clipBehavior: Clip.antiAlias, + margin: EdgeInsets.zero, + child: Container( + width: double.infinity, + height: double.infinity, + clipBehavior: Clip.antiAlias, + margin: EdgeInsets.zero, + decoration: projectViewModel.isArabic + ? containerBottomRightRadiusWithGradientForAr(MediaQuery.of(context).size.width / 4) + : containerBottomRightRadiusWithGradient(MediaQuery.of(context).size.width / 4), + child: Card( + color: Colors.transparent, + margin: EdgeInsets.zero, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + mFlex(2), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20), + child: Text( + projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user.lastName!, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 17, + letterSpacing: -0.25, + height: 25 / 17, + ), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20), + child: Text( + TranslationBase.of(context).roomNo + " " + (projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.roomID! : "Not assigned yet"), + style: TextStyle( + color: Colors.white, + fontSize: 15, + letterSpacing: -0.25, + height: 25 / 17, + ), + ), + ), + mFlex(2), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20), + child: Text( + projectViewModel.isPatientAdmitted + ? projectViewModel.getAdmissionInfoResponseModel.doctorName ?? "" + : projectViewModel.getAdmissionRequestInfoResponseModel.doctorName ?? "", + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 17, + letterSpacing: -0.25, + height: 25 / 17, + ), + ), + ), + // mFlex(2), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20), + child: Text( + TranslationBase.of(context).clinic + + ": " + + (projectViewModel.isPatientAdmitted + ? projectViewModel.getAdmissionInfoResponseModel.clinicName!.toString() + : projectViewModel.getAdmissionRequestInfoResponseModel.clinicName!), + style: TextStyle( + color: Colors.white, + fontSize: 15, + letterSpacing: -0.25, + height: 25 / 17, + ), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20), + child: Text( + TranslationBase.of(context).hospital + + ": " + + (projectViewModel.isPatientAdmitted + ? projectViewModel.getAdmissionInfoResponseModel.projectName!.toString() + : projectViewModel.getAdmissionRequestInfoResponseModel.projectName!), + style: TextStyle( + color: Colors.white, + fontSize: 15, + letterSpacing: -0.25, + height: 25 / 17, + ), + ), + ), + mFlex(1), + ], + ), + ), + ), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20, bottom: 30), + child: DefaultButton( + TranslationBase.of(context).close.toUpperCase(), + () { + Navigator.pop(context); + }, + color: CustomColors.accentColor, + disabledColor: CustomColors.grey2, + ), + ), + ], + ); + }); + } +} diff --git a/lib/pages/InPatientServices/birth_notification.dart b/lib/pages/InPatientServices/birth_notification.dart new file mode 100644 index 00000000..6d8e60c5 --- /dev/null +++ b/lib/pages/InPatientServices/birth_notification.dart @@ -0,0 +1,305 @@ +import 'dart:convert'; + +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/insurance/AttachInsuranceCardImageDialog.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class BirthNotification extends StatefulWidget { + const BirthNotification({Key? key}) : super(key: key); + + @override + State createState() => _BirthNotificationState(); +} + +class _BirthNotificationState extends State { + TextEditingController motherMRN = new TextEditingController(); + TextEditingController motherName = new TextEditingController(); + TextEditingController fatherName = new TextEditingController(); + TextEditingController fatherNameAR = new TextEditingController(); + TextEditingController babyName = new TextEditingController(); + TextEditingController babyNameAR = new TextEditingController(); + TextEditingController contactNumber = new TextEditingController(); + + late ProjectViewModel projectViewModel; + + List images = []; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + motherMRN.text = projectViewModel.user.patientID.toString(); + motherName.text = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!; + contactNumber.text = projectViewModel.user.mobileNumber!; + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).birthNotificationTitle + " " + TranslationBase.of(context).birthNotificationSubTitle, + body: SingleChildScrollView( + child: Container( + width: MediaQuery.of(context).size.width, + decoration: containerRadius(Colors.white, 12), + margin: EdgeInsets.all(21.0), + padding: const EdgeInsets.all(21.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).enterDetailBelow + " :", + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + mHeight(16), + inputWidget(TranslationBase.of(context).mothersMRN, "", motherMRN, isEnable: false), + mHeight(16), + inputWidget(TranslationBase.of(context).mothersName, "", motherName, isEnable: false), + mHeight(16), + inputWidget(TranslationBase.of(context).fathersNameEN, "", fatherName), + mHeight(16), + inputWidget(TranslationBase.of(context).fathersNameAR, "", fatherNameAR), + mHeight(16), + inputWidget(TranslationBase.of(context).babysNameEN, "", babyName), + mHeight(16), + inputWidget(TranslationBase.of(context).babysNameAR, "", babyNameAR), + mHeight(16), + inputWidget(TranslationBase.of(context).contactNumber, "", contactNumber), + mHeight(16), + DefaultButton( + TranslationBase.of(context).scanID, + () { + confirmAttachInsuranceCardImageDialogDialog( + context: context, name: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, fileNo: projectViewModel.user.patientID.toString()); + }, + color: CustomColors.accentColor, + disabledColor: CustomColors.grey2, + ), + if (images.isNotEmpty) mHeight(16), + if (images.isNotEmpty) + Padding( + padding: const EdgeInsets.only(top: 16.0, bottom: 16.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Image.memory( + base64Decode(images[0]), + width: 80.0, + height: 80.0, + fit: BoxFit.cover, + ), + Text( + "image 1.png", + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + InkWell( + onTap: () { + setState(() { + images.clear(); + }); + }, + child: Icon( + Icons.delete_sharp, + color: Colors.red[300], + ), + ) + ], + ), + ), + mHeight(16), + Text( + "● " + TranslationBase.of(context).birthNotificationNotes1, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + mHeight(16), + Text( + "● " + TranslationBase.of(context).birthNotificationNotes2, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + mHeight(16), + Text( + "● " + TranslationBase.of(context).birthNotificationNotes3, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + mHeight(100.0), + // DefaultButton( + // TranslationBase.of(context).submit, + // (fatherNameAR.text.isEmpty || fatherName.text.isEmpty || babyNameAR.text.isEmpty || babyName.text.isEmpty) ? null : () { + // submitBirthNotification(); + // }, + // color: CustomColors.accentColor, + // disabledColor: CustomColors.grey2, + // ), + ], + ), + ), + ), + bottomSheet: Container( + color: Colors.white, + width: double.infinity, + padding: EdgeInsets.all(20), + child: DefaultButton( + TranslationBase.of(context).submit, + (fatherNameAR.text.isEmpty || fatherName.text.isEmpty || babyNameAR.text.isEmpty || babyName.text.isEmpty || images.isEmpty) + ? null + : () { + submitBirthNotification(); + }, + color: CustomColors.accentColor, + disabledColor: CustomColors.grey2, + ), + ), + ); + } + + void submitBirthNotification() { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .submitBirthNotification( + projectViewModel.user.patientID!, projectViewModel.inPatientProjectID, fatherNameAR.text, fatherName.text, babyNameAR.text, babyName.text, contactNumber.text, images[0], context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); + Navigator.of(context).pop(); + }).catchError((err) { + print(err); + }); + } + + void confirmAttachInsuranceCardImageDialogDialog({required BuildContext context, required String name, required String fileNo}) { + showDialog( + context: context, + builder: (cxt) => AttachInsuranceCardImageDialog( + fileNo: fileNo, + name: name, + image: (file, image) async { + images.clear(); + images.add(image); + setState(() {}); + }, + isBirthNotification: true, + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.name, + controller: _controller, + onChanged: (value) => {}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } +} diff --git a/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart b/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart new file mode 100644 index 00000000..1d9755fb --- /dev/null +++ b/lib/pages/InPatientServices/components/inpatient_paid_advance_payment.dart @@ -0,0 +1,107 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_inpatient_advance_history_response_model.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class InPatientPaidAdvancePayment extends StatefulWidget { + const InPatientPaidAdvancePayment({Key? key}) : super(key: key); + + @override + State createState() => _InPatientPaidAdvancePaymentState(); +} + +class _InPatientPaidAdvancePaymentState extends State { + late ProjectViewModel projectViewModel; + InPatientAdvanceHistoryResponseModel inPatientAdvanceHistoryResponseModel = InPatientAdvanceHistoryResponseModel(); + + @override + void initState() { + super.initState(); + WidgetsBinding.instance.addPostFrameCallback((_) { + getInPatientAdvancePaymentHistory(); + }); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return Padding( + padding: const EdgeInsets.all(16.0), + child: inPatientAdvanceHistoryResponseModel != null && inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo != null + ? ListView.separated( + itemCount: inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo!.length, + itemBuilder: (BuildContext context, int index) { + return Container( + decoration: cardRadius(12), + padding: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + MyRichText( + TranslationBase.of(context).admissionNo + ": ", inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo![index].admissionNo.toString(), projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).admissionReqNo + ": ", inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo![index].admissionReqNo.toString(), + projectViewModel.isArabic), + MyRichText( + TranslationBase.of(context).date + ": ", + DateUtil.formatDateToDate(DateUtil.convertStringToDate(inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo![index].createdOn), false), + projectViewModel.isArabic), + MyRichText( + TranslationBase.of(context).amount_ + ": ", inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo![index].requestedAmount.toString(), projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).status + ": ", getStatus(inPatientAdvanceHistoryResponseModel.responseInpatientAdvanceInfo![index]), projectViewModel.isArabic), + ], + ), + ); + }, + separatorBuilder: (BuildContext context, int index) { + return SizedBox( + height: 12.0, + ); + }, + ) + : getNoDataWidget(context), + ); + } + + String getStatus(ResponseInpatientAdvanceInfo responseInpatientAdvanceInfo) { + switch (responseInpatientAdvanceInfo.status) { + case 1: + return "Hold"; + break; + case 2: + return "Active"; + break; + case 4: + return "Cancelled"; + break; + default: + return ""; + } + } + + void getInPatientAdvancePaymentHistory() { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .getInPatientAdvancePaymentHistory( + projectViewModel.inPatientProjectID, + projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionNo! : 0, + projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo! : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo!, + context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + inPatientAdvanceHistoryResponseModel = InPatientAdvanceHistoryResponseModel.fromJson(res["responseInpatient"]); + setState(() {}); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + +} diff --git a/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart new file mode 100644 index 00000000..9df2c92f --- /dev/null +++ b/lib/pages/InPatientServices/components/inpatient_pending_advance_payment.dart @@ -0,0 +1,297 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_inpatient_advance_requests_response_model.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_inappwebview/flutter_inappwebview.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; +import 'package:share_plus/share_plus.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class InPatientPendingAdvancePayment extends StatefulWidget { + InPatientAdvanceResponseModel inPatientAdvanceResponseModel; + bool isHasData; + + InPatientPendingAdvancePayment({required this.isHasData, required this.inPatientAdvanceResponseModel}); + + @override + State createState() => _InPatientPendingAdvancePaymentState(); +} + +class _InPatientPendingAdvancePaymentState extends State { + late ProjectViewModel projectViewModel; + InAppBrowser browser = new InAppBrowser(); + + var _InAppBrowserOptions = InAppBrowserClassOptions( + inAppWebViewGroupOptions: InAppWebViewGroupOptions( + crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false), + ios: IOSInAppWebViewOptions(applePayAPIEnabled: true, isFraudulentWebsiteWarningEnabled: false)), + crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.white), + android: AndroidInAppBrowserOptions(), + ios: + IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, closeButtonColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN)); + + @override + void initState() { + // browser = new InAppBrowser(onLoadStartCallback: onBrowserLoadStart); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: double.infinity, + child: Container( + decoration: cardRadius(12), + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: widget.isHasData && widget.inPatientAdvanceResponseModel!.responseInpatientAdvanceInfo != null + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Payment request for: ", + // TranslationBase.of(context).covidBookAppo, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + letterSpacing: -0.64, + ), + ), + mHeight(6), + Row( + children: [ + Text( + TranslationBase.of(context).patientName + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).identificationNumber + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel.user.patientIdentificationNo!, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).mrn + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel.user.patientID.toString(), + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + ], + ) + : getNoDataWidget(context), + ), + ), + ), + mHeight(12), + // Expanded(child: Container()), + widget.isHasData + ? Container( + decoration: cardRadius(12.0), + margin: EdgeInsets.zero, + padding: EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).patientShareTotalToDo, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + letterSpacing: -0.64, + ), + ), + Row( + children: [ + SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + "${widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].requestedAmount}", + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 24, + letterSpacing: -0.64, + ), + ), + ], + ), + ], + ), + SizedBox(height: 12), + Text( + TranslationBase.of(context).YouCanPayByTheFollowingOptions, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + SizedBox(height: 12), + SizedBox( + width: MediaQuery.of(context).size.width * 0.75, + child: getPaymentMethods(), + ), + SizedBox(height: 12), + DefaultButton( + TranslationBase.of(context).payNow.toUpperCase(), + () { + getInPatientPaymentLink(false); + }, + // : null, + color: CustomColors.green, + disabledColor: CustomColors.grey2, + ), + SizedBox(height: 12), + Text( + TranslationBase.of(context).copyLinkTxt, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + SizedBox(height: 12), + DefaultButton( + TranslationBase.of(context).copyLink.toUpperCase(), + () { + getInPatientPaymentLink(true); + }, + svgIcon: "assets/images/new/copy.svg", + color: CustomColors.accentColor, + disabledColor: CustomColors.grey2, + ), + ], + ), + ) + : Container(), + ], + ), + ); + } + + onBrowserLoadStart(String url) { + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + void getInPatientPaymentLink(bool isCopy) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + int orderID = int.parse(DateTime.now().microsecondsSinceEpoch.toString().substring(7, 15)); + int clinicID = projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.clinicID! : 17; + service + .getInPatientPaymentLink( + widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].paymentRequestID!, + projectViewModel.inPatientProjectID, + // projectViewModel.getAdmissionInfoResponseModel.admissionNo!, + projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo! : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo!, + orderID, + projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, + projectViewModel.user.emailAddress!, + widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].requestedAmount!, + projectViewModel.user.patientIdentificationNo!, + clinicID, + widget.inPatientAdvanceResponseModel.responseInpatientAdvanceInfo![0].paymentRequestID!, + ) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + String paymentLink = res["PaymentUrl"]; + print(paymentLink); + if (isCopy) { + Share.share(paymentLink); + } else { + Uri uri = Uri.parse(paymentLink); + launchUrl(uri, mode: LaunchMode.externalApplication); + // this.browser.openUrlRequest(urlRequest: URLRequest(url: WebUri.uri(Uri.parse(paymentLink))), options: _InAppBrowserOptions); + } + } else { + AppToast.showErrorToast(message: res["endUserMessage"]); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} diff --git a/lib/pages/InPatientServices/general_instructions.dart b/lib/pages/InPatientServices/general_instructions.dart new file mode 100644 index 00000000..5837b167 --- /dev/null +++ b/lib/pages/InPatientServices/general_instructions.dart @@ -0,0 +1,93 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_general_instructions_response_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class GeneralInstructions extends StatelessWidget { + List getGeneralInstructionsList; + late ProjectViewModel projectViewModel; + + GeneralInstructions({required this.getGeneralInstructionsList}); + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).InPatientServicesHeader, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.all(21.0), + child: Text(TranslationBase.of(context).generalInstructions, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + )), + ), + Expanded( + child: Container( + width: MediaQuery.of(context).size.width, + child: Card( + elevation: 0.0, + margin: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 16.0), + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + side: BorderSide(color: Colors.transparent, width: 0.0), + ), + child: Padding( + padding: EdgeInsets.all(16.0), + child: Container( + child: ListView.separated( + itemCount: getGeneralInstructionsList.length, + itemBuilder: (BuildContext context, int index) { + return Container( + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset("assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: MediaQuery.of(context).size.width * 0.75, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(projectViewModel.isArabic ? getGeneralInstructionsList[index].textN! : getGeneralInstructionsList[index].text!, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + )), + ), + ], + )); + }, + separatorBuilder: (BuildContext context, int index) { + return Padding( + padding: const EdgeInsets.only(left: 14, right: 14), + child: mHeight(16.0), + ); + }, + )), + ), + ), + ), + ) + ], + )); + } +} diff --git a/lib/pages/InPatientServices/help_PRO.dart b/lib/pages/InPatientServices/help_PRO.dart new file mode 100644 index 00000000..61bd03c8 --- /dev/null +++ b/lib/pages/InPatientServices/help_PRO.dart @@ -0,0 +1,174 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class HelpPRO extends StatefulWidget { + const HelpPRO({Key? key}) : super(key: key); + + @override + State createState() => _HelpPROState(); +} + +class _HelpPROState extends State { + TextEditingController assistText = new TextEditingController(); + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).patientRelationOffice, + body: SingleChildScrollView( + child: Container( + width: MediaQuery.of(context).size.width, + decoration: containerRadius(Colors.white, 12), + margin: EdgeInsets.all(21.0), + padding: const EdgeInsets.all(21.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).assistYou, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + mHeight(16), + inputWidget(TranslationBase.of(context).enterDetails, "", assistText), + mHeight(16), + DefaultButton( + TranslationBase.of(context).send, + () { + if (assistText.text.isNotEmpty) { + callReceivePrescriptionAPI(context); + } else { + Utils.showErrorToast(TranslationBase.of(context).emptyMessage); + } + }, + ), + ], + ), + ), + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.name, + controller: _controller, + onChanged: (value) => {}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + + void callReceivePrescriptionAPI(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .insertInPatientOrder(projectViewModel.getAdmissionInfoResponseModel, 1, (projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!), + (projectViewModel.user.firstNameN! + " " + projectViewModel.user.lastNameN!), projectViewModel.user.mobileNumber!, assistText.text, context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: TranslationBase.of(context).successSendReport); + Navigator.of(context).pop(); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage'], localContext: context); + Navigator.of(context).pop(); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} diff --git a/lib/pages/InPatientServices/inpatient_advance_payment.dart b/lib/pages/InPatientServices/inpatient_advance_payment.dart new file mode 100644 index 00000000..453dc114 --- /dev/null +++ b/lib/pages/InPatientServices/inpatient_advance_payment.dart @@ -0,0 +1,77 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_inpatient_advance_requests_response_model.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/components/inpatient_paid_advance_payment.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/components/inpatient_pending_advance_payment.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class InPatientAdvancePayment extends StatefulWidget { + InPatientAdvanceResponseModel? inPatientAdvanceResponseModel; + bool? isHasData; + + InPatientAdvancePayment({this.isHasData, this.inPatientAdvanceResponseModel}); + + @override + State createState() => _InPatientAdvancePaymentState(); +} + +class _InPatientAdvancePaymentState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + late ProjectViewModel projectViewModel; + + @override + void initState() { + _tabController = TabController(length: 2, vsync: this); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).advancePayment, + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + physics: const NeverScrollableScrollPhysics(), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).pending), Text(TranslationBase.of(context).history)], + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + InPatientPendingAdvancePayment(isHasData: widget.isHasData!, inPatientAdvanceResponseModel: widget.inPatientAdvanceResponseModel!), + InPatientPaidAdvancePayment(), + ], + ), + ) + ], + ), + ); + } +} diff --git a/lib/pages/InPatientServices/inpatient_general_consent.dart b/lib/pages/InPatientServices/inpatient_general_consent.dart new file mode 100644 index 00000000..a03e318c --- /dev/null +++ b/lib/pages/InPatientServices/inpatient_general_consent.dart @@ -0,0 +1,528 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class InPatientGeneralConsent extends StatelessWidget { + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).InPatientServicesHeader, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.all(21.0), + child: Text( + TranslationBase.of(context).generalConsent, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.bold, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + Expanded( + child: SingleChildScrollView( + child: Container( + width: MediaQuery.of(context).size.width, + child: Card( + elevation: 0.0, + margin: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 16.0), + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + side: BorderSide(color: Colors.transparent, width: 0.0), + ), + child: Padding( + padding: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).generalConsent1, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(24.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).hospitalRules, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.bold, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(12.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).generalConsent2, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(24.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).communicationConsent, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.bold, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(12.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).generalConsent3, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(24.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).releaseConsent, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.bold, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(12.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).generalConsent4, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(12.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).generalConsent5, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(24.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).valuables, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.bold, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(12.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).generalConsent6, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(24.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).financialConsent, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.bold, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(12.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).generalConsent7, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(24.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).dataSharingConsent, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.bold, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(12.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).generalConsent8, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(24.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).permissionLeaveConsent, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.bold, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(12.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).generalConsent9, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(24.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).observeConsent, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.bold, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(12.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).generalConsent10, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(24.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).noGuaranteeConsent, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.bold, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(12.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).generalConsent11, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(24.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).disputeConsent, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.bold, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(12.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).generalConsent12, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(24.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).patientsRightsConsent, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.bold, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(12.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).generalConsent13, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(24.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).acknowledgementConsent, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.bold, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + mHeight(12.0), + Container( + width: MediaQuery.of(context).size.width * 0.85, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text( + TranslationBase.of(context).generalConsent14, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + ), + ], + ), + ), + ), + ), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 21.0, right: 21.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: Color(0xffc5272d), + elevation: 0, + onPressed: () { + acceptRejectConsent(context, 0); + }, + child: Text(TranslationBase.of(context).reject, style: TextStyle(fontSize: 16.0, color: Colors.white)), + ), + ), + ), + mWidth(7), + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.green, + elevation: 0, + onPressed: () { + acceptRejectConsent(context, 1); + }, + child: Text(TranslationBase.of(context).acceptLbl, style: TextStyle(fontSize: 16.0, color: Colors.white)), + ), + ), + ), + ], + ), + ), + ], + ), + ); + } + + void acceptRejectConsent(BuildContext context, int status) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .insertForGeneralAdmissionConsent( + projectViewModel.user.patientID!, + projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo! : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo!, + projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.clinicID! : projectViewModel.getAdmissionRequestInfoResponseModel.clinicId!, + projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.projectID! : projectViewModel.getAdmissionRequestInfoResponseModel.projectId!, + status, + context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + AppToast.showSuccessToast(message: res["SuccessMsg"] ?? TranslationBase.of(context).success); + Navigator.of(context); + } else { + AppToast.showErrorToast(message: res["endUserMessage"]); + } + Navigator.pop(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} diff --git a/lib/pages/InPatientServices/inpatient_home.dart b/lib/pages/InPatientServices/inpatient_home.dart new file mode 100644 index 00000000..9987d501 --- /dev/null +++ b/lib/pages/InPatientServices/inpatient_home.dart @@ -0,0 +1,423 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_general_instructions_response_model.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/admission_notice.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/birth_notification.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/general_instructions.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/help_PRO.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/inpatient_advance_payment.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/inpatient_general_consent.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/meal_plan.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/medical_instructions.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.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'; +import 'package:url_launcher/url_launcher.dart'; + +import '../../models/InPatientServices/get_inpatient_advance_requests_response_model.dart'; +import '../../models/InPatientServices/get_medical_instructions_response_model.dart'; + +class InPatientServicesHome extends StatefulWidget { + @override + State createState() => _InPatientServicesHomeState(); +} + +class _InPatientServicesHomeState extends State { + late ProjectViewModel projectViewModel; + InPatientAdvanceResponseModel inPatientAdvanceResponseModel = InPatientAdvanceResponseModel(); + bool isReceivePrescriptionEnabled = false; + + @override + void initState() { + super.initState(); + WidgetsBinding.instance.addPostFrameCallback((_) { + checkDischargeMedications(context); + }); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + List inPatientServiceList = getInPatientServicesList(context); + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).InPatientServicesHeader, + body: Container( + margin: EdgeInsets.all(20.0), + child: Column( + children: [ + Padding( + padding: EdgeInsets.only(left: 12, right: 12), + child: GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + padding: EdgeInsets.zero, + itemCount: inPatientServiceList.length, + itemBuilder: (BuildContext context, int index) { + return inPatientServiceList[index]; + }, + ), + ), + ], + ), + ), + ); + } + + List getInPatientServicesList(BuildContext context) { + List serviceList = []; + + serviceList.add( + InkWell( + onTap: () { + openPatientGeneralConsent(); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).generalConsentTitle, + imagePath: 'general_instructions.svg', + subTitle: TranslationBase.of(context).generalConsentSubTitle, + width: 50.0, + height: 40.0, + isInPatient: true, + isEnable: true, + ), + ), + ); + + serviceList.add( + InkWell( + onTap: () { + if (projectViewModel.isPatientAdmitted ? true : checkAdmissionRequestDate()) openGeneralInstructions(context); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).generalInstructionsTitle, + imagePath: 'general_instructions.svg', + subTitle: TranslationBase.of(context).generalInstructionsSubTitle, + width: 50.0, + height: 40.0, + isInPatient: true, + isEnable: projectViewModel.isPatientAdmitted ? true : checkAdmissionRequestDate(), + ), + ), + ); + + serviceList.add( + InkWell( + onTap: () { + if (projectViewModel.isPatientAdmitted ? true : checkAdmissionRequestDate()) openMedicalInstructions(context); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).medicalInstructionsTitle, + imagePath: 'medical_instructions.svg', + subTitle: TranslationBase.of(context).medicalInstructionsSubTitle, + width: 50.0, + height: 40.0, + isInPatient: true, + isEnable: projectViewModel.isPatientAdmitted ? true : checkAdmissionRequestDate(), + ), + ), + ); + + serviceList.add( + InkWell( + onTap: () { + if (projectViewModel.isPatientAdmitted) { + Navigator.push(context, FadePage(page: MealPlanPage())); + } else { + AppToast.showErrorToast(message: "This service is only available to admitted patients"); + } + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).mealPlanTitle, + imagePath: 'meal_plan.svg', + subTitle: TranslationBase.of(context).mealPlanSubTitle, + width: 50.0, + height: 40.0, + isInPatient: true, + isEnable: projectViewModel.isPatientAdmitted), + ), + ); + + serviceList.add( + InkWell( + onTap: () { + openBirthNotificationsPage(context); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).birthNotificationTitle, + imagePath: 'birth_notification.svg', + subTitle: TranslationBase.of(context).birthNotificationSubTitle, + width: 50.0, + height: 40.0, + isInPatient: true, + ), + ), + ); + + // serviceList.add( + // InkWell( + // onTap: () { + // // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + // }, + // child: MedicalProfileItem( + // title: TranslationBase.of(context).admissionNoticeTitle, + // imagePath: 'admission_notice.svg', + // subTitle: TranslationBase.of(context).admissionNoticeSubTitle, + // width: 50.0, + // height: 40.0, + // isInPatient: true, + // ), + // ), + // ); + + serviceList.add( + InkWell( + onTap: () { + getInPatientAdvancePaymentRequests(context); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).advancePayment, + imagePath: 'advance_payment.svg', + subTitle: TranslationBase.of(context).payment, + width: 50.0, + height: 40.0, + isInPatient: true, + ), + ), + ); + + serviceList.add( + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: AdmissionNotice())); + // if (isReceivePrescriptionEnabled) receivePrescriptionAPI(context); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).admissionNoticeTitle, + imagePath: 'admission_notice.svg', + subTitle: TranslationBase.of(context).admissionNoticeSubTitle, + width: 50.0, + height: 40.0, + isInPatient: true, + isEnable: true), + ), + ); + + serviceList.add( + InkWell( + onTap: () { + // Navigator.push(context, FadePage(page: AdvancePaymentPage())); + if (isReceivePrescriptionEnabled) receivePrescriptionAPI(context); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).receive, + imagePath: 'receive_prescription.svg', + subTitle: TranslationBase.of(context).prescriptions, + width: 50.0, + height: 40.0, + isInPatient: true, + isEnable: isReceivePrescriptionEnabled), + ), + ); + + serviceList.add( + InkWell( + onTap: () { + checkCurrentTime(context); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).help, + imagePath: 'help_pro.svg', + subTitle: TranslationBase.of(context).PRO, + width: 50.0, + height: 40.0, + isInPatient: true, + ), + ), + ); + + return serviceList; + } + + void receivePrescriptionAPI(BuildContext context) { + AlertDialogBox( + context: context, + confirmMessage: TranslationBase.of(context).successSendReport, + okText: TranslationBase.of(context).ok, + okFunction: () { + AlertDialogBox.closeAlertDialog(context); + callReceivePrescriptionAPI(context); + }).showAlertDialog(context); + + // ConfirmDialog dialog = new ConfirmDialog( + // context: context, + // confirmMessage: TranslationBase.of(context).successSendReport, + // okText: TranslationBase.of(context).ok, + // cancelText: TranslationBase.of(context).cancel_nocaps, + // okFunction: () { + // Navigator.of(context).pop(); + // }, + // cancelFunction: () => {}); + // dialog.showAlertDialog(context); + } + + void checkDischargeMedications(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getDischargeMedicationOrder(projectViewModel.getAdmissionInfoResponseModel).then((res) { + setState(() { + if (res["PatientHasDischargeMedicineList"].length != 0) { + isReceivePrescriptionEnabled = true; + } + }); + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + void callReceivePrescriptionAPI(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .insertInPatientOrder(projectViewModel.getAdmissionInfoResponseModel, 2, (projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!), + (projectViewModel.user.firstNameN! + " " + projectViewModel.user.lastNameN!), projectViewModel.user.mobileNumber!, "I need my medicines", context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + void openBirthNotificationsPage(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .getBirthNotification( + projectViewModel.user.patientID!, + projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.projectID! : projectViewModel.getAdmissionRequestInfoResponseModel.projectId!, + projectViewModel.isArabic ? 1 : 2, + context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + Navigator.push(context, FadePage(page: BirthNotification())); + } else { + AppToast.showErrorToast(message: res["endUserMessage"], localContext: context); + } + }).catchError((err) { + print(err); + }); + } + + void openPatientGeneralConsent() { + Navigator.push(context, FadePage(page: InPatientGeneralConsent())); + } + + void openGeneralInstructions(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getGeneralInstructions(projectViewModel.inPatientProjectID, projectViewModel.isArabic ? 1 : 2, context).then((res) { + if (res['generalInstructions'].length != 0) { + List getGeneralInstructionsList = []; + res['generalInstructions'].forEach((v) { + getGeneralInstructionsList.add(new GetGeneralInstructions.fromJson(v)); + }); + GifLoaderDialogUtils.hideDialog(context); + Navigator.push(context, FadePage(page: GeneralInstructions(getGeneralInstructionsList: getGeneralInstructionsList))); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: TranslationBase.of(context).noGeneralInstructions); + } + }).catchError((err) { + print(err); + }); + } + + void openMedicalInstructions(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getMedicalInstructions(projectViewModel.inPatientProjectID, projectViewModel.isArabic ? 1 : 2, context).then((res) { + if (res['MedicalInstruction'] != null && res['MedicalInstruction'].length != 0) { + List getMedicalInstructionsList = []; + res['MedicalInstruction'].forEach((v) { + getMedicalInstructionsList.add(new GetMedicalInstructions.fromJson(v)); + }); + GifLoaderDialogUtils.hideDialog(context); + Navigator.push(context, FadePage(page: MedicalInstructionsPage(getMedicalInstructionsList: getMedicalInstructionsList))); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: TranslationBase.of(context).noMedicalInstructions); + } + }).catchError((err) { + print(err); + }); + } + + void getInPatientAdvancePaymentRequests(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .getInPatientAdvancePaymentRequests( + projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.projectID! : projectViewModel.getAdmissionRequestInfoResponseModel.projectId!, + projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionNo! : 0, + projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo! : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo!, + projectViewModel.isArabic ? 1 : 2, + context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + if (res['responseInpatient'] != null && res['responseInpatient']['responseInpatientAdvanceInfo'] != null && res['responseInpatient']['responseInpatientAdvanceInfo'].length != 0) { + inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]); + Navigator.push(context, + FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).noData); + } + } else { + Navigator.push(context, + FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + void checkCurrentTime(BuildContext context) { + if (DateTime.now().hour >= 7 && DateTime.now().hour <= 22) { + Navigator.push(context, FadePage(page: HelpPRO())); + } else { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).proErrorMessage, + okText: TranslationBase.of(context).callNow, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => {ConfirmDialog.closeAlertDialog(context), launchUrl(Uri.parse("tel://" + "011 525 9553"))}, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + } + + bool checkAdmissionRequestDate() { + if (DateUtil.convertStringToDate(projectViewModel.getAdmissionRequestInfoResponseModel.expectedAdmissionDate).difference(DateTime.now()).inHours > 24) { + return false; + } + return true; + } +} diff --git a/lib/pages/InPatientServices/meal_plan.dart b/lib/pages/InPatientServices/meal_plan.dart new file mode 100644 index 00000000..4e300900 --- /dev/null +++ b/lib/pages/InPatientServices/meal_plan.dart @@ -0,0 +1,641 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admitted_patient_response_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_meal_items_schedule_response_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_meals_schedule_response_model.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class MealPlanPage extends StatefulWidget { + const MealPlanPage({Key? key}) : super(key: key); + + @override + State createState() => _MealPlanPageState(); +} + +class _MealPlanPageState extends State { + late ProjectViewModel projectViewModel; + GetAdmittedPatientsResponseModel getAdmittedPatientsResponseModel = GetAdmittedPatientsResponseModel(); + List getMealsScheduleResponseModelList = []; + + List getMealItemsScheduleResponseModelBreakfast = []; + List getMealItemsScheduleResponseModelLunch = []; + List getMealItemsScheduleResponseModelDinner = []; + + List _getMealItemsScheduleResponseModelBreakfast = []; + List _getMealItemsScheduleResponseModelLunch = []; + List _getMealItemsScheduleResponseModelDinner = []; + + int currentDay = 0; + int currentWeek = 0; + + int selectedMealScheduleID = 0; + + final ValueNotifier isFasting = ValueNotifier(false); + bool isFastingVal = false; + + @override + void initState() { + super.initState(); + WidgetsBinding.instance.addPostFrameCallback((_) { + getAdmittedPatientDetails(); + }); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).mealPlanTitle, + body: SingleChildScrollView( + child: Padding( + padding: EdgeInsets.all(21.0), + child: getMealsScheduleResponseModelList.length != 0 + ? Column( + children: [ + Container( + decoration: containerRadius((getMealsScheduleResponseModelList[0].isShow)! ? Colors.white : Colors.grey[300]!, 12), + child: AppExpandableNotifier( + title: "Breakfast TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[0].tATTime!), + isTitleSingleLine: false, + widgetColor: Colors.transparent, + isExpand: getMealsScheduleResponseModelList[0].isShow!, + isDisabled: !getMealsScheduleResponseModelList[0].isShow!, + bodyWidget: Column( + children: [ + getDivider(), + ListView.separated( + physics: BouncingScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index) { + return Container( + padding: EdgeInsets.all(21.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(_getMealItemsScheduleResponseModelBreakfast[index].filterName!, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + SizedBox( + height: 12.0, + ), + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index2) { + return Container( + child: Row( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ValueListenableBuilder( + valueListenable: _getMealItemsScheduleResponseModelBreakfast[index].selectedItemID, + builder: (context, val, child) { + return Radio( + value: _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].itemID, + groupValue: _getMealItemsScheduleResponseModelBreakfast[index].selectedItemID.value, + activeColor: Colors.red[800], + onChanged: (value) { + _getMealItemsScheduleResponseModelBreakfast[index].selectedItemID.value = value!; + }, + ); + }), + LargeAvatar( + name: _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].description, + url: "https://www.pumpkinnspice.com/wp-content/uploads/2016/03/easy-breakfast-quesadillas-11-683x1024.jpg", + width: 60, + height: 60, + radius: 5, + disableProfileView: true, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + MyRichText( + "", + projectViewModel.isArabic + ? _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].descriptionN! + : _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList[index2].description!, + projectViewModel.isArabic), + ], + ), + ), + ], + ), + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.all(16.0), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelBreakfast[index].getMealItemsScheduleResponseModelList.length), + ], + ), + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.only(left: 15, right: 15), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelBreakfast.length), + ], + ), + ), + ), + mHeight(21), + Container( + decoration: containerRadius(getMealsScheduleResponseModelList[1].isShow! ? Colors.white : Colors.grey[300]!, 12), + child: AppExpandableNotifier( + title: "Lunch TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[1].tATTime!), + isTitleSingleLine: false, + widgetColor: Colors.transparent, + isExpand: getMealsScheduleResponseModelList[1].isShow!, + isDisabled: !getMealsScheduleResponseModelList[1].isShow!, + bodyWidget: Column( + children: [ + getDivider(), + ListView.separated( + physics: BouncingScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index) { + return Container( + padding: EdgeInsets.all(21.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(_getMealItemsScheduleResponseModelLunch[index].filterName!, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + SizedBox( + height: 12.0, + ), + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index2) { + return Container( + child: Row( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ValueListenableBuilder( + valueListenable: _getMealItemsScheduleResponseModelLunch[index].selectedItemID, + builder: (context, val, child) { + return Radio( + value: _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].itemID, + groupValue: _getMealItemsScheduleResponseModelLunch[index].selectedItemID.value, + activeColor: Colors.red[800], + onChanged: (value) { + _getMealItemsScheduleResponseModelLunch[index].selectedItemID.value = value!; + }, + ); + }), + LargeAvatar( + name: _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].description, + url: "https://www.pumpkinnspice.com/wp-content/uploads/2016/03/easy-breakfast-quesadillas-11-683x1024.jpg", + width: 60, + height: 60, + radius: 5, + disableProfileView: true, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + MyRichText( + "", + projectViewModel.isArabic + ? _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].descriptionN! + : _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList[index2].description!, + projectViewModel.isArabic), + ], + ), + ), + ], + ), + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.all(16.0), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelLunch[index].getMealItemsScheduleResponseModelList.length), + ], + ), + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.only(left: 15, right: 15), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelLunch.length), + ], + ), + ), + ), + mHeight(21), + Container( + decoration: containerRadius(getMealsScheduleResponseModelList[2].isShow! ? Colors.white : Colors.grey[300]!, 12), + child: AppExpandableNotifier( + title: "Dinner TAT: " + DateUtil.convertTime(getMealsScheduleResponseModelList[2].tATTime!), + isTitleSingleLine: false, + widgetColor: Colors.transparent, + isExpand: getMealsScheduleResponseModelList[2].isShow!, + isDisabled: !getMealsScheduleResponseModelList[2].isShow!, + bodyWidget: Column( + children: [ + getDivider(), + ListView.separated( + physics: BouncingScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index) { + return Container( + padding: EdgeInsets.all(21.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(_getMealItemsScheduleResponseModelDinner[index].filterName!, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 18.0, letterSpacing: -0.64, color: CustomColors.darkGrey)), + SizedBox( + height: 12.0, + ), + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index2) { + return Container( + child: Row( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ValueListenableBuilder( + valueListenable: _getMealItemsScheduleResponseModelDinner[index].selectedItemID, + builder: (context, val, child) { + return Radio( + value: _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].itemID, + groupValue: _getMealItemsScheduleResponseModelDinner[index].selectedItemID.value, + activeColor: Colors.red[800], + onChanged: (value) { + _getMealItemsScheduleResponseModelDinner[index].selectedItemID.value = value!; + }, + ); + }), + LargeAvatar( + name: _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].description, + url: "https://www.pumpkinnspice.com/wp-content/uploads/2016/03/easy-breakfast-quesadillas-11-683x1024.jpg", + width: 60, + height: 60, + radius: 5, + disableProfileView: true, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + MyRichText( + "", + projectViewModel.isArabic + ? _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].descriptionN! + : _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList[index2].description!, + projectViewModel.isArabic), + ], + ), + ), + ], + ), + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.all(16.0), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelDinner[index].getMealItemsScheduleResponseModelList.length), + ], + ), + ); + }, + separatorBuilder: (context, index) { + return Padding( + padding: EdgeInsets.only(left: 15, right: 15), + child: Divider( + height: 1.5, + thickness: 1.0, + color: Colors.grey.shade200, + ), + ); + }, + itemCount: _getMealItemsScheduleResponseModelDinner.length), + ], + ), + ), + ), + ], + ) + : Container(), + ), + ), + bottomSheet: Container( + color: Colors.white, + width: double.infinity, + padding: EdgeInsets.all(20), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + ValueListenableBuilder( + valueListenable: isFasting, + builder: (context, val, child) { + return Checkbox( + onChanged: (bool? value) { + isFasting.value = value!; + isFastingVal = value; + }, + value: isFastingVal, + activeColor: Color(0xFFc5272d), + ); + }), + Text( + TranslationBase.of(context).isFasting, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.48, + ), + ), + ], + ), + mHeight(12), + DefaultButton( + TranslationBase.of(context).placeOrder, + () { + placeOrder(); + }, + color: Color(0xff359846), + disabledColor: Colors.grey, + ), + ], + ), + ), + ); + } + + void placeOrder() { + List selectedItemIDs = []; + + if (_getMealItemsScheduleResponseModelBreakfast.isNotEmpty) { + _getMealItemsScheduleResponseModelBreakfast.forEach((element) { + selectedItemIDs.add(element.selectedItemID.value.toString()); + }); + } + + if (_getMealItemsScheduleResponseModelLunch.isNotEmpty) { + _getMealItemsScheduleResponseModelLunch.forEach((element) { + selectedItemIDs.add(element.selectedItemID.value.toString()); + }); + } + + if (_getMealItemsScheduleResponseModelDinner.isNotEmpty) { + _getMealItemsScheduleResponseModelDinner.forEach((element) { + selectedItemIDs.add(element.selectedItemID.value.toString()); + }); + } + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .placeMealPlanOrder(getAdmittedPatientsResponseModel.projectID!, selectedMealScheduleID, selectedItemIDs.join(","), projectViewModel.user.patientID!, + getAdmittedPatientsResponseModel.admissionNo!, getAdmittedPatientsResponseModel.isHasCompanion!, isFastingVal, context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showSuccessToast(message: "Your meal order has been received successfully"); + Navigator.pop(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + Widget getDivider() { + return Padding( + padding: EdgeInsets.only(left: 15, right: 15), + child: Divider( + height: 1.5, + thickness: 2.0, + color: Colors.black, + ), + ); + } + + void getAdmittedPatientDetails() { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getAdmittedPatientDetails(projectViewModel.user.patientID!, projectViewModel.inPatientProjectID, projectViewModel.getAdmissionInfoResponseModel.admissionNo!, 0, 0, 0, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["List_MOP_AdmittedPatients"] != null && res["List_MOP_AdmittedPatients"].length != 0) { + print(res["List_MOP_AdmittedPatients"]); + getAdmittedPatientsResponseModel = new GetAdmittedPatientsResponseModel.fromJson(res["List_MOP_AdmittedPatients"][0]); + print(getAdmittedPatientsResponseModel.dietType); + getCurrentWeekIDAndDay(getAdmittedPatientsResponseModel.dietType!); + } else { + AppToast.showErrorToast(message: "No data found for admitted patient"); + getCurrentWeekIDAndDay(1); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + void getCurrentWeekIDAndDay(int dietType) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getCurrentWeekIDAndDay(context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + currentDay = res["CurrentDay"]; + currentWeek = res["CurrentWeek"]; + getMealsOfScheduleID(dietType); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + void getMealsOfScheduleID(int dietType) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getMealsOfScheduleID(projectViewModel.inPatientProjectID, projectViewModel.getAdmissionInfoResponseModel.admissionNo!, dietType, currentWeek, currentDay, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["List_MOP_MealsOfScheduleID_Mobile"] != null && res["List_MOP_MealsOfScheduleID_Mobile"].length != 0) { + res['List_MOP_MealsOfScheduleID_Mobile'].forEach((scheduleItem) { + getMealsScheduleResponseModelList.add(GetMealsScheduleResponseModel.fromJson(scheduleItem)); + }); + if (getMealsScheduleResponseModelList[0].isShow!) { + selectedMealScheduleID = getMealsScheduleResponseModelList[0].scheduleID!; + getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[0].scheduleID!, 1); + } + if (getMealsScheduleResponseModelList[1].isShow!) { + selectedMealScheduleID = getMealsScheduleResponseModelList[1].scheduleID!; + getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[1].scheduleID!, 2); + } + if (getMealsScheduleResponseModelList[2].isShow!) { + selectedMealScheduleID = getMealsScheduleResponseModelList[2].scheduleID!; + getDefaultItemsOfScheduleID(getMealsScheduleResponseModelList[2].scheduleID!, 3); + } + } else { + AppToast.showErrorToast(message: "No meal schedule found for admitted patient"); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + void getDefaultItemsOfScheduleID(int scheduleID, int mealType) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getDefaultItemsOfScheduleID(projectViewModel.inPatientProjectID, scheduleID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["List_MOP_DefaultItemsOfMealModel"] != null && res["List_MOP_DefaultItemsOfMealModel"].length != 0) { + if (mealType == 1) { + res['List_MOP_DefaultItemsOfMealModel'].forEach((scheduleItem) { + getMealItemsScheduleResponseModelBreakfast.add(GetMealItemsScheduleResponseModel.fromJson(scheduleItem)); + }); + sortMealsByCategoryBreakfast(); + } + if (mealType == 2) { + res['List_MOP_DefaultItemsOfMealModel'].forEach((scheduleItem) { + getMealItemsScheduleResponseModelLunch.add(GetMealItemsScheduleResponseModel.fromJson(scheduleItem)); + }); + sortMealsByCategoryLunch(); + } + if (mealType == 3) { + res['List_MOP_DefaultItemsOfMealModel'].forEach((scheduleItem) { + getMealItemsScheduleResponseModelDinner.add(GetMealItemsScheduleResponseModel.fromJson(scheduleItem)); + }); + sortMealsByCategoryDinner(); + } + } else { + AppToast.showErrorToast(message: "No meal items found for admitted patient"); + } + setState(() {}); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + void sortMealsByCategoryBreakfast() { + getMealItemsScheduleResponseModelBreakfast.forEach((element) { + List breakfastMealItems = _getMealItemsScheduleResponseModelBreakfast + .where((elementClinic) => elementClinic.filterName == (projectViewModel.isArabic ? element.categoryDescriptionN : element.categoryDescription)) + .toList(); + if (breakfastMealItems.length != 0) { + _getMealItemsScheduleResponseModelBreakfast[_getMealItemsScheduleResponseModelBreakfast.indexOf(breakfastMealItems[0])].getMealItemsScheduleResponseModelList.add(element); + } else { + _getMealItemsScheduleResponseModelBreakfast + .add(GetMealItemsScheduleResponseModelList(filterName: projectViewModel.isArabic ? element.categoryDescriptionN : element.categoryDescription, getMealItemsScheduleResponseModel: element)); + } + }); + + _getMealItemsScheduleResponseModelBreakfast.forEach((element) { + element.getMealItemsScheduleResponseModelList.forEach((elementInner) { + if (elementInner.isDefault!) { + element.selectedItemID.value = elementInner.itemID!; + } + }); + }); + } + + void sortMealsByCategoryLunch() { + getMealItemsScheduleResponseModelLunch.forEach((element) { + List breakfastMealItems = _getMealItemsScheduleResponseModelLunch + .where((elementClinic) => elementClinic.filterName == (projectViewModel.isArabic ? element.categoryDescriptionN : element.categoryDescription)) + .toList(); + if (breakfastMealItems.length != 0) { + _getMealItemsScheduleResponseModelLunch[_getMealItemsScheduleResponseModelLunch.indexOf(breakfastMealItems[0])].getMealItemsScheduleResponseModelList.add(element); + } else { + _getMealItemsScheduleResponseModelLunch + .add(GetMealItemsScheduleResponseModelList(filterName: projectViewModel.isArabic ? element.categoryDescriptionN : element.categoryDescription, getMealItemsScheduleResponseModel: element)); + } + }); + + _getMealItemsScheduleResponseModelLunch.forEach((element) { + element.getMealItemsScheduleResponseModelList.forEach((elementInner) { + if (elementInner.isDefault!) { + element.selectedItemID.value = elementInner.itemID!; + } + }); + }); + } + + void sortMealsByCategoryDinner() { + getMealItemsScheduleResponseModelDinner.forEach((element) { + List breakfastMealItems = _getMealItemsScheduleResponseModelDinner + .where((elementClinic) => elementClinic.filterName == (projectViewModel.isArabic ? element.categoryDescriptionN : element.categoryDescription)) + .toList(); + if (breakfastMealItems.length != 0) { + _getMealItemsScheduleResponseModelDinner[_getMealItemsScheduleResponseModelDinner.indexOf(breakfastMealItems[0])].getMealItemsScheduleResponseModelList.add(element); + } else { + _getMealItemsScheduleResponseModelDinner + .add(GetMealItemsScheduleResponseModelList(filterName: projectViewModel.isArabic ? element.categoryDescriptionN : element.categoryDescription, getMealItemsScheduleResponseModel: element)); + } + }); + _getMealItemsScheduleResponseModelDinner.forEach((element) { + element.getMealItemsScheduleResponseModelList.forEach((elementInner) { + if (elementInner.isDefault!) { + element.selectedItemID.value = elementInner.itemID!; + } + }); + }); + } +} diff --git a/lib/pages/InPatientServices/medical_instructions.dart b/lib/pages/InPatientServices/medical_instructions.dart new file mode 100644 index 00000000..bbab1b5f --- /dev/null +++ b/lib/pages/InPatientServices/medical_instructions.dart @@ -0,0 +1,100 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +import '../../models/InPatientServices/get_medical_instructions_response_model.dart'; + +class MedicalInstructionsPage extends StatefulWidget { + List getMedicalInstructionsList; + + MedicalInstructionsPage({required this.getMedicalInstructionsList}); + + @override + State createState() => _MedicalInstructionsPageState(); +} + +class _MedicalInstructionsPageState extends State { + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).InPatientServicesHeader, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.all(21.0), + child: Text(TranslationBase.of(context).medicalInstructions, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 21.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + )), + ), + Expanded( + child: Container( + width: MediaQuery.of(context).size.width, + child: Card( + elevation: 0.0, + margin: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 16.0), + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + side: BorderSide(color: Colors.transparent, width: 0.0), + ), + child: Padding( + padding: EdgeInsets.all(16.0), + child: Container( + child: ListView.separated( + itemCount: widget.getMedicalInstructionsList[0].medicaLInstructionsField!.length, + itemBuilder: (BuildContext context, int index) { + return Container( + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: SvgPicture.asset("assets/images/new-design/ionic-ios-checkmark-circle.svg"), + ), + Container( + width: MediaQuery.of(context).size.width * 0.75, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(widget.getMedicalInstructionsList[0].medicaLInstructionsField![index].descriptionField!, + overflow: TextOverflow.clip, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + )), + ), + ], + )); + }, + separatorBuilder: (BuildContext context, int index) { + return Padding( + padding: const EdgeInsets.only(left: 14, right: 14), + child: mHeight(16.0), + ); + }, + )), + ), + ), + ), + ) + ], + )); + } +} diff --git a/lib/pages/MyAppointments/AppointmentDetails.dart b/lib/pages/MyAppointments/AppointmentDetails.dart new file mode 100644 index 00000000..9805a691 --- /dev/null +++ b/lib/pages/MyAppointments/AppointmentDetails.dart @@ -0,0 +1,731 @@ +import 'dart:collection'; + +import 'package:device_calendar/device_calendar.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/models/header_model.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/waiting_appointment/waiting_appointment_info.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/SchedulePage.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.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:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:provider/provider.dart'; + +import 'widgets/AppointmentActions.dart'; + +class AppointmentDetails extends StatefulWidget { + AppoitmentAllHistoryResultList appo; + static bool isLoading = false; + dynamic doctorSchedule; + static bool showFooterButton = false; + final int? parentIndex; + + AppointmentDetails({required this.appo, this.parentIndex, this.doctorSchedule}); + + @override + _AppointmentDetailsState createState() => _AppointmentDetailsState(); +} + +class _AppointmentDetailsState extends State with SingleTickerProviderStateMixin { + static TabController? _tabController; + + AppSharedPreferences sharedPref = AppSharedPreferences(); + List doctorDetailsList = []; + + ToDoCountProviderModel? toDoProvider; + ProjectViewModel? projectViewModel; + + DoctorList doctorList = new DoctorList(); + + @override + void initState() { + AppointmentDetails.showFooterButton = false; + if (widget.doctorSchedule != null) { + _tabController = new TabController(length: 2, vsync: this, initialIndex: 1); + widget.appo.appointmentDate = widget.doctorSchedule['Date']; + } else { + _tabController = new TabController(length: 2, vsync: this); + } + doctorList.doctorID = widget.appo.doctorID; + doctorList.clinicID = widget.appo.clinicID; + doctorList.projectID = widget.appo.projectID; + setTab(); + super.initState(); + } + + @override + void dispose() { + super.dispose(); + _tabController!.dispose(); + AppointmentDetails.showFooterButton = false; + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + + toDoProvider = Provider.of(context); + + return AppScaffold( + appBarTitle: widget.appo!.doctorNameObj!, + isShowAppBar: true, + showNewAppBar: true, + backgroundColor: Colors.white, + showNewAppBarTitle: true, + bottomSheet: _bottomButtons(), + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + DoctorHeader( + headerModel: HeaderModel( + widget.appo.doctorTitle! + " " + widget.appo.doctorNameObj!, + widget.appo.doctorID!, + widget.appo.doctorImageURL!, + widget.appo.doctorSpeciality!, + "", + widget.appo.projectName ?? "", + DateUtil.convertStringToDate(widget.appo.appointmentDate!), + widget.appo.isLiveCareAppointment! ? DateUtil.convertStringToDate(widget.appo.appointmentDate!).toString().split(" ")[1].substring(0, 5) : widget.appo.startTime!.substring(0, 5), + "", + widget.appo.doctorRate, + widget.appo.actualDoctorRate, + widget.appo.noOfPatientsRate, + "", + decimalDoctorRate: widget.appo.decimalDoctorRate.toString() + //model.user.emailAddress, + ), + isNeedToShowButton: (widget.appo.clinicID == 17 || + widget.appo.clinicID == 47 || + widget.appo.clinicID == 23 || + widget.appo.clinicID == 265 || + widget.appo.clinicID == 134 || + widget.appo.clinicID == 253 || + widget.appo.isExecludeDoctor! || + widget.appo.isLiveCareAppointment!) + ? false + : true, + buttonTitle: TranslationBase.of(context).schedule, + buttonIcon: 'assets/images/new/Boo_ Appointment.svg', + showConfirmMessageDialog: false, + onRatingAndReviewTap: getDoctorRatingsDetails, + onTap: () { + Navigator.push( + context, + FadePage( + page: SchedulePage(doctorList: doctorList, appo: widget.appo), + ), + ).then((value) { + setState(() { + if (_tabController!.index == 0) { + _tabController!.animateTo((_tabController!.index + 1) % 2); + this.enableFooterButton(); + } + widget.doctorSchedule = value; + }); + }); + }, + ), + SizedBox(height: 10), + Material( + color: Color(0xffF8F8F8), + child: TabBar( + onTap: (index) { + setState(() { + if (index == 1) { + if ( + // widget.appo.clinicID == 17 || + widget.appo.clinicID == 47 || + widget.appo.clinicID == 23 || + widget.appo.clinicID == 253 || + widget.appo.clinicID == 265 || + widget.appo.clinicID == 134 || + widget.appo.clinicID == 253 || + widget.appo.isExecludeDoctor! || + widget.appo.isLiveCareAppointment!) { + _tabController!.index = _tabController!.previousIndex; + AppointmentDetails.showFooterButton = false; + } else { + AppointmentDetails.showFooterButton = true; + } + } + }); + }, + tabs: [ + Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))), + // widget.appo.clinicID == 17 || + widget.appo.clinicID == 23 || + widget.appo.clinicID == 47 || + widget.appo.clinicID == 265 || + widget.appo.clinicID == 253 || + widget.appo.clinicID == 134 || + widget.appo!.isExecludeDoctor! || + widget.appo!.isLiveCareAppointment! + ? Tab( + child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.grey)), + ) + : Tab( + child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.black)), + ) + ], + controller: _tabController, + ), + ), + Container( + height: MediaQuery.of(context).size.height * 0.87, + color: Color(0xffF8F8F8), + child: TabBarView( + physics: NeverScrollableScrollPhysics(), + children: [ + AppointmentActions(appo: widget.appo, tabController: _tabController!, enableFooterButton: enableFooterButton, projectViewModel: projectViewModel!), + DocAvailableAppointments(doctor: getDoctorObject(), doctorSchedule: widget.doctorSchedule, isLiveCareAppointment: widget.appo.isLiveCareAppointment!) + ], + controller: _tabController, + ), + ), + ], + ), + ), + ); + } + + Widget _bottomButtons() { + if (widget.parentIndex == null) { + return SizedBox(); + } else { + List list = []; + if (widget.parentIndex == 0 && _tabController!.index == 0 && widget.appo.patientStatusType != 43) { + list.add( + Expanded( + child: DefaultButton( + TranslationBase.of(context).cancelAppointment, + () { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).cancelAppoMsg, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: cancelAppointment, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + }, + color: CustomColors.accentColor, + textColor: CustomColors.white, + ), + ), + ); + list.add( + SizedBox(width: 8), + ); + list.add( + Expanded( + child: DefaultButton( + TranslationBase.of(context).confirm, + confirmAppointment, + color: Color(0xff359846), + ), + ), + ); + } else if (widget.parentIndex == 1 && _tabController!.index == 0) { + list.add( + Expanded( + child: DefaultButton( + TranslationBase.of(context).cancelAppointment, + () { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).cancelAppoMsg, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: cancelAppointment, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + }, + color: CustomColors.accentColor, + // textColor: Color(0xff000000), + ), + ), + ); + } else if (_tabController!.index == 1) { + list.add( + Expanded( + child: DefaultButton( + TranslationBase.of(context).reviewAppointment, + goToBookConfirm, + // DocAvailableAppointments.areSlotsAvailable ? goToBookConfirm : null, + color: Color(0xFFD02127), + disabledColor: Color(0xff28323A).withOpacity(0.3), + ), + ), + ); + } + if (list.isEmpty) { + return SizedBox(); + } else + return Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: Row( + mainAxisSize: MainAxisSize.min, + children: list, + ), + ); + } + } + + void enableFooterButton() { + setState(() { + AppointmentDetails.showFooterButton = true; + }); + } + + void goToBookConfirm() { + if (DocAvailableAppointments.selectedTime == TranslationBase.of(context).waitingAppointment) { + canPayForWalkInAppointment(); + } else { + if (DocAvailableAppointments.areSlotsAvailable) + navigateToBookConfirm(context); + else + AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot); + } + } + + canPayForWalkInAppointment() { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.canPayForWalkInAppointment(widget.appo.clinicID!, widget.appo.projectID!, widget.appo.doctorID!).then((res) { + GifLoaderDialogUtils.hideDialog(context); + navigateToWaitingAppointment(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err, localContext: context); + print(err); + }); + } + + Future navigateToWaitingAppointment(context) async { + DoctorList doctor = new DoctorList(); + doctor.name = widget.appo.doctorNameObj; + doctor.clinicID = widget.appo.clinicID; + doctor.projectID = widget.appo.projectID; + doctor.doctorID = widget.appo.doctorID; + doctor.clinicName = widget.appo.clinicName; + doctor.projectName = widget.appo.projectName; + doctor.doctorTitle = widget.appo.doctorTitle; + doctor.doctorImageURL = widget.appo.doctorImageURL; + doctor.speciality = widget.appo.doctorSpeciality; + doctor.nationalityFlagURL = ""; + doctor.doctorRate = widget.appo.doctorRate; + doctor.noOfPatientsRate = widget.appo.noOfPatientsRate; + + projectViewModel?.setWaitingAppointmentProjectID(widget.appo.projectID!); + projectViewModel?.setWaitingAppointmentDoctor(doctor); + Navigator.push( + context, + FadePage( + page: WaitingAppointmentInfo(), + ), + ); + } + + Future navigateToBookConfirm(context) async { + Navigator.push( + context, + FadePage( + page: BookConfirm( + doctor: getDoctorObject(), + isLiveCareAppointment: widget.appo.isLiveCareAppointment!, + selectedDate: DocAvailableAppointments.selectedDate!, + selectedTime: DocAvailableAppointments.selectedTime!, + initialSlotDuration: 0, + isWalkinAppointment: false, + ), + ), + ); + } + + void getDoctorRatingsDetails() { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getDoctorsRatingDetails(widget.appo.doctorID, projectViewModel!.isArabic ? 1 : 2, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + doctorDetailsList.clear(); + res['DoctorRatingDetailsList'].forEach((v) { + doctorDetailsList.add(new DoctorRateDetails.fromJson(v)); + }); + showRatingDialog(doctorDetailsList); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + void showRatingDialog(List doctorDetailsList) { + showGeneralDialog( + barrierColor: Colors.black.withOpacity(0.5), + transitionBuilder: (context, a1, a2, widget) { + final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0; + return Transform( + transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), + child: Opacity( + opacity: a1.value, + child: Dialog( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + // height: 400.0, + width: MediaQuery.of(context).size.width * 0.8, + color: Colors.white, + child: Column( + children: [ + Container( + width: MediaQuery.of(context).size.width, + margin: EdgeInsets.only(bottom: 5.0), + padding: EdgeInsets.all(10.0), + child: Text(TranslationBase.of(context).doctorRating, style: TextStyle(fontSize: 22.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 0.0), child: Text(this.widget.appo.actualDoctorRate!.ceilToDouble().toString(), style: TextStyle(fontSize: 32.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 5.0), + alignment: Alignment.center, + child: + // RatingBar.readOnly( + // initialRating: this.widget.appo.actualDoctorRate.toDouble(), + // size: 35.0, + // filledColor: Colors.yellow[700], + // emptyColor: Colors.grey[500], + // isHalfAllowed: true, + // halfFilledIcon: Icons.star_half, + // filledIcon: Icons.star, + // emptyIcon: Icons.star, + // ), + RatingBar( + initialRating: this.widget.appo.actualDoctorRate!.toDouble(), + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + ), + tapOnlyMode: true, + unratedColor: Colors.grey[500], + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + )), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text(this.widget.appo.noOfPatientsRate.toString() + " " + TranslationBase.of(context).reviews, style: TextStyle(fontSize: 14.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Expanded( + child: Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[0].patientNumber), + height: 6.0, + child: Container( + color: Colors.green[700], + ), + ), + ), + ), + ], + ), + ), + Container( + child: Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).v_good, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[1].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffB7B723), + ), + ), + ), + ], + ), + ), + Container( + child: Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).good, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[2].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffEBA727), + ), + ), + ), + ], + ), + ), + Container( + child: Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).average, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[3].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffEB7227), + ), + ), + ), + ], + ), + ), + Container( + child: Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).below_average, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[4].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffE20C0C), + ), + ), + ), + ], + ), + ), + Container(margin: EdgeInsets.only(top: 40.0), child: Divider()), + Container( + margin: EdgeInsets.only(top: 0.0), + child: Align( + alignment: FractionalOffset.bottomCenter, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width, + height: 40.0, + child: CustomTextButton( + elevation: 0.0, + backgroundColor: Colors.white, + disabledForegroundColor: new Color(0xFFbcc2c4).withOpacity(0.38), + disabledBackgroundColor: new Color(0xFFbcc2c4).withOpacity(0.12), + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0, color: Colors.red)), + ), + ), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ); + }, + transitionDuration: Duration(milliseconds: 500), + barrierDismissible: true, + barrierLabel: '', + context: context, + pageBuilder: (context, animation1, animation2) { + return SizedBox(); + }); + } + + double getRatingWidth(int patientNumber) { + var width = (patientNumber / this.widget.appo.noOfPatientsRate!) * 100; + return width; + } + + String getDate(String date) { + DateTime dateObj = DateUtil.convertStringToDate(date); + return DateUtil.getWeekDay(dateObj.weekday) + ", " + dateObj.day.toString() + " " + DateUtil.getMonth(dateObj.month) + " " + dateObj.year.toString(); + } + + String getDoctorSpeciality(List docSpecial) { + String docSpeciality = ""; + docSpecial.forEach((v) { + docSpeciality = docSpeciality + v + " "; + }); + return docSpeciality; + } + + DoctorList getDoctorObject() { + DoctorList docObj = new DoctorList(); + docObj.doctorID = widget.appo.doctorID; + docObj.clinicID = widget.appo.clinicID; + docObj.projectID = widget.appo.projectID; + docObj.doctorTitle = widget.appo.doctorTitle; + docObj.name = widget.appo.doctorNameObj; + docObj.clinicName = widget.appo.clinicName; + docObj.speciality = widget.appo.doctorSpeciality; + docObj.actualDoctorRate = widget.appo.actualDoctorRate; + docObj.projectName = widget.appo.projectName; + docObj.originalClinicID = widget.appo.originalClinicID; + docObj.doctorImageURL = widget.appo.doctorImageURL; + return docObj; + } + + void openSchedule() { + Navigator.push( + context, + FadePage( + page: SchedulePage( + doctorList: getDoctorObject(), + appo: widget.appo, + ))); + } + + setTab() async { + var scheduleDoctor = await sharedPref.getObject(DOCTOR_SCHEDULE_DATE_SEL); + if (scheduleDoctor != null) widget.appo.appointmentDate = scheduleDoctor['Date']; + } + + confirmAppointment() { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.confirmAppointment(widget.appo.appointmentNo!, widget.appo.clinicID!, widget.appo.projectID!, widget.appo.isLiveCareAppointment!, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); + Navigator.of(context).pop(); + projectViewModel!.analytics.appointment.appointment_details_confirm(appointment: widget.appo); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + checkIfHasReminder() async { + CalendarUtils calendarUtils = await CalendarUtils.getInstance(); + + DateTime startEventsDate = DateUtil.convertStringToDate(widget.appo.appointmentDate!); + DateTime endEventsDate = DateUtil.convertStringToDate(widget.appo.appointmentDate!); + RetrieveEventsParams params = new RetrieveEventsParams(startDate: startEventsDate, endDate: endEventsDate); + if (calendarUtils.calendars.length > 1) { + calendarUtils.calendars.forEach((calender) { + calendarUtils.retrieveEvents(calender.id!, params).then((value) { + Result> events = value; + events.data!.forEach((element) { + if (element.title!.contains(widget.appo.doctorNameObj!)) calendarUtils.deleteEvent(calender, element); + }); + }); + }); + } else { + await calendarUtils.retrieveEvents(calendarUtils.calendars[0].id!, params).then((value) { + Result> events = value; + events.data!.forEach((element) { + if (element.title!.contains(widget.appo.doctorNameObj!)) calendarUtils.deleteEvent(calendarUtils.calendars[0], element); + }); + }); + } + } + + cancelAppointment() { + ConfirmDialog.closeAlertDialog(context); + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.cancelAppointment(widget.appo, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + checkIfHasReminder(); + getToDoCount(); + AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); + Navigator.of(context).pop(); + projectViewModel!.analytics.appointment.appointment_details_cancel(appointment: widget.appo); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + projectViewModel!.analytics.appointment.appointment_details_cancel(appointment: widget.appo, appointment_type: widget.appo!.isLiveCareAppointment! ? "livecare" : "regular"); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + getToDoCount() { + toDoProvider!.setState(0, 0, true, toDoProvider!.notificationsCount); + ClinicListService service = new ClinicListService(); + service.getActiveAppointmentNo(context).then((res) { + if (res['MessageStatus'] == 1) { + // toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount); + toDoProvider!.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider!.notificationsCount); + } else {} + }).catchError((err) { + print(err); + }); + } +} diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart new file mode 100644 index 00000000..44d06899 --- /dev/null +++ b/lib/pages/MyAppointments/MyAppointments.dart @@ -0,0 +1,541 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'AppointmentDetails.dart'; + +class MyAppointments extends StatefulWidget { + @override + _MyAppointmentsState createState() => _MyAppointmentsState(); +} + +class _MyAppointmentsState extends State with SingleTickerProviderStateMixin { + List upcomingAppoList = []; + List arrivedAppoListNew = []; + + List bookedAppoList = []; + List confirmedAppoList = []; + List arrivedAppoList = []; + + List _patientBookedAppointmentListHospital = []; + List _patientConfirmedAppointmentListHospital = []; + List _patientArrivedAppointmentListHospital = []; + + List _patientBookedAppointmentListClinic = []; + List _patientConfirmedAppointmentListClinic = []; + List _patientArrivedAppointmentListClinic = []; + + List _patientBookedAndConfirmedAppointmentListHospital = []; + List _patientBookedAndConfirmedAppointmentListClinic = []; + + bool isDataLoaded = false; + var sharedPref = new AppSharedPreferences(); + AuthenticatedUserObject authenticatedUserObject = locator(); + + List imagesInfo = []; + + FilterType? filterType; + + int _currentPage = 1; + + ToDoCountProviderModel? toDoProvider; + ProjectViewModel? projectViewModel; + + @override + void initState() { + filterType = FilterType.Clinic; + WidgetsBinding.instance.addPostFrameCallback((_) { + if (Provider.of(context, listen: false).isLogin) getPatientAppointmentHistory(true, false); + }); + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/ar/0.png')); + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/ar/1.png')); + super.initState(); + } + + @override + void dispose() { + super.dispose(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + toDoProvider = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).myAppointmentsList, + isShowAppBar: true, + imagesInfo: imagesInfo, + showNewAppBar: true, + backgroundColor: Color(0xffF8F8F8), + showNewAppBarTitle: true, + showDropDown: false, + dropdownIndexValue: _currentPage, + dropDownIndexChange: (index) { + setState(() { + _currentPage = index!; + }); + }, + dropDownList: [ + // TranslationBase.of(context).booked, + TranslationBase.of(context).upcoming, + TranslationBase.of(context).arrived, + ], + description: TranslationBase.of(context).infoMyAppointments, + body: Container( + child: Column(children: [ + Row( + children: [ + MyTabView(TranslationBase.of(context).byClinic, FilterType.Clinic, filterType!, () { + setFilterType(FilterType.Clinic); + }), + MyTabView(TranslationBase.of(context).byHospital, FilterType.Hospital, filterType!, () { + setFilterType(FilterType.Hospital); + }), + ], + ), + SizedBox(height: 20), + Padding( + padding: EdgeInsets.only(left: 21, right: 21), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + myRadioButton(TranslationBase.of(context).upcoming, 1), + // myRadioButton(TranslationBase.of(context).upcoming, 1), + myRadioButton(TranslationBase.of(context).arrived, 2), + ], + ), + ), + isDataLoaded + ? Expanded( + child: IndexedStack( + index: _currentPage, + children: [getBookedAppointments(), getBookedAndConfirmedAppointments(), getArrivedAppointments()], + ), + ) + : Container(), + ]), + ), + ); + } + + getPatientAppointmentHistory(bool isForUpcoming, bool isForArrived) { + int? languageID = projectViewModel!.isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + + upcomingAppoList.clear(); + arrivedAppoListNew.clear(); + + bookedAppoList.clear(); + confirmedAppoList.clear(); + arrivedAppoList.clear(); + + _patientBookedAppointmentListHospital.clear(); + _patientConfirmedAppointmentListHospital.clear(); + _patientArrivedAppointmentListHospital.clear(); + + _patientBookedAppointmentListClinic.clear(); + _patientConfirmedAppointmentListClinic.clear(); + _patientArrivedAppointmentListClinic.clear(); + + _patientBookedAndConfirmedAppointmentListHospital.clear(); + _patientBookedAndConfirmedAppointmentListClinic.clear(); + + service.getPatientAppointmentHistory(false, languageID, context, isForUpcomming: isForUpcoming, IsForArrived: isForArrived).then((res) { + GifLoaderDialogUtils.hideDialog(context); + setState(() { + if (res['MessageStatus'] == 1) { + if (res['AppoimentAllHistoryResultList'].length != 0) { + res['AppoimentAllHistoryResultList'].forEach((v) { + if (isForArrived) { + arrivedAppoListNew.add(new AppoitmentAllHistoryResultList.fromJson(v)); + } else { + upcomingAppoList.add(new AppoitmentAllHistoryResultList.fromJson(v)); + } + }); + sortAppointmentList(isForUpcoming, isForArrived); + } else {} + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + isDataLoaded = true; + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); + getToDoCount(); + } + + getToDoCount() { + toDoProvider!.setState(0, 0, true, "0"); + ClinicListService service = new ClinicListService(); + service.getActiveAppointmentNo(context).then((res) { + if (res['MessageStatus'] == 1) { + // toDoProvider.setState(res['AppointmentActiveNumber'], true, "0"); + toDoProvider!.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, "0"); + } else {} + }).catchError((err) { + print(err); + }); + } + + bool isConfirmed(AppoitmentAllHistoryResultList appo) { + return AppointmentType.isConfirmed(appo); + } + + bool isArrived(AppoitmentAllHistoryResultList appo) { + return AppointmentType.isArrived(appo); + } + + bool isBooked(AppoitmentAllHistoryResultList appo) { + return AppointmentType.isBooked(appo); + } + + sortAppointmentList(bool isForUpcoming, bool isForArrived) { + if (isForArrived) { + arrivedAppoListNew.forEach((v) { + if (isBooked(v)) { + bookedAppoList.add(v); + } + + if (isConfirmed(v)) { + confirmedAppoList.add(v); + } + + if (isArrived(v)) { + arrivedAppoList.add(v); + } + }); + } else { + upcomingAppoList.forEach((v) { + if (isBooked(v)) { + bookedAppoList.add(v); + } + + if (isConfirmed(v)) { + confirmedAppoList.add(v); + } + + if (isArrived(v)) { + arrivedAppoList.add(v); + } + }); + } + + bookedAppoList.forEach((element) { + List doctorByClinic = _patientBookedAppointmentListClinic + .where( + (elementClinic) => elementClinic.filterName == element.clinicName, + ) + .toList(); + + if (doctorByClinic.length != 0) { + _patientBookedAppointmentListClinic[_patientBookedAppointmentListClinic.indexOf(doctorByClinic[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientBookedAppointmentListClinic.add(PatientAppointmentList(filterName: element.clinicName, patientDoctorAppointment: element)); + } + + List doctorByHospital = _patientBookedAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientBookedAppointmentListHospital[_patientBookedAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientBookedAppointmentListHospital.add(PatientAppointmentList(filterName: element.projectName, patientDoctorAppointment: element)); + } + }); + + confirmedAppoList.forEach((element) { + List doctorByClinic = _patientConfirmedAppointmentListClinic + .where( + (elementClinic) => elementClinic.filterName == element.clinicName, + ) + .toList(); + + if (doctorByClinic.length != 0) { + _patientConfirmedAppointmentListClinic[_patientConfirmedAppointmentListClinic.indexOf(doctorByClinic[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientConfirmedAppointmentListClinic.add(PatientAppointmentList(filterName: element.clinicName, patientDoctorAppointment: element)); + } + + List doctorByHospital = _patientConfirmedAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientConfirmedAppointmentListHospital[_patientConfirmedAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientConfirmedAppointmentListHospital.add(PatientAppointmentList(filterName: element.projectName, patientDoctorAppointment: element)); + } + + //Merging Booked & Confirmed Appointments into Upcoming Tab + // _patientBookedAndConfirmedAppointmentListHospital.addAll(_patientConfirmedAppointmentListHospital); + // _patientBookedAndConfirmedAppointmentListClinic.addAll(_patientConfirmedAppointmentListClinic); + }); + + arrivedAppoList.forEach((element) { + List doctorByClinic = _patientArrivedAppointmentListClinic + .where( + (elementClinic) => elementClinic.filterName == element.clinicName, + ) + .toList(); + + if (doctorByClinic.length != 0) { + _patientArrivedAppointmentListClinic[_patientArrivedAppointmentListClinic.indexOf(doctorByClinic[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientArrivedAppointmentListClinic.add(PatientAppointmentList(filterName: element.clinicName, patientDoctorAppointment: element)); + } + + List doctorByHospital = _patientArrivedAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientArrivedAppointmentListHospital[_patientArrivedAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientArrivedAppointmentListHospital.add(PatientAppointmentList(filterName: element.projectName, patientDoctorAppointment: element)); + } + + // openAppointmentsTab(); + }); + + //Merging Booked & Confirmed Appointments into Upcoming Tab + _patientBookedAndConfirmedAppointmentListHospital.addAll(_patientBookedAppointmentListHospital); + _patientBookedAndConfirmedAppointmentListClinic.addAll(_patientBookedAppointmentListClinic); + + _patientBookedAndConfirmedAppointmentListHospital.addAll(_patientConfirmedAppointmentListHospital); + _patientBookedAndConfirmedAppointmentListClinic.addAll(_patientConfirmedAppointmentListClinic); + + } + + openAppointmentsTab() async { + var flag = await this.sharedPref.getInt(IS_SEARCH_APPO); + int? index; + if (flag == 1) { + index = 0; + } else if (flag == 2) { + index = 1; + } else if (flag == 3) { + index = 2; + } else { + if (_patientBookedAppointmentListClinic.length != 0) { + index = 0; + } else if (_patientConfirmedAppointmentListClinic.length != 0) { + index = 1; + } else if (_patientArrivedAppointmentListClinic.length != 0) { + index = 2; + // return; + } + } + + _currentPage = index!; + } + + Widget getBookedAppointments() { + // return _getAppointment(bookedAppoList.length, (filterType == FilterType.Clinic) ? _patientBookedAppointmentListClinic : _patientBookedAppointmentListHospital); + return Container(); + } + + Widget getBookedAndConfirmedAppointments() { + return _getAppointment( + (bookedAppoList.length + confirmedAppoList.length), (filterType == FilterType.Clinic) ? _patientBookedAndConfirmedAppointmentListClinic : _patientBookedAndConfirmedAppointmentListHospital); + } + + Widget _getAppointment(int _listLength, List _list) { + return Container( + child: Container( + child: _listLength != 0 + ? _appointmentExpandableList(_list) + : Container( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset("assets/images/new-design/noAppointmentIcon.png"), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text( + _currentPage == 0 + ? TranslationBase.of(context).noBookedAppo + : (_currentPage == 1 ? TranslationBase.of(context).noUpcomingAppointment : TranslationBase.of(context).noArrivedAppo), + style: TextStyle( + fontSize: 16.0, + ), + ), + ), + ], + ), + ), + ), + ), + ); + } + + Widget _appointmentExpandableList(List _patientAppointmentList) { + return ListView.separated( + addAutomaticKeepAlives: true, + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(top: 12), + separatorBuilder: (context, index) { + return Container( + height: 12, + margin: EdgeInsets.only(left: 21, right: 21), + // color: Color(0xffD9D9D9), + ); + }, + itemBuilder: (context, index) { + List _appointmentAllHistoryResultList = _patientAppointmentList[index].patientDoctorAppointmentList!; + return AppExpandableNotifier( + title: _patientAppointmentList[index].filterName, + bodyWidget: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), + itemBuilder: (context, _index) { + AppoitmentAllHistoryResultList _appointmentResult = _appointmentAllHistoryResultList[_index]; + bool _isSortByClinic = filterType == FilterType.Clinic; + + return DoctorCard( + onTap: () => Navigator.push( + context, + FadePage( + page: AppointmentDetails( + appo: _appointmentResult, + // parentIndex: _currentPage, + parentIndex: _appointmentResult.patientStatusType == 42 ? 1 : 0, + ), + ), + ).then((value) { + if (_currentPage == 1) { + getPatientAppointmentHistory(true, false); + } + if (_currentPage == 2) { + getPatientAppointmentHistory(false, true); + } + }), + isInOutPatient: _appointmentResult.isInOutPatient, + name: _appointmentResult.doctorTitle! + " " + _appointmentResult.doctorNameObj!, + projectID: _appointmentResult.projectID!, + // billNo: _appointmentResult.invoiceNo, + profileUrl: _appointmentResult.doctorImageURL, + subName: _isSortByClinic ? _appointmentResult.projectName : _appointmentResult.clinicName, + isLiveCareAppointment: _appointmentResult.isLiveCareAppointment, + date: DateUtil.convertStringToDate(_appointmentResult.appointmentDate!), + isSortByClinic: _isSortByClinic, + rating: _appointmentResult.actualDoctorRate + 0.0, + appointmentTime: _appointmentResult.isLiveCareAppointment! + ? DateUtil.convertStringToDate(_appointmentResult.appointmentDate).toString().split(" ")[1].substring(0, 5) + : _appointmentResult.startTime!.substring(0, 5), + // appointmentTime: _appointmentResult.startTime.substring(0, 5), + remainingTimeInMinutes: (_appointmentResult.patientStatusType == AppointmentType.BOOKED || _appointmentResult.patientStatusType == AppointmentType.CONFIRMED) + ? _appointmentResult.remaniningHoursTocanPay + : null + + //projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate) : DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate), + ); + }, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemCount: _appointmentAllHistoryResultList.length), + ); + }, + itemCount: _patientAppointmentList.length, + ); + } + + Widget getConfirmedAppointments() { + return _getAppointment(confirmedAppoList.length, (filterType == FilterType.Clinic) ? _patientConfirmedAppointmentListClinic : _patientConfirmedAppointmentListHospital); + } + + Widget getArrivedAppointments() { + return _getAppointment(arrivedAppoList.length, (filterType == FilterType.Clinic) ? _patientArrivedAppointmentListClinic : _patientArrivedAppointmentListHospital); + } + + setFilterType(FilterType filterType) { + setState(() { + this.filterType = filterType; + }); + } + + Widget myRadioButton(String _label, int _value) { + return InkWell( + onTap: () { + setState(() { + _currentPage = _value; + if (_value == 1) { + getPatientAppointmentHistory(true, false); + } + if (_value == 2) { + getPatientAppointmentHistory(false, true); + } + }); + }, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + width: 22, + height: 22, + child: Radio( + value: _value, + activeColor: _value == _currentPage ? Color(0xffD02127) : Color(0xffE8E8E8), + groupValue: _currentPage, + onChanged: (index) { + setState(() { + _currentPage = index!; + if (_value == 1) { + getPatientAppointmentHistory(true, false); + } + if (_value == 2) { + getPatientAppointmentHistory(false, true); + } + }); + }, + ), + ), + SizedBox(width: 10), + Text( + _label, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/MyAppointments/SchedulePage.dart b/lib/pages/MyAppointments/SchedulePage.dart new file mode 100644 index 00000000..a307c868 --- /dev/null +++ b/lib/pages/MyAppointments/SchedulePage.dart @@ -0,0 +1,535 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/indicator.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class SchedulePage extends StatefulWidget { + DoctorList? doctorList; + AppoitmentAllHistoryResultList? appo; + + SchedulePage({ + this.appo, + this.doctorList, + }); + + @override + _SchedulePageState createState() => _SchedulePageState(); +} + +class _SchedulePageState extends State { + DoctorsListService? service; + PageController _pageController = PageController(); + double currentPage = 0; + int selectedindex = 0; + List weeks = []; + List doctorScheduleResponse = []; + int weekMS = 604800 * 1000; + DoctorList? doctorList; + List freeSlots = []; + bool isPageChange = false; + + AppSharedPreferences sharedPref = AppSharedPreferences(); + + @override + void initState() { + this.doctorList = widget.doctorList; + + super.initState(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getDoctorSchedule(doctorList!), + allowAny: true, + builder: (_, model, widget) => BaseView( + onModelReady: (model2) => model2.getFreeSlots(doctorList!), + allowAny: true, + builder: (_, model2, widget2) { + if (model2.freeSlots.length > 0 && isPageChange == false && model2.state == ViewState.Idle) { + this.freeSlots = model2.freeSlots; + this.doctorScheduleResponse = model.getDoctorScheduleList; + + this.generateWeeksSchedules(); + } else if (model2.freeSlots.length == 0 && model2.state == ViewState.Idle) { + AppToast.showErrorToast(message: TranslationBase.of(context).emptySchedule, localContext: context); + Navigator.pop(context); + } + return AppScaffold( + appBarTitle: TranslationBase.of(context).schedule, + showNewAppBar: true, + showNewAppBarTitle: true, + isShowAppBar: true, + baseViewModel: model2, + isShowDecPage: false, + body: SizedBox( + height: MediaQuery.of(context).size.height, + child: Stack( + children: [ + Container( + margin: EdgeInsets.only(top: 40), + child: PageView.builder( + controller: _pageController, + itemCount: weeks.length, + onPageChanged: (index) { + setState(() { + isPageChange = true; + this.currentPage = index.toDouble(); + }); + }, + itemBuilder: (context, index) { + return Container( + child: ListView.builder( + itemCount: weeks[index].length, + itemBuilder: (context, index2) => InkWell( + onTap: () { + final weekDay = weeks[index][index2]['DayName']; + openBookAppointment(weeks[index][index2]); + projectViewModel.analytics.appointment.book_appointment_date_selection(appointment_type: 'regular', day: weekDay, doctor: doctorList!); + }, + child: Row( + children: [ + Expanded( + flex: 1, + child: Padding( + padding: projectViewModel.isArabic ? EdgeInsets.only(right: 17) : EdgeInsets.only(left: 17), + child: Row(children: [ + Column( + children: [ + Texts( + weeks[index][index2]['DayName'], + fontSize: 13, + fontWeight: projectViewModel.isArabic ? FontWeight.w600 : FontWeight.w500, + ), + Texts( + getDayMonths( + DateUtil.convertStringToDate( + weeks[index][index2]['Date'], + ), + ), + fontWeight: FontWeight.bold, + fontSize: 18, + ) + ], + ) + ])), + ), + Expanded( + flex: 3, + child: ClipRRect( + borderRadius: const BorderRadius.all(Radius.circular(20.0)), + child: Container( + padding: EdgeInsets.only(left: 10, right: 10, top: 15, bottom: 20), + margin: EdgeInsets.only(left: 20, right: 20, top: 7, bottom: 7), + decoration: BoxDecoration(boxShadow: [ + DateUtil.convertStringToDate(weeks[index][index2]['Date']).toString().substring(0, 10) == DateTime.now().toString().substring(0, 10) + ? BoxShadow(color: Colors.green, offset: Offset(projectViewModel.isArabic ? 5 : -5, 0)) + : BoxShadow( + color: Colors.grey[100]!, + blurRadius: 5, + spreadRadius: 4, + offset: Offset(0, 10), + ), + ], borderRadius: const BorderRadius.all(Radius.circular(10.0)), color: Colors.white), + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + DateUtil.convertStringToDate(weeks[index][index2]['Date']).toString().substring(0, 10) == DateTime.now().toString().substring(0, 10) + ? Texts( + TranslationBase.of(context).today, + color: Colors.green, + fontWeight: FontWeight.w600, + fontSize: 12, + marginTop: 0, + ) + : SizedBox(), + Row( + children: [ + Expanded( + child: Text( + weeks[index][index2]['WorkingHours'], + style: TextStyle( + fontWeight: FontWeight.w600, + ), + ), + ), + Icon(Icons.arrow_forward, size: 16.0), + ], + ) + ]))), + ), + ], + )))); + }, + )), + PageViewIndicator( + isActive: true, + currentPage: this.currentPage, + length: weeks.length, + ) + ], + ))); + })); + } + + generateWeeksSchedules() { + this.weeks.clear(); + for (var i = 0; i < 8; i++) { + var weekSchedule = generateNewWeekSchedule(i); + this.markWeekFreeDays(weekSchedule); + this.weeks.add(weekSchedule); + } + //print(this.weeks); + } + + markWeekFreeDays(schedule) { + for (var workDay in schedule) { + workDay['fullDay'] = !this.hasFreeSlot(workDay['Date']); + } + } + + generateNewWeekSchedule(weekIndex) { + var weekMSOffset = weekIndex * weekMS; + + var newWeekSchedule = []; + for (var workDay in this.doctorScheduleResponse) { + Map newWorkDay = Map(); + newWorkDay['Date'] = DateUtil.convertDateMSToJsonDate(DateUtil.convertStringToDate(workDay.date!).millisecondsSinceEpoch + weekMSOffset); + newWorkDay['DayName'] = workDay.dayName; + newWorkDay['WorkingHours'] = workDay.workingHours; + newWeekSchedule.add(newWorkDay); + } + return newWeekSchedule; + } + + hasFreeSlot(String jsonDate) { + var date = DateUtil.convertStringToDate(jsonDate); + var scheduleDay = date; + for (var event in this.freeSlots) { + var date = DateUtil.convertStringToDate(event); + var nDate = DateTime(date.year, date.month, date.day); + + if (nDate.millisecondsSinceEpoch == scheduleDay.millisecondsSinceEpoch) { + return true; + } + } + return false; + } + + String getDayMonths(DateTime dateTime) { + String dateFormat = '${dateTime.day} ${DateUtil.getMonth(dateTime.month).toString().substring(0, 3)}'; + return dateFormat; + } + + openBookAppointment(selectedDate) { + //sharedPref.setObject(DOCTOR_SCHEDULE_DATE_SEL, selectedDate); + Navigator.of(context).pop(selectedDate); + // Navigator.push( + // context, + // FadePage( + // page: AppointmentDetails( + // appo: widget.appo, + // doctorSchedule: selectedDate, + // ), + // ), + // ); + } +} + +// import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +// import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart'; +// +// import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart'; +// import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/indicator.dart'; +// import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +// import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +// import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +// import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +// import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +// import 'package:flutter/material.dart'; +// import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +// import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart'; +// import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +// import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +// import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +// import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +// import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +// import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +// import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +// import 'package:provider/provider.dart'; +// import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +// +// class SchedulePage extends StatefulWidget { +// DoctorList doctorList; +// AppoitmentAllHistoryResultList appo; +// SchedulePage({ +// this.appo, +// this.doctorList, +// }); +// @override +// _SchedulePageState createState() => _SchedulePageState(); +// } +// +// class _SchedulePageState extends State { +// DoctorsListService service; +// PageController _pageController = PageController(); +// double currentPage = 0; +// int selectedindex = 0; +// List weeks = []; +// List doctorScheduleResponse = []; +// int weekMS = 604800 * 1000; +// DoctorList doctorList; +// List freeSlots = []; +// bool isPageChange = false; +// +// AppSharedPreferences sharedPref = AppSharedPreferences(); +// @override +// void initState() { +// this.doctorList = widget.doctorList; +// +// super.initState(); +// } +// +// @override +// Widget build(BuildContext context) { +// ProjectViewModel projectViewModel = Provider.of(context); +// return BaseView( +// onModelReady: (model) => model.getDoctorSchedule(doctorList), +// allowAny: true, +// builder: (_, model, widget) => BaseView( +// onModelReady: (model2) => model2.getFreeSlots(doctorList), +// allowAny: true, +// builder: (_, model2, widget2) { +// if (model2.freeSlots.length > 0 && isPageChange == false && model2.state == ViewState.Idle) { +// this.freeSlots = model2.freeSlots; +// this.doctorScheduleResponse = model.getDoctorScheduleList; +// +// this.generateWeeksSchedules(); +// } else if (model2.freeSlots.length == 0 && model2.state == ViewState.Idle) { +// AppToast.showErrorToast(message: TranslationBase.of(context).emptySchedule); +// Navigator.pop(context); +// } +// return AppScaffold( +// appBarTitle: TranslationBase.of(context).schedule, +// showNewAppBar: true, +// showNewAppBarTitle: true, +// isShowAppBar: true, +// backgroundColor: Color(0xffF7F7F7), +// baseViewModel: model2, +// isShowDecPage: false, +// body: Column( +// children: [ +// SizedBox(height: 21), +// PageViewIndicator( +// isActive: true, +// currentPage: this.currentPage, +// length: weeks.length, +// ), +// Expanded( +// child: PageView.builder( +// controller: _pageController, +// itemCount: weeks.length, +// onPageChanged: (index) { +// setState(() { +// isPageChange = true; +// this.currentPage = index.toDouble(); +// }); +// }, +// itemBuilder: (context, index) { +// return ListView.separated( +// itemCount: weeks[index].length, +// padding: EdgeInsets.all(21), +// separatorBuilder: (context, index) => SizedBox(height: 12), +// itemBuilder: (context, index2) { +// bool isToday = DateUtil.convertStringToDate(weeks[index][index2]['Date']).toString().substring(0, 10) == DateTime.now().toString().substring(0, 10); +// Color toDayColor = isToday ? Color(0xff359846) : Colors.white; +// return InkWell( +// onTap: () { +// openBookAppointment(weeks[index][index2]); +// }, +// child: Row( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Expanded( +// flex: 1, +// child: Column( +// mainAxisSize: MainAxisSize.min, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// weeks[index][index2]['DayName'], +// style: TextStyle( +// fontSize: 13, +// fontWeight: FontWeight.w600, +// color: Color(0xff2E303A), +// letterSpacing: -0.52, +// ), +// ), +// Text( +// getDayMonths(DateUtil.convertStringToDate(weeks[index][index2]['Date'])), +// style: TextStyle( +// fontSize: 18, +// fontWeight: FontWeight.w700, +// color: Color(0xff2E303A), +// letterSpacing: -0.72, +// ), +// ), +// ], +// ), +// ), +// Expanded( +// flex: 3, +// child: Container( +// decoration: BoxDecoration( +// color: toDayColor, +// borderRadius: BorderRadius.all( +// Radius.circular(10.0), +// ), +// boxShadow: [ +// BoxShadow( +// color: Color(0xff000000).withOpacity(.05), +// blurRadius: 27, +// offset: Offset(0, -3), +// ), +// ], +// ), +// child: Container( +// margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), +// padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), +// decoration: BoxDecoration( +// color: Colors.white, +// border: Border.all(color: Colors.white, width: 1), +// borderRadius: BorderRadius.only( +// bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), +// topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), +// bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), +// topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), +// ), +// ), +// child: Row( +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// Expanded( +// child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ +// if (isToday) +// Text( +// TranslationBase.of(context).today, +// style: TextStyle( +// fontSize: 12, +// fontWeight: FontWeight.w600, +// color: toDayColor, +// letterSpacing: -0.48, +// ), +// ), +// Row( +// children: [ +// Expanded( +// child: Text( +// weeks[index][index2]['WorkingHours'], +// style: TextStyle( +// fontSize: 13, +// fontWeight: FontWeight.w600, +// color: Color(0xff2E303A), +// letterSpacing: -0.56, +// ), +// ), +// ), +// ], +// ) +// ]), +// ), +// Icon(Icons.arrow_forward, color: Color(0xff2B353E)), +// ], +// ), +// ), +// ), +// ), +// ], +// ), +// ); +// }); +// }, +// ), +// ), +// ], +// ), +// ); +// }), +// ); +// } +// +// generateWeeksSchedules() { +// this.weeks.clear(); +// for (var i = 0; i < 8; i++) { +// var weekSchedule = generateNewWeekSchedule(i); +// this.markWeekFreeDays(weekSchedule); +// this.weeks.add(weekSchedule); +// } +// //print(this.weeks); +// } +// +// markWeekFreeDays(schedule) { +// for (var workDay in schedule) { +// workDay['fullDay'] = !this.hasFreeSlot(workDay['Date']); +// } +// } +// +// generateNewWeekSchedule(weekIndex) { +// var weekMSOffset = weekIndex * weekMS; +// +// var newWeekSchedule = []; +// for (var workDay in this.doctorScheduleResponse) { +// Map newWorkDay = Map(); +// newWorkDay['Date'] = DateUtil.convertDateMSToJsonDate(DateUtil.convertStringToDate(workDay.date).millisecondsSinceEpoch + weekMSOffset); +// newWorkDay['DayName'] = workDay.dayName; +// newWorkDay['WorkingHours'] = workDay.workingHours; +// newWeekSchedule.add(newWorkDay); +// } +// return newWeekSchedule; +// } +// +// hasFreeSlot(String jsonDate) { +// var date = DateUtil.convertStringToDate(jsonDate); +// var scheduleDay = date; +// for (var event in this.freeSlots) { +// var date = DateUtil.convertStringToDate(event); +// var nDate = DateTime(date.year, date.month, date.day); +// +// if (nDate.millisecondsSinceEpoch == scheduleDay.millisecondsSinceEpoch) { +// return true; +// } +// } +// return false; +// } +// +// String getDayMonths(DateTime dateTime) { +// String dateFormat = '${dateTime.day} ${DateUtil.getMonth(dateTime.month).toString().substring(0, 3)}'; +// return dateFormat; +// } +// +// openBookAppointment(selectedDate) { +// //sharedPref.setObject(DOCTOR_SCHEDULE_DATE_SEL, selectedDate); +// Navigator.of(context).pop(selectedDate); +// // Navigator.push( +// // context, +// // FadePage( +// // page: AppointmentDetails( +// // appo: widget.appo, +// // doctorSchedule: selectedDate, +// // ), +// // ), +// // ); +// } +// } diff --git a/lib/pages/MyAppointments/VisitTicket.dart b/lib/pages/MyAppointments/VisitTicket.dart new file mode 100644 index 00000000..fd12e95b --- /dev/null +++ b/lib/pages/MyAppointments/VisitTicket.dart @@ -0,0 +1,78 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class VisitTicket extends StatefulWidget { + List appoList = []; + + @override + _VisitTicketState createState() => _VisitTicketState(); +} + +class _VisitTicketState extends State { + bool isLoading = false; + ProjectViewModel? projectViewModel; + + @override + void initState() { + getPatientAppointmentCurfewHistory(context); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).todoList, + body: isLoading == false + ? SingleChildScrollView( + child: ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + padding: EdgeInsets.all(0.0), + itemCount: widget.appoList.length, + itemBuilder: (context, index) { + return DoctorView( + doctor: widget.appoList[index], + ); + }, + ), + ) + : AppCircularProgressIndicator(), + ); + } + + getPatientAppointmentCurfewHistory(BuildContext context) { + int languageID = projectViewModel!.isArabic ? 1 : 2; + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getPatientAppointmentHistory(true, languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + if (res['AppoimentAllHistoryResultList'].length != 0) { + widget.appoList.clear(); + res['AppoimentAllHistoryResultList'].forEach((v) { + widget.appoList.add(new DoctorList.fromJson(v)); + }); + } else {} + }); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } +} diff --git a/lib/pages/MyAppointments/models/AppointmentModel.dart b/lib/pages/MyAppointments/models/AppointmentModel.dart new file mode 100644 index 00000000..304ae7ed --- /dev/null +++ b/lib/pages/MyAppointments/models/AppointmentModel.dart @@ -0,0 +1,84 @@ +//Appointment Model to be used in all the appointment based pages & components + +class AppointmentModel { + + static var SHARED_DATA = 'appointment-model'; + static var PATIENT_DATA = 'patient-model'; + var DoctorSpeciality = []; + + var List_HIS_GetContactLensPerscription = []; + var List_HIS_GetGlassPerscription = []; + var SetupID; + var ProjectID; + var AppointmentNo; + var AppointmentDate; + var AppointmentDateN; + var AppointmentType; + var BookDate; + var PatientType; + var PatientID; + var ClinicID; + var DoctorID; + var EndDate; + var StartTime; + var EndTime; + var Status; + var VisitType; + var VisitFor; + var PatientStatusType; + var CompanyID; + var BookedBy; + var BookedOn; + var ConfirmedBy; + var ConfirmedOn; + var ArrivalChangedBy; + var ArrivedOn; + var EditedBy; + var EditedOn; + var DoctorName; + var DoctorNameN; + var StatusDesc; + var StatusDescN; + var VitalStatus; + var VitalSignAppointmentNo; + var ClinicName; + var ComplainExists; + var DoctorImageURL; + var DoctorNameObj; + var DoctorRate; + var DoctorTitle; + var Gender; + var GenderDescription; + var IsActiveDoctor; + var IsActiveDoctorProfile; + var IsExecludeDoctor; + var IsMedicalReportRequested; + var ProjectName; + var QR; + var SMSButtonVisable; + var DoctorRatingDetailsList; + var AvgDoctorRatingList; + var IsLiveCareAppointment; + var OriginalClinicID; + var OriginalProjectID; + var StrAppointmentDate; + /* + the check in parameters + */ + // if onlince checked in mean user paid the appointment + var IsOnlineCheckedIN; + + // if user is allowed to pay for the appointment + var ISAllowOnlineCheckedIN; + + var PatientShare; + var CompanyName; + var PatientTaxAmount; + var PatientShareWithTax; + var IsFollowup; + var IsDoctorAllowVedioCall; + + static String getAppointmentTransID(appo) { + return appo.ProjectID + '-' + appo.ClinicID + '-' + appo.AppointmentNo; + } +} \ No newline at end of file diff --git a/lib/pages/MyAppointments/models/AppointmentType.dart b/lib/pages/MyAppointments/models/AppointmentType.dart new file mode 100644 index 00000000..1d0cc3d3 --- /dev/null +++ b/lib/pages/MyAppointments/models/AppointmentType.dart @@ -0,0 +1,42 @@ +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; + +class AppointmentType { + static var BOOKED = 0; + static const BOOKED_STR = 'booked'; + static var CONFIRMED = 42; + static const CONFIRMED_STR = 'confirmed'; + static var ARRIVED = 43; + static const ARRIVED_STR = 'arrived'; + + static bool isConfirmed(AppoitmentAllHistoryResultList appo) { + return AppointmentType.isValid(appo) && + appo.patientStatusType == AppointmentType.CONFIRMED; + } + + static bool isBooked(AppoitmentAllHistoryResultList appo) { + return AppointmentType.isValid(appo) && + appo.patientStatusType == AppointmentType.BOOKED; + } + + static bool isArrived(AppoitmentAllHistoryResultList appo) { + return AppointmentType.isValid(appo) && + appo.patientStatusType == AppointmentType.ARRIVED; + } + + static isValid(appo) { + return appo != null && appo.patientStatusType != null; + } + + static int getType(typeName) { + switch (typeName) { + case AppointmentType.BOOKED_STR: + return AppointmentType.BOOKED; + case AppointmentType.ARRIVED_STR: + return AppointmentType.ARRIVED; + case AppointmentType.CONFIRMED_STR: + return AppointmentType.CONFIRMED; + default: + return AppointmentType.BOOKED; + } + } +} diff --git a/lib/pages/MyAppointments/models/ArrivedButtons.dart b/lib/pages/MyAppointments/models/ArrivedButtons.dart new file mode 100644 index 00000000..5cac41dd --- /dev/null +++ b/lib/pages/MyAppointments/models/ArrivedButtons.dart @@ -0,0 +1,55 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; + +class ArrivedButtons { + var buttons = [ + { + "title": TranslationBase.of(AppGlobal.context).medicines, + "subtitle": TranslationBase.of(AppGlobal.context).medicinesSubtitle, + "icon": "medicine_prescription.svg", + "caller": "prescriptions", + }, + { + "title": TranslationBase.of(AppGlobal.context).radiology, + "subtitle": TranslationBase.of(AppGlobal.context).radiologySubtitle, + "icon": 'radiology.svg', + "caller": "radiology", + }, + { + "title": TranslationBase.of(AppGlobal.context).lab, + "subtitle": TranslationBase.of(AppGlobal.context).labSubtitle, + "icon": 'lab_result.svg', + "caller": "labResult", + }, + { + "title": TranslationBase.of(AppGlobal.context).vitalSigns, + "subtitle": TranslationBase.of(AppGlobal.context).vitalSignsSubtitle, + "icon": 'vital_signs.svg', + "caller": "VitalSigns", + }, + { + "title": TranslationBase.of(AppGlobal.context).raise, + "subtitle": TranslationBase.of(AppGlobal.context).complaint, + "icon": "raise_comp.svg", + "caller": "insertComplaint", + }, + { + "title": TranslationBase.of(AppGlobal.context).insuranceApproval, + "subtitle": TranslationBase.of(AppGlobal.context).insuranceApprovalSubtitle, + "icon": 'insurance_approval.svg', + "caller": "Insurance", + }, + { + "title": TranslationBase.of(AppGlobal.context).askDoctor, + "subtitle": TranslationBase.of(AppGlobal.context).service, + "icon": 'ask_doctor.svg', + "caller": "askDoc", + }, + { + "title": TranslationBase.of(AppGlobal.context).service, + "subtitle": TranslationBase.of(AppGlobal.context).appoSurvey, + "icon": "survey.svg", + "caller": "Survey", + } + ]; +} diff --git a/lib/pages/MyAppointments/models/ArrivedButtonsAllowCheckIn.dart b/lib/pages/MyAppointments/models/ArrivedButtonsAllowCheckIn.dart new file mode 100644 index 00000000..de9bc564 --- /dev/null +++ b/lib/pages/MyAppointments/models/ArrivedButtonsAllowCheckIn.dart @@ -0,0 +1,61 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; + +class ArrivedButtons { + static var buttons = [ + { + "title": "Arrived", + "subtitle": "Status", + "icon": "assets/images/new-design/waiting-room.png", + "caller": "openReschedule" + }, + { + "title": "Medicines", + "subtitle": "Prescriptions", + "icon": "assets/images/new-design/medicine_prescriptions_icon.png", + "caller": "prescriptions" + }, + { + "title": "Radiology", + "subtitle": "Services", + "icon": "assets/images/new-design/radiology_service_icon.png", + "caller": "radiology" + }, + { + "title": "Lab", + "subtitle": "Result", + "icon": "assets/images/new-design/lab_result_icon.png", + "caller": "addReminder" + }, + { + "title": "Vital Signs", + "subtitle": "Values", + "icon": "assets/images/new-design/vital_signs.png", + "caller": "VitalSigns" + }, + { + "title": TranslationBase.of(AppGlobal.context).raise, + "subtitle": TranslationBase.of(AppGlobal.context).complaint, + "icon": "assets/images/new-design/Complaint_icon.png", + "caller": "insertComplaint" + }, + { + "title": "Insurance", + "subtitle": "Approvals", + "icon": "assets/images/new-design/insurance_approvals_icon.png", + "caller": "Insurance" + }, + { + "title": "Ask Your", + "subtitle": "Doctor", + "icon": "assets/images/new-design/ask_doctor_icon.png", + "caller": "goToTodoList" + }, + { + "title": "Survey", + "subtitle": "Service", + "icon": "assets/images/new-design/survey.png", + "caller": "Survey" + } + ]; +} diff --git a/lib/pages/MyAppointments/models/AskDocRequestTypeModel.dart b/lib/pages/MyAppointments/models/AskDocRequestTypeModel.dart new file mode 100644 index 00000000..491d3f7a --- /dev/null +++ b/lib/pages/MyAppointments/models/AskDocRequestTypeModel.dart @@ -0,0 +1,92 @@ +class AskDocRequestType { + String? setupID; + int? parameterGroup; + int? parameterType; + int? parameterCode; + String? description; + String? descriptionN; + String? alias; + String? aliasN; + String? prefix; + String? suffix; + String? isColorCodingRequired; + String? backColor; + String? foreColor; + bool? isBuiltIn; + bool? isActive; + int? createdBy; + String? createdOn; + String? editedBy; + String? editedOn; + String? rowVer; + + AskDocRequestType( + {this.setupID, + this.parameterGroup, + this.parameterType, + this.parameterCode, + this.description, + this.descriptionN, + this.alias, + this.aliasN, + this.prefix, + this.suffix, + this.isColorCodingRequired, + this.backColor, + this.foreColor, + this.isBuiltIn, + this.isActive, + this.createdBy, + this.createdOn, + this.editedBy, + this.editedOn, + this.rowVer}); + + AskDocRequestType.fromJson(Map json) { + setupID = json['SetupID']; + parameterGroup = json['ParameterGroup']; + parameterType = json['ParameterType']; + parameterCode = json['ParameterCode']; + description = json['Description']; + descriptionN = json['DescriptionN']; + alias = json['Alias']; + aliasN = json['AliasN']; + prefix = json['Prefix']; + suffix = json['Suffix']; + isColorCodingRequired = json['IsColorCodingRequired']; + backColor = json['BackColor']; + foreColor = json['ForeColor']; + isBuiltIn = json['IsBuiltIn']; + isActive = json['IsActive']; + createdBy = json['CreatedBy']; + createdOn = json['CreatedOn']; + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + rowVer = json['RowVer']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ParameterGroup'] = this.parameterGroup; + data['ParameterType'] = this.parameterType; + data['ParameterCode'] = this.parameterCode; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + data['Alias'] = this.alias; + data['AliasN'] = this.aliasN; + data['Prefix'] = this.prefix; + data['Suffix'] = this.suffix; + data['IsColorCodingRequired'] = this.isColorCodingRequired; + data['BackColor'] = this.backColor; + data['ForeColor'] = this.foreColor; + data['IsBuiltIn'] = this.isBuiltIn; + data['IsActive'] = this.isActive; + data['CreatedBy'] = this.createdBy; + data['CreatedOn'] = this.createdOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + data['RowVer'] = this.rowVer; + return data; + } +} diff --git a/lib/pages/MyAppointments/models/BookedButtons.dart b/lib/pages/MyAppointments/models/BookedButtons.dart new file mode 100644 index 00000000..39aed7cc --- /dev/null +++ b/lib/pages/MyAppointments/models/BookedButtons.dart @@ -0,0 +1,45 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; + +class BookedButtons { + var buttons = [ + // { + // "title": TranslationBase.of(AppGlobal.context).confirm, + // "subtitle": TranslationBase.of(AppGlobal.context).appointment, + // "icon": "assets/images/new-design/confirm_icon.png", + // "caller": "confirmAppointment", + // }, + { + "title": TranslationBase.of(AppGlobal.context).reschedule, + "subtitle": TranslationBase.of(AppGlobal.context).appointment, + "icon": "reschedule.svg", + "caller": "openReschedule", + }, + // { + // "title": TranslationBase.of(AppGlobal.context).cancel_nocaps, + // "subtitle": TranslationBase.of(AppGlobal.context).appointment, + // "icon": "assets/images/new-design/cancel_icon.png", + // "caller": "onCancelAppointment", + // }, + { + "title": TranslationBase.of(AppGlobal.context).raise, + "subtitle": TranslationBase.of(AppGlobal.context).complaint, + "icon": "raise_comp.svg", + "caller": "insertComplaint", + }, + { + "title": TranslationBase.of(AppGlobal.context).add, + "subtitle": TranslationBase.of(AppGlobal.context).reminder, + "icon": "add_reminder.svg", + "caller": "addReminder", + }, + { + "title": TranslationBase.of(AppGlobal.context).hospital, + "subtitle": TranslationBase.of(AppGlobal.context).location, + "icon": "hosp_location.svg", + "caller": "navigateToProject", + }, + {"title": TranslationBase.of(AppGlobal.context).online, "subtitle": TranslationBase.of(AppGlobal.context).payment, "icon": "online_payment.svg", "caller": "goToTodoList"}, + // {"title": TranslationBase.of(AppGlobal.context).clinic, "subtitle": TranslationBase.of(AppGlobal.context).locationa, "icon": "hosp_location.svg", "caller": "goToNavigation"} + ]; +} diff --git a/lib/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart b/lib/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart new file mode 100644 index 00000000..1062eaf3 --- /dev/null +++ b/lib/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart @@ -0,0 +1,49 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; + +class BookedButtonsAllowCheckIn { + var buttons = [ + { + "title": TranslationBase.of(AppGlobal.context).confirm, + "subtitle": TranslationBase.of(AppGlobal.context).appointment, + "icon": "assets/images/new-design/confirm_icon.png", + "caller": "confirmAppointment", + }, + { + "title": TranslationBase.of(AppGlobal.context).reschedule, + "subtitle": TranslationBase.of(AppGlobal.context).appointment, + "icon": "reschedule.svg", + "caller": "openReschedule", + }, + { + "title": TranslationBase.of(AppGlobal.context).cancel_nocaps, + "subtitle": TranslationBase.of(AppGlobal.context).appointment, + "icon": "assets/images/new-design/cancel_icon.png", + "caller": "onCancelAppointment", + }, + { + "title": TranslationBase.of(AppGlobal.context).raise, + "subtitle": TranslationBase.of(AppGlobal.context).complaint, + "icon": "raise_comp.svg", + "caller": "insertComplaint", + }, + { + "title": TranslationBase.of(AppGlobal.context).add, + "subtitle": TranslationBase.of(AppGlobal.context).reminder, + "icon": "assets/images/new-design/reminder_icon.png", + "caller": "addReminder", + }, + { + "title": TranslationBase.of(AppGlobal.context).hospital, + "subtitle": TranslationBase.of(AppGlobal.context).location, + "icon": "assets/images/new-design/location_icon.png", + "caller": "navigateToProject", + }, + { + "title": TranslationBase.of(AppGlobal.context).online, + "subtitle": TranslationBase.of(AppGlobal.context).payment, + "icon": "assets/images/new-design/check-in.png", + "caller": "goToTodoList", + } + ]; +} diff --git a/lib/pages/MyAppointments/models/ConfirmedButtons.dart b/lib/pages/MyAppointments/models/ConfirmedButtons.dart new file mode 100644 index 00000000..d49723e9 --- /dev/null +++ b/lib/pages/MyAppointments/models/ConfirmedButtons.dart @@ -0,0 +1,25 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; + +class ConfirmedButtons { + var buttons = [ + {"title": TranslationBase.of(AppGlobal.context).reschedule, "subtitle": TranslationBase.of(AppGlobal.context).appointment, "icon": "reschedule.svg", "caller": "openReschedule"}, + // { + // "title": TranslationBase.of(AppGlobal.context).cancel_nocaps, + // "subtitle": TranslationBase.of(AppGlobal.context).appointment, + // "icon": "assets/images/new-design/cancel_icon.png", + // "caller": "onCancelAppointment" + // }, + {"title": TranslationBase.of(AppGlobal.context).raise, "subtitle": TranslationBase.of(AppGlobal.context).complaint, "icon": "raise_comp.svg", "caller": "insertComplaint"}, + {"title": TranslationBase.of(AppGlobal.context).add, "subtitle": TranslationBase.of(AppGlobal.context).reminder, "icon": "add_reminder.svg", "caller": "addReminder"}, + {"title": TranslationBase.of(AppGlobal.context).hospital, "subtitle": TranslationBase.of(AppGlobal.context).location, "icon": "hosp_location.svg", "caller": "navigateToProject"}, +// { +// "title": "Generate", +// "subtitle": "Visit Ticket", +// "icon": "assets/images/new-design/generate_visit_ticket.png", +// "caller": "visitTicket" +// }, + {"title": TranslationBase.of(AppGlobal.context).online, "subtitle": TranslationBase.of(AppGlobal.context).payment, "icon": "online_payment.svg", "caller": "goToTodoList"}, + // {"title": TranslationBase.of(AppGlobal.context).clinic, "subtitle": TranslationBase.of(AppGlobal.context).locationa, "icon": "hosp_location.svg", "caller": "goToNavigation"} + ]; +} diff --git a/lib/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart b/lib/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart new file mode 100644 index 00000000..ed97a418 --- /dev/null +++ b/lib/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart @@ -0,0 +1,43 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; + +class ConfirmedButtonsAllowCheckIn { + var buttons = [ + { + "title": TranslationBase.of(AppGlobal.context).reschedule, + "subtitle": TranslationBase.of(AppGlobal.context).appointment, + "icon": "reschedule.svg", + "caller": "openReschedule", + }, + // { + // "title": TranslationBase.of(AppGlobal.context).cancel_nocaps, + // "subtitle": TranslationBase.of(AppGlobal.context).appointment, + // "icon": "assets/images/new-design/cancel_icon.png", + // "caller": "onCancelAppointment", + // }, + { + "title": TranslationBase.of(AppGlobal.context).raise, + "subtitle": TranslationBase.of(AppGlobal.context).complaint, + "icon": "raise_comp.svg", + "caller": "insertComplaint", + }, + { + "title": TranslationBase.of(AppGlobal.context).add, + "subtitle": TranslationBase.of(AppGlobal.context).reminder, + "icon": "reminder_icon.svg", + "caller": "addReminder", + }, + { + "title": TranslationBase.of(AppGlobal.context).hospital, + "subtitle": TranslationBase.of(AppGlobal.context).location, + "icon": "hosp_location.svg", + "caller": "navigateToProject", + }, + { + "title": TranslationBase.of(AppGlobal.context).online, + "subtitle": TranslationBase.of(AppGlobal.context).payment, + "icon": "online_payment.svg", + "caller": "goToTodoList", + } + ]; +} diff --git a/lib/pages/MyAppointments/models/DoctorScheduleResponse.dart b/lib/pages/MyAppointments/models/DoctorScheduleResponse.dart new file mode 100644 index 00000000..f299bcd0 --- /dev/null +++ b/lib/pages/MyAppointments/models/DoctorScheduleResponse.dart @@ -0,0 +1,32 @@ +class DoctorScheduleResponse { + String? clinicName; + String? date; + String? dayName; + String? projectName; + String? workingHours; + + DoctorScheduleResponse( + {this.clinicName, + this.date, + this.dayName, + this.projectName, + this.workingHours}); + + DoctorScheduleResponse.fromJson(Map json) { + clinicName = json['ClinicName']; + date = json['Date']; + dayName = json['DayName']; + projectName = json['ProjectName']; + workingHours = json['WorkingHours']; + } + + Map toJson() { + final Map data = new Map(); + data['ClinicName'] = this.clinicName; + data['Date'] = this.date; + data['DayName'] = this.dayName; + data['ProjectName'] = this.projectName; + data['WorkingHours'] = this.workingHours; + return data; + } +} diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart new file mode 100644 index 00000000..f519353c --- /dev/null +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -0,0 +1,702 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; +import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; +import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart'; +import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/models/AskDocRequestTypeModel.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/models/BookedButtons.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtons.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; +import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; +import 'package:diplomaticquarterapp/pages/medical/labs/laboratory_result_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_items_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/app-permissions.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/penguin_method_channel.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:huawei_hmsavailability/huawei_hmsavailability.dart'; +import 'package:huawei_map/huawei_map.dart' as hmsMap; +import 'package:intl/intl.dart'; +import 'package:map_launcher/map_launcher.dart'; +import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class AppointmentActions extends StatefulWidget { + AppoitmentAllHistoryResultList appo; + TabController tabController; + final Function enableFooterButton; + MyInAppBrowser? browser; + final ProjectViewModel? projectViewModel; + + AppointmentActions({required this.appo, required this.tabController, required this.enableFooterButton, this.projectViewModel}); + + @override + _AppointmentActionsState createState() => _AppointmentActionsState(); +} + +class _AppointmentActionsState extends State { + List appoButtonsList = []; + static bool isHuawei = false; + HmsApiAvailability hmsApiAvailability = HmsApiAvailability(); + + @override + void initState() { + _getAppointmentActionButtons(); + checkIsHuawei(); + super.initState(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + ToDoCountProviderModel model = Provider.of(context); + + return GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, crossAxisSpacing: 13, mainAxisSpacing: 9), + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.all(21), + shrinkWrap: true, + itemBuilder: (context, index) { + // bool shouldEnable = ((widget.appo.clinicID == 17 || widget.appo.clinicID == 47) || (widget.appo.isLiveCareAppointment && appoButtonsList[index].caller == "askDoc") || appoButtonsList[index].caller == "openReschedule"); + bool shouldEnable = (((widget.appo.clinicID == 47 || widget.appo.clinicID == 134 || widget.appo.clinicID == 253) && appoButtonsList[index].caller == "openReschedule") || + (widget.appo.isLiveCareAppointment! && appoButtonsList[index].caller == "askDoc") || + (Utils.isVidaPlusProject(projectViewModel, widget.appo.projectID) && + widget.appo.clinicID == 10 && + (appoButtonsList[index].caller == "prescriptions" || appoButtonsList[index].caller == "radiology" || appoButtonsList[index].caller == "labResult"))); + return InkWell( + onTap: shouldEnable + ? null + : () { + _handleButtonClicks(appoButtonsList[index], model); + }, + child: MedicalProfileItem( + title: appoButtonsList[index].title!, + imagePath: appoButtonsList[index].icon!, + subTitle: appoButtonsList[index].subtitle!, + hasBadge: true, + isEnable: !shouldEnable, + imgColor: Color(0xff28323A), + isPngImage: appoButtonsList[index].icon!.contains(".png") ? true : false, + ), + ); + }, + itemCount: appoButtonsList.length, + ); + } + + _handleButtonClicks(AppoDetailsButton, ToDoCountProviderModel model) { + switch (AppoDetailsButton.caller) { + case "openReschedule": + widget.tabController.animateTo((widget.tabController.index + 1) % 2); + setState(() { + widget.enableFooterButton(); + }); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'reschedule appointment'); + break; + case "navigateToProject": + openMap(double.parse(widget.appo.latitude!), double.parse(widget.appo.longitude!)); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'hospital location'); + break; + case "addReminder": + GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE = 'my appointment'; + showReminderDialog( + context, + DateFormat("dd MMM yyyy hh:mm") + .parse(DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.appo.appointmentDate!), widget.projectViewModel!.isArabic) + " " + widget.appo.startTime!), + //DateUtil.convertStringToDate(widget.appo.appointmentDate), + widget.appo.doctorNameObj!, + widget.appo.appointmentNo.toString(), + DateUtil.formatDateToDate(DateUtil.convertStringToDate(widget.appo.appointmentDate!), widget.projectViewModel!.isArabic), + // DateUtil.formatDateToTime(DateUtil.convertStringToDate(widget.appo.appointmentDate)), + widget.appo.startTime!, + onSuccess: () { + AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); + }, + ); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'add reminder'); + break; + case "goToTodoList": + // Navigator.of(context).pop(); + navigateToToDoPage(context, model); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'todo list'); + break; + case "askDoc": + askYourDoc(); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'ask doctor'); + break; + case "radiology": + openAppointmentRadiology(); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'radiology'); + break; + case "labResult": + openAppointmentLabResults(); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'lab result'); + break; + case "prescriptions": + openPrescriptionReport(); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'prescriptions'); + break; + case "Survey": + rateAppointment(); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'survey'); + break; + case "Insurance": + navigateToInsuranceApprovals(widget.appo.appointmentNo!); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'insurance'); + break; + + case "VitalSigns": + navigateToVitalSigns(widget.appo.appointmentNo!, widget.appo.projectID!); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'vital sign'); + break; + + case "insertComplaint": + navigateToInsertComplaint(); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'raise complaint'); + break; + + case "goToNavigation": + initPenguinSDK(); + locator().appointment.appointment_detail_action(appointment: widget.appo, action: 'navigate to clinic'); + break; + } + } + + initPenguinSDK() async { + NavigationClinicDetails data = NavigationClinicDetails(); + data.clinicId = widget.appo.clinicID.toString(); + // data.clinicId = "49"; + data.patientId = widget.appo.patientID.toString(); + data.projectId = widget.appo.projectID.toString(); + final bool permited = await AppPermission.askPenguinPermissions(); + if (!permited) { + Map statuses = await [ + Permission.location, + Permission.bluetooth, + Permission.bluetoothConnect, + Permission.bluetoothScan, + Permission.activityRecognition, + ].request().whenComplete(() { + PenguinMethodChannel().launch("penguin", widget.projectViewModel!.isArabic ? "ar" : "en", widget.projectViewModel!.authenticatedUserObject.user.patientID.toString(), details: data); + }); + } + } + + _getAppointmentActionButtons() { + if (widget.appo != null) { + if (isConfirmed()) { + if (widget.appo.isOnlineCheckedIN!) { + _getConfirmedCheckInAppoActionsList(); + } else { + _getConfirmedAppoActionsList(); + } + } else { + print("isConfirmed Null"); + } + if (isBooked()) { + if (widget.appo.isOnlineCheckedIN!) { + _getBookedCheckInAppoActionsList(); + } else { + _getBookedAppoActionsList(); + } + } else { + print("isBooked Null"); + } + if (isArrived()) { + if (widget.appo.clinicID == 17) { + _getArrivedInvoiceAppoActionsList(); + } else { + _getArrivedAppoActionsList(); + } + } else { + print("isArrived Null"); + } + } else { + print("Appo Null"); + } + } + + bool isConfirmed() { + return AppointmentType.isConfirmed(widget.appo); + } + + bool isArrived() { + return AppointmentType.isArrived(widget.appo); + } + + bool isCheckedIn() { + return widget.appo.isOnlineCheckedIN!; + } + + bool isBooked() { + return AppointmentType.isBooked(widget.appo); + } + + Future?>? _getBookedAppoActionsList() async { + print("_getBookedAppoActionsList"); + BookedButtons bookedButtons = new BookedButtons(); + print(bookedButtons.buttons); + List buttonsList = []; + for (var i = 0; i < bookedButtons.buttons.length; i++) { + buttonsList.add(AppoDetailsButton( + title: bookedButtons.buttons[i]['title'], + subtitle: bookedButtons.buttons[i]['subtitle'], + icon: bookedButtons.buttons[i]['icon'], + caller: bookedButtons.buttons[i]['caller'], + )); + } + setState(() { + appoButtonsList = buttonsList; + }); + } + + Future?>? _getBookedCheckInAppoActionsList() async { + print("_getBookedCheckInAppoActionsList"); + BookedButtonsAllowCheckIn bookedButtonsAllowCheckIn = new BookedButtonsAllowCheckIn(); + print(bookedButtonsAllowCheckIn.buttons); + List buttonsList = []; + for (var i = 0; i < bookedButtonsAllowCheckIn.buttons.length; i++) { + buttonsList.add(AppoDetailsButton( + title: bookedButtonsAllowCheckIn.buttons[i]['title'], + subtitle: bookedButtonsAllowCheckIn.buttons[i]['subtitle'], + icon: bookedButtonsAllowCheckIn.buttons[i]['icon'], + caller: bookedButtonsAllowCheckIn.buttons[i]['caller'], + )); + } + setState(() { + appoButtonsList = buttonsList; + }); + } + + Future?> _getConfirmedAppoActionsList() async { + print("_getConfirmedAppoActionsList"); + ConfirmedButtons confirmedButtons = new ConfirmedButtons(); + print(confirmedButtons.buttons); + List buttonsList = []; + for (var i = 0; i < confirmedButtons.buttons.length; i++) { + buttonsList.add(AppoDetailsButton( + title: confirmedButtons.buttons[i]['title'], + subtitle: confirmedButtons.buttons[i]['subtitle'], + icon: confirmedButtons.buttons[i]['icon'], + caller: confirmedButtons.buttons[i]['caller'], + )); + } + setState(() { + appoButtonsList = buttonsList; + }); + } + + Future?> _getConfirmedCheckInAppoActionsList() async { + print("_getConfirmedAllowCheckInAppoActionsList"); + ConfirmedButtonsAllowCheckIn confirmedButtonsAllowCheckIn = new ConfirmedButtonsAllowCheckIn(); + print(confirmedButtonsAllowCheckIn.buttons); + List buttonsList = []; + for (var i = 0; i < confirmedButtonsAllowCheckIn.buttons.length; i++) { + buttonsList.add(AppoDetailsButton( + title: confirmedButtonsAllowCheckIn.buttons[i]['title'], + subtitle: confirmedButtonsAllowCheckIn.buttons[i]['subtitle'], + icon: confirmedButtonsAllowCheckIn.buttons[i]['icon'], + caller: confirmedButtonsAllowCheckIn.buttons[i]['caller'], + )); + } + setState(() { + appoButtonsList = buttonsList; + }); + } + + Future?> _getArrivedAppoActionsList() async { + print("_getArrivedAppoActionsList"); + ArrivedButtons arrivedButtons = new ArrivedButtons(); + print(arrivedButtons.buttons); + List buttonsList = []; + for (var i = 0; i < arrivedButtons.buttons.length; i++) { + buttonsList.add(AppoDetailsButton( + title: arrivedButtons.buttons[i]['title'], + subtitle: arrivedButtons.buttons[i]['subtitle'], + icon: arrivedButtons.buttons[i]['icon'], + caller: arrivedButtons.buttons[i]['caller'], + )); + } + setState(() { + appoButtonsList = buttonsList; + }); + } + + Future?> _getArrivedInvoiceAppoActionsList() async { + print("_getArrivedInvoiceAppoActionsList"); + ArrivedButtons arrivedButtons = new ArrivedButtons(); + List buttonsList = []; + for (var i = 0; i < arrivedButtons.buttons.length; i++) { + buttonsList.add(AppoDetailsButton( + title: arrivedButtons.buttons[i]['title'], + subtitle: arrivedButtons.buttons[i]['subtitle'], + icon: arrivedButtons.buttons[i]['icon'], + caller: arrivedButtons.buttons[i]['caller'], + )); + } + setState(() { + appoButtonsList = buttonsList; + }); + } + + // cancelAppointment() { + // ConfirmDialog.closeAlertDialog(context); + // GifLoaderDialogUtils.showMyDialog(context); + // DoctorsListService service = new DoctorsListService(); + // service.cancelAppointment(widget.appo, context).then((res) { + // GifLoaderDialogUtils.hideDialog(context); + // print(res); + // if (res['MessageStatus'] == 1) { + // getToDoCount(); + // AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); + // Navigator.of(context).pop(); + // } else { + // AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + // } + // }).catchError((err) { + // GifLoaderDialogUtils.hideDialog(context); + // print(err); + // }); + // } + + // getToDoCount() { + // toDoProvider.setState(0, true); + // ClinicListService service = new ClinicListService(); + // service.getActiveAppointmentNo(context).then((res) { + // print(res['AppointmentActiveNumber']); + // if (res['MessageStatus'] == 1) { + // toDoProvider.setState(res['AppointmentActiveNumber'], true); + // } else {} + // }).catchError((err) { + // print(err); + // }); + // } + + openAppointmentLabResults() { + int languageID = widget.projectViewModel!.isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + PatientLabOrders patientLabOrders = new PatientLabOrders(); + service.getPatientLabOrdersByAppoNo(widget.appo.appointmentNo, widget.appo.projectID, widget.appo.clinicID, languageID, context).then((res) { + print(res['ListLabResultsByAppNo']); + GifLoaderDialogUtils.hideDialog(context); + if (res['ListLabResultsByAppNo'] != null) { + patientLabOrders.orderNo = res['ListLabResultsByAppNo'][0]['OrderNo'].toString(); + patientLabOrders.invoiceNo = res['ListLabResultsByAppNo'][0]['InvoiceNo'].toString(); + patientLabOrders.invoiceType = res['ListLabResultsByAppNo'][0]['InvoiceType'].toString(); + patientLabOrders.clinicID = widget.appo.clinicID; + patientLabOrders.clinicDescription = widget.appo.clinicName; + patientLabOrders.projectID = widget.appo.projectID.toString(); + patientLabOrders.doctorName = widget.appo.doctorNameObj; + patientLabOrders.doctorImageURL = widget.appo.doctorImageURL; + patientLabOrders.speciality = widget.appo.doctorSpeciality; + patientLabOrders.projectName = widget.appo.projectName; + patientLabOrders.orderDate = DateUtil.convertStringToDate(widget.appo.appointmentDate!); + patientLabOrders.doctorRate = widget.appo.doctorRate; + patientLabOrders.actualDoctorRate = widget.appo.actualDoctorRate; + patientLabOrders.noOfPatientsRate = widget.appo.noOfPatientsRate; + + print(patientLabOrders.invoiceNo); + print(patientLabOrders.orderNo); + navigateToLabResults(patientLabOrders); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); + } + + openAppointmentRadiology() { + int languageID = widget.projectViewModel!.isArabic! ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + FinalRadiology finalRadiology = new FinalRadiology(); + service.getPatientRadOrders(widget.appo.appointmentNo.toString(), widget.appo.projectID, languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['FinalRadiologyList'] != null) { + print(res['FinalRadiologyList']); + finalRadiology = new FinalRadiology.fromJson(res['FinalRadiologyList'][0]); + print(finalRadiology.reportData); + navigateToRadiologyDetails(finalRadiology); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).noResultFound); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: TranslationBase.of(context).noResultFound, localContext: context); + }); + } + + openPrescriptionReport() { + Prescriptions prescriptions = new Prescriptions(); + + prescriptions.doctorName = widget.appo.doctorNameObj; + prescriptions.appointmentNo = widget.appo.appointmentNo; + prescriptions.clinicID = widget.appo.clinicID; + prescriptions.projectID = widget.appo.projectID; + prescriptions.doctorImageURL = widget.appo.doctorImageURL; + prescriptions.speciality = widget.appo.doctorSpeciality; + prescriptions.name = widget.appo.projectName; + prescriptions.episodeID = widget.appo.episodeID; + prescriptions.setupID = widget.appo.setupID; + prescriptions.appointmentDate = widget.appo.appointmentDate; + prescriptions.nationalityFlagURL = "https://hmgwebservices.com/Images/flag/SAU.png"; + prescriptions.doctorRate = widget.appo.doctorRate; + prescriptions.actualDoctorRate = widget.appo.actualDoctorRate; + prescriptions.noOfPatientsRate = widget.appo.noOfPatientsRate; + prescriptions.isInOutPatient = widget.appo.isInOutPatient; + prescriptions.doctorID = widget.appo.doctorID; + + navigateToMedicinePrescriptionReport(prescriptions); + } + + Future navigateToMedicinePrescriptionReport(Prescriptions prescriptions) async { + Navigator.push(context, FadePage(page: PrescriptionItemsPage(prescriptions: prescriptions))); + } + + Future navigateToLabResults(PatientLabOrders patientLabOrders) async { + Navigator.push(context, FadePage(page: LaboratoryResultPage(patientLabOrders: patientLabOrders))).then((value) {}); + } + + Future navigateToRadiologyDetails(FinalRadiology finalRadiology) async { + Navigator.push(context, FadePage(page: RadiologyDetailsPage(finalRadiology: finalRadiology))).then((value) {}); + } + + static Future openMap(double latitude, double longitude) async { + await MapLauncher.showMarker( + mapType: Platform.isAndroid + ? isHuawei == true + ? MapType.petal + : MapType.google + : MapType.apple, + coords: Coords(latitude, longitude), + title: "Sulaiman Al Habib", + description: "Appointment Location", + ); + } + + checkIsHuawei() async { + if (Platform.isAndroid) { + await hmsApiAvailability.isHMSAvailable().then((value) { + isHuawei = value == 0 ? true : false; + hmsMap.HuaweiMapInitializer.initializeMap(); + }); + print(isHuawei); + } + } + + askYourDoc() { + GifLoaderDialogUtils.showMyDialog(context); + int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2; + + DoctorsListService service = new DoctorsListService(); + service.isAllowedToAskDoctor(widget.appo.doctorID!, languageID, context).then((res) { + int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2; + service.isAllowedToAskDoctor(widget.appo.doctorID, languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res['PatientDoctorAppointmentResultList']); + if (res['PatientDoctorAppointmentResultList'].length != 0) { + getCallRequestType(); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).askDocNotAllowed, localContext: context); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); + }); + } + + getCallRequestType() { + int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getCallRequestType(languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + List requestData = []; + res['ListReqTypes'].forEach((element) { + requestData.add(new AskDocRequestType.fromJson(element)); + }); + Future.delayed(const Duration(milliseconds: 400), () { + showAskDocRequestDialog(requestData); + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + showAskDocRequestDialog(List requestData) { + showGeneralDialog( + barrierColor: Colors.black.withOpacity(0.5), + transitionBuilder: (context, a1, a2, widget) { + final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0; + return Transform( + transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), + child: Opacity( + opacity: a1.value, + child: AskDocDialog(requestData: requestData), + ), + ); + }, + transitionDuration: Duration(milliseconds: 500), + barrierDismissible: true, + barrierLabel: '', + context: context, + pageBuilder: (context, animation1, animation2) => SizedBox()).then((value) { + print("Dialog Closed"); + print(value); + if (value != null) { + sendAskDocRequest(value as int); + } + }); + } + + sendAskDocRequest(int requestType) { + int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + + service.sendAskDocCallRequest(widget.appo, requestType.toString(), languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: "Request Sent Successfully"); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); + } + + // confirmAppointment() { + // GifLoaderDialogUtils.showMyDialog(context); + // DoctorsListService service = new DoctorsListService(); + // service.confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID, widget.appo.projectID, widget.appo.isLiveCareAppointment, context).then((res) { + // GifLoaderDialogUtils.hideDialog(context); + // if (res['MessageStatus'] == 1) { + // AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); + // Navigator.of(context).pop(); + // } else { + // AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + // } + // }).catchError((err) { + // GifLoaderDialogUtils.hideDialog(context); + // print(err); + // }); + // } + + navigateToInsuranceApprovals(int appoNo) { + Navigator.push(context, FadePage(page: InsuranceApproval(appointmentNo: appoNo))); + } + + navigateToVitalSigns(int appoNo, int projectID) { + Navigator.push( + context, + FadePage( + page: VitalSignDetailsScreen( + appointmentNo: appoNo, + projectID: projectID, + isNotOneAppointment: false, + ))); + } + + navigateToInsertComplaint() { + Navigator.push( + context, + FadePage( + page: FeedbackHomePage( + messageType: MessageType.ComplaintOnAnAppointment, + appointment: widget.appo, + ))); + } + + navigateToToDoPage(BuildContext context, ToDoCountProviderModel model) { + if (widget.projectViewModel!.isLogin) { + // if (model.count != 0) { + getPatientAppointmentHistoryWithAppo(); + } + // else { + // AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty); + // } + else { + Navigator.push( + context, + FadePage( + page: ToDo( + isShowAppBar: true, + isFromMyAppointments: true, + appointment: widget.appo, + ))); + } + } + + getPatientAppointmentHistoryWithAppo() { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2; + service.getPatientAppointmentHistoryWithAppoNo(widget.appo.appointmentNo, languageID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList.fromJson(res['AppoimentAllHistoryResultList'][0]); + Navigator.push( + context, + FadePage( + page: ToDo( + isShowAppBar: true, + isFromMyAppointments: true, + appointment: appo, + ), + ), + ); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + err != null ?? AppToast.showErrorToast(message: err); + }); + } + + rateAppointment() { + widget.browser = new MyInAppBrowser(onExitCallback: () {}); + var url = 'http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1'; + print(url); + launch(url); + } +} diff --git a/lib/pages/MyAppointments/widgets/AppointmentCardView.dart b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart new file mode 100644 index 00000000..aec449b1 --- /dev/null +++ b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart @@ -0,0 +1,267 @@ +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_countdown_timer/countdown_timer_controller.dart'; +import 'package:flutter_countdown_timer/current_remaining_time.dart'; +import 'package:flutter_countdown_timer/flutter_countdown_timer.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:provider/provider.dart'; + +import '../AppointmentDetails.dart'; + +class AppointmentCard extends StatefulWidget { + AppoitmentAllHistoryResultList appo; + final Function onReloadAppointmentHistory; + + AppointmentCard( + {required this.appo, required this.onReloadAppointmentHistory}); + + @override + _ApointmentCardState createState() => _ApointmentCardState(); +} + +class _ApointmentCardState extends State { + CountdownTimerController? controller; + + @override + void initState() { + super.initState(); + int endTime = DateTime.now().millisecondsSinceEpoch + 1000 * 30; + controller = CountdownTimerController( + endTime: endTime, + ); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return InkWell( + onTap: () { + navigateToAppointmentDetails(context, widget.appo); + }, + child: 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: [ + Container( + width: projectViewModel.isArabic ? 27 : 20, + height: projectViewModel.isArabic ? 165 : 140, + decoration: BoxDecoration( + //Colors.red[900] Color(0xff404545) + color: widget.appo.isLiveCareAppointment! + ? Color(0xff404545) + : !widget.appo.isInOutPatient! + ? Colors.red[900] + : Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topLeft: projectViewModel.isArabic + ? Radius.circular(0) + : Radius.circular(8), + bottomLeft: projectViewModel.isArabic + ? Radius.circular(0) + : Radius.circular(8), + topRight: projectViewModel.isArabic + ? Radius.circular(8) + : Radius.circular(0), + bottomRight: projectViewModel.isArabic + ? Radius.circular(8) + : Radius.circular(0), + ), + ), + child: RotatedBox( + quarterTurns: 3, + child: Center( + child: Text( + widget.appo.isLiveCareAppointment! + ? TranslationBase.of(context).liveCare.toUpperCase() + : !widget.appo.isInOutPatient! + ? TranslationBase.of(context) + .inPatient + .toUpperCase() + : TranslationBase.of(context) + .outpatient + .toUpperCase(), + style: TextStyle(color: Colors.white), + ), + )), + ), + SizedBox( + width: 8, + ), + ClipRRect( + borderRadius: BorderRadius.circular(100.0), + child: Image.network(widget.appo.doctorImageURL!, + fit: BoxFit.fill, height: 60.0, width: 60.0), + ), + Expanded( + child: Container( + width: MediaQuery.of(context).size.width * 0.61, + margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + widget.appo.doctorTitle! + + " " + + widget.appo.doctorNameObj!, + style: TextStyle( + fontSize: 14.0, + color: Colors.grey[700], + letterSpacing: 1.0)), + Container( + margin: EdgeInsets.only(top: 3.0), + child: Text(widget.appo.clinicName!, + style: TextStyle( + fontSize: 12.0, + color: Colors.grey[600], + letterSpacing: 1.0)), + ), + Container( + margin: EdgeInsets.only(top: 3.0), + child: Text(widget.appo.projectName!, + style: TextStyle( + fontSize: 12.0, + color: Colors.grey[600], + letterSpacing: 1.0)), + ), + Container( + margin: EdgeInsets.only(top: 3.0, bottom: 3.0), + child: Text( + DateUtil.getWeekDayMonthDayYearDateFormatted( + DateUtil.convertStringToDate( + widget.appo.appointmentDate!), + projectViewModel.isArabic ? "ar" : "en") + .trim(), + style: TextStyle( + fontSize: 12.0, + color: Colors.grey[600], + letterSpacing: 1.0)), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisSize: MainAxisSize.max, + children: [ + // RatingBar.readOnly( + // initialRating: + // widget.appo.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, + // ), + RatingBar( + initialRating: widget.appo.actualDoctorRate!.toDouble(), + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon(Icons.star, color: CustomColors.accentColor,), + half: Icon(Icons.star_half, color: CustomColors.accentColor,), + empty: Icon(Icons.star, color: CustomColors.accentColor,), + ), + tapOnlyMode: true, + unratedColor: Colors.grey[500], + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + ), + Container( + transform: + Matrix4.translationValues(15.0, -40.0, 0.0), + child: projectViewModel.isArabic + ? Image.asset( + "assets/images/new-design/arrow_menu_black-ar.png", + width: 25.0, + height: 25.0) + : Image.asset( + "assets/images/new-design/arrow_menu_black-en.png", + width: 25.0, + height: 25.0), + ), + ], + ), + (widget.appo.patientStatusType == + AppointmentType.BOOKED || + widget.appo.patientStatusType == + AppointmentType.CONFIRMED) + ? Container( + child: CountdownTimer( + controller: new CountdownTimerController( + endTime: DateTime.now() + .millisecondsSinceEpoch + + (widget.appo.remaniningHoursTocanPay! * + 1000) * + 60), + widgetBuilder: (_, CurrentRemainingTime? time) { + return time != null + ? Text( + '${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours : "0"}:${time.min}:${time.sec} ' + + TranslationBase.of(context) + .upcomingTimeLeft, + style: TextStyle( + fontSize: 12.0, + color: Color(0xff40ACC9))) + : Container(); + }, + ), + ) + : Container(), + ], + ), + ), + ), + ], + ), + ), + ), + ); + } + + String getDate(String date) { + DateTime dateObj = DateUtil.convertStringToDate(date); + return DateUtil.getWeekDay(dateObj.weekday) + + ", " + + dateObj.day.toString() + + " " + + DateUtil.getMonth(dateObj.month) + + " " + + dateObj.year.toString(); + } + + String getDoctorSpeciality(List docSpecial) { + String docSpeciality = ""; + docSpecial.forEach((v) { + docSpeciality = docSpeciality + v + "\n"; + }); + return docSpeciality; + } + + Future navigateToAppointmentDetails(context, appo) async { + GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE = 'my appointment'; + Navigator.push(context, FadePage(page: AppointmentDetails(appo: appo))) + .then((value) { + widget.onReloadAppointmentHistory(); + }); + } +} diff --git a/lib/pages/MyAppointments/widgets/PrescriptionReport.dart b/lib/pages/MyAppointments/widgets/PrescriptionReport.dart new file mode 100644 index 00000000..9f9588c1 --- /dev/null +++ b/lib/pages/MyAppointments/widgets/PrescriptionReport.dart @@ -0,0 +1,154 @@ +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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:provider/provider.dart'; + +class PrescriptionReportPage extends StatefulWidget { + List prescriptionReportEnhList; + dynamic listPres; + AppoitmentAllHistoryResultList appo; + + PrescriptionReportPage({required this.prescriptionReportEnhList, required this.listPres, required this.appo}); + + @override + _PrescriptionReportState createState() => _PrescriptionReportState(); +} + +class _PrescriptionReportState extends State { + ProjectViewModel? projectViewModel; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + appBarTitle: 'Items', + body: Container( + height: MediaQuery.of(context).size.height * 0.8, + child: ListView.builder( + itemBuilder: (context, index) => InkWell( + onTap: () { + navigateToPrescriptionDetails(widget.prescriptionReportEnhList[index]); + }, + child: Container( + width: double.infinity, + margin: EdgeInsets.only(top: 10, left: 10, right: 10), + padding: EdgeInsets.all(8.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: Border.all(color: Colors.grey[200]!, width: 0.5), + ), + child: Row( + children: [ + ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(5)), + child: Image.network( + widget.prescriptionReportEnhList[index]!.imageSRCUrl!, + fit: BoxFit.cover, + width: 60, + height: 70, + ), + ), + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center(child: Texts(widget.prescriptionReportEnhList[index].itemDescription)), + )), + Icon( + Icons.arrow_forward, + size: 18, + color: Colors.grey[500], + ) + ], + ), + ), + ), + itemCount: widget.prescriptionReportEnhList.length, + ), + ), + bottomSheet: Container( + width: double.infinity, + height: MediaQuery.of(context).size.height * 0.2, + color: Colors.grey[100], + child: Column( + children: [ + Divider(), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Button( + label: 'Send Copy', + onTap: () { + sendPrescriptionReportEmail(true); + }, + ), + ), + Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Button( + label: 'Resend order & deliver', + backgroundColor: Colors.green[200], + )) + ], + ), + ), + ); + } + + sendPrescriptionReportEmail(bool isDownload) { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.sendPrescriptionEmail(widget.appo.appointmentDate!, widget.appo.setupID!, projectViewModel!.isArabic ? 1 : 2, widget.listPres, isDownload, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showSuccessToast(message: 'A copy has been sent to the e-mail'); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); + } + + navigateToPrescriptionDetails(PrescriptionReportEnh prescriptionReportEnh) { + final PrescriptionReport prescriptionReport = new PrescriptionReport(); + + prescriptionReport.imageSRCUrl = prescriptionReportEnh.imageSRCUrl; + prescriptionReport.itemDescription = prescriptionReportEnh.itemDescription; + prescriptionReport.itemID = prescriptionReportEnh.itemID; + + prescriptionReport.routeN = prescriptionReportEnh.route; + prescriptionReport.route = prescriptionReportEnh.route; + + prescriptionReport.frequency = prescriptionReportEnh.frequency; + prescriptionReport.frequencyN = prescriptionReportEnh.frequency; + + prescriptionReport.doseDailyQuantity = prescriptionReportEnh.doseDailyQuantity; + + prescriptionReport.days = prescriptionReportEnh.days; + + Navigator.push( + context, + FadePage( + page: PrescriptionDetailsPage( + prescriptionReport: prescriptionReport, + ), + ), + ); + } +} diff --git a/lib/pages/MyAppointments/widgets/askDocDialog.dart b/lib/pages/MyAppointments/widgets/askDocDialog.dart new file mode 100644 index 00000000..d341dadf --- /dev/null +++ b/lib/pages/MyAppointments/widgets/askDocDialog.dart @@ -0,0 +1,71 @@ +import 'package:diplomaticquarterapp/pages/MyAppointments/models/AskDocRequestTypeModel.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:flutter/material.dart'; + +import 'custom_radio.dart'; + +class AskDocDialog extends StatefulWidget { + List requestData; + + static int selectedParameterCode = 0; + + AskDocDialog({required this.requestData}); + + @override + _AskDocDialogState createState() => _AskDocDialogState(); +} + +class _AskDocDialogState extends State { + @override + Widget build(BuildContext context) { + return Container( + child: Dialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), + child: Container( + height: MediaQuery.of(context).size.height * 0.77, + width: 450.0, + child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.max, children: [ + Container( + margin: EdgeInsets.all(20.0), + child: Text(TranslationBase.of(context).requestType, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold, fontFamily: "Open-Sans-Bold")), + ), + Container( + transform: Matrix4.translationValues(0.0, -30.0, 0.0), + child: CustomRadio(requestData: widget.requestData), + ), + Container( + width: MediaQuery.of(context).size.width, + height: 40.0, + margin: EdgeInsets.only(left: 30.0, top: 0.0, right: 30.0), + child: CustomTextButton( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0), side: BorderSide(color: Colors.blue)), + backgroundColor: Colors.blue, + elevation: 0, + onPressed: () { + if (AskDocDialog.selectedParameterCode != 0) + Navigator.pop(context, AskDocDialog.selectedParameterCode); + else + AppToast.showErrorToast(message: "Please select request type to continue"); + }, + child: Text(TranslationBase.of(context).confirm, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontFamily: 'Open-Sans-Bold')), + ), + ), + Container( + width: MediaQuery.of(context).size.width, + margin: EdgeInsets.only(left: 100.0, top: 20.0, right: 100.0), + child: DefaultButton( + TranslationBase.of(context).cancel_nocaps, + () { + Navigator.pop(context, null); + }, + ), + ), + ]), + ), + ), + ); + } +} diff --git a/lib/pages/MyAppointments/widgets/custom_radio.dart b/lib/pages/MyAppointments/widgets/custom_radio.dart new file mode 100644 index 00000000..3ed0a18a --- /dev/null +++ b/lib/pages/MyAppointments/widgets/custom_radio.dart @@ -0,0 +1,112 @@ +import 'package:diplomaticquarterapp/pages/MyAppointments/models/AskDocRequestTypeModel.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog_prescription.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/material.dart'; + +class CustomRadio extends StatefulWidget { + List? requestData; + + CustomRadio({this.requestData}); + + @override + createState() { + return new CustomRadioState(); + } +} + +class CustomRadioState extends State { + List? sampleData = []; + + @override + void initState() { + super.initState(); + + WidgetsBinding.instance.addPostFrameCallback((_) { + if (widget.requestData != null) { + widget.requestData!.forEach((element) { + sampleData!.add(new RadioModel(false, element.description!, element.parameterCode!)); + }); + } else { + sampleData!.add(new RadioModel(false, TranslationBase.of(context).appoReminder30, 30)); + sampleData!.add(new RadioModel(false, TranslationBase.of(context).appoReminder60, 60)); + sampleData!.add(new RadioModel(false, TranslationBase.of(context).appoReminder90, 90)); + sampleData!.add(new RadioModel(false, TranslationBase.of(context).appoReminder120, 120)); + } + }); + } + + @override + Widget build(BuildContext context) { + return Column( + children: [ + ListView.builder( + shrinkWrap: true, + itemCount: sampleData!.length, + itemBuilder: (BuildContext context, int index) { + return new InkWell( + //highlightColor: Colors.red, + splashColor: Colors.transparent, + onTap: () { + setState(() { + sampleData!.forEach((element) => element.isSelected = false); + sampleData![index].isSelected = true; + if (widget.requestData != null) { + AskDocDialog.selectedParameterCode = sampleData![index].duration; + } else { + ReminderDialog.selectedDuration = sampleData![index].duration * 60000; + PrescriptionReminderDialog.selectedDuration = sampleData![index].duration * 60000; + } + }); + }, + child: new RadioItem(sampleData![index]), + ); + }, + ), + ], + ); + } +} + +class RadioItem extends StatelessWidget { + final RadioModel _item; + + RadioItem(this._item); + + @override + Widget build(BuildContext context) { + return new Container( + margin: new EdgeInsets.all(15.0), + child: new Row( + mainAxisSize: MainAxisSize.max, + children: [ + new Container( + height: 30.0, + width: 30.0, + child: new Center( + child: Image.asset("assets/images/new-design/check_icon.png", width: 15.0, height: 15.0), + ), + decoration: new BoxDecoration( + color: _item.isSelected ? Colors.blue : Colors.transparent, + border: new Border.all(width: 1.0, color: _item.isSelected ? Colors.blue : Colors.grey), + borderRadius: const BorderRadius.all(const Radius.circular(50.0)), + ), + ), + new Container( + margin: new EdgeInsets.only(left: 15.0, right: 15.0), + child: new Text(_item.text, style: TextStyle(fontSize: 16.0)), + ), + ], + ), + ); + } +} + +class RadioModel { + bool isSelected; + final String text; + final int duration; + + RadioModel(this.isSelected, this.text, this.duration); +} diff --git a/lib/pages/MyAppointments/widgets/indicator.dart b/lib/pages/MyAppointments/widgets/indicator.dart new file mode 100644 index 00000000..37cb0fac --- /dev/null +++ b/lib/pages/MyAppointments/widgets/indicator.dart @@ -0,0 +1,48 @@ +import 'package:flutter/material.dart'; + +class PageViewIndicator extends StatelessWidget { + final bool isActive; + final int length; + final double currentPage; + PageViewIndicator({ + required this.isActive, + required this.length, + required this.currentPage, + }); + + @override + Widget build(BuildContext context) { + return _indicator(this.isActive); + } + + Widget _indicator(bool isActive) { + return Positioned( + top: 20, + left: 0, + right: 0, + child: Container( + margin: EdgeInsets.only(top: 0), + child: Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + for (int i = 0; i < length; i++) + if (i == currentPage) ...[circleBar(true)] else circleBar(false), + ], + ), + ), + ); + } + + Widget circleBar(bool isActive) { + return AnimatedContainer( + duration: Duration(milliseconds: 150), + margin: EdgeInsets.symmetric(horizontal: 4), + height: isActive ? 12 : 12, + width: isActive ? 12 : 12, + decoration: BoxDecoration( + color: isActive ? Color(0xffD02127) : Color(0xffD0D0D0), + borderRadius: BorderRadius.all(Radius.circular(12))), + ); + } +} diff --git a/lib/pages/MyAppointments/widgets/reminder_dialog.dart b/lib/pages/MyAppointments/widgets/reminder_dialog.dart new file mode 100644 index 00000000..f7cfe802 --- /dev/null +++ b/lib/pages/MyAppointments/widgets/reminder_dialog.dart @@ -0,0 +1,110 @@ +import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/custom_radio.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:flutter/material.dart'; +import 'package:manage_calendar_events/manage_calendar_events.dart'; + +class ReminderDialog extends StatefulWidget { + static var selectedDuration; + + final String eventId; + final String title; + final String description; + final String startDate; + final String endDate; + final String location; + + ReminderDialog({required this.eventId, required this.title, required this.description, required this.startDate, required this.endDate, required this.location}); + + @override + _ReminderDialogState createState() => _ReminderDialogState(); +} + +class _ReminderDialogState extends State { + final CalendarPlugin _myPlugin = CalendarPlugin(); + + @override + Widget build(BuildContext context) { + return Container( + child: Dialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), + child: Container( + // height: MediaQuery.of(context).size.height * 0.57, + width: 450.0, + child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ + Container( + margin: EdgeInsets.all(20.0), + child: Text(TranslationBase.of(context).setReminder, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + Container( + transform: Matrix4.translationValues(0.0, -30.0, 0.0), + child: CustomRadio(), + ), + Container( + width: MediaQuery.of(context).size.width, + height: 40.0, + margin: EdgeInsets.only(left: 30.0, top: 0.0, right: 30.0), + child: CustomTextButton( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0), side: BorderSide(color: Colors.blue)), + backgroundColor: Colors.blue, + elevation: 0, + onPressed: () { + print(ReminderDialog.selectedDuration); + createCalendarEvent(); + }, + child: Text(TranslationBase.of(context).confirm, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)), + ), + ), + Container( + width: MediaQuery.of(context).size.width, + margin: EdgeInsets.only(left: 100.0, top: 20.0, right: 100.0, bottom: 20.0), + child: DefaultButton( + TranslationBase.of(context).cancel_nocaps, + () { + Navigator.of(context).pop(); + }, + ), + ), + ]), + ), + ), + ); + } + + createCalendarEvent() { + _myPlugin.hasPermissions().then((value) { + if (!value!) { + _myPlugin.requestPermissions(); + } else { + _myPlugin.getCalendars().then((value) => {print(value!.length)}); + } + }); + + CalendarEvent calendarEvent = new CalendarEvent( + eventId: widget.eventId, + title: widget.title, + description: widget.description, + startDate: DateUtil.convertStringToDate(widget.startDate).subtract(new Duration(microseconds: ReminderDialog.selectedDuration)), + endDate: DateUtil.convertStringToDate(widget.endDate), + location: widget.location, + duration: new Duration(minutes: 15).inMinutes, + isAllDay: false, + hasAlarm: true); + + _myPlugin.createEvent(calendarId: "207749556", event: calendarEvent).then((value) { + print("Cal event"); + print(value); + if (int.parse(value!) == int.parse(widget.eventId)) { + AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); + } + Navigator.of(context).pop(); + }).catchError((err) { + print("Cal Error"); + print(err); + Navigator.of(context).pop(); + }); + } +} diff --git a/lib/pages/MyAppointments/widgets/reminder_dialog_prescription.dart b/lib/pages/MyAppointments/widgets/reminder_dialog_prescription.dart new file mode 100644 index 00000000..fb11338d --- /dev/null +++ b/lib/pages/MyAppointments/widgets/reminder_dialog_prescription.dart @@ -0,0 +1,120 @@ +import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/custom_radio.dart'; +import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:flutter/material.dart'; + +class PrescriptionReminderDialog extends StatefulWidget { + static var selectedDuration; + + final String eventId; + final String title; + final String description; + final DateTime startDate; + final DateTime endDate; + final String location; + final int days; + + List _scheduleList =[]; + + PrescriptionReminderDialog({ + required this.eventId, + required this.title, + required this.description, + required this.startDate, + required this.endDate, + required this.location, + required this.days, + }); + + @override + _ReminderDialogState createState() => _ReminderDialogState(); +} + +class _ReminderDialogState extends State { + @override + Widget build(BuildContext context) { + return Container( + child: Dialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), + child: Container( + // height: MediaQuery.of(context).size.height * 0.57, + width: 450.0, + child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ + Container( + margin: EdgeInsets.all(20.0), + child: Text(TranslationBase.of(context).setReminder, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + Container( + transform: Matrix4.translationValues(0.0, -30.0, 0.0), + child: CustomRadio(), + ), + Container( + width: MediaQuery.of(context).size.width, + height: 40.0, + margin: EdgeInsets.only(left: 30.0, top: 0.0, right: 30.0), + child: CustomTextButton( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0), side: BorderSide(color: Colors.blue)), + backgroundColor: Colors.blue, + elevation: 0, + onPressed: () { + createOrUpdateEvents(); + }, + child: Text(TranslationBase.of(context).confirm, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)), + ), + ), + Container( + width: MediaQuery.of(context).size.width, + margin: EdgeInsets.only(left: 100.0, top: 20.0, right: 100.0, bottom: 20.0), + child: DefaultButton( + TranslationBase.of(context).cancel_nocaps, + () { + Navigator.of(context).pop(); + }, + ), + // OutlineButton( + // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)), + // color: Colors.red, + // borderSide: BorderSide(color: Colors.red), + // highlightColor: Colors.red, + // highlightedBorderColor: Colors.red, + // onPressed: () { + // Navigator.of(context).pop(); + // }, + // child: Text(TranslationBase.of(context).cancel_nocaps, style: TextStyle(color: Colors.red, fontWeight: FontWeight.bold)), + // ), + ), + ]), + ), + ), + ); + } + + createOrUpdateEvents() async { + Navigator.pop(context); + + for (int count = 0; count < widget.days; count++) { + widget._scheduleList.add(DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day)); + } + + List scheduleDateTime = calculateDaysInterval(widget.startDate.subtract(new Duration(microseconds: PrescriptionReminderDialog.selectedDuration)), widget.endDate); + + CalendarUtils calendarUtils = await CalendarUtils.getInstance(); + + calendarUtils.createOrUpdateEvents(scheduleList: widget._scheduleList, description: widget.description, title: widget.title, scheduleDateTime: scheduleDateTime); + + AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); + } + + List calculateDaysInterval(DateTime startDate, DateTime endDate) { + List days = []; + for (int i = 0; i <= endDate.difference(startDate).inDays; i++) { + widget._scheduleList.forEach((element) { + days.add(startDate.add(Duration(days: i, hours: element.hour, minutes: element.minute))); + }); + } + return days; + } +} diff --git a/lib/pages/TestPage.dart b/lib/pages/TestPage.dart new file mode 100644 index 00000000..5c787014 --- /dev/null +++ b/lib/pages/TestPage.dart @@ -0,0 +1,41 @@ +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:flutter/cupertino.dart'; + +class TestPage extends StatefulWidget{ + @override + State createState() => TestPageState(); + +} + +class TestPageState extends State{ + bool isGMS = false; + bool isHMS = false; + + @override + void initState() { + super.initState(); + // openStore(); + location(); + } + + + + openStore() async{ + openAppStore(androidPackageName: "com.ejada.hmg", iOSAppID: "733503978"); + } + + void location(){ + LocationUtils(context: context,isShowConfirmDialog: false).getCurrentLocation(callBack: (latLng){ + print(latLng.toString()); + }); + } + + + @override + Widget build(BuildContext context) { + return Container( + ); + } + +} \ No newline at end of file diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart new file mode 100644 index 00000000..c5d99320 --- /dev/null +++ b/lib/pages/ToDoList/ToDo.dart @@ -0,0 +1,1606 @@ +import 'dart:developer'; +import 'dart:io'; + +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/PayfortEnums.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/ApplePayInsertRequest.dart'; +import 'package:diplomaticquarterapp/models/anicllary-orders/ancillary_order_list_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrdersDetails.dart'; +import 'package:diplomaticquarterapp/pages/Blood/blood_donation_appointment_terms_conditions.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_project_details_resp_model.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app-permissions.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/penguin_method_channel.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.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:flutter_countdown_timer/countdown_timer_controller.dart'; +import 'package:flutter_countdown_timer/current_remaining_time.dart'; +import 'package:flutter_countdown_timer/flutter_countdown_timer.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; + +class ToDo extends StatefulWidget { + PatientShareResponse? patientShareResponse; + var languageID; + + // MyInAppBrowser? browser; + bool? isShowAppBar = true; + Function()? onBackClick; + bool? isFromMyAppointments; + AppoitmentAllHistoryResultList? appointment; + + ToDo({required this.isShowAppBar, this.onBackClick, this.isFromMyAppointments = false, this.appointment}); + + @override + _ToDoState createState() => _ToDoState(); +} + +class _ToDoState extends State with SingleTickerProviderStateMixin { + AppSharedPreferences sharedPref = AppSharedPreferences(); + + List imagesInfo = []; + late ToDoCountProviderModel toDoProvider; + late CountdownTimerController controller; + + late ProjectViewModel projectViewModel; + late TabController _tabController; + + String selectedPaymentMethod = ""; + String selectedInstallments = ""; + late String tamaraPaymentStatus; + late String tamaraOrderID; + + bool dataLoaded = false; + + bool isInsured = false; + bool isEligible = false; + bool isCash = false; + MyInAppBrowser? browser; + + List appoList = []; + List ancillaryLists = []; + List obGyneAppoList = []; + String? transID; + + @override + void initState() { + widget.patientShareResponse = new PatientShareResponse(); + _tabController = TabController(length: 2, vsync: this); + WidgetsBinding.instance.addPostFrameCallback((_) { + getPatientAppointmentHistory(); + getAncillaryOrders(); + }); + super.initState(); + imagesInfo + .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/ar/0.png')); + int endTime = DateTime.now().millisecondsSinceEpoch + 1000 * 30; + controller = CountdownTimerController(endTime: endTime); + } + + @override + void dispose() { + super.dispose(); + // getToDoCount(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + toDoProvider = Provider.of(context); + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).todoList, + imagesInfo: imagesInfo, + isShowAppBar: widget.isShowAppBar!, + isShowDecPage: true, + showNewAppBar: true, + showNewAppBarTitle: true, + icon: "assets/images/new/bottom_nav/todo.svg", + description: TranslationBase.of(context).infoTodo, + onTap: widget!.onBackClick, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).appointments), Text(TranslationBase.of(context).orders)], + onTap: (index) { + if (index == 1) { + getOBGyneOrdersList(); + } + }, + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + SingleChildScrollView( + child: Column( + children: [ + Container( + margin: EdgeInsets.only(top: 12), + child: AppExpandableNotifier( + isExpand: true, + hasCounter: true, + counter: appoList.length.toString(), + title: TranslationBase.of(context).appointments, + bodyWidget: appoList.length != 0 + ? ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + padding: EdgeInsets.all(0.0), + itemCount: appoList.length, + itemBuilder: (context, index) { + return Container( + width: double.infinity, + margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0), + decoration: cardRadius(12), + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 2, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(top: 4.0), + child: appoList[index].clinicID == 265 + ? Container( + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: SvgPicture.asset("assets/images/new/CoronaIcon.svg", width: 35.0, height: 35.0), + ) + : appoList[index].isLiveCareAppointment! + ? SvgPicture.asset("assets/images/new/virtual.svg") + : SvgPicture.asset("assets/images/new/hospital-visit.svg"), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: Text( + appoList[index].clinicID == 265 + ? TranslationBase.of(context).covidTestTodo + : appoList[index].isLiveCareAppointment! + ? TranslationBase.of(context).liveCareAppo + : TranslationBase.of(context).walkinAppo, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)), + ), + Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: CountdownTimer( + controller: + new CountdownTimerController(endTime: DateTime.now().millisecondsSinceEpoch + (appoList[index].remaniningHoursTocanPay! * 1000) * 60), + widgetBuilder: (_, CurrentRemainingTime? time) { + return time != null + ? Text( + '${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours : "00"}:${time.min}:${time.sec} \n' + + TranslationBase.of(context).upcomingTimeLeft, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48)) + : Container(); + }, + ), + ), + ], + ), + ], + ), + ), + Expanded( + child: Container( + child: InkWell( + onTap: () { + performNextAction(appoList[index]); + }, + child: Container( + padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), + decoration: BoxDecoration( + color: getNextActionButtonColor(appoList[index].nextAction), + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.circular(6), + ), + child: Text( + getNextActionText(appoList[index].nextAction), + textAlign: TextAlign.center, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4), + ), + ), + ), + ), + ), + ], + ), + Padding( + padding: const EdgeInsets.only(top: 8.0), + child: Text( + appoList[index].doctorTitle! + " " + appoList[index].doctorNameObj!, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + ), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + LargeAvatar( + name: appoList[index].doctorTitle! + " " + appoList[index].doctorNameObj!, + url: appoList[index].doctorImageURL, + width: 52, + height: 52, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + MyRichText(TranslationBase.of(context).clinic + ": ", appoList[index].clinicName!, projectViewModel.isArabic), + // MyRichText(TranslationBase.of(context).appointmentDate + ": ", + // DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + " " + appoList[index].startTime.substring(0, 5), projectViewModel.isArabic), + + // Timezone changes + appoList[index].isLiveCareAppointment! + ? MyRichText( + TranslationBase.of(context).appointmentDate + ": ", + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + + " " + + DateUtil.convertStringToDate(appoList[index].appointmentDate).toString().split(" ")[1].substring(0, 5), + projectViewModel.isArabic) + : MyRichText( + TranslationBase.of(context).appointmentDate + ": ", + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + + " " + + appoList[index].startTime!.substring(0, 5), + projectViewModel.isArabic), + + MyRichText(TranslationBase.of(context).branch, appoList[index].projectName!, projectViewModel.isArabic), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisSize: MainAxisSize.max, + children: [ + RatingBar( + initialRating: appoList[index].actualDoctorRate.toDouble(), + itemSize: 16.0, + glowColor: Color(0XFFD02127), + unratedColor: Color(0XFFD02127), + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + ), + tapOnlyMode: true, + allowHalfRating: true, + onRatingUpdate: (double value) {}, + // : Icons.star_half, + // ic: Icons.star, + // emptyIcon: Icons.star_border, itemBuilder: (BuildContext context, int index) { }, + ), + ], + ), + ], + ), + ), + ], + ), + Padding( + padding: const EdgeInsets.only(top: 12.0), + child: Text( + getNextActionDescription(appoList[index].nextAction), + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 25 / 16), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + InkWell( + onTap: () { + navigateToAppointmentDetails(context, appoList[index]); + }, + child: Padding( + padding: const EdgeInsets.only(top: 0.0), + child: Text( + TranslationBase.of(context).moreDetails, + style: TextStyle( + fontSize: 10, + fontWeight: FontWeight.w600, + color: CustomColors.accentColor, + letterSpacing: -0.48, + height: 25 / 16, + decoration: TextDecoration.underline), + ), + ), + ), + if (projectViewModel.isIndoorNavigationEnabled && projectViewModel.havePrivilege(107) && appoList[index].projectID == 130) + InkWell( + onTap: () { + NavigationClinicDetails data = NavigationClinicDetails(); + data.clinicId = appoList[index].clinicID.toString(); + // data.clinicId = "46"; + data.patientId = appoList[index].patientID.toString(); + data.projectId = appoList[index].projectID.toString(); + initPenguinSDK(data); + }, + child: Column( + children: [ + SvgPicture.asset( + "assets/images/new/Indoor_nav_appo.svg", + ), + Text( + TranslationBase.of(context).clinicLocation, + style: TextStyle( + fontSize: 10, + fontWeight: FontWeight.w600, + color: CustomColors.accentColor, + letterSpacing: -0.48, + height: 25 / 16, + decoration: TextDecoration.underline), + ), + ], + ), + ), + ], + ), + ], + ), + ); + }, + ) + : getNoDataWidget(context), + ), + ), + Container( + margin: EdgeInsets.only(top: 12), + child: AppExpandableNotifier( + isExpand: true, + hasCounter: true, + counter: (ancillaryLists.isNotEmpty) ? ancillaryLists[0].ancillaryOrderList!.length.toString() : "0", + title: TranslationBase.of(context).anicllaryOrders, + bodyWidget: ancillaryLists.length != 0 + ? Container( + padding: EdgeInsets.all(12), + child: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + reverse: true, + itemBuilder: (context, index) { + return DoctorCard( + onTap: () => ancillaryOrdersDetails(ancillaryLists[0].ancillaryOrderList![index], ancillaryLists[0].projectID), + isInOutPatient: true, + name: TranslationBase.of(context).dr.toString() + " " + (ancillaryLists[0].ancillaryOrderList![index].doctorName ?? ""), + billNo: ancillaryLists[0].ancillaryOrderList![index].orderNo.toString(), + profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + subName: ancillaryLists[0].projectName, + isLiveCareAppointment: false, + date: DateUtil.convertStringToDate(ancillaryLists[0].ancillaryOrderList![index].orderDate), + isSortByClinic: true, + ); + }, + itemCount: ancillaryLists[0].ancillaryOrderList!.length, + separatorBuilder: (context, index) => SizedBox(height: 14), + ), + ) + : getNoDataWidget(context), + )), + ], + ), + ), + Container( + child: obGyneAppoList.length != 0 + ? ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + padding: EdgeInsets.all(0.0), + itemCount: obGyneAppoList.length, + itemBuilder: (context, index) { + return Container( + width: double.infinity, + margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0), + decoration: cardRadius(12), + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(top: 0.0), + child: Container( + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: SvgPicture.asset("assets/images/new/ultrasound.svg", width: 20.0, height: 20.0), + ), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: Text(TranslationBase.of(context).walkinAppo, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)), + ), + ], + ), + ], + ), + Container( + child: InkWell( + onTap: () { + getOBGyneDoctorsList(obGyneAppoList[index].projectID!, obGyneAppoList[index].setupID!, obGyneAppoList[index]); + }, + child: Container( + padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), + decoration: BoxDecoration( + color: CustomColors.green, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.circular(6), + ), + child: Text( + TranslationBase.of(context).bookNow, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4), + ), + ), + ), + ), + ], + ), + Padding( + padding: const EdgeInsets.only(top: 8.0), + child: Text( + TranslationBase.of(context).dr + " " + obGyneAppoList[index].doctorName!, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + ), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + LargeAvatar( + name: TranslationBase.of(context).dr + " " + obGyneAppoList[index].doctorName!, + url: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + width: 52, + height: 52, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + MyRichText(TranslationBase.of(context).clinic + ": ", obGyneAppoList[index].clinicDescription!, projectViewModel.isArabic), + MyRichText( + TranslationBase.of(context).orderDate + ": ", + DateUtil.getDayMonthYearHourMinuteDateFormatted(DateUtil.convertStringToDate(obGyneAppoList[index].orderDate)).split(" ")[0], + projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).branch, obGyneAppoList[index].projectDescription!, projectViewModel.isArabic), + ], + ), + ), + ], + ), + ], + ), + ); + }, + ) + : getNoDataWidget(context), + ), + ], + ), + ), + SizedBox( + height: 20.0, + ), + ], + ), + ); + } + + initPenguinSDK(NavigationClinicDetails data) async { + final bool permited = await AppPermission.askPenguinPermissions(); + if (!permited) { + Map statuses = await [ + Permission.location, + Permission.bluetooth, + Permission.bluetoothConnect, + Permission.bluetoothScan, + Permission.activityRecognition, + ].request().whenComplete(() { + PenguinMethodChannel().launch("penguin", projectViewModel.isArabic ? "ar" : "en", projectViewModel.authenticatedUserObject.user.patientID.toString(), details: data); + }); + } + } + + String getNextActionImage(nextAction) { + switch (nextAction) { + case 0: + return "No Action"; + break; + case 10: + return "assets/images/new-design/confirm_button.png"; + break; + + case 15: + return projectViewModel.isArabic ? "assets/images/new-design/pay_online_button_arabic_disabled.png" : "assets/images/new-design/pay_online_button_disabled.png"; + break; + + case 20: + return projectViewModel.isArabic ? "assets/images/new-design/pay_online_button_arabic.png" : "assets/images/new-design/pay_online_button.png"; + break; + + case 30: + return "assets/images/new-design/NFCIcon_option2.png"; + break; + case 40: + return "assets/images/new-design/video_call_instruction.png"; + break; + case 50: + return "assets/images/new-design/confirm_button.png"; + break; + case 60: + return "assets/images/new-design/waiting_for_doctor.png"; + break; + case 90: + return "assets/images/new-design/NFCIcon_option2.png"; + break; + default: + return ""; + } + } + + performNextAction(AppoitmentAllHistoryResultList appo) { + switch (appo.nextAction) { + case 0: + // getAppoQR(context, appo); + break; + case 10: + confirmAppointment(appo); + break; + case 15: + AppToast.showErrorToast(message: TranslationBase.of(context).upcomingPaymentPending); + break; + case 20: + getPatientShare(context, appo); + // checkPatientNphiesEligibility(context, appo); + break; + case 30: + getAppoQR(context, appo); + break; + case 40: + openInstructions(appo); + break; + + case 50: + confirmAppointment(appo); + break; + case 60: + break; + case 90: + getAppoQR(context, appo); + break; + } + } + + openInstructions(AppoitmentAllHistoryResultList appo) { + if (appo.clinicID == 134) { + Navigator.of(context).push(FadePage(page: BloodDonationAppointmentTermsConditions())); + } + } + + Color getNextActionButtonColor(nextAction) { + switch (nextAction) { + case 0: + return CustomColors.accentColor; + break; + case 10: + return CustomColors.green; + break; + + case 15: + return CustomColors.grey2; + break; + + case 20: + return CustomColors.green; + break; + + case 30: + return CustomColors.accentColor; + break; + + case 40: + return CustomColors.green; + break; + + case 50: + return CustomColors.green; + break; + + case 60: + return CustomColors.orange; + break; + + case 90: + return CustomColors.accentColor; + break; + + default: + return CustomColors.green; + } + } + + String getNextActionText(nextAction) { + switch (nextAction) { + case 0: + return "No Action"; + break; + case 10: + return TranslationBase.of(context).confirm; + break; + + case 15: + return TranslationBase.of(context).pendingPayment; + break; + + case 20: + return TranslationBase.of(context).payNow; + break; + + case 30: + return TranslationBase.of(context).viewQR; + break; + + case 40: + return TranslationBase.of(context).instruction; + break; + + case 50: + return TranslationBase.of(context).confirmLiveCare; + break; + + case 60: + return TranslationBase.of(context).waitingForDoctor; + break; + + case 90: + return TranslationBase.of(context).checkinOptions; + break; + + default: + return ""; + } + } + + String getNextActionDescription(nextAction) { + switch (nextAction) { + case 0: + return "No Action"; + break; + case 10: + return TranslationBase.of(context).upcomingConfirm; + break; + + case 15: + return TranslationBase.of(context).upcomingPaymentPending; + break; + + case 20: + return TranslationBase.of(context).upcomingPaymentNow; + break; + + case 30: + return TranslationBase.of(context).upcomingQRNFC; + break; + + case 90: + return TranslationBase.of(context).upcomingQRNFC; + break; + + case 40: + return TranslationBase.of(context).upcomingVirtual; + break; + + case 50: + return TranslationBase.of(context).upcomingLivecare; + break; + + case 60: + return TranslationBase.of(context).waitingForDoctor; + break; + + default: + return ""; + } + } + + getLanguageID() async { + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + setState(() { + widget.languageID = languageID; + }); + } + + String getDate(String date) { + DateTime dateObj = DateUtil.convertStringToDate(date); + return DateUtil.getWeekDay(dateObj.weekday) + + ", " + + dateObj.day.toString() + + " " + + DateUtil.getMonth(dateObj.month) + + " " + + dateObj.year.toString() + + " " + + dateObj.hour.toString() + + ":" + + getMinute(dateObj); + } + + String getMinute(DateTime dateObj) { + if (dateObj.minute == 0) { + return dateObj.minute.toString() + "0"; + } else { + return dateObj.minute.toString(); + } + } + + String getDoctorSpeciality(List docSpecial) { + String docSpeciality = ""; + docSpecial.forEach((v) { + docSpeciality = docSpeciality + v + "\n"; + }); + return docSpeciality; + } + + Future navigateToAppointmentDetails(context, AppoitmentAllHistoryResultList appo) async { + GAnalytics.APPOINTMENT_DETAIL_FLOW_TYPE = 'todo list'; + Navigator.push(context, FadePage(page: AppointmentDetails(appo: appo, parentIndex: appo.patientStatusType == 42 ? 1 : 0))).then((value) { + getPatientAppointmentHistory(); + }); + projectViewModel.analytics.todoList.to_do_list_more_details(appo); + } + + getOBGyneOrdersList() { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getOBGyneOrdersList(context).then((res) { + obGyneAppoList.clear(); + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + if (res['HIS_OBGYNEProcedureGet_List'].length != 0) { + obGyneAppoList.clear(); + res['HIS_OBGYNEProcedureGet_List'].forEach((v) { + obGyneAppoList.add(new OBGyneProcedureListResponse.fromJson(v)); + }); + } else { + // Navigator.of(context).popAndPushNamed(HOME); + } + }); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + getOBGyneDoctorsList(int projectID, String setupID, OBGyneProcedureListResponse obGyneProcedureListResponse) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + List doctorsList = []; + List _patientDoctorAppointmentListHospital = []; + service.getOBGyneDoctorsList(projectID, setupID, projectViewModel.isArabic ? 1 : 2, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res['HIS_ObgyneUltrasoundDoctorsList'][0]); + if (res['MessageStatus'] == 1) { + setState(() { + if (res['HIS_ObgyneUltrasoundDoctorsList'].length != 0) { + res['HIS_ObgyneUltrasoundDoctorsList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson(v)); + }); + print(doctorsList.length); + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.projectName).toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientDoctorAppointmentListHospital + .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); + } + }); + navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital, obGyneProcedureListResponse); + } else { + // Navigator.of(context).popAndPushNamed(HOME); + } + }); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital, OBGyneProcedureListResponse obGyneProcedureListResponse) { + Navigator.push( + context, + FadePage( + page: SearchResults( + isLiveCareAppointment: false, + isObGyneAppointment: true, + doctorsList: docList, + isDoctorSearchResult: false, + patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, + obGyneProcedureListResponse: obGyneProcedureListResponse))); + } + + getAncillaryOrders() { + DoctorsListService service = new DoctorsListService(); + service.getAncillaryOrders().then((res) { + if (res['MessageStatus'] == 1) { + if (res['AncillaryOrderList'].length != 0) { + res['AncillaryOrderList'].forEach((v) { + ancillaryLists.add(new AncillaryOrdersListModel.fromJson(v)); + }); + } + // if (res['AncillaryOrderList'].length != 0) { + // res['AncillaryOrderList'].forEach((item) { + // ancillaryLists.add(AncillaryOrdersListModel.fromJson(item)); + // }); + // } + // dataLoaded = true; + // if (widget.isFromMyAppointments) { + // performNextAction(widget.appointment); + // widget.isFromMyAppointments = false; + // } + setState(() {}); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + err != null ?? AppToast.showErrorToast(message: err); + }); + } + + getPatientAppointmentHistory() async { + int languageID = projectViewModel.isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getPatientAppointmentHistory(true, languageID, context).then((res) { + appoList.clear(); + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + if (res['AppoimentAllHistoryResultList'].length != 0) { + appoList.clear(); + res['AppoimentAllHistoryResultList'].forEach((v) { + appoList.add(new AppoitmentAllHistoryResultList.fromJson(v)); + }); + } + // if (res['AncillaryOrderList'].length != 0) { + // res['AncillaryOrderList'].forEach((item) { + // ancillaryLists.add(AncillaryOrdersListModel.fromJson(item)); + // }); + // } + dataLoaded = true; + if (widget.isFromMyAppointments!) { + performNextAction(widget.appointment!); + widget.isFromMyAppointments = false; + } + setState(() {}); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + err != null ?? AppToast.showErrorToast(message: err); + }); + getToDoCount(); + } + + getToDoCount() { + toDoProvider.setState(0, 0, true, "0"); + ClinicListService service = new ClinicListService(); + service.getActiveAppointmentNo(context).then((res) { + if (res['MessageStatus'] == 1) { + toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, "0"); + } else {} + }).catchError((err) { + print(err); + }); + } + + checkPatientNphiesEligibility(context, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.checkPatientNphiesEligibility(appo.projectID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["isNphiesMatchedWithVida"]) { + getPatientShare(context, appo); + // getToDoCount(); + } else { + ConfirmDialog dialog = new ConfirmDialog( + isDissmissable: false, + context: context, + confirmMessage: res['ErrorEndUserMessage'], + okText: "Update insurance", + cancelText: "Continue as cash", + okFunction: () => {openUpdateInsurance()}, + cancelFunction: () => {continueAsCash(appo, false)}); + dialog.showAlertDialog(context); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + void openUpdateInsurance() { + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + } + + void continueAsCash(AppoitmentAllHistoryResultList appo, bool isLiveCareAppointment) { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.convertPatientToCash(appo.projectID!).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + if (isLiveCareAppointment) { + getLiveCareAppointmentPatientShare(context, service, appo); + } else { + getPatientShare(context, appo); + } + // getToDoCount(); + } else { + AppToast.showErrorToast(message: res["ErrorEndUserMessage"]); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + getPatientShare(context, AppoitmentAllHistoryResultList appo) { + int languageID = projectViewModel.isArabic ? 1 : 2; + String errorMsg = ""; + DoctorsListService service = new DoctorsListService(); + if (appo.isLiveCareAppointment!) { + getLiveCareAppointmentPatientShare(context, service, appo); + } else { + GifLoaderDialogUtils.showMyDialog(context); + service.getPatientShare(appo.appointmentNo.toString(), appo.clinicID, appo.projectID, languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['OnlineCheckInAppointments'].length != 0) { + widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]); + } + isInsured = res["IsInsured"]; + isEligible = res["IsEligible"]; + isCash = res["IsCash"]; + + if (isCash) { + openPaymentDialog(appo, widget.patientShareResponse!); + } else { + if (isInsured && isEligible) { + openPaymentDialog(appo, widget.patientShareResponse!); + } else { + if (isInsured && !isEligible) { + errorMsg = TranslationBase.of(context).invalidEligibility; + } else { + errorMsg = TranslationBase.of(context).invalidInsurance; + } + ConfirmDialog dialog = new ConfirmDialog( + isDissmissable: false, + context: context, + confirmMessage: errorMsg, + okText: TranslationBase.of(context).updateInsuranceText, + cancelText: TranslationBase.of(context).continueCash, + okFunction: () => {openUpdateInsurance()}, + cancelFunction: () => {continueAsCash(appo, false)}); + dialog.showAlertDialog(context); + } + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + } + + getLiveCareAppointmentPatientShare(context, DoctorsListService service, AppoitmentAllHistoryResultList appo) { + String errorMsg = ""; + GifLoaderDialogUtils.showMyDialog(context); + service.getLiveCareAppointmentPatientShare(appo.appointmentNo.toString(), appo.clinicID, appo.projectID, projectViewModel.isArabic ? 1 : 2, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + widget.patientShareResponse = new PatientShareResponse.fromJson(res); + + isInsured = res["IsInsured"]; + isEligible = res["IsEligible"]; + isCash = res["IsCash"]; + + if (isCash) { + openPaymentDialog(appo, widget.patientShareResponse!); + } else { + if (isInsured && isEligible) { + openPaymentDialog(appo, widget.patientShareResponse!); + } else { + if (isInsured && !isEligible) { + errorMsg = TranslationBase.of(context).invalidEligibility; + } else { + errorMsg = TranslationBase.of(context).invalidInsurance; + } + ConfirmDialog dialog = new ConfirmDialog( + isDissmissable: false, + context: context, + confirmMessage: errorMsg, + okText: TranslationBase.of(context).updateInsuranceText, + cancelText: TranslationBase.of(context).continueCash, + okFunction: () => {openUpdateInsurance()}, + cancelFunction: () => {continueAsCash(appo, true)}); + dialog.showAlertDialog(context); + } + } + + // openPaymentDialog(appo, widget.patientShareResponse!); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + getAppoQR(context, AppoitmentAllHistoryResultList appo) { + // GifLoaderDialogUtils.showMyDialog(context); + PatientShareResponse patientShareResponse = new PatientShareResponse(); + + patientShareResponse.doctorNameObj = appo.doctorNameObj; + patientShareResponse.doctorSpeciality = appo.doctorSpeciality; + patientShareResponse.projectName = appo.projectName; + patientShareResponse.appointmentDate = appo.appointmentDate; + patientShareResponse.appointmentNo = appo.appointmentNo; + patientShareResponse.clinicID = appo.clinicID; + patientShareResponse.projectID = appo.projectID; + patientShareResponse.isFollowup = appo.isFollowup; + + // FlutterNfcKit.nfcAvailability.then((value) { + // if (value == NFCAvailability.available) { + // PatientShareResponse patientShareResponse = new PatientShareResponse(); + patientShareResponse.doctorNameObj = appo.doctorNameObj; + patientShareResponse.doctorSpeciality = appo.doctorSpeciality; + patientShareResponse.projectName = appo.projectName; + patientShareResponse.appointmentDate = appo.appointmentDate; + patientShareResponse.appointmentNo = appo.appointmentNo; + patientShareResponse.clinicID = appo.clinicID; + patientShareResponse.projectID = appo.projectID; + patientShareResponse.isFollowup = appo.isFollowup; + navigateToQR(context, "", patientShareResponse, appo); + projectViewModel.analytics.todoList.to_do_list_check_in(appo); + // } else { + // Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported); + // } + // }); + projectViewModel.analytics.todoList.to_do_list_check_in(appo); + + DoctorsListService service = new DoctorsListService(); + service.generateAppointmentQR(patientShareResponse, context).then((res) {}).catchError((err) { + print(err); + }); + } + + Future navigateToQR(context, String appoQR, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appintment) async { + Navigator.push(context, FadePage(page: QRCode(patientShareResponse: patientShareResponse, appoQR: appoQR, appointment: appintment))).then((value) { + getPatientAppointmentHistory(); + }); + } + + openPaymentDialog(AppoitmentAllHistoryResultList appo, PatientShareResponse patientShareResponse) { + showGeneralDialog( + barrierColor: Colors.black.withOpacity(0.5), + transitionBuilder: (context, a1, a2, widget) { + final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0; + return Transform( + transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), + child: Opacity( + opacity: a1.value, + child: PaymentDialog( + appo: appo, + patientShareResponse: patientShareResponse, + isCashPatient: isCash, + onPaymentMethodSelected: () {}, + ), + ), + ); + }, + transitionDuration: Duration(milliseconds: 500), + barrierDismissible: false, + barrierLabel: '', + context: context, + pageBuilder: (context, animation1, animation2) => SizedBox()).then((value) { + if (value != null) { + navigateToPaymentMethod(context, value as PatientShareResponse, appo); + projectViewModel.analytics.todoList.to_do_list_confirm_payment_details(appo); + } else { + projectViewModel.analytics.todoList.to_do_list_cancel_payment_details(appo); + } + }); + projectViewModel.analytics.todoList.to_do_list_pay_now(appo); + } + + openPayment(List paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) { + browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); + transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo); + browser?.openPaymentBrowser( + amount, + "Appointment check in", + transID!, + appo.projectID.toString(), + authenticatedUser.emailAddress!, + paymentMethod[0]!, + authenticatedUser.patientType, + authenticatedUser.firstName!, + authenticatedUser.patientID, + authenticatedUser, + browser!, + appo.isLiveCareAppointment ?? false, + "2", + appo.isLiveCareAppointment! ? widget.patientShareResponse!.clinicID.toString() : "", + context, + appo.appointmentDate, + appo.appointmentNo, + appo.clinicID, + appo.doctorID, + paymentMethod[1]); + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + + if (selectedPaymentMethod == "TAMARA") { + if (Platform.isAndroid) { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['status']!; + tamaraOrderID = uri.queryParameters['AuthorizePaymentId']!; + } else { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['paymentStatus']!; + tamaraOrderID = uri.queryParameters['orderId']!; + } + } + + // if(selectedPaymentMethod != "TAMARA") { + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + browser?.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + // } + + // if(selectedPaymentMethod != "TAMARA") { + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + browser?.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + // } + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called!!!!"); + if (selectedPaymentMethod == "TAMARA") { + checkTamaraPaymentStatus(transID!, appo); + // if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { + // updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo); + // } else { + // updateTamaraRequestStatus("Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallments), appo); + // } + } else { + checkPaymentStatus(appo); + } + } + + checkTamaraPaymentStatus(String orderID, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getTamaraPaymentStatus(orderID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["status"].toString().toLowerCase() == "success") { + updateTamaraRequestStatus("success", "14", orderID, res["tamara_order_id"], int.parse(selectedInstallments!), appo); + } else { + updateTamaraRequestStatus("Failed", "00", transID!, tamaraOrderID != null ? tamaraOrderID : "", int.parse(selectedInstallments), appo); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + addAdvancedNumberRequestTamara(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) {}).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, int selectedInstallments, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + try { + DoctorsListService service = new DoctorsListService(); + service.updateTamaraRequestStatus(responseMessage, status, clientRequestID, tamaraOrderID, selectedInstallments).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (tamaraPaymentStatus.toLowerCase() == "approved") { + markAppointmentForTamara(appo); + addAdvancedNumberRequestTamara("Tamara-Advance-0000", tamaraOrderID, appo.appointmentNo.toString(), appo); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); + } catch (err) { + print(err); + } + } + + markAppointmentForTamara(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + var apptData = { + "AppointmentNo": appo.appointmentNo.toString(), + "DoctorID": appo.doctorID.toString(), + "ServiceID": appo.serviceID.toString(), + "ProjectID": appo.projectID.toString(), + "ClinicID": appo.clinicID.toString(), + "AppointmentDate": appo.appointmentDate.toString(), + }; + DoctorsListService service = new DoctorsListService(); + service.markAppointmentForTamara(appo.projectID!, appo.appointmentNo.toString()).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (appo.isLiveCareAppointment!) + addVIDARequestInsert("0", tamaraOrderID, appo); + else + getAppoQR(context, appo); + }).catchError((err) { + print(err); + AppToast.showErrorToast(message: err); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + String txn_ref; + num? amount; + String? payment_method; + final currency = projectViewModel.user!.outSA == 0 ? "sar" : 'aed'; + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.checkPaymentStatus(transID!, false, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + String paymentInfo = res['Response_Message']; + if (paymentInfo == 'Success') { + txn_ref = res['Merchant_Reference']; + amount = res['Amount']; + payment_method = res['PaymentMethod']; + createAdvancePayment(res, appo); + projectViewModel.analytics.appointment.payment_success( + appointment_type: 'regular', payment_method: payment_method, clinic: appo.clinicName, hospital: appo.projectName, txn_amount: "$amount", txn_currency: currency, txn_number: txn_ref); + } else { + AppToast.showErrorToast(message: res['Response_Message']); + projectViewModel.analytics.appointment.payment_fail( + appointment_type: 'regular', + payment_method: payment_method!, + clinic: appo.clinicName, + hospital: appo.projectName, + txn_amount: "$amount!", + txn_currency: currency, + error_type: res['Response_Message']); + } + }).catchError((err) { + if (mounted) GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + String paymentReference = res['Fort_id'].toString(); + service.createAdvancePayment(appo, appo.projectID.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + addAdvancedNumberRequest( + Utils.isVidaPlusProject(projectViewModel, appo.projectID!) + ? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString() + : res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), + paymentReference, + appo.appointmentNo.toString(), + appo, + res['OnlineCheckInAppointments'][0]); + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + addAdvancedNumberRequest(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo, dynamic apptData) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (appo.isLiveCareAppointment!) + addVIDARequestInsert(advanceNumber, paymentReference, appo); + else + getAppoQR(context, appo); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + addVIDARequestInsert(String advanceNumber, String paymentReference, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service + .insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, appo.appointmentDate!, transID!, projectViewModel.isArabic ? 1 : 2, context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + getPatientAppointmentHistory(); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async { + Navigator.push( + context, + FadePage( + page: PaymentMethod( + onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) { + setState(() {}); + }, + patientShare: widget.patientShareResponse!.patientShareWithTax))) + .then((value) { + print(value); + selectedPaymentMethod = value[0] ?? ""; + selectedInstallments = value[1] ?? ""; + getPatientAppointmentHistory(); + + if (value != null) { + final appType = appo.isLiveCareAppointment! ? 'livecare' : 'regular'; + if (selectedPaymentMethod == "ApplePay") { + if (projectViewModel.havePrivilege(103)) { + startApplePay(appo, patientShareResponse); + } else { + openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo); + } + } else { + openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo); + } + projectViewModel.analytics.appointment.payment_method(appointment_type: appType, clinic: appo.clinicName, payment_method: value[0], payment_type: 'appointment'); + } + }); + } + + void startApplePay(AppoitmentAllHistoryResultList appo, PatientShareResponse patientShareResponse) async { + transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo); + print("TransactionID: $transID"); + GifLoaderDialogUtils.showMyDialog(context); + + LiveCareService service = new LiveCareService(); + ApplePayInsertRequest applePayInsertRequest = new ApplePayInsertRequest(); + + PayfortProjectDetailsRespModel? payfortProjectDetailsRespModel; + await context.read().getProjectDetailsForPayfort(projectId: appo.projectID, serviceId: ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum()).then((value) { + payfortProjectDetailsRespModel = value; + }); + + applePayInsertRequest.clientRequestID = transID; + applePayInsertRequest.clinicID = appo.clinicID; + applePayInsertRequest.currency = projectViewModel.user.outSA == 1 ? "AED" : "SAR"; + // applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress; + applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com"; + applePayInsertRequest.customerID = projectViewModel.user.patientID; + applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!; + applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); + applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); + applePayInsertRequest.doctorID = appo.doctorID; + applePayInsertRequest.projectID = appo.projectID.toString(); + applePayInsertRequest.serviceID = ServiceTypeEnum.appointmentPayment.getIdFromServiceEnum().toString(); + applePayInsertRequest.channelID = 3; + applePayInsertRequest.patientID = projectViewModel.user.patientID; + applePayInsertRequest.patientTypeID = projectViewModel.user.patientType; + applePayInsertRequest.patientOutSA = projectViewModel.user.outSA; + applePayInsertRequest.appointmentDate = appo.appointmentDate; + applePayInsertRequest.appointmentNo = appo.appointmentNo; + applePayInsertRequest.orderDescription = "Appointment Payment"; + applePayInsertRequest.liveServiceID = "0"; + applePayInsertRequest.latitude = "0.0"; + applePayInsertRequest.longitude = "0.0"; + applePayInsertRequest.amount = patientShareResponse.patientShareWithTax.toString(); + applePayInsertRequest.isSchedule = appo.isLiveCareAppointment! ? "1" : "0"; + applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en'; + applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2; + applePayInsertRequest.userName = projectViewModel.user.patientID; + applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html"; + applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html"; + applePayInsertRequest.paymentOption = "ApplePay"; + + applePayInsertRequest.isMobSDK = true; + applePayInsertRequest.merchantReference = transID; + applePayInsertRequest.merchantIdentifier = payfortProjectDetailsRespModel!.merchantIdentifier; + applePayInsertRequest.commandType = "PURCHASE"; + applePayInsertRequest.signature = payfortProjectDetailsRespModel!.signature; + applePayInsertRequest.accessCode = payfortProjectDetailsRespModel!.accessCode; + applePayInsertRequest.shaRequestPhrase = payfortProjectDetailsRespModel!.shaRequest; + applePayInsertRequest.shaResponsePhrase = payfortProjectDetailsRespModel!.shaResponse; + applePayInsertRequest.returnURL = ""; + + service.applePayInsertRequest(applePayInsertRequest, context).then((res) async { + if (res["MessageStatus"] == 1) { + await context.read().initiateApplePayWithPayfort( + customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, + // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, + customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com", + orderDescription: "Appointment Payment", + orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()), + merchantReference: transID, + payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, + currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", + onFailed: (failureResult) async { + GifLoaderDialogUtils.hideDialog(context); + log("failureResult: ${failureResult.message.toString()}"); + AppToast.showErrorToast(message: failureResult.message.toString()); + }, + onSuccess: (successResult) async { + log("Payfort: ${successResult.responseMessage}"); + await context.read().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult); + checkPaymentStatus(appo); + }, + projectId: appo.projectID, + serviceTypeEnum: ServiceTypeEnum.appointmentPayment, + ); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: "An error occurred while processing your request"); + } + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err.toString()); + }); + } + + confirmAppointment(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.confirmAppointment(appo.appointmentNo!, appo.clinicID!, appo.projectID!, appo.isLiveCareAppointment!, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); + if (appo.isLiveCareAppointment!) { + insertLiveCareVIDARequest(appo); + } else { + getPatientAppointmentHistory(); + } + projectViewModel.analytics.todoList.to_do_list_confirm_appointment(appo); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service + .insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, appo.appointmentDate!, + Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), projectViewModel.isArabic ? 1 : 2, context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); + getPatientAppointmentHistory(); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + ancillaryOrdersDetails(item, projectId) { + Navigator.push( + context, + FadePage( + page: AnicllaryOrdersDetails(item.appointmentNo, item.orderNo, projectId), + ), + ); + } +} diff --git a/lib/pages/ToDoList/payment_method_select.dart b/lib/pages/ToDoList/payment_method_select.dart new file mode 100644 index 00000000..5adcb90f --- /dev/null +++ b/lib/pages/ToDoList/payment_method_select.dart @@ -0,0 +1,533 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:diplomaticquarterapp/core/model/my_balance/tamara_installment_details.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class PaymentMethod extends StatefulWidget { + Function onSelectedMethod; + bool? isShowInstallments; + num? patientShare; + bool? isFromAdvancePayment; + + PaymentMethod({required this.onSelectedMethod, this.isShowInstallments = false, this.patientShare, this.isFromAdvancePayment = false}); + + @override + _PaymentMethodState createState() => _PaymentMethodState(); +} + +class _PaymentMethodState extends State { + String selectedPaymentMethod = "MADA"; + TamaraInstallmentDetails? tamaraInstallmentDetails; + String? selectedInstallmentPlan; + + num minTamaraLimit = 0; + num maxTamaraLimit = 0; + + ProjectViewModel? projectViewModel; + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((_) { + getTamaraPaymentDetails(); + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).paymentMethod, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Container( + margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), + child: SingleChildScrollView( + child: Container( + child: Column( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.fromLTRB(4, 15.0, 4, 0.0), + child: Text(TranslationBase.of(context).selectPaymentOption, style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold)), + ), + if (projectViewModel!.havePrivilege(86)) + Container( + width: double.infinity, + child: InkWell( + onTap: () { + updateSelectedPaymentMethod("MADA"); + }, + child: Card( + elevation: 0.0, + margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + side: selectedPaymentMethod == "MADA" ? BorderSide(color: Colors.green, width: 2.0) : BorderSide(color: Colors.transparent, width: 0.0), + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + children: [ + Container( + width: 24, + height: 24, + decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "MADA" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5), + ), + mWidth(12), + Container( + height: 70.0, + width: 70.0, + padding: EdgeInsets.all(7.0), + child: Image.asset("assets/images/new/payment/Mada.png"), + ), + mFlex(1), + if (selectedPaymentMethod == "MADA") + Container( + decoration: containerRadius(CustomColors.green, 200), + padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12), + child: Text( + TranslationBase.of(context).paymentSelected, + style: TextStyle( + color: Colors.white, + fontSize: 11, + ), + ), + ), + ], + ), + ), + ), + ), + ), + if (projectViewModel!.havePrivilege(87)) + Container( + width: double.infinity, + child: InkWell( + onTap: () { + updateSelectedPaymentMethod("VISA"); + }, + child: Card( + elevation: 0.0, + margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + side: selectedPaymentMethod == "VISA" ? BorderSide(color: Colors.green, width: 2.0) : BorderSide(color: Colors.transparent, width: 0.0), + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + children: [ + Container( + width: 24, + height: 24, + decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "VISA" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5), + ), + mWidth(12), + Container( + height: 60.0, + padding: EdgeInsets.all(7.0), + width: 60, + child: Image.asset("assets/images/new/payment/visa.png"), + ), + mFlex(1), + if (selectedPaymentMethod == "VISA") + Container( + decoration: containerRadius(CustomColors.green, 200), + padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12), + child: Text( + TranslationBase.of(context).paymentSelected, + style: TextStyle( + color: Colors.white, + fontSize: 11, + ), + ), + ), + ], + ), + ), + ), + ), + ), + if (projectViewModel!.havePrivilege(88)) + Container( + width: double.infinity, + child: InkWell( + onTap: () { + updateSelectedPaymentMethod("MASTERCARD"); + }, + child: Card( + elevation: 0.0, + margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + side: selectedPaymentMethod == "MASTERCARD" ? BorderSide(color: Colors.green, width: 2.0) : BorderSide(color: Colors.transparent, width: 0.0), + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + children: [ + Container( + width: 24, + height: 24, + decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "MASTERCARD" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5), + ), + mWidth(12), + Container( + height: 60.0, + padding: EdgeInsets.all(7.0), + width: 60, + child: Image.asset("assets/images/new/payment/Mastercard.png"), + ), + mFlex(1), + if (selectedPaymentMethod == "MASTERCARD") + Container( + decoration: containerRadius(CustomColors.green, 200), + padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12), + child: Text( + TranslationBase.of(context).paymentSelected, + style: TextStyle( + color: Colors.white, + fontSize: 11, + ), + ), + ), + ], + ), + ), + ), + ), + ), + if (projectViewModel!.havePrivilege(90) && !widget.isFromAdvancePayment! && widget.patientShare! >= minTamaraLimit && widget.patientShare! <= maxTamaraLimit) + Container( + width: double.infinity, + child: InkWell( + onTap: () { + updateSelectedPaymentMethod("TAMARA"); + }, + child: Card( + elevation: 0.0, + margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + side: selectedPaymentMethod == "TAMARA" ? BorderSide(color: Colors.green, width: 2.0) : BorderSide(color: Colors.transparent, width: 0.0), + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + children: [ + Container( + width: 24, + height: 24, + decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "TAMARA" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5), + ), + mWidth(12), + Container( + height: 60.0, + padding: EdgeInsets.all(0.0), + width: 60, + child: projectViewModel!.isArabic ? Image.asset("assets/images/new/payment/tamara_ar.png") : Image.asset("assets/images/new/payment/tamara_en.png"), + ), + mFlex(1), + if (selectedPaymentMethod == "TAMARA") + Container( + decoration: containerRadius(CustomColors.green, 200), + padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12), + child: Text( + TranslationBase.of(context).paymentSelected, + style: TextStyle( + color: Colors.white, + fontSize: 11, + ), + ), + ), + ], + ), + ), + ), + ), + ), + if (widget.isShowInstallments! && projectViewModel!.havePrivilege(91)) + Container( + width: double.infinity, + child: InkWell( + onTap: () { + updateSelectedPaymentMethod("Installment"); + }, + child: Card( + elevation: 0.0, + margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + side: selectedPaymentMethod == "Installment" ? BorderSide(color: Colors.green, width: 2.0) : BorderSide(color: Colors.transparent, width: 0.0), + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + children: [ + Container( + width: 24, + height: 24, + decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "Installment" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5), + ), + mWidth(12), + Container( + height: 60.0, + padding: EdgeInsets.all(7.0), + width: 90, + // child: Image.asset("assets/images/new/payment/installments.png"), + child: SvgPicture.asset("assets/images/new/payment/instalmt.svg"), + ), + mFlex(1), + if (selectedPaymentMethod == "Installment") + Container( + decoration: containerRadius(CustomColors.green, 200), + padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12), + child: Text( + TranslationBase.of(context).paymentSelected, + style: TextStyle( + color: Colors.white, + fontSize: 11, + ), + ), + ), + ], + ), + ), + ), + ), + ), + (Platform.isIOS && projectViewModel!.havePrivilege(89)) + ? Container( + width: double.infinity, + child: InkWell( + onTap: () { + updateSelectedPaymentMethod("ApplePay"); + }, + child: Card( + elevation: 0.0, + margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + side: selectedPaymentMethod == "ApplePay" ? BorderSide(color: Colors.green, width: 2.0) : BorderSide(color: Colors.transparent, width: 0.0), + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + children: [ + Container( + width: 24, + height: 24, + decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "ApplePay" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5), + ), + mWidth(12), + Container( + height: 60.0, + padding: EdgeInsets.all(7.0), + width: 60, + child: SvgPicture.asset( + "assets/images/new/payment/Apple_Pay.svg", + ), + ), + mFlex(1), + if (selectedPaymentMethod == "ApplePay") + Container( + decoration: containerRadius(CustomColors.green, 200), + padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12), + child: Text( + TranslationBase.of(context).paymentSelected, + style: TextStyle( + color: Colors.white, + fontSize: 11, + ), + ), + ), + ], + ), + ), + ), + ), + ) + : Container(), + SizedBox( + height: 150.0, + ), + ], + ), + ), + ), + ), + bottomSheet: Container( + padding: EdgeInsets.all(16), + color: Colors.white, + child: selectedPaymentMethod == "TAMARA" + ? Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text(TranslationBase.of(context).selectTamaraPlan, style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)), + Container( + height: 60.0, + padding: EdgeInsets.all(0.0), + width: 60, + child: SvgPicture.asset("assets/images/new/payment/tamara.svg"), + ), + ], + ), + ), + if (tamaraInstallmentDetails != null) + Column( + children: [ + ...List.generate( + tamaraInstallmentDetails!.supportedInstalments!.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 1, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + selectedInstallmentPlan = tamaraInstallmentDetails!.supportedInstalments![index].instalments.toString(); + // getPaymentInfo(context, widget.projectID.toString(), widget.selectedProcedure.procedureID); + }); + }, + child: Row( + children: [ + Radio( + value: tamaraInstallmentDetails!.supportedInstalments![index].instalments.toString(), + groupValue: selectedInstallmentPlan, + activeColor: Colors.red[800], + toggleable: true, + onChanged: (value) { + setState(() { + selectedInstallmentPlan = value; + print(selectedInstallmentPlan); + }); + }, + ), + Text( + tamaraInstallmentDetails!.supportedInstalments![index].instalments.toString() + " " + TranslationBase.of(context).installments, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ) + ], + ), + ], + ), + ), + Container( + width: MediaQuery.of(context).size.width, + height: 50.0, + color: Colors.white, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.height * 0.1, + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.green, + disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38), + disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12), + elevation: 0, + onPressed: () { + widget.onSelectedMethod!(selectedPaymentMethod, selectedInstallmentPlan); + Navigator.pop(context, [selectedPaymentMethod, selectedInstallmentPlan]); + }, + child: Text(TranslationBase.of(context).confirm.toUpperCase(), style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, color: Colors.white)), + ), + ), + ), + ], + ), + ], + ) + : Container( + width: MediaQuery.of(context).size.width, + height: 50.0, + color: Colors.white, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.height * 0.1, + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.green, + disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38), + disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12), + elevation: 0, + onPressed: () { + widget.onSelectedMethod!(selectedPaymentMethod, selectedInstallmentPlan); + Navigator.pop(context, [selectedPaymentMethod, selectedInstallmentPlan]); + }, + child: Text(TranslationBase.of(context).confirm.toUpperCase(), style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, color: Colors.white)), + ), + ), + ), + ), + ); + } + + updateSelectedPaymentMethod(String selectedMethod) { + setState(() { + selectedPaymentMethod = selectedMethod; + }); + // if (selectedMethod == "TAMARA") { + // getTamaraPaymentDetails(); + // } + } + + getTamaraPaymentDetails() { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getTamaraPaymentDetails(context).then((Map res) { + tamaraInstallmentDetails = TamaraInstallmentDetails.fromJson(res); + minTamaraLimit = tamaraInstallmentDetails!.supportedInstalments![0].minLimit!.amount!; + maxTamaraLimit = tamaraInstallmentDetails!.supportedInstalments![0].maxLimit!.amount!; + selectedInstallmentPlan = tamaraInstallmentDetails!.supportedInstalments![0].instalments.toString(); + GifLoaderDialogUtils.hideDialog(context); + setState(() {}); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} diff --git a/lib/pages/ToDoList/widgets/paymentDialog.dart b/lib/pages/ToDoList/widgets/paymentDialog.dart new file mode 100644 index 00000000..0f05dab0 --- /dev/null +++ b/lib/pages/ToDoList/widgets/paymentDialog.dart @@ -0,0 +1,173 @@ +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; + +class PaymentDialog extends StatefulWidget { + bool isCashPatient = false; + late AppoitmentAllHistoryResultList appo; + late PatientShareResponse? patientShareResponse; + + late final Function onPaymentMethodSelected; + + PaymentDialog({required this.appo, required this.onPaymentMethodSelected, this.patientShareResponse, this.isCashPatient = false}); + + @override + _PaymentDialogState createState() => _PaymentDialogState(); +} + +class _PaymentDialogState extends State { + @override + Widget build(BuildContext context) { + return Dialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), + child: Container( + //height: 550.0, + width: 450.0, + padding: EdgeInsets.all(21), + child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ + Text( + TranslationBase.of(context).invoiceDetails, + style: TextStyle( + fontSize: 24.0, + fontWeight: FontWeight.w600, + letterSpacing: -1.14, + color: Color(0xff2B353E), + ), + ), + Text(widget.appo.doctorTitle! + " " + widget.appo.doctorNameObj!, style: TextStyle(color: Color(0xff2E303A), fontSize: 16.0, fontWeight: FontWeight.w600, letterSpacing: -0.64)), + Text(getDate(widget.appo.appointmentDate!), style: getTextStyle()), + Text(widget.appo.projectName!, style: getTextStyle()), + Divider( + color: Colors.grey, + ), + Table( + children: [ + TableRow(decoration: BoxDecoration(), children: [ + TableCell(child: _getNormalText(TranslationBase.of(context).patientShareToDo)), + TableCell(child: _getNormalText(widget.patientShareResponse!.patientShare!.toString())), + ]), + TableRow(children: [ + TableCell(child: _getNormalText(TranslationBase.of(context).patientTaxToDo)), + TableCell(child: _getNormalText(widget.patientShareResponse!.patientTaxAmount!.toString())), + ]), + TableRow(children: [ + TableCell(child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo)), + TableCell(child: _getNormalText(widget.patientShareResponse!.patientShareWithTax!.toString())), + ]), + ], + ), + Divider(color: Colors.grey), + Text( + TranslationBase.of(context).YouCanPayByTheFollowingOptions, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + ), + ), + getPaymentMethods(), + SizedBox(height: 12), + Text( + TranslationBase.of(context).appoPaymentConfirm, + style: TextStyle(fontSize: 14.0, color: CustomColors.accentColor, fontWeight: FontWeight.w600, letterSpacing: -0.56), + ), + SizedBox(height: 12), + Container( + alignment: Alignment.center, + child: Row( + // direction: Axis.horizontal, + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).cancel_nocaps, + () { + Navigator.pop(context, null); + }, + color: CustomColors.accentColor, + textColor: Colors.white, + ), + ), + mWidth(10.0), + Expanded( + child: DefaultButton( + TranslationBase.of(context).confirm, + () { + Navigator.pop(context, widget.patientShareResponse); + }, + color: CustomColors.green, + textColor: Colors.white, + ), + ), + ], + ), + ), + widget.isCashPatient + ? Column( + children: [ + mHeight(10.0), + Text( + TranslationBase.of(context).cashAmountUpdateInsurance, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + ), + ), + mHeight(5.0), + DefaultButton( + TranslationBase.of(context).updateInsuranceText, + () { + Navigator.pop(context, null); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }, + color: Color(0xffEAA118), + textColor: Colors.white, + ), + ], + ) + : Container(), + ]), + ), + ); + } + + _getNormalText(text) { + return Container( + margin: EdgeInsets.only(top: 10.0, right: 10.0), + child: Text(text, style: TextStyle(fontSize: 13, letterSpacing: 0.5, color: Color(0xff2E303A))), + ); + } + + TextStyle getTextStyle() { + return TextStyle(color: Color(0xff575757), fontSize: 13.0, fontWeight: FontWeight.w600); + } + + String getDate(String date) { + DateTime dateObj = DateUtil.convertStringToDate(date); + return DateUtil.getDayMonthYearDateFormatted(dateObj) + " " + dateObj.hour.toString() + ":" + getMinute(dateObj); + } + + String getMinute(DateTime dateObj) { + if (dateObj.minute == 0) { + return dateObj.minute.toString() + "0"; + } else { + return dateObj.minute.toString(); + } + } +} diff --git a/lib/pages/ToDoList/widgets/upcomingCard.dart b/lib/pages/ToDoList/widgets/upcomingCard.dart new file mode 100644 index 00000000..fa3e4a39 --- /dev/null +++ b/lib/pages/ToDoList/widgets/upcomingCard.dart @@ -0,0 +1,168 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class TodoListCard extends StatefulWidget { + TodoListCard(); + + @override + _TodoListCardState createState() => _TodoListCardState(); +} + +class _TodoListCardState extends State { + AppSharedPreferences sharedPref = AppSharedPreferences(); + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Container( + width: double.infinity, + margin: EdgeInsets.all(10.0), + decoration: cardRadius(12), + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(top: 4.0), + child: SvgPicture.asset("assets/images/new/virtual.svg"), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: Text(TranslationBase.of(context).videoAppo, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)), + ), + Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: Text("01:23:22 " + TranslationBase.of(context).upcomingTimeLeft, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48)), + ), + ], + ), + ], + ), + Container( + child: InkWell( + onTap: () { + // showConfirmMessage(model, order); + }, + child: Container( + padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), + decoration: BoxDecoration( + color: CustomColors.green, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.circular(6), + ), + child: Text( + TranslationBase.of(context).confirm, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4), + ), + ), + ), + ), + ], + ), + Padding( + padding: const EdgeInsets.only(top: 8.0), + child: Text( + "Raed Mubarak Bin Ghanem", + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + ), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + LargeAvatar( + name: "Raed Mubarak Bin Ghanem", + url: "https://hmgwebservices.com/Images/MobileImages/TAKHSUSI/158210.png", + width: 52, + height: 52, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + MyRichText(TranslationBase.of(context).clinic + ": ", "Cardiology", projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).appointmentDate + ": ", "11/04/2021 15:30", projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).branch, "Olaya Hospital", projectViewModel.isArabic), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisSize: MainAxisSize.max, + children: [ + RatingBar( + initialRating: 4.6, + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon(Icons.star, color: CustomColors.accentColor,), + half: Icon(Icons.star_half, color: CustomColors.accentColor,), + empty: Icon(Icons.star, color: CustomColors.accentColor,), + ), + tapOnlyMode: true, + unratedColor: Colors.grey[500], + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + ) + // RatingBar.readOnly( + // initialRating: 4.5, + // size: 16.0, + // filledColor: Color(0XFFD02127), + // emptyColor: Color(0XFFD02127), + // isHalfAllowed: true, + // halfFilledIcon: Icons.star_half, + // filledIcon: Icons.star, + // emptyIcon: Icons.star_border, + // ), + ], + ), + ], + ), + ), + ], + ), + Padding( + padding: const EdgeInsets.only(top: 12.0), + child: Text( + "Please confirm the appointment to avoid cancellation", + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 25 / 16), + ), + ), + Padding( + padding: const EdgeInsets.only(top: 0.0), + child: Text( + "More Details", + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48, height: 25 / 16, decoration: TextDecoration.underline), + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/appUpdatePage/app_update_page.dart b/lib/pages/appUpdatePage/app_update_page.dart new file mode 100644 index 00000000..d9ecb3df --- /dev/null +++ b/lib/pages/appUpdatePage/app_update_page.dart @@ -0,0 +1,106 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:in_app_update/in_app_update.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class AppUpdatePage extends StatefulWidget { + final String appUpdateText; + + AppUpdatePage({required this.appUpdateText}); + + @override + _AppUpdatePageState createState() => _AppUpdatePageState(); +} + +class _AppUpdatePageState extends State { + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: "App Update", + backgroundColor: Colors.white, + isShowAppBar: false, + isShowDecPage: false, + body: SingleChildScrollView( + child: Container( + child: Column( + children: [ + Stack( + children: [ + Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: [ + SvgPicture.asset("assets/images/new-design/update_rocket_image.svg", fit: BoxFit.fill), + ]), + Container( + margin: EdgeInsets.only(top: 40.0), + width: MediaQuery.of(context).size.width, + child: Text(TranslationBase.of(context).appUpdate, + textAlign: TextAlign.center, style: TextStyle(color: Color(0xff2d6c90).withOpacity(1.0), fontSize: 22.0, fontWeight: FontWeight.bold))), + ], + ), + Container( + margin: EdgeInsets.only(top: 5.0, bottom: 5.0), + child: SvgPicture.asset("assets/images/new-design/HMG_logo.svg", fit: BoxFit.fill), + ), + Container( + margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), + width: MediaQuery.of(context).size.width, + child: Text(widget.appUpdateText, textAlign: TextAlign.center, style: TextStyle(color: Colors.grey[600], fontSize: 14.0, height: 1.5, fontWeight: FontWeight.w600))), + Container( + margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 20.0), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width, + height: 45.0, + child: CustomTextButton( + backgroundColor: Colors.red[800]!, + disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38), + disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12), + elevation: 0, + onPressed: () { + openAppUpdateLink(); + }, + child: Text(TranslationBase.of(context).appUpdate, style: TextStyle(fontSize: 18.0, color: Colors.white)), + ), + ), + ), + ], + ), + ), + ), + ); + } + + openAppUpdateLink() { + if (Platform.isAndroid) { + // _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg"); + InAppUpdate.checkForUpdate().then((info) { + print("checkForUpdate!!!"); + print(info.toString()); + if (info.immediateUpdateAllowed) { + print("Immediate Allowed!!!"); + InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString())); + } + }).catchError((e) { + print(e.toString()); + _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg"); + }); + } + if (Platform.isIOS) { + _launchURL("https://itunes.apple.com/app/id733503978"); + } + } + + _launchURL(String url) async { + if (await canLaunch(url)) { + await launch(url); + } else { + throw 'Could not launch $url'; + } + } +} diff --git a/lib/pages/base/base_view.dart b/lib/pages/base/base_view.dart new file mode 100644 index 00000000..cede7732 --- /dev/null +++ b/lib/pages/base/base_view.dart @@ -0,0 +1,66 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../locator.dart'; + +AppSharedPreferences sharedPref = AppSharedPreferences(); + +class BaseView extends StatefulWidget { + final Widget Function(BuildContext context, T model, Widget? child) builder; + final Function(T)? onModelReady; + final bool allowAny; + + BaseView({ + required this.builder, + this.onModelReady, + this.allowAny = false, + }); + + @override + _BaseViewState createState() => _BaseViewState(); +} + +class _BaseViewState extends State> { + T model = locator(); + AuthenticatedUserObject authenticatedUserObject = locator(); + bool isLogin = false; + + @override + void initState() { + if (widget.allowAny && widget.onModelReady != null) { + widget.onModelReady!(model); + } else if (widget.onModelReady != null && Provider.of(context, listen: false).isLogin) { + widget.onModelReady!(model); + } + super.initState(); + } + + getUser() async { + var userData = await sharedPref.getObject(USER_PROFILE); + this.isLogin = userData != null; + } + + @override + Widget build(BuildContext context) { + return ChangeNotifierProvider( + create: (BuildContext context) => model, + child: Consumer(builder: widget.builder), + ); + } + + @override + void dispose() { + + if (model != null) { + //changed by Aamir + //May be cause a problem after update + model = locator(); + } + super.dispose(); + } +} diff --git a/lib/pages/conference/clipped_video.dart b/lib/pages/conference/clipped_video.dart new file mode 100644 index 00000000..14711656 --- /dev/null +++ b/lib/pages/conference/clipped_video.dart @@ -0,0 +1,37 @@ +import 'package:flutter/material.dart'; + +class ClippedVideo extends StatefulWidget { + final double width; + final double height; + final Widget child; + + const ClippedVideo({ + Key? key, + required this.width, + required this.height, + required this.child, + }) : super(key: key); + + @override + _ClippedVideoState createState() => _ClippedVideoState(); +} + +class _ClippedVideoState extends State { + @override + Widget build(BuildContext context) { + return Container( + width: widget.width, + height: widget.height, + decoration: BoxDecoration( + borderRadius: const BorderRadius.all(Radius.circular(20)), + border: Border.all( + color: Colors.white24, + ), + ), + child: ClipRRect( + child: widget.child, + borderRadius: const BorderRadius.all(Radius.circular(20)), + ), + ); + } +} diff --git a/lib/pages/conference/conference_button_bar.dart b/lib/pages/conference/conference_button_bar.dart new file mode 100644 index 00000000..1b80c3d5 --- /dev/null +++ b/lib/pages/conference/conference_button_bar.dart @@ -0,0 +1,238 @@ +import 'dart:async'; + +import 'package:after_layout/after_layout.dart'; +import 'package:diplomaticquarterapp/pages/conference/widgets/circle_button.dart'; +import 'package:flutter/material.dart'; + +class ConferenceButtonBar extends StatefulWidget { + final VoidCallback? onVideoEnabled; + final VoidCallback? onAudioEnabled; + final VoidCallback? onHangup; + final VoidCallback? onSwitchCamera; + final VoidCallback? onPersonAdd; + final VoidCallback? onPersonRemove; + final void Function(double)? onHeight; + final VoidCallback? onHide; + final VoidCallback? onShow; + final Stream videoEnabled; + final Stream audioEnabled; + + const ConferenceButtonBar({ + Key? key, + this.onVideoEnabled, + this.onAudioEnabled, + this.onHangup, + this.onSwitchCamera, + this.onPersonAdd, + this.onPersonRemove, + required this.videoEnabled, + required this.audioEnabled, + this.onHeight, + this.onHide, + this.onShow, + }) : assert(videoEnabled != null), + assert(audioEnabled != null), + super(key: key); + + @override + _ConferenceButtonBarState createState() => _ConferenceButtonBarState(); +} + +class _ConferenceButtonBarState extends State with AfterLayoutMixin { + var _bottom = -100.0; + late Timer _timer; + late int _remaining; + var _videoEnabled = true; + var _audioEnabled = true; + late double _hidden; + late double _visible; + final _keyButtonBarHeight = GlobalKey(); + + final Duration timeout = const Duration(seconds: 5); + final Duration ms = const Duration(milliseconds: 1); + final Duration periodicDuration = const Duration(milliseconds: 100); + + Timer startTimeout([int? milliseconds]) { + final duration = milliseconds == null ? timeout : ms * milliseconds; + _remaining = duration.inMilliseconds; + return Timer.periodic(periodicDuration, (Timer timer) { + _remaining -= periodicDuration.inMilliseconds; + if (_remaining <= 0) { + timer.cancel(); + _toggleBar(); + } + }); + } + + void _pauseTimer() { + if (_timer == null) { + return; + } + _timer.cancel(); + // _timer = null; + } + + void _resumeTimer() { + // resume the timer only when there is no timer active or when + // the bar is not already hidden. + if ((_timer != null && _timer.isActive) || _bottom == _hidden) { + return; + } + _timer = startTimeout(_remaining); + } + + void _toggleBar() { + setState(() { + _bottom = _bottom == _visible ? _hidden : _visible; + if (_bottom == _visible && widget.onShow != null) { + widget.onShow!(); + } + if (_bottom == _hidden && widget.onHide != null) { + widget.onHide!(); + } + }); + } + + void _toggleBarOnEnd() { + if (_timer != null) { + if (_timer.isActive) { + _timer.cancel(); + } + // _timer = null; + } + if (_bottom == 0) { + _timer = startTimeout(); + } + } + + @override + void initState() { + super.initState(); + _timer = startTimeout(); + } + + @override + void didChangeDependencies() { + _visible = MediaQuery.of(context).viewPadding.bottom; + super.didChangeDependencies(); + } + + @override + void afterFirstLayout(BuildContext context) { + final heightButtonBar = _keyButtonBarHeight.currentContext!.size!.height; + //Changed by Aamir + // Because the `didChangeDependencies` fires before the `afterFirstLayout`, we can use the `_visible` property here. + _hidden = -(heightButtonBar + _visible); + widget.onHeight!(heightButtonBar); + _toggleBar(); + } + + @override + void dispose() { + super.dispose(); + if (_timer != null && _timer.isActive) { + _timer.cancel(); + + } + } + + @override + Widget build(BuildContext context) { + return Positioned( + top: 0, + left: 0, + right: 0, + bottom: 0, + child: GestureDetector( + key: Key('show-hide-button-bar-gesture'), + behavior: HitTestBehavior.translucent, + onTapDown: (_) => _pauseTimer(), + onTapUp: (_) => _toggleBar(), + onTapCancel: () => _resumeTimer(), + child: Stack( + children: [ + AnimatedPositioned( + key: Key('button-bar'), + bottom: _bottom, + left: 0, + right: 0, + duration: const Duration(milliseconds: 300), + curve: Curves.linear, + child: _buildRow(context), + onEnd: _toggleBarOnEnd, + ), + ], + ), + ), + ); + } + + void _onPressed(VoidCallback callback) { + if (callback != null) { + callback(); + } + if (_timer != null && _timer.isActive) { + _timer.cancel(); + } + _timer = startTimeout(); + } + + Widget _buildRow(BuildContext context) { + return Padding( + key: _keyButtonBarHeight, + padding: const EdgeInsets.only(bottom: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + CircleButton( + child: StreamBuilder( + stream: widget.videoEnabled, + initialData: _videoEnabled, + builder: (context, snapshot) { + _videoEnabled = snapshot.data!; + return Icon( + _videoEnabled ? Icons.videocam : Icons.videocam_off, + color: Colors.white, + ); + }), + key: Key('camera-button'), + onPressed: () => _onPressed(widget.onVideoEnabled!), + ), + CircleButton( + child: StreamBuilder( + stream: widget.audioEnabled, + initialData: _audioEnabled, + builder: (context, snapshot) { + _audioEnabled = snapshot.data!; + return Icon( + _audioEnabled ? Icons.mic : Icons.mic_off, + color: Colors.white, + ); + }), + key: Key('microphone-button'), + onPressed: () => _onPressed(widget.onAudioEnabled!), + ), + CircleButton( + child: const Icon(Icons.switch_camera, color: Colors.white), + key: Key('switch-camera-button'), + onPressed: () => _onPressed(widget.onSwitchCamera!), + ), + CircleButton( + radius: 35, + child: const RotationTransition( + turns: AlwaysStoppedAnimation(135 / 360), + child: Icon( + Icons.phone, + color: Colors.white, + size: 40, + ), + ), + color: Colors.red.withAlpha(200), + key: Key('hangup-button'), + onPressed: () => _onPressed(widget.onHangup!), + ), + ], + ), + ); + } +} diff --git a/lib/pages/conference/conference_page.dart b/lib/pages/conference/conference_page.dart new file mode 100644 index 00000000..3e5ebe41 --- /dev/null +++ b/lib/pages/conference/conference_page.dart @@ -0,0 +1,390 @@ +// import 'dart:async'; +// +// import 'package:diplomaticquarterapp/models/LiveCare/room_model.dart'; +// import 'package:diplomaticquarterapp/pages/conference/conference_button_bar.dart'; +// import 'package:diplomaticquarterapp/pages/conference/conference_room.dart'; +// import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +// import 'package:diplomaticquarterapp/pages/conference/draggable_publisher.dart'; +// import 'package:diplomaticquarterapp/pages/conference/participant_widget.dart'; +// import 'package:diplomaticquarterapp/pages/conference/widgets/noise_box.dart'; +// import 'package:diplomaticquarterapp/pages/conference/widgets/platform_alert_dialog.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter/services.dart'; +// import 'package:wakelock/wakelock.dart'; +// +// class ConferencePage extends StatefulWidget { +// final RoomModel roomModel; +// +// const ConferencePage({Key key, this.roomModel}) : super(key: key); +// +// @override +// _ConferencePageState createState() => _ConferencePageState(); +// } +// +// class _ConferencePageState extends State { +// final StreamController _onButtonBarVisibleStreamController = StreamController.broadcast(); +// final StreamController _onButtonBarHeightStreamController = StreamController.broadcast(); +// // ConferenceRoom _conferenceRoom; +// StreamSubscription _onConferenceRoomException; +// +// @override +// void initState() { +// super.initState(); +// _lockInPortrait(); +// _connectToRoom(); +// _wakeLock(true); +// } +// +// void _connectToRoom() async { +// try { +// final conferenceRoom = ConferenceRoom( +// name: widget.roomModel.name, +// token: widget.roomModel.token, +// identity: widget.roomModel.identity, +// ); +// await conferenceRoom.connect(); +// setState(() { +// _conferenceRoom = conferenceRoom; +// _onConferenceRoomException = _conferenceRoom.onException.listen((err) async { +// await PlatformAlertDialog( +// title: err is PlatformException ? err.message : 'An error occured', +// content: err is PlatformException ? err.details : err.toString(), +// defaultActionText: 'OK', +// ).show(context); +// }); +// _conferenceRoom.addListener(_conferenceRoomUpdated); +// }); +// } catch (err) { +// print(err); +// await PlatformAlertDialog( +// title: err is PlatformException ? err.message : 'An error occured', +// content: err is PlatformException ? err.details : err.toString(), +// defaultActionText: 'OK', +// ).show(context); +// +// Navigator.of(context).pop(); +// } +// } +// +// Future _lockInPortrait() async { +// await SystemChrome.setPreferredOrientations([ +// DeviceOrientation.portraitUp, +// DeviceOrientation.portraitDown, +// ]); +// } +// +// @override +// void dispose() { +// _freePortraitLock(); +// _wakeLock(false); +// _disposeStreamsAndSubscriptions(); +// if (_conferenceRoom != null) _conferenceRoom.removeListener(_conferenceRoomUpdated); +// super.dispose(); +// } +// +// Future _freePortraitLock() async { +// await SystemChrome.setPreferredOrientations([ +// DeviceOrientation.landscapeRight, +// DeviceOrientation.landscapeLeft, +// DeviceOrientation.portraitUp, +// DeviceOrientation.portraitDown, +// ]); +// } +// +// Future _disposeStreamsAndSubscriptions() async { +// if (_onButtonBarVisibleStreamController != null) await _onButtonBarVisibleStreamController.close(); +// if (_onButtonBarHeightStreamController != null) await _onButtonBarHeightStreamController.close(); +// if (_onConferenceRoomException != null) await _onConferenceRoomException.cancel(); +// } +// +// @override +// Widget build(BuildContext context) { +// return WillPopScope( +// onWillPop: () async => false, +// child: Scaffold( +// backgroundColor: Colors.white, +// body: _conferenceRoom == null ? showProgress() : buildLayout(), +// ), +// ); +// } +// +// LayoutBuilder buildLayout() { +// return LayoutBuilder( +// builder: (BuildContext context, BoxConstraints constraints) { +// return Stack( +// children: [ +// _buildParticipants(context, constraints.biggest, _conferenceRoom), +// ConferenceButtonBar( +// audioEnabled: _conferenceRoom.onAudioEnabled, +// videoEnabled: _conferenceRoom.onVideoEnabled, +// onAudioEnabled: _conferenceRoom.toggleAudioEnabled, +// onVideoEnabled: _conferenceRoom.toggleVideoEnabled, +// onHangup: _onHangup, +// onSwitchCamera: _conferenceRoom.switchCamera, +// onPersonAdd: _onPersonAdd, +// onPersonRemove: _onPersonRemove, +// onHeight: _onHeightBar, +// onShow: _onShowBar, +// onHide: _onHideBar, +// ), +// ], +// ); +// }, +// ); +// } +// +// Widget showProgress() { +// return Column( +// mainAxisAlignment: MainAxisAlignment.center, +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// Center(child: CircularProgressIndicator()), +// SizedBox( +// height: 10, +// ), +// Text( +// 'Connecting to the call...', +// style: TextStyle(color: Colors.white), +// ), +// ], +// ); +// } +// +// Future _onHangup() async { +// print('onHangup'); +// await _conferenceRoom.disconnect(); +// LandingPage.isOpenCallPage = false; +// Navigator.of(context).pop(); +// } +// +// void _onPersonAdd() { +// print('onPersonAdd'); +// try { +// _conferenceRoom.addDummy( +// child: Stack( +// children: [ +// const Placeholder(), +// Center( +// child: Text( +// (_conferenceRoom.participants.length + 1).toString(), +// style: const TextStyle( +// shadows: [ +// Shadow( +// blurRadius: 3.0, +// color: Color.fromARGB(255, 0, 0, 0), +// ), +// Shadow( +// blurRadius: 8.0, +// color: Color.fromARGB(255, 255, 255, 255), +// ), +// ], +// fontSize: 80, +// ), +// ), +// ), +// ], +// ), +// ); +// } on PlatformException catch (err) { +// PlatformAlertDialog( +// title: err.message, +// content: err.details, +// defaultActionText: 'OK', +// ).show(context); +// } +// } +// +// void _onPersonRemove() { +// print('onPersonRemove'); +// _conferenceRoom.removeDummy(); +// } +// +// Widget _buildParticipants(BuildContext context, Size size, ConferenceRoom conferenceRoom) { +// final children = []; +// final length = conferenceRoom.participants.length; +// +// if (length <= 2) { +// _buildOverlayLayout(context, size, children); +// return Stack(children: children); +// } +// +// void buildInCols(bool removeLocalBeforeChunking, bool moveLastOfEachRowToNextRow, int columns) { +// _buildLayoutInGrid( +// context, +// size, +// children, +// removeLocalBeforeChunking: removeLocalBeforeChunking, +// moveLastOfEachRowToNextRow: moveLastOfEachRowToNextRow, +// columns: columns, +// ); +// } +// +// // if (length <= 3) { +// // buildInCols(true, false, 1); +// // } else if (length == 5) { +// // buildInCols(false, true, 2); +// // } else if (length <= 6 || length == 8) { +// // buildInCols(false, false, 2); +// // } else if (length == 7 || length == 9) { +// // buildInCols(true, false, 2); +// // } else if (length == 10) { +// // buildInCols(false, true, 3); +// // } else if (length == 13 || length == 16) { +// // buildInCols(true, false, 3); +// // } else if (length <= 18) { +// // buildInCols(false, false, 3); +// // } +// +// return Column( +// children: children, +// ); +// } +// +// void _buildOverlayLayout(BuildContext context, Size size, List children) { +// final participants = _conferenceRoom.participants; +// if (participants.length == 1) { +// children.add(_buildNoiseBox()); +// } else { +// final remoteParticipant = participants.firstWhere((ParticipantWidget participant) => participant.isRemote, orElse: () => null); +// if (remoteParticipant != null) { +// children.add(remoteParticipant); +// } +// } +// +// final localParticipant = participants.firstWhere((ParticipantWidget participant) => !participant.isRemote, orElse: () => null); +// if (localParticipant != null) { +// children.add(DraggablePublisher( +// key: Key('publisher'), +// child: localParticipant, +// availableScreenSize: size, +// onButtonBarVisible: _onButtonBarVisibleStreamController.stream, +// onButtonBarHeight: _onButtonBarHeightStreamController.stream, +// )); +// } +// } +// +// void _buildLayoutInGrid( +// BuildContext context, +// Size size, +// List children, { +// bool removeLocalBeforeChunking = false, +// bool moveLastOfEachRowToNextRow = false, +// int columns = 2, +// }) { +// final participants = _conferenceRoom.participants; +// ParticipantWidget localParticipant; +// if (removeLocalBeforeChunking) { +// localParticipant = participants.firstWhere((ParticipantWidget participant) => !participant.isRemote, orElse: () => null); +// if (localParticipant != null) { +// participants.remove(localParticipant); +// } +// } +// final chunkedParticipants = chunk(array: participants, size: columns); +// if (localParticipant != null) { +// chunkedParticipants.last.add(localParticipant); +// participants.add(localParticipant); +// } +// +// if (moveLastOfEachRowToNextRow) { +// for (var i = 0; i < chunkedParticipants.length - 1; i++) { +// var participant = chunkedParticipants[i].removeLast(); +// chunkedParticipants[i + 1].insert(0, participant); +// } +// } +// +// for (final participantChunk in chunkedParticipants) { +// final rowChildren = []; +// for (final participant in participantChunk) { +// rowChildren.add( +// Container( +// width: size.width / participantChunk.length, +// height: size.height / chunkedParticipants.length, +// child: participant, +// ), +// ); +// } +// children.add( +// Container( +// height: size.height / chunkedParticipants.length, +// child: Row( +// mainAxisAlignment: MainAxisAlignment.spaceEvenly, +// children: rowChildren, +// ), +// ), +// ); +// } +// } +// +// NoiseBox _buildNoiseBox() { +// return NoiseBox( +// density: NoiseBoxDensity.xLow, +// backgroundColor: Colors.grey.shade900, +// child: Center( +// child: Container( +// color: Colors.black54, +// width: double.infinity, +// height: 40, +// child: Center( +// child: Text( +// 'Waiting for another participant to connect to the call...', +// key: Key('text-wait'), +// textAlign: TextAlign.center, +// style: TextStyle(color: Colors.white), +// ), +// ), +// ), +// ), +// ); +// } +// +// List> chunk({@required List array, @required int size}) { +// final result = >[]; +// if (array.isEmpty || size <= 0) { +// return result; +// } +// var first = 0; +// var last = size; +// final totalLoop = array.length % size == 0 ? array.length ~/ size : array.length ~/ size + 1; +// for (var i = 0; i < totalLoop; i++) { +// if (last > array.length) { +// result.add(array.sublist(first, array.length)); +// } else { +// result.add(array.sublist(first, last)); +// } +// first = last; +// last = last + size; +// } +// return result; +// } +// +// void _onHeightBar(double height) { +// _onButtonBarHeightStreamController.add(height); +// } +// +// void _onShowBar() { +// setState(() { +// SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom, SystemUiOverlay.top]); +// }); +// _onButtonBarVisibleStreamController.add(true); +// } +// +// void _onHideBar() { +// setState(() { +// SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]); +// }); +// _onButtonBarVisibleStreamController.add(false); +// } +// +// Future _wakeLock(bool enable) async { +// try { +// return await (enable ? Wakelock.enable() : Wakelock.disable()); +// } catch (err) { +// print('Unable to change the Wakelock and set it to $enable'); +// print(err); +// } +// } +// +// void _conferenceRoomUpdated() { +// setState(() {}); +// } +// } diff --git a/lib/pages/conference/conference_room.dart b/lib/pages/conference/conference_room.dart new file mode 100644 index 00000000..b68f8ee8 --- /dev/null +++ b/lib/pages/conference/conference_room.dart @@ -0,0 +1,529 @@ +// import 'dart:async'; +// import 'dart:typed_data'; +// +// import 'package:diplomaticquarterapp/pages/conference/participant_widget.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter/services.dart'; +// +// class ConferenceRoom with ChangeNotifier { +// final String name; +// final String token; +// final String identity; +// +// final StreamController _onAudioEnabledStreamController = StreamController.broadcast(); +// Stream onAudioEnabled; +// final StreamController _onVideoEnabledStreamController = StreamController.broadcast(); +// Stream onVideoEnabled; +// final StreamController _onExceptionStreamController = StreamController.broadcast(); +// Stream onException; +// +// final Completer _completer = Completer(); +// +// final List _participants = []; +// final List _participantBuffer = []; +// final List _streamSubscriptions = []; +// final List _dataTracks = []; +// final List _messages = []; +// +// CameraCapturer _cameraCapturer; +// Room _room; +// Timer _timer; +// +// ConferenceRoom({ +// @required this.name, +// @required this.token, +// @required this.identity, +// }) { +// onAudioEnabled = _onAudioEnabledStreamController.stream; +// onVideoEnabled = _onVideoEnabledStreamController.stream; +// onException = _onExceptionStreamController.stream; +// } +// +// List get participants { +// return [..._participants]; +// } +// +// Future connect() async { +// print('ConferenceRoom.connect()'); +// try { +// await TwilioProgrammableVideo.debug(dart: true, native: true); +// await TwilioProgrammableVideo.setSpeakerphoneOn(true); +// +// _cameraCapturer = CameraCapturer(CameraSource.FRONT_CAMERA); +// var connectOptions = ConnectOptions( +// token, +// roomName: name, +// preferredAudioCodecs: [OpusCodec()], +// audioTracks: [LocalAudioTrack(true)], +// dataTracks: [LocalDataTrack()], +// videoTracks: [LocalVideoTrack(true, _cameraCapturer)], +// enableDominantSpeaker: true, +// ); +// +// _room = await TwilioProgrammableVideo.connect(connectOptions); +// +// _streamSubscriptions.add(_room.onConnected.listen(_onConnected)); +// _streamSubscriptions.add(_room.onConnectFailure.listen(_onConnectFailure)); +// +// return _completer.future; +// } catch (err) { +// print(err); +// rethrow; +// } +// } +// +// Future disconnect() async { +// print('ConferenceRoom.disconnect()'); +// if (_timer != null) { +// _timer.cancel(); +// } +// await _room.disconnect(); +// } +// +// @override +// void dispose() { +// print('ConferenceRoom.dispose()'); +// _disposeStreamsAndSubscriptions(); +// super.dispose(); +// } +// +// Future _disposeStreamsAndSubscriptions() async { +// await _onAudioEnabledStreamController.close(); +// await _onVideoEnabledStreamController.close(); +// await _onExceptionStreamController.close(); +// for (var streamSubscription in _streamSubscriptions) { +// await streamSubscription.cancel(); +// } +// } +// +// Future sendMessage(String message) async { +// final tracks = _room.localParticipant.localDataTracks; +// final localDataTrack = tracks.isEmpty ? null : tracks[0].localDataTrack; +// if (localDataTrack == null || _messages.isNotEmpty) { +// print('ConferenceRoom.sendMessage => Track is not available yet, buffering message.'); +// _messages.add(message); +// return; +// } +// await localDataTrack.send(message); +// } +// +// Future sendBufferMessage(ByteBuffer message) async { +// final tracks = _room.localParticipant.localDataTracks; +// final localDataTrack = tracks.isEmpty ? null : tracks[0].localDataTrack; +// if (localDataTrack == null) { +// return; +// } +// await localDataTrack.sendBuffer(message); +// } +// +// Future toggleVideoEnabled() async { +// final tracks = _room.localParticipant.localVideoTracks; +// final localVideoTrack = tracks.isEmpty ? null : tracks[0].localVideoTrack; +// if (localVideoTrack == null) { +// print('ConferenceRoom.toggleVideoEnabled() => Track is not available yet!'); +// return; +// } +// await localVideoTrack.enable(!localVideoTrack.isEnabled); +// +// var index = _participants.indexWhere((ParticipantWidget participant) => !participant.isRemote); +// if (index < 0) { +// return; +// } +// var participant = _participants[index]; +// _participants.replaceRange( +// index, +// index + 1, +// [ +// participant.copyWith(videoEnabled: localVideoTrack.isEnabled), +// ], +// ); +// print('ConferenceRoom.toggleVideoEnabled() => ${localVideoTrack.isEnabled}'); +// _onVideoEnabledStreamController.add(localVideoTrack.isEnabled); +// notifyListeners(); +// } +// +// Future toggleAudioEnabled() async { +// final tracks = _room.localParticipant.localAudioTracks; +// final localAudioTrack = tracks.isEmpty ? null : tracks[0].localAudioTrack; +// if (localAudioTrack == null) { +// print('ConferenceRoom.toggleAudioEnabled() => Track is not available yet!'); +// return; +// } +// await localAudioTrack.enable(!localAudioTrack.isEnabled); +// +// var index = _participants.indexWhere((ParticipantWidget participant) => !participant.isRemote); +// if (index < 0) { +// return; +// } +// var participant = _participants[index]; +// _participants.replaceRange( +// index, +// index + 1, +// [ +// participant.copyWith(audioEnabled: localAudioTrack.isEnabled), +// ], +// ); +// print('ConferenceRoom.toggleAudioEnabled() => ${localAudioTrack.isEnabled}'); +// _onAudioEnabledStreamController.add(localAudioTrack.isEnabled); +// notifyListeners(); +// } +// +// Future switchCamera() async { +// print('ConferenceRoom.switchCamera()'); +// try { +// await _cameraCapturer.switchCamera(); +// } on FormatException catch (e) { +// print( +// 'ConferenceRoom.switchCamera() failed because of FormatException with message: ${e.message}', +// ); +// } +// } +// +// void addDummy({Widget child}) { +// print('ConferenceRoom.addDummy()'); +// if (_participants.length >= 18) { +// throw PlatformException( +// code: 'ConferenceRoom.maximumReached', +// message: 'Maximum reached', +// details: 'Currently the lay-out can only render a maximum of 18 participants', +// ); +// } +// _participants.insert( +// 0, +// ParticipantWidget( +// id: (_participants.length + 1).toString(), +// child: child, +// isRemote: true, +// audioEnabled: true, +// videoEnabled: true, +// isDummy: true, +// ), +// ); +// notifyListeners(); +// } +// +// void removeDummy() { +// print('ConferenceRoom.removeDummy()'); +// var dummy = _participants.firstWhere((participant) => participant.isDummy, orElse: () => null); +// if (dummy != null) { +// _participants.remove(dummy); +// notifyListeners(); +// } +// } +// +// void _onConnected(Room room) { +// print('ConferenceRoom._onConnected => state: ${room.state}'); +// +// // When connected for the first time, add remote participant listeners +// _streamSubscriptions.add(_room.onParticipantConnected.listen(_onParticipantConnected)); +// _streamSubscriptions.add(_room.onParticipantDisconnected.listen(_onParticipantDisconnected)); +// _streamSubscriptions.add(_room.onDominantSpeakerChange.listen(_onDominantSpeakerChanged)); +// // Only add ourselves when connected for the first time too. +// _participants.add( +// _buildParticipant( +// child: room.localParticipant.localVideoTracks[0].localVideoTrack.widget(), +// id: identity, +// audioEnabled: true, +// videoEnabled: true, +// ), +// ); +// for (final remoteParticipant in room.remoteParticipants) { +// var participant = _participants.firstWhere((participant) => participant.id == remoteParticipant.sid, orElse: () => null); +// if (participant == null) { +// print('Adding participant that was already present in the room ${remoteParticipant.sid}, before I connected'); +// _addRemoteParticipantListeners(remoteParticipant); +// } +// } +// // We have to listen for the [onDataTrackPublished] event on the [LocalParticipant] in +// // order to be able to use the [send] method. +// _streamSubscriptions.add(room.localParticipant.onDataTrackPublished.listen(_onLocalDataTrackPublished)); +// notifyListeners(); +// _completer.complete(room); +// +// _timer = Timer.periodic(const Duration(minutes: 1), (_) { +// // Let's see if we can send some data over the DataTrack API +// sendMessage('And another minute has passed since I connected...'); +// // Also try the ByteBuffer way of sending data +// final list = 'This data has been sent over the ByteBuffer channel of the DataTrack API'.codeUnits; +// var bytes = Uint8List.fromList(list); +// sendBufferMessage(bytes.buffer); +// }); +// } +// +// void _onLocalDataTrackPublished(LocalDataTrackPublishedEvent event) { +// // Send buffered messages, if any... +// while (_messages.isNotEmpty) { +// var message = _messages.removeAt(0); +// print('Sending buffered message: $message'); +// event.localDataTrackPublication.localDataTrack.send(message); +// } +// } +// +// void _onConnectFailure(RoomConnectFailureEvent event) { +// print('ConferenceRoom._onConnectFailure: ${event.exception}'); +// _completer.completeError(event.exception); +// } +// +// void _onDominantSpeakerChanged(DominantSpeakerChangedEvent event) { +// print('ConferenceRoom._onDominantSpeakerChanged: ${event.remoteParticipant.identity}'); +// var oldDominantParticipant = _participants.firstWhere((p) => p.isDominant, orElse: () => null); +// if (oldDominantParticipant != null) { +// var oldDominantParticipantIndex = _participants.indexOf(oldDominantParticipant); +// _participants.replaceRange(oldDominantParticipantIndex, oldDominantParticipantIndex + 1, [oldDominantParticipant.copyWith(isDominant: false)]); +// } +// +// var newDominantParticipant = _participants.firstWhere((p) => p.id == event.remoteParticipant.sid); +// var newDominantParticipantIndex = _participants.indexOf(newDominantParticipant); +// _participants.replaceRange(newDominantParticipantIndex, newDominantParticipantIndex + 1, [newDominantParticipant.copyWith(isDominant: true)]); +// notifyListeners(); +// } +// +// void _onParticipantConnected(RoomParticipantConnectedEvent event) { +// print('ConferenceRoom._onParticipantConnected, ${event.remoteParticipant.sid}'); +// _addRemoteParticipantListeners(event.remoteParticipant); +// } +// +// void _onParticipantDisconnected(RoomParticipantDisconnectedEvent event) { +// print('ConferenceRoom._onParticipantDisconnected: ${event.remoteParticipant.sid}'); +// _participants.removeWhere((ParticipantWidget p) => p.id == event.remoteParticipant.sid); +// notifyListeners(); +// } +// +// ParticipantWidget _buildParticipant({ +// @required Widget child, +// @required String id, +// @required bool audioEnabled, +// @required bool videoEnabled, +// RemoteParticipant remoteParticipant, +// }) { +// return ParticipantWidget( +// id: remoteParticipant?.sid, +// isRemote: remoteParticipant != null, +// child: child, +// audioEnabled: audioEnabled, +// videoEnabled: videoEnabled, +// ); +// } +// +// void _addRemoteParticipantListeners(RemoteParticipant remoteParticipant) { +// print('ConferenceRoom._addRemoteParticipantListeners() => Adding listeners to remoteParticipant ${remoteParticipant.sid}'); +// _streamSubscriptions.add(remoteParticipant.onAudioTrackDisabled.listen(_onAudioTrackDisabled)); +// _streamSubscriptions.add(remoteParticipant.onAudioTrackEnabled.listen(_onAudioTrackEnabled)); +// _streamSubscriptions.add(remoteParticipant.onAudioTrackPublished.listen(_onAudioTrackPublished)); +// _streamSubscriptions.add(remoteParticipant.onAudioTrackSubscribed.listen(_onAudioTrackSubscribed)); +// _streamSubscriptions.add(remoteParticipant.onAudioTrackSubscriptionFailed.listen(_onAudioTrackSubscriptionFailed)); +// _streamSubscriptions.add(remoteParticipant.onAudioTrackUnpublished.listen(_onAudioTrackUnpublished)); +// _streamSubscriptions.add(remoteParticipant.onAudioTrackUnsubscribed.listen(_onAudioTrackUnsubscribed)); +// +// _streamSubscriptions.add(remoteParticipant.onDataTrackPublished.listen(_onDataTrackPublished)); +// _streamSubscriptions.add(remoteParticipant.onDataTrackSubscribed.listen(_onDataTrackSubscribed)); +// _streamSubscriptions.add(remoteParticipant.onDataTrackSubscriptionFailed.listen(_onDataTrackSubscriptionFailed)); +// _streamSubscriptions.add(remoteParticipant.onDataTrackUnpublished.listen(_onDataTrackUnpublished)); +// _streamSubscriptions.add(remoteParticipant.onDataTrackUnsubscribed.listen(_onDataTrackUnsubscribed)); +// +// _streamSubscriptions.add(remoteParticipant.onVideoTrackDisabled.listen(_onVideoTrackDisabled)); +// _streamSubscriptions.add(remoteParticipant.onVideoTrackEnabled.listen(_onVideoTrackEnabled)); +// _streamSubscriptions.add(remoteParticipant.onVideoTrackPublished.listen(_onVideoTrackPublished)); +// _streamSubscriptions.add(remoteParticipant.onVideoTrackSubscribed.listen(_onVideoTrackSubscribed)); +// _streamSubscriptions.add(remoteParticipant.onVideoTrackSubscriptionFailed.listen(_onVideoTrackSubscriptionFailed)); +// _streamSubscriptions.add(remoteParticipant.onVideoTrackUnpublished.listen(_onVideoTrackUnpublished)); +// _streamSubscriptions.add(remoteParticipant.onVideoTrackUnsubscribed.listen(_onVideoTrackUnsubscribed)); +// } +// +// void _onAudioTrackDisabled(RemoteAudioTrackEvent event) { +// print('ConferenceRoom._onAudioTrackDisabled(), ${event.remoteParticipant.sid}, ${event.remoteAudioTrackPublication.trackSid}, isEnabled: ${event.remoteAudioTrackPublication.isTrackEnabled}'); +// _setRemoteAudioEnabled(event); +// } +// +// void _onAudioTrackEnabled(RemoteAudioTrackEvent event) { +// print('ConferenceRoom._onAudioTrackEnabled(), ${event.remoteParticipant.sid}, ${event.remoteAudioTrackPublication.trackSid}, isEnabled: ${event.remoteAudioTrackPublication.isTrackEnabled}'); +// _setRemoteAudioEnabled(event); +// } +// +// void _onAudioTrackPublished(RemoteAudioTrackEvent event) { +// print('ConferenceRoom._onAudioTrackPublished(), ${event.remoteParticipant.sid}}'); +// } +// +// void _onAudioTrackSubscribed(RemoteAudioTrackSubscriptionEvent event) { +// print('ConferenceRoom._onAudioTrackSubscribed(), ${event.remoteParticipant.sid}, ${event.remoteAudioTrackPublication.trackSid}'); +// _addOrUpdateParticipant(event); +// } +// +// void _onAudioTrackSubscriptionFailed(RemoteAudioTrackSubscriptionFailedEvent event) { +// print('ConferenceRoom._onAudioTrackSubscriptionFailed(), ${event.remoteParticipant.sid}, ${event.remoteAudioTrackPublication.trackSid}'); +// _onExceptionStreamController.add( +// PlatformException( +// code: 'ConferenceRoom.audioTrackSubscriptionFailed', +// message: 'AudioTrack Subscription Failed', +// details: event.exception.toString(), +// ), +// ); +// } +// +// void _onAudioTrackUnpublished(RemoteAudioTrackEvent event) { +// print('ConferenceRoom._onAudioTrackUnpublished(), ${event.remoteParticipant.sid}, ${event.remoteAudioTrackPublication.trackSid}'); +// } +// +// void _onAudioTrackUnsubscribed(RemoteAudioTrackSubscriptionEvent event) { +// print('ConferenceRoom._onAudioTrackUnsubscribed(), ${event.remoteParticipant.sid}, ${event.remoteAudioTrack.sid}'); +// } +// +// void _onDataTrackPublished(RemoteDataTrackEvent event) { +// print('ConferenceRoom._onDataTrackPublished(), ${event.remoteParticipant.sid}}'); +// } +// +// void _onDataTrackSubscribed(RemoteDataTrackSubscriptionEvent event) { +// print('ConferenceRoom._onDataTrackSubscribed(), ${event.remoteParticipant.sid}, ${event.remoteDataTrackPublication.trackSid}'); +// final dataTrack = event.remoteDataTrackPublication.remoteDataTrack; +// _dataTracks.add(dataTrack); +// _streamSubscriptions.add(dataTrack.onMessage.listen(_onMessage)); +// _streamSubscriptions.add(dataTrack.onBufferMessage.listen(_onBufferMessage)); +// } +// +// void _onDataTrackSubscriptionFailed(RemoteDataTrackSubscriptionFailedEvent event) { +// print('ConferenceRoom._onDataTrackSubscriptionFailed(), ${event.remoteParticipant.sid}, ${event.remoteDataTrackPublication.trackSid}'); +// _onExceptionStreamController.add( +// PlatformException( +// code: 'ConferenceRoom.dataTrackSubscriptionFailed', +// message: 'DataTrack Subscription Failed', +// details: event.exception.toString(), +// ), +// ); +// } +// +// void _onDataTrackUnpublished(RemoteDataTrackEvent event) { +// print('ConferenceRoom._onDataTrackUnpublished(), ${event.remoteParticipant.sid}, ${event.remoteDataTrackPublication.trackSid}'); +// } +// +// void _onDataTrackUnsubscribed(RemoteDataTrackSubscriptionEvent event) { +// print('ConferenceRoom._onDataTrackUnsubscribed(), ${event.remoteParticipant.sid}, ${event.remoteDataTrack.sid}'); +// } +// +// void _onVideoTrackDisabled(RemoteVideoTrackEvent event) { +// print('ConferenceRoom._onVideoTrackDisabled(), ${event.remoteParticipant.sid}, ${event.remoteVideoTrackPublication.trackSid}, isEnabled: ${event.remoteVideoTrackPublication.isTrackEnabled}'); +// _setRemoteVideoEnabled(event); +// } +// +// void _onVideoTrackEnabled(RemoteVideoTrackEvent event) { +// print('ConferenceRoom._onVideoTrackEnabled(), ${event.remoteParticipant.sid}, ${event.remoteVideoTrackPublication.trackSid}, isEnabled: ${event.remoteVideoTrackPublication.isTrackEnabled}'); +// _setRemoteVideoEnabled(event); +// } +// +// void _onVideoTrackPublished(RemoteVideoTrackEvent event) { +// print('ConferenceRoom._onVideoTrackPublished(), ${event.remoteParticipant.sid}, ${event.remoteVideoTrackPublication.trackSid}'); +// } +// +// void _onVideoTrackSubscribed(RemoteVideoTrackSubscriptionEvent event) { +// print('ConferenceRoom._onVideoTrackSubscribed(), ${event.remoteParticipant.sid}, ${event.remoteVideoTrack.sid}'); +// _addOrUpdateParticipant(event); +// } +// +// void _onVideoTrackSubscriptionFailed(RemoteVideoTrackSubscriptionFailedEvent event) { +// print('ConferenceRoom._onVideoTrackSubscriptionFailed(), ${event.remoteParticipant.sid}, ${event.remoteVideoTrackPublication.trackSid}'); +// _onExceptionStreamController.add( +// PlatformException( +// code: 'ConferenceRoom.videoTrackSubscriptionFailed', +// message: 'VideoTrack Subscription Failed', +// details: event.exception.toString(), +// ), +// ); +// } +// +// void _onVideoTrackUnpublished(RemoteVideoTrackEvent event) { +// print('ConferenceRoom._onVideoTrackUnpublished(), ${event.remoteParticipant.sid}, ${event.remoteVideoTrackPublication.trackSid}'); +// } +// +// void _onVideoTrackUnsubscribed(RemoteVideoTrackSubscriptionEvent event) { +// print('ConferenceRoom._onVideoTrackUnsubscribed(), ${event.remoteParticipant.sid}, ${event.remoteVideoTrack.sid}'); +// } +// +// void _onMessage(RemoteDataTrackStringMessageEvent event) { +// print('onMessage => ${event.remoteDataTrack.sid}, ${event.message}'); +// } +// +// void _onBufferMessage(RemoteDataTrackBufferMessageEvent event) { +// print('onBufferMessage => ${event.remoteDataTrack.sid}, ${String.fromCharCodes(event.message.asUint8List())}'); +// } +// +// void _setRemoteAudioEnabled(RemoteAudioTrackEvent event) { +// if (event.remoteAudioTrackPublication == null) { +// return; +// } +// var index = _participants.indexWhere((ParticipantWidget participant) => participant.id == event.remoteParticipant.sid); +// if (index < 0) { +// return; +// } +// var participant = _participants[index]; +// _participants.replaceRange( +// index, +// index + 1, +// [ +// participant.copyWith(audioEnabled: event.remoteAudioTrackPublication.isTrackEnabled), +// ], +// ); +// notifyListeners(); +// } +// +// void _setRemoteVideoEnabled(RemoteVideoTrackEvent event) { +// if (event.remoteVideoTrackPublication == null) { +// return; +// } +// var index = _participants.indexWhere((ParticipantWidget participant) => participant.id == event.remoteParticipant.sid); +// if (index < 0) { +// return; +// } +// var participant = _participants[index]; +// _participants.replaceRange( +// index, +// index + 1, +// [ +// participant.copyWith(videoEnabled: event.remoteVideoTrackPublication.isTrackEnabled), +// ], +// ); +// notifyListeners(); +// } +// +// void _addOrUpdateParticipant(RemoteParticipantEvent event) { +// print('ConferenceRoom._addOrUpdateParticipant(), ${event.remoteParticipant.sid}'); +// final participant = _participants.firstWhere( +// (ParticipantWidget participant) => participant.id == event.remoteParticipant.sid, +// orElse: () => null, +// ); +// if (participant != null) { +// print('Participant found: ${participant.id}, updating A/V enabled values'); +// _setRemoteVideoEnabled(event); +// _setRemoteAudioEnabled(event); +// } else { +// final bufferedParticipant = _participantBuffer.firstWhere( +// (ParticipantBuffer participant) => participant.id == event.remoteParticipant.sid, +// orElse: () => null, +// ); +// if (bufferedParticipant != null) { +// _participantBuffer.remove(bufferedParticipant); +// } else if (event is RemoteAudioTrackEvent) { +// print('Audio subscription came first, waiting for the video subscription...'); +// _participantBuffer.add( +// ParticipantBuffer( +// id: event.remoteParticipant.sid, +// audioEnabled: event.remoteAudioTrackPublication?.remoteAudioTrack?.isEnabled ?? true, +// ), +// ); +// return; +// } +// if (event is RemoteVideoTrackSubscriptionEvent) { +// print('New participant, adding: ${event.remoteParticipant.sid}'); +// _participants.insert( +// 0, +// _buildParticipant( +// child: event.remoteVideoTrack.widget(), +// id: event.remoteParticipant.sid, +// remoteParticipant: event.remoteParticipant, +// audioEnabled: bufferedParticipant?.audioEnabled ?? true, +// videoEnabled: event.remoteVideoTrackPublication?.remoteVideoTrack?.isEnabled ?? true, +// ), +// ); +// } +// notifyListeners(); +// } +// } +// } diff --git a/lib/pages/conference/draggable_publisher.dart b/lib/pages/conference/draggable_publisher.dart new file mode 100644 index 00000000..94c15af9 --- /dev/null +++ b/lib/pages/conference/draggable_publisher.dart @@ -0,0 +1,173 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:diplomaticquarterapp/pages/conference/clipped_video.dart'; +import 'package:flutter/material.dart'; + +class DraggablePublisher extends StatefulWidget { + final Size availableScreenSize; + final Widget child; + final double scaleFactor; + final Stream onButtonBarVisible; + final Stream onButtonBarHeight; + + const DraggablePublisher({ + Key? key, + required this.availableScreenSize, + required this.child, + required this.onButtonBarVisible, + required this.onButtonBarHeight, + + /// The portion of the screen the DraggableWidget should use. + this.scaleFactor = .25, + }) : assert(scaleFactor != null && scaleFactor > 0 && scaleFactor <= .4), + assert(availableScreenSize != null), + assert(onButtonBarVisible != null), + assert(onButtonBarHeight != null), + super(key: key); + + @override + _DraggablePublisherState createState() => _DraggablePublisherState(); +} + +class _DraggablePublisherState extends State { + bool _isButtonBarVisible = true; + double _buttonBarHeight = 0; + late double _width; + late double _height; + late double _top; + late double _left; + late double _viewPaddingTop; + late double _viewPaddingBottom; + final double _padding = 8.0; + final Duration _duration300ms = const Duration(milliseconds: 300); + final Duration _duration0ms = const Duration(milliseconds: 0); + late Duration _duration; + late StreamSubscription _streamSubscription; + late StreamSubscription _streamHeightSubscription; + + @override + void initState() { + super.initState(); + _duration = _duration300ms; + _width = widget.availableScreenSize.width * widget.scaleFactor; + _height = _width * (widget.availableScreenSize.height / widget.availableScreenSize.width); + _top = widget.availableScreenSize.height - (_buttonBarHeight + _padding) - _height; + _left = widget.availableScreenSize.width - _padding - _width; + + _streamSubscription = widget.onButtonBarVisible.listen(_buttonBarVisible); + _streamHeightSubscription = widget.onButtonBarHeight.listen(_getButtonBarHeight); + } + + @override + void didChangeDependencies() { + final mediaQuery = MediaQuery.of(context); + _viewPaddingTop = mediaQuery.viewPadding.top; + _viewPaddingBottom = mediaQuery.viewPadding.bottom; + super.didChangeDependencies(); + } + + @override + void dispose() { + _streamSubscription.cancel(); + _streamHeightSubscription.cancel(); + super.dispose(); + } + + void _getButtonBarHeight(double height) { + setState(() { + _buttonBarHeight = height; + _positionWidget(); + }); + } + + void _buttonBarVisible(bool visible) { + if (!mounted) { + return; + } + setState(() { + _isButtonBarVisible = visible; + if (_duration == _duration300ms) { + // only position the widget when we are not currently dragging it around + _positionWidget(); + } + }); + } + + @override + Widget build(BuildContext context) { + return AnimatedPositioned( + top: _top, + left: _left, + width: _width, + height: _height, + duration: _duration, + child: Listener( + onPointerDown: (_) => _duration = _duration0ms, + onPointerMove: (PointerMoveEvent event) { + setState(() { + _left = (_left + event.delta.dx).roundToDouble(); + _top = (_top + event.delta.dy).roundToDouble(); + }); + }, + onPointerUp: (_) => _positionWidget(), + onPointerCancel: (_) => _positionWidget(), + child: ClippedVideo( + height: _height, + width: _width, + child: widget.child, + ), + ), + ); + } + + double _getCurrentStatusBarHeight() { + if (_isButtonBarVisible) { + return _viewPaddingTop; + } + final _defaultViewPaddingTop = Platform.isIOS ? 20.0 : Platform.isAndroid ? 24.0 : 0.0; + if (_viewPaddingTop > _defaultViewPaddingTop) { + // There must be a hardware notch in the display. + return _viewPaddingTop; + } + return 0.0; + } + + double _getCurrentButtonBarHeight() { + if (_isButtonBarVisible) { + return _buttonBarHeight + _viewPaddingBottom; + } + return _viewPaddingBottom; + } + + void _positionWidget() { + // Determine the center of the object being dragged so we can decide + // in which corner the object should be placed. + var dx = (_width / 2) + _left; + dx = dx < 0 ? 0 : dx >= widget.availableScreenSize.width ? widget.availableScreenSize.width - 1 : dx; + var dy = (_height / 2) + _top; + dy = dy < 0 ? 0 : dy >= widget.availableScreenSize.height ? widget.availableScreenSize.height - 1 : dy; + final draggableCenter = Offset(dx, dy); + + setState(() { + _duration = _duration300ms; + if (Rect.fromLTRB(0, 0, widget.availableScreenSize.width / 2, widget.availableScreenSize.height / 2).contains(draggableCenter)) { + // Top-left + _top = _getCurrentStatusBarHeight() + _padding; + _left = _padding; + } else if (Rect.fromLTRB(widget.availableScreenSize.width / 2, 0, widget.availableScreenSize.width, widget.availableScreenSize.height / 2).contains(draggableCenter)) { + // Top-right + _top = _getCurrentStatusBarHeight() + _padding; + _left = widget.availableScreenSize.width - _padding - _width; + } else if (Rect.fromLTRB(0, widget.availableScreenSize.height / 2, widget.availableScreenSize.width / 2, widget.availableScreenSize.height).contains(draggableCenter)) { + // Bottom-left + _top = widget.availableScreenSize.height - (_getCurrentButtonBarHeight() + _padding) - _height; + _left = _padding; + } else if (Rect.fromLTRB(widget.availableScreenSize.width / 2, widget.availableScreenSize.height / 2, widget.availableScreenSize.width, widget.availableScreenSize.height).contains(draggableCenter)) { + // Bottom-right + _top = widget.availableScreenSize.height - (_getCurrentButtonBarHeight() + _padding) - _height; + _left = widget.availableScreenSize.width - _padding - _width; + } + }); + } +} diff --git a/lib/pages/conference/participant_widget.dart b/lib/pages/conference/participant_widget.dart new file mode 100644 index 00000000..b9bfafcf --- /dev/null +++ b/lib/pages/conference/participant_widget.dart @@ -0,0 +1,197 @@ +import 'dart:ui'; + +import 'package:flutter/material.dart'; + +class ParticipantBuffer { + final bool audioEnabled; + final String id; + + ParticipantBuffer({ + required this.audioEnabled, + required this.id, + }) : assert(audioEnabled != null), + assert(id != null); +} + +class ParticipantWidget extends StatelessWidget { + final Widget child; + final String id; + final bool audioEnabled; + final bool videoEnabled; + final bool isRemote; + final bool isDummy; + final bool isDominant; + + const ParticipantWidget({ + Key? key, + required this.child, + required this.audioEnabled, + required this.videoEnabled, + required this.id, + required this.isRemote, + this.isDominant = false, + this.isDummy = false, + }) : assert(child != null), + assert(audioEnabled != null), + assert(videoEnabled != null), + assert(isRemote != null), + assert(isDominant != null), + assert(isDummy != null), + super(key: key); + + ParticipantWidget copyWith({ + Widget? child, + bool? audioEnabled, + bool? videoEnabled, + bool? isDominant, + }) { + return ParticipantWidget( + id: id, + child: child ?? this.child, + audioEnabled: audioEnabled ?? this.audioEnabled, + videoEnabled: videoEnabled ?? this.videoEnabled, + isDominant: isDominant ?? this.isDominant, + isRemote: isRemote, + ); + } + + @override + Widget build(BuildContext context) { + final children = []; + final icons = []; + if (!videoEnabled) { + icons.add(_buildVideoEnabledIcon()); + children.add( + ClipRect( + // Need to clip this BackdropFilter, otherwise it will blur the entire screen + child: BackdropFilter( + filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), + child: Container( + decoration: BoxDecoration(color: Colors.black.withOpacity(.1)), + child: child, + ), + ), + ), + ); + } else { + children.add(child); + } + children.add(Padding( + padding: const EdgeInsets.all(8.0), + child: AnimatedOpacity( + duration: Duration(milliseconds: 500), + opacity: isDominant ? 1 : 0, + child: Icon( + Icons.volume_up, + color: Colors.white, + ), + ), + )); + if (!audioEnabled) { + icons.add(_buildAudioEnabledIcon()); + } + if (icons.isNotEmpty) { + if (isRemote) { + final rows = []; + rows.add(_buildRow(icons)); + if (!audioEnabled && !videoEnabled) { + rows.add(_buildRow(_fitText('The camera and microphone are off', Colors.white24))); + } else if (!audioEnabled) { + rows.add(_buildRow(_fitText('The microphone is off', Colors.black26))); + } else if (!videoEnabled) { + rows.add(_buildRow(_fitText('The camera is off', Colors.white24))); + } + children.add( + Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: rows, + ), + ); + } else { + children.add(Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: icons, + )); + } + } + + return Stack( + children: children, + ); + } + + List _fitText(String text, Color color) { + return [ + Flexible( + child: FittedBox( + fit: BoxFit.scaleDown, + child: Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: Text(text, maxLines: 1, style: _buildTextStyle(color)), + ), + ), + ), + ]; + } + + TextStyle _buildTextStyle(Color color) { + return TextStyle( + color: color, + shadows: [ + Shadow( + blurRadius: 1.0, + color: Color.fromARGB(255, 0, 0, 0), + ), + Shadow( + blurRadius: 1.0, + color: Color.fromARGB(24, 255, 255, 255), + ), + ], + fontSize: 15, + ); + } + + Widget _buildRow(List children) { + return Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: children, + ); + } + + Widget _buildAudioEnabledIcon() { + return Padding( + padding: const EdgeInsets.all(8), + child: CircleAvatar( + maxRadius: 15, + child: FittedBox( + child: Icon( + Icons.mic_off, + color: Colors.black, + key: Key('microphone-off-icon'), + ), + ), + backgroundColor: Colors.white24, + ), + ); + } + + Widget _buildVideoEnabledIcon() { + return Padding( + padding: const EdgeInsets.all(8), + child: CircleAvatar( + maxRadius: 15, + child: FittedBox( + child: Icon( + Icons.videocam_off, + color: Colors.black, + key: Key('videocam-off-icon'), + ), + ), + backgroundColor: Colors.white24, + ), + ); + } +} diff --git a/lib/pages/conference/web_rtc/call_home_page.dart b/lib/pages/conference/web_rtc/call_home_page.dart new file mode 100644 index 00000000..dd841a6c --- /dev/null +++ b/lib/pages/conference/web_rtc/call_home_page.dart @@ -0,0 +1,61 @@ +// import 'dart:async'; +// +// import 'package:diplomaticquarterapp/pages/conference/web_rtc/widgets/cam_view_widget.dart'; +// import 'package:diplomaticquarterapp/pages/conference/widgets/noise_box.dart'; +// import 'package:diplomaticquarterapp/pages/webRTC/signaling.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter/services.dart'; +// // import 'package:flutter_webrtc/flutter_webrtc.dart'; +// +// import '../conference_button_bar.dart'; +// +// class CallHomePage extends StatefulWidget { +// final String receiverId; +// final String callerId; +// +// const CallHomePage({Key key, this.receiverId, this.callerId}) : super(key: key); +// +// @override +// _CallHomePageState createState() => _CallHomePageState(); +// } +// +// class _CallHomePageState extends State { +// bool showNoise = false; +// // RTCVideoRenderer _localRenderer = RTCVideoRenderer(); +// // RTCVideoRenderer _remoteRenderer = RTCVideoRenderer(); +// +// final StreamController _audioButton = StreamController.broadcast(); +// final StreamController _videoButton = StreamController.broadcast(); +// final StreamController _onButtonBarVisibleStreamController = StreamController.broadcast(); +// final StreamController _onButtonBarHeightStreamController = StreamController.broadcast(); +// +// //Stream to enable video +// // MediaStream localMediaStream; +// // MediaStream remoteMediaStream; +// Signaling signaling = Signaling()..init(); +// +// @override +// void initState() { +// // TODO: implement initState +// super.initState(); +// startCall(); +// } +// +// startCall() async{ +// // await _localRenderer.initialize(); +// // await _remoteRenderer.initialize(); +// } +// +// Future _disposeStreamsAndSubscriptions() async { +// if (_onButtonBarVisibleStreamController != null) await _onButtonBarVisibleStreamController.close(); +// if (_onButtonBarHeightStreamController != null) await _onButtonBarHeightStreamController.close(); +// } +// +// @override +// Widget build(BuildContext context) { +// return Scaffold( +// backgroundColor: Colors.white, +// body: Container() //showNoise ? _buildNoiseBox() : buildLayout(), +// ); +// } +// } diff --git a/lib/pages/conference/web_rtc/call_home_page_.dart b/lib/pages/conference/web_rtc/call_home_page_.dart new file mode 100644 index 00000000..13dbfb35 --- /dev/null +++ b/lib/pages/conference/web_rtc/call_home_page_.dart @@ -0,0 +1,204 @@ +// import 'dart:async'; +// import 'dart:convert'; +// +// import 'package:diplomaticquarterapp/pages/conference/web_rtc/widgets/cam_view_widget.dart'; +// import 'package:diplomaticquarterapp/pages/conference/widgets/noise_box.dart'; +// import 'package:diplomaticquarterapp/pages/webRTC/signaling.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter/services.dart'; +// import 'package:flutter_webrtc/flutter_webrtc.dart'; +// +// import '../conference_button_bar.dart'; +// +// class CallHomePage extends StatefulWidget { +// final String receiverId; +// final String callerId; +// +// const CallHomePage({Key key, this.receiverId, this.callerId}) : super(key: key); +// +// @override +// _CallHomePageState createState() => _CallHomePageState(); +// } +// +// class _CallHomePageState extends State { +// bool showNoise = true; +// RTCVideoRenderer _localRenderer = RTCVideoRenderer(); +// RTCVideoRenderer _remoteRenderer = RTCVideoRenderer(); +// +// final StreamController _audioButton = StreamController.broadcast(); +// final StreamController _videoButton = StreamController.broadcast(); +// final StreamController _onButtonBarVisibleStreamController = StreamController.broadcast(); +// final StreamController _onButtonBarHeightStreamController = StreamController.broadcast(); +// +// //Stream to enable video +// MediaStream localMediaStream; +// MediaStream remoteMediaStream; +// Signaling signaling = Signaling(); +// +// @override +// void initState() { +// // TODO: implement initState +// super.initState(); +// startCall(); +// } +// +// startCall() async{ +// await _localRenderer.initialize(); +// await _remoteRenderer.initialize(); +// await signaling.init(); +// final connected = await receivedCall(); +// } +// +// +// Future receivedCall() async { +// //Stream local media +// localMediaStream = await navigator.mediaDevices.getUserMedia({'video': true, 'audio': true}); +// _localRenderer.srcObject = localMediaStream; +// +// final connected = await signaling.acceptCall(widget.callerId, widget.receiverId, localMediaStream: localMediaStream, +// onRemoteMediaStream: (remoteMediaStream){ +// +// // print(remoteMediaStream.toString()); +// // print(json.encode(remoteMediaStream.getTracks().asMap())); +// this.remoteMediaStream = remoteMediaStream; +// _remoteRenderer.srcObject = remoteMediaStream; +// _remoteRenderer.addListener(() { +// print('_remoteRenderer'); +// print(_remoteRenderer); +// setState(() {}); +// }); +// }, +// onRemoteTrack: (track){ +// _remoteRenderer.srcObject.addTrack(track.track); +// // setState(() { +// // }); +// +// print(track.streams.first.getVideoTracks()); +// print(track.streams.first.getAudioTracks()); +// print(json.encode(track.streams.asMap())); +// } +// ); +// +// if(connected){ +// signaling.signalR.listen( +// onAcceptCall: (arg0){ +// print(arg0.toString()); +// }, +// onCandidate: (candidateJson){ +// signaling.addCandidate(candidateJson); +// }, +// onDeclineCall: (arg0,arg1){ +// // _onHangup(); +// }, +// onHangupCall: (arg0){ +// // _onHangup(); +// }, +// +// onOffer: (offerSdp, callerUser) async{ +// print('${offerSdp.toString()} | ${callerUser.toString()}'); +// await signaling.answerOffer(offerSdp); +// } +// ); +// } +// return connected; +// } +// +// @override +// void dispose() { +// // TODO: implement dispose +// super.dispose(); +// signaling.dispose(); +// _localRenderer?.dispose(); +// _remoteRenderer?.dispose(); +// _audioButton?.close(); +// _videoButton?.close(); +// localMediaStream?.dispose(); +// remoteMediaStream?.dispose(); +// _disposeStreamsAndSubscriptions(); +// } +// +// Future _disposeStreamsAndSubscriptions() async { +// if (_onButtonBarVisibleStreamController != null) await _onButtonBarVisibleStreamController.close(); +// if (_onButtonBarHeightStreamController != null) await _onButtonBarHeightStreamController.close(); +// } +// +// @override +// Widget build(BuildContext context) { +// return Scaffold( +// backgroundColor: Colors.white, +// body: buildLayout(), +// ); +// } +// +// LayoutBuilder buildLayout() { +// return LayoutBuilder( +// builder: (BuildContext context, BoxConstraints constraints) { +// return Stack( +// children: [ +// CamViewWidget( +// localRenderer: _localRenderer, +// remoteRenderer: _remoteRenderer, +// constraints: constraints, +// onButtonBarVisibleStreamController: _onButtonBarVisibleStreamController, +// onButtonBarHeightStreamController: _onButtonBarHeightStreamController, +// ), +// ConferenceButtonBar( +// audioEnabled: _audioButton.stream, +// videoEnabled: _videoButton.stream, +// onAudioEnabled: _onAudioEnable, +// onVideoEnabled: _onVideoEnabled, +// onSwitchCamera: _onSwitchCamera, +// onHangup: _onHangup, +// onPersonAdd: () {}, +// onPersonRemove: () {}, +// onHeight: _onHeightBar, +// onShow: _onShowBar, +// onHide: _onHideBar, +// ), +// ], +// ); +// }, +// ); +// } +// +// Function _onAudioEnable() { +// final audioTrack = localMediaStream.getAudioTracks()[0]; +// final mute = audioTrack.muted; +// Helper.setMicrophoneMute(!mute, audioTrack); +// _audioButton.add(mute); +// } +// +// Function _onVideoEnabled() { +// final videoTrack = localMediaStream.getVideoTracks()[0]; +// bool videoEnabled = videoTrack.enabled; +// localMediaStream.getVideoTracks()[0].enabled = !videoEnabled; +// _videoButton.add(!videoEnabled); +// } +// +// Function _onSwitchCamera() { +// Helper.switchCamera(localMediaStream.getVideoTracks()[0]); +// } +// +// void _onShowBar() { +// setState(() { +// }); +// _onButtonBarVisibleStreamController.add(true); +// } +// +// void _onHeightBar(double height) { +// _onButtonBarHeightStreamController.add(height); +// } +// +// void _onHideBar() { +// setState(() { +// SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]); +// }); +// _onButtonBarVisibleStreamController.add(false); +// } +// +// Future _onHangup() async { +// signaling.hangupCall(widget.callerId, widget.receiverId); +// print('onHangup'); +// Navigator.of(context).pop(); +// } +// } diff --git a/lib/pages/conference/web_rtc/widgets/cam_view_widget.dart b/lib/pages/conference/web_rtc/widgets/cam_view_widget.dart new file mode 100644 index 00000000..d9d030a7 --- /dev/null +++ b/lib/pages/conference/web_rtc/widgets/cam_view_widget.dart @@ -0,0 +1,82 @@ +// import 'dart:async'; +// import 'dart:core'; +// +// import 'package:diplomaticquarterapp/pages/conference/widgets/noise_box.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter_webrtc/flutter_webrtc.dart'; +// +// import 'draggable_cam.dart'; +// +// class CamViewWidget extends StatefulWidget { +// RTCVideoRenderer? localRenderer; +// RTCVideoRenderer? remoteRenderer; +// MediaStream? localStream; +// BoxConstraints? constraints; +// StreamController? onButtonBarVisibleStreamController; +// StreamController? onButtonBarHeightStreamController; +// +// CamViewWidget({this.localRenderer, this.remoteRenderer, this.constraints, this.onButtonBarVisibleStreamController, this.onButtonBarHeightStreamController}); +// +// @override +// _CamViewWidgetState createState() => _CamViewWidgetState(); +// } +// +// class _CamViewWidgetState extends State { +// @override +// void initState() { +// super.initState(); +// } +// +// @override +// Widget build(BuildContext context) { +// return Container( +// width: double.infinity, +// height: double.infinity, +// child: Stack( +// children: [ +// FractionallySizedBox( +// heightFactor: 1, widthFactor: 1, +// child: Container( +// color: Colors.black87, +// // child: RTCVideoView(widget.remoteRenderer!, mirror: true,filterQuality: FilterQuality.medium,), +// ), +// ), +// +// if(widget.remoteRenderer!.srcObject == null) +// Positioned.fill(child: _buildNoiseBox()), +// +// // Positioned.fill( +// // child: RTCVideoView(widget.remoteRenderer!) +// // ), +// +// // DraggableCam( +// // key: Key('publisher'), +// // onButtonBarHeight: widget.onButtonBarHeightStreamController!.stream, +// // onButtonBarVisible: widget.onButtonBarVisibleStreamController!.stream, +// // availableScreenSize: widget.constraints!.biggest, +// // child: RTCVideoView(widget.localRenderer!) +// // ), +// +// if(widget.remoteRenderer!.srcObject == null) +// Container( +// margin: EdgeInsets.all(MediaQuery.of(context).size.width/8), +// child: Text( +// 'Waiting for another participant to connect to the call...', +// key: Key('text-wait'), +// textAlign: TextAlign.center, +// style: TextStyle(color: Colors.white), +// ) +// ), +// ], +// ), +// ); +// } +// +// +// Widget _buildNoiseBox() { +// return NoiseBox( +// density: NoiseBoxDensity.xHigh, +// backgroundColor: Colors.grey.shade900, +// ); +// } +// } diff --git a/lib/pages/conference/web_rtc/widgets/draggable_cam.dart b/lib/pages/conference/web_rtc/widgets/draggable_cam.dart new file mode 100644 index 00000000..2fef0dad --- /dev/null +++ b/lib/pages/conference/web_rtc/widgets/draggable_cam.dart @@ -0,0 +1,173 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:diplomaticquarterapp/pages/conference/clipped_video.dart'; +import 'package:flutter/material.dart'; + +class DraggableCam extends StatefulWidget { + final Size availableScreenSize; + final Widget child; + final double scaleFactor; + final Stream onButtonBarVisible; + final Stream onButtonBarHeight; + + const DraggableCam({ + Key? key, + required this.availableScreenSize, + required this.child, + required this.onButtonBarVisible, + required this.onButtonBarHeight, + + /// The portion of the screen the DraggableWidget should use. + this.scaleFactor = .25, + }) : assert(scaleFactor != null && scaleFactor > 0 && scaleFactor <= .4), + assert(availableScreenSize != null), + assert(onButtonBarVisible != null), + assert(onButtonBarHeight != null), + super(key: key); + + @override + _DraggablePublisherState createState() => _DraggablePublisherState(); +} + +class _DraggablePublisherState extends State { + bool _isButtonBarVisible = true; + double _buttonBarHeight = 0; + double? _width; + double? _height; + double? _top; + double? _left; + double? _viewPaddingTop; + double? _viewPaddingBottom; + final double _padding = 8.0; + final Duration _duration300ms = const Duration(milliseconds: 300); + final Duration _duration0ms = const Duration(milliseconds: 0); + Duration? _duration; + StreamSubscription? _streamSubscription; + StreamSubscription? _streamHeightSubscription; + + @override + void initState() { + super.initState(); + _duration = _duration300ms; + _width = widget.availableScreenSize.width * widget.scaleFactor; + _height = _width! * (widget.availableScreenSize.height / widget.availableScreenSize.width); + _top = widget.availableScreenSize.height - (_buttonBarHeight + _padding) - _height!; + _left = widget.availableScreenSize.width - _padding - _width!; + + _streamSubscription = widget.onButtonBarVisible.listen(_buttonBarVisible); + _streamHeightSubscription = widget.onButtonBarHeight.listen(_getButtonBarHeight); + } + + @override + void didChangeDependencies() { + final mediaQuery = MediaQuery.of(context); + _viewPaddingTop = mediaQuery.viewPadding.top; + _viewPaddingBottom = mediaQuery.viewPadding.bottom; + super.didChangeDependencies(); + } + + @override + void dispose() { + _streamSubscription!.cancel(); + _streamHeightSubscription!.cancel(); + super.dispose(); + } + + void _getButtonBarHeight(double height) { + setState(() { + _buttonBarHeight = height; + _positionWidget(); + }); + } + + void _buttonBarVisible(bool visible) { + if (!mounted) { + return; + } + setState(() { + _isButtonBarVisible = visible; + if (_duration == _duration300ms) { + // only position the widget when we are not currently dragging it around + _positionWidget(); + } + }); + } + + @override + Widget build(BuildContext context) { + return AnimatedPositioned( + top: _top, + left: _left, + width: _width, + height: _height, + duration: _duration!, + child: Listener( + onPointerDown: (_) => _duration = _duration0ms, + onPointerMove: (PointerMoveEvent event) { + setState(() { + _left = (_left! + event.delta.dx).roundToDouble(); + _top = (_top! + event.delta.dy).roundToDouble(); + }); + }, + onPointerUp: (_) => _positionWidget(), + onPointerCancel: (_) => _positionWidget(), + child: ClippedVideo( + height: _height!, + width: _width!, + child: widget.child, + ), + ), + ); + } + + double _getCurrentStatusBarHeight() { + if (_isButtonBarVisible) { + return _viewPaddingTop!; + } + final _defaultViewPaddingTop = Platform.isIOS ? 20.0 : Platform.isAndroid ? 24.0 : 0.0; + if (_viewPaddingTop! > _defaultViewPaddingTop) { + // There must be a hardware notch in the display. + return _viewPaddingTop!; + } + return 0.0; + } + + double _getCurrentButtonBarHeight() { + if (_isButtonBarVisible) { + return _buttonBarHeight + _viewPaddingBottom!; + } + return _viewPaddingBottom!; + } + + void _positionWidget() { + // Determine the center of the object being dragged so we can decide + // in which corner the object should be placed. + var dx = (_width! / 2) + _left!; + dx = dx < 0 ? 0 : dx >= widget.availableScreenSize.width ? widget.availableScreenSize.width - 1 : dx; + var dy = (_height! / 2) + _top!; + dy = dy < 0 ? 0 : dy >= widget.availableScreenSize.height ? widget.availableScreenSize.height - 1 : dy; + final draggableCenter = Offset(dx, dy); + + setState(() { + _duration = _duration300ms; + if (Rect.fromLTRB(0, 0, widget.availableScreenSize.width / 2, widget.availableScreenSize.height / 2).contains(draggableCenter)) { + // Top-left + _top = _getCurrentStatusBarHeight() + _padding; + _left = _padding; + } else if (Rect.fromLTRB(widget.availableScreenSize.width / 2, 0, widget.availableScreenSize.width, widget.availableScreenSize.height / 2).contains(draggableCenter)) { + // Top-right + _top = _getCurrentStatusBarHeight() + _padding; + _left = widget.availableScreenSize.width - _padding - _width!; + } else if (Rect.fromLTRB(0, widget.availableScreenSize.height / 2, widget.availableScreenSize.width / 2, widget.availableScreenSize.height).contains(draggableCenter)) { + // Bottom-left + _top = widget.availableScreenSize.height - (_getCurrentButtonBarHeight() + _padding) - _height!; + _left = _padding; + } else if (Rect.fromLTRB(widget.availableScreenSize.width / 2, widget.availableScreenSize.height / 2, widget.availableScreenSize.width, widget.availableScreenSize.height).contains(draggableCenter)) { + // Bottom-right + _top = widget.availableScreenSize.height - (_getCurrentButtonBarHeight() + _padding) - _height!; + _left = widget.availableScreenSize.width - _padding - _width!; + } + }); + } +} diff --git a/lib/pages/conference/widgets/button_to_progress.dart b/lib/pages/conference/widgets/button_to_progress.dart new file mode 100644 index 00000000..da7850c2 --- /dev/null +++ b/lib/pages/conference/widgets/button_to_progress.dart @@ -0,0 +1,106 @@ +import 'dart:async'; +import 'dart:math' as math; + +import 'package:flutter/material.dart'; + +class ButtonToProgress extends StatefulWidget { + final double height; + final double progressHeight; + final String? loadingText; + final Duration duration; + final TextStyle? loadingTextStyle; + final VoidCallback? onPressed; + final Stream? onLoading; + final Widget child; + + const ButtonToProgress({ + Key? key, + this.height = 40.0, + this.progressHeight = 5.0, + this.loadingText, + this.duration = const Duration(milliseconds: 300), + this.loadingTextStyle, + this.onPressed, + this.onLoading, + required this.child, + }) : assert(child != null), + assert(height != null && height > 0), + assert(progressHeight != null && progressHeight > 0 && progressHeight <= height), + super(key: key); + + @override + _ButtonToProgressState createState() => _ButtonToProgressState(); +} + +class _ButtonToProgressState extends State { + double? _height; + double _opacity = 0; + bool _isLoading = false; + + StreamSubscription? _subscription; + + @override + void initState() { + super.initState(); + _height = widget.height; + if (widget.onLoading != null) { + _subscription = widget.onLoading!.listen((bool isLoading) { + setState(() { + _isLoading = isLoading; + _height = isLoading ? widget.progressHeight : widget.height; + _opacity = isLoading ? 1 : 0; + }); + }); + } + } + + @override + void dispose() { + if (_subscription != null) { + _subscription!.cancel(); + } + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Container( + height: widget.height, + child: Stack( + children: [ + if (widget.loadingText == null) + Container() + else + Padding( + padding: EdgeInsets.only(bottom: widget.progressHeight), + child: AnimatedOpacity( + child: Center( + child: FittedBox( + child: Text( + widget.loadingText!, + style: widget.loadingTextStyle, + ), + ), + ), + opacity: _opacity, + duration: Duration(milliseconds: widget.duration.inMilliseconds + 200), + curve: Curves.easeInCubic, + ), + ), + AnimatedPadding( + duration: widget.duration, + padding: EdgeInsets.only( + top: math.max(widget.height - _height!, 0), + ), + child: AnimatedContainer( + duration: widget.duration, + height: _height, + width: double.infinity, + child: _isLoading ? const LinearProgressIndicator() : widget.child, + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/conference/widgets/circle_button.dart b/lib/pages/conference/widgets/circle_button.dart new file mode 100644 index 00000000..b49c1e70 --- /dev/null +++ b/lib/pages/conference/widgets/circle_button.dart @@ -0,0 +1,103 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:native_device_orientation/native_device_orientation.dart'; + +class CircleButton extends StatefulWidget { + final VoidCallback? onLongPress; + final VoidCallback? onPressed; + final GestureTapDownCallback? onTapDown; + final VoidCallback? onTapCancel; + final Widget? child; + final Color? color; + final double? radius; + + const CircleButton({ + Key? key, + this.onLongPress, + this.onPressed, + this.child, + this.color, + this.radius = 25.0, + this.onTapCancel, + this.onTapDown, + }) : assert(radius != null), + super(key: key); + + @override + _CircleButtonState createState() => _CircleButtonState(); +} + +class _CircleButtonState extends State { + double _rotationAngle = 0.0; + + final Stream _orientationStream = NativeDeviceOrientationCommunicator().onOrientationChanged(useSensor: true); + late StreamSubscription _orientationSubscription; + + void _handleOrientationChange(NativeDeviceOrientation orientation) { + var targetAngle = 0.0; + switch (orientation) { + case NativeDeviceOrientation.unknown: + case NativeDeviceOrientation.portraitUp: + targetAngle = 0.0; + break; + case NativeDeviceOrientation.portraitDown: + targetAngle = 180.0; + break; + case NativeDeviceOrientation.landscapeLeft: + targetAngle = 90.0; + break; + case NativeDeviceOrientation.landscapeRight: + targetAngle = 270.0; + break; + } + setState(() { + _rotationAngle = targetAngle; + }); + } + + @override + void initState() { + super.initState(); + _orientationSubscription = _orientationStream.listen( + _handleOrientationChange, + onError: (dynamic err) => print(err), + ); + } + + @override + void dispose() { + super.dispose(); + _orientationSubscription.cancel(); + } + + @override + Widget build(BuildContext context) { + final size = 2 * widget.radius!; + + return Container( + width: size, + height: size, + decoration: BoxDecoration( + color: (widget.color ?? Colors.blue).withAlpha(200), + borderRadius: BorderRadius.all( + Radius.circular(widget.radius!), + ), + ), + child: GestureDetector( + onLongPress: widget.onLongPress, + onTapDown: widget.onTapDown, + onTapCancel: widget.onTapCancel, + child: RawMaterialButton( + onPressed: widget.onPressed, + child: RotationTransition( + child: widget.child, + turns: AlwaysStoppedAnimation(_rotationAngle / 360), + ), + elevation: 0, + shape: const CircleBorder(), + ), + ), + ); + } +} diff --git a/lib/pages/conference/widgets/noise_box.dart b/lib/pages/conference/widgets/noise_box.dart new file mode 100644 index 00000000..6e46616e --- /dev/null +++ b/lib/pages/conference/widgets/noise_box.dart @@ -0,0 +1,147 @@ +import 'dart:math' as math; +import 'dart:ui'; + +import 'package:flutter/material.dart'; + +enum NoiseBoxDensity { + high, + medium, + low, + xHigh, + xLow, +} + +class NoiseBox extends StatefulWidget { + final NoiseBoxDensity density; + final Color? backgroundColor; + final Widget? child; + + const NoiseBox({ + Key? key, + this.backgroundColor, + this.child, + this.density = NoiseBoxDensity.medium, + }) : assert(density != null), + super(key: key); + + @override + _NoiseBoxState createState() => _NoiseBoxState(); +} + +class _NoiseBoxState extends State with TickerProviderStateMixin { + late AnimationController _animationController; + late int _density; + + @override + void initState() { + super.initState(); + _animationController = AnimationController( + vsync: this, + duration: const Duration(seconds: 60), + ); + _animationController.repeat(); + switch (widget.density) { + case NoiseBoxDensity.high: + _density = 5; + break; + case NoiseBoxDensity.medium: + _density = 7; + break; + case NoiseBoxDensity.low: + _density = 10; + break; + case NoiseBoxDensity.xHigh: + _density = 3; + break; + case NoiseBoxDensity.xLow: + _density = 12; + break; + } + } + + @override + void dispose() { + _animationController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (BuildContext context, BoxConstraints constraints) => Container( + color: widget.backgroundColor, + width: constraints.biggest.width, + height: constraints.biggest.height, + child: AnimatedBuilder( + animation: _animationController, + builder: (BuildContext context, Widget? w) { + final children = [ + CustomPaint( + painter: NoisePainter( + width: constraints.biggest.width, + height: constraints.biggest.height, + density: _density, + ), + ), + ]; + if (widget.child != null) { + children.add(widget.child!); + } + return Stack( + children: children, + ); + }, + ), + ), + ); + } +} + +class NoisePainter extends CustomPainter { + final double width; + final double height; + final int density; + + NoisePainter({ + required this.width, + required this.height, + required this.density, + }) : assert(width != null), + assert(height != null), + assert(density != null && + density >= 3 && + density < math.min(width, height)); + + List colors = [ + Colors.black, + Colors.grey, + Colors.blueGrey, + Colors.red, + Colors.green, + Colors.blue, + Colors.white, + ]; + + @override + void paint(Canvas canvas, Size size) { + final random = math.Random(); + for (var w = 0; w < width; w += density) { + for (var h = 0; h < height; h += density) { + final offset = Offset( + random.nextDouble() * width, + random.nextDouble() * height, + ); + final paint = Paint(); + paint.color = colors[random.nextInt(colors.length)]; + paint.strokeWidth = random.nextDouble() * 2; + + canvas.drawPoints(PointMode.points, [offset], paint); + } + } + } + + @override + bool shouldRepaint(CustomPainter oldDelegate) { + return true; + } +} diff --git a/lib/pages/conference/widgets/platform_alert_dialog.dart b/lib/pages/conference/widgets/platform_alert_dialog.dart new file mode 100644 index 00000000..c98450e5 --- /dev/null +++ b/lib/pages/conference/widgets/platform_alert_dialog.dart @@ -0,0 +1,98 @@ +import 'dart:io'; + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import './platform_widget.dart'; + +class PlatformAlertDialog extends PlatformWidget { + PlatformAlertDialog({required this.title, required this.content, required this.defaultActionText, this.cancelActionText}) + : assert(title != null), + assert(content != null), + assert(defaultActionText != null); + + final String title; + final String content; + final String defaultActionText; + final String? cancelActionText; + + Future show(BuildContext context) async { + return Platform.isIOS + ? await showCupertinoDialog( + context: context, + builder: (BuildContext context) => this, + ) + : await showDialog( + context: context, + barrierDismissible: false, + builder: (BuildContext context) => this, + ); + } + + @override + Widget buildCupertinoWidget(BuildContext context) { + return CupertinoAlertDialog( + title: Text(title), + content: Text(content), + actions: _buildActions(context), + ); + } + + @override + Widget buildMaterialWidget(BuildContext context) { + return AlertDialog( + title: Text(title), + content: Text(content), + actions: _buildActions(context), + ); + } + + List _buildActions(BuildContext context) { + final actions = []; + if (cancelActionText != null) { + actions.add( + PlatformAlertDialogAction( + child: Text(cancelActionText!), + onPressed: () { + Navigator.of(context).pop(false); + }, + ), + ); + } + actions.add( + PlatformAlertDialogAction( + child: Text(defaultActionText), + onPressed: () { + Navigator.of(context).pop(true); + }, + ), + ); + return actions; + } +} + +class PlatformAlertDialogAction extends PlatformWidget { + PlatformAlertDialogAction({ + required this.child, + required this.onPressed, + }); + + final Widget child; + final VoidCallback onPressed; + + @override + Widget buildCupertinoWidget(BuildContext context) { + return CupertinoDialogAction( + child: child, + onPressed: onPressed, + ); + } + + @override + Widget buildMaterialWidget(BuildContext context) { + return TextButton( + child: child, + onPressed: onPressed, + ); + } +} diff --git a/lib/pages/conference/widgets/platform_exception_alert_dialog.dart b/lib/pages/conference/widgets/platform_exception_alert_dialog.dart new file mode 100644 index 00000000..fea4bca9 --- /dev/null +++ b/lib/pages/conference/widgets/platform_exception_alert_dialog.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import './platform_alert_dialog.dart'; + +class PlatformExceptionAlertDialog extends PlatformAlertDialog { + PlatformExceptionAlertDialog({ + String title = 'An error occurred', + required Exception exception, + }) : super( + title: title, + content: exception is PlatformException ? _message(exception) : exception.toString(), + defaultActionText: 'OK', + ); + + static String _message(PlatformException exception) { + return _errors[exception.code] ?? (exception.details != null ? (exception.details['message'] ?? exception.message) : exception.message); + } + + static final Map _errors = { + 'ERROR_CODE': 'Error description...', + }; +} diff --git a/lib/pages/conference/widgets/platform_widget.dart b/lib/pages/conference/widgets/platform_widget.dart new file mode 100644 index 00000000..d3366d5e --- /dev/null +++ b/lib/pages/conference/widgets/platform_widget.dart @@ -0,0 +1,17 @@ +import 'dart:io'; + +import 'package:flutter/material.dart'; + +abstract class PlatformWidget extends StatelessWidget { + Widget buildCupertinoWidget(BuildContext context); + + Widget buildMaterialWidget(BuildContext context); + + @override + Widget build(BuildContext context) { + if (Platform.isIOS) { + return buildCupertinoWidget(context); + } + return buildMaterialWidget(context); + } +} diff --git a/lib/pages/conference/widgets/responsive_save_area.dart b/lib/pages/conference/widgets/responsive_save_area.dart new file mode 100644 index 00000000..9e38cbce --- /dev/null +++ b/lib/pages/conference/widgets/responsive_save_area.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; + +typedef ResponsiveBuilder = Widget Function( + BuildContext context, + Size size, +); + +class ResponsiveSafeArea extends StatelessWidget { + const ResponsiveSafeArea({ + required ResponsiveBuilder builder, + Key? key, + }) : responsiveBuilder = builder, + assert(builder != null), + super(key: key); + + final ResponsiveBuilder responsiveBuilder; + + @override + Widget build(BuildContext context) { + return SafeArea( + child: LayoutBuilder( + builder: (BuildContext context, BoxConstraints constraints) { + return responsiveBuilder( + context, + constraints.biggest, + ); + }, + ), + ); + } +} diff --git a/lib/pages/conference/zoom/call_screen.dart b/lib/pages/conference/zoom/call_screen.dart new file mode 100644 index 00000000..1d71d72c --- /dev/null +++ b/lib/pages/conference/zoom/call_screen.dart @@ -0,0 +1,1609 @@ +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; +import 'package:diplomaticquarterapp/pages/conference/zoom/jwt.dart'; +import 'package:diplomaticquarterapp/pages/conference/zoom/video_view.dart'; +import 'package:events_emitter/events_emitter.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart'; +import 'package:flutter_zoom_videosdk/native/zoom_videosdk_cmd_channel.dart'; +import 'package:flutter_zoom_videosdk/native/zoom_videosdk_event_listener.dart'; +import 'package:flutter_zoom_videosdk/native/zoom_videosdk_live_transcription_message_info.dart'; +import 'package:flutter_zoom_videosdk/native/zoom_videosdk_user.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:wakelock_plus/wakelock_plus.dart'; + +// import '../components/video_view.dart'; +// import '../components/comment_list.dart'; +// import 'intro_screen.dart'; +// import 'join_screen.dart'; + +class CallScreen extends StatefulHookWidget { + const CallScreen({Key? key}) : super(key: key); + + @override + State createState() => _CallScreenState(); +} + +class _CallScreenState extends State { + static TextEditingController changeNameController = TextEditingController(); + double opacityLevel = 1.0; + + String currentCameraDeviceId = "1"; + + void _changeOpacity() { + setState(() => opacityLevel = opacityLevel == 0 ? 1.0 : 0.0); + } + + @override + Widget build(BuildContext context) { + var zoom = ZoomVideoSdk(); + var eventListener = ZoomVideoSdkEventListener(); + var isInSession = useState(false); + var sessionName = useState(''); + var sessionPassword = useState(''); + var users = useState([]); + var fullScreenUser = useState(null); + var sharingUser = useState(null); + var videoInfo = useState(''); + var isSharing = useState(false); + var isMuted = useState(false); + var isVideoOn = useState(false); + var isSpeakerOn = useState(false); + var isRenameModalVisible = useState(false); + var isRecordingStarted = useState(false); + var isMicOriginalOn = useState(false); + var isMounted = useIsMounted(); + var audioStatusFlag = useState(false); + var videoStatusFlag = useState(false); + var userNameFlag = useState(false); + var userShareStatusFlag = useState(false); + var isReceiveSpokenLanguageContentEnabled = useState(false); + var isVideoMirrored = useState(false); + var isOriginalAspectRatio = useState(false); + + //hide status bar + SystemChrome.setEnabledSystemUIMode(SystemUiMode.leanBack); + var circleButtonSize = 65.0; + Color backgroundColor = const Color(0xFF232323); + Color buttonBackgroundColor = const Color.fromRGBO(0, 0, 0, 0.6); + Color chatTextColor = const Color(0xFFAAAAAA); + Widget moreOptions; + final args = ModalRoute.of(context)!.settings.arguments as CallArguments; + + useEffect(() { + Future.microtask(() async { + WakelockPlus.enable(); + var token = generateJwt(args.sessionName, args.role); + try { + Map SDKaudioOptions = {"connect": true, "mute": false, "autoAdjustSpeakerVolume": false}; + Map SDKvideoOptions = { + "localVideoOn": args.callType == 1 ? true : false, + }; + JoinSessionConfig joinSession = JoinSessionConfig( + sessionName: args.sessionName, + sessionPassword: args.sessionPwd, + token: token, + userName: args.displayName, + audioOptions: SDKaudioOptions, + videoOptions: SDKvideoOptions, + sessionIdleTimeoutMins: int.parse(args.sessionIdleTimeoutMins), + ); + await zoom.joinSession(joinSession); + } catch (e) { + print(e); + const AlertDialog( + title: Text("Error"), + content: Text("Failed to join the session"), + ); + Future.delayed(const Duration(milliseconds: 1000)).asStream().listen((event) { + Navigator.pop(context); + // Navigator.popAndPushNamed( + // context, + // "Join", + // arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role), + // ); + }); + } + }); + return null; + }, []); + + useEffect(() { + updateVideoInfo() { + Timer timer = Timer.periodic(const Duration(milliseconds: 1000), (time) async { + if (!isMounted()) return; + + bool? videoOn = false; + videoOn = await fullScreenUser.value?.videoStatus?.isOn(); + + // Video statistic info doesn't update when there's no remote users + if (fullScreenUser.value == null || (videoOn != null && videoOn == false) || users.value.length < 2) { + time.cancel(); + videoInfo.value = ""; + return; + } + + var fps = isSharing.value ? await fullScreenUser.value?.shareStatisticInfo?.getFps() : await fullScreenUser.value?.videoStatisticInfo?.getFps(); + + var height = isSharing.value ? await fullScreenUser.value?.shareStatisticInfo?.getHeight() : await fullScreenUser.value?.videoStatisticInfo?.getHeight(); + + var width = isSharing.value ? await fullScreenUser.value?.shareStatisticInfo?.getWidth() : await fullScreenUser.value?.videoStatisticInfo?.getWidth(); + + videoInfo.value = ("${width}x$height ${fps}FPS"); + }); + } + + updateVideoInfo(); + return null; + }); + + useEffect(() { + eventListener.addEventListener(); + EventEmitter emitter = eventListener.eventEmitter; + + final sessionJoinListener = emitter.on(EventType.onSessionJoin, (sessionUser) async { + isInSession.value = true; + zoom.session.getSessionName().then((value) => sessionName.value = value!); + sessionPassword.value = await zoom.session.getSessionPassword(); + ZoomVideoSdkUser mySelf = ZoomVideoSdkUser.fromJson(jsonDecode(sessionUser.toString())); + List? remoteUsers = await zoom.session.getRemoteUsers(); + var muted = await mySelf.audioStatus?.isMuted(); + var videoOn = await mySelf.videoStatus?.isOn(); + var speakerOn = await zoom.audioHelper.getSpeakerStatus(); + // fullScreenUser.value = mySelf; + fullScreenUser.value = remoteUsers!.isNotEmpty ? remoteUsers![0] : mySelf; + remoteUsers?.insert(0, mySelf); + users.value = remoteUsers!; + isMuted.value = muted!; + isSpeakerOn.value = speakerOn; + isVideoOn.value = videoOn!; + users.value = remoteUsers; + isReceiveSpokenLanguageContentEnabled.value = await zoom.liveTranscriptionHelper.isReceiveSpokenLanguageContentEnabled(); + }); + + final sessionLeaveListener = emitter.on(EventType.onSessionLeave, (data) async { + isInSession.value = false; + users.value = []; + fullScreenUser.value = null; + await zoom.leaveSession(false); + Navigator.pop(context); + WakelockPlus.disable(); + }); + + final sessionNeedPasswordListener = emitter.on(EventType.onSessionNeedPassword, (data) async { + showDialog( + context: context, + builder: (BuildContext context) => AlertDialog( + title: const Text('Session Need Password'), + content: const Text('Password is required'), + actions: [ + TextButton( + onPressed: () async => { + // Navigator.popAndPushNamed(context, 'Join', arguments: JoinArguments(args.isJoin, args.sessionName, "", args.displayName, args.sessionIdleTimeoutMins, args.role)), + Navigator.pop(context), + await zoom.leaveSession(false), + }, + child: const Text('OK'), + ), + ], + ), + ); + }); + + final sessionPasswordWrongListener = emitter.on(EventType.onSessionPasswordWrong, (data) async { + showDialog( + context: context, + builder: (BuildContext context) => AlertDialog( + title: const Text('Session Password Incorrect'), + content: const Text('Password is wrong'), + actions: [ + TextButton( + onPressed: () async => { + // Navigator.popAndPushNamed(context, 'Join', arguments: JoinArguments(args.isJoin, args.sessionName, "", args.displayName, args.sessionIdleTimeoutMins, args.role)), + Navigator.pop(context), + await zoom.leaveSession(false), + }, + child: const Text('OK'), + ), + ], + ), + ); + }); + + final userVideoStatusChangedListener = emitter.on(EventType.onUserVideoStatusChanged, (data) async { + data = data as Map; + ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); + var userListJson = jsonDecode(data['changedUsers']) as List; + List userList = userListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList(); + for (var user in userList) { + { + if (user.userId == mySelf?.userId) { + mySelf?.videoStatus?.isOn().then((on) => isVideoOn.value = on); + } + } + } + videoStatusFlag.value = !videoStatusFlag.value; + }); + + final userAudioStatusChangedListener = emitter.on(EventType.onUserAudioStatusChanged, (data) async { + data = data as Map; + ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); + var userListJson = jsonDecode(data['changedUsers']) as List; + List userList = userListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList(); + for (var user in userList) { + { + if (user.userId == mySelf?.userId) { + mySelf?.audioStatus?.isMuted().then((muted) => isMuted.value = muted); + } + } + } + audioStatusFlag.value = !audioStatusFlag.value; + }); + + final userShareStatusChangeListener = emitter.on(EventType.onUserShareStatusChanged, (data) async { + data = data as Map; + ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); + ZoomVideoSdkUser shareUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'].toString())); + + if (data['status'] == ShareStatus.Start) { + sharingUser.value = shareUser; + fullScreenUser.value = shareUser; + isSharing.value = (shareUser.userId == mySelf?.userId); + } else { + sharingUser.value = null; + isSharing.value = false; + fullScreenUser.value = mySelf; + } + userShareStatusFlag.value = !userShareStatusFlag.value; + }); + + final userJoinListener = emitter.on(EventType.onUserJoin, (data) async { + if (!isMounted()) return; + data = data as Map; + ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); + var userListJson = jsonDecode(data['remoteUsers']) as List; + List remoteUserList = userListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList(); + remoteUserList.insert(0, mySelf!); + users.value = remoteUserList; + fullScreenUser.value = remoteUserList[1]; + }); + + final userLeaveListener = emitter.on(EventType.onUserLeave, (data) async { + if (!isMounted()) return; + ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); + data = data as Map; + var remoteUserListJson = jsonDecode(data['remoteUsers']) as List; + List remoteUserList = remoteUserListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList(); + var leftUserListJson = jsonDecode(data['leftUsers']) as List; + List leftUserLis = leftUserListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList(); + if (fullScreenUser.value != null) { + for (var user in leftUserLis) { + { + if (fullScreenUser.value?.userId == user.userId) { + fullScreenUser.value = mySelf; + } + } + } + } else { + fullScreenUser.value = mySelf; + } + remoteUserList.add(mySelf!); + users.value = remoteUserList; + }); + + final userNameChangedListener = emitter.on(EventType.onUserNameChanged, (data) async { + if (!isMounted()) return; + data = data as Map; + ZoomVideoSdkUser? changedUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['changedUser'])); + int index; + for (var user in users.value) { + if (user.userId == changedUser.userId) { + index = users.value.indexOf(user); + users.value[index] = changedUser; + } + } + userNameFlag.value = !userNameFlag.value; + }); + + final commandReceived = emitter.on(EventType.onCommandReceived, (data) async { + data = data as Map; + debugPrint("sender: ${ZoomVideoSdkUser.fromJson(jsonDecode(data['sender']))}, command: ${data['command']}"); + }); + + final chatDeleteMessageNotify = emitter.on(EventType.onChatDeleteMessageNotify, (data) async { + data = data as Map; + debugPrint("onChatDeleteMessageNotify: messageID: ${data['msgID']}, deleteBy: ${data['type']}"); + }); + + final liveStreamStatusChangeListener = emitter.on(EventType.onLiveStreamStatusChanged, (data) async { + data = data as Map; + debugPrint("onLiveStreamStatusChanged: status: ${data['status']}"); + }); + + final liveTranscriptionStatusChangeListener = emitter.on(EventType.onLiveTranscriptionStatus, (data) async { + data = data as Map; + debugPrint("onLiveTranscriptionStatus: status: ${data['status']}"); + }); + + final cloudRecordingStatusListener = emitter.on(EventType.onCloudRecordingStatus, (data) async { + data = data as Map; + debugPrint("onCloudRecordingStatus: status: ${data['status']}"); + ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); + if (data['status'] == RecordingStatus.Start) { + if (mySelf != null && !mySelf.isHost!) { + await zoom.acceptRecordingConsent(); + // isRecordingStarted.value = true; + // showDialog( + // context: context, + // builder: (BuildContext context) => AlertDialog( + // content: const Text('The session is being recorded.'), + // actions: [ + // TextButton( + // onPressed: () async { + // await zoom.acceptRecordingConsent(); + // // if (context.mounted) { + // Navigator.pop(context); + // // }; + // }, + // child: const Text('accept'), + // ), + // TextButton( + // onPressed: () async { + // String currentConsentType = await zoom.getRecordingConsentType(); + // if (currentConsentType == ConsentType.ConsentType_Individual) { + // await zoom.declineRecordingConsent(); + // Navigator.pop(context); + // } else { + // await zoom.declineRecordingConsent(); + // zoom.leaveSession(false); + // // if (!context.mounted) return; + // // Navigator.popAndPushNamed( + // // context, + // // "Join", + // // arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role), + // // ); + // Navigator.pop(context); + // } + // }, + // child: const Text('decline'), + // ), + // ], + // ), + // ); + } + isRecordingStarted.value = true; + } else { + isRecordingStarted.value = false; + } + }); + + final liveTranscriptionMsgInfoReceivedListener = emitter.on(EventType.onLiveTranscriptionMsgInfoReceived, (data) async { + data = data as Map; + ZoomVideoSdkLiveTranscriptionMessageInfo? messageInfo = ZoomVideoSdkLiveTranscriptionMessageInfo.fromJson(jsonDecode(data['messageInfo'])); + debugPrint("onLiveTranscriptionMsgInfoReceived: content: ${messageInfo.messageContent}"); + }); + + final inviteByPhoneStatusListener = emitter.on(EventType.onInviteByPhoneStatus, (data) async { + data = data as Map; + debugPrint("onInviteByPhoneStatus: status: ${data['status']}, reason: ${data['reason']}"); + }); + + final multiCameraStreamStatusChangedListener = emitter.on(EventType.onMultiCameraStreamStatusChanged, (data) async { + data = data as Map; + ZoomVideoSdkUser? changedUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['changedUser'])); + var status = data['status']; + for (var user in users.value) { + { + if (changedUser.userId == user.userId) { + if (status == MultiCameraStreamStatus.Joined) { + user.hasMultiCamera = true; + } else if (status == MultiCameraStreamStatus.Left) { + user.hasMultiCamera = false; + } + } + } + } + }); + + final requireSystemPermission = emitter.on(EventType.onRequireSystemPermission, (data) async { + data = data as Map; + ZoomVideoSdkUser? changedUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['changedUser'])); + var permissionType = data['permissionType']; + switch (permissionType) { + case SystemPermissionType.Camera: + showDialog( + context: context, + builder: (BuildContext context) => AlertDialog( + title: const Text("Can't Access Camera"), + content: const Text("please turn on the toggle in system settings to grant permission"), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context, 'OK'), + child: const Text('OK'), + ), + ], + ), + ); + break; + case SystemPermissionType.Microphone: + showDialog( + context: context, + builder: (BuildContext context) => AlertDialog( + title: const Text("Can't Access Microphone"), + content: const Text("please turn on the toggle in system settings to grant permission"), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context, 'OK'), + child: const Text('OK'), + ), + ], + ), + ); + break; + } + }); + + final networkStatusChangeListener = emitter.on(EventType.onUserVideoNetworkStatusChanged, (data) async { + data = data as Map; + ZoomVideoSdkUser? networkUser = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'])); + + if (data['status'] == NetworkStatus.Bad) { + debugPrint("onUserVideoNetworkStatusChanged: status: ${data['status']}, user: ${networkUser.userName}"); + } + }); + + final eventErrorListener = emitter.on( + EventType.onError, + (data) async { + data = data as Map; + String errorType = data['errorType']; + showDialog( + context: context, + builder: (BuildContext context) => AlertDialog( + title: const Text("Error"), + content: Text(errorType), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context, 'OK'), + child: const Text('OK'), + ), + ], + ), + ); + if (errorType == Errors.SessionJoinFailed || errorType == Errors.SessionDisconnecting) { + Timer( + const Duration(milliseconds: 1000), + () => Navigator.pop(context), + // Navigator.popAndPushNamed( + // context, + // "Join", + // arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role), + // ), + ); + } + }, + ); + + final userRecordingConsentListener = emitter.on(EventType.onUserRecordingConsent, (data) async { + data = data as Map; + ZoomVideoSdkUser? user = ZoomVideoSdkUser.fromJson(jsonDecode(data['user'])); + debugPrint('userRecordingConsentListener: user= ${user.userName}'); + }); + + final callCRCDeviceStatusListener = emitter.on(EventType.onCallCRCDeviceStatusChanged, (data) async { + data = data as Map; + debugPrint('onCallCRCDeviceStatusChanged: status = ${data['status']}'); + }); + + final originalLanguageMsgReceivedListener = emitter.on(EventType.onOriginalLanguageMsgReceived, (data) async { + data = data as Map; + ZoomVideoSdkLiveTranscriptionMessageInfo? messageInfo = ZoomVideoSdkLiveTranscriptionMessageInfo.fromJson(jsonDecode(data['messageInfo'])); + debugPrint("onOriginalLanguageMsgReceived: content: ${messageInfo.messageContent}"); + }); + + final chatPrivilegeChangedListener = emitter.on(EventType.onChatPrivilegeChanged, (data) async { + data = data as Map; + String type = data['privilege']; + debugPrint('chatPrivilegeChangedListener: type= $type'); + }); + + return () => { + sessionJoinListener.cancel(), + sessionLeaveListener.cancel(), + sessionPasswordWrongListener.cancel(), + sessionNeedPasswordListener.cancel(), + userVideoStatusChangedListener.cancel(), + userAudioStatusChangedListener.cancel(), + userJoinListener.cancel(), + userLeaveListener.cancel(), + userNameChangedListener.cancel(), + userShareStatusChangeListener.cancel(), + liveStreamStatusChangeListener.cancel(), + cloudRecordingStatusListener.cancel(), + inviteByPhoneStatusListener.cancel(), + eventErrorListener.cancel(), + commandReceived.cancel(), + chatDeleteMessageNotify.cancel(), + liveTranscriptionStatusChangeListener.cancel(), + liveTranscriptionMsgInfoReceivedListener.cancel(), + multiCameraStreamStatusChangedListener.cancel(), + requireSystemPermission.cancel(), + userRecordingConsentListener.cancel(), + networkStatusChangeListener.cancel(), + callCRCDeviceStatusListener.cancel(), + originalLanguageMsgReceivedListener.cancel(), + chatPrivilegeChangedListener.cancel(), + }; + }, [zoom, users.value, isMounted]); + + void onPressAudio() async { + ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); + if (mySelf != null) { + final audioStatus = mySelf.audioStatus; + if (audioStatus != null) { + var muted = await audioStatus.isMuted(); + if (muted) { + await zoom.audioHelper.unMuteAudio(mySelf.userId); + } else { + await zoom.audioHelper.muteAudio(mySelf.userId); + } + } + } + } + + void onPressCameraChange() async { + ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); + if (mySelf != null) { + final videoStatus = mySelf.videoStatus; + if (videoStatus != null) { + if (currentCameraDeviceId == "1") { + currentCameraDeviceId = "2"; + await zoom.videoHelper.switchCamera("2"); + } else { + currentCameraDeviceId = "1"; + await zoom.videoHelper.switchCamera("1"); + } + } + } + } + + void onPressVideo() async { + ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); + if (mySelf != null) { + final videoStatus = mySelf.videoStatus; + if (videoStatus != null) { + var videoOn = await videoStatus.isOn(); + if (videoOn) { + await zoom.videoHelper.stopVideo(); + } else { + await zoom.videoHelper.startVideo(); + } + } + } + } + + void onPressShare() async { + var isOtherSharing = await zoom.shareHelper.isOtherSharing(); + var isShareLocked = await zoom.shareHelper.isShareLocked(); + + if (isOtherSharing) { + showDialog( + context: context, + builder: (BuildContext context) => AlertDialog( + title: const Text("Error"), + content: const Text('Other is sharing'), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context, 'OK'), + child: const Text('OK'), + ), + ], + ), + ); + } else if (isShareLocked) { + showDialog( + context: context, + builder: (BuildContext context) => AlertDialog( + title: const Text("Error"), + content: const Text('Share is locked by host'), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context, 'OK'), + child: const Text('OK'), + ), + ], + ), + ); + } else if (isSharing.value) { + zoom.shareHelper.stopShare(); + } else { + zoom.shareHelper.shareScreen(); + } + } + + moreOptions = Center( + child: Stack( + children: [ + Visibility( + visible: isRenameModalVisible.value, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + alignment: Alignment.bottomLeft, + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(10)), + color: Colors.white, + ), + width: MediaQuery.of(context).size.width - 130, + height: 130, + child: Center( + child: (Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(top: 20, left: 20), + child: Text( + 'Change Name', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 18, + fontWeight: FontWeight.w500, + ), + ), + ), + ), + Padding( + padding: const EdgeInsets.only(top: 10, left: 20), + child: SizedBox( + width: MediaQuery.of(context).size.width - 230, + child: TextField( + onEditingComplete: () {}, + autofocus: true, + cursorColor: Colors.black, + controller: changeNameController, + decoration: InputDecoration( + isDense: true, + hintText: 'New name', + hintStyle: TextStyle( + fontSize: 14.0, + color: chatTextColor, + ), + ), + ), + ), + ), + Padding( + padding: const EdgeInsets.only(top: 15), + child: Row( + children: [ + Padding( + padding: const EdgeInsets.only(left: 40), + child: InkWell( + child: Text( + 'Apply', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 16, + ), + ), + ), + onTap: () async { + if (fullScreenUser.value != null) { + ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); + await zoom.userHelper.changeName((mySelf?.userId)!, changeNameController.text); + changeNameController.clear(); + } + isRenameModalVisible.value = false; + }, + ), + ), + Padding( + padding: const EdgeInsets.only(left: 40), + child: InkWell( + child: Text( + 'Cancel', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 16, + ), + ), + ), + onTap: () async { + isRenameModalVisible.value = false; + }, + ), + ) + ], + ), + ) + ], + )), + ), + ), + ], + )), + ], + ), + ); + + void onSelectedUserVolume(ZoomVideoSdkUser user) async { + var isShareAudio = user.isSharing; + bool canSetVolume = await user.canSetUserVolume(user.userId, isShareAudio); + num userVolume; + + List options = [ + ListTile( + title: Text( + 'Adjust Volume', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 18, + fontWeight: FontWeight.w600, + color: Colors.black, + ), + ), + ), + ), + ListTile( + title: Text( + 'Current volume', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + debugPrint('user volume'), + userVolume = await user.getUserVolume(user.userId, isShareAudio), + debugPrint('user ${user.userName}\'s volume is ${userVolume!}'), + }, + ), + ]; + if (canSetVolume) { + options.add( + ListTile( + title: Text( + 'Volume up', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + userVolume = await user.getUserVolume(user.userId, isShareAudio), + if (userVolume < 10) + { + await user.setUserVolume(user.userId, userVolume + 1, isShareAudio), + } + else + { + debugPrint("Cannot volume up."), + } + }, + ), + ); + options.add( + ListTile( + title: Text( + 'Volume down', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + userVolume = await user.getUserVolume(user.userId, isShareAudio), + if (userVolume > 0) + { + await user.setUserVolume(user.userId, userVolume - 1, isShareAudio), + } + else + { + debugPrint("Cannot volume down."), + } + }, + ), + ); + } + showDialog( + context: context, + builder: (context) { + return Dialog( + elevation: 0.0, + insetPadding: const EdgeInsets.symmetric(horizontal: 40), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), + child: SizedBox( + height: options.length * 58, + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + ListView( + shrinkWrap: true, + children: ListTile.divideTiles( + context: context, + tiles: options, + ).toList(), + ), + ], + ), + )); + }); + } + + Future onPressMore() async { + ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); + bool isShareLocked = await zoom.shareHelper.isShareLocked(); + bool canSwitchSpeaker = await zoom.audioHelper.canSwitchSpeaker(); + bool canStartRecording = (await zoom.recordingHelper.canStartRecording()) == Errors.Success; + var startLiveTranscription = (await zoom.liveTranscriptionHelper.getLiveTranscriptionStatus()) == LiveTranscriptionStatus.Start; + bool canStartLiveTranscription = await zoom.liveTranscriptionHelper.canStartLiveTranscription(); + bool canStartLiveStream = await zoom.liveStreamHelper.canStartLiveStream() == Errors.Success; + debugPrint(await zoom.liveStreamHelper.canStartLiveStream()); + bool startLiveStream = false; + bool isHost = (mySelf != null) ? (await mySelf.getIsHost()) : false; + isOriginalAspectRatio.value = await zoom.videoHelper.isOriginalAspectRatioEnabled(); + bool canCallOutToCRC = await zoom.CRCHelper.isCRCEnabled(); + + List options = [ + ListTile( + title: Text( + 'More', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 18, + fontWeight: FontWeight.w600, + color: Colors.black, + ), + ), + ), + ), + ListTile( + title: Text( + 'is Support Virtual Background', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + debugPrint("${await zoom.virtualBackgroundHelper.isSupportVirtualBackground()}"), + Navigator.of(context).pop(), + }, + ), + ListTile( + title: Text( + 'Get Chat Privilege', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + debugPrint("Chat Privilege = ${await zoom.chatHelper.getChatPrivilege()}"), + Navigator.of(context).pop(), + }, + ), + ListTile( + title: Text( + 'Get Session Dial-in Number infos', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + debugPrint("session number = ${await zoom.session.getSessionNumber()}"), + Navigator.of(context).pop(), + }, + ), + ListTile( + title: Text( + '${isMicOriginalOn.value ? 'Disable' : 'Enable'} Original Sound', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + debugPrint("${isMicOriginalOn.value}"), + await zoom.audioSettingHelper.enableMicOriginalInput(!isMicOriginalOn.value), + isMicOriginalOn.value = await zoom.audioSettingHelper.isMicOriginalInputEnable(), + debugPrint("Original sound ${isMicOriginalOn.value ? 'Enabled' : 'Disabled'}"), + Navigator.of(context).pop(), + }, + ) + ]; + + if (canCallOutToCRC) { + options.add(ListTile( + title: Text( + 'Call-out to CRC devices', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + debugPrint('CRC result = ${await zoom.CRCHelper.callCRCDevice("bjn.vc", ZoomVideoSdkCRCProtocolType.SIP)}'), + Navigator.of(context).pop(), + }, + )); + options.add(ListTile( + title: Text( + 'Cancel call-out to CRC devices', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + debugPrint('cancel result= ${await zoom.CRCHelper.cancelCallCRCDevice()}'), + Navigator.of(context).pop(), + }, + )); + } + + if (canSwitchSpeaker) { + options.add(ListTile( + title: Text( + 'Turn ${isSpeakerOn.value ? 'off' : 'on'} Speaker', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + await zoom.audioHelper.setSpeaker(!isSpeakerOn.value), + isSpeakerOn.value = await zoom.audioHelper.getSpeakerStatus(), + debugPrint('Turned ${isSpeakerOn.value ? 'on' : 'off'} Speaker'), + Navigator.of(context).pop(), + }, + )); + } + + if (isHost) { + options.add(ListTile( + title: Text( + '${isShareLocked ? 'Unlock' : 'Lock'} Share', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + debugPrint("isShareLocked = ${await zoom.shareHelper.lockShare(!isShareLocked)}"), + Navigator.of(context).pop(), + })); + options.add(ListTile( + title: Text( + 'Change Name', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () => { + isRenameModalVisible.value = true, + Navigator.of(context).pop(), + }, + )); + } + + if (canStartLiveTranscription) { + options.add(ListTile( + title: Text( + "${startLiveTranscription ? 'Stop' : 'Start'} Live Transcription", + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + if (startLiveTranscription) + { + debugPrint('stopLiveTranscription= ${await zoom.liveTranscriptionHelper.stopLiveTranscription()}'), + } + else + { + debugPrint('startLiveTranscription= ${await zoom.liveTranscriptionHelper.startLiveTranscription()}'), + }, + Navigator.of(context).pop(), + }, + )); + options.add(ListTile( + title: Text( + '${isReceiveSpokenLanguageContentEnabled.value ? 'Disable' : 'Enable'} receiving original caption', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + await zoom.liveTranscriptionHelper.enableReceiveSpokenLanguageContent(!isReceiveSpokenLanguageContentEnabled.value), + isReceiveSpokenLanguageContentEnabled.value = await zoom.liveTranscriptionHelper.isReceiveSpokenLanguageContentEnabled(), + debugPrint("isReceiveSpokenLanguageContentEnabled = ${isReceiveSpokenLanguageContentEnabled.value}"), + Navigator.of(context).pop(), + })); + } + + if (canStartRecording) { + options.add(ListTile( + title: Text( + '${isRecordingStarted.value ? 'Stop' : 'Start'} Recording', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + if (!isRecordingStarted.value) + { + debugPrint('isRecordingStarted = ${await zoom.recordingHelper.startCloudRecording()}'), + } + else + { + debugPrint('isRecordingStarted = ${await zoom.recordingHelper.stopCloudRecording()}'), + }, + Navigator.of(context).pop(), + })); + } + + if (isVideoOn.value) { + options.add(ListTile( + title: Text( + 'Mirror the video', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + await zoom.videoHelper.mirrorMyVideo(!isVideoMirrored.value), + isVideoMirrored.value = await zoom.videoHelper.isMyVideoMirrored(), + Navigator.of(context).pop(), + })); + options.add(ListTile( + title: Text( + '${isOriginalAspectRatio.value ? 'Enable' : 'Disable'} original aspect ratio', + style: GoogleFonts.lato( + textStyle: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + ), + ), + onTap: () async => { + await zoom.videoHelper.enableOriginalAspectRatio(!isOriginalAspectRatio.value), + isOriginalAspectRatio.value = await zoom.videoHelper.isOriginalAspectRatioEnabled(), + debugPrint("isOriginalAspectRatio= ${isOriginalAspectRatio.value}"), + Navigator.of(context).pop(), + })); + } + showDialog( + context: context, + builder: (context) { + return Dialog( + elevation: 0.0, + insetPadding: const EdgeInsets.symmetric(horizontal: 40), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), + child: SizedBox( + height: 500, + child: Scrollbar( + child: ListView( + shrinkWrap: true, + scrollDirection: Axis.vertical, + children: ListTile.divideTiles( + context: context, + tiles: options, + ).toList(), + ), + ), + ), + ); + }); + } + + void onLeaveSession(bool isEndSession) async { + WakelockPlus.disable(); + await zoom.leaveSession(isEndSession); + Navigator.pop(context); + // Navigator.pop(context); + } + + void showLeaveOptions() async { + ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); + bool isHost = await mySelf!.getIsHost(); + + onLeaveSession(true); + + // Widget endSession; + // Widget leaveSession; + // Widget cancel = TextButton( + // child: const Text('Cancel'), + // onPressed: () { + // Navigator.pop(context); //close Dialog + // }, + // ); + + // switch (defaultTargetPlatform) { + // case TargetPlatform.android: + // endSession = TextButton( + // child: const Text('End Session'), + // onPressed: () => onLeaveSession(true), + // ); + // leaveSession = TextButton( + // child: const Text('Leave Session'), + // onPressed: () => onLeaveSession(false), + // ); + // break; + // default: + // endSession = CupertinoActionSheetAction( + // isDestructiveAction: true, + // child: const Text('End Session'), + // onPressed: () => onLeaveSession(true), + // ); + // leaveSession = CupertinoActionSheetAction( + // child: const Text('Leave Session'), + // onPressed: () => onLeaveSession(false), + // ); + // break; + // } + // + // List options = [ + // leaveSession, + // cancel, + // ]; + // + // if (Platform.isAndroid) { + // if (isHost) { + // options.removeAt(1); + // options.insert(0, endSession); + // } + // showDialog( + // context: context, + // builder: (context) { + // return AlertDialog( + // content: const Text("Do you want to leave this session?"), + // shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))), + // actions: options, + // ); + // }); + // } else { + // options.removeAt(1); + // if (isHost) { + // options.insert(1, endSession); + // } + // showCupertinoModalPopup( + // context: context, + // builder: (context) => CupertinoActionSheet( + // message: const Text('Are you sure that you want to leave the call?'), + // actions: options, + // cancelButton: cancel, + // ), + // ); + // } + } + + final chatMessageController = TextEditingController(); + + void sendChatMessage(String message) async { + await zoom.chatHelper.sendChatToAll(message); + ZoomVideoSdkUser? self = await zoom.session.getMySelf(); + ZoomVideoSdkCmdChannel cmdChannel = zoom.cmdChannel; + for (var user in users.value) { + if (user.userId != self?.userId) { + await zoom.cmdChannel.sendCommand(user.userId, message); + } + } + chatMessageController.clear(); + // send the chat as a command + } + + void onSelectedUser(ZoomVideoSdkUser user) async { + setState(() { + fullScreenUser.value = user; + }); + } + + Widget fullScreenView; + Widget smallView; + + if (isInSession.value && fullScreenUser.value != null && users.value.isNotEmpty) { + fullScreenView = AnimatedOpacity( + opacity: opacityLevel, + duration: const Duration(seconds: 3), + child: VideoView( + user: fullScreenUser.value, + hasMultiCamera: false, + sharing: sharingUser.value == null ? false : (sharingUser.value?.userId == fullScreenUser.value?.userId), + preview: false, + focused: false, + multiCameraIndex: "0", + videoAspect: VideoAspect.Original, + fullScreen: true, + resolution: VideoResolution.Resolution360, + isPiPView: false, + ), + ); + + smallView = Container( + height: 110, + margin: const EdgeInsets.only(left: 20, right: 20), + alignment: Alignment.bottomLeft, + child: VideoView( + user: users.value[0], + hasMultiCamera: false, + sharing: sharingUser.value == null ? false : sharingUser.value?.userId == users.value[0].userId, + preview: false, + focused: false, + multiCameraIndex: "0", + videoAspect: VideoAspect.Original, + fullScreen: false, + resolution: VideoResolution.Resolution180, + isPiPView: false, + ), + + // ListView.separated( + // scrollDirection: Axis.horizontal, + // itemCount: users.value.length, + // itemBuilder: (BuildContext context, int index) { + // return InkWell( + // onTap: () async { + // onSelectedUser(users.value[index]); + // }, + // onDoubleTap: () async { + // onSelectedUserVolume(users.value[index]); + // }, + // child: Center( + // child: VideoView( + // user: users.value[index], + // hasMultiCamera: false, + // sharing: sharingUser.value == null ? false : sharingUser.value?.userId == users.value[index].userId, + // preview: false, + // focused: false, + // multiCameraIndex: "0", + // videoAspect: VideoAspect.Original, + // fullScreen: false, + // resolution: VideoResolution.Resolution180, + // isPiPView: false, + // ), + // ), + // ); + // }, + // separatorBuilder: (BuildContext context, int index) => const Divider(), + // ), + ); + } else { + fullScreenView = Container( + color: Colors.black, + child: const Center( + child: Text( + "Connecting...", + style: TextStyle( + fontSize: 20, + color: Colors.white, + ), + ), + )); + smallView = Container( + height: 110, + color: Colors.transparent, + ); + } + + _changeOpacity; + return Scaffold( + resizeToAvoidBottomInset: false, + backgroundColor: backgroundColor, + body: Stack( + children: [ + fullScreenView, + Container( + padding: const EdgeInsets.only(top: 35), + child: Stack( + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + // Container( + // height: 70, + // width: 150, + // margin: const EdgeInsets.only(top: 16, left: 8), + // padding: const EdgeInsets.all(8), + // alignment: Alignment.topLeft, + // decoration: BoxDecoration( + // borderRadius: const BorderRadius.all(Radius.circular(8.0)), + // color: buttonBackgroundColor, + // ), + // child: InkWell( + // onTap: () async { + // showDialog( + // context: context, + // builder: (context) { + // return Dialog( + // elevation: 0.0, + // insetPadding: const EdgeInsets.symmetric(horizontal: 40), + // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), + // child: SizedBox( + // height: 280, + // width: 200, + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.stretch, + // children: [ + // ListView( + // shrinkWrap: true, + // children: ListTile.divideTiles( + // context: context, + // tiles: [ + // ListTile( + // title: Text( + // 'Session Information', + // style: GoogleFonts.lato( + // textStyle: const TextStyle( + // fontSize: 18, + // fontWeight: FontWeight.w600, + // ), + // ), + // ), + // ), + // ListTile( + // title: Text( + // 'Session Name', + // style: GoogleFonts.lato( + // textStyle: const TextStyle( + // fontSize: 14, + // ), + // ), + // ), + // subtitle: Text( + // sessionName.value, + // style: GoogleFonts.lato( + // textStyle: const TextStyle( + // fontSize: 12, + // ), + // ), + // ), + // ), + // ListTile( + // title: Text( + // 'Session Password', + // style: GoogleFonts.lato( + // textStyle: const TextStyle( + // fontSize: 14, + // ), + // ), + // ), + // subtitle: Text( + // sessionPassword.value, + // style: GoogleFonts.lato( + // textStyle: const TextStyle( + // fontSize: 12, + // ), + // ), + // ), + // ), + // ListTile( + // title: Text( + // 'Participants', + // style: GoogleFonts.lato( + // textStyle: const TextStyle( + // fontSize: 14, + // ), + // ), + // ), + // subtitle: Text( + // '${users.value.length}', + // style: GoogleFonts.lato( + // textStyle: const TextStyle( + // fontSize: 12, + // ), + // ), + // ), + // ), + // ], + // ).toList(), + // ), + // ], + // ), + // )); + // }); + // }, + // child: Stack( + // children: [ + // // Column( + // // children: [ + // // const Padding(padding: EdgeInsets.symmetric(vertical: 3)), + // // Align( + // // alignment: Alignment.centerLeft, + // // child: Text( + // // sessionName.value, + // // overflow: TextOverflow.ellipsis, + // // style: GoogleFonts.lato( + // // textStyle: const TextStyle( + // // fontSize: 14, + // // fontWeight: FontWeight.w600, + // // color: Colors.white, + // // ), + // // ), + // // ), + // // ), + // // const Padding(padding: EdgeInsets.symmetric(vertical: 5)), + // // Align( + // // alignment: Alignment.centerLeft, + // // child: Text( + // // "Participants: ${users.value.length}", + // // style: GoogleFonts.lato( + // // textStyle: const TextStyle( + // // fontSize: 14, + // // fontWeight: FontWeight.w600, + // // color: Colors.white, + // // ), + // // ), + // // ), + // // ) + // // ], + // // ), + // // Container( + // // alignment: Alignment.centerRight, + // // child: Image.asset( + // // "assets/icons/unlocked@2x.png", + // // height: 22, + // // )), + // ], + // ), + // ), + // ), + TextButton( + onPressed: (showLeaveOptions), + child: Container( + alignment: Alignment.topRight, + margin: const EdgeInsets.only(top: 16, right: 8), + padding: const EdgeInsets.only(top: 5, bottom: 5, left: 16, right: 16), + height: 28, + decoration: BoxDecoration( + borderRadius: const BorderRadius.all(Radius.circular(20.0)), + color: buttonBackgroundColor, + ), + child: const Text( + "LEAVE", + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + color: Color(0xFFE02828), + ), + ), + )), + ], + ), + Align( + alignment: Alignment.centerRight, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + IconButton( + onPressed: onPressAudio, + icon: isMuted.value ? Image.asset("assets/images/new/zoom/unmute@2x.png") : Image.asset("assets/images/new/zoom/mute@2x.png"), + iconSize: circleButtonSize, + tooltip: isMuted.value == true ? "Unmute" : "Mute", + ), + // IconButton( + // onPressed: onPressShare, + // icon: isSharing.value ? Image.asset("assets/images/new/zoom/share-off@2x.png") : Image.asset("assets/images/new/zoom/share-on@2x.png"), + // iconSize: circleButtonSize, + // ), + IconButton( + onPressed: onPressVideo, + iconSize: circleButtonSize, + icon: isVideoOn.value ? Image.asset("assets/images/new/zoom/video-off@2x.png") : Image.asset("assets/images/new/zoom/video-on@2x.png"), + ), + IconButton( + onPressed: onPressCameraChange, + iconSize: circleButtonSize, + icon: const Icon( + Icons.cameraswitch_sharp, + size: 45.0, + color: Colors.white, + ), + ), + // IconButton( + // onPressed: onPressMore, + // icon: Image.asset("assets/icons/more@2x.png"), + // iconSize: circleButtonSize, + // ), + ], + ), + ), + Container( + alignment: Alignment.bottomLeft, + margin: const EdgeInsets.only(bottom: 120), + child: smallView, + ), + // CommentList(zoom: zoom, eventListener: eventListener), + moreOptions, + ], + )), + ], + ) + // drawer: const MenuBar() + ); + } +} + +class CallArguments { + final bool isJoin; + final String sessionName; + final String sessionPwd; + final String displayName; + final String sessionIdleTimeoutMins; + final String role; + final int callType; + + CallArguments(this.sessionName, this.sessionPwd, this.displayName, this.sessionIdleTimeoutMins, this.role, this.isJoin, this.callType); +} + +class JoinArguments { + final bool isJoin; + final String sessionName; + final String sessionPwd; + final String displayName; + final String sessionTimeout; + final String roleType; + + JoinArguments(this.isJoin, this.sessionName, this.sessionPwd, this.displayName, this.sessionTimeout, this.roleType); +} diff --git a/lib/pages/conference/zoom/jwt.dart b/lib/pages/conference/zoom/jwt.dart new file mode 100644 index 00000000..c9d373bd --- /dev/null +++ b/lib/pages/conference/zoom/jwt.dart @@ -0,0 +1,40 @@ +import 'dart:math'; + +import 'package:dart_jsonwebtoken/dart_jsonwebtoken.dart'; +import 'package:diplomaticquarterapp/pages/conference/zoom/zoom_config.dart'; + +String makeId(int length) { + String result = ""; + String characters = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + int charactersLength = characters.length; + for (var i = 0; i < length; i++) { + result += characters[Random().nextInt(charactersLength)]; + } + return result; +} + +String generateJwt(String sessionName, String roleType) { + try { + var iat = DateTime.now(); + var exp = DateTime.now().add(Duration(days: 2)); + final jwt = JWT( + { + 'app_key': configs["ZOOM_SDK_KEY"], + 'version': 1, + 'user_identity': makeId(10), + 'iat': (iat.millisecondsSinceEpoch / 1000).round(), + 'exp': (exp.millisecondsSinceEpoch / 1000).round(), + 'tpc': sessionName, + 'role_type': int.parse(roleType), + 'cloud_recording_option': 1, + 'cloud_recording_election': 1, + }, + ); + var token = jwt.sign(SecretKey(configs["ZOOM_SDK_SECRET"])); + return token; + } catch (e) { + print(e); + return ''; + } +} diff --git a/lib/pages/conference/zoom/video_view.dart b/lib/pages/conference/zoom/video_view.dart new file mode 100644 index 00000000..5a53cad2 --- /dev/null +++ b/lib/pages/conference/zoom/video_view.dart @@ -0,0 +1,258 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:flutter_zoom_videosdk/flutter_zoom_view.dart' as FlutterZoomView; +import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart'; + +const SHOW_TALKING_ICON_DURATION = 2000; + +class VideoView extends FlutterZoomView.ZoomView { + const VideoView({ + super.key, + required super.user, + required super.sharing, + required super.preview, + required super.focused, + required super.hasMultiCamera, + required super.multiCameraIndex, + required super.videoAspect, + required super.fullScreen, + required super.resolution, + required super.isPiPView, + }); + + @override + Widget build(BuildContext context) { + var isVideoOn = useState(false); + var isTalking = useState(false); + var isMuted = useState(false); + var isMounted = useIsMounted(); + var zoom = ZoomVideoSdk(); + var isSharing = useState(false); + user?.audioStatus?.isMuted().then((muted) => isMuted.value = muted); + + useEffect(() { + updateVideoStatus() { + if (user == null) return; + Future.microtask(() async { + if (isMounted()) { + isVideoOn.value = (await user!.videoStatus!.isOn()); + isSharing.value = sharing; + } + }); + } + + resetAudioStatus() { + isTalking.value = false; + isMuted.value = false; + } + + updateAudioStatus() async { + if (!isMounted()) return; + var talking = await user?.audioStatus?.isTalking(); + var muted = await user?.audioStatus?.isMuted(); + isMuted.value = muted!; + isTalking.value = talking!; + if (talking) { + Timer( + const Duration(milliseconds: SHOW_TALKING_ICON_DURATION), + () => { + if (isMounted()) + { + isTalking.value = false, + } + }); + } + } + + updateVideoStatus(); + return null; + }, [zoom, user]); + + ImageIcon audioStatusIcon; + if (isTalking.value) { + audioStatusIcon = const ImageIcon( + AssetImage("assets/images/new/zoom/talking@2x.png"), + ); + } else if (isMuted.value) { + audioStatusIcon = const ImageIcon( + AssetImage("assets/images/new/zoom/muted@2x.png"), + ); + } + // Pass parameters to the platform side. + final Map creationParams = {}; + creationParams.putIfAbsent("userId", () => user?.userId); + creationParams.putIfAbsent("sharing", () => sharing); + creationParams.putIfAbsent("preview", () => preview); + creationParams.putIfAbsent("focused", () => focused); + creationParams.putIfAbsent("hasMultiCamera", () => hasMultiCamera); + if (videoAspect.isEmpty) { + creationParams.putIfAbsent("videoAspect", () => VideoAspect.PanAndScan); + } else { + creationParams.putIfAbsent("videoAspect", () => videoAspect); + } + creationParams.putIfAbsent("fullScreen", () => fullScreen); + if (resolution.isNotEmpty) { + creationParams.putIfAbsent("videoAspect", () => videoAspect); + } + + if (fullScreen) { + if (sharing) { + return Container( + height: MediaQuery.of(context).size.height, + width: MediaQuery.of(context).size.width, + alignment: Alignment.center, + child: FlutterZoomView.View(creationParams: creationParams), + ); + } else if (isVideoOn.value) { + return Container( + height: MediaQuery.of(context).size.height, + width: MediaQuery.of(context).size.width, + alignment: Alignment.center, + child: FlutterZoomView.View(creationParams: creationParams), + ); + } else { + return Container( + margin: const EdgeInsets.symmetric(vertical: 0), + child: Container( + alignment: Alignment.center, + child: const Image( + image: AssetImage("assets/images/new/zoom/default-avatar.png"), + )), + ); + } + } else { + if (isVideoOn.value || sharing) { + return Container( + padding: const EdgeInsets.symmetric(horizontal: 8), + height: 110, + width: 110, + child: Stack( + children: [ + Container( + height: 110, + width: 110, + decoration: BoxDecoration( + color: const Color(0xff232323), + border: Border.all( + color: const Color(0xff666666), + width: 1, + ), + borderRadius: const BorderRadius.all(Radius.circular(8)), + ), + alignment: Alignment.center, + child: FlutterZoomView.View(creationParams: creationParams), + ), + Container( + height: 110, + width: 110, + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(8)), + ), + ), + Container( + alignment: Alignment.bottomCenter, + child: Container( + height: 20, + width: 110, + decoration: const BoxDecoration( + color: Colors.black26, + borderRadius: BorderRadius.all(Radius.circular(8)), + ), + ), + ), + Container( + alignment: Alignment.bottomLeft, + margin: const EdgeInsets.only(left: 5), + child: Text( + user!.userName, + textAlign: TextAlign.left, + style: const TextStyle( + color: Colors.white, + fontSize: 12, + ), + ), + ), + Container( + alignment: Alignment.bottomRight, + margin: const EdgeInsets.only(right: 5, bottom: 5), + // height: 110, + // width: 110, + child: Image( + height: 12, + width: 12, + image: isMuted.value ? const AssetImage("assets/images/new/zoom/muted@2x.png") : const AssetImage("assets/images/new/zoom/talking@2x.png"), + fit: BoxFit.cover, + ), + ) + ], + ), + ); + } else { + return Container( + padding: const EdgeInsets.symmetric(horizontal: 8), + height: 110, + width: 110, + child: Stack( + children: [ + Container( + height: 110, + width: 110, + decoration: BoxDecoration( + color: const Color(0xff232323), + border: Border.all( + color: const Color(0xff666666), + width: 1, + ), + borderRadius: const BorderRadius.all(Radius.circular(8)), + ), + alignment: Alignment.center, + child: Container( + alignment: Alignment.center, + child: const Image( + height: 60, + width: 60, + image: AssetImage("assets/images/new/zoom/default-avatar.png"), + )), + ), + Align( + alignment: Alignment.bottomCenter, + child: Container( + height: 20, + width: 110, + decoration: const BoxDecoration( + color: Colors.black26, + borderRadius: BorderRadius.all(Radius.circular(8)), + ), + ), + ), + Container( + alignment: Alignment.bottomLeft, + margin: const EdgeInsets.only(left: 5), + child: Text( + user!.userName, + textAlign: TextAlign.left, + style: const TextStyle( + color: Colors.white, + fontSize: 12, + ), + ), + ), + Container( + alignment: Alignment.bottomRight, + margin: const EdgeInsets.only(right: 5, bottom: 5), + child: Image( + height: 12, + width: 12, + image: isMuted.value ? const AssetImage("assets/images/new/zoom/muted@2x.png") : const AssetImage("assets/images/new/zoom/talking@2x.png"), + fit: BoxFit.cover, + ), + ), + ], + ), + ); + } + } + } +} diff --git a/lib/pages/conference/zoom/zoom_config.dart b/lib/pages/conference/zoom/zoom_config.dart new file mode 100644 index 00000000..09370c00 --- /dev/null +++ b/lib/pages/conference/zoom/zoom_config.dart @@ -0,0 +1,4 @@ +const Map configs = { + 'ZOOM_SDK_KEY': 'b9T74nhfTg-ioP9urm970A', + 'ZOOM_SDK_SECRET': 'KOzmjBNXQ1f4IPHpnngfL29uZvJMufSy2Fk8', +}; diff --git a/lib/pages/feedback/appointment_history.dart b/lib/pages/feedback/appointment_history.dart new file mode 100644 index 00000000..69bd54e8 --- /dev/null +++ b/lib/pages/feedback/appointment_history.dart @@ -0,0 +1,276 @@ +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; + +class AppointmentHistory { + String? setupID; + int? projectID; + int? appointmentNo; + DateTime? appointmentDate; + dynamic appointmentDateN; + int? appointmentType; + String? bookDate; + int? patientType; + int? patientID; + int? clinicID; + int? doctorID; + String? endDate; + String? startTime; + String? endTime; + int? status; + int? visitType; + int? visitFor; + int? patientStatusType; + int? companyID; + int? bookedBy; + String ?bookedOn; + int? confirmedBy; + String? confirmedOn; + int? arrivalChangedBy; + DateTime? arrivedOn; + dynamic editedBy; + dynamic editedOn; + dynamic doctorName; + dynamic doctorNameN; + String? statusDesc; + dynamic statusDescN; + bool? vitalStatus; + dynamic vitalSignAppointmentNo; + int? episodeID; + int? actualDoctorRate; + String? clinicName; + bool? complainExists; + String? doctorImageURL; + String? doctorNameObj; + int? doctorRate; + List? doctorSpeciality; + String? doctorTitle; + int? gender; + String? genderDescription; + bool? iSAllowOnlineCheckedIN; + bool? isActiveDoctor; + bool? isActiveDoctorProfile; + bool? isDoctorAllowVedioCall; + bool? isExecludeDoctor; + int? isFollowup; + bool? isLiveCareAppointment; + bool? isMedicalReportRequested; + bool? isOnlineCheckedIN; + String? latitude; + dynamic listHISGetContactLensPerscription; + dynamic listHISGetGlassPerscription; + String? longitude; + int? nextAction; + int? noOfPatientsRate; + int? originalClinicID; + int? originalProjectID; + String? projectName; + String? qR; + int? remaniningHoursTocanPay; + bool? sMSButtonVisable; + + AppointmentHistory( + {this.setupID, + this.projectID, + this.appointmentNo, + this.appointmentDate, + this.appointmentDateN, + this.appointmentType, + this.bookDate, + this.patientType, + this.patientID, + this.clinicID, + this.doctorID, + this.endDate, + this.startTime, + this.endTime, + this.status, + this.visitType, + this.visitFor, + this.patientStatusType, + this.companyID, + this.bookedBy, + this.bookedOn, + this.confirmedBy, + this.confirmedOn, + this.arrivalChangedBy, + this.arrivedOn, + this.editedBy, + this.editedOn, + this.doctorName, + this.doctorNameN, + this.statusDesc, + this.statusDescN, + this.vitalStatus, + this.vitalSignAppointmentNo, + this.episodeID, + this.actualDoctorRate, + this.clinicName, + this.complainExists, + this.doctorImageURL, + this.doctorNameObj, + this.doctorRate, + this.doctorSpeciality, + this.doctorTitle, + this.gender, + this.genderDescription, + this.iSAllowOnlineCheckedIN, + this.isActiveDoctor, + this.isActiveDoctorProfile, + this.isDoctorAllowVedioCall, + this.isExecludeDoctor, + this.isFollowup, + this.isLiveCareAppointment, + this.isMedicalReportRequested, + this.isOnlineCheckedIN, + this.latitude, + this.listHISGetContactLensPerscription, + this.listHISGetGlassPerscription, + this.longitude, + this.nextAction, + this.noOfPatientsRate, + this.originalClinicID, + this.originalProjectID, + this.projectName, + this.qR, + this.remaniningHoursTocanPay, + this.sMSButtonVisable}); + + AppointmentHistory.fromJson(Map json) { + setupID = json['SetupID']; + projectID = json['ProjectID']; + appointmentNo = json['AppointmentNo']; + appointmentDate = DateUtil.convertStringToDate(json['AppointmentDate']); + appointmentDateN = json['AppointmentDateN']; + appointmentType = json['AppointmentType']; + bookDate = json['BookDate']; + patientType = json['PatientType']; + patientID = json['PatientID']; + clinicID = json['ClinicID']; + doctorID = json['DoctorID']; + endDate = json['EndDate']; + startTime = json['StartTime']; + endTime = json['EndTime']; + status = json['Status']; + visitType = json['VisitType']; + visitFor = json['VisitFor']; + patientStatusType = json['PatientStatusType']; + companyID = json['CompanyID']; + bookedBy = json['BookedBy']; + bookedOn = json['BookedOn']; + confirmedBy = json['ConfirmedBy']; + confirmedOn = json['ConfirmedOn']; + arrivalChangedBy = json['ArrivalChangedBy']; + arrivedOn = DateUtil.convertStringToDate(json['ArrivedOn']); + editedBy = json['EditedBy']; + editedOn = json['EditedOn']; + doctorName = json['DoctorName']; + doctorNameN = json['DoctorNameN']; + statusDesc = json['StatusDesc']; + statusDescN = json['StatusDescN']; + vitalStatus = json['VitalStatus']; + vitalSignAppointmentNo = json['VitalSignAppointmentNo']; + episodeID = json['EpisodeID']; + actualDoctorRate = json['ActualDoctorRate']; + clinicName = json['ClinicName']; + complainExists = json['ComplainExists']; + doctorImageURL = json['DoctorImageURL']; + doctorNameObj = json['DoctorNameObj']; + doctorRate = json['DoctorRate']; +// doctorSpeciality = json['DoctorSpeciality'].cast(); + doctorTitle = json['DoctorTitle']; + gender = json['Gender']; + genderDescription = json['GenderDescription']; + iSAllowOnlineCheckedIN = json['ISAllowOnlineCheckedIN']; + isActiveDoctor = json['IsActiveDoctor']; + isActiveDoctorProfile = json['IsActiveDoctorProfile']; + isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall']; + isExecludeDoctor = json['IsExecludeDoctor']; + isFollowup = json['IsFollowup']; + isLiveCareAppointment = json['IsLiveCareAppointment']; + isMedicalReportRequested = json['IsMedicalReportRequested']; + isOnlineCheckedIN = json['IsOnlineCheckedIN']; + latitude = json['Latitude']; + listHISGetContactLensPerscription = + json['List_HIS_GetContactLensPerscription']; + listHISGetGlassPerscription = json['List_HIS_GetGlassPerscription']; + longitude = json['Longitude']; + nextAction = json['NextAction']; + noOfPatientsRate = json['NoOfPatientsRate']; + originalClinicID = json['OriginalClinicID']; + originalProjectID = json['OriginalProjectID']; + projectName = json['ProjectName']; + qR = json['QR']; + remaniningHoursTocanPay = json['RemaniningHoursTocanPay']; + sMSButtonVisable = json['SMSButtonVisable']; + } + + Map toJson() { + final Map data = new Map(); + data['SetupID'] = this.setupID; + data['ProjectID'] = this.projectID; + data['AppointmentNo'] = this.appointmentNo; + data['AppointmentDate'] = this.appointmentDate; + data['AppointmentDateN'] = this.appointmentDateN; + data['AppointmentType'] = this.appointmentType; + data['BookDate'] = this.bookDate; + data['PatientType'] = this.patientType; + data['PatientID'] = this.patientID; + data['ClinicID'] = this.clinicID; + data['DoctorID'] = this.doctorID; + data['EndDate'] = this.endDate; + data['StartTime'] = this.startTime; + data['EndTime'] = this.endTime; + data['Status'] = this.status; + data['VisitType'] = this.visitType; + data['VisitFor'] = this.visitFor; + data['PatientStatusType'] = this.patientStatusType; + data['CompanyID'] = this.companyID; + data['BookedBy'] = this.bookedBy; + data['BookedOn'] = this.bookedOn; + data['ConfirmedBy'] = this.confirmedBy; + data['ConfirmedOn'] = this.confirmedOn; + data['ArrivalChangedBy'] = this.arrivalChangedBy; + data['ArrivedOn'] = this.arrivedOn; + data['EditedBy'] = this.editedBy; + data['EditedOn'] = this.editedOn; + data['DoctorName'] = this.doctorName; + data['DoctorNameN'] = this.doctorNameN; + data['StatusDesc'] = this.statusDesc; + data['StatusDescN'] = this.statusDescN; + data['VitalStatus'] = this.vitalStatus; + data['VitalSignAppointmentNo'] = this.vitalSignAppointmentNo; + data['EpisodeID'] = this.episodeID; + data['ActualDoctorRate'] = this.actualDoctorRate; + data['ClinicName'] = this.clinicName; + data['ComplainExists'] = this.complainExists; + data['DoctorImageURL'] = this.doctorImageURL; + data['DoctorNameObj'] = this.doctorNameObj; + data['DoctorRate'] = this.doctorRate; + data['DoctorSpeciality'] = this.doctorSpeciality; + data['DoctorTitle'] = this.doctorTitle; + data['Gender'] = this.gender; + data['GenderDescription'] = this.genderDescription; + data['ISAllowOnlineCheckedIN'] = this.iSAllowOnlineCheckedIN; + data['IsActiveDoctor'] = this.isActiveDoctor; + data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile; + data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall; + data['IsExecludeDoctor'] = this.isExecludeDoctor; + data['IsFollowup'] = this.isFollowup; + data['IsLiveCareAppointment'] = this.isLiveCareAppointment; + data['IsMedicalReportRequested'] = this.isMedicalReportRequested; + data['IsOnlineCheckedIN'] = this.isOnlineCheckedIN; + data['Latitude'] = this.latitude; + data['List_HIS_GetContactLensPerscription'] = + this.listHISGetContactLensPerscription; + data['List_HIS_GetGlassPerscription'] = this.listHISGetGlassPerscription; + data['Longitude'] = this.longitude; + data['NextAction'] = this.nextAction; + data['NoOfPatientsRate'] = this.noOfPatientsRate; + data['OriginalClinicID'] = this.originalClinicID; + data['OriginalProjectID'] = this.originalProjectID; + data['ProjectName'] = this.projectName; + data['QR'] = this.qR; + data['RemaniningHoursTocanPay'] = this.remaniningHoursTocanPay; + data['SMSButtonVisable'] = this.sMSButtonVisable; + return data; + } +} diff --git a/lib/pages/feedback/feedback-detail.dart b/lib/pages/feedback/feedback-detail.dart new file mode 100644 index 00000000..e303ed39 --- /dev/null +++ b/lib/pages/feedback/feedback-detail.dart @@ -0,0 +1,64 @@ +import 'package:diplomaticquarterapp/core/model/feedback/COC_items.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/material.dart'; + +class FeedbackDetails extends StatelessWidget { + final COCItem items; + + FeedbackDetails({ + required this.items, + }); + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).feedbackTitle, + body: Container( + margin: EdgeInsets.all(5), + padding: EdgeInsets.all(5), + color: Colors.white, + child: Table( + border: TableBorder.all(), + columnWidths: const { + 0: IntrinsicColumnWidth(), + 1: FlexColumnWidth(), + 2: FixedColumnWidth(64), + }, + defaultVerticalAlignment: TableCellVerticalAlignment.middle, + children: [ + TableRow( + children: [ + getColumnText(TranslationBase.of(context).feedbackTitle), + getColumnText(items.cOCTitle) + ], + ), + TableRow( + children: [ + getColumnText(TranslationBase.of(context).complaint), + getColumnText(items.cOCID) + ], + ), + TableRow( + children: [ + getColumnText(TranslationBase.of(context).date), + getColumnText(items.date) + ], + ), + TableRow( + children: [ + getColumnText(TranslationBase.of(context).type), + getColumnText(items.formType) + ], + ) + ]))); + } + + Widget getColumnText(value) { + return Container(child: Texts(value), padding: EdgeInsets.all(5)); + } +} diff --git a/lib/pages/feedback/feedback_home_page.dart b/lib/pages/feedback/feedback_home_page.dart new file mode 100644 index 00000000..d6bd5932 --- /dev/null +++ b/lib/pages/feedback/feedback_home_page.dart @@ -0,0 +1,87 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'status_feedback_page.dart'; + +class FeedbackHomePage extends StatefulWidget { + final AppoitmentAllHistoryResultList? appointment; + final MessageType messageType; + const FeedbackHomePage({Key? key, this.appointment, this.messageType = MessageType.NON}) : super(key: key); + + @override + _FeedbackHomePageState createState() => _FeedbackHomePageState(); +} + +class _FeedbackHomePageState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + isBottomBar: false, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).feedbackTitle, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).send), Text(TranslationBase.of(context).status)], + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + SendFeedbackPage( + appointment: widget.appointment, + + messageType: widget.messageType, + ), + StatusFeedbackPage() + ], + ), + ) + ], + ), + ); + } +} diff --git a/lib/pages/feedback/send_feedback_page.dart b/lib/pages/feedback/send_feedback_page.dart new file mode 100644 index 00000000..595f6cd6 --- /dev/null +++ b/lib/pages/feedback/send_feedback_page.dart @@ -0,0 +1,573 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/floating_button_search.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; + +// import 'package:speech_to_text/speech_recognition_error.dart'; +import 'package:speech_to_text/speech_to_text.dart' as stt; + +class SendFeedbackPage extends StatefulWidget { + final AppoitmentAllHistoryResultList? appointment; + final MessageType messageType; + + const SendFeedbackPage({Key? key, this.appointment, this.messageType = MessageType.NON}) : super(key: key); + + @override + _SendFeedbackPageState createState() => _SendFeedbackPageState(); +} + +class _SendFeedbackPageState extends State { + TextEditingController titleController = TextEditingController(); + TextEditingController messageController = TextEditingController(); + List images = []; + late String title; + AppoitmentAllHistoryResultList? appointHistory = AppoitmentAllHistoryResultList(); + bool isShowListAppointHistory = true; + String message = ""; + final formKey = GlobalKey(); + MessageType messageType = MessageType.NON; + var _currentLocaleId; + + stt.SpeechToText speech = stt.SpeechToText(); + var reconizedWord; + int selectedStatusIndex = 5; + var event = RobotProvider(); + + List appoList = []; + + ProjectViewModel? projectViewModel; + + String getSelected(BuildContext context) { + switch (messageType) { + case MessageType.ComplaintOnAnAppointment: + return TranslationBase.of(context).complainAppo; + break; + case MessageType.ComplaintWithoutAppointment: + return TranslationBase.of(context).complainWithoutAppo; + break; + case MessageType.Question: + return TranslationBase.of(context).question; + break; + case MessageType.Compliment: + return TranslationBase.of(context).compliment; + break; + case MessageType.Suggestion: + return TranslationBase.of(context).suggestion; + break; + case MessageType.NON: + return TranslationBase.of(context).notClassified; + break; + } + return TranslationBase.of(context).notClassified; + } + + setMessageType(MessageType messageType,AppoitmentAllHistoryResultList? appointHistory) { + print(widget); + setState(() { + this.messageType = messageType; + this.appointHistory = appointHistory; + }); + } + + @override + void initState() { + setState(() { + this.messageType = widget.messageType; + this.appointHistory = widget.appointment; + }); + // requestPermissions(); + event.controller.stream.listen((p) { + if (p['isIOSFeedback'] == 'true') { + if (this.mounted) { + this.titleController.value = p['data']; + } + } + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + allowAny: true, + builder: (_, model, widget) => AppScaffold( + baseViewModel: model, + isShowDecPage: false, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: Form( + key: formKey, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).likeToHear, + // textAlign: TextAlign.center, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + SizedBox(height: 21), + InkWell( + onTap: () { + confirmBox(model); + }, + child: Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + getSelected(context), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + color: Color(0xff2B353E), + ), + ), + Icon( + Icons.keyboard_arrow_down, + size: 22, + color: Colors.grey, + ) + ], + ), + ), + ), + SizedBox(height: 12), + if (appointHistory != null && appointHistory?.doctorTitle!=null && messageType == MessageType.ComplaintOnAnAppointment) + InkWell( + onTap: () { + setState(() { + isShowListAppointHistory = true; + }); + }, + child: DoctorCard( + onTap: null, + isInOutPatient: appointHistory?.isInOutPatient, + name: "${appointHistory?.doctorTitle} ${appointHistory!.doctorNameObj}", + // billNo: _appointmentResult.invoiceNo, + profileUrl: appointHistory!.doctorImageURL, + subName: appointHistory!.projectName, + isLiveCareAppointment: appointHistory!.isLiveCareAppointment, + date: DateUtil.convertStringToDate(appointHistory?.appointmentDate) , + rating: appointHistory?.actualDoctorRate!=null ? appointHistory?.actualDoctorRate +0.0 : 0.0, + appointmentTime: appointHistory?.startTime?.substring(0, 5), + ), + ), + SizedBox(height: 12), + if (messageType == MessageType.ComplaintOnAnAppointment && appoList.length != 0 && isShowListAppointHistory) + Container( + margin: EdgeInsets.only(bottom: 10.0), + height: appoList.length > 2 ? MediaQuery.of(context).size.height * 0.35 : MediaQuery.of(context).size.height * 0.17, + child: ListView.separated( + itemCount: appoList.length, + separatorBuilder: (ctx, index) => SizedBox(height: 12), + itemBuilder: (context, index) => InkWell( + onTap: () { + setState(() { + appointHistory = appoList[index]; + isShowListAppointHistory = false; + }); + }, + child: DoctorCard( + onTap: null, + isInOutPatient: appoList[index].isInOutPatient, + name: appoList[index].doctorTitle! + " " + appoList[index].doctorNameObj!, + profileUrl: appoList[index].doctorImageURL, + subName: appoList[index].projectName, + isLiveCareAppointment: appoList[index].isLiveCareAppointment, + date: DateUtil.convertStringToDate(appoList[index].appointmentDate!), + rating: appoList[index].actualDoctorRate! + 0.0, + appointmentTime: appoList[index].startTime!.substring(0, 5), + ), + ), + ), + ), + inputWidget(TranslationBase.of(context).subject, "", titleController), + SizedBox(height: 12), + inputWidget(TranslationBase.of(context).message, "", messageController, lines: 11, suffixTap: () async { + if (Platform.isAndroid) { + if (await PermissionService.isMicrophonePermissionEnabled()) { + openSpeechReco(); + } else { + Utils.showPermissionConsentDialog(context, TranslationBase.of(context).recordAudioPermission, () { + openSpeechReco(); + }); + } + } else { + openSpeechReco(); + } + }), + SizedBox(height: 12), + InkWell( + onTap: () { + ImageOptions.showImageOptions(context, (String image, File file) { + setState(() { + images.add(image); + }); + }); + }, + child: Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + Icons.attach_file, + color: Color(0xff2B353E), + ), + Text( + TranslationBase.of(context).selectAttachment, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + ], + ), + ), + ), + ...List.generate( + images.length, + (index) => Container( + margin: EdgeInsets.all(10), + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Icon(FontAwesomeIcons.paperclip), + SizedBox( + width: 8, + ), + Texts( + 'image ${index + 1}.png', + ), + ], + ), + InkWell( + onTap: () { + setState(() { + images.remove(images[index]); + }); + }, + child: Icon( + FontAwesomeIcons.trashAlt, + color: Colors.red[300], + )) + ], + ), + )), + ], + ), + ), + ), + ), + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).send, + (titleController.text.toString().isEmpty || messageController.text.toString().isEmpty) + ? null + : () { + final form = formKey.currentState; + if (form!.validate()) { + GifLoaderDialogUtils.showMyDialog(context); + model + .sendCOCItem( + title: titleController.text, + attachment: images.length > 0 ? images[0] : "", + details: messageController.text, + cOCTypeName: getCOCName(), + appointHistory: messageType == MessageType.ComplaintOnAnAppointment ? appointHistory : null) + .then((value) { + if (value) { + setState(() { + titleController.text = ""; + messageController.text = ""; + images = []; + }); + selectedStatusIndex = 5; + setMessageType(MessageType.NON, appointHistory); + GifLoaderDialogUtils.hideDialog(context); + AppToast.showSuccessToast(message: TranslationBase.of(context).yourFeedback); + } else { + AppToast.showErrorToast(message: model.error); + GifLoaderDialogUtils.hideDialog(context); + } + }); + } + }, + color: Color(0xffD02127), + textColor: Colors.white, + disabledColor: Color(0xffEAEAEA), + ), + ), + ], + ), + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {VoidCallback? suffixTap, bool isEnable = true, bool hasSelection = false, int? lines}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.text, + controller: _controller, + maxLines: lines, + onChanged: (value) => {setState(() {})}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + suffixIconConstraints: BoxConstraints(minWidth: 50), + suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + + String getCOCName() { + switch (messageType) { + case MessageType.ComplaintOnAnAppointment: + return "1"; + break; + case MessageType.ComplaintWithoutAppointment: + return "2"; + break; + case MessageType.Question: + return "3"; + break; + case MessageType.Compliment: + return "4"; + break; + case MessageType.Suggestion: + return "6"; + break; + case MessageType.NON: + return "5"; + break; + } + return ""; + } + + // Show Dialog function + void confirmBox(FeedbackViewModel model) { + DoctorsListService service = new DoctorsListService(); + + List list = [ + RadioSelectionDialogModel(TranslationBase.of(context).notClassified, 5), + RadioSelectionDialogModel(TranslationBase.of(context).complainAppo, 1), + RadioSelectionDialogModel(TranslationBase.of(context).complainWithoutAppo, 2), + RadioSelectionDialogModel(TranslationBase.of(context).question, 3), + RadioSelectionDialogModel(TranslationBase.of(context).compliment, 4), + RadioSelectionDialogModel(TranslationBase.of(context).suggestion, 6), + ]; + + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: selectedStatusIndex, + onValueSelected: (index) { + int languageID = projectViewModel!.isArabic ? 1 : 2; + selectedStatusIndex = index; + + if (index == 1) { + messageType = MessageType.ComplaintOnAnAppointment; + } else if (index == 2) { + messageType = MessageType.ComplaintWithoutAppointment; + } else if (index == 3) { + messageType = MessageType.Question; + } else if (index == 4) { + messageType = MessageType.Compliment; + } else if (index == 5) { + messageType = MessageType.NON; + } else { + messageType = MessageType.Suggestion; + } + + if (messageType == MessageType.ComplaintOnAnAppointment) { + appoList.clear(); + GifLoaderDialogUtils.showMyDialog(context); + service.getPatientAppointmentHistory(false, languageID, context, isForCOC: true).then((res) { + GifLoaderDialogUtils.hideDialog(context); + setState(() { + if (res['MessageStatus'] == 1) { + if (res['AppoimentAllHistoryResultList'].length != 0) { + res['AppoimentAllHistoryResultList'].forEach((v) { + appoList.add(new AppoitmentAllHistoryResultList.fromJson(v)); + }); + setState(() { + appointHistory = AppoitmentAllHistoryResultList(); + isShowListAppointHistory = true; + }); + } else {} + } else {} + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + // print(err); + // AppToast.showErrorToast(message: err); + // Navigator.of(context).pop(); + }); + } else { + isShowListAppointHistory = false; + } + setMessageType(messageType, appointHistory); + }, + ), + ); + + return; + } + + + openSpeechReco() async { + new RoboSearch(context: context).showAlertDialog(context); + _currentLocaleId = TranslationBase.of(AppGlobal.context).locale.languageCode; + bool available = await speech.initialize(); + + if(available) { + speech.listen( + onResult: resultListener, + listenFor: Duration(seconds: 10), + localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA', + // onSoundLevelChange: soundLevelListener, + // cancelOnError: true, + // partialResults: true, + // onDevice: true, + // listenMode: stt.ListenMode.deviceDefault + ); + } + } + void statusListener(String status) { + reconizedWord = status == 'listening' ? 'Lisening...' : 'Sorry....'; + } + + void requestPermissions() async { + Map statuses = await [ + Permission.microphone, + ].request(); + } + + void resultListener(result) { + reconizedWord = result.recognizedWords; + event.setValue({"searchText": reconizedWord}); + + if (result.finalResult == true) { + setState(() { + messageController.text += reconizedWord + '\n'; + RoboSearch.closeAlertDialog(context); + // speech.stop(); + }); + } + } + + // Future initSpeechState() async { + // bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener); + // print(hasSpeech); + // if (!mounted) return; + // } +} diff --git a/lib/pages/feedback/status_feedback_page.dart b/lib/pages/feedback/status_feedback_page.dart new file mode 100644 index 00000000..28c8fb52 --- /dev/null +++ b/lib/pages/feedback/status_feedback_page.dart @@ -0,0 +1,371 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart'; +import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/feedback/feedback-detail.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class StatusFeedbackPage extends StatefulWidget { + @override + _StatusFeedbackPageState createState() => _StatusFeedbackPageState(); +} + +class _StatusFeedbackPageState extends State { + String countryCode = '966'; + String mobileNo = ""; + TextEditingController complainNumberController = TextEditingController(); + StatusType statusType = StatusType.ComplaintNumber; + int selectedStatusIndex = 3; + late ProjectViewModel projectViewModel; + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + allowAny: true, + onModelReady: (model) { + model.cOCItemList.clear(); + if (projectViewModel.isLogin) model.getCOC(); + }, + builder: (_, model, widget) => AppScaffold( + baseViewModel: model, + isShowDecPage: false, + body: Column( + children: [ + Expanded( + child: projectViewModel.isLogin + ? model.cOCItemList.isNotEmpty + ? listData(model.cOCItemList, projectViewModel.isArabic, true) + : Center( + child: Column( + children: [ + SizedBox( + height: MediaQuery.of(context).size.height * 0.4, + ), + Image.asset( + 'assets/images/comments.png', + width: 80, + height: 80, + ), + SizedBox( + height: 15, + ), + Text( + TranslationBase.of(context).noSearchResult, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + color: Color(0xff2B353E), + ), + ), + ], + ), + ) + : SingleChildScrollView( + padding: EdgeInsets.all(21), + physics: BouncingScrollPhysics(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectSearchCriteria, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + SizedBox(height: 21), + InkWell( + onTap: () { + List list = [ + RadioSelectionDialogModel(TranslationBase.of(context).complaintNumber, 3), + RadioSelectionDialogModel(TranslationBase.of(context).fileNumber, 1), + RadioSelectionDialogModel(TranslationBase.of(context).identificationNumber, 2), + ]; + + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: selectedStatusIndex, + onValueSelected: (index) { + selectedStatusIndex = index; + setState(() { + if (index == 3) { + statusType = StatusType.ComplaintNumber; + } else if (index == 1) { + statusType = StatusType.FileNumber; + } else { + statusType = StatusType.IdentificationNumber; + } + }); + }, + ), + ); + }, + child: Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + getSelected(context), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + color: Color(0xff2B353E), + ), + ), + Icon( + Icons.keyboard_arrow_down, + size: 22, + color: Colors.grey, + ) + ], + ), + ), + ), + SizedBox(height: 12), + Directionality( + textDirection: TextDirection.ltr, + child: inputWidget( + statusType == StatusType.ComplaintNumber + ? TranslationBase.of(context).enterComplainNumber + : (statusType == StatusType.FileNumber ? TranslationBase.of(context).enterfileNumber : TranslationBase.of(context).enterIdentificationNumber), + "", + complainNumberController, + isInputTypeNum: true)), + SizedBox(height: 12), + PhoneNumberSelectorWidget(onNumberChange: (value) { + setState(() { + mobileNo = value; + }); + }, onCountryChange: (value) { + setState(() { + countryCode = value; + }); + }), + if (model.cOCItemList.length > 0) listData(model.cOCItemList, projectViewModel.isArabic, false), + ], + ), + ), + ), + if (!projectViewModel.isLogin) + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).search, + projectViewModel.isLogin || (mobileNo.length < 9) || (complainNumberController.text.isEmpty) + ? null + : () { + model.searchFeedback(countryCode, mobileNo, selectedStatusIndex, complainNumberController.text).then((value) { + if (model.state == ViewState.ErrorLocal) { + Future.delayed(Duration(seconds: 1), () { + AppToast.showErrorToast(message: model.error); + }); + } else {} + }); + }, + disabledColor: Colors.grey, + ), + ), + ], + ), + ), + ); + } + + Widget listData(List cOCItemList, bool isArabic, bool isLogin) { + return ListView.builder( + padding: isLogin ? EdgeInsets.all(21) : null, + itemCount: cOCItemList.length, + shrinkWrap: isLogin ? false : true, + physics: isLogin ? null : NeverScrollableScrollPhysics(), + itemBuilder: (context, index) => InkWell( + onTap: () { + // sss + }, + child: Container( + margin: EdgeInsets.only(top: 12), + decoration: BoxDecoration( + color: (cOCItemList[index].statusId==7||cOCItemList[index].statusId==8)?CustomColors.accentColor:(cOCItemList[index].statusId==10||cOCItemList[index].statusId==6||cOCItemList[index].statusId==9)?CustomColors.green:CustomColors.orange, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + + child: Container( + margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), + padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + ), + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(isArabic ? cOCItemList[index].statusAr! : cOCItemList[index].status!, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56, fontWeight: FontWeight.bold)), + Container( + margin: EdgeInsets.only(top: 5.0), + child: Text(cOCItemList[index].formType.toString(), + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12))), + MyRichText(TranslationBase.of(context).number + ": ", cOCItemList[index].itemID.toString(), isArabic), + Text(cOCItemList[index].cOCTitle!, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12)), + ], + ), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text(cOCItemList[index].date!.split(" ")[0], + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48)), + Text(cOCItemList[index].date!.split(" ")[1].substring(0, 4), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontFamily: isArabic ? 'Cairo' : 'Poppins', color: Color(0xff2B353E), letterSpacing: -0.48)), + ], + ), + ], + ), + ), + ), + ), + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, + {VoidCallback? suffixTap, bool isEnable = true, bool hasSelection = false, int? lines, bool isInputTypeNum = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: isInputTypeNum ? TextInputType.number : TextInputType.text, + controller: _controller, + maxLines: lines, + onChanged: (value) => {setState(() {})}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + suffixIconConstraints: BoxConstraints(minWidth: 50), + suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + + gotodetails(item) { + Navigator.pushReplacement(context, FadePage(page: FeedbackDetails(items: item))); + } + + String getSelected(BuildContext context) { + switch (statusType) { + case StatusType.ComplaintNumber: + return TranslationBase.of(context).complaintNumber; + break; + case StatusType.FileNumber: + return TranslationBase.of(context).fileNumber; + break; + case StatusType.IdentificationNumber: + return TranslationBase.of(context).identificationNumber; + break; + } + return TranslationBase.of(context).notClassified; + } +} + +enum StatusType { + ComplaintNumber, + FileNumber, + IdentificationNumber, +} diff --git a/lib/pages/final_products_page.dart b/lib/pages/final_products_page.dart new file mode 100644 index 00000000..4432cb1c --- /dev/null +++ b/lib/pages/final_products_page.dart @@ -0,0 +1,606 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/cart-order-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart' as utils; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:provider/provider.dart'; + +import 'base/base_view.dart'; + +dynamic languageID; + +class FinalProductsPage extends StatefulWidget { + final String? id; + final int productType; // 1 : default, 2 : manufacturer , 3 : recently viewed + AuthenticatedUserObject authenticatedUserObject = locator(); + + FinalProductsPage({this.id, this.productType = 1}); + + @override + _FinalProductsPageState createState() => _FinalProductsPageState(id: id); +} + +class _FinalProductsPageState extends State { + String? id; + + _FinalProductsPageState({this.id}); + + String categoriseName = "Personal Care"; + String appBarTitle = ""; + bool styleOne = true; + bool styleTwo = false; + Icon styleIcon = Icon( + Icons.widgets_sharp, + color: Colors.blue, + size: 29.0, + ); + + getLanguageID() async { + languageID = await sharedPref.getString(APP_LANGUAGE); + } + + void initState() { + getLanguageID(); + super.initState(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) { + if (widget.productType == 1) { + model.getFinalProducts(i: id); + appBarTitle = TranslationBase.of(context).products; + } else if (widget.productType == 2) { + model.getManufacturerProducts(id!); + } else if (widget.productType == 3) { + model.getLastVisitedProducts(); + appBarTitle = TranslationBase.of(context).recentlyViewed; + } else if (widget.productType == 4) { + model.getMostViewedProducts(); + appBarTitle = TranslationBase.of(context).mostViewed; + } else if (widget.productType == 5) { + model.getNewProducts(); + appBarTitle = TranslationBase.of(context).newProducts; + } else { + model.getBestSellerProducts(); + appBarTitle = TranslationBase.of(context).bestSellers; + } + }, + allowAny: true, + builder: (BuildContext context, PharmacyCategoriseViewModel model, Widget? child) => AppScaffold( + isPharmacy: true, + appBarTitle: appBarTitle, + isBottomBar: true, + isShowAppBar: true, + backgroundColor: Colors.white, + isShowDecPage: false, + showPharmacyCart: false, + showHomeAppBarIcon: false, + baseViewModel: model, + body: Container( + height: MediaQuery.of(context).size.height * 5.87, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: EdgeInsets.all(8.0), + child: Texts( + "$appBarTitle " + TranslationBase.of(context).products, + fontWeight: FontWeight.w600, + ), + ), + Row( + children: [ + Container( + height: 44.0, + child: VerticalDivider( + color: Colors.black45, + thickness: 1.0, + //width: 0.3, + // indent: 0.0, + ), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: InkWell( + child: styleIcon, + onTap: () { + setState(() { + if (styleOne == true) { + styleOne = false; + styleTwo = true; + styleIcon = Icon( + Icons.auto_awesome_mosaic, + color: CustomColors.green, + size: 29.0, + ); + } else { + styleOne = true; + styleTwo = false; + styleIcon = Icon( + Icons.widgets_sharp, + color: CustomColors.green, + size: 29.0, + ); + } + }); + }, + ), + ), + ], + ), + ], + ), + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + styleOne == true + ? Expanded( + child: model.finalProducts.length > 0 + ? Container( + height: MediaQuery.of(context).size.height * 3.90, + child: GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + crossAxisSpacing: 0.5, + mainAxisSpacing: 2.0, + childAspectRatio: 1.0, + ), + itemCount: model.finalProducts.length, + itemBuilder: (BuildContext context, int index) { + return NetworkBaseView( + baseViewModel: model, + child: InkWell( + child: Card( + color: model.finalProducts[index].discountName != null ? Color(0xffFFFF00) : Colors.white, + elevation: 0, + shape: Border( + right: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + left: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + bottom: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + top: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + ), + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(110.0), + ), + color: Colors.white, + ), + padding: EdgeInsets.symmetric(horizontal: 0), + width: MediaQuery.of(context).size.width / 3, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Stack( + children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 16, 0, 0), + alignment: Alignment.center, + child: (model.finalProducts[index].images != null && model.finalProducts[index].images!.length > 0) + ? Image.network( + model.finalProducts[index].images![0].src!, + fit: BoxFit.cover, + height: 80, + width: 80, + ) + : Image.asset( + "assets/images/no_image.png", + fit: BoxFit.cover, + height: 80, + width: 80, + ), +// Image.network( +// model.finalProducts[index].images.isNotEmpty +// ? model.finalProducts[index].images[0].thumb +// : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', +// fit: BoxFit.cover, +// height: 80, +// ), + ), + Container( + width: model.finalProducts[index].rxMessage != null ? double.infinity : 0, + //MediaQuery.of(context).size.width / 2.8 : 0, + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xffb23838), + // borderRadius: BorderRadius.only(topLeft: Radius.circular(6) + // ), + ), + child: model.finalProducts[index].rxMessage != null + ? Texts( + projectProvider.isArabic ? model.finalProducts[index].rxMessagen : model.finalProducts[index].rxMessage, + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: FontWeight.w600, + ) + : Texts(""), + ), + ], + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (model.finalProducts[index].discountName != null) + Container( + width: double.infinity, + height: 13.0, + decoration: BoxDecoration( + color: Color(0xff5AB145), + ), + child: Center( + child: Texts( + model.finalProducts[index].discountName, + regular: true, + color: Colors.white, + fontSize: 10.4, + ), + ), + ), + Texts( + projectViewModel.isArabic ? model.finalProducts[index].namen : model.finalProducts[index].name, +// model.finalProducts[index].name, + regular: true, + fontSize: 12, + fontWeight: FontWeight.w400, + ), + Padding( + padding: const EdgeInsets.only(top: 4, bottom: 4), + child: Texts( + "SAR ${model.finalProducts[index].price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ +// StarRating( +// totalAverage: model.finalProducts[index].approvedRatingSum > 0 +// ? (model.finalProducts[index].approvedRatingSum.toDouble() / model.finalProducts[index].approvedRatingSum.toDouble()).toDouble() +// : 0, +// forceStars: true), + + RatingBar( + itemSize: 20.0, + allowHalfRating: true, + initialRating: model.finalProducts[index].approvedRatingSum!.toDouble(), + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star_border, + color: CustomColors.accentColor, + ), + ), + onRatingUpdate: (double value) {}, + unratedColor: Colors.grey[500], + updateOnDrag: false, + tapOnlyMode: false, + ), + + Texts( + "(${model.finalProducts[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + ], + ), + ], + ), + ), + ], + ), + ), + ), + onTap: () => { + Navigator.push( + context, + FadePage( + page: ProductDetailPage(model.finalProducts[index]), + )), + }, + )); + }, + ), + ) + : Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Align( + alignment: Alignment.center, + child: Image.asset( + 'assets/images/pharmacy/empty_box.png', + width: 100, + height: 100, + ), + ), + Text( + TranslationBase.of(context).noResult, + style: TextStyle( + fontSize: 20.0, +// fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + ) + : Expanded( + child: model.finalProducts.length > 0 + ? Container( + height: MediaQuery.of(context).size.height * 5.0, + child: ListView.builder( + itemCount: model.finalProducts.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + child: Card( + child: Row( + children: [ + Stack( + children: [ + Column( + children: [ + Container( + decoration: BoxDecoration(), + child: Padding( + padding: EdgeInsets.only( + left: 9.0, + top: 8.0, + right: 10.0, + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 0, 0, 8), + alignment: Alignment.center, + child: (model.finalProducts[index].images != null && model.finalProducts[index].images!.length > 0) + ? Image.network( + model.finalProducts[index].images![0].src!, + fit: BoxFit.cover, + height: 80, + width: 80, + ) + : Image.asset( + "assets/images/no_image.png", + fit: BoxFit.cover, + height: 80, + width: 80, + ), +// Image.network( +// model.finalProducts[index].images.isNotEmpty +// ? model.finalProducts[index].images[0].thumb +// : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', +// fit: BoxFit.contain, +// height: 80, +// ), + ), + ], + ), + Column( + children: [ + Container( + width: model.finalProducts[index].rxMessage != null ? MediaQuery.of(context).size.width / 3.70 : 0, + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xffb23838), + //borderRadius: BorderRadius.only(topLeft: Radius.circular(5)), + ), + child: model.finalProducts[index].rxMessage != null + ? Texts( + projectProvider.isArabic ? model.finalProducts[index].rxMessagen : model.finalProducts[index].rxMessage, + color: Colors.white, + regular: true, + fontSize: 8, + fontWeight: FontWeight.w600, + ) + : Texts(""), +// Texts( +// model.finalProducts[index].rxMessage != null ? model.finalProducts[index].rxMessage : "", +// color: Colors.white, +// regular: true, +// fontSize: 10, +// fontWeight: FontWeight.w600, +// ), + ), + ], + ), + ], + ), + Container( + height: 100.0, + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 4.0, + ), + Container( + width: MediaQuery.of(context).size.width * 0.55, + child: Texts( + projectViewModel.isArabic ? model.finalProducts[index].namen : model.finalProducts[index].name, +// model.finalProducts[index].name, + regular: true, + fontSize: 13.2, + fontWeight: FontWeight.w500, + maxLines: 5, + ), + ), + SizedBox( + height: 8.0, + ), + Padding( + padding: const EdgeInsets.only(top: 4, bottom: 4), + child: Texts( + "SAR ${model.finalProducts[index].price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ +// StarRating( +// totalAverage: model.finalProducts[index].approvedRatingSum > 0 +// ? (model.finalProducts[index].approvedRatingSum.toDouble() / model.finalProducts[index].approvedRatingSum.toDouble()).toDouble() +// : 0, +// forceStars: true), + RatingBar( + initialRating: model.finalProducts[index].approvedRatingSum!.toDouble(), + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star_border, + color: CustomColors.accentColor, + ), + ), + onRatingUpdate: (double value) {}, + unratedColor: Colors.grey[500], + updateOnDrag: false, + tapOnlyMode: false, + ), + + Texts( + "(${model.finalProducts[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + ], + ), + ], + ), + ), + widget.authenticatedUserObject.isLogin + ? Container( + child: IconButton( + icon: Icon( + Icons.shopping_cart, + size: 18, + color: CustomColors.green, + ), + onPressed: () async { + if (model.finalProducts[index].isRx == false) { + GifLoaderDialogUtils.showMyDialog(context); + await addToCartFunction(1, model.finalProducts[index].id); + GifLoaderDialogUtils.hideDialog(context); + // Navigator.push(context, FadePage(page: CartOrderPage())); + utils.Utils.navigateToCartPage(); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription); + } +// + }), + ) + : Container(), + ], + ), + ), + onTap: () => { + Navigator.push( + context, + FadePage( + page: ProductDetailPage(model.finalProducts[index]), + )), + }, + ); + }), + ) + : Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Align( + alignment: Alignment.center, + child: Image.asset( + 'assets/images/pharmacy/empty_box.png', + width: 100, + height: 100, + ), + ), + Text( + TranslationBase.of(context).noResult, + style: TextStyle( + fontSize: 20.0, +// fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + ) + ], + ), + ), + )); + } + + addToCartFunction(quantity, itemID) async { + ProductDetailViewModel x = new ProductDetailViewModel(); + await x.addToCartData(quantity, itemID, context); + } +} diff --git a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart new file mode 100644 index 00000000..93e74183 --- /dev/null +++ b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart @@ -0,0 +1,261 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/pages/insurance/UpdateInsuranceManually.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class AttachInsuranceCardImageDialog extends StatefulWidget { + String name; + String fileNo; + String? identificationNo; + String? mobileNo; + Function(File file, String image) image; + bool isBirthNotification; + + AttachInsuranceCardImageDialog({Key? key, required this.name, required this.fileNo, this.identificationNo, this.mobileNo, required this.image, this.isBirthNotification = false}) : super(key: key); + + @override + _AttachInsuranceCardImageDialogState createState() => _AttachInsuranceCardImageDialogState(); +} + +class _AttachInsuranceCardImageDialogState extends State { + @override + void initState() { + super.initState(); + } + + String? image = ""; + late File file; + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + widget.isBirthNotification ? TranslationBase.of(context).scanID : TranslationBase.of(context).updateInsurCards, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ), + Divider(), + Padding( + padding: const EdgeInsets.only(left: 8, right: 8), + child: Text( + widget.name, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.48, + ), + ), + ), + SizedBox( + height: 3, + ), + Text( + TranslationBase.of(context).fileNo + " " + widget.fileNo, + style: TextStyle( + fontSize: 14, + letterSpacing: -0.48, + ), + ), + SizedBox( + height: 5.0, + ), + InkWell( + onTap: () { + ImageOptions.showImageOptions(context, (String image, File file) { + setState(() { + this.image = image; + this.file = file; + }); + }); + }, + child: image!.isEmpty + ? Padding( + padding: const EdgeInsets.all(18.0), + child: Container( + width: double.maxFinite, + height: 200, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(2), border: Border.all(color: Colors.grey, width: 1.5)), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + // mainAxisAlignment: MainAxisAlignment., + children: [ + SizedBox( + height: 25, + ), + Icon( + Icons.camera_enhance_rounded, + size: 85, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon(Icons.attach_file), + Text( + TranslationBase.of(context).selectAttachment.toUpperCase(), + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ) + ], + ), + ], + ), + ), + ) + : Image.file( + file, + fit: BoxFit.fill, + height: 250, + ), + ), + if (!widget.isBirthNotification) + Text( + "OR", + style: TextStyle( + fontSize: 16, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + if (!widget.isBirthNotification) + Padding( + padding: const EdgeInsets.all(18.0), + child: DefaultButton( + TranslationBase.of(context).updateInsuranceManually, + () { + Navigator.pop(context); + Navigator.push( + context, + FadePage( + page: UpdateInsuranceManually( + patientIdentificationNo: '', + patientMobileNumber: '', + patientID: 0, + ), + ), + ); + }, + textColor: Colors.white, + color: CustomColors.accentColor, + ), + ), + Text( + "OR", + style: TextStyle( + fontSize: 16, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + Padding( + padding: const EdgeInsets.all(18.0), + child: Text( + TranslationBase.of(context).habibCallCenter, + style: TextStyle( + fontSize: 16, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + // DefaultButton( + // TranslationBase.of(context).updateInsuranceManually, + // () { + // Navigator.pop(context); + // Navigator.push( + // context, + // FadePage( + // page: UpdateInsuranceManually( + // patientIdentificationNo: widget.identificationNo, + // patientMobileNumber: widget.mobileNo, + // patientID: num.parse(widget.fileNo), + // ), + // ), + // ); + // }, + // textColor: Colors.white, + // color: CustomColors.accentColor, + // ), + ), + SizedBox( + height: 25.0, + ), + Divider(), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Text( + TranslationBase.of(context).cancel.toUpperCase(), + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + color: Colors.red, + ), + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + if (file != null && image != null) { + Navigator.pop(context); + widget.image(file, image!); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).noInsuranceCardAttached); + } + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Text( + TranslationBase.of(context).ok.toUpperCase(), + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + )), + ), + ), + ), + ], + ) + ], + ) + ], + ); + } +} diff --git a/lib/pages/insurance/UpdateInsuranceManually.dart b/lib/pages/insurance/UpdateInsuranceManually.dart new file mode 100644 index 00000000..637d7c5f --- /dev/null +++ b/lib/pages/insurance/UpdateInsuranceManually.dart @@ -0,0 +1,277 @@ +import 'package:diplomaticquarterapp/core/model/insurance/insuranceManualUpdateRequest.dart'; +import 'package:diplomaticquarterapp/core/service/insurance_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/insurance/getInsuranceCompaniesModel.dart'; +import 'package:diplomaticquarterapp/models/insurance/insuranceCompaniesSchemeModel.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class UpdateInsuranceManually extends StatefulWidget { + String patientIdentificationNo; + String patientMobileNumber; + int patientID; + + UpdateInsuranceManually({required this.patientIdentificationNo, required this.patientMobileNumber, required this.patientID}); + + @override + State createState() => _UpdateInsuranceManuallyState(); +} + +class _UpdateInsuranceManuallyState extends State { + TextEditingController _nationalIDTextController = TextEditingController(); + TextEditingController _cardHolderNameTextController = TextEditingController(); + TextEditingController _membershipNoTextController = TextEditingController(); + TextEditingController _policyNoTextController = TextEditingController(); + late ProjectViewModel projectViewModel; + + InsuranceCardService _insuranceCardService = locator(); + + List insuranceCompaniesList = []; + List insuranceCompaniesSchemesList = []; + + int _selectedInsuranceCompanyIndex = -1; + int _selectedInsuranceCompanySchemeIndex = -1; + + late InsuranceCompaniesGetModel selectedInsuranceCompanyObj; + late InsuranceCompaniesSchemeModel selectedInsuranceCompaniesSchemesObj; + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((_) { + getInsuranceCompanies(); + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + _nationalIDTextController.text = widget.patientIdentificationNo; + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).updateInsurCards, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + body: SingleChildScrollView( + child: Padding( + padding: EdgeInsets.all(21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + TranslationBase.of(context).enterInsuranceDetails, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 16, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + SizedBox(height: 12), + InkWell( + onTap: () { + confirmSelectInsuranceCompanyDialog(); + }, + child: Container( + padding: EdgeInsets.all(8), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + selectedInsuranceCompanyObj != null ? selectedInsuranceCompanyObj.companyName! : TranslationBase.of(context).insuranceCompany, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + Icon(Icons.arrow_drop_down) + ], + ), + ), + ), + SizedBox(height: 12), + NewTextFields( + hintText: TranslationBase.of(context).nationalIdNumber, + controller: _nationalIDTextController, + readOnly: true, + ), + SizedBox(height: 12), + NewTextFields( + hintText: TranslationBase.of(context).cardHolderName, + controller: _cardHolderNameTextController, + readOnly: false, + ), + SizedBox(height: 12), + NewTextFields( + hintText: TranslationBase.of(context).membershipNo, + controller: _membershipNoTextController, + readOnly: false, + ), + SizedBox(height: 12), + NewTextFields( + hintText: TranslationBase.of(context).insurancePolicyNo, + controller: _policyNoTextController, + readOnly: false, + ), + SizedBox(height: 12), + InkWell( + onTap: () { + confirmSelectInsuranceCompanySchemeDialog(); + }, + child: Container( + padding: EdgeInsets.all(8), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + selectedInsuranceCompaniesSchemesObj != null ? selectedInsuranceCompaniesSchemesObj.subCategoryDesc! : TranslationBase.of(context).insuranceClassName, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + Icon(Icons.arrow_drop_down) + ], + ), + ), + ), + ], + ), + ), + ), + bottomSheet: Container( + color: Theme.of(context).scaffoldBackgroundColor, + padding: EdgeInsets.all(18), + child: DefaultButton( + TranslationBase.of(context).submit, + () { + if (isFormValid()) + submitManualInsuranceUpdateRequest(); + else + AppToast.showErrorToast(message: TranslationBase.of(context).enterInsuranceDetails); + }, + disabledColor: Colors.grey, + ), + ), + ); + } + + bool isFormValid() { + if (selectedInsuranceCompanyObj != null && + _cardHolderNameTextController.text.isNotEmpty && + _membershipNoTextController.text.isNotEmpty && + _policyNoTextController.text.isNotEmpty && + selectedInsuranceCompaniesSchemesObj != null) { + return true; + } else { + return false; + } + } + + void confirmSelectInsuranceCompanyDialog() { + List list = [ + for (int i = 0; i < insuranceCompaniesList.length; i++) RadioSelectionDialogModel(insuranceCompaniesList[i].companyName!, i), + ]; + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: _selectedInsuranceCompanyIndex, + isScrollable: true, + isShowSearch: true, + onValueSelected: (index) { + _selectedInsuranceCompanyIndex = index; + selectedInsuranceCompanyObj = insuranceCompaniesList[index]; + setState(() {}); + getInsuranceScheme(); + }, + ), + ); + } + + void confirmSelectInsuranceCompanySchemeDialog() { + List list = [ + for (int i = 0; i < insuranceCompaniesSchemesList.length; i++) RadioSelectionDialogModel(insuranceCompaniesSchemesList[i].subCategoryDesc!, i), + ]; + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: _selectedInsuranceCompanySchemeIndex, + isScrollable: true, + onValueSelected: (index) { + _selectedInsuranceCompanySchemeIndex = index; + selectedInsuranceCompaniesSchemesObj = insuranceCompaniesSchemesList[index]; + setState(() {}); + }, + ), + ); + } + + void getInsuranceCompanies() { + GifLoaderDialogUtils.showMyDialog(context); + _insuranceCardService.getInsuranceCompanies().then((value) { + value.forEach((result) { + insuranceCompaniesList.add(InsuranceCompaniesGetModel.fromJson(result)); + }); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + void submitManualInsuranceUpdateRequest() { + GifLoaderDialogUtils.showMyDialog(context); + + InsuranceManualUpdateRequest insuranceManualUpdateRequest = new InsuranceManualUpdateRequest(); + + insuranceManualUpdateRequest.projectID = selectedInsuranceCompanyObj.projectID; + insuranceManualUpdateRequest.requestType = 2; + insuranceManualUpdateRequest.mobileNo = widget.patientMobileNumber; + insuranceManualUpdateRequest.cardHolderName = _cardHolderNameTextController.text; + insuranceManualUpdateRequest.insuranceCompanyName = selectedInsuranceCompanyObj.companyName; + insuranceManualUpdateRequest.memberShipNo = _membershipNoTextController.text; + insuranceManualUpdateRequest.policyNo = _policyNoTextController.text; + insuranceManualUpdateRequest.patientIdentificationID = widget.patientIdentificationNo; + insuranceManualUpdateRequest.schemeClass = selectedInsuranceCompaniesSchemesObj.subCategoryDesc; + insuranceManualUpdateRequest.setupID = selectedInsuranceCompanyObj.setupID; + insuranceManualUpdateRequest.patientID = widget.patientID; + + _insuranceCardService.submitManualInsuranceUpdateRequest(insuranceManualUpdateRequest).then((value) { + print(value); + AppToast.showSuccessToast(message: TranslationBase.of(context).insuranceRequestSubmit); + Navigator.pop(context); + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err.toString()); + }); + } + + void getInsuranceScheme() { + GifLoaderDialogUtils.showMyDialog(context); + _insuranceCardService.getInsuranceSchemes(selectedInsuranceCompanyObj.projectID!, selectedInsuranceCompanyObj.companyID!).then((value) { + value.forEach((result) { + insuranceCompaniesSchemesList.add(InsuranceCompaniesSchemeModel.fromJson(result)); + }); + GifLoaderDialogUtils.hideDialog(context); + }); + } +} diff --git a/lib/pages/insurance/insurance_approval_detail_screen.dart b/lib/pages/insurance/insurance_approval_detail_screen.dart new file mode 100644 index 00000000..b17da0cf --- /dev/null +++ b/lib/pages/insurance/insurance_approval_detail_screen.dart @@ -0,0 +1,116 @@ +import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class InsuranceApprovalDetail extends StatelessWidget { + final InsuranceApprovalModel insuranceApprovalModel; + + InsuranceApprovalDetail({Key? key, required this.insuranceApprovalModel}) : super(key: key); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + return AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).insuranceApproval, + description: TranslationBase.of(context).infoApprovals, + infoList: TranslationBase.of(context).infoApprovalPoints, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + child: Container( + padding: EdgeInsets.fromLTRB(16, 12, 16, 12), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(10.0)), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + insuranceApprovalModel.approvalStatusDescption!, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: insuranceApprovalModel.status == 9 ? Color(0xff359846) : Color(0xffD02127), letterSpacing: -0.4, height: 18 / 10), + ), + Text( + insuranceApprovalModel.doctorName!, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.64, + ), + ), + SizedBox(height: 6), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + LargeAvatar( + name: insuranceApprovalModel.doctorName!, + url: insuranceApprovalModel.doctorImageURL!, + width: 48, + height: 48, + ), + SizedBox(width: 12), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + MyRichText(TranslationBase.of(context).clinic + ":", insuranceApprovalModel?.clinicName ?? "", projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).approvalNo, insuranceApprovalModel?.approvalNo.toString() ?? "", projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).unusedCount, insuranceApprovalModel?.unUsedCount.toString() ?? "", projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).companyName, insuranceApprovalModel?.companyName ?? "", projectViewModel.isArabic), + SizedBox(height: 6), + MyRichText(TranslationBase.of(context).receiptOn, DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(insuranceApprovalModel.receiptOn!)) ?? "", + projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).expiryOn, DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(insuranceApprovalModel.expiryDate!)) ?? "", + projectViewModel.isArabic), + ], + ), + ), + ], + ), + SizedBox(height: 21), + Table(columnWidths: { + 0: FlexColumnWidth(1.8), + 1: FlexColumnWidth(1), + 2: FlexColumnWidth(1), + }, children: [ + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).procedure), + Utils.tableColumnTitle(TranslationBase.of(context).status), + Utils.tableColumnTitle(TranslationBase.of(context).usageStatus) + ], + ), + TableRow( + children: [ + Utils.tableColumnValue(insuranceApprovalModel?.apporvalDetails?.procedureName ?? '', isLast: true, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(insuranceApprovalModel?.apporvalDetails?.status ?? '', isLast: true, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(insuranceApprovalModel?.apporvalDetails?.isInvoicedDesc ?? '', isLast: true, mProjectViewModel: projectViewModel), + ], + ), + ]) + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/insurance/insurance_approval_screen.dart b/lib/pages/insurance/insurance_approval_screen.dart new file mode 100644 index 00000000..d19a16db --- /dev/null +++ b/lib/pages/insurance/insurance_approval_screen.dart @@ -0,0 +1,202 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../base/base_view.dart'; +import 'insurance_approval_detail_screen.dart'; + +class InsuranceApproval extends StatefulWidget { + int? appointmentNo; + + InsuranceApproval({ this.appointmentNo}); + + @override + _InsuranceApprovalState createState() => _InsuranceApprovalState(); +} + +class _InsuranceApprovalState extends State { + List imagesInfo =[]; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + imagesInfo + .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/0.png')); + imagesInfo + .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/1.png')); + return BaseView( + onModelReady: widget.appointmentNo != null ? (model) => model.getInsuranceApproval(appointmentNo: widget.appointmentNo) : (model) => model.getInsuranceApproval(), + builder: (BuildContext _context, InsuranceViewModel model, Widget? child) => AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + baseViewModel: model, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).insuranceApprovalSubtitle, + description: TranslationBase.of(context).infoApprovals, + infoList: TranslationBase.of(context).infoApprovalPoints, + imagesInfo: imagesInfo, + body: model.insuranceApproval.length > 0 + ? ListView.separated( + padding: EdgeInsets.all(21), + physics: BouncingScrollPhysics(), + itemBuilder: (_, index) { + Color _patientStatusColor; + String _patientStatusString; + + if (model.insuranceApproval[index].isLiveCareAppointment!) { + _patientStatusColor = Color(0xff2E303A); + _patientStatusString = TranslationBase.of(context).liveCare.capitalizeFirstofEach; + } else if (!model.insuranceApproval[index].isInOutPatient!) { + _patientStatusColor = Color(0xffD02127); + _patientStatusString = TranslationBase.of(context).inPatient.capitalizeFirstofEach; + } else { + _patientStatusString = TranslationBase.of(context).outpatient.capitalizeFirstofEach; + _patientStatusColor = Color(0xffa9a089); + } + return InkWell( + onTap: () { + Navigator.push(context, FadePage(page: InsuranceApprovalDetail(insuranceApprovalModel: model.insuranceApproval[index]))); + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: _patientStatusColor), + child: Row( + children: [ + SizedBox( + width: 16, + child: RotatedBox( + quarterTurns: 3, + child: Text( + _patientStatusString, + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w700, color: Colors.white, letterSpacing: -0.2, height: 16 / 10), + ), + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.fromLTRB(12, 10, 12, 10), + decoration: BoxDecoration( + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: Radius.circular(10.0), + topRight: Radius.circular(10.0), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + model.insuranceApproval[index].approvalStatusDescption!, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: model.insuranceApproval[index].status == 9 ? Color(0xff359846) : Color(0xffD02127), + letterSpacing: -0.4, + height: 18 / 10), + ), + Text( + model.insuranceApproval[index].doctorName!, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.64, + ), + ), + SizedBox(height: 6), + Row( + children: [ + LargeAvatar( + name: model.insuranceApproval[index].doctorName!, + url: model.insuranceApproval[index].doctorImageURL!, + width: 48, + height: 48, + ), + SizedBox(width: 12), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + MyRichText(TranslationBase.of(context).clinic + ":", model.insuranceApproval[index].clinicName != null ? model.insuranceApproval[index].clinicName!.toLowerCase().capitalizeFirstofEach : "", + projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).approvalNo, model.insuranceApproval[index].approvalNo.toString() ?? "", projectViewModel.isArabic), + ], + ), + ), + Container( + height: 48, + alignment: Alignment.bottomRight, + child: Icon( + Icons.arrow_forward, + color: Color(0xff2E303A), + ), + ) + ], + ) + ], + ), + ), + ), + ], + ), + ), + ); + }, + separatorBuilder: (context, index) => SizedBox(height: 12), + itemCount: model.insuranceApproval.length) + : getNoDataWidget(context)), + ); + } + + Widget sideBadge(String title, int color) { + return Container( + decoration: BoxDecoration( + color: Color(color), + borderRadius: BorderRadius.circular(16.0), + ), + width: 115.0, + padding: EdgeInsets.only(top: 1, bottom: 1), + alignment: Alignment.center, + child: Texts( + title, + color: Colors.white, + ), + ); + } + + convertDateFormat(String Date) { + const start = "/Date("; + const end = "+0300)"; + + final startIndex = Date.indexOf(start); + final endIndex = Date.indexOf(end, startIndex + start.length); + + var date = new DateTime.fromMillisecondsSinceEpoch(int.parse(Date.substring(startIndex + start.length, endIndex))); + String newDate = date.year.toString() + "-" + date.month.toString().padLeft(2, '0') + "-" + date.day.toString().padLeft(2, '0'); + + return newDate.toString(); + } +} diff --git a/lib/pages/insurance/insurance_card_screen.dart b/lib/pages/insurance/insurance_card_screen.dart new file mode 100644 index 00000000..fbe0c87e --- /dev/null +++ b/lib/pages/insurance/insurance_card_screen.dart @@ -0,0 +1,219 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/service/insurance_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import '../base/base_view.dart'; + +class InsuranceCard extends StatefulWidget { + int? appointmentNo; + + InsuranceCard({ this.appointmentNo}); + + @override + _InsuranceCardState createState() => _InsuranceCardState(); +} + +class _InsuranceCardState extends State { + InsuranceCardService _insuranceCardService = locator(); + List imagesInfo =[]; + + @override + Widget build(BuildContext context) { + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/ar/0.png')); + + return BaseView( + onModelReady: (model) => model.getInsurance(), + builder: (BuildContext context, InsuranceViewModel model, Widget? child) => AppScaffold( + isShowAppBar: true, + baseViewModel: model, + showHomeAppBarIcon: false, + appBarTitle: TranslationBase.of(context).insuranceCards, + description: TranslationBase.of(context).infoInsuranceCards, + infoList: TranslationBase.of(context).infoInsuranceCardsPoints, + imagesInfo: imagesInfo, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + floatingActionButton: FloatingActionButton.extended( + onPressed: () { + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }, + backgroundColor: CustomColors.accentColor, + label: Text(TranslationBase.of(context).update, style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.bold)), + ), + body: Container( + child: ListView.separated( + itemCount: model.insurance == null ? 0 : model.insurance.length, + itemBuilder: (BuildContext context, int index) { + return Container( + width: double.infinity, + padding: EdgeInsets.only( + left: 10, + right: 10, + top: index == 0 ? 10 : 0, + bottom: index == model.insurance.length - 1 ? 100 : 0, + ), + child: Container( + decoration: cardRadius(12), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + model.insurance[index].groupName!, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, letterSpacing: -0.64), + ), + mHeight(8), + Text( + TranslationBase.of(context).companyName + model.insurance[index].companyName!, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.48), + ), + Divider( + thickness: 2, + color: Colors.black, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).category, + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), + ), + Text( + model.insurance[index].subCategoryDesc!, + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).expirationDate, + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), + ), + Text( + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.insurance[index].cardValidTo!)), + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).status + ": ", + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), + ), + model.insurance[index].isActive == true + ? Text( + TranslationBase.of(context).activeInsurence, + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Colors.green), + ) + : Text( + TranslationBase.of(context).notActive, + style: TextStyle( + fontSize: 10, + fontWeight: FontWeight.w600, + color: Colors.red, + ), + ) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).patientCard, + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), + ), + Text( + model.insurance[index].patientCardID!, + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).policyNumber, + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), + ), + Text( + model.insurance[index].insurancePolicyNumber!, + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), + ) + ], + ), + ], + ), + if (model.insurance[index].isActive == true) + SizedBox( + height: 8.5, + ), + // if (model.insurance[index].isActive == true) + // Container( + // color: Colors.transparent, + // child: DefaultButton( + // TranslationBase.of(context).seeDetails, + // () => { + // getDetails(model.insurance[index]), + // }, + // ), + // width: double.infinity, + // ), + ], + ), + ), + ), + ); + }, + separatorBuilder: (BuildContext context, int index) { + return mHeight(8); + }, + ), + ), + ), + ); + } + + convertDateFormat(String exDate) { + const start = "/Date("; + const end = "+0300)"; + + final startIndex = exDate.indexOf(start); + final endIndex = exDate.indexOf(end, startIndex + start.length); + + var date = new DateTime.fromMillisecondsSinceEpoch(int.parse(exDate.substring(startIndex + start.length, endIndex))); + String newDate = date.year.toString() + "-" + date.month.toString().padLeft(2, '0') + "-" + date.day.toString().padLeft(2, '0'); + + return newDate.toString(); + } + + getDetails(data) { + GifLoaderDialogUtils.showMyDialog(context); + _insuranceCardService + .getInsuranceDetails(data) + .then((value) => {GifLoaderDialogUtils.hideDialog(context), Navigator.push(context, FadePage(page: InsuranceCardDetails(data: value[0]['CheckList'])))}); + } +} diff --git a/lib/pages/insurance/insurance_card_update_details.dart b/lib/pages/insurance/insurance_card_update_details.dart new file mode 100644 index 00000000..fc0e1a78 --- /dev/null +++ b/lib/pages/insurance/insurance_card_update_details.dart @@ -0,0 +1,374 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/insurance/Insurance_card_details.dart'; +import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'AttachInsuranceCardImageDialog.dart'; + +class InsuranceCardUpdateDetails extends StatelessWidget { + final List insuranceCardDetailsModel; + final String patientIdentificationID; + final int patientID; + final String name; + final String mobileNo; + + const InsuranceCardUpdateDetails({Key? key, required this.insuranceCardDetailsModel, required this.patientIdentificationID, required this.patientID, required this.name, required this.mobileNo}) : super(key: key); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + builder: (context, model, w) => AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).cardDetail, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + children: [ + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index) { + return Container( + width: double.maxFinite, + // height: projectViewModel.isArabic ? 320 : 240, + // decoration: containerRadius(CustomColors.accentColor, 12), + child: Container( + decoration: cardRadius(12, color: CustomColors.accentColor), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + insuranceCardDetailsModel[index].memberID!, + style: TextStyle( + color: Colors.white, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + fontSize: 16, + ), + ), + SizedBox( + height: 2, + ), + Text( + insuranceCardDetailsModel[index].companyName!, + style: TextStyle( + color: Colors.white, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + fontSize: 14, + ), + ), + SizedBox( + height: 14, + ), + Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).policyHolder, + style: TextStyle( + color: Colors.white, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + fontSize: 12, + ), + ), + Text( + insuranceCardDetailsModel[index].memberName!, + style: TextStyle( + color: Colors.white, + letterSpacing: -0.48, + fontSize: 12, + ), + ), + ], + ), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).policyNo, + style: TextStyle( + color: Colors.white, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + fontSize: 12, + ), + ), + Text( + insuranceCardDetailsModel[index].policyNumber!, + style: TextStyle( + color: Colors.white, + letterSpacing: -0.48, + fontSize: 12, + ), + ), + ], + ), + ], + ), + SizedBox( + height: 14, + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).expiryDateTitle, + style: TextStyle( + color: Colors.white, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + fontSize: 12, + ), + ), + Text( + insuranceCardDetailsModel[index].effectiveTo!, + style: TextStyle( + color: Colors.white, + letterSpacing: -0.48, + fontSize: 12, + ), + ), + ], + ), + ), + Expanded( + child: Column( + children: [ + Text( + TranslationBase.of(context).classTitle, + style: TextStyle( + color: Colors.white, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + fontSize: 12, + ), + ), + Text( + insuranceCardDetailsModel[index].subCategory!, + style: TextStyle( + color: Colors.white, + letterSpacing: -0.48, + fontSize: 12, + ), + ), + ], + ), + ), + Expanded( + child: Column( + children: [ + Text( + TranslationBase.of(context).approval, + style: TextStyle( + color: Colors.white, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + fontSize: 12, + ), + ), + Text( + insuranceCardDetailsModel[index].approvalLimit.toString(), + style: TextStyle( + color: Colors.white, + letterSpacing: -0.48, + fontSize: 12, + ), + ), + ], + ), + ), + ], + ) + ], + ), + ), + ), + ); + }, + separatorBuilder: (context, index) { + return mHeight(12); + }, + itemCount: insuranceCardDetailsModel.length, + ), + if (insuranceCardDetailsModel.isEmpty) + Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + child: Container( + decoration: cardRadius(12), + child: Container( + width: MediaQuery.of(context).size.width, + padding: EdgeInsets.all(10.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(top: 2.0, left: 10.0, right: 20.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + name, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + Text( + TranslationBase.of(context).fileno + ": " + patientID.toString(), + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ) + ], + ), + ), + ), + ], + ), + ), + ), + ), + SizedBox( + height: 150, + ), + Image.asset( + 'assets/images/no-data-found.png', + width: 80, + height: 80, + ), + SizedBox( + height: 8, + ), + Text( + TranslationBase.of(context).noDataAvailable, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ) + ], + ) + ], + ), + ), + ), + ), + Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + children: [ + if (insuranceCardDetailsModel.isEmpty) + SecondaryButton( + textColor: Colors.white, + label: TranslationBase.of(context).scanNow.toUpperCase(), + color: CustomColors.accentColor, + small: true, + onTap: () async { + confirmAttachInsuranceCardImageDialogDialog( + context: context, name: name, fileNo: patientID.toString(), identificationNo: patientIdentificationID, mobileNo: mobileNo, model: model); + }, + ), + if (insuranceCardDetailsModel.isNotEmpty) + SecondaryButton( + textColor: Colors.white, + label: TranslationBase.of(context).agree.toUpperCase(), + color: CustomColors.accentColor, + onTap: () async { + GifLoaderDialogUtils.showMyDialog(context); + model.uploadInsuranceCard(context, patientIdentificationID: patientIdentificationID, patientID: patientID).then((res) { + print(res); + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err.toString()); + print(err); + }); + }, + ), + if (insuranceCardDetailsModel.isNotEmpty) + SizedBox( + height: 12, + ), + if (insuranceCardDetailsModel.isNotEmpty) + SecondaryButton( + textColor: Colors.white, + label: TranslationBase.of(context).disagree.toUpperCase(), + color: Colors.grey[800], + onTap: () async { + confirmAttachInsuranceCardImageDialogDialog( + context: context, name: name, fileNo: patientID.toString(), identificationNo: patientIdentificationID, mobileNo: mobileNo, model: model); + }, + ) + ], + ), + ), + ], + ), + ), + ); + } + + void confirmAttachInsuranceCardImageDialogDialog({required BuildContext context, required String name, required String fileNo, required String identificationNo, required String mobileNo, required InsuranceViewModel model}) { + showDialog( + context: context, + builder: (cxt) => AttachInsuranceCardImageDialog( + fileNo: fileNo, + name: name, + identificationNo: identificationNo, + mobileNo: mobileNo, + image: (file, image) async { + GifLoaderDialogUtils.showMyDialog(context); + await model.uploadInsuranceCard(context, patientIdentificationID: patientIdentificationID, patientID: patientID, image: image); + GifLoaderDialogUtils.hideDialog(context); + if (model.state == ViewState.ErrorLocal || model.state == ViewState.Error) { + AppToast.showErrorToast(message: model.error); + } else { + AppToast.showSuccessToast(message: TranslationBase.of(context).requestSent); + } + Navigator.pop(context); + }, + ), + ); + } +} diff --git a/lib/pages/insurance/insurance_details.dart b/lib/pages/insurance/insurance_details.dart new file mode 100644 index 00000000..9f456f63 --- /dev/null +++ b/lib/pages/insurance/insurance_details.dart @@ -0,0 +1,30 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_html/flutter_html.dart'; + +class InsuranceCardDetails extends StatelessWidget { + final String data; + + InsuranceCardDetails({required this.data}); + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).cardDetail, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + body: Center( + child: SingleChildScrollView( + child: Html( + data: data, + ), + ), + ), + ); + } +} diff --git a/lib/pages/insurance/insurance_page.dart b/lib/pages/insurance/insurance_page.dart new file mode 100644 index 00000000..3ec71a0f --- /dev/null +++ b/lib/pages/insurance/insurance_page.dart @@ -0,0 +1,209 @@ +import 'package:diplomaticquarterapp/core/service/insurance_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/insurance/UpdateInsuranceManually.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../locator.dart'; +import '../../widgets/dialogs/confirm_dialog.dart'; +import 'insurance_card_update_details.dart'; + +class InsurancePage extends StatelessWidget { + final InsuranceViewModel model; + InsuranceCardService _insuranceCardService = locator(); + + InsurancePage({Key? key, required this.model}) : super(key: key); + + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + children: [ + Container( + width: double.infinity, + child: Container( + decoration: cardRadius(12), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: InkWell( + onTap: () { + getDetails( + setupID: '010266', + projectID: 15, + patientIdentificationID: projectViewModel.user!.patientIdentificationNo!, + //model.user.patientIdentificationNo, + patientID: projectViewModel.user!.patientID!, + //model.user.patientID, + parentID: 0, + isFamily: projectViewModel.isLoginChild, + //false, + name: projectViewModel.user!.firstName! + " " + projectViewModel.user!.lastName!, + mobileNumber: projectViewModel.user!.mobileNumber!, + //model.user.firstName + " " + model.user.lastName, + context: context, + ); + }, + child: Row( + crossAxisAlignment: CrossAxisAlignment.end, + mainAxisSize: MainAxisSize.max, + children: [ + if (model.user != null) + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + projectViewModel.user!.firstName! + " " + projectViewModel.user!.lastName!, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + Text( + TranslationBase.of(context).fileno + ": " + projectViewModel.user!.patientID.toString(), //model.user.patientID.toString(), + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ) + ], + ), + ), + Icon(Icons.arrow_forward), + ], + ), + ), + ), + ), + ), + if (!projectViewModel.isLoginChild) + if (model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList != null ?? false) + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index) { + return model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].status == 3 + ? InkWell( + onTap: () { + getDetails( + projectID: 15, + patientIdentificationID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].patientIdenficationNumber!, + setupID: '010266', + patientID: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].responseID!, + name: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].patientName!, + parentID: model.user!.patientID!, + isFamily: true, + mobileNumber: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].mobileNumber!, + context: context); + }, + child: Container( + width: double.infinity, + margin: EdgeInsets.only(top: 12.0), + child: Container( + decoration: cardRadius(12), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.end, + mainAxisSize: MainAxisSize.max, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].patientName!, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.46), + ), + Text( + TranslationBase.of(context).fileno + ": " + model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].responseID.toString(), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.46), + ), + ], + ), + ), + Icon(Icons.arrow_forward), + ], + ), + ), + ), + ), + ) + : Container(); + }, + separatorBuilder: (context, index) { + return mHeight(model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList![index].status == 3 ? 8 : 0); + }, + itemCount: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList!.length, + ), + ], + ), + ), + ); + } + + getDetails({required String setupID, required int projectID, required String patientIdentificationID, required int patientID, required String name, required String mobileNumber, required bool isFamily, int parentID = 0, required BuildContext context}) { + GifLoaderDialogUtils.showMyDialog(context); + _insuranceCardService + .getPatientInsuranceDetails(setupID: setupID, projectID: projectID, patientID: patientID, patientIdentificationID: patientIdentificationID, isFamily: isFamily, parentID: parentID) + .then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) { + Navigator.push( + context, + FadePage( + page: InsuranceCardUpdateDetails( + insuranceCardDetailsModel: _insuranceCardService.insuranceCardDetailsList, + patientID: patientID, + patientIdentificationID: patientIdentificationID, + name: name, + mobileNo: mobileNumber, + ))).then((value) { + model.getInsuranceUpdated(); + }); + } else { + // AppToast.showErrorToast(message: _insuranceCardService.error); + updateManually(context, _insuranceCardService.error!, patientIdentificationID, patientID, mobileNumber); + } + }); + } + + void updateManually(BuildContext context, String errorMsg, String patientIdentificationID, int patientID, String mobileNumber) { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: errorMsg + ". " + TranslationBase.of(context).habibCallCenter, + okText: TranslationBase.of(context).ok, + cancelText: TranslationBase.of(context).cancel, + // confirmMessage: errorMsg + ". " + TranslationBase.of(context).updateInsuranceManuallyDialog, + // okText: TranslationBase.of(context).yes, + // cancelText: TranslationBase.of(context).no, + okFunction: () => { + Navigator.pop(context), + // Navigator.push( + // context, + // FadePage( + // page: UpdateInsuranceManually( + // patientIdentificationNo: patientIdentificationID, + // patientID: patientID, + // patientMobileNumber: mobileNumber, + // ), + // ), + // ), + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } +} diff --git a/lib/pages/insurance/insurance_update_screen.dart b/lib/pages/insurance/insurance_update_screen.dart new file mode 100644 index 00000000..4c4d5686 --- /dev/null +++ b/lib/pages/insurance/insurance_update_screen.dart @@ -0,0 +1,199 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../base/base_view.dart'; +import 'insurance_page.dart'; + +class InsuranceUpdate extends StatefulWidget { + @override + _InsuranceUpdateState createState() => _InsuranceUpdateState(); +} + +class _InsuranceUpdateState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + List imagesInfo =[]; + late ProjectViewModel projectViewModel; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/ar/0.png')); + } + + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getInsuranceUpdated(), + builder: (BuildContext context, InsuranceViewModel model, Widget? child) => AppScaffold( + appBarTitle: TranslationBase.of(context).updateInsurCards, + description: TranslationBase.of(context).infoInsurCards, + infoList: TranslationBase.of(context).infoPrescriptionsPoints, + imagesInfo: imagesInfo, + isShowAppBar: true, + isShowDecPage: true, + baseViewModel: model, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + body: Column( + children: [ + Container( + height: 45, + child: TabBar( + controller: _tabController, + isScrollable: false, + indicatorWeight: 3.0, + indicatorColor: CustomColors.accentColor, + labelColor: CustomColors.textDarkColor, + labelPadding: EdgeInsets.symmetric(horizontal: 13.0, vertical: 2.0), + unselectedLabelColor: CustomColors.textDarkColor, + tabs: [ + Container( + child: Center( + child: Text( + TranslationBase.of(context).updateInsuranceSubtitle, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ), + ), + ), + Container( + child: Center( + child: Text( + TranslationBase.of(context).history, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ), + ), + ), + ], + ), + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + InsurancePage(model: model), + Container( + child: Padding( + padding: const EdgeInsets.all(12.0), + child: ListView.builder( + itemCount: model.insuranceUpdate == null ? 0 : model.insuranceUpdate.length, + itemBuilder: (BuildContext context, int index) { + return Container( + child: Card( + color: Colors.white, + elevation: 2, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + ), + child: Container( + width: MediaQuery.of(context).size.width, + padding: EdgeInsets.all(10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Flex( + direction: Axis.horizontal, + children: [ + Expanded( + flex: 3, + child: Container( + margin: EdgeInsets.only(top: 2.0, left: 10.0, right: 20.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + projectViewModel.user!.firstName! + " " + projectViewModel.user!.lastName!, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + SizedBox( + height: 4, + ), + Text( + TranslationBase.of(context).fileno + ": " + model.insuranceUpdate[index].patientID.toString(), + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + Text( + model.insuranceUpdate[index].createdOn!, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + ], + ), + ), + ), + Expanded( + flex: 1, + child: Container( + margin: EdgeInsets.only(top: 20.0), + child: Column( + children: [ + Image.asset("assets/images/new-design/confirm_button.png", width: 30.0, height: 30.0), + Container( + margin: EdgeInsets.only(top: 6.5, left: 2.0), + child: Text( + model.insuranceUpdate[index].statusDescription ?? "", + style: TextStyle( + fontSize: 10, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + ), + ], + ), + ), + ) + ], + ), + ], + ), + ), + ), + ); + }), + ), + ), + ], + )) + ], + ), + ), + ); + } +} diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart new file mode 100644 index 00000000..d01554ea --- /dev/null +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -0,0 +1,652 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/apple_pay_response.dart'; +import 'package:diplomaticquarterapp/models/gradient_color.dart'; +import 'package:diplomaticquarterapp/models/hmg_services.dart'; +import 'package:diplomaticquarterapp/models/slider_data.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart'; +import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; +import 'package:diplomaticquarterapp/pages/landing/widgets/logged_slider_view.dart'; +import 'package:diplomaticquarterapp/pages/landing/widgets/services_view.dart'; +import 'package:diplomaticquarterapp/pages/landing/widgets/slider_view.dart'; +import 'package:diplomaticquarterapp/pages/packages_offers/packages_offers_tab_pager.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class HomePageFragment2 extends StatefulWidget { + DashboardViewModel model; + VoidCallback? onPharmacyClick, onLoginClick, onMedicalFileClick; + + HomePageFragment2(this.model, {this.onLoginClick, this.onPharmacyClick, this.onMedicalFileClick}); + + @override + _HomePageFragment2State createState() => _HomePageFragment2State(); +} + +class _HomePageFragment2State extends State { + late ProjectViewModel projectViewModel; + List hmgServices = []; + List appoList = []; + late ApplePayResponse applePayResponse; + + // bool isPatientAdmitted = true; + + @override + void initState() { + // TODO: implement initState + super.initState(); + + // getPatientAppointmentHistory1(); + // getFamilyFiles(); + } + + initialiseHmgServices(bool isLogin) { + hmgServices.clear(); + + hmgServices.add(HmgServices(0, TranslationBase.of(context).book, TranslationBase.of(context).appointmentLabel, "assets/images/new/book appointment.svg", isLogin)); + hmgServices.add(HmgServices(1, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); + + projectViewModel.isIndoorNavigationEnabled + ? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin, + isLocked: !projectViewModel.havePrivilege(107))) + : hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); + + hmgServices.add( + HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin, isLocked: !projectViewModel.havePrivilege(108))); + hmgServices.add(HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); + hmgServices.add(HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); + hmgServices.add(HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); + hmgServices.add(HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); + hmgServices.add(HmgServices(7, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin)); + hmgServices.add(HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin)); + } + + initialiseInPatientHmgServices(bool isLogin) { + hmgServices.clear(); + // hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin)); + // hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/CoronaIcon.svg", isLogin)); + // hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", isLogin)); + + projectViewModel.isIndoorNavigationEnabled + ? hmgServices.add(HmgServices(2, TranslationBase.of(context).hospitalNavigationTitle, TranslationBase.of(context).hospitalNavigationSubtitle, "assets/images/new/indoor_nav_home.svg", isLogin, + isLocked: !projectViewModel.havePrivilege(107))) + : hmgServices.add(HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); + + hmgServices.add(new HmgServices(9, TranslationBase.of(context).emergency, TranslationBase.of(context).checkinOptions, "assets/images/new/emergency.svg", isLogin, + isLocked: !projectViewModel.havePrivilege(108))); + hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); + hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); + + // hmgServices.add(new HmgServices(2, TranslationBase.of(context).emergencyTitle, TranslationBase.of(context).emergencySubtitle, "assets/images/new/emergency.svg", isLogin)); + + hmgServices.add(new HmgServices(6, TranslationBase.of(context).ereferralTitle, TranslationBase.of(context).ereferralSubtitle, "assets/images/new/E_Referral.svg", isLogin)); + hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin)); + hmgServices.add(new HmgServices(8, TranslationBase.of(context).connectTitle, TranslationBase.of(context).connectSubtitle, "assets/images/new/reach_us.svg", isLogin)); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + + if (projectViewModel.isPatientAdmitted || projectViewModel.patientHasAdmissionRequest) { + initialiseInPatientHmgServices(false); + } else { + initialiseHmgServices(false); + } + + var appoCountProvider = Provider.of(context); + // var userProvider = Provider.of(context); + List myMedicalList = Utils.myMedicalListHomePage(projectViewModel: projectViewModel, context: context, count: appoCountProvider.count, isLogin: projectViewModel.isLogin); + return Container( + width: double.infinity, + child: Column( + children: [ + projectViewModel.isLogin + ? AspectRatio( + aspectRatio: 2.6, + child: Padding( + padding: const EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 6), + child: InkWell( + onTap: () { + widget.onMedicalFileClick!(); + }, + child: LoggedSliderView( + projectViewModel, + new SliderData( + TranslationBase.of(context).fileno + ": " + (projectViewModel.user.patientID.toString() ?? ""), + projectViewModel.user.firstName! + ' ' + (projectViewModel.user.lastName ?? ""), + "", + bannerColor[0].darkColor, + bannerColor[0].lightColor, + ), + widget.model, + ), + ), + ), + ) + : AspectRatio( + aspectRatio: 2.6, + child: Container( + margin: EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 6), + child: SliderView( + onLoginClick: () { + widget.onLoginClick!(); + projectViewModel.analytics.loginRegistration.login_register_initiate(); + }, + ), + // height: MediaQuery.of(context).size.width / 2.6, + ), + ), + projectViewModel.isLogin + ? Column( + children: [ + Padding( + padding: projectViewModel.isArabic + ? EdgeInsets.only( + right: 20, + left: 8, + ) + : EdgeInsets.only( + left: 20, + right: 8, + ), + child: Row( + children: [ + Expanded( + child: Text( + TranslationBase.of(context).myMedicalFile, + style: TextStyle( + color: Colors.black, + fontSize: 16, + fontWeight: FontWeight.bold, + letterSpacing: -0.96, + height: 19 / 16, + ), + ), + ), + TextButton( + onPressed: () { + widget.onMedicalFileClick!(); + // navigateTo(context, MedicalProfilePageNew()); + }, + child: Text( + TranslationBase.of(context).viewMedicalFile, + style: TextStyle( + color: CustomColors.accentColor, + fontSize: 12, + letterSpacing: -0.72, + height: 23 / 12, + ), + ), + ), + ], + ), + ), + mHeight(4), + Container( + width: double.infinity, + height: MediaQuery.of(context).size.width * 0.26, + child: ListView.separated( + itemCount: myMedicalList.length, + padding: EdgeInsets.zero, + scrollDirection: Axis.horizontal, + physics: BouncingScrollPhysics(), + itemBuilder: (context, index) { + return projectViewModel.isArabic + ? Container( + child: myMedicalList[index], + width: MediaQuery.of(context).size.width * 0.26, + height: MediaQuery.of(context).size.width * 0.26, + margin: EdgeInsets.only(left: index == 4 ? 20 : 0, right: index == 0 ? 20 : 0), + ) + : Container( + child: myMedicalList[index], + width: MediaQuery.of(context).size.width * 0.26, + height: MediaQuery.of(context).size.width * 0.26, + margin: EdgeInsets.only(left: index == 0 ? 20 : 0, right: index == 4 ? 20 : 0), + ); + }, + separatorBuilder: (BuildContext context, int index) { + return mWidth(12); + }, + ), + ), + ], + ) + : Container(), + mHeight(16), + Column( + children: [ + Divider( + height: 1, + color: Color(0xFFC7C7C7), + ), + Container( + width: double.infinity, + height: MediaQuery.of(context).size.width * 0.3, + padding: EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14), + color: Colors.white, + child: Row( + children: [ + offersButton(), + mWidth(10), + hmgButton(), + ], + ), + ), + Divider( + height: 1, + color: Color(0xFFC7C7C7), + ), + ], + ), + mHeight(12), + Column( + children: [ + Padding( + padding: projectViewModel.isArabic + ? const EdgeInsets.only( + left: 8, + right: 20, + ) + : const EdgeInsets.only( + left: 20, + right: 8, + ), + child: Row( + children: [ + Expanded( + child: Text( + TranslationBase.of(context).hMGService, + style: TextStyle( + color: Colors.black, + fontSize: 16, + fontWeight: FontWeight.bold, + letterSpacing: -0.96, + height: 19 / 16, + ), + ), + ), + TextButton( + onPressed: () { + // AppSharedPreferences().getAll().then((value){ + // debugPrint("ALL SHARED PREFERENCES!!!!!"); + // debugPrint(jsonEncode(value)); + // }); + Navigator.push(context, FadePage(page: AllHabibMedicalSevicePage2())); + projectViewModel.analytics.hmgServices.viewAll(); + }, + child: Text( + TranslationBase.of(context).viewAllServices, + style: TextStyle( + color: CustomColors.accentColor, + fontSize: 12, + letterSpacing: -0.72, + height: 23 / 12, + ), + ), + ), + ], + ), + ), + projectViewModel.isPatientAdmitted || projectViewModel.patientHasAdmissionRequest + ? Column( + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 12.0), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Expanded( + flex: 9, + child: Container( + margin: projectViewModel.isArabic ? EdgeInsets.only(left: 12.0) : EdgeInsets.only(right: 12.0), + child: AspectRatio( + aspectRatio: 2.15, + child: ServicesView( + new HmgServices(23, TranslationBase.of(context).InPatient, TranslationBase.of(context).inPatientServices, "assets/images/new/InPatient.svg", false), + 23, + true, + projectViewModel)), + ), + ), + Expanded( + flex: 4, + child: AspectRatio( + aspectRatio: 1.0, + child: ServicesView(new HmgServices(5, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/paymentMethods.png", false), 2, + true, projectViewModel)), + ), + ], + ), + ), + Padding( + padding: const EdgeInsets.only( + left: 20, + right: 20, + top: 0, + ), + child: GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: hmgServices.length, + padding: EdgeInsets.zero, + itemBuilder: (BuildContext context, int index) { + return ServicesView(hmgServices[index], index, true, projectViewModel); + }, + ), + ), + ], + ) + : Padding( + padding: const EdgeInsets.only( + left: 20, + right: 20, + top: 0, + ), + child: GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: hmgServices.length, + padding: EdgeInsets.zero, + itemBuilder: (BuildContext context, int index) { + // return ServicesView(hmgServices[index], index, true, projectViewModel, + // isLocked: (hmgServices[index].action == 2 && projectViewModel.isIndoorNavigationEnabled) ? !projectViewModel.havePrivilege(107) : false); + return ServicesView(hmgServices[index], index, true, projectViewModel, isLocked: hmgServices[index].isLocked); + }, + ), + ), + ], + ), + mHeight(140), + ], + ), + ); + } + + Widget offersButton() { + final bypassPrivilageCheck = false; + return Expanded( + flex: 1, + child: InkWell( + onTap: () { + // Navigator.of(context).push(MaterialPageRoute(builder: (context) => ErOptions(isAppbar: true))); + Navigator.push(context, FadePage(page: ErOptions(isAppbar: true))); + }, + child: Stack( + children: [ + Container( + width: double.infinity, + height: double.infinity, + clipBehavior: Clip.antiAlias, + decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), + child: Stack( + children: [ + Container( + width: double.infinity, + height: double.infinity, + // color: Color(0xFF2B353E), + decoration: containerRadius(CustomColors.accentColor, 20), + ), + Container( + width: double.infinity, + height: double.infinity, + clipBehavior: Clip.antiAlias, + decoration: projectViewModel.isArabic + ? containerBottomRightRadiusWithGradientForAr(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor) + : containerBottomRightRadiusWithGradient(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), + child: Stack( + children: [ + SvgPicture.asset( + "assets/images/new/strips.svg", + width: double.infinity, + height: double.infinity, + fit: BoxFit.cover, + ), + ], + ), + ), + projectViewModel.isArabic + ? Positioned( + left: 20, + top: 12, + child: Opacity( + opacity: 0.5, + child: SvgPicture.asset( + "assets/images/new/emergency_services_back.svg", + height: MediaQuery.of(context).size.width * 0.14, + ), + ), + ) + : Positioned( + right: 20, + top: 12, + child: Opacity( + opacity: 0.5, + child: SvgPicture.asset( + "assets/images/new/emergency_services_back.svg", + height: MediaQuery.of(context).size.width * 0.14, + ), + ), + ), + Container( + width: double.infinity, + height: double.infinity, + padding: EdgeInsets.all(SizeConfig.widthMultiplier! * 3.4), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new/emergency_services.svg", + height: MediaQuery.of(context).size.width * 0.08, + ), + ), + mFlex(1), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + TranslationBase.of(context).emergencyServices, + style: TextStyle( + color: Colors.black, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.45, + height: 1, + ), + ), + projectViewModel.isArabic ? mHeight(5) : Container(), + Text( + TranslationBase.of(context).emergencyServicesSubtitle, + style: TextStyle( + color: Colors.black, + fontSize: 9, + fontWeight: FontWeight.w600, + letterSpacing: -0.27, + height: projectViewModel.isArabic ? 0.2 : 1, + ), + ), + ], + ), + ], + ), + ), + ], + ), + ), + // projectViewModel.havePrivilege(82) || bypassPrivilageCheck + // ? Container() + // : Container( + // width: double.infinity, + // height: double.infinity, + // clipBehavior: Clip.antiAlias, + // decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)), + // child: Icon( + // Icons.lock_outline, + // size: 40, + // ), + // ) + ], + ), + ), + ); + } + + Widget hmgButton() { + return Expanded( + flex: 1, + child: InkWell( + onTap: () { + if (projectViewModel.havePrivilege(100)) widget.onPharmacyClick!(); + }, + child: Stack(children: [ + Container( + width: double.infinity, + height: double.infinity, + clipBehavior: Clip.antiAlias, + decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), + child: Stack( + children: [ + Container( + width: double.infinity, + height: double.infinity, + // color: Color(0xFF2B353E), + decoration: containerRadius(Color(0xFF359846), 20), + ), + Container( + width: double.infinity, + height: double.infinity, + clipBehavior: Clip.antiAlias, + decoration: projectViewModel.isArabic + ? containerBottomRightRadiusWithGradientForAr(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor) + : containerBottomRightRadiusWithGradient(60, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.lightGreyColor), + child: Stack( + children: [ + SvgPicture.asset( + "assets/images/new/strips.svg", + width: double.infinity, + height: double.infinity, + fit: BoxFit.cover, + ), + ], + ), + ), + projectViewModel.isArabic + ? Positioned( + left: 20, + top: 12, + child: Opacity( + opacity: 0.25, + child: SvgPicture.asset( + "assets/images/new/Pharmacy.svg", + height: MediaQuery.of(context).size.width * 0.15, + ), + ), + ) + : Positioned( + right: 20, + top: 12, + child: Opacity( + opacity: 0.25, + child: SvgPicture.asset( + "assets/images/new/Pharmacy.svg", + height: MediaQuery.of(context).size.width * 0.15, + ), + ), + ), + Container( + width: double.infinity, + height: double.infinity, + padding: EdgeInsets.all(SizeConfig.widthMultiplier! * 3.4), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + child: SvgPicture.asset( + "assets/images/new/Pharmacy.svg", + height: MediaQuery.of(context).size.width * 0.08, + ), + ), + mFlex(1), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + TranslationBase.of(context).onlinePharmacy, + style: TextStyle( + color: Colors.black, + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.45, + height: 1, + ), + ), + projectViewModel.isArabic ? mHeight(5) : Container(), + Text( + TranslationBase.of(context).ecommerceSolution, + style: TextStyle( + color: Colors.black, + fontSize: 9, + fontWeight: FontWeight.w600, + letterSpacing: -0.27, + height: projectViewModel.isArabic ? 0.2 : 1, + ), + ), + ], + ), + ], + ), + ), + ], + ), + ), + projectViewModel.havePrivilege(100) + ? Container() + : Container( + width: double.infinity, + height: double.infinity, + clipBehavior: Clip.antiAlias, + decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)), + child: Icon( + Icons.lock_outline, + size: 40, + ), + ) + ]), + ), + ); + } + + Widget getInpatientButton() { + return Container( + height: 50.0, + ); + } + + Widget showFloating(String icon) { + return Container( + width: MediaQuery.of(context).size.width * 0.06, + height: MediaQuery.of(context).size.width * 0.06, + decoration: containerRadius(CustomColors.accentColor, 100), + padding: EdgeInsets.all(4), + child: SvgPicture.asset(icon), + ); + } +} diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart new file mode 100644 index 00000000..cf31f6f4 --- /dev/null +++ b/lib/pages/landing/home_page.dart @@ -0,0 +1,881 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; +import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; +import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; +import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; +import 'package:diplomaticquarterapp/pages/packages_offers/packages_offers_tab_pager.dart'; +import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_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/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +import 'landing_page_pharmcy.dart'; + +class HomePage extends StatefulWidget { + final Function goToMyProfile; + + HomePage({Key? key, required this.goToMyProfile}); + + @override + _HomePageState createState() => _HomePageState(); +} + +class _HomePageState extends State { + PharmacyModuleViewModel pharmacyModuleViewModel = locator(); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => () async {}, + builder: (_, model, wi) => AppScaffold( + isShowDecPage: false, + isHelp: true, + body: Container( + width: double.infinity, + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Stack( + children: [ + Column( + children: [ + Container( + width: double.infinity, + height: 210, + decoration: BoxDecoration( + image: DecorationImage(image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover), + ), + child: Stack( + children: [ + Positioned( + top: 15, + left: 5, + right: 5, + child: Container( + width: MediaQuery.of(context).size.width * 0.8, + child: Row( + children: [ + Expanded( + child: Container( + height: 125, + padding: EdgeInsets.all(5), + margin: EdgeInsets.all(5), + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/new-design/covid_bg_transparent.png"), + fit: BoxFit.fill, + ), + color: Colors.white.withOpacity(0.3), + borderRadius: BorderRadius.all(Radius.circular(5))), + child: (model.user != null && model.user!.outSA == 1) + ? Container( + width: double.infinity, + height: double.infinity, + color: Colors.grey.shade500.withOpacity(0.3), + child: Icon( + Icons.lock_outline, + size: 40, + ), + ) + : Container( + child: Column( + children: [ + Texts( + TranslationBase.of(context).covidTest, + color: Colors.white, + fontWeight: FontWeight.w700, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Container( + margin: EdgeInsets.only( + top: 15.0, + ), + child: SvgPicture.asset('assets/images/new-design/covid-19-car.svg', width: 45.0, height: 45.0), + ), + Container( + margin: EdgeInsets.only(top: 5.0), + child: Column( + children: [ + Texts( + TranslationBase.of(context).driveThru, + fontWeight: FontWeight.w700, + color: Colors.white, + ), + ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(5.0), + ), + minWidth: MediaQuery.of(context).size.width * 0.15, + height: 25.0, + child: CustomTextButton( + backgroundColor: Colors.red[800], + elevation: 0, + disabledForegroundColor: new Color(0xFFbcc2c4).withOpacity(0.38), + disabledBackgroundColor: new Color(0xFFbcc2c4).withOpacity(0.12), + onPressed: (model.user != null && model.user!.outSA == 1) + ? () {} + : () { + navigateToCovidDriveThru(); + }, + child: Center( + child: Texts( + TranslationBase.of(context).bookNow, + fontWeight: FontWeight.w700, + color: Colors.white, + ), + ), + ), + ), + ], + ), + ), + ], + ), + ], + ), + )), + ), + Expanded( + child: InkWell( + onTap: () => Navigator.push(context, FadePage(page: LiveCareHome())), + child: Container( + height: 125, + padding: EdgeInsets.all(15), + margin: EdgeInsets.all(5), + decoration: BoxDecoration(color: Colors.white.withOpacity(0.3), borderRadius: BorderRadius.all(Radius.circular(5))), + child: SvgPicture.asset( + projectViewModel.isArabic ? 'assets/images/new-design/livecare_arabic_logo.svg' : 'assets/images/new-design/liveCare_white_logo.svg', + ), + ), + ), + ), + ], + ), + ), + ) + ], + ), + ), + Container(width: double.infinity, height: projectViewModel.isArabic ? 110 : 80) + ], + ), + Positioned( + top: 155, + left: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03), + right: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03), + child: (!model.isLogin) + ? Container( + width: double.infinity, + height: 125, + decoration: BoxDecoration( + color: Color(0xFFA59E9E), + shape: BoxShape.rectangle, + border: Border.all(color: Colors.transparent, width: 0.5), + borderRadius: BorderRadius.all(Radius.circular(9)), + image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)), + child: Container( + margin: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Texts( + TranslationBase.of(context).myMedicalFile, + color: Colors.black87, + fontWeight: FontWeight.w700, + fontSize: 23, + ), + Texts( + TranslationBase.of(context).myMedicalFileSubTitle, + color: Colors.black, + fontSize: 16, + ), + Align( + alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight, + child: InkWell( + onTap: () { + widget.goToMyProfile(); + }, + child: Container( + margin: EdgeInsets.only(left: 15, right: 15), + width: 90, + height: 30, + decoration: BoxDecoration( + color: Color(0xFFD81A2E), + shape: BoxShape.rectangle, + border: Border.all(color: Colors.transparent, width: 0.5), + borderRadius: BorderRadius.all(Radius.circular(0)), + ), + child: Center( + child: Texts( + TranslationBase.of(context).viewMore, + color: Colors.white, + fontWeight: FontWeight.w700, + fontSize: 12, + ), + ), + ), + ), + ) + ], + ), + ), + ) + : Container( + width: double.infinity, + height: projectViewModel.isArabic ? 160 : 130, + decoration: BoxDecoration( + color: Color(0xFFA59E9E), + shape: BoxShape.rectangle, + border: Border.all(color: Colors.transparent, width: 0.5), + borderRadius: BorderRadius.all(Radius.circular(9)), + image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover), + ), + child: Container( + margin: EdgeInsets.all(5), + child: Column( + children: [ + Row( + children: [ + if (projectViewModel.user != null && model.isLogin) + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 8, + ), + model.user!.cRSVerificationStatus == 2 + ? Row( + children: [ + Texts( + model.user!.firstName! + " " + model.user!.lastName!, + color: Colors.grey[100], + bold: true, + fontSize: 15, + ), + Container( + margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0), + child: SvgPicture.asset("assets/images/new-design/verification_check.svg"), + ), + ], + ) + : model.user!.cRSVerificationStatus == 3 + ? Row( + children: [ + Texts( + model.user!.firstName! + " " + model.user!.lastName!, + color: Colors.grey[100], + bold: true, + fontSize: 15, + ), + Container( + margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0), + child: SvgPicture.asset("assets/images/new-design/pending.svg"), + ), + ], + ) + : Row( + children: [ + Texts( + model.user!.firstName! + " " + model.user!.lastName!, + color: Colors.grey[100], + bold: true, + fontSize: 15, + ), + ], + ), + Texts( + '${model.user!.patientID!}', + color: Colors.white, + fontSize: 14, + ), + SizedBox( + height: 5, + ), + Texts( + '${DateUtil.getMonthDayYearDateFormatted(model.user!.dateofBirthDataTime!)} ,${model.user!.gender == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female} ${model.user!.age.toString() + "y"}', + color: Colors.grey[100], + fontWeight: FontWeight.normal, + fontSize: 14, + ), + ], + ), + ), + InkWell( + onTap: () { + widget.goToMyProfile(); + }, + child: Container( + margin: EdgeInsets.all(2), + width: 90, + height: 30, + decoration: BoxDecoration( + color: Color(0xFFD81A2E), + shape: BoxShape.rectangle, + border: Border.all(color: Colors.transparent, width: 0.5), + borderRadius: BorderRadius.all( + Radius.circular(5), + ), + ), + child: Center( + child: Texts( + TranslationBase.of(context).myMedicalFile, + color: Colors.white, + fontSize: 12, + textAlign: TextAlign.center, + ), + ), + ), + ) + ], + ), + Row( + children: [ + Expanded( + child: Row( + children: [ + Image.asset( + 'assets/images/height_icon.png', + width: 35, + height: 40, + ), + Texts( + "${model.heightCm} ${TranslationBase.of(context).cm}", + color: Colors.white, + fontSize: 17, + ) + ], + ), + ), + SizedBox( + width: 3, + ), + Expanded( + child: Row( + children: [ + Image.asset( + 'assets/images/weight_icon.png', + width: 25, + height: 40, + ), + Texts('${model.weightKg} ${TranslationBase.of(context).kg}', color: Colors.white, fontSize: 17) + ], + ), + ), + SizedBox( + width: 3, + ), + Expanded( + child: Row( + children: [ + Image.asset( + 'assets/images/blood_icon.png', + width: 35, + height: 40, + ), + Texts('${model.booldType}', color: Colors.white, fontSize: 17) + ], + ), + ), + ], + ) + ], + ), + ), + ), + ), + ], + ), + Padding( + padding: const EdgeInsets.only(bottom: 15, right: 15, left: 15), + child: InkWell( + onTap: () { + Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesOfferTabPage(projectViewModel.user!))); + }, + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Color(0xffB8382C), + ), + child: Padding( + padding: const EdgeInsets.all(8), + child: Row( + children: [ + Texts( + TranslationBase.of(context).offerAndPackages, + color: Colors.white, + fontSize: 20, + fontWeight: FontWeight.normal, + ), + Spacer(), + Image.asset("assets/images/offer_icon.png"), + ], + ), + ), + ), + ), + ), + if (projectViewModel.havePrivilege(64) || projectViewModel.havePrivilege(65) || projectViewModel.havePrivilege(67)) + Container( + margin: EdgeInsets.only(left: 15, right: 15), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + if (projectViewModel.havePrivilege(64)) + DashboardItem( + onTap: (model.user != null && model.user!.outSA == 1) + ? () {} + : () { + Navigator.push( + context, + FadePage( + page: HomeHealthCarePage(), + ), + ); + }, + child: Center( + child: Padding( + padding: (model.user != null && model.user!.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0), + child: (model.user != null && model.user!.outSA == 1) + ? Container( + width: double.infinity, + height: double.infinity, + color: Colors.grey.shade500.withOpacity(0.3), + child: Icon( + Icons.lock_outline, + size: 40, + ), + ) + : Column( + children: [ + Image.asset( + 'assets/images/home_health_care_icon.png', + width: 50, + height: 50, + ), + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context).homeHealthCare, + textAlign: TextAlign.center, + color: Colors.white, + fontWeight: FontWeight.w700, + fontSize: SizeConfig.textMultiplier! * 1.55, + ) + ], + )), + ), + height: MediaQuery.of(context).size.width * 0.4, + imageName: 'home_healthcare_service_bg.png', + opacity: 0.5, + ), + if (projectViewModel.havePrivilege(65)) + DashboardItem( + onTap: () => (model.user != null && model.user!.outSA == 1) ? () {} : getPharmacyToken(model), + child: Center( + child: Padding( + padding: (model.user != null && model.user!.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0), + child: (model.user != null && model.user!.outSA == 1) + ? Container( + width: double.infinity, + height: double.infinity, + color: Colors.grey.shade500.withOpacity(0.3), + child: Icon( + Icons.lock_outline, + size: 40, + ), + ) + : Column( + children: [ + // if (projectViewModel.user != null && model.isLogin && model.user.outSA == 1) + // Image.asset( + // 'assets/images/lock_icon.png', + // width: 50, + // height: 50, + // ), + Image.asset( + 'assets/images/pharmacy_logo.png', + width: 40, + height: 40, + ), + SizedBox( + height: 20, + ), + Texts( + TranslationBase.of(context).onlinePharmacy, + textAlign: TextAlign.center, + color: Colors.white, + fontWeight: FontWeight.w700, + fontSize: SizeConfig.textMultiplier! * 1.55, + ) + ], + ), + ), + ), + height: MediaQuery.of(context).size.width * 0.4, + imageName: 'al-habib_onlne_pharmacy_bg.png', + ), + if (projectViewModel.havePrivilege(67)) + DashboardItem( + onTap: (model.user != null && model.user!.outSA == 1) + ? () {} + : () { + Navigator.push( + context, + FadePage( + page: CMCPage(), + ), + ); + }, + child: Center( + child: Padding( + padding: (model.user != null && model.user!.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0), + child: (model.user != null && model.user!.outSA == 1) + ? Container( + width: double.infinity, + height: double.infinity, + color: Colors.grey.shade500.withOpacity(0.3), + child: Icon( + Icons.lock_outline, + size: 40, + ), + ) + : Column( + children: [ + Image.asset( + 'assets/images/comprehensive_medical_checkup_logo.png', + width: 50, + height: 50, + ), + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context).cmcHeading, + textAlign: TextAlign.center, + color: Colors.white, + fontWeight: FontWeight.w700, + fontSize: SizeConfig.textMultiplier! * 1.55, + ) + ], + )), + ), + height: MediaQuery.of(context).size.width * 0.4, + color: Color(0xFF747C80), + imageName: 'emergency_service_image.png', + ), + ], + ), + ), + SizedBox( + height: 8, + ), + Container( + margin: EdgeInsets.only(left: 15, right: 15), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + InkWell( + onTap: () => Navigator.push(context, FadePage(page: PaymentService())), + child: Container( + width: MediaQuery.of(context).size.width * 0.29, + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + Image.asset( + 'assets/images/al-habib_online_payment_service_icon.png', + height: 55, + ), + SizedBox( + height: 5, + ), + Texts( + TranslationBase.of(context).onlinePaymentService, + textAlign: TextAlign.center, + color: Colors.black87, + bold: false, + fontSize: SizeConfig.textMultiplier! * 1.7, + ) + ], + ), + ), + ), + height: MediaQuery.of(context).size.width * 0.4, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.0), + color: Colors.white, + ), + ), + ), + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: EReferralPage())); + }, + child: Container( + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + Image.asset( + 'assets/images/ereferral_service_icon.png', + width: 50, + height: 55, + ), + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context).ereferral, + textAlign: TextAlign.center, + color: Colors.black87, + bold: false, + fontSize: SizeConfig.textMultiplier! * 1.7, + ) + ], + ), + ), + ), + width: MediaQuery.of(context).size.width * 0.29, + height: MediaQuery.of(context).size.width * 0.4, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.0), + color: Colors.white, + )), + ), + if (projectViewModel.havePrivilege(60)) + Container( + width: MediaQuery.of(context).size.width * 0.29, + child: InkWell( + onTap: () => Navigator.push( + context, + FadePage( + page: ErOptions( + isAppbar: true, + ))), + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + Image.asset( + 'assets/images/Dr_Schedule_report.png', + width: 50, + height: 50, + ), + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context).emergencyServices, + textAlign: TextAlign.center, + color: Colors.black87, + bold: false, + fontSize: SizeConfig.textMultiplier! * 1.7, + ) + ], + ), + ), + ), + ), + height: MediaQuery.of(context).size.width * 0.4, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.0), + color: Colors.white, + ), + ), + ], + ), + ), + // ), + SizedBox( + height: 5, + ), + Container( + margin: EdgeInsets.only(left: 15, right: 15), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + DashboardItem( + child: Container( + width: double.infinity, + padding: EdgeInsets.all(10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).hMGService, + color: Colors.white, + fontWeight: FontWeight.normal, + ), + Texts( + TranslationBase.of(context).viewAllHabibMedicalService, + color: Colors.white, + fontWeight: FontWeight.normal, + fontSize: 10, + ), + Expanded( + child: Container(), + ), + Texts( + TranslationBase.of(context).viewMore, + color: Colors.white, + //fontWeight: FontWeight.normal, + ) + ], + ), + ), + height: 100, + imageName: 'contact_us_bg.png', + opacity: 0.5, + color: Colors.grey[700]!, + width: MediaQuery.of(context).size.width * 0.45, + onTap: () => Navigator.push(context, FadePage(page: AllHabibMedicalService())), + ), + DashboardItem( + onTap: () { + // Navigator.push( + // context, FadePage(page: FeedbackHomePage())); + Navigator.push(context, FadePage(page: ContactUsPage())); + }, + child: Container( + width: double.infinity, + padding: EdgeInsets.all(10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).reachUs, + color: Colors.white, + fontWeight: FontWeight.normal, + ), + Texts( + TranslationBase.of(context).viewAllWaysReachUs, + color: Colors.white, + fontWeight: FontWeight.normal, + fontSize: 10, + ), + Expanded( + child: Container(), + ), + Texts( + TranslationBase.of(context).viewMore, + color: Colors.white, + fontWeight: FontWeight.normal, + ) + ], + ), + ), + height: 100, + imageName: 'contact_us_bg.png', + opacity: 0.5, + color: Colors.grey[700]!, + width: MediaQuery.of(context).size.width * 0.45, + ), + ], + ), + ), + SizedBox( + height: 120, + ) + ], + ), + ), + ), + ), + ); + } + + getPharmacyToken(DashboardViewModel model) async { + if (!model.isLogin) { + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + } else { + GifLoaderDialogUtils.showMyDialog(context); + await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { + await pharmacyModuleViewModel.verifyCustomer().then((value) { + GifLoaderDialogUtils.hideDialog(context); + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + }); + }); + } + } + + navigateToCovidDriveThru() { + Navigator.push(context, FadePage(page: CovidDrivethruLocation())); + } +} + +class DashboardItem extends StatelessWidget { + const DashboardItem({this.hasBorder = false, this.imageName, this.child, this.onTap, Key? key, this.width, this.height, this.color, this.opacity = 0.4, this.hasColorFilter = true}) + : super(key: key); + final bool hasBorder; + final String? imageName; + final Widget? child; + final Function? onTap; + final double? width; + final double? height; + final Color? color; + final double? opacity; + final bool hasColorFilter; + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: onTap!(), + child: Container( + width: width != null ? width : MediaQuery.of(context).size.width * 0.29, + height: height != null + ? height + : MediaQuery.of(context).orientation == Orientation.portrait + ? MediaQuery.of(context).size.height * 0.17 + : MediaQuery.of(context).size.height * 0.35, + decoration: BoxDecoration( + color: !hasBorder + ? color != null + ? color + : Color(0xFF050705).withOpacity(opacity!) + : Colors.white, + borderRadius: BorderRadius.circular(6.0), + border: hasBorder ? Border.all(width: 1.0, color: const Color(0xffcccccc)) : Border.all(width: 0.0, color: Colors.transparent), + image: imageName != null + ? DecorationImage( + image: ExactAssetImage('assets/images/$imageName'), + fit: BoxFit.cover, + colorFilter: hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null, + ) + : null, + ), + child: Center( + child: child, + ), + ), + ); + } +} diff --git a/lib/pages/landing/home_page_2.dart b/lib/pages/landing/home_page_2.dart new file mode 100644 index 00000000..a5fff824 --- /dev/null +++ b/lib/pages/landing/home_page_2.dart @@ -0,0 +1,104 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/conference/zoom/call_screen.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:firebase_crashlytics/firebase_crashlytics.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; +import 'package:url_launcher/url_launcher_string.dart'; + +import 'fragments/home_page_fragment2.dart'; +import 'landing_page_pharmcy.dart'; + +class HomePage2 extends StatefulWidget { + final Function? goToMyProfile; + VoidCallback? onLoginClick, onMedicalFileClick; + + HomePage2({Key? key, this.goToMyProfile, this.onLoginClick, this.onMedicalFileClick}); + + @override + _HomePageState2 createState() => _HomePageState2(); +} + +class _HomePageState2 extends State { + PharmacyModuleViewModel pharmacyModuleViewModel = locator(); + late ProjectViewModel projectViewModel; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + + return BaseView( + onModelReady: (model) => model.getPatientRadOrders(), + builder: (_, model, wi) => Container( + color: CustomColors.backgroudGreyColor, + // color: Colors.yellow, + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + children: [ + HomePageFragment2( + model, + onLoginClick: () { + widget.onLoginClick!(); + // FirebaseCrashlytics.instance.crash(); + // Navigator.pushNamed( + // context, + // "zoom_call_page", + // arguments: CallArguments("h9qkpf02", "123", "Patient", "40", "1", false), + // ); + }, + onPharmacyClick: () { + // getPharmacyToken(model); + Uri uri = Uri.parse(PHARMACY_REDIRECT_URL); + launchUrl(uri, mode: LaunchMode.externalApplication); + }, + onMedicalFileClick: () { + widget.onMedicalFileClick!(); + }, + ) + ], + ), + ), + ), + ); + } + + getPharmacyToken(DashboardViewModel model) async { + if (!model.isLogin) { + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + } else { + GifLoaderDialogUtils.showMyDialog(context); + await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { + if (!pharmacyModuleViewModel.error.isNotEmpty) { + await pharmacyModuleViewModel.createUser().then((value) { + GifLoaderDialogUtils.hideDialog(context); + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + }); + } else { + GifLoaderDialogUtils.hideDialog(context); + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + } + }); + } + } + + navigateToCovidDriveThru() { + Navigator.push(context, FadePage(page: CovidDrivethruLocation())); + } +} diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart new file mode 100644 index 00000000..ffc9fec5 --- /dev/null +++ b/lib/pages/landing/landing_page.dart @@ -0,0 +1,707 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; +import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; +import 'package:diplomaticquarterapp/pages/landing/home_page_2.dart'; +import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart' + as family; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart'; +import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/push-notification-handler.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart'; +import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart'; +import 'package:firebase_messaging/firebase_messaging.dart'; +import 'package:flutter/material.dart'; +// import 'package:flutter_app_icon_badge/flutter_app_icon_badge.dart'; +import 'package:flutter_local_notifications/flutter_local_notifications.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart'; +import 'package:provider/provider.dart'; + +import '../../locator.dart'; +import '../../routes.dart'; + +class LandingPage extends StatefulWidget { + static late LandingPage shared; + late _LandingPageState state; + + LandingPage() { + LandingPage.shared = this; + } + + static bool isOpenCallPage = false; + + static IncomingCallData incomingCallData = new IncomingCallData(); + + @override + _LandingPageState createState() => state = _LandingPageState(); + + switchToDoFromHMGServices() { + state.changeCurrentTab(4); + } +} + +class _LandingPageState extends State with WidgetsBindingObserver { + var authProvider = new AuthProvider(); + AppointmentRateViewModel appointmentRateViewModel = locator(); + + int currentTab = 0; + late PageController pageController; + late ProjectViewModel projectViewModel; + late ToDoCountProviderModel model; + var notificationCount = ''; + var themeNotifier; + DateTime? currentBackPressTime; + + // SignalRUtil signalRUtil; + + late ToDoCountProviderModel toDoProvider; + + bool _showBottomNavigationBar = true; + + ///inject the user data + AuthenticatedUserObject authenticatedUserObject = locator(); + + final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance; + final authService = new AuthProvider(); + + var event = RobotProvider(); + var familyFileProvider = family.FamilyFilesProvider(); + + // VoIPKit + var dummyCallId = '123456'; + var dummyCallerName = 'Dummy Tester'; + late Timer timeOutTimer; + bool isTalking = false; + + var sharedPref = new AppSharedPreferences(); + + var data = { + "AppointmentNo": "2016059247", + "ProjectID": "15", + "NotificationType": "10", + "background": "0", + "doctorname": "Call from postman", + "clinicname": "LIVECARE FAMILY MEDICINE AND GP", + "speciality": "General Practioner", + "appointmentdate": "2022-01-19", + "appointmenttime": "12:10", + "PatientName": "Testing", + "session_id": "1_MX40NjIwOTk2Mn5-MTY0NzI1NjYxNDI2OX5ySXhlVjZjam13RFdMVmdleWVsSDhzQkx-fg", + "token": + "T1==cGFydG5lcl9pZD00NjIwOTk2MiZzaWc9OGMyY2IyYWFiZmZmMzI4ZmEwMjgxNDdmMGFhZGI0N2JiZjdmZWY4MjpzZXNzaW9uX2lkPTFfTVg0ME5qSXdPVGsyTW41LU1UWTBOekkxTmpZeE5ESTJPWDV5U1hobFZqWmphbTEzUkZkTVZtZGxlV1ZzU0RoelFreC1mZyZjcmVhdGVfdGltZT0xNjQ3MjU2NjE0Jm5vbmNlPTAuMjgzNDgyNjM1NDczNjQ2OCZyb2xlPW1vZGVyYXRvciZleHBpcmVfdGltZT0xNjQ3MjU4NDE0JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9", + "DoctorImageURL": "https://image.shutterstock.com/image-vector/sample-stamp-square-grunge-sign-260nw-1474408826.jpg", + "callerID": "9920", + "PatientID": "1231755", + "is_call": "true" + }; + + void _requestIOSPermissions() { + flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation()?.requestPermissions( + alert: true, + badge: true, + sound: true, + ); + } + + bool isPageNavigated = false; + late LocationUtils locationUtils; + + Future onWillPop() { + if (currentTab != 0) { + changeCurrentTab(0); + return Future.value(false); + } else { + DateTime now = DateTime.now(); + if (currentBackPressTime == null || now.difference(currentBackPressTime!) > Duration(seconds: 2)) { + currentBackPressTime = now; + AppToast.showToast(message: TranslationBase.of(context).pressAgain); + return Future.value(false); + } + return Future.value(true); + } + } + + changeCurrentTab(int tab) { + if (!projectViewModel.isLogin) { + if (tab == 3) { + List imagesInfo = []; + imagesInfo.add( + ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/0.png', + imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/0.png'), + ); + + imagesInfo.add( + ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/1.png', + imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/1.png'), + ); + + Navigator.push( + context, + MaterialPageRoute( + builder: (cxt) => NotAutPage( + title: TranslationBase.of(context).myFamilyFiles, + description: TranslationBase.of(context).familyInfo, + infoList: [], + imagesInfo: imagesInfo, + icon: "assets/images/new/bottom_nav/family_files.svg", + ), + ), + ); + return; + } + if (tab == 4) { + List imagesInfo = []; + imagesInfo.add( + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/ar/0.png')); + + Navigator.push( + context, + MaterialPageRoute( + builder: (cxt) => NotAutPage( + title: TranslationBase.of(context).todoList, + description: TranslationBase.of(context).infoTodo, + infoList: [], + imagesInfo: imagesInfo, + icon: "assets/images/new/bottom_nav/todo.svg", + ), + ), + ); + return; + } + } + // Future.delayed(Duration(seconds: 0), () { + // setState(() { + if (tab == 5) { + IS_VOICE_COMMAND_CLOSED = false; + triggerRobot(); + + // pageController.jumpToPage(tab); + } else { + if (currentTab > 0 && tab == 2) { + pageController.jumpToPage(0); + + currentTab = tab; + } else if (tab != 0) { + // if (tab == 4 && projectViewModel.isLogin && model.count == 0) { + // AppToast.showErrorToast(message: TranslationBase.of(context).noBookedAppo); + // } else { + pageController.jumpToPage(tab); + currentTab = tab; + // } + } else { + pageController.jumpToPage(tab); + currentTab = tab; + } + setState(() {}); + // currentTab = tab; + } + // }); + // }); + + projectViewModel.analytics.bottomTabNavigation.log(tabIndex: tab, isLoggedIn: projectViewModel.isLogin); + } + + getToDoCount() { + toDoProvider.setState(0, 0, true, toDoProvider.notificationsCount); + ClinicListService service = new ClinicListService(); + service.getActiveAppointmentNo(context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res['AppointmentActiveNumber']); + if (res['MessageStatus'] == 1) { + // toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount); + toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider.notificationsCount); + } else {} + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + @override + void didChangeAppLifecycleState(AppLifecycleState state) { + super.didChangeAppLifecycleState(state); + + AppGlobal.context = context; + if (state == AppLifecycleState.resumed) { + PushNotificationHandler.getInstance().onResume(); + sharedPref.remove(APPOINTMENT_HISTORY_MEDICAL); + } + } + + @override + void dispose() { + WidgetsBinding.instance.removeObserver(this); + super.dispose(); + } + + @override + void initState() { + super.initState(); + PushNotificationHandler.getInstance().onResume(); + + WidgetsBinding.instance.addObserver(this); + + AppGlobal.context = context; + pageController = PageController(keepPage: true); + + _firebaseMessaging.setAutoInitEnabled(true); + + WidgetsBinding.instance.addPostFrameCallback((_) { + if (projectViewModel.isLogin && !projectViewModel.isLoginChild) { + int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2; + familyFileProvider.getSharedRecordByStatus(languageID); + } + // Future.delayed(Duration(seconds: 3)).then((result) async { + // LocalNotification.getInstance().showNow(title: "Payload Update", subtitle: "Payload Update", payload: "Payload Update"); + // }); + }); + + PayfortViewModel payfortViewModel = context.read(); + payfortViewModel.initPayfort(); + + // HMG (Guest/Internet) Wifi Access [Zohaib Kambrani] + // for now commented to reduce this call will enable it when needed + // HMGNetworkConnectivity(context).start(); + + _firebaseMessaging.getToken().then((String? token) { + // print("Firebase Token: " + token!); + sharedPref.setString(PUSH_TOKEN, token!); + if (Platform.isIOS) { + FirebaseMessaging.instance.getAPNSToken().then((value) { + print("Push APNS getToken: " + value!); + AppSharedPreferences().setString(APNS_TOKEN, value); + AppSharedPreferences().setString(ONESIGNAL_APNS_TOKEN, value); + }); + // voIPKit.getVoIPToken().then((value) { + // print('🎈 example: getVoIPToken: $value'); + // AppSharedPreferences().setString(APNS_TOKEN, value!); + // // getOneSignalVOIPToken(value); + // }); + } + if (token != null) { + DEVICE_TOKEN = token; + if (!projectViewModel.isLoginChild) { + checkUserStatus(token); + } + } + }).catchError((err) { + print(err); + }); + startZoom(); + // HMG_Geofencing(context).loadZones().then((instance) => instance.init()); + } + + void startZoom() { + var zoom = ZoomVideoSdk(); + InitConfig initConfig = InitConfig( + domain: "zoom.us", + enableLog: true, + ); + zoom.initSdk(initConfig); + } + + void setUserValues(value) async { + if (value != null) sharedPref.setObject(IMEI_USER_DATA, value); + } + + Future getUserInformation() async { + var userInfoJson = sharedPref.getObject(IMEI_USER_DATA); + return userInfoJson; + } + + checkValue(projectProvider) { + if (projectProvider.searchValue != null) { + changeCurrentTab(2); + } + } + + // registerGeofences() async { + // await locator().getAllGeoZones(GeoZonesRequestModel()); + // + // // void doIt() { + // // // getUserInformation().then((value) { + // // // if (value != null) + // // projectViewModel.platformBridge().registerHmgGeofences(); + // // // }); + // // } + // // + // // if (await Permission.location.isGranted) { + // // doIt(); + // // } else { + // // [Permission.location].request().then((value) async { + // // if (await Permission.location.isGranted) { + // // doIt(); + // // } + // // }); + // // } + // } + + login() async { + var data = await sharedPref.getObject(IMEI_USER_DATA); + sharedPref.remove(REGISTER_DATA_FOR_LOGIIN); + if (data != null) { + Navigator.of(context).pushNamed(CONFIRM_LOGIN); + } else { + // AppGlobal.context = context; + GifLoaderDialogUtils.showMyDialog(context); + authService.selectDeviceImei(DEVICE_TOKEN).then((value) async { + GifLoaderDialogUtils.hideDialog(context); + var data = await sharedPref.getObject(IMEI_USER_DATA); + if (value != null) { + setUserValues(value); + Navigator.of(context).pushNamed(CONFIRM_LOGIN); + } else { + GifLoaderDialogUtils.hideDialog(context); + Navigator.of(context).pushNamed( + WELCOME_LOGIN, + ); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + Navigator.of(context).pushNamed(WELCOME_LOGIN); + }); + } + } + + dummyCall() async { + // final server = await SelectionDialog( + // context, + // title: "Select Server", + // items: ["https://livecareturn.hmg.com:8086", "https://104.197.179.1:8086"] + // ).show(); + // + // final json = { + // "callerID": "s1", + // "PatientID": "s2", + // "msgID": "123", + // "notfID": "123", + // "notification_foreground": "true", + // "count": "1", + // "message": "Doctor is calling ", + // "AppointmentNo": "123", + // "title": "Rayyan Hospital", + // "ProjectID": "123", + // "NotificationType": "10", + // "background": "1", + // "doctorname": "Dr Sulaiman Al Habib", + // "clinicname": "ENT Clinic", + // "speciality": "Speciality", + // "appointmentdate": "Sun, 15th Dec, 2019", + // "appointmenttime": "09:00", + // "type": "video", + // "session_id": + // "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0LTE1OTg3NzQ1MDYiLCJpc3MiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0Iiwic3ViIjoiQUNhYWQ1YTNmOGM2NGZhNjczNTY3NTYxNTc0N2YyNmMyYiIsImV4cCI6MTU5ODc3ODEwNiwiZ3JhbnRzIjp7ImlkZW50aXR5IjoiSGFyb29uMSIsInZpZGVvIjp7InJvb20iOiJTbWFsbERhaWx5U3RhbmR1cCJ9fX0.7XUS5uMQQJfkrBZu9EjQ6STL6R7iXkso6BtO1HmrQKk", + // "identity": "Haroon1", + // "name": "SmallDailyStandup", + // "videoUrl": "video", + // "picture": "video", + // "is_call": "true", + // "server": server, + // }; + + // IncomingCallData incomingCallData = IncomingCallData.fromJson(json); + // final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: incomingCallData))); + + String callerId = + "2_MX40NjIwOTk2Mn5-MTY1NjU3NTQ4MzQ0NX5aSGczeVlObGNVMGJXWEFWRnc0akZRcm1-fg*T1==cGFydG5lcl9pZD00NjIwOTk2MiZzaWc9MzY5MTBmZmUyMDRiNjE3NTRiYzlmNjVjMTEyZTE1MWFjN2YxYjAxZTpzZXNzaW9uX2lkPTJfTVg0ME5qSXdPVGsyTW41LU1UWTFOalUzTlRRNE16UTBOWDVhU0djemVWbE9iR05WTUdKWFdFRldSbmMwYWtaUmNtMS1mZyZjcmVhdGVfdGltZT0xNjU2NTc1NDgzJm5vbmNlPTAuNzM3OTQyOTY4Mzg5OTU1MiZyb2xlPW1vZGVyYXRvciZleHBpcmVfdGltZT0xNjU2NjYxODgzJmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9*true*s1*s2*https://livecareturn.hmg.com:8086"; + + String sessionID = callerId.split("*")[0]; + String token = callerId.split("*")[1]; + String isWebRTC = callerId.split("*")[2]; + + print("🎈 SessionID: $sessionID"); + print("🎈 Token: $token"); + print("🎈 isWebRTC: $isWebRTC"); + + String caller = callerId.split("*")[3]; + String receiver = callerId.split("*")[4]; + String host = callerId.split("*")[5]; + // await Navigator.push(context, MaterialPageRoute(builder: (context) => StartVideoCall(caller: caller, receiver: receiver, iAmCaller: false, host: host))); + } + + getNotificationCount(token) async { + if (await sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); + if (data != null) { + authService.getDashboard().then((value) => { + if (value != null) + { + setState(() { + notificationCount = + value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); + model.setState(model.count, 0, true, notificationCount); + sharedPref.setString(NOTIFICATION_COUNT, notificationCount); + }) + } + }); + } + } + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + model = Provider.of(context); + // currentTab == 0 ? 45 : 0.0 + return Scaffold( + appBar: currentTab == 0 + ? PreferredSize( + preferredSize: Size.fromHeight(currentTab == 0 ? 45 : 0.0), + child: AppBar( + elevation: 0, + backgroundColor: CustomColors.backgroudGreyColor, + //Changed By Aamir + // textTheme: TextTheme( + // headline6: TextStyle(color: Theme.of(context).textTheme.headline1!.color, fontWeight: FontWeight.bold), + // ), + title: Text( + getText(currentTab).toUpperCase(), + style: TextStyle( + fontWeight: FontWeight.bold, + color: currentTab == 0 ? CustomColors.backgroudGreyColor : CustomColors.accentColor, + // : Theme.of(context).textTheme.headline1!.color, + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), + // bold: true, + ), + leading: Builder( + builder: (BuildContext context) { + return new Stack( + children: [ + currentTab == 0 + ? IconButton( + icon: SvgPicture.asset("assets/images/new/menu.svg"), + // color: Theme.of(context).textTheme.headline1!.color, + color: CustomColors.white, + onPressed: () => Scaffold.of(context).openDrawer(), + ) + : IconButton( + icon: Icon(Icons.arrow_back), + onPressed: () { + setState(() { + currentTab = 0; + }); + pageController.jumpToPage(0); + }, + ), + projectViewModel.isLogin && model.notificationsCount != null && !projectViewModel.isLoginChild + ? Positioned( + right: projectViewModel.isArabic ? 35 : 0, + top: 5, + child: new Container( + padding: EdgeInsets.all(4), + decoration: new BoxDecoration( + color: CustomColors.accentColor, + borderRadius: BorderRadius.circular(20), + ), + constraints: BoxConstraints( + minWidth: 20, + minHeight: 20, + ), + child: Text( + model.notificationsCount.toString(), + style: TextStyle( + color: Colors.white, + fontSize: projectViewModel.isArabic ? 8 : 9, + ), + textAlign: TextAlign.center, + ), + ), + ) + : SizedBox() + ], + ); + }, + ), + actions: [ + // IconButton( + // //iconSize: 70, + // icon: Icon( + // projectViewModel.isLogin ? Icons.settings : Icons.login, + // color: Theme.of(context).textTheme.headline1.color, + // ), + // onPressed: () { + // if (projectViewModel.isLogin) + // Navigator.of(context).pushNamed( + // SETTINGS, + // ); + // else + // login(); + // }, //do something, + // ) + ], + centerTitle: true, + ), + ) + : null, + drawer: SafeArea(child: AppDrawer()), + extendBody: false, + body: WillPopScope( + onWillPop: onWillPop, + child: Stack(children: [ + PageView( + physics: NeverScrollableScrollPhysics(), + controller: pageController, + onPageChanged: (idx) {}, + children: [ + HomePage2( + goToMyProfile: () { + changeCurrentTab(1); + }, + onLoginClick: () { + login(); + }, + onMedicalFileClick: () { + changeCurrentTab(1); + }, + ), + MedicalProfilePageNew( + onTap: () { + changeCurrentTab(0); + }, + ), + Search( + onBackClick: () { + changeCurrentTab(0); + }, + ), + MyFamily( + isAppbarVisible: false, + onBackClick: () { + changeCurrentTab(0); + }, + ), + ToDo( + isShowAppBar: true, + onBackClick: () { + changeCurrentTab(0); + }, + ), + ], // Please do not remove the BookingOptions from this array + ), + RobotIcon() + ])), + bottomNavigationBar: BottomNavBar( + changeIndex: changeCurrentTab, + index: currentTab, + ), + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + floatingActionButton: (projectViewModel.havePrivilege(34) && currentTab == 0) + ? FloatingButton( + elevation: true, + onTap: () { + changeCurrentTab(2); + projectViewModel.analytics.appointment.book_appointment(); + }, + ) + : null); + } + + triggerRobot() { + event.setValue({"isRobotVisible": 'true'}); + } + + getText(currentTab) { + switch (currentTab) { + case 0: + return TranslationBase.of(context).home; + case 1: + return TranslationBase.of(context).medicalProfile; + case 2: + return TranslationBase.of(context).bookAppo; + case 5: + return TranslationBase.of(context).bookAppo; + case 3: + return TranslationBase.of(context).services; + case 4: + return TranslationBase.of(context).bookAppo; + } + } + + void checkUserStatus(token) async { + await PushNotificationHandler.getInstance().requestPermissions(); + // authService.selectDeviceImei(token).then((SelectDeviceIMEIRES? value) => setUserValues(value)); + if (authenticatedUserObject.isLogin) { + var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); + if (data != null) { + authService.registeredAuthenticatedUser(data, token, 0, 0).then((res) => {}); + authService.getDashboard().then((value) async { + setState(() { + if (value != null) { + notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); + model.setState(model.count, model.ancillaryCount, true, notificationCount); + sharedPref.setString(NOTIFICATION_COUNT, notificationCount); + // FlutterAppIconBadge.updateBadge(int.parse(notificationCount)); + } + }); + // if (await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN) == null || !await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN)) { + // int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2; + // appointmentRateViewModel.getIsLastAppointmentRatedList(languageID).then((value) async { + // if (appointmentRateViewModel.isHaveAppointmentNotRate) { + // await AppSharedPreferences().setBool(IS_LAST_APPOINTMENT_RATE_SHOWN, true); + // Navigator.push( + // context, + // FadePage( + // page: RateAppointmentDoctor(), + // ), + // ); + // } + // }).catchError((err) { + // print(err); + // }); + // } + }); + } + projectViewModel.analytics.setUser(data); + } else { + //changed by Aamir + projectViewModel.analytics.setUser(AuthenticatedUser()); + } + if (Platform.isIOS) { + String voipToken = await sharedPref.getString(APNS_TOKEN); + // getOneSignalVOIPToken(voipToken); + } + // registerGeofences(); + } + + getOneSignalVOIPToken(String voipToken) { + LiveCareService service = new LiveCareService(); + service.getOneSignalVOIPToken(voipToken, context).then((res) { + print("OneSignalID: $res"); + AppSharedPreferences().setString(ONESIGNAL_APNS_TOKEN, res['id']); + }).catchError((err) { + print(err); + }); + } + + void showUserConsent() { + sharedPref.setString(IS_COVID_CONSENT_SHOWN, "true"); + } +} diff --git a/lib/pages/landing/landing_page_pharmcy.dart b/lib/pages/landing/landing_page_pharmcy.dart new file mode 100644 index 00000000..f31cfe41 --- /dev/null +++ b/lib/pages/landing/landing_page_pharmcy.dart @@ -0,0 +1,121 @@ +import 'package:barcode_scan2/barcode_scan2.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/PharmacyPagesViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/cart-order-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy_module_page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart'; +import 'package:diplomaticquarterapp/pages/pharmacy/profile/profile.dart'; +import 'package:diplomaticquarterapp/pages/pharmacy_categorise.dart'; +import 'package:diplomaticquarterapp/pages/search_products_page.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/pharmacy/bottom_nav_pharmacy_bar.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../locator.dart'; + +class LandingPagePharmacy extends StatefulWidget { + final int currentTab; + + const LandingPagePharmacy({Key? key, this.currentTab = 0}) : super(key: key); + @override + _LandingPagePharmacyState createState() => _LandingPagePharmacyState(); +} + +class _LandingPagePharmacyState extends State { + late ProjectViewModel projectProvider; + int currentTab = 0; + late PageController pageController; + + void initState() { + super.initState(); + locator().manufacturerList = []; + locator().bestSellerProducts = []; + locator().lastVisitedProducts = []; + pageController = + PageController(keepPage: true, initialPage: widget.currentTab); + setState(() { + currentTab = widget.currentTab; + }); + } + + void changeCurrentTab(int tab) { + if (pageController.hasClients) { + setState(() { + currentTab = tab; + pageController.jumpToPage(tab); + }); + } + } + + @override + Widget build(BuildContext context) { + return WillPopScope( + onWillPop: () async { + return false; + }, + child: AppScaffold( + isBottomBar: true, + extendBody: false, + isShowDecPage: false, + isMainPharmacyPages: true, + currentTab: currentTab, + changeCurrentTab: changeCurrentTab, + body: PageView( + physics: NeverScrollableScrollPhysics(), + controller: pageController, + children: [ + PharmacyPage(), + PharmacyCategorisePage(), + PharmacyProfilePage(moveToOrder: false, changeTab: (){changeCurrentTab(2);}), + CartOrderPage(changeTab: changeCurrentTab), + ], + ), + ), + ); + } + + void _scanQrAndGetProduct() async { + try { + ScanResult result = await BarcodeScanner.scan(); + try { + String barcode = result.rawContent; + GifLoaderDialogUtils.showMyDialog(context); + await BaseAppClient() + .getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode", + onSuccess: (dynamic response, int statusCode) { + print(response); + var product = PharmacyProduct.fromJson(response["products"][0]); + GifLoaderDialogUtils.hideDialog(context); + Navigator.push(context, FadePage(page: ProductDetailPage(product))); + }, onFailure: (String error, int statusCode) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: "Product not found"); + }); + } catch (apiEx) { + AppToast.showErrorToast( + message: "Something went wrong, please try again"); + } + } catch (barcodeEx) {} + } + + getText(currentTab) { + switch (currentTab) { + case 2: + return 'Wishlist'; + case 3: + return 'My Account'; + case 4: + return 'Shopping Cart'; + } + } +} diff --git a/lib/pages/landing/replay_page.dart b/lib/pages/landing/replay_page.dart new file mode 100644 index 00000000..368f7a1c --- /dev/null +++ b/lib/pages/landing/replay_page.dart @@ -0,0 +1,15 @@ +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'; + +class ReplayPage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return AppScaffold( + body: Center( + child: InkWell(onTap: () {}, child: Texts('Replay Page')), + ), + ); + } +} diff --git a/lib/pages/landing/widgets/logged_slider_view.dart b/lib/pages/landing/widgets/logged_slider_view.dart new file mode 100644 index 00000000..98e4b252 --- /dev/null +++ b/lib/pages/landing/widgets/logged_slider_view.dart @@ -0,0 +1,232 @@ +import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; +import 'package:diplomaticquarterapp/models/slider_data.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class LoggedSliderView extends StatelessWidget { + ProjectViewModel projectViewModel; + SliderData sliderData; + DashboardViewModel model; + + LoggedSliderView(this.projectViewModel, this.sliderData, this.model); + + @override + Widget build(BuildContext context) { + //'${DateUtil.getMonthDayYearDateFormatted(sliderData.dateofBirthDataTime)} ,${model.user.gender == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female} ${model.user.age.toString() + "y"}', + return Container( + decoration: cardRadius(20), + + margin: EdgeInsets.all(0), + child: Container( + decoration: cardRadius(20,color: sliderData.darkColor), + clipBehavior: Clip.antiAlias, + margin: EdgeInsets.zero, + + // padding: EdgeInsets.zero, + child: Stack( + children: [ + Card( + child: Container( + width: double.infinity, + height: double.infinity, + ), + color: Colors.transparent, + margin: EdgeInsets.zero, + elevation: 8, + ), + Container( + width: double.infinity, + height: double.infinity, + clipBehavior: Clip.antiAlias, + margin: EdgeInsets.zero, + decoration: projectViewModel.isArabic + ? containerBottomRightRadiusWithGradientForAr(MediaQuery.of(context).size.width / 4, darkColor: sliderData.darkColor, lightColor: sliderData.lightColor) + : containerBottomRightRadiusWithGradient(MediaQuery.of(context).size.width / 4, darkColor: sliderData.darkColor, lightColor: sliderData.lightColor), + child: Card( + color: Colors.transparent, + margin: EdgeInsets.zero, + elevation: 8, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + mFlex(2), + Row( + children: [ + Container( + decoration: projectViewModel.isArabic ? containerColorRadiusLeft(Color(0xFFFBF2E31), 100) : containerColorRadiusRight(Color(0xFFFBF2E31), 100), + padding: EdgeInsets.only(left: 20, right: 16, top: 6, bottom: 6), + child: Text( + TranslationBase.of(context).medicalFile, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 10, + letterSpacing: -0.3, + height: 1.2, + ), + ), + ), + mWidth(MediaQuery.of(context).size.width / 50), + //circularAviator(MediaQuery.of(context).size.width / 14, brColor: Colors.white), + mFlex(1), + projectViewModel.isArabic ? circularAviator(MediaQuery.of(context).size.width / 28, brColor: Colors.white, icon: Icons.done, bcColor: Colors.white) : Container(), + Text( + TranslationBase.of(context).verified, + style: TextStyle( + color: Colors.white, + fontSize: 10, + letterSpacing: -0.3, + height: 1, + ), + ), + !projectViewModel.isArabic ? circularAviator(MediaQuery.of(context).size.width / 28, brColor: Colors.white, icon: Icons.done, bcColor: Colors.white) : Container(), + mWidth(MediaQuery.of(context).size.width / 70), + ], + ), + mFlex(1), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + sliderData.pateintName.toLowerCase().capitalizeFirstofEach, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 17, + letterSpacing: -0.25, + height: 25 / 17, + ), + ), + mHeight(2), + Text( + sliderData.pateintId, + style: TextStyle( + color: Colors.white, + fontSize: 12, + letterSpacing: -0.36, + height: 1, + ), + ), + ], + ), + ), + mHeight(3), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20), + child: Text( + '${DateUtil.getMonthDayYearDateFormatted(projectViewModel.user.dateofBirthDataTime!)} ,${projectViewModel.user!.gender == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female} ${projectViewModel.user!.age.toString() + " " + TranslationBase.of(context).patientAge.toString()}', + style: TextStyle( + color: Colors.white, + fontSize: 12, + letterSpacing: -0.33, + height: 1, + ), + ), + ), + mFlex(3), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20), + child: Row( + children: [ + Expanded( + flex: 3, + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/new/height.svg', + width: 11, + height: 11, + ), + mWidth(6), + Texts( + "${TranslationBase.of(context).height}: ${model.heightCm} ${TranslationBase.of(context).cm}", + color: Colors.white, + fontSize: 8, + ) + ], + ), + ), + SizedBox( + width: 3, + ), + Expanded( + flex: 3, + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/new/weight.svg', + width: 11, + height: 11, + ), + mWidth(6), + Texts( + '${TranslationBase.of(context).weight}: ${model.weightKg} ${TranslationBase.of(context).kg}', + color: Colors.white, + fontSize: 8, + ) + ], + ), + ), + SizedBox( + width: 3, + ), + Expanded( + flex: 3, + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/new/blood.svg', + width: 11, + height: 11, + ), + mWidth(6), + Texts( + '${TranslationBase.of(context).bloodType1} ${model.booldType}', + color: Colors.white, + fontSize: 7, + ) + ], + ), + ), + mFlex(1), + ], + ), + ), + mFlex(2), + ], + ), + ), + ), + projectViewModel.isArabic + ? Positioned( + child: Icon( + Icons.arrow_forward, + color: Colors.white, + size: 20, + ), + bottom: 8, + left: 8, + ) + : Positioned( + child: Icon( + Icons.arrow_forward_rounded, + color: Colors.white, + size: 20, + ), + bottom: 8, + right: 8, + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/landing/widgets/offer_view.dart b/lib/pages/landing/widgets/offer_view.dart new file mode 100644 index 00000000..82afbc4a --- /dev/null +++ b/lib/pages/landing/widgets/offer_view.dart @@ -0,0 +1,87 @@ +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:flutter/material.dart'; + +class OfferView extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Container( + width: double.infinity, + height: MediaQuery.of(context).size.width / 5, + decoration: containerColorRadiusBorderWidth(Colors.grey[200]!, 20, Colors.grey[300]!, 2), + child: Row( + children: [ + Expanded( + flex: 2, + child: Container( + width: double.infinity, + padding: EdgeInsets.only(left: 20,right: 20,top: 8,bottom: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Kid's Offer", + style: TextStyle( + color: Color(0xFFFBF2E31), + fontSize: 18, + fontWeight: FontWeight.bold, + ), + ), + Text( + "Take Care of your children's teeth", + style: TextStyle( + color: Colors.black, + fontSize: 12, + fontWeight: FontWeight.bold, + ), + ), + mFlex(1), + Row( + children: [ + Text( + "Only ", + style: TextStyle( + color: Color(0xFFFBF2E31), + fontSize: 14, + ), + ), + Text( + "500 ", + style: TextStyle( + color: Color(0xFFFBF2E31), + fontSize: 14, + fontWeight: FontWeight.bold, + ), + ), + Text( + "SAR ", + style: TextStyle( + color: Color(0xFFFBF2E31), + fontSize: 14, + ), + ), + mFlex(1), + ], + ), + ], + ), + ), + ), + Expanded( + child: Column( + children: [ + Expanded( + flex: 1, + child: Image.asset("assets/images/pharmacy_module/payment/hmg_shipping_logo.png"), + ), + Expanded( + flex: 1, + child: Image.asset("name"), + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/landing/widgets/pharmacy_view.dart b/lib/pages/landing/widgets/pharmacy_view.dart new file mode 100644 index 00000000..288eb20c --- /dev/null +++ b/lib/pages/landing/widgets/pharmacy_view.dart @@ -0,0 +1,65 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class PharmacyView extends StatelessWidget { + Function onPharmacyClick; + PharmacyView({required this.onPharmacyClick}); + @override + Widget build(BuildContext context) { + return InkWell( + onTap: (){ + onPharmacyClick(); + }, + child: Container( + width: double.infinity, + decoration: + containerBottomRightRadiusWithGradientBorder(16, darkColor: CustomColors.darkGreyColor.withOpacity(0.5), lightColor: CustomColors.lightGreyColor, borderColor: Color(0xFFcccccc), w: 1), + padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset("assets/images/new/Pharmacy.svg"), + mWidth(12), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + TranslationBase.of(context).HMGPharmacy, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ), + Text( + TranslationBase.of(context).ecommerceSolution, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 14, + ), + ), + ], + ), + ), + mWidth(12), + Opacity( + opacity: 0.2, + child: SvgPicture.asset("assets/images/new/Pharmacy.svg"), + ), + ], + ), + ), + ); + } + @override + void debugFillProperties(DiagnosticPropertiesBuilder properties) { + super.debugFillProperties(properties); + properties.add(DiagnosticsProperty('onPharmacyClick', onPharmacyClick)); + } +} diff --git a/lib/pages/landing/widgets/services_view.dart b/lib/pages/landing/widgets/services_view.dart new file mode 100644 index 00000000..fa0134bc --- /dev/null +++ b/lib/pages/landing/widgets/services_view.dart @@ -0,0 +1,510 @@ +import 'dart:io'; + +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/hmg_services.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h2o_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health_converter.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart'; +import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; +import 'package:diplomaticquarterapp/pages/ChildVaccines/new/child_initial_page.dart'; +import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; +import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; +import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; +import 'package:diplomaticquarterapp/pages/ErService/EROnlineCheckIn/EROnlineCheckInHome.dart'; +import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/inpatient_home.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/medical/medical_profile_page_new.dart'; +import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; +import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app-permissions.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/penguin_method_channel.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/location_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:permission_handler/permission_handler.dart'; +import 'package:url_launcher/url_launcher.dart'; + +import '../../../locator.dart'; +import '../landing_page_pharmcy.dart'; + +class ServicesView extends StatelessWidget { + HmgServices hmgServices; + int index; + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + PharmacyModuleViewModel pharmacyModuleViewModel = locator(); + late LocationUtils locationUtils; + bool isHomePage; + late ProjectViewModel projectViewModel; + bool isLocked; + + ServicesView(this.hmgServices, this.index, this.isHomePage, this.projectViewModel, {this.isLocked = false}); + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: () { + if (isHomePage) { + handleHomePageServices(hmgServices, context); + } else { + handleAllServices(hmgServices, context); + } + }, + child: Container( + width: double.infinity, + height: double.infinity, + decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor, darkColor: CustomColors.darkGreyColor), + child: Stack( + children: [ + Container( + width: double.infinity, + height: double.infinity, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + mFlex(1), + Flexible( + flex: 8, + child: Column( + children: [ + Flexible( + flex: 5, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Opacity( + opacity: 0.04, + child: hmgServices.action == 5 + ? Image.asset( + hmgServices.icon, + width: double.infinity, + height: double.infinity, + ) + : SvgPicture.asset( + hmgServices.icon, + width: double.infinity, + height: double.infinity, + ), + ), + ), + ), + mFlex(1), + ], + ), + ), + ], + ), + ), + Container( + width: double.infinity, + height: double.infinity, + padding: EdgeInsets.only(left: SizeConfig.widthMultiplier! * 3, right: SizeConfig.widthMultiplier! * 3, top: SizeConfig.widthMultiplier! * 3, bottom: SizeConfig.widthMultiplier! * 2), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + mFlex(1), + hmgServices.action == (isHomePage ? 5 : 8) + ? Image.asset( + hmgServices.icon, + height: index == 0 ? MediaQuery.of(context).size.width / 18 : MediaQuery.of(context).size.width / 18, + ) + : Container( + // color: Colors.yellow, + width: index == 4 ? MediaQuery.of(context).size.width / 12 : MediaQuery.of(context).size.width / 12, + height: index == 4 ? MediaQuery.of(context).size.width / 10 : MediaQuery.of(context).size.width / 12, + child: SvgPicture.asset( + hmgServices.icon, +// width: MediaQuery.of(context).size.width / 12, + // height: MediaQuery.of(context).size.width / 12, + ), + ), + mFlex(4), + AutoSizeText( + hmgServices.title, + maxLines: 1, + minFontSize: 10, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 1.6, + fontWeight: FontWeight.bold, + letterSpacing: -0.39, + height: 0.8, + ), + ), + AutoSizeText( + hmgServices.subTitle, + maxLines: 1, + minFontSize: 8, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 1.4, + letterSpacing: -0.27, + fontWeight: FontWeight.w600, + ), + ), + mFlex(1), + ], + ), + ), + isLocked + ? Container( + width: double.infinity, + height: double.infinity, + decoration: containerRadiusWithGradientServices(20, lightColor: Colors.grey.withOpacity(0.6), darkColor: Colors.grey.withOpacity(0.6)), + child: Icon( + Icons.lock_outline, + size: 40, + ), + ) + : Container() + ], + ), + ), + ); + } + + openNavigationProjectSelection(BuildContext context) { + int _selectedHospitalIndex = 0; + List projectsListLocal = []; + Utils.navigationProjectsList.forEach((v) { + projectsListLocal.add(new HospitalsModel.fromJson(v)); + }); + showDialog( + context: context, + builder: (cxt) => LocationSelectionDialog( + isArabic: projectViewModel.isArabic, + data: projectsListLocal, + selectedIndex: _selectedHospitalIndex, + onValueSelected: (index) { + _selectedHospitalIndex = index; + initPenguinSDK(projectsListLocal[index].iD); + }, + ), + ); + } + + initPenguinSDK(int projectID) async { + final bool permited = await AppPermission.askPenguinPermissions(); + if (!permited) { + Map statuses = await [ + Permission.location, + Permission.bluetooth, + Permission.bluetoothConnect, + Permission.bluetoothScan, + Permission.activityRecognition, + ].request().whenComplete(() { + PenguinMethodChannel().launch("penguin", projectViewModel.isArabic ? "ar" : "en", projectViewModel.authenticatedUserObject.user.patientID.toString()); + }); + } + } + + handleHomePageServices(HmgServices hmgServices, BuildContext context) { + if (hmgServices.action == 0) { + Navigator.push(context, FadePage(page: Search())); + locator().hmgServices.logServiceName('book appointment'); + } else if (hmgServices.action == 1) { + openLiveCare(context); + } else if (hmgServices.action == 2) { + //todo for temporary basis + // Navigator.push(context, FadePage(page: VitalSigns())); + + // initPenguinSDK(); + if (projectViewModel.isIndoorNavigationEnabled) { + if (!isLocked) openNavigationProjectSelection(context); + } else { + Navigator.push(context, FadePage(page: ErOptions(isAppbar: true))); + locator().hmgServices.logServiceName('emergency service'); + } + } else if (hmgServices.action == 3) { + Navigator.push(context, FadePage(page: HomeHealthCarePage())); + locator().hmgServices.logServiceName('home health care'); + } else if (hmgServices.action == 4) { + Navigator.push(context, FadePage(page: CMCPage())); + locator().hmgServices.logServiceName('comprehensive medical checkup'); + } else if (hmgServices.action == 5) { + Navigator.push(context, FadePage(page: PaymentService())); + locator().hmgServices.logServiceName('online payments'); + } else if (hmgServices.action == 6) { + Navigator.push(context, FadePage(page: EReferralPage())); + locator().hmgServices.logServiceName('e-referral service'); + } else if (hmgServices.action == 7) { + showCovidDialog(context); + locator().hmgServices.logServiceName('covid-test drive-thru'); + } else if (hmgServices.action == 8) { + Navigator.push(context, FadePage(page: ContactUsPage())); + locator().hmgServices.logServiceName('find us reach us'); + } else if (hmgServices.action == 23) { + Navigator.push(context, FadePage(page: InPatientServicesHome())); + locator().hmgServices.logServiceName('find us reach us'); + } else if (hmgServices.action == 9) { + if (!isLocked) Navigator.push(context, FadePage(page: EROnlineCheckInHomePage())); + locator().hmgServices.logServiceName('ER Online CheckIn'); + } + } + + handleAllServices(HmgServices hmgServices, BuildContext context) { + if (hmgServices.action == 0) { + Navigator.push(context, FadePage(page: Search())); + locator().hmgServices.logServiceName('book appointment'); + } else if (hmgServices.action == 1) { + openLiveCare(context); + } else if (hmgServices.action == 2) { + Navigator.push(context, FadePage(page: ErOptions(isAppbar: true))); + locator().hmgServices.logServiceName('emergency service'); + } else if (hmgServices.action == 3) { + Navigator.push(context, FadePage(page: HomeHealthCarePage())); + locator().hmgServices.logServiceName('home health care'); + } else if (hmgServices.action == 4) { + Navigator.push(context, FadePage(page: CMCPage())); + locator().hmgServices.logServiceName('comprehensive medical checkup'); + } else if (hmgServices.action == 5) { + // getPharmacyToken(context); + Uri uri = Uri.parse(PHARMACY_REDIRECT_URL); + launchUrl(uri, mode: LaunchMode.externalApplication); + locator().hmgServices.logServiceName('al habib pharmacy'); + } else if (hmgServices.action == 6) { + Navigator.push(context, FadePage(page: MedicalProfilePageNew())); + } else if (hmgServices.action == 7) { + Navigator.push(context, FadePage(page: MyFamily())); + locator().hmgServices.logServiceName('my family files'); + } else if (hmgServices.action == 8) { + Navigator.push(context, FadePage(page: PaymentService())); + locator().hmgServices.logServiceName('online payments'); + } else if (hmgServices.action == 9) { + Navigator.push(context, FadePage(page: ChildInitialPage())); + locator().hmgServices.logServiceName('my child vaccines'); + } else if (hmgServices.action == 10) { + Navigator.push(context, FadePage(page: InsuranceUpdate())); + locator().hmgServices.logServiceName('update insurance'); + } else if (hmgServices.action == 11) { + Navigator.push(context, FadePage(page: EReferralPage())); + locator().hmgServices.logServiceName('e-referral service'); + } else if (hmgServices.action == 12) { + Navigator.push(context, FadePage(page: H2OPage())); + locator().hmgServices.logServiceName('water consumption'); + } else if (hmgServices.action == 13) { + Navigator.push(context, FadePage(page: (HealthCalculators()))); + locator().hmgServices.logServiceName('health calculator'); + } else if (hmgServices.action == 14) { + Navigator.push(context, FadePage(page: HealthConverter())); + locator().hmgServices.logServiceName('heath converters'); + } else if (hmgServices.action == 15) { + Navigator.pop(context); + LandingPage.shared.switchToDoFromHMGServices(); + locator().hmgServices.logServiceName('todo list'); + } else if (hmgServices.action == 16) { + Navigator.push(context, FadePage(page: BloodDonationPage())); + locator().hmgServices.logServiceName('blood donation'); + } else if (hmgServices.action == 17) { + showCovidDialog(context); + locator().hmgServices.logServiceName('covid-test drive-thru'); + } else if (hmgServices.action == 18) { + launch("https://hmgwebservices.com/vt_mobile/html/index.html"); + locator().hmgServices.logServiceName('virtual tour'); + } else if (hmgServices.action == 19) { + Navigator.push(context, FadePage(page: SmartWatchInstructions())); + locator().hmgServices.logServiceName('smart watches'); + } else if (hmgServices.action == 20) { + Navigator.push(context, FadePage(page: ParkingPage())); + locator().hmgServices.logServiceName('car parcking service'); + } else if (hmgServices.action == 21) { + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context) => MyWebView(title: "HMG News", selectedUrl: "https://twitter.com/hmg" //"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", + ), + ), + ); + locator().hmgServices.logServiceName('latest news'); + } else if (hmgServices.action == 22) { + Navigator.push(context, FadePage(page: ContactUsPage())); + locator().hmgServices.logServiceName('find us reach us'); + } + + // if (hmgServices.action == 10) { + // openLiveCare(context); + // } else if (index == 1) { + // showCovidDialog(context); + // locator().hmgServices.logServiceName('covid-test drive-thru'); + // } else if (index == 2) { + // Navigator.push(context, FadePage(page: PaymentService())); + // locator().hmgServices.logServiceName('online payments'); + // } else if (index == 3) { + // Navigator.push(context, FadePage(page: HomeHealthCarePage())); + // locator().hmgServices.logServiceName('home health care'); + // } else if (index == 4) { + // Navigator.push(context, FadePage(page: CMCPage())); + // locator().hmgServices.logServiceName('comprehensive medical checkup'); + // } else if (index == 5) { + // Navigator.push(context, FadePage(page: ErOptions(isAppbar: true))); + // locator().hmgServices.logServiceName('emergency service'); + // } else if (index == 6) { + // Navigator.push(context, FadePage(page: EReferralPage())); + // locator().hmgServices.logServiceName('e-referral service'); + // } else if (index == 7) { + // Navigator.push(context, FadePage(page: H2OPage())); + // locator().hmgServices.logServiceName('water consumption'); + // } else if (index == 8) { + // Navigator.push(context, FadePage(page: ContactUsPage())); + // locator().hmgServices.logServiceName('find us reach us'); + // } else if (index == 9) { + // Navigator.push( + // context, + // FadePage( + // page: MedicalProfilePageNew(), + // ), + // ); + // locator().hmgServices.logServiceName('my medical details'); + // } else if (index == 10) { + // Navigator.push( + // context, + // FadePage( + // page: Search(), + // ), + // ); + // locator().hmgServices.logServiceName('book appointment'); + // } else if (index == 11) { + // getPharmacyToken(context); + // locator().hmgServices.logServiceName('al habib pharmacy'); + // } else if (index == 12) { + // Navigator.push( + // context, + // FadePage( + // page: InsuranceUpdate(), + // ), + // ); + // locator().hmgServices.logServiceName('update insurance'); + // } else if (index == 13) { + // Navigator.push( + // context, + // FadePage( + // page: MyFamily(), + // ), + // ); + // locator().hmgServices.logServiceName('my family files'); + // } else if (index == 14) { + // Navigator.push( + // context, + // FadePage(page: ChildInitialPage()), + // ); + // locator().hmgServices.logServiceName('my child vaccines'); + // } else if (index == 15) { + // LandingPage.shared.switchToDoFromHMGServices(); + // locator().hmgServices.logServiceName('todo list'); + // } else if (index == 16) { + // Navigator.push( + // context, + // FadePage(page: BloodDonationPage()), + // ); + // locator().hmgServices.logServiceName('blood donation'); + // } else if (index == 17) { + // Navigator.push( + // context, + // FadePage( + // page: (HealthCalculators()), + // ), + // ); + // locator().hmgServices.logServiceName('health calculator'); + // } else if (index == 18) { + // Navigator.push( + // context, + // FadePage( + // page: HealthConverter(), + // ), + // ); + // locator().hmgServices.logServiceName('heath converters'); + // } else if (index == 19) { + // Navigator.push( + // context, + // FadePage(page: SmartWatchInstructions()), + // ); + // locator().hmgServices.logServiceName('smart watches'); + // } else if (index == 20) { + // locator().hmgServices.logServiceName('car parcking service'); + // Navigator.push( + // context, + // FadePage( + // page: ParkingPage(), + // ), + // ); + // } else if (index == 21) { + // launch("https://hmgwebservices.com/vt_mobile/html/index.html"); + // locator().hmgServices.logServiceName('virtual tour'); + // } else if (index == 22) { + // Navigator.of(context).push( + // MaterialPageRoute( + // builder: (BuildContext context) => MyWebView( + // title: "HMG News", + // selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live", + // ), + // ), + // ); + // locator().hmgServices.logServiceName('latest news'); + // } + } + + showCovidDialog(BuildContext context) { + if (Platform.isAndroid) { + showDialog( + context: context, + builder: (cxt) => CovidConsentDialog( + okTitle: TranslationBase.of(context).acceptLbl, + title: TranslationBase.of(context).covidConsentHeader, + message: TranslationBase.of(context).covidConsent, + onTap: () async { + Navigator.push(context, FadePage(page: CovidDrivethruLocation())); + }, + )); + } else { + Navigator.push(context, FadePage(page: CovidDrivethruLocation())); + } + } + + openLiveCare(BuildContext context) { + locator().hmgServices.logServiceName('live care service'); + Navigator.push(context, FadePage(page: LiveCareHome())).then((value) { + LiveCareHome.isLiveCareTypeSelected = false; + }); + } + + getPharmacyToken(BuildContext context) async { + if (!authProvider.isLogin) { + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + } else { + GifLoaderDialogUtils.showMyDialog(context); + await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { + if (pharmacyModuleViewModel.error.isNotEmpty) { + await pharmacyModuleViewModel.createUser().then((value) { + GifLoaderDialogUtils.hideDialog(context); + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + }); + } else { + GifLoaderDialogUtils.hideDialog(context); + Navigator.push(context, FadePage(page: LandingPagePharmacy())); + } + }); + } + } +} diff --git a/lib/pages/landing/widgets/slider_view.dart b/lib/pages/landing/widgets/slider_view.dart new file mode 100644 index 00000000..286706aa --- /dev/null +++ b/lib/pages/landing/widgets/slider_view.dart @@ -0,0 +1,165 @@ +import 'dart:math'; + +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class SliderView extends StatefulWidget { + VoidCallback onLoginClick; + + SliderView({required this.onLoginClick}); + + @override + State createState() => _SliderViewState(); +} + +class _SliderViewState extends State { + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return Container( + decoration: cardRadius(20), + margin: EdgeInsets.all(0), + child: Container( + decoration: cardRadius(20, color: Color(0xFFF2B353E)), + clipBehavior: Clip.antiAlias, + margin: EdgeInsets.zero, + + // padding: EdgeInsets.zero, + child: Container( + width: double.infinity, + height: double.infinity, + clipBehavior: Clip.antiAlias, + margin: EdgeInsets.zero, + decoration: projectViewModel.isArabic + ? containerBottomRightRadiusWithGradientForAr(MediaQuery.of(context).size.width / 4) + : containerBottomRightRadiusWithGradient(MediaQuery.of(context).size.width / 4), + child: Card( + color: Colors.transparent, + margin: EdgeInsets.zero, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + mFlex(3), + Container( + decoration: projectViewModel.isArabic ? containerColorRadiusLeft(Color(0xFFFBF2E31), 100) : containerColorRadiusRight(Color(0xFFFBF2E31), 100), + padding: EdgeInsets.only(left: projectViewModel.isArabic ? 16 : 20, right: projectViewModel.isArabic ? 20 : 16, top: 6, bottom: 6), + child: Text( + TranslationBase.of(context).medicalFile, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 10, + letterSpacing: -0.3, + height: 1.2, + ), + ), + ), + mFlex(2), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).cantSeeProfile, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 17, + letterSpacing: -0.25, + height: 25 / 17, + ), + ), + // Text( + // TranslationBase.of(context).loginRegisterNow, + // style: TextStyle( + // color: Colors.white, + // fontSize: 12, + // letterSpacing: -0.36, + // height: 1, + // ), + // ), + ], + ), + ), + mFlex(2), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20), + child: Container( + height: MediaQuery.of(context).size.width / 14, + width: MediaQuery.of(context).size.width / (projectViewModel.isArabic ? 4 : 6), + child: CustomTextButton( + shape: cardRadiusNew(8), + //shape: OutlinedBorder(), + backgroundColor: Color(0xFFFBF2E31), + elevation: 0, + onPressed: () { + + widget.onLoginClick(); + }, + child: Center( + child: AutoSizeText( + TranslationBase.of(context).login, + maxLines: 1, + style: TextStyle( + color: Colors.white, + fontSize: 13, + letterSpacing: -0.39, + height: 1, + ), + ), + ), + ), + ), + ), + mFlex(3), + ], + ), + ), + ), + ), + ); + } +} + +class CurvedBottomClipper extends CustomClipper { + @override + Path getClip(Size size) { + // I've taken approximate height of curved part of view + // Change it if you have exact spec for it + final roundingHeight = size.height * 3 / 5; + + // this is top part of path, rectangle without any rounding + final filledRectangle = Rect.fromLTRB(0, 0, size.width, size.height - roundingHeight); + + // this is rectangle that will be used to draw arc + // arc is drawn from center of this rectangle, so it's height has to be twice roundingHeight + // also I made it to go 5 units out of screen on left and right, so curve will have some incline there + final roundingRectangle = Rect.fromLTRB(-size.width, size.height - roundingHeight * 2, size.width, size.height); + + final path = Path(); + path.addRect(filledRectangle); + + // so as I wrote before: arc is drawn from center of roundingRectangle + // 2nd and 3rd arguments are angles from center to arc start and end points + // 4th argument is set to true to move path to rectangle center, so we don't have to move it manually + path.arcTo(roundingRectangle, pi, -pi, true); + path.close(); + + return path; + } + + @override + bool shouldReclip(CustomClipper oldClipper) { + // returning fixed 'true' value here for simplicity, it's not the part of actual question, please read docs if you want to dig into it + // basically that means that clipping will be redrawn on any changes + return true; + } +} diff --git a/lib/pages/livecare/clinic_timings_page.dart b/lib/pages/livecare/clinic_timings_page.dart new file mode 100644 index 00000000..781dfbe3 --- /dev/null +++ b/lib/pages/livecare/clinic_timings_page.dart @@ -0,0 +1,118 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/ClinicsServiceTimingsResponse.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class ClinicTimingsPage extends StatefulWidget { + final clinicName; + final List patientERGetClinicsServiceTimingsList; + + ClinicTimingsPage({required this.clinicName, required this.patientERGetClinicsServiceTimingsList}); + + @override + _LiveCarePatmentPageState createState() => _LiveCarePatmentPageState(); +} + +class _LiveCarePatmentPageState extends State { + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).clinicSchedule, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + description: TranslationBase.of(context).erConsultation, + body: Container( + width: double.infinity, + height: double.infinity, + child: Column( + children: [ + Expanded( + child: ListView.separated( + itemBuilder: (context, index) { + return Padding( + padding: EdgeInsets.only(top: index == 0 ? 12 : 0, bottom: (index == widget.patientERGetClinicsServiceTimingsList.length - 1) ? 12 : 0), + child: showItem(widget.patientERGetClinicsServiceTimingsList[index]), + ); + }, + separatorBuilder: (context, index) { + return mHeight(12); + }, + itemCount: widget.patientERGetClinicsServiceTimingsList.length, + ), + ), + Container( + width: double.infinity, + padding: EdgeInsets.all(12), + color: Colors.white, + child: DefaultButton( + TranslationBase.of(context).back, + () { + Navigator.pop(context); + }, + ), + ), + ], + ), + ), + ); + } + + Widget showItem(PatientERGetClinicsServiceTimingsList item) { + return Container( + width: double.infinity, + padding: EdgeInsets.only(left: 12, right: 12), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 2, + child: Text( + item.dayOfWeekStr!, + style: TextStyle( + fontSize: 18, + letterSpacing: -0.72, + fontWeight: FontWeight.bold, + ), + ), + ), + Expanded( + flex: 4, + child: Container( + width: double.infinity, + decoration: cardRadius(12), + padding: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + for (int i = 0; i < item.shiftTimings!.length; i++) + Text( + TranslationBase.of(context).from + " " + item.shiftTimings![i].startTime! + " " + TranslationBase.of(context).to + " " + item.shiftTimings![i].endTime!, + style: TextStyle( + fontSize: 13, + letterSpacing: -0.42, + fontWeight: FontWeight.w600, + ), + ) + ], + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/livecare/incoming_call.dart b/lib/pages/livecare/incoming_call.dart new file mode 100644 index 00000000..c7b574f0 --- /dev/null +++ b/lib/pages/livecare/incoming_call.dart @@ -0,0 +1,286 @@ +import 'dart:ui'; + +import 'package:camera/camera.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart'; +import 'package:diplomaticquarterapp/pages/conference/widgets/platform_exception_alert_dialog.dart'; +import 'package:diplomaticquarterapp/pages/conference/zoom/call_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/webrtc/start_video_call.dart'; +import 'package:diplomaticquarterapp/pages/webRTC/OpenTok/OpenTok.dart'; +import 'package:diplomaticquarterapp/pages/webRTC/signaling.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:just_audio/just_audio.dart'; + +import '../../config/config.dart'; + +class IncomingCall extends StatefulWidget { + IncomingCallData? incomingCallData; + + IncomingCall({this.incomingCallData}); + + @override + _IncomingCallState createState() => _IncomingCallState(); +} + +class _IncomingCallState extends State with SingleTickerProviderStateMixin { + late AnimationController _animationController; + bool openCallInWeb = true; + + final player = AudioPlayer(); + late CameraController _controller; + late Future _initializeControllerFuture; + bool isCameraReady = false; + + // Signaling signaling = Signaling()..init(); + + @override + void initState() { + _animationController = AnimationController(vsync: this, duration: Duration(milliseconds: 500)); + isCameraReady = false; + + WidgetsBinding.instance.addPostFrameCallback((_) => _runAnimation()); + super.initState(); + } + + @override + void dispose() { + _animationController.dispose(); + player.stop(); + // _controller.dispose(); + disposeAudioResources(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: false, + isShowDecPage: false, + body: Stack(alignment: FractionalOffset.center, children: [ + // new Positioned.fill( + // child: new AspectRatio(aspectRatio: _controller.value.aspectRatio, child: new CameraPreview(_controller)), + // ), + new Positioned.fill( + child: new ClipRect( + // child: new BackdropFilter( + // filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), + child: new Container( + decoration: new BoxDecoration(color: Colors.grey[800]!.withOpacity(0.8)), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Container( + margin: const EdgeInsets.all(21.0), + child: Row( + children: [ + Image.asset( + "assets/images/new/logo.png", + height: 70, + width: 70, + ), + Container( + margin: const EdgeInsets.only(left: 10.0, right: 10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Text( + widget.incomingCallData!.doctorname!, + style: TextStyle(fontSize: 21, fontWeight: FontWeight.bold, color: Colors.white, letterSpacing: -1.26, height: 23 / 12), + ), + Text( + TranslationBase.of(context).videoAppo, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xffC6C6C6), letterSpacing: -0.48, height: 23 / 24), + ), + SizedBox(height: 2), + ], + ), + ), + ], + ), + ), + Container( + margin: const EdgeInsets.all(21.0), + width: MediaQuery.of(context).size.width, + decoration: cardRadius(15.0, color: Colors.black), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Container( + padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 6.0), + child: Text( + TranslationBase.of(context).appoInfo, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 23 / 12), + ), + ), + Container( + padding: const EdgeInsets.only(left: 16.0, right: 16.0), + child: Text( + widget.incomingCallData!.appointmentdate! + ", " + widget.incomingCallData!.appointmenttime!, + style: TextStyle(fontSize: 12.0, letterSpacing: -0.48, color: Color(0xff8E8E8E), fontWeight: FontWeight.w600), + ), + ), + Container( + padding: const EdgeInsets.only(left: 16.0, right: 16.0, bottom: 21.0), + child: Text( + widget.incomingCallData!.clinicname!, + style: TextStyle(fontSize: 12.0, letterSpacing: -0.48, color: Color(0xff8E8E8E), fontWeight: FontWeight.w600), + ), + ), + ], + ), + ), + Spacer(), + Container( + margin: EdgeInsets.only(bottom: 70.0, left: 49, right: 49), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + RotationTransition( + turns: Tween(begin: 0.0, end: -.1).chain(CurveTween(curve: Curves.elasticIn)).animate(_animationController), + child: Container( + child: RawMaterialButton( + onPressed: () { + _submit(); + }, + elevation: 2.0, + fillColor: Colors.green, + child: Icon( + Icons.call, + color: Colors.white, + size: 35.0, + ), + padding: EdgeInsets.all(15.0), + shape: CircleBorder(), + ), + )), + Container( + child: RawMaterialButton( + onPressed: () { + backToHome(); + }, + elevation: 2.0, + fillColor: Colors.red, + child: Icon( + Icons.call_end, + color: Colors.white, + size: 35.0, + ), + padding: EdgeInsets.all(15.0), + shape: CircleBorder(), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ), + // ), + ] + // } else { + // return const Center(child: CircularProgressIndicator()); + // } + ), + ); + } + + void _runAnimation() async { + setState(() { + isCameraReady = true; + }); + + setAudioFile(); + for (int i = 0; i < 100; i++) { + await _animationController.forward(); + await _animationController.reverse(); + } + } + + Future _submit() async { + try { + // backToHome(); + // final roomModel = RoomModel(name: widget.incomingCallData.name, token: widget.incomingCallData.sessionId, identity: widget.incomingCallData.identity); + // await _controller.dispose(); + + LandingPage.isOpenCallPage = false; + player.stop(); + changeCallStatusAPI(4); + + if (widget.incomingCallData!.background == "0") { + // Zoom Call Page + // Navigator.of(context).pop(); + Navigator.pushReplacementNamed( + context, + "zoom_call_page", + arguments: CallArguments(widget.incomingCallData!.sessionId!, "123", "Patient", "40", "0", false, int.parse(widget.incomingCallData!.appointmentNo!)), + ); + } else { + // OpenTok Call Page + await Navigator.of(context).pushReplacement( + MaterialPageRoute( + // fullscreenDialog: true, + builder: (BuildContext context) { + // final caller = widget.incomingCallData.callerID; + // final receiver = widget.incomingCallData.receiverID; + // final host = widget.incomingCallData.server; + // if(widget.incomingCallData.isWebRTC == "true"){ + // return StartVideoCall(caller: caller, receiver: receiver, iAmCaller: false, host: host); + // }else{ + return OpenTokConnectCallPage(apiKey: OPENTOK_API_KEY, sessionId: widget.incomingCallData!.sessionId!, token: widget.incomingCallData!.token!); + }, + ), + ); + } + } catch (err) { + print(err); + await PlatformExceptionAlertDialog( + exception: Exception(err), + ).show(context); + } + } + + void changeCallStatusAPI(int sessionStatus) { + LiveCareService service = new LiveCareService(); + service.endCallAPI(widget.incomingCallData!.sessionId!, sessionStatus, context).then((res) {}).catchError((err) { + print(err); + }); + } + + void backToHome() async { + // final connected = await signaling.declineCall(widget.incomingCallData.callerID, widget.incomingCallData.receiverID); + LandingPage.isOpenCallPage = false; + player.stop(); + changeCallStatusAPI(3); + Navigator.of(context).pop(); + } + + disposeAudioResources() async { + await player.dispose(); + } + + void setAudioFile() async { + player.stop(); + await player.setVolume(1.0); // full volume + try { + await player.setAsset('assets/sounds/ring_60Sec.mp3').then((value) { + player.setLoopMode(LoopMode.one); // loop ring sound + player.play(); + }).catchError((err) { + print("Error: $err"); + }); + } catch (e) { + print("Error: $e"); + } + } +} diff --git a/lib/pages/livecare/live_care_payment_page.dart b/lib/pages/livecare/live_care_payment_page.dart new file mode 100644 index 00000000..1affe418 --- /dev/null +++ b/lib/pages/livecare/live_care_payment_page.dart @@ -0,0 +1,603 @@ +import 'dart:io'; + +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/livecare/live_care_user_agreement_page.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.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:flutter_svg/flutter_svg.dart'; +import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class LiveCarePatmentPage extends StatefulWidget { + GetERAppointmentFeesList getERAppointmentFeesList; + int waitingTime; + String clinicName; + bool isPharmaLiveCare; + String pharmaLiveCareClientID; + int selectedCallType; + + LiveCarePatmentPage( + {required this.getERAppointmentFeesList, required this.waitingTime, required this.clinicName, this.isPharmaLiveCare = false, this.pharmaLiveCareClientID = "", required this.selectedCallType}); + + @override + _LiveCarePatmentPageState createState() => _LiveCarePatmentPageState(); +} + +class _LiveCarePatmentPageState extends State { + int _selected = 0; + + late ProjectViewModel projectViewModel; + late LocationUtils locationUtils; + + @override + Widget build(BuildContext context) { + var size = MediaQuery.of(context).size; + final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.42) / 2; + final double itemWidth = size.width / 2; + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).livecare, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + description: TranslationBase.of(context).erConsultation, + onTap: () { + //Navigator.pop(context); + Navigator.pop(context); + }, + body: Container( + width: double.infinity, + height: double.infinity, + child: Column( + children: [ + Expanded( + child: Padding( + padding: EdgeInsets.all(21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Text( + widget.clinicName, + style: TextStyle( + fontSize: 19.0, + fontWeight: FontWeight.bold, + letterSpacing: -1.44, + ), + ), + mHeight(8), + Text( + TranslationBase.of(context).expectedWaiting, + textAlign: TextAlign.end, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + color: CustomColors.textColor, + ), + ), + Text( + widget.waitingTime.toString() + " " + TranslationBase.of(context).minute, + textAlign: TextAlign.start, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + color: CustomColors.accentColor, + letterSpacing: -0.66, + ), + ), + mHeight(16), + Container( + decoration: cardRadius(12), + padding: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).erConsultFee, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + mHeight(10), + Row( + children: [ + Expanded( + child: Text( + TranslationBase.of(context).patientShareToDo, + style: TextStyle( + fontSize: 10, + letterSpacing: -0.4, + color: CustomColors.textColor, + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: (widget.getERAppointmentFeesList.currency! == "ريال" || widget.getERAppointmentFeesList.currency! == "SAR") + ? Row( + children: [ + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + widget.getERAppointmentFeesList.amount!, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ) + : Text( + widget.getERAppointmentFeesList.amount! + " " + widget.getERAppointmentFeesList.currency!, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ), + ], + ), + mHeight(4), + mDivider(CustomColors.lightGreyColor), + mHeight(4), + Row( + children: [ + Expanded( + child: Text( + TranslationBase.of(context).patientTaxToDo, + style: TextStyle( + fontSize: 10, + letterSpacing: -0.4, + color: CustomColors.textColor, + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: (widget.getERAppointmentFeesList.currency! == "ريال" || widget.getERAppointmentFeesList.currency! == "SAR") + ? Row( + children: [ + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + widget.getERAppointmentFeesList.tax!, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ) + : Text( + widget.getERAppointmentFeesList.tax! + " " + widget.getERAppointmentFeesList.currency!, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ), + ], + ), + mHeight(4), + mDivider(CustomColors.lightGreyColor), + mHeight(4), + Row( + children: [ + Expanded( + child: Text( + TranslationBase.of(context).patientShareTotalToDo, + style: TextStyle( + fontSize: 10, + letterSpacing: -0.4, + color: CustomColors.textColor, + fontWeight: FontWeight.w600, + ), + ), + ), + Expanded( + child: (widget.getERAppointmentFeesList.currency! == "ريال" || widget.getERAppointmentFeesList.currency! == "SAR") + ? Row( + children: [ + projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + widget.getERAppointmentFeesList.total!, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + mWidth(6), + projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) : Container(), + ], + ) + : Text( + widget.getERAppointmentFeesList.total! + " " + widget.getERAppointmentFeesList.currency!, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ), + ], + ), + ], + ), + ), + mHeight(12), + Container( + padding: EdgeInsets.all(12), + decoration: cardRadius(12), + child: Row( + children: [ + SvgPicture.asset( + "assets/images/new/services/raise_comp.svg", + color: CustomColors.green, + width: 18, + height: 18, + ), + mWidth(10), + Expanded( + child: Text( + TranslationBase.of(context).insuredPatient, + style: TextStyle( + fontSize: 10.0, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + ), + ], + ), + ), + // mHeight(0.0), + Container( + margin: EdgeInsets.only(top: 16.0), + child: Row( + children: [ + Radio( + value: 1, + groupValue: _selected, + onChanged: (val) { + onRadioChanged(val!); + }, + ), + Text( + TranslationBase.of(context).agreeTo, + style: new TextStyle( + fontSize: 12.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + color: CustomColors.textColor, + ), + ), + mWidth(4), + InkWell( + onTap: () { + Navigator.of(context).push(FadePage(page: LiveCareUserAgreementPage())); + // launchUrl(Uri.parse( + // "https://hmg.com/en/Pages/Privacy.aspx", + // )); + }, + child: Text( + TranslationBase.of(context).termsConditoins, + style: new TextStyle( + fontSize: 12.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + color: CustomColors.accentColor, + ), + ), + ), + ], + ), + ), + AutoSizeText( + TranslationBase.of(context).selectedCallType, + maxLines: 1, + minFontSize: 12, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 2.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.39, + height: 0.8, + ), + ), + mHeight(12.0), + Row( + children: [ + SvgPicture.asset( + getCallTypeImagePath(), + width: 18, + height: 18, + ), + mWidth(10), + Text( + getCallTypeText(), + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + mFlex(1), + Text( + TranslationBase.of(context).upComingPayOption, + style: new TextStyle( + fontSize: 12.0, + letterSpacing: -0.36, + fontWeight: FontWeight.w600, + ), + ), + Container( + margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0), + child: getPaymentMethods(), + ), + ], + ), + ), + ), + Container( + padding: EdgeInsets.all(12), + color: Colors.white, + child: Column( + children: [ + Flex( + direction: Axis.horizontal, + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).cancel, + () { + if (widget.isPharmaLiveCare) cancelAPI(); + Navigator.pop(context, false); + }, + ), + ), + mWidth(12), + Expanded( + child: DefaultButton( + TranslationBase.of(context).next, + () { + if (_selected == 0) { + AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms); + } else { + if (widget.isPharmaLiveCare) { + Navigator.pop(context, true); + } else { + askVideoCallPermission().then((value) async { + if (value == true) { + locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context); + locationUtils.getCurrentLocation(callBack: (value) { + print(value); + }); + if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) { + await drawOverAppsMessageDialog(context).then((value) { + return false; + }); + } else { + Navigator.pop(context, true); + projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName); + } + } else { + openPermissionsDialog(); + } + }); + } + } + }, + color: CustomColors.green, + ), + ), + ], + ), + widget.getERAppointmentFeesList.isCash! + ? Column( + children: [ + mHeight(10.0), + Text( + TranslationBase.of(context).cashAmountUpdateInsurance, + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + ), + ), + mHeight(5.0), + DefaultButton( + TranslationBase.of(context).updateInsuranceText, + () { + Navigator.pop(context, null); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ).then((value) { + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }); + }, + color: Color(0xffEAA118), + textColor: Colors.white, + ), + ], + ) + : Container(), + ], + ), + ), + ], + ), + ), + ); + } + + String getCallTypeImagePath() { + String callTypeImagePath = ""; + switch (widget.selectedCallType) { + case 1: + callTypeImagePath = "assets/images/new/services/video_call.svg"; + break; + case 2: + callTypeImagePath = "assets/images/new/services/audio_call.svg"; + break; + case 3: + callTypeImagePath = "assets/images/new/services/phone_call.svg"; + break; + } + return callTypeImagePath; + } + + String getCallTypeText() { + String callTypeText = ""; + switch (widget.selectedCallType) { + case 1: + callTypeText = TranslationBase.of(context).videoCall; + break; + case 2: + callTypeText = TranslationBase.of(context).audioCall; + break; + case 3: + callTypeText = TranslationBase.of(context).phoneCall; + break; + } + return callTypeText; + } + + @override + void dispose() { + // cancelAPI(); + super.dispose(); + } + + Future askVideoCallPermission() async { + bool result = false; + if (Platform.isIOS) { + if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted) || !(await Permission.location.request().isGranted)) { + result = false; + } + } else { + await showDialog( + context: context, + builder: (cxt) => CovidConsentDialog( + okTitle: TranslationBase.of(context).acceptLbl, + title: TranslationBase.of(context).covidConsentHeader, + message: TranslationBase.of(context).liveCarePermissions, + onTap: () async { + if (!(await Permission.notification.request().isGranted) || + !(await Permission.camera.request().isGranted) || + !(await Permission.microphone.request().isGranted) || + !(await Permission.location.request().isGranted)) { + { + result = false; + } + } + }, + )); + } + result = true; + return result; + // if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted) || !(await Permission.location.request().isGranted)) { + // return false; + // } + // return true; + } + + openPermissionsDialog() { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).liveCarePermissions, + okText: TranslationBase.of(context).settings, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () async { + openAppSettings(); + Navigator.pop(context); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + + openPermissionsConsentDialog() { + showDialog( + context: context, + builder: (cxt) => CovidConsentDialog( + okTitle: TranslationBase.of(context).acceptLbl, + title: TranslationBase.of(context).covidConsentHeader, + message: TranslationBase.of(context).covidConsent, + onTap: () async {}, + )); + } + + Future drawOverAppsMessageDialog(BuildContext context) async { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).drawOverAppsPermission, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () async { + await PlatformBridge.shared().askDrawOverAppsPermission(); + Navigator.pop(context); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + + void cancelAPI() { + LiveCareService service = new LiveCareService(); + service.cancelPharmaLiveCareRequest(widget.pharmaLiveCareClientID, context).then((res) {}).catchError((err) { + print(err); + }); + } + + onRadioChanged(int value) { + setState(() { + _selected = value; + }); + } + + _getNormalText(text) { + return Container( + margin: EdgeInsets.only(top: 10.0, right: 10.0), + child: Text(text, textAlign: TextAlign.start, style: TextStyle(fontSize: 14, letterSpacing: 0.5, color: Colors.black)), + ); + } + + _getMarginText(text) { + return Container( + margin: EdgeInsets.only(top: 10.0, right: 10.0, bottom: 10.0), + child: Text(text, textAlign: TextAlign.start, style: TextStyle(fontSize: 14, letterSpacing: 0.5, fontWeight: FontWeight.bold, color: Colors.black)), + ); + } +} diff --git a/lib/pages/livecare/live_care_user_agreement_page.dart b/lib/pages/livecare/live_care_user_agreement_page.dart new file mode 100644 index 00000000..675bf6d3 --- /dev/null +++ b/lib/pages/livecare/live_care_user_agreement_page.dart @@ -0,0 +1,462 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class LiveCareUserAgreementPage extends StatefulWidget { + const LiveCareUserAgreementPage({super.key}); + + @override + State createState() => _LiveCareUserAgreementPageState(); +} + +class _LiveCareUserAgreementPageState extends State { + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).termsConditions, + body: SingleChildScrollView( + child: Padding( + padding: EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).liveCareTermsHeading, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsIntroHeading, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions1, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions2, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsHeading2, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions3, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions3a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions3b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions3c, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions3d, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions4, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions5, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions6, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsHeading3, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions7, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions8, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions9, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions10, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions11, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions12, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions13, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsHeading4, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions14, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions15, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions16, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsHeading5, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions17, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + + Text( + TranslationBase.of(context).liveCareTermsConditions18, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions19, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions19a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions19b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions19c, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions19d, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions19e, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions20, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsHeading6, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions21, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions22, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions23, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsHeading7, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions24, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions25, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions26, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions27, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions28, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions29, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions30, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsHeading8, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions31, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsHeading9, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions32, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions33, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions34, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions35, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsHeading10, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions36, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsHeading11, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions37, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions38, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsHeading12, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions39, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions40, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions41, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsHeading13, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions42, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsHeading14, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions43, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions43a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions43b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions43c, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions43d, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions43e, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions43f, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions43g, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsHeading15, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions44, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions45, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions46, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsHeading16, + style: TextStyle( + fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions47, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).liveCareTermsConditions48, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/livecare/livecare_call_type_select.dart b/lib/pages/livecare/livecare_call_type_select.dart new file mode 100644 index 00000000..5592ee34 --- /dev/null +++ b/lib/pages/livecare/livecare_call_type_select.dart @@ -0,0 +1,146 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class LiveCareCallTypeSelectPage extends StatefulWidget { + Function onSelectedMethod; + + LiveCareCallTypeSelectPage({required this.onSelectedMethod}); + + @override + State createState() => _LiveCareCallTypeSelectPageState(); +} + +class _LiveCareCallTypeSelectPageState extends State { + int selectedCallType = 1; + String mobileNo = ""; + String countryCode = '966'; + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + mobileNo = Utils.getPhoneNumberWithoutZero(projectViewModel.authenticatedUserObject.user.mobileNumber!); + return AppScaffold( + appBarTitle: TranslationBase.of(context).selectCallType, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Padding( + padding: EdgeInsets.all(21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + GridView( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + children: [ + InkWell( + onTap: () { + setState(() { + selectedCallType = 1; + }); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).videoCall, + imagePath: 'video_call.svg', + subTitle: "", + isPngImage: false, + isShowBorder: selectedCallType == 1, + ), + ), + InkWell( + onTap: () { + setState(() { + selectedCallType = 2; + }); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).audioCall, + imagePath: 'audio_call.svg', + subTitle: "", + isPngImage: false, + isShowBorder: selectedCallType == 2, + ), + ), + InkWell( + onTap: () { + setState(() { + selectedCallType = 3; + }); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).phoneCall, + imagePath: 'phone_call.svg', + subTitle: "", + isPngImage: false, + isShowBorder: selectedCallType == 3, + ), + ), + ], + ), + if (selectedCallType == 3) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + mHeight(32.0), + AutoSizeText( + TranslationBase.of(context).mobileNumber, + maxLines: 1, + minFontSize: 12, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 2.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.39, + height: 0.8, + ), + ), + mHeight(16.0), + PhoneNumberSelectorWidget( + onNumberChange: (value) => { + mobileNo = value, + }, + onCountryChange: (value) => { + countryCode = value, + }, + mobileNo: this.mobileNo, + isLiveCareTypeSelect: true, + isEnable: false, + ), + ], + ), + ], + ), + ), + bottomSheet: Container( + color: CustomColors.white, + padding: EdgeInsets.fromLTRB(12.0, 1.0, 12.0, 25.0), + child: DefaultButton( + TranslationBase.of(context).next, + () { + if (mobileNo.isNotEmpty) { + widget.onSelectedMethod(selectedCallType, mobileNo); + Navigator.pop(context, [selectedCallType, mobileNo]); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).enterMobileNumber); + } + }, + color: CustomColors.accentColor, + ), + ), + ); + } +} diff --git a/lib/pages/livecare/livecare_home.dart b/lib/pages/livecare/livecare_home.dart new file mode 100644 index 00000000..6381ce8a --- /dev/null +++ b/lib/pages/livecare/livecare_home.dart @@ -0,0 +1,178 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart'; +import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingRequest.dart'; +import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart'; +import 'package:diplomaticquarterapp/pages/livecare/widgets/livecare_logs.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class LiveCareHome extends StatefulWidget { + static bool showFooterButton = true; + static bool isLiveCareTypeSelected = false; + final bool isPharmacyLiveCare; + final String pharmacyLiveCareQRCode; + + const LiveCareHome({Key? key, this.isPharmacyLiveCare = false, this.pharmacyLiveCareQRCode = ""}) : super(key: key); + + @override + _LiveCareHomeState createState() => _LiveCareHomeState(); +} + +class _LiveCareHomeState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + + bool isDataLoaded = false; + bool hasLiveCareRequest = false; + List imagesInfo =[]; + + late List erRequestHistoryList; + + late ErRequestHistoryList pendingERRequestHistoryList; + + late ProjectViewModel projectViewModel; + AppSharedPreferences sharedPref = AppSharedPreferences(); + + @override + void initState() { + _tabController = new TabController(length: 2, vsync: this); + erRequestHistoryList =[]; + LiveCareHome.isLiveCareTypeSelected = false; + pendingERRequestHistoryList = new ErRequestHistoryList(); + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_ar/ar/0.png')); + WidgetsBinding.instance.addPostFrameCallback((_) { + if (!isDataLoaded && projectViewModel.isLogin) getLiveCareHistory(); + }); + + super.initState(); + } + + @override + void dispose() { + LiveCareHome.isLiveCareTypeSelected = false; + sharedPref.remove(LIVECARE_CLINIC_DATA); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).livecare, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + imagesInfo: imagesInfo, + description: TranslationBase.of(context).erConsultation, + body: Container( + child: Column(children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 0, bottom: 0, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [ + Tab( + child: Text( + TranslationBase.of(context).consultation, + style: TextStyle( + color: Colors.black, + fontSize: 14, + letterSpacing: -0.36, + fontWeight: FontWeight.w600, + ), + ), + ), + Tab( + child: Text( + TranslationBase.of(context).logs, + style: TextStyle( + color: Colors.black, + fontSize: 14, + letterSpacing: -0.36, + fontWeight: FontWeight.w600, + ), + ), + ), + ], + ), + Expanded( + child: TabBarView( + physics: NeverScrollableScrollPhysics(), + children: [ + isDataLoaded && !hasLiveCareRequest + ? ClinicList( + getLiveCareHistory: getLiveCareHistory, + isPharmacyLiveCare: widget.isPharmacyLiveCare, + pharmacyLiveCareQRCode: widget.pharmacyLiveCareQRCode, + ) + : isDataLoaded + ? LiveCarePendingRequest(getLiveCareHistory: getLiveCareHistory, pendingERRequestHistoryList: pendingERRequestHistoryList) + : Container(), + isDataLoaded + ? LiveCareLogs( + erRequestHistoryList: erRequestHistoryList, + ) + : Container(), + ], + controller: _tabController, + ), + ), + ]), + ), + ); + } + + void getLiveCareHistory() { + GifLoaderDialogUtils.showMyDialog(context); + setState(() { + isDataLoaded = false; + hasLiveCareRequest = false; + }); + LiveCareService service = new LiveCareService(); + PatientERVirtualHistoryResponse patientERVirtualHistoryResponse = new PatientERVirtualHistoryResponse(); + service.getLivecareHistory(context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + setState(() { + if (res['ErRequestHistoryList'].length != 0) { + patientERVirtualHistoryResponse = PatientERVirtualHistoryResponse.fromJson(res as Map); + erRequestHistoryList = patientERVirtualHistoryResponse.erRequestHistoryList!; + + if (patientERVirtualHistoryResponse.erRequestHistoryList![0].callStatus! < 4) { + pendingERRequestHistoryList = patientERVirtualHistoryResponse.erRequestHistoryList![0]; + hasLiveCareRequest = true; + } else { + hasLiveCareRequest = false; + } + } + isDataLoaded = true; + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err, localContext: context); + print(err); + }); + } +} diff --git a/lib/pages/livecare/livecare_scheduling/livecare_scheduling_clinic_list.dart b/lib/pages/livecare/livecare_scheduling/livecare_scheduling_clinic_list.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/pages/livecare/livecare_scheduling/schedule_clinic_card.dart b/lib/pages/livecare/livecare_scheduling/schedule_clinic_card.dart new file mode 100644 index 00000000..1006dc86 --- /dev/null +++ b/lib/pages/livecare/livecare_scheduling/schedule_clinic_card.dart @@ -0,0 +1,90 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/LiveCareScheduleClinicsListResponse.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class ScheduleClinicCard extends StatefulWidget { + bool? isSelected; + final ClinicsHaveScheduleList clinicsHaveScheduleList; + var languageID; + + ScheduleClinicCard({this.isSelected, this.languageID, required this.clinicsHaveScheduleList}); + + @override + _ScheduleClinicCardState createState() => _ScheduleClinicCardState(); +} + +class _ScheduleClinicCardState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Container( + width: double.infinity, + margin: EdgeInsets.fromLTRB(15.0, 0.0, 15.0, 8.0), + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: Border.all(width: widget.isSelected! ? 3 : 0, color: widget.isSelected! ? CustomColors.green : Colors.transparent), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.transparent, + ), + child: Container( + decoration: BoxDecoration( + color: CustomColors.green, + borderRadius: BorderRadius.all( + Radius.circular(6.0), + ), + ), + child: Container( + margin: EdgeInsets.only( + left: projectViewModel.isArabic + ? 0 + : widget.isSelected! + ? 4 + : 6, + right: projectViewModel.isArabic + ? widget.isSelected! + ? 4 + : 6 + : 0), + padding: EdgeInsets.symmetric(vertical: 10, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Container( + child: Text( + widget.clinicsHaveScheduleList.clinicDesc ?? "", + style: TextStyle( + fontSize: 16.0, + color: Colors.black, + fontWeight: FontWeight.w600, + ), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/livecare/livecare_type_select.dart b/lib/pages/livecare/livecare_type_select.dart new file mode 100644 index 00000000..f3900c5e --- /dev/null +++ b/lib/pages/livecare/livecare_type_select.dart @@ -0,0 +1,227 @@ +import 'package:barcode_scan2/barcode_scan2.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/livecare/pharma_livecare_intro_page.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class LiveCareTypeSelect extends StatefulWidget { + @override + _LiveCareTypeSelectState createState() => _LiveCareTypeSelectState(); +} + +class _LiveCareTypeSelectState extends State { + var languageID; + AppSharedPreferences sharedPref = AppSharedPreferences(); + + late ProjectViewModel projectViewModel; + String pharmacyLiveCareQRCode = ""; + + @override + void initState() { + getLanguageID(); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowDecPage: true, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).livecare.toUpperCase(), + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 20.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container(child: Text(TranslationBase.of(context).livecareService, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + margin: EdgeInsets.only(top: 7.0), + child: Text(TranslationBase.of(context).livecareServiceDesc, style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))), + Container( + margin: EdgeInsets.only(top: 20.0), + child: Text(TranslationBase.of(context).whyLivecare, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + child: Row( + children: [ + SvgPicture.asset("assets/images/new-design/allow.svg", width: 20), + Container( + width: MediaQuery.of(context).size.width * 0.72, + margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), + child: Text(TranslationBase.of(context).livecarePoint1, + overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0, letterSpacing: -0.64, color: CustomColors.black, fontWeight: FontWeight.w600)), + ) + ], + ), + ), + Container( + child: Row( + children: [ + SvgPicture.asset("assets/images/new-design/allow.svg", width: 20), + Container( + width: MediaQuery.of(context).size.width * 0.72, + margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), + child: Text(TranslationBase.of(context).docVirtualAppoIns4, + overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0, letterSpacing: -0.64, color: CustomColors.black, fontWeight: FontWeight.w600)), + ) + ], + ), + ), + Container( + child: Row( + children: [ + SvgPicture.asset("assets/images/new-design/allow.svg", width: 20), + Container( + width: MediaQuery.of(context).size.width * 0.72, + margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), + child: Text(TranslationBase.of(context).docVirtualAppoIns5, + overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0, letterSpacing: -0.64, color: CustomColors.black, fontWeight: FontWeight.w600)), + ) + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 20.0), + child: Text(TranslationBase.of(context).livecareSummary, style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))), + GridView( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9), + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(top: 40.0), + shrinkWrap: true, + children: [ + _loginOptionButton(TranslationBase.of(context).livecareOption1, 'assets/images/new/Live_Care.svg', 1), + _loginOptionButton(TranslationBase.of(context).livecareOption4, 'assets/images/new/book appointment.svg', 2), + _loginOptionButton(TranslationBase.of(context).pharmaLiveCare, 'assets/images/new/pharma.svg', 3, isEnable: projectViewModel.havePrivilege(99)), + ], + ), + SizedBox( + height: 40.0, + ), + ], + ), + ), + ), + ); + } + + Widget _loginOptionButton(String _title, String _icon, int _loginIndex, {bool isEnable = true}) { + return InkWell( + onTap: () { + if (_loginIndex == 1) { + Navigator.pop(context, "immediate"); + projectViewModel.analytics.liveCare.livecare_immediate_consultation(); + } else if (_loginIndex == 2) { + Navigator.pop(context, "schedule"); + projectViewModel.analytics.liveCare.livecare_schedule_video_call(); + } else { + //Pharmacy LiveCare + if (isEnable) { + Navigator.push( + context, + FadePage( + page: PharmaLiveCareIntroPage(), + ), + ).then((value) { + if (value != null && value.contains("pharmacy/")) { + pharmacyLiveCareQRCode = value.split("/")[1]; + startPharmacyLiveCareProcess(); + } + }); + } + } + }, + child: Stack(children: [ + AspectRatio( + aspectRatio: 1.0, + child: Container( + padding: EdgeInsets.only(left: 20, right: 20, bottom: 3, top: 28), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SvgPicture.asset( + _icon, + height: _loginIndex == 3 ? 80 : 60, + width: _loginIndex == 3 ? 80 : 60, + ), + Text( + _title, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16), + ), + ], + ), + ), + ), + isEnable + ? Container() + : Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.grey.withOpacity(0.6), + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + width: double.infinity, + height: double.infinity, + child: Icon( + Icons.lock_outline, + size: 40, + ), + ) + ]), + ); + } + + readQRCode() async { + //Changed By Aamir + pharmacyLiveCareQRCode = await BarcodeScanner.scan().then((value) { + return value.rawContent; + }); + if (pharmacyLiveCareQRCode != "") { + GifLoaderDialogUtils.showMyDialog(context); + LiveCareService service = new LiveCareService(); + service.getPatientInfoByQR(pharmacyLiveCareQRCode, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + startPharmacyLiveCareProcess(); + }); + } else {} + } + + startPharmacyLiveCareProcess() { + sharedPref.setString(LIVECARE_CLINIC_DATA, "Pharmacy LiveCare" + "-" + "501" + "-" + "1"); + Navigator.pop(context, "pharmacy/$pharmacyLiveCareQRCode"); + // Navigator.push(context, FadePage(page: LiveCareHome(isPharmacyLiveCare: true, pharmacyLiveCareQRCode: pharmacyLiveCareQRCode,))); + } + + getLanguageID() async { + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + setState(() { + this.languageID = languageID; + }); + } +} diff --git a/lib/pages/livecare/pharma_livecare_intro_page.dart b/lib/pages/livecare/pharma_livecare_intro_page.dart new file mode 100644 index 00000000..c7120c08 --- /dev/null +++ b/lib/pages/livecare/pharma_livecare_intro_page.dart @@ -0,0 +1,209 @@ +import 'package:barcode_scan2/barcode_scan2.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +import '../../uitl/utils.dart'; + +class PharmaLiveCareIntroPage extends StatefulWidget { + const PharmaLiveCareIntroPage({Key? key}) : super(key: key); + + @override + State createState() => _PharmaLiveCareIntroPageState(); +} + +class _PharmaLiveCareIntroPageState extends State { + late ProjectViewModel projectViewModel; + String pharmacyLiveCareQRCode = ""; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).pharmaLiveCare, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 20.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container(child: Text(TranslationBase.of(context).pharmaLiveCare1, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + margin: EdgeInsets.only(top: 7.0), + child: Text(TranslationBase.of(context).pharmaLiveCareDesc1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))), + Container( + margin: EdgeInsets.only(top: 20.0), + child: Text(TranslationBase.of(context).wherePharmaLiveCare, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + margin: EdgeInsets.only(top: 7.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset( + "assets/images/new/booth_image.png", + ), + Container( + width: MediaQuery.of(context).size.width * 0.6, + margin: EdgeInsets.only(left: 10.0, right: 10.0), + child: Text(TranslationBase.of(context).pharmaLiveCareDesc2, + style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))), + ], + )), + Container( + margin: EdgeInsets.only(top: 20.0), + child: Text(TranslationBase.of(context).howPharmaLiveCare, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + margin: EdgeInsets.only(top: 7.0), + child: Text(TranslationBase.of(context).pharmaLiveCareDesc3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))), + Container( + margin: EdgeInsets.only(top: 7.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(top: 7.0), + padding: EdgeInsets.fromLTRB(14.0, 5.0, 14.0, 5.0), + decoration: BoxDecoration(color: CustomColors.green, borderRadius: BorderRadius.all(Radius.circular(100.0))), + child: Text("1", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, color: CustomColors.white, fontWeight: FontWeight.w600))), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: SvgPicture.asset("assets/images/new/qr_code.svg", width: 40), + ), + Container( + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(TranslationBase.of(context).pharmaLiveCareScanQR, + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + width: MediaQuery.of(context).size.width * 0.7, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(TranslationBase.of(context).pharmaLiveCareScanQR1, + style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))), + ], + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 7.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(top: 7.0), + padding: EdgeInsets.fromLTRB(12.0, 5.0, 12.0, 5.0), + decoration: BoxDecoration(color: CustomColors.green, borderRadius: BorderRadius.all(Radius.circular(100.0))), + child: Text("2", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, color: CustomColors.white, fontWeight: FontWeight.w600))), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: SvgPicture.asset("assets/images/new/payment.svg", width: 40), + ), + Container( + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(TranslationBase.of(context).pharmaLiveCareMakePayment, + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + width: MediaQuery.of(context).size.width * 0.7, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(TranslationBase.of(context).pharmaLiveCareMakePayment1, + style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))), + ], + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 7.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(top: 7.0), + padding: EdgeInsets.fromLTRB(12.0, 5.0, 12.0, 5.0), + decoration: BoxDecoration(color: CustomColors.green, borderRadius: BorderRadius.all(Radius.circular(100.0))), + child: Text("3", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, color: CustomColors.white, fontWeight: FontWeight.w600))), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: SvgPicture.asset("assets/images/new/pharmaicon.svg", width: 40), + ), + Container( + width: MediaQuery.of(context).size.width * 0.7, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(TranslationBase.of(context).pharmaLiveCareJoinConsultation, + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0, letterSpacing: -0.64, color: CustomColors.darkGrey))), + Container( + width: MediaQuery.of(context).size.width * 0.7, + margin: EdgeInsets.only(left: 5.0, right: 5.0), + child: Text(TranslationBase.of(context).pharmaLiveCareJoinConsultation1, + style: TextStyle(fontSize: 14.0, letterSpacing: -0.64, color: CustomColors.textColor, fontWeight: FontWeight.w600))), + ], + ), + ], + ), + ), + SizedBox( + height: 100.0, + ) + ], + ), + ), + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.08, + width: double.infinity, + color: Colors.white, + child: Column( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.9, + child: DefaultButton(TranslationBase.of(context).pharmaLiveCareScanQR, () { + readQRCode(); + }), + ), + ], + ), + ), + ); + } + + readQRCode() async { + pharmacyLiveCareQRCode = await BarcodeScanner.scan().then((value) { + return value.rawContent; + }); + if (pharmacyLiveCareQRCode != "") { + GifLoaderDialogUtils.showMyDialog(context); + LiveCareService service = new LiveCareService(); + service.getPatientInfoByQR(pharmacyLiveCareQRCode, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + startPharmacyLiveCareProcess(); + }); + } else {} + } + + startPharmacyLiveCareProcess() { + sharedPref.setString(LIVECARE_CLINIC_DATA, "Pharmacy LiveCare" + "-" + "501" + "-" + "1"); + Navigator.pop(context, "pharmacy/$pharmacyLiveCareQRCode"); + } +} diff --git a/lib/pages/livecare/video-call-web-page.dart b/lib/pages/livecare/video-call-web-page.dart new file mode 100644 index 00000000..f755d1b0 --- /dev/null +++ b/lib/pages/livecare/video-call-web-page.dart @@ -0,0 +1,124 @@ +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_inappwebview/flutter_inappwebview.dart'; + +class VideoCallWebPage extends StatelessWidget{ + final GlobalKey webViewKey = GlobalKey(); + + // InAppWebViewController webViewController; + InAppWebViewController? controller; + + URLRequest? request; + final String receiverId; + final String callerId; + VideoCallWebPage({required this.receiverId, required this.callerId}){ + request = URLRequest(url: WebUri.uri(Uri.parse("https://vcallapi.hmg.com/Mobileindex.html?username=$receiverId&doctorid=$callerId"))); + } + + InAppWebViewGroupOptions options = InAppWebViewGroupOptions( + crossPlatform: InAppWebViewOptions( + cacheEnabled: false, + clearCache: true, + disableHorizontalScroll: true, + disableVerticalScroll: true, + disableContextMenu: true, + supportZoom: false, + javaScriptEnabled: true, + preferredContentMode: UserPreferredContentMode.MOBILE, + useShouldOverrideUrlLoading: true, + mediaPlaybackRequiresUserGesture: false, + + ), + android: AndroidInAppWebViewOptions( + hardwareAcceleration: true, + useHybridComposition: true, + ), + ios: IOSInAppWebViewOptions( + allowsAirPlayForMediaPlayback: true, + allowsPictureInPictureMediaPlayback: true, + allowsInlineMediaPlayback: true, + ) + ); + + @override + Widget build(BuildContext context) { + return Scaffold( + primary: true, + appBar: AppBar( + backgroundColor: Colors.transparent, leading: Container(), + systemOverlayStyle: SystemUiOverlayStyle(statusBarColor: Colors.black), + ), + extendBodyBehindAppBar: true, + extendBody: false, + // backgroundColor: Colors.white, + body: Column( + children: [ + SizedBox(height: MediaQuery.of(context).viewPadding.top), + Expanded( + child: InAppWebView( + androidOnPermissionRequest: androidOnPermissionRequest, + initialOptions: options, + initialUrlRequest: request, + onWebViewCreated: onWebViewCreated, + onLoadStart: onLoadStart, + onLoadError: onError, + onConsoleMessage: onConsoleMessage, + // shouldOverrideUrlLoading: shouldRedirect , + ), + ), + ], + ), + ); + + ChromeSafariBrowser(); + } + + + Future androidOnPermissionRequest(InAppWebViewController controller, String origin, List resources) async { + return PermissionRequestResponse( + resources: resources, + action: PermissionRequestResponseAction.GRANT + ); + } + + onWebViewCreated(InAppWebViewController controller) { + this.controller = controller; + LandingPage.isOpenCallPage = true; + } + + onConsoleMessage(controller, ConsoleMessage consoleMessage){ + print(consoleMessage); + } + + onError(InAppWebViewController? controller, Uri? url, int code, String message) { + + } + + onLoadStart(InAppWebViewController? controller, Uri? url) { + print(url); + if(url.toString().toLowerCase().contains("endcallpage")){ + LandingPage.isOpenCallPage = false; + if(LandingPage.isOpenCallPage == true) { + print("END CALL!!!"); + // controller.goBack(); + Navigator.pop(webViewKey.currentContext!); + } + } + } + + Future shouldRedirect(InAppWebViewController controller, NavigationAction navigationAction) async { + var uri = navigationAction.request.url; + // if(uri.queryParameters['exit'] == "yes"){ + // Navigator.pop(webViewKey.currentContext); + // } + if(uri.toString().toLowerCase().contains("endcallpage")){ + Navigator.pop(webViewKey.currentContext!); + } + + return NavigationActionPolicy.ALLOW; + } + + +} \ No newline at end of file diff --git a/lib/pages/livecare/widgets/ClinicTimingsDialog.dart b/lib/pages/livecare/widgets/ClinicTimingsDialog.dart new file mode 100644 index 00000000..5f827fad --- /dev/null +++ b/lib/pages/livecare/widgets/ClinicTimingsDialog.dart @@ -0,0 +1,108 @@ +import 'package:diplomaticquarterapp/models/LiveCare/ClinicsServiceTimingsResponse.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/material.dart'; + +class ClinicTimingsDialog extends StatefulWidget { + final clinicName; + final List patientERGetClinicsServiceTimingsList; + + ClinicTimingsDialog({required this.clinicName, required this.patientERGetClinicsServiceTimingsList}); + + @override + _ClinicTimingsDialogState createState() => _ClinicTimingsDialogState(); +} + +class _ClinicTimingsDialogState extends State { + @override + void initState() { + print(widget.patientERGetClinicsServiceTimingsList); + super.initState(); + } + + @override + Widget build(BuildContext context) { + var size = MediaQuery.of(context).size; + final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.42) / 2; + final double itemWidth = size.width / 2; + return Container( + child: Dialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), + child: Container( + height: 580.0, + margin: EdgeInsets.all(20.0), + width: 450.0, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Container( + alignment: Alignment.center, + margin: EdgeInsets.only(bottom: 10.0), + child: Text(TranslationBase.of(context).clinicSchedule, textAlign: TextAlign.center, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + Divider( + thickness: 1.0, + color: Colors.grey[400], + ), + Container( + margin: EdgeInsets.only(bottom: 20.0, top: 10.0), + child: Text(widget.clinicName, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + CustomScrollView( + primary: false, + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + slivers: [ + SliverPadding( + padding: const EdgeInsets.fromLTRB(15, 0, 15, 0), + sliver: SliverGrid.count( + crossAxisCount: 2, + childAspectRatio: (itemWidth / itemHeight), + children: widget.patientERGetClinicsServiceTimingsList + .map((e) => Container( + height: 10.0, + child: Column( + children: [ + Text(e.dayOfWeekStr!), + Text(e.shiftTimings![0].startTime! + " - " + e.shiftTimings![0].endTime!), + ], + ), + )) + .toList()), + ), + ], + ), + Divider( + thickness: 1.0, + color: Colors.grey[400], + ), + Container( + alignment: Alignment.center, + height: 30.0, + child: Flex( + direction: Axis.horizontal, + children: [ + Expanded( + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Container( + child: Text(TranslationBase.of(context).ok, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 18.0, + )), + ), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/livecare/widgets/LiveCareHistoryCard.dart b/lib/pages/livecare/widgets/LiveCareHistoryCard.dart new file mode 100644 index 00000000..eecbfea6 --- /dev/null +++ b/lib/pages/livecare/widgets/LiveCareHistoryCard.dart @@ -0,0 +1,269 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart'; +import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class LiveCareHistoryCard extends StatefulWidget { + ErRequestHistoryList? erRequestHistoryList; + int? isFirstOrLast; + + LiveCareHistoryCard({this.erRequestHistoryList, this.isFirstOrLast}); + + @override + _LiveCareHistoryCardState createState() => _LiveCareHistoryCardState(); +} + +class _LiveCareHistoryCardState extends State { + AuthenticatedUser authUser = new AuthenticatedUser(); + AppSharedPreferences sharedPref = AppSharedPreferences(); + + late ProjectViewModel projectViewModel; + + @override + void initState() { + getAuthenticatedUser(); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return Container( + margin: EdgeInsets.only(left: 12, right: 12, top: widget.isFirstOrLast == 0 ? 12 : 6, bottom: widget.isFirstOrLast == 1 ? 12 : 6), + decoration: BoxDecoration( + color: CustomColors.accentColor, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Container( + margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 0, right: projectViewModel.isArabic ? 0 : 0), + padding: EdgeInsets.symmetric(vertical: 10, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(10) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(10) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(10), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(10), + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + widget.erRequestHistoryList!.stringCallStatus! , + style: TextStyle( + fontSize: 10.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.4, + color: CustomColors.green, + //color: widget.erRequestHistoryList.stringCallStatus == "Completed" ? CustomColors.green : CustomColors.orange, + ), + ), + mHeight(12), + Text( + TranslationBase.of(context).requestedDate + ": " + DateUtil.getDayMonthYearHourMinuteDateFormatted(DateUtil.convertStringToDate(widget.erRequestHistoryList!.arrivalTime!)), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + mHeight(4), + Row( + children: [ + Text( + TranslationBase.of(context).callDuration + ": ", + style: TextStyle(fontSize: 10.0, fontWeight: FontWeight.w600, letterSpacing: -0.4, color: CustomColors.textColor), + ), + Text( + getCallTime(widget.erRequestHistoryList!.callDuration!), + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 12.0, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + ], + ),mHeight(12), + Container( + width: double.infinity, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + openInvoice(); + }, + child: Container( + padding: EdgeInsets.only(left: 12, right: 12, top: 6, bottom: 6), + decoration: containerRadius(CustomColors.devider, 100), + child: Row( + children: [ + SvgPicture.asset("assets/images/new/services/invoice_list.svg",width: 18,height: 18,), + mWidth(10), + Text( + TranslationBase.of(context).invoice, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 11.0, + letterSpacing: -0.46, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ), + ), + mWidth(12), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + openComplaint(); + }, + child: Container( + padding: EdgeInsets.only(left: 12, right: 12, top: 7, bottom: 7), + decoration: containerRadius(CustomColors.devider, 100), + child: Row( + children: [ + SvgPicture.asset("assets/images/new/services/raise_comp.svg",width: 16,height: 16,), + mWidth(10), + Expanded( + child: AutoSizeText( + TranslationBase.of(context).complaint, + textAlign: TextAlign.center, + maxLines: 1,minFontSize: 8, + style: TextStyle( + fontSize: 11.0, + letterSpacing: -0.46, + fontWeight: FontWeight.w600, + ), + ), + ), + ], + ), + ), + ), + ), + mWidth(12), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + rateLiveCareAppo(); + }, + child: Container( + padding: EdgeInsets.only(left: 12, right: 12, top: 6, bottom: 6), + decoration: containerRadius(CustomColors.devider, 100), + child: Row( + children: [ + Icon( Icons.star,size: 18,), + mWidth(10), + Text( + TranslationBase.of(context).rate, + overflow: TextOverflow.clip, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 11.0, + letterSpacing: -0.46, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + ), + ), + ], + ), + ), + ], + ), + ), + ); + } + + rateLiveCareAppo() { + if (widget.erRequestHistoryList!.isAppointmentHaveRating!) { + AppToast.showErrorToast(message: TranslationBase.of(context).alreadyRated); + } else {} + } + + openInvoice() { + showDialog( + context: context, + builder: (cxt) => ConfirmSendEmailDialog( + email: projectViewModel.user!.emailAddress, + onTapSendEmail: () { + sendInvoiceEmail(context); + }, + ), + ); + } + + openComplaint() { + Navigator.push(context, FadePage(page: FeedbackHomePage())); + } + + sendInvoiceEmail(context) { + int languageID = projectViewModel.isArabic ? 1 : 2; + LiveCareService service = new LiveCareService(); + GifLoaderDialogUtils.showMyDialog(context); + service.sendLiveCareInvoiceEmail(widget.erRequestHistoryList!.appointmentNo.toString(), widget.erRequestHistoryList!.projectID!, authUser.emailAddress!, languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showSuccessToast(message: TranslationBase.of(context).emailSentSuccessfully); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err.toString()); + print(err); + }); + } + + getAuthenticatedUser() async { + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + setState(() { + authUser = data; + }); + } + } + + getCallTime(int number) { + number = number.round(); + var hours = (number / 60 / 60).floor(); + var minutes = (number / 60).floor() - (hours * 60).floor(); + var seconds = number % 60; + return '${hours.toString().padLeft(2, '0')}:${minutes.toString().padLeft(2, '0')}:${seconds.toString().padLeft(2, '0')}'; + } +} diff --git a/lib/pages/livecare/widgets/LiveCareInfoDialog.dart b/lib/pages/livecare/widgets/LiveCareInfoDialog.dart new file mode 100644 index 00000000..0fa02cbe --- /dev/null +++ b/lib/pages/livecare/widgets/LiveCareInfoDialog.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; + +class LiveCareInfoDialog extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Container( + child: Dialog( + shape: + RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), + child: Container( + height: MediaQuery.of(context).size.height * 0.61, + margin: EdgeInsets.all(20.0), + width: 450.0, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Container( + alignment: Alignment.center, + margin: EdgeInsets.only(bottom: 10.0), + child: Icon(Icons.info_outline, + size: 80.0, color: Colors.red[900]), + ), + Container( + alignment: Alignment.center, + margin: EdgeInsets.only(bottom: 20.0), + child: Text("Important Instructions", + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 24.0, + fontWeight: FontWeight.bold, + color: Colors.red[900])), + ), + Container( + alignment: Alignment.center, + margin: EdgeInsets.only(bottom: 20.0), + child: Text( + "Please make sure that you're logged in on Al Habib Mobile Application", + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 18.0, + fontWeight: FontWeight.bold, + color: Colors.black)), + ), + Container( + alignment: Alignment.center, + margin: EdgeInsets.only(bottom: 20.0), + child: Icon(Icons.not_interested, + size: 80.0, color: Colors.red[900]), + ), + Container( + alignment: Alignment.center, + margin: EdgeInsets.only(bottom: 40.0), + child: Text( + "Otherwise, you will not receive the doctor's call.", + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 22.0, + fontWeight: FontWeight.bold, + color: Colors.red[900])), + ), + Divider( + thickness: 1.0, + color: Colors.grey[400], + ), + Container( + alignment: Alignment.center, + height: 40.0, + child: Flex( + direction: Axis.horizontal, + children: [ + Expanded( + child: InkWell( + onTap: () { + Navigator.pop(context, false); + }, + child: Container( + child: Text("Cancel", + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 18.0, color: Colors.red[700])), + ), + ), + ), + Expanded( + child: InkWell( + onTap: () { + Navigator.pop(context, true); + }, + child: Container( + child: Text("Ok", + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 18.0, + )), + ), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/livecare/widgets/LiveCarePaymentDialog.dart b/lib/pages/livecare/widgets/LiveCarePaymentDialog.dart new file mode 100644 index 00000000..de3cb248 --- /dev/null +++ b/lib/pages/livecare/widgets/LiveCarePaymentDialog.dart @@ -0,0 +1,233 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class LiveCarePaymentDialog extends StatefulWidget { + GetERAppointmentFeesList getERAppointmentFeesList; + int waitingTime; + String clinicName; + + LiveCarePaymentDialog({required this.getERAppointmentFeesList, required this.waitingTime, required this.clinicName}); + + @override + _LiveCarePaymentDialogState createState() => _LiveCarePaymentDialogState(); +} + +class _LiveCarePaymentDialogState extends State { + int _selected = 0; + + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + var size = MediaQuery.of(context).size; + final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.42) / 2; + final double itemWidth = size.width / 2; + projectViewModel = Provider.of(context); + + return Container( + child: Dialog( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), + child: Container( + height: 600.0, + margin: EdgeInsets.all(20.0), + width: 500.0, + color: Colors.red, + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Container( + alignment: Alignment.center, + margin: EdgeInsets.only(bottom: 10.0), + child: Text(TranslationBase.of(context).onlineConsultation, textAlign: TextAlign.center, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + Divider( + thickness: 1.0, + color: Colors.grey[400], + ), + Flex( + direction: Axis.horizontal, + children: [ + Expanded( + child: Text(TranslationBase.of(context).expectedWaiting, textAlign: TextAlign.end, style: TextStyle(fontSize: 13.0)), + ), + Expanded( + child: Container( + child: Icon(Icons.access_time, size: 36.0, color: Colors.red[800]), + ), + ), + Expanded( + child: Text(widget.waitingTime.toString() + " " + TranslationBase.of(context).minute, + textAlign: TextAlign.start, style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, color: Colors.red[900])), + ), + ], + ), + Container( + margin: EdgeInsets.only(bottom: 10.0, top: 10.0), + child: Text(widget.clinicName, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)), + ), + Container( + width: MediaQuery.of(context).size.width, + decoration: BoxDecoration( + color: Colors.black87, + borderRadius: new BorderRadius.only( + topLeft: const Radius.circular(5.0), + topRight: const Radius.circular(5.0), + ), + border: Border.all(color: Colors.black87)), + alignment: Alignment.center, + margin: EdgeInsets.only(top: 5.0), + padding: EdgeInsets.all(5.0), + child: Text(TranslationBase.of(context).erConsultFee, textAlign: TextAlign.center, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold, color: Colors.white)), + ), + Container( + decoration: BoxDecoration( + borderRadius: new BorderRadius.only( + bottomLeft: const Radius.circular(5.0), + bottomRight: const Radius.circular(5.0), + ), + border: Border.all(color: Colors.black54)), + child: Table( + children: [ + TableRow(children: [ + TableCell(child: _getNormalText(TranslationBase.of(context).patientShareToDo)), + TableCell(child: _getNormalText(widget.getERAppointmentFeesList.amount! + " " + widget.getERAppointmentFeesList.currency!)), + ]), + TableRow(children: [ + TableCell(child: _getNormalText(TranslationBase.of(context).patientTaxToDo)), + TableCell(child: _getNormalText(widget.getERAppointmentFeesList.tax! + " " + widget.getERAppointmentFeesList.currency!)), + ]), + TableRow(children: [ + TableCell(child: _getMarginText(TranslationBase.of(context).patientShareTotalToDo)), + TableCell(child: _getMarginText(widget.getERAppointmentFeesList.total! + " " + widget.getERAppointmentFeesList.currency!)), + ]), + ], + ), + ), + Container( + padding: EdgeInsets.only(top: 10.0, bottom: 10.0, left: 10.0), + decoration: BoxDecoration( + borderRadius: new BorderRadius.all( + const Radius.circular(5.0), + ), + color: Colors.green[200]!.withOpacity(0.5)), + margin: EdgeInsets.only(top: 20.0), + child: Row( + children: [ + Image.asset("assets/images/new-design/alert-triangle.png"), + Container( + margin: EdgeInsets.only(left: 10.0, right: 10.0), + width: MediaQuery.of(context).size.width * 0.55, + child: Text(TranslationBase.of(context).insuredPatient, style: TextStyle(fontSize: 13.0)), + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Container( + child: new Radio( + value: 1, + groupValue: _selected, + onChanged:(val){ + onRadioChanged(val!); + }, + ), + ), + Container( + child: new Text( + TranslationBase.of(context).iAcceptTerms, + style: new TextStyle(fontSize: 14.0), + ), + ), + ], + ), + ), + Divider( + thickness: 1.0, + color: Colors.grey[400], + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: new Text( + TranslationBase.of(context).upComingPayOption, + style: new TextStyle(fontSize: 14.0), + ), + ), + Container(margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0), child: getPaymentMethods()), + Divider( + thickness: 1.0, + color: Colors.grey[400], + ), + Container( + alignment: Alignment.center, + height: 40.0, + child: Flex( + direction: Axis.horizontal, + children: [ + Expanded( + child: InkWell( + onTap: () { + Navigator.pop(context, false); + }, + child: Container( + child: Text(TranslationBase.of(context).cancel, textAlign: TextAlign.center, style: TextStyle(fontSize: 18.0, color: Colors.red[700])), + ), + ), + ), + Expanded( + child: InkWell( + onTap: () { + if (_selected == 0) { + AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms); + } else { + Navigator.pop(context, true); + } + }, + child: Container( + child: Text(TranslationBase.of(context).ok, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 18.0, + )), + ), + ), + ), + ], + ), + ), + ], + )), + ), + ), + ); + } + + onRadioChanged(int value) { + setState(() { + _selected = value; + }); + } + + _getNormalText(text) { + return Container( + margin: EdgeInsets.only(top: 10.0, right: 10.0), + child: Text(text, textAlign: TextAlign.start, style: TextStyle(fontSize: 14, letterSpacing: 0.5, color: Colors.black)), + ); + } + + _getMarginText(text) { + return Container( + margin: EdgeInsets.only(top: 10.0, right: 10.0, bottom: 10.0), + child: Text(text, textAlign: TextAlign.start, style: TextStyle(fontSize: 14, letterSpacing: 0.5, fontWeight: FontWeight.bold, color: Colors.black)), + ); + } +} diff --git a/lib/pages/livecare/widgets/LiveCarePendingRequest.dart b/lib/pages/livecare/widgets/LiveCarePendingRequest.dart new file mode 100644 index 00000000..9eb5b9f9 --- /dev/null +++ b/lib/pages/livecare/widgets/LiveCarePendingRequest.dart @@ -0,0 +1,143 @@ +import 'package:circular_countdown_timer/circular_countdown_timer.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class LiveCarePendingRequest extends StatefulWidget { + ErRequestHistoryList? pendingERRequestHistoryList; + final Function getLiveCareHistory; + + LiveCarePendingRequest({required this.getLiveCareHistory, this.pendingERRequestHistoryList}); + + @override + _LiveCarePendingRequestState createState() => _LiveCarePendingRequestState(); +} + +class _LiveCarePendingRequestState extends State { + @override + void initState() { + // TODO: implement initState + super.initState(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Container( + margin: EdgeInsets.fromLTRB(21, 21, 21, 12), + padding: EdgeInsets.all(10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Container( + width: MediaQuery.of(context).size.width, + decoration: cardRadius(15.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: const EdgeInsets.fromLTRB(16, 21, 16, 23), + child: Text(TranslationBase.of(context).waitingTime, style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.w600, letterSpacing: -0.64)), + ), + Container( + height: MediaQuery.of(context).size.height * 0.25, + transform: Matrix4.translationValues(0.0, -10.0, 0.0), + alignment: Alignment.center, + child: CircularCountDownTimer( + duration: widget.pendingERRequestHistoryList!.watingtimeInteger! * 60, + width: MediaQuery.of(context).size.width / 2, + height: MediaQuery.of(context).size.height / 2, + ringColor: Colors.white, + fillColor: CustomColors.green, + strokeWidth: 7.0, + textStyle: TextStyle(fontSize: 32.0, color: Color(0xff2E303A), fontWeight: FontWeight.w400), + isReverse: true, + isTimerTextShown: true, + onComplete: () { + print('Countdown Ended'); + }, + ), + ), + ], + ), + ), + Container( + margin: const EdgeInsets.fromLTRB(0, 12, 0, 0), + padding: const EdgeInsets.fromLTRB(16, 21, 16, 12), + width: MediaQuery.of(context).size.width, + decoration: cardRadius(15.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + decoration: cardRadius(15.0, color: Color(0xffCC9B14)), + padding: const EdgeInsets.all(5.0), + child: Text(widget.pendingERRequestHistoryList!.stringCallStatus!, style: TextStyle(fontSize: 10.0, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4)), + ), + Container( + padding: const EdgeInsets.all(5.0), + child: MyRichText(TranslationBase.of(context).requestedDateLiveCare, + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.pendingERRequestHistoryList!.arrivalTime!)), projectViewModel.isArabic), + ), + Container( + padding: const EdgeInsets.all(5.0), + child: Text(TranslationBase.of(context).yourTurn + " " + widget.pendingERRequestHistoryList!.patCount.toString() + " " + TranslationBase.of(context).patients, + style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)), + ), + // Row( + // children: [ + // Container( + // padding: const EdgeInsets.all(5.0), + // child: Text(TranslationBase.of(context).liveCareSupportContact, style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)), + // ), + // Directionality(textDirection: TextDirection.ltr, child: Text("011 525 9553", style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48))) + // ], + // ), + mHeight(12.0), + Container( + child: DefaultButton(TranslationBase.of(context).callLiveCareSupport, () { + launchUrl(Uri.parse("tel://" + "011 525 9553")); + // cancelLiveCareRequest(); + }), + ), + // DefaultButton( + // TranslationBase.of(context).cancel, + // () { + // cancelLiveCareRequest(); + // }, + // ), + ], + ), + ), + ], + ), + ); + } + + callLiveCareSupport() {} + + cancelLiveCareRequest() { + LiveCareService service = new LiveCareService(); + GifLoaderDialogUtils.showMyDialog(context); + service.cancelLiveCareRequest(widget.pendingERRequestHistoryList!.vCID!, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showSuccessToast(message: "LiveCare request cancelled successfully"); + widget.getLiveCareHistory(); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} diff --git a/lib/pages/livecare/widgets/clinic_card.dart b/lib/pages/livecare/widgets/clinic_card.dart new file mode 100644 index 00000000..5c5c4aaa --- /dev/null +++ b/lib/pages/livecare/widgets/clinic_card.dart @@ -0,0 +1,211 @@ +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/ClinicsServiceTimingsResponse.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/LiveCareClinicsListResponse.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:provider/provider.dart'; + +import '../clinic_timings_page.dart'; +import 'ClinicTimingsDialog.dart'; + +// ignore: must_be_immutable +class ClinicCard extends StatefulWidget { + bool? isSelected; + final PatientERGetClinicsList patientERGetClinicsList; + var languageID; + int? isOnline; + + ClinicCard({this.isSelected, this.languageID, this.isOnline, required this.patientERGetClinicsList}){ + + } + + @override + _State createState() => _State(); +} + +class _State extends State { + late ClinicsServiceTimingsResponse clinicsServiceTimingsResponse; + + @override + void initState() { + clinicsServiceTimingsResponse = new ClinicsServiceTimingsResponse(); + super.initState(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Container( + width: double.infinity, + margin: EdgeInsets.fromLTRB(15.0, 0.0, 15.0, 8.0), + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: Border.all(width: widget.isSelected! ? 3 : 0, color: widget.isSelected! ? CustomColors.green : Colors.transparent), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.transparent, + ), + child: Container( + decoration: BoxDecoration( + color: widget.patientERGetClinicsList.isOnline == 1 ? CustomColors.green : CustomColors.accentColor, + borderRadius: BorderRadius.all( + Radius.circular(6.0), + ), + ), + child: Container( + margin: EdgeInsets.only( + left: projectViewModel.isArabic + ? 0 + : widget.isSelected! + ? 4 + : 6, + right: projectViewModel.isArabic ? widget.isSelected! + ? 4 + : 6: 0), + padding: EdgeInsets.symmetric(vertical: 10, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + ), + ), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + widget.languageID == 'ar' ? widget.patientERGetClinicsList.serviceNameN! : widget.patientERGetClinicsList.serviceName!, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.48, + ), + ), + Row( + children: [ + Container( + width: 4, + height: 4, + decoration: containerRadius( + widget.patientERGetClinicsList.isOnline == 1 ? CustomColors.green : CustomColors.accentColor, + 100, + ), + ), + mWidth(4), + Text( + widget.patientERGetClinicsList.isOnline == 1 ? TranslationBase.of(context).onlineTag : TranslationBase.of(context).offlineTag, + style: TextStyle( + fontSize: 10, + fontWeight: FontWeight.w600, + color: widget.patientERGetClinicsList.isOnline == 1 ? CustomColors.green : CustomColors.accentColor, + letterSpacing: -0.48, + ), + ), + ], + ), + ], + ), + ), + InkWell( + onTap: () => getClinicTimings(widget.patientERGetClinicsList), + child: Container( + padding: EdgeInsets.only(left: 8,right: 8,top: 4,bottom: 4), + decoration: containerRadius(CustomColors.devider, 100), + child: Row( + children: [ + SvgPicture.asset( + "assets/images/new-design/ic_schedule.svg", + width: 16, + height: 16, + color: Colors.black, + ), + mWidth(4), + Text( + TranslationBase.of(context).schedule, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ) + ], + ), + ), + ), + ], + ), + ), + ), + ); + } + + getClinicTimings(PatientERGetClinicsList patientERGetClinicsList) { + int languageID = widget.languageID == 'ar' ? 1 : 2; + LiveCareService service = new LiveCareService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getLivecareClinicTiming(patientERGetClinicsList!.serviceID!, languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + clinicsServiceTimingsResponse = ClinicsServiceTimingsResponse.fromJson(res as Map); + print(clinicsServiceTimingsResponse.patientERGetClinicsServiceTimingsList!.length); + + navigateTo(context, ClinicTimingsPage( + clinicName: patientERGetClinicsList.serviceName, + patientERGetClinicsServiceTimingsList: clinicsServiceTimingsResponse.patientERGetClinicsServiceTimingsList!, + )); + // showGeneralDialog( + // barrierColor: Colors.black.withOpacity(0.5), + // transitionBuilder: (context, a1, a2, widget) { + // final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0; + // return Transform( + // transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), + // child: Opacity( + // opacity: a1.value, + // child: ClinicTimingsDialog( + // clinicName: patientERGetClinicsList.serviceName, + // patientERGetClinicsServiceTimingsList: clinicsServiceTimingsResponse.patientERGetClinicsServiceTimingsList, + // ), + // ), + // ); + // }, + // transitionDuration: Duration(milliseconds: 500), + // barrierDismissible: true, + // barrierLabel: '', + // context: context, + // pageBuilder: (context, animation1, animation2) {}); + }); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + + locator().liveCare.livecare_clinic_schedule(clinic: patientERGetClinicsList.serviceName!); + } +} diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart new file mode 100644 index 00000000..c4b825dc --- /dev/null +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -0,0 +1,985 @@ +import 'dart:developer'; +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/PayfortEnums.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/main.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/ApplePayInsertRequest.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/LiveCareClinicsListResponse.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/LiveCareScheduleClinicsListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/livecare/livecare_call_type_select.dart'; +import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; +import 'package:diplomaticquarterapp/pages/livecare/livecare_scheduling/schedule_clinic_card.dart'; +import 'package:diplomaticquarterapp/pages/livecare/livecare_type_select.dart'; +import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_card.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_project_details_resp_model.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; +import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; + +import '../live_care_payment_page.dart'; + +class ClinicList extends StatefulWidget { + final Function getLiveCareHistory; + bool isPharmacyLiveCare; + String pharmacyLiveCareQRCode; + + ClinicList({required this.getLiveCareHistory, this.isPharmacyLiveCare = false, this.pharmacyLiveCareQRCode = ""}); + + @override + _clinic_listState createState() => _clinic_listState(); +} + +class _clinic_listState extends State { + int currentSelectedIndex = 0; + late LiveCareClinicsListResponse liveCareClinicsListResponse; + + late List liveCareOnlineClinicsListResponse; + late List liveCareOfflineClinicsListResponse; + + late LiveCareScheduleClinicsListResponse liveCareScheduleClinicsListResponse; + + bool isDataLoaded = false; + var languageID; + var currentSelectedLiveCareType; + + late int selectedClinicID; + String selectedClinicName = "-"; + + AppSharedPreferences sharedPref = AppSharedPreferences(); + + late AuthenticatedUser authUser; + AuthProvider authProvider = new AuthProvider(); + + late MyInAppBrowser browser; + + late dynamic liveCareClinicIDs; + + late ProjectViewModel projectViewModel; + + String selectedPaymentMethod = ""; + String amount = ""; + + late String tamaraPaymentStatus; + late String tamaraOrderID; + late String selectedInstallmentPlan; + + String? transID; + BuildContext? localContext; + + int selectedCallType = 0; + String selectedMobileNumber = ""; + + @override + void initState() { + liveCareClinicsListResponse = new LiveCareClinicsListResponse(); + + liveCareOnlineClinicsListResponse = []; + liveCareOfflineClinicsListResponse = []; + + liveCareScheduleClinicsListResponse = new LiveCareScheduleClinicsListResponse(); + + WidgetsBinding.instance.addPostFrameCallback((_) { + if (LiveCareHome.isLiveCareTypeSelected != true) { + openLiveCareSelectionDialog(); + } else { + setState(() { + currentSelectedLiveCareType = "immediate"; + getLiveCareClinicsList(); + }); + } + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + localContext = context; + getLanguageID(); + return Container( + child: currentSelectedLiveCareType == "immediate" ? getLiveCareImmediateClinicList() : getLiveCareScheduleClinicList(), + ); + } + + void startLiveCare() { + makePayment(); + } + + showLiveCareCancelDialog(String msg, res) { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: msg, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => {cancelAppointment(res)}, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + + cancelAppointment(res) { + AppoitmentAllHistoryResultList appo = AppoitmentAllHistoryResultList(); + appo.clinicID = res['ClinicID']; + appo.doctorID = res['DoctorID']; + appo.endTime = res['EndTime']; + appo.projectID = res['ProjectID']; + appo.startTime = res['StrAppointmentDate']; + appo.appointmentNo = res['AppointmentID']; + appo.isLiveCareAppointment = true; + appo.originalClinicID = 0; + appo.originalProjectID = res['ProjectID']; + appo.appointmentDate = res['AppointmentDate']; + + ConfirmDialog.closeAlertDialog(context); + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.cancelAppointment(appo, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res); + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); + startLiveCare(); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + getERAppointmentTime(GetERAppointmentFeesList getERAppointmentFeesList) { + int languageID = projectViewModel.isArabic ? 1 : 2; + String errorMsg = ""; + LiveCareService service = new LiveCareService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getERAppointmentTime(selectedClinicID, widget.isPharmacyLiveCare, languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + + // getERAppointmentFeesList.isCash = false; + // getERAppointmentFeesList.isInsured = true; + // getERAppointmentFeesList.isEligible = false; + + if (getERAppointmentFeesList.isCash!) { + showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']); + } else { + if (getERAppointmentFeesList.isInsured! && getERAppointmentFeesList.isEligible!) { + showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']); + } else { + if (getERAppointmentFeesList.isInsured! && !getERAppointmentFeesList.isEligible!) { + errorMsg = TranslationBase.of(context).invalidEligibility; + } else { + errorMsg = TranslationBase.of(context).invalidInsurance; + } + ConfirmDialog dialog = new ConfirmDialog( + isDissmissable: false, + context: context, + confirmMessage: errorMsg, + okText: TranslationBase.of(context).updateInsuranceText, + cancelText: TranslationBase.of(context).continueCash, + okFunction: () => {openUpdateInsurance()}, + cancelFunction: () => {continueAsCash()}); + dialog.showAlertDialog(context); + } + } + // showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); + } + + void continueAsCash() { + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.convertPatientToCash(BASE_URL.contains("uat.") ? 15 : 12).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + startLiveCare(); + } else { + AppToast.showErrorToast(message: res["ErrorEndUserMessage"]); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + void openUpdateInsurance() { + Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route r) => false); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + } + + showLiveCarePaymentDialog(GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) { + navigateTo( + context, + LiveCarePatmentPage( + selectedCallType: this.selectedCallType, + getERAppointmentFeesList: getERAppointmentFeesList, + waitingTime: waitingTime, + clinicName: selectedClinicName, + isPharmaLiveCare: widget.isPharmacyLiveCare, + pharmaLiveCareClientID: widget.pharmacyLiveCareQRCode)) + .then( + (value) { + if (value != null && value) { + if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") { + addNewCallForPatientER(projectViewModel.user!.patientID.toString() + "" + DateTime.now().millisecondsSinceEpoch.toString()); + } else { + navigateToPaymentMethod(getERAppointmentFeesList, context); + } + } else { + Navigator.pop(context); + } + }, + ); + } + + makePayment() { + showDraggableDialog( + context, + LiveCareCallTypeSelectPage( + onSelectedMethod: (int selectedCallType, String mobileNumber) { + print(selectedCallType); + print(mobileNumber); + this.selectedCallType = selectedCallType; + selectedMobileNumber = mobileNumber; + int languageID = projectViewModel.isArabic ? 1 : 2; + bool isError = false; + LiveCareService service = new LiveCareService(); + GifLoaderDialogUtils.showMyDialog(context); + ERAppointmentFeesResponse erAppointmentFeesResponse = new ERAppointmentFeesResponse(); + service.getERAppointmentFees(selectedClinicID, widget.isPharmacyLiveCare, languageID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['HasAppointment'] == true) { + isError = true; + showLiveCareCancelDialog(res['ErrorEndUserMessage'], res); + } else { + erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res as Map); + isError = false; + } + if (!isError) getERAppointmentTime(erAppointmentFeesResponse.getERAppointmentFeesList!); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + isError = true; + AppToast.showErrorToast(message: err, localContext: context); + }); + projectViewModel.analytics.liveCare.livecare_immediate_consultation_clinic(clinic: selectedClinicName); + }, + ), + ); + } + + Future askVideoCallPermission() async { + if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted)) { + return false; + } + if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) { + await drawOverAppsMessageDialog(context); + return false; + } + return true; + } + + Future drawOverAppsMessageDialog(BuildContext context) async { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).drawOverAppsPermission, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () async { + await PlatformBridge.shared().askDrawOverAppsPermission(); + Navigator.pop(context); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + + // showLiveCareInfoDialog(GetERAppointmentFeesList getERAppointmentFeesList) async { + // if (await this.sharedPref.getObject(USER_PROFILE) != null) { + // var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + // setState(() { + // authUser = data; + // }); + // } + // + // showGeneralDialog( + // barrierColor: Colors.black.withOpacity(0.5), + // transitionBuilder: (context, a1, a2, widget) { + // final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0; + // return Transform( + // transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), + // child: Opacity( + // opacity: a1.value, + // child: LiveCareInfoDialog(), + // ), + // ); + // }, + // transitionDuration: Duration(milliseconds: 500), + // barrierDismissible: true, + // barrierLabel: '', + // context: context, + // pageBuilder: (context, animation1, animation2) {}) + // .then((value) { + // if (value) { + // if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") { + // addNewCallForPatientER(authUser.patientID.toString() + "" + DateTime.now().millisecondsSinceEpoch.toString()); + // } else { + // navigateToPaymentMethod(getERAppointmentFeesList, context); + // } + // } + // }); + // } + + Future navigateToPaymentMethod(GetERAppointmentFeesList getERAppointmentFeesList, context) async { + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + + appo.clinicID = selectedClinicID; + appo.appointmentNo = DateTime.now().millisecondsSinceEpoch; + appo.projectID = BASE_URL.contains("uat.") ? 15 : 12; + appo.isLiveCareAppointment = false; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + setState(() { + authUser = data; + }); + } + + bool isPharmacyLiveCare = widget.isPharmacyLiveCare; + String pharmaLiveCareQRCodeValue = widget.pharmacyLiveCareQRCode; + + Navigator.push( + context, + FadePage( + page: PaymentMethod( + onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) { + setState(() {}); + }, + patientShare: num.parse(getERAppointmentFeesList.total!), + isFromAdvancePayment: widget.isPharmacyLiveCare, + ), + ), + ).then((value) { + if (value != null) { + selectedPaymentMethod = value[0]; + print(value); + widget.isPharmacyLiveCare = isPharmacyLiveCare; + widget.pharmacyLiveCareQRCode = pharmaLiveCareQRCodeValue; + if (value != null) { + if (selectedPaymentMethod == "ApplePay") { + if (projectViewModel.havePrivilege(103)) { + startApplePay(appo, getERAppointmentFeesList.total!); + } else { + openPayment(value, authUser, num.parse(getERAppointmentFeesList.total!), appo); + } + } else { + openPayment(value, authUser, num.parse(getERAppointmentFeesList.total!), appo); + } + projectViewModel.analytics.liveCare.payment_method(appointment_type: 'livecare', clinic: selectedClinicName, payment_method: value[0], payment_type: 'appointment'); + } + } + }); + } + + void startApplePay(AppoitmentAllHistoryResultList appo, String amount) async { + try { + transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo, isAddMilliseconds: false); + print("TransactionID: $transID"); + GifLoaderDialogUtils.showMyDialog(localContext!); + + LiveCareService service = new LiveCareService(); + ApplePayInsertRequest applePayInsertRequest = new ApplePayInsertRequest(); + + PayfortProjectDetailsRespModel? payfortProjectDetailsRespModel; + await localContext + ?.read() + .getProjectDetailsForPayfort(projectId: appo.projectID, serviceId: ServiceTypeEnum.liveCareAppointment.getIdFromServiceEnum(), languageID: projectViewModel.isArabic ? 1 : 2) + .then((value) { + payfortProjectDetailsRespModel = value; + }); + + applePayInsertRequest.clientRequestID = transID; + applePayInsertRequest.clinicID = appo.clinicID; + applePayInsertRequest.currency = projectViewModel.user.outSA == 1 ? "AED" : "SAR"; + // applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress; + applePayInsertRequest.customerEmail = "CustID_${projectViewModel.user.patientID}@HMG.com"; + applePayInsertRequest.customerID = projectViewModel.user.patientID; + applePayInsertRequest.customerName = projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!; + applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); + applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); + applePayInsertRequest.doctorID = appo.doctorID; + applePayInsertRequest.projectID = appo.projectID.toString(); + applePayInsertRequest.serviceID = ServiceTypeEnum.liveCareAppointment.getIdFromServiceEnum().toString(); + applePayInsertRequest.channelID = 3; + applePayInsertRequest.patientID = projectViewModel.user.patientID; + applePayInsertRequest.patientTypeID = projectViewModel.user.patientType; + applePayInsertRequest.patientOutSA = projectViewModel.user.outSA; + applePayInsertRequest.appointmentDate = appo.appointmentDate; + applePayInsertRequest.appointmentNo = appo.appointmentNo; + applePayInsertRequest.orderDescription = "LiveCare Payment"; + applePayInsertRequest.liveServiceID = selectedClinicID.toString(); + applePayInsertRequest.latitude = "0.0"; + applePayInsertRequest.longitude = "0.0"; + applePayInsertRequest.amount = amount; + applePayInsertRequest.isSchedule = appo.isLiveCareAppointment! ? "1" : "0"; + applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en'; + applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2; + applePayInsertRequest.userName = projectViewModel.user.patientID; + applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html"; + applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html"; + applePayInsertRequest.paymentOption = "ApplePay"; + + applePayInsertRequest.isMobSDK = true; + applePayInsertRequest.merchantReference = transID; + applePayInsertRequest.merchantIdentifier = payfortProjectDetailsRespModel!.merchantIdentifier; + applePayInsertRequest.commandType = "PURCHASE"; + applePayInsertRequest.signature = payfortProjectDetailsRespModel!.signature; + applePayInsertRequest.accessCode = payfortProjectDetailsRespModel!.accessCode; + applePayInsertRequest.shaRequestPhrase = payfortProjectDetailsRespModel!.shaRequest; + applePayInsertRequest.shaResponsePhrase = payfortProjectDetailsRespModel!.shaResponse; + applePayInsertRequest.returnURL = ""; + + service.applePayInsertRequest(applePayInsertRequest, localContext!).then((res) async { + if (res["MessageStatus"] == 1) { + await localContext!.read().initiateApplePayWithPayfort( + customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, + // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, + customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com", + orderDescription: "LiveCare Payment", + orderAmount: double.parse(amount), + merchantReference: transID, + payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, + currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", + onFailed: (failureResult) async { + GifLoaderDialogUtils.hideDialog(context); + log("failureResult: ${failureResult.message.toString()}"); + AppToast.showErrorToast(message: failureResult.message.toString()); + }, + onSuccess: (successResult) async { + GifLoaderDialogUtils.hideDialog(localContext!); + log("Payfort: ${successResult.responseMessage}"); + await localContext!.read().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult); + checkPaymentStatus(appo); + }, + projectId: appo.projectID, + serviceTypeEnum: ServiceTypeEnum.appointmentPayment, + ); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: "An error occurred while processing your request", localContext: context); + } + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(localContext!); + AppToast.showErrorToast(message: err, localContext: context); + }); + } catch (ex) { + print(ex.toString()); + GifLoaderDialogUtils.hideDialog(localContext!); + } + } + + openPayment(List paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo) { + browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context); + transID = Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo, isAddMilliseconds: false); + selectedPaymentMethod = paymentMethod[0]!; + selectedInstallmentPlan = paymentMethod[1] ?? "0"; + this.amount = amount.toString(); + + browser.openPaymentBrowser(amount, "LiveCare Payment", widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode! : transID!, "12", authenticatedUser.emailAddress!, paymentMethod[0]!, + authenticatedUser.patientType, authenticatedUser.firstName!, authenticatedUser.patientID, authenticatedUser, browser, false, "4", selectedClinicID, context, "", "", "", "", paymentMethod[1]); + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + + if (selectedPaymentMethod == "TAMARA") { + if (Platform.isAndroid) { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['status']!; + tamaraOrderID = uri.queryParameters['AuthorizePaymentId']!; + } else { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['paymentStatus']!; + tamaraOrderID = uri.queryParameters['orderId']!; + } + } + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called!!!!"); + try { + if (selectedPaymentMethod == "TAMARA") { + checkTamaraPaymentStatus(transID!, appo); + // if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { + // updateTamaraRequestStatus("success", "14", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID, num.parse(selectedInstallmentPlan), appo); + // } else { + // updateTamaraRequestStatus( + // "Failed", "00", Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallmentPlan), appo); + // } + } else { + checkPaymentStatus(appo); + } + } catch (err) { + print(err); + } + } + + checkTamaraPaymentStatus(String orderID, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getTamaraPaymentStatus(orderID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["status"].toString().toLowerCase() == "success") { + updateTamaraRequestStatus("success", "14", orderID, tamaraOrderID, int.parse(selectedInstallmentPlan), appo); + } else { + updateTamaraRequestStatus("Failed", "00", transID!, tamaraOrderID != null ? tamaraOrderID : "", num.parse(selectedInstallmentPlan), appo); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, num selectedInstallments, AppoitmentAllHistoryResultList appo) { + final currency = projectViewModel.user!.outSA == 0 ? "sar" : 'aed'; + GifLoaderDialogUtils.showMyDialog(context); + try { + DoctorsListService service = new DoctorsListService(); + service.updateTamaraRequestStatus(responseMessage, status, clientRequestID, tamaraOrderID, selectedInstallments).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (tamaraPaymentStatus != null && tamaraPaymentStatus.toLowerCase() == "approved") { + addNewCallForPatientER(transID!); + } else { + AppToast.showErrorToast(message: res['Response_Message']); + projectViewModel.analytics.liveCare.livecare_immediate_consultation_payment_failed( + appointment_type: 'livecare', + payment_type: 'appointment', + payment_method: selectedPaymentMethod, + txn_amount: this.amount, + txn_currency: currency, + error_message: res['Response_Message']); + } + }).catchError((err) { + print(err); + AppToast.showErrorToast(message: err); + GifLoaderDialogUtils.hideDialog(context); + }); + } catch (err) { + print(err); + } + } + + checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + String amount; + String payment_method; + final currency = projectViewModel.user!.outSA == 0 ? "sar" : 'aed'; + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.checkPaymentStatus(widget.isPharmacyLiveCare ? widget.pharmacyLiveCareQRCode! : transID!, widget.isPharmacyLiveCare, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + String paymentInfo = res['Response_Message']; + amount = res['Amount'].toString(); + payment_method = res['PaymentMethod']; + if (paymentInfo == 'Success') { + addNewCallForPatientER(widget.isPharmacyLiveCare! ? widget.pharmacyLiveCareQRCode! : transID!); + } else { + AppToast.showErrorToast(message: res['Response_Message']); + projectViewModel.analytics.liveCare.livecare_immediate_consultation_payment_failed( + appointment_type: 'livecare', payment_type: 'appointment', payment_method: selectedPaymentMethod, txn_amount: this.amount, txn_currency: currency, error_message: res['Response_Message']); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + addNewCallForPatientER(String clientRequestID) { + LiveCareService service = new LiveCareService(); + int languageID = projectViewModel.isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + service.addNewCallForPatientER(selectedClinicID, clientRequestID, selectedCallType, languageID, widget.isPharmacyLiveCare, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showSuccessToast(message: "New Call has been added successfully"); + widget.getLiveCareHistory(); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + getLanguageID() async { + languageID = projectViewModel.isArabic ? "ar" : "en"; + // languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + } + + getLiveCareClinicsList() { + isDataLoaded = false; + LiveCareService service = new LiveCareService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getLivecareClinics(languageID == 'ar' ? 1 : 2, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res['PatientER_GetClinicsList'].length); + if (res['MessageStatus'] == 1) { + setState(() { + liveCareOnlineClinicsListResponse.clear(); + liveCareClinicsListResponse = LiveCareClinicsListResponse.fromJson(res as Map); + + liveCareClinicsListResponse.patientERGetClinicsList!.forEach((clinic) { + if (clinic.isOnline == 1) { + liveCareOnlineClinicsListResponse.add(clinic); + } else { + liveCareOfflineClinicsListResponse.add(clinic); + } + }); + if (liveCareClinicIDs != null) { + selectedClinicID = int.parse(liveCareClinicIDs.split("-")[2]); + selectedClinicName = liveCareClinicIDs.split("-")[0]; + } else { + selectedClinicID = liveCareClinicsListResponse.patientERGetClinicsList![0].serviceID!; + selectedClinicName = liveCareClinicsListResponse.patientERGetClinicsList![0].serviceName!; + } + isDataLoaded = true; + }); + } else { + isDataLoaded = true; + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + getLiveCareScheduleClinicsList() { + isDataLoaded = false; + LiveCareService service = new LiveCareService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getLiveCareScheduledClinics(context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res['ClinicsHaveScheduleList'].length); + if (res['MessageStatus'] == 1) { + setState(() { + liveCareScheduleClinicsListResponse = LiveCareScheduleClinicsListResponse.fromJson(res as Map); + selectedClinicID = liveCareScheduleClinicsListResponse.clinicsHaveScheduleList![0].serviceID!; + selectedClinicName = liveCareScheduleClinicsListResponse.clinicsHaveScheduleList![0].clinicDesc!; + isDataLoaded = true; + }); + } else { + isDataLoaded = true; + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err, localContext: context); + print(err); + }); + } + + openLiveCareSelectionDialog() async { + liveCareClinicIDs = await sharedPref.getString(LIVECARE_CLINIC_DATA); + sharedPref.remove(LIVECARE_CLINIC_DATA); + if (liveCareClinicIDs != null) { + selectedClinicID = int.parse(liveCareClinicIDs.split("-")[2]); + setState(() { + currentSelectedLiveCareType = "immediate"; + }); + // if(widget.isPharmacyLiveCare) { + // + // } else { + getLiveCareClinicsList(); + startLiveCare(); + // } + } else { + Navigator.of(context) + .push(new MaterialPageRoute( + builder: (BuildContext context) { + return LiveCareTypeSelect(); + }, + fullscreenDialog: true)) + .then((value) async { + if (value == null) { + Navigator.pop(context); + } else if (value.contains("/")) { + widget.isPharmacyLiveCare = true; + widget.pharmacyLiveCareQRCode = value.split("/")[1]; + liveCareClinicIDs = await sharedPref.getString(LIVECARE_CLINIC_DATA); + selectedClinicID = 1; + selectedClinicName = TranslationBase.of(context).pharmaLiveCare; + sharedPref.remove(LIVECARE_CLINIC_DATA); + startLiveCare(); + } else { + print(value); + if (value == "immediate") { + setState(() { + LiveCareHome.isLiveCareTypeSelected = true; + currentSelectedLiveCareType = "immediate"; + }); + getLiveCareClinicsList(); + } + if (value == "schedule") { + setState(() { + LiveCareHome.isLiveCareTypeSelected = true; + currentSelectedLiveCareType = "schedule"; + }); + getLiveCareScheduleClinicsList(); + } + } + }); + } + } + + Widget getLiveCareScheduleClinicList() { + return Column( + children: [ + isDataLoaded + ? Expanded( + child: Container( + child: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList!.length > 0 + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + mHeight(10), + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + padding: EdgeInsets.all(0.0), + itemCount: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList!.length, + itemBuilder: (context, index) { + return InkWell( + onTap: () { + updateSelectedScheduleIndex(liveCareScheduleClinicsListResponse.clinicsHaveScheduleList![index]); + }, + child: ScheduleClinicCard( + isSelected: selectedClinicID == liveCareScheduleClinicsListResponse.clinicsHaveScheduleList![index].serviceID ? true : false, + clinicsHaveScheduleList: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList![index], + languageID: languageID, + ), + ); + }, + ), + Container( + height: 10.0, + ), + ], + ) + : getNoDataWidget(context), + ), + ) + : Container(), + isDataLoaded + ? Container( + width: double.infinity, + color: Colors.white, + padding: EdgeInsets.all(12), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width * 0.7, + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.accentColor, + disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38), + disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12), + elevation: 0, + onPressed: startScheduleLiveCare, + child: Text(TranslationBase.of(context).start, style: TextStyle(fontSize: 18.0, color: Colors.white)), + ), + ), + ) + : Container(), + ], + ); + } + + Widget getLiveCareImmediateClinicList() { + return Column( + children: [ + isDataLoaded + ? Expanded( + child: Container( + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + padding: const EdgeInsets.only(top: 16.0), + itemCount: liveCareOnlineClinicsListResponse.length, + itemBuilder: (context, index) { + return InkWell( + onTap: () { + updateSelectedIndex(liveCareOnlineClinicsListResponse[index]); + }, + child: ClinicCard( + isSelected: selectedClinicID == liveCareOnlineClinicsListResponse[index].serviceID ? true : false, + patientERGetClinicsList: liveCareOnlineClinicsListResponse[index], + languageID: languageID, + ), + ); + }, + ), + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + padding: EdgeInsets.all(0.0), + itemCount: liveCareOfflineClinicsListResponse.length, + itemBuilder: (context, index) { + return ClinicCard( + isSelected: selectedClinicID == liveCareOfflineClinicsListResponse[index].serviceID ? true : false, + patientERGetClinicsList: liveCareOfflineClinicsListResponse[index], + languageID: languageID, + ); + }, + ), + Container( + height: 10.0, + ), + ], + )), + ), + ) + : Container(), + isDataLoaded + ? Container( + color: Colors.white, + width: double.infinity, + padding: EdgeInsets.all(16), + child: DefaultButton( + TranslationBase.of(context).start, + () { + startLiveCare(); + }, + ), + ) + : Container(), + ], + ); + } + + void startScheduleLiveCare() { + int languageID = projectViewModel.isArabic ? 1 : 2; + List doctorsList = []; + LiveCareService service = new LiveCareService(); + GifLoaderDialogUtils.showMyDialog(context); + List _patientDoctorAppointmentListHospital = []; + service.getLiveCareScheduledDoctorList(context, selectedClinicID, languageID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + if (res['DoctorByClinicIDList'].length != 0) { + res['DoctorByClinicIDList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson(v)); + }); + + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); + } else { + _patientDoctorAppointmentListHospital + .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); + } + }); + } else {} + }); + this.sharedPref.setBool(IS_LIVECARE_APPOINTMENT, true); + navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); + } else {} + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err, localContext: context); + print(err); + }); + projectViewModel.analytics.liveCare.livecare_schedule_video_call_clinic(clinic: selectedClinicName); + } + + Future navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) async { + Navigator.push(context, + FadePage(page: SearchResults(doctorsList: docList, isLiveCareAppointment: false, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isDoctorSearchResult: false))); + } + + updateSelectedIndex(PatientERGetClinicsList patientERGetClinicsList) { + setState(() { + selectedClinicID = patientERGetClinicsList.serviceID!; + selectedClinicName = patientERGetClinicsList.serviceName!; + }); + } + + updateSelectedScheduleIndex(ClinicsHaveScheduleList patientERGetClinicsList) { + setState(() { + selectedClinicID = patientERGetClinicsList.serviceID!; + selectedClinicName = patientERGetClinicsList.clinicDesc!; + }); + } +} diff --git a/lib/pages/livecare/widgets/livecare_logs.dart b/lib/pages/livecare/widgets/livecare_logs.dart new file mode 100644 index 00000000..92e1f0ab --- /dev/null +++ b/lib/pages/livecare/widgets/livecare_logs.dart @@ -0,0 +1,45 @@ +import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart'; +import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCareHistoryCard.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:flutter/material.dart'; + +class LiveCareLogs extends StatefulWidget { + List erRequestHistoryList; + + LiveCareLogs({required this.erRequestHistoryList}); + + @override + _LiveCareLogsState createState() => _LiveCareLogsState(); +} + +class _LiveCareLogsState extends State { + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return SingleChildScrollView( + child: widget.erRequestHistoryList.length > 0 + ? Container( + child: ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + padding: EdgeInsets.all(0.0), + itemCount: widget.erRequestHistoryList.length, + itemBuilder: (context, index) { + return widget.erRequestHistoryList[index].callStatus! < 4 + ? Container() + : LiveCareHistoryCard( + erRequestHistoryList: widget.erRequestHistoryList[index], + isFirstOrLast: index==0?0:(index==widget.erRequestHistoryList.length-1)?1:2, + ); + }, + ), + ) + : Container(margin: EdgeInsets.only(top: 200.0), child: getNoDataWidget(context)), + ); + } +} diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart new file mode 100644 index 00000000..7766a443 --- /dev/null +++ b/lib/pages/login/confirm-login.dart @@ -0,0 +1,986 @@ +import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/main.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; +import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; +import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; +import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/login/login.dart'; +import 'package:diplomaticquarterapp/pages/login/register_new.dart'; +import 'package:diplomaticquarterapp/pages/login/user-login-agreement-page.dart'; +import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/whatsapp_method_channel.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:intl/intl.dart'; +import 'package:local_auth/local_auth.dart'; +import 'package:provider/provider.dart'; +// import 'package:local_auth_ios/types/auth_messages_ios.dart'; + +class ConfirmLogin extends StatefulWidget { + final Function? changePageViewIndex; + final fromRegistration; + final bool isDubai; + + const ConfirmLogin({Key? key, this.changePageViewIndex, this.fromRegistration = false, this.isDubai = false}) : super(key: key); + + @override + _ConfirmLogin createState() => _ConfirmLogin(); +} + +class _ConfirmLogin extends State { + final LocalAuthentication auth = LocalAuthentication(); + var _availableBiometrics; + var sharedPref = AppSharedPreferences(); + bool authenticated = false; + final authService = AuthProvider(); + PharmacyModuleViewModel pharmacyModuleViewModel = locator(); + late int mobileNumber; + String errorMsg = ''; + SelectDeviceIMEIRES? user; + bool isLoading = false; + var registerd_data; + bool isMoreOption = false; + var zipCode; + + var patientOutSA; + + var loginTokenID; + + var loginType; + + var deviceToken; + + var lastLogin; + + late int selectedOption; + + bool onlySMSBox = false; + var userData; + + late BuildContext _context; + + late bool _loading; + + int fingrePrintBefore = 0; + + AuthenticatedUserObject authenticatedUserObject = locator(); + AppointmentRateViewModel appointmentRateViewModel = locator(); + late ProjectViewModel projectViewModel; + + late ToDoCountProviderModel toDoProvider; + + var dob; + late int isHijri; + var healthId; + + @override + void initState() { + _getAvailableBiometrics(); + setDefault(); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + toDoProvider = Provider.of(context); + return Scaffold( + backgroundColor: Color(0xfff8f8f8), + resizeToAvoidBottomInset: false, + appBar: AppBar( + backgroundColor: Colors.transparent, + leading: IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Color(0xff2B353E), + onPressed: () => Navigator.pop(context), + ), + ), + body: Padding( + padding: EdgeInsets.only(bottom: 20, left: 21, right: 21), + child: Column( + children: [ + Expanded( + child: ListView( + padding: EdgeInsets.zero, + physics: BouncingScrollPhysics(), + children: [ + SizedBox(height: 12), + if (user != null && isMoreOption == false) + Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).welcomeBack, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64), + ), + Text( + user!.name!.toLowerCase().capitalizeFirstofEach, + style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2B353E), height: 1, letterSpacing: -1.44), + ), + SizedBox(height: 10), + Text( + TranslationBase.of(context).accountInfo, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 25 / 16), + ), + Container( + height: 72, + margin: EdgeInsets.only(top: 23, bottom: 23), + alignment: Alignment.center, + padding: EdgeInsets.only(left: 17, right: 12), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + TranslationBase.of(context).lastLoginAt.toCamelCase, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64), + ), + Text( + // user!.editedOn != null + // ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.editedOn!)) + // : + user!.createdOn != null ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.createdOn!)) : '--', + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + TranslationBase.of(context).lastLoginWith.toCamelCase, + style: TextStyle( + fontSize: 10, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + ), + ), + Text( + " " + getType(user!.logInType, context), + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + ), + ), + Expanded(child: SizedBox()), + Text( + // user!.editedOn != null + // ? DateUtil.formatDateToTimeLang( + // DateUtil.convertStringToDate( + // user!.editedOn!), + // false) + // : + user!.createdOn != null ? DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(user!.createdOn!), false) : '--', + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48), + ), + ], + ) + ], + ), + ), + Text( + TranslationBase.of(context).pleaseVerify, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), + ), + GridView( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9), + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(top: 9), + shrinkWrap: true, + children: [ + getButton(3), + getButton(2), + getButton(1), + getButton(4), + ], + ) + ], + ) + else + Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ + Image.asset( + 'assets/images/habib-logo.png', + height: 90, + width: 90, + ), + SizedBox(height: 23), + this.onlySMSBox == false + ? Text( + TranslationBase.of(context).verifyLoginWith, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 25 / 16), + ) + : Text( + TranslationBase.of(context).verifyFingerprint2, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 25 / 16), + ), + SizedBox(height: 23), + Text( + TranslationBase.of(context).pleaseVerify, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), + ), + GridView( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9), + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(top: 9), + shrinkWrap: true, + children: [ + if (onlySMSBox == false) getButton(3), + if (onlySMSBox == false) getButton(2), + getButton(1), + getButton(4), + ], + ), + ]), + ], + ), + ), + SizedBox( + height: 12, + ), + DefaultButton( + TranslationBase.of(context).useAnotherAccount, + () { + Navigator.of(context).pushNamed(LOGIN_TYPE); + projectViewModel.analytics.loginRegistration.login_with_other_account(); + }, + ), + ], + ), + ), + ); + } + + Future _getAvailableBiometrics() async { + final bool canAuthenticateWithBiometrics = await auth.canCheckBiometrics; + final bool canAuthenticate = canAuthenticateWithBiometrics || await auth.isDeviceSupported(); + + var availableBiometrics; + try { + availableBiometrics = await auth.getAvailableBiometrics(); + // print(availableBiometrics); + } on PlatformException catch (e) { + AppToast.showErrorToast(message: e.message!); + print(e); + } + if (!mounted) return; + + setState(() { + _availableBiometrics = availableBiometrics; + }); + } + + int login_method = 0; + + authenticateUser(int type, {int? isActive}) { + GifLoaderDialogUtils.showMyDialog(context); + if (type == 2 || type == 3) { + fingrePrintBefore = type; + } + this.selectedOption = fingrePrintBefore != null ? fingrePrintBefore : type; + + login_method = type; + LoginRegistration.verificationMethod = type; + // if(!widget.fromRegistration) + projectViewModel.analytics.loginRegistration.login_verfication(forRegistration: widget.fromRegistration); + + switch (type) { + case 1: + this.loginWithSMS(type); + break; + case 2: + this.loginWithFingurePrintFace(type, isActive!); + break; + case 3: + this.loginWithFingurePrintFace(type, isActive!); + break; + case 4: + this.loginWithSMS(type); + break; + default: + break; + } + sharedPref.setInt(LAST_LOGIN, this.selectedOption); //this.cs.sharedService.setStorage(this.selectedOption, AuthenticationService.LAST_LOGIN); + } + + loginWithSMS(type) async { + if (type == 4) { + var channel = WhatsappMethodChannel(); + // var whatsappStatus = await channel.isWhatsAppInstalled(); + // if(whatsappStatus) { + // print("whatapp is installed"); + channel.handleHandShake(); + // }else{ + // print("whatapp is not installed"); + // } + } + + //if (!el.disabled) { + if (this.user != null && this.registerd_data == null) { + this.checkUserAuthentication(type); + } else { + if (this.loginTokenID != null) { + // Future.delayed(Duration(seconds: 1), () { + this.sendActivationCode(type); + // }); + } else { + this.checkUserAuthentication(type); + } + } + } + + checkUserAuthentication(type) { + showLoader(true); + var req = getCommonRequest(type: type); + req.logInTokenID = ""; + + var request = CheckPatientAuthenticationReq.fromJson(req.toJson()); + + sharedPref.setObject(REGISTER_DATA_FOR_REGISTER, request); + authService + .checkPatientAuthentication(request) + .then((value) => { + GifLoaderDialogUtils.hideDialog(context), + if (value['isSMSSent']) + { + sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']), + this.loginTokenID = value['LogInTokenID'], + sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, request), + // Future.delayed(Duration(seconds: 1), () { + this.sendActivationCode(type) + // }) + } + else + { + if (value['IsAuthenticated']) {this.checkActivationCode()} + } + }) + .catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + sendActivationCode(type) async { + var request = this.getCommonRequest(type: type); + request.sMSSignature = await SMSOTP.getSignature(); + GifLoaderDialogUtils.showMyDialog(context); + if (healthId != null || widget.isDubai) { + if (!widget.isDubai) { + request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob)); + } + request.healthId = healthId; + request.isHijri = isHijri; + await this.authService.sendActivationCodeRegister(request).then((result) { + GifLoaderDialogUtils.hideDialog(context); + if (result != null && result['isSMSSent'] == true) { + this.startSMSService(type); + } + }).catchError((r) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: r); + }); + } else { + request.dob = ""; + request.healthId = ""; + request.isHijri = 0; + await this.authService.sendActivationCode(request).then((result) { + GifLoaderDialogUtils.hideDialog(context); + if (result != null && result['isSMSSent'] == true) { + this.startSMSService(type); + } + }).catchError((r) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: r.toString()); + }); + } + } + + var tempType; + + startSMSService(type) { + tempType = type; + new SMSOTP( + context, + type, + this.mobileNumber, + (value) { + this.checkActivationCode(value: value); + }, + () => { + Navigator.pop(context), + }, + ).displayDialog(context); + } + + loginWithFingurePrintFace(type, int isActive) async { + if (isActive == 1 || isActive == 0) { + try { + authenticated = await auth.authenticate( + localizedReason: 'Scan your fingerprint to authenticate', + options: AuthenticationOptions( + useErrorDialogs: true, + stickyAuth: true, + ), + authMessages: [ + // IOSAuthMessages( + // cancelButton: 'cancel', + // goToSettingsButton: 'settings', + // goToSettingsDescription: 'Please set up your Touch ID.', + // lockOut: 'Please reenable your Touch ID'), + ], + ); + } on PlatformException catch (e) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: 'Please enable your Touch or Face ID'); + } + + if (authenticated == true) { + // if (user != null && (user.logInType == 2 || user.logInType == 3)) { + // this.checkActivationCode(); + // } else { + + var request = this.getCommonRequest(type: type); + this.getMobileInfo(request); + //} + } + } + } + + getMobileInfo(request) { + // GifLoaderDialogUtils.showMyDialog(context); + this.authService.getLoginInfo(request).then((result) { + GifLoaderDialogUtils.hideDialog(context); + if (result['SMSLoginRequired'] == false) { + this.loginTokenID = result['LogInTokenID']; + this.patientOutSA = result['PatientOutSA']; + // sms for register the biometric + if (result['isSMSSent']) { + setState(() { + isMoreOption = true; + this.onlySMSBox = true; + // this.fingrePrintBefore = true; + }); + //this.button(); + } else { + setDefault(); + checkActivationCode(); + } + } else { + if (result['IsAuthenticated'] == true) { + setState(() { + isMoreOption = true; + this.onlySMSBox = true; + // this.fingrePrintBefore = true; + }); + } + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + setDefault() async { + showLoader(true); + if (await sharedPref.getObject(IMEI_USER_DATA) != null) user = SelectDeviceIMEIRES.fromJson(await sharedPref.getObject(IMEI_USER_DATA)); + + if (await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN) != null) { + isMoreOption = true; + this.registerd_data = await CheckPatientAuthenticationReq.fromJson(await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN)); + } + + this.mobileNumber = this.registerd_data != null ? this.registerd_data.patientMobileNumber : int.parse(this.user!.mobile!); + this.zipCode = this.registerd_data != null + ? this.registerd_data.zipCode + : this.user!.outSA == true + ? "971" + : "966"; + this.patientOutSA = this.registerd_data != null + ? this.registerd_data.zipCode == "966" + ? 0 + : 1 + : this.user!.outSA; + if (this.registerd_data != null) { + this.loginTokenID = await sharedPref.getString(LOGIN_TOKEN_ID); + this.loginType = this.registerd_data.searchType; + } + var nhic = await sharedPref.getObject(NHIC_DATA); + if (nhic != null) { + final DateFormat dateFormat = DateFormat('MM/dd/yyyy'); + final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy'); + dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(dateFormat.parse(nhic['DateOfBirth'])); + + isHijri = nhic['IsHijri'] ? 1 : 0; + healthId = nhic['HealthId']; + } + this.deviceToken = await sharedPref.getString(PUSH_TOKEN); + this.lastLogin = await sharedPref.getInt(LAST_LOGIN) != null + ? await sharedPref.getInt(LAST_LOGIN) + : user != null + ? user!.logInType + : null; + + showLoader(false); + //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN); + } + + getCommonRequest({type}) { + var request = SendActivationRequest(); + request.patientMobileNumber = this.mobileNumber; + request.mobileNo = '0' + this.mobileNumber.toString(); + request.deviceToken = this.deviceToken; + request.projectOutSA = this.patientOutSA == true ? true : false; + request.loginType = this.selectedOption; + request.oTPSendType = type == 1 ? type : 2; //this.selectedOption == 1 ? 1 : 2; + request.zipCode = this.zipCode; + + request.logInTokenID = this.loginTokenID ?? ""; + + if (this.registerd_data != null) { + request.searchType = this.registerd_data.searchType != null ? this.registerd_data.searchType : 1; + request.patientID = this.registerd_data.patientID != null ? this.registerd_data.patientID : 0; + request.patientIdentificationID = request.nationalID = this.registerd_data.patientIdentificationID != null ? this.registerd_data.patientIdentificationID : '0'; + request.dob = this.registerd_data.dob; + request.isRegister = this.registerd_data.isRegister; + } else { + request.searchType = request.searchType != null ? request.searchType : 2; + request.patientID = this.user!.patientID != null ? this.user!.patientID : 0; + request.nationalID = request.nationalID != null ? request.nationalID : '0'; + request.patientIdentificationID = request.patientIdentificationID != null ? request.patientIdentificationID : '0'; + request.isRegister = false; + } + request.deviceTypeID = request.searchType; + return request; + } + + checkActivationCode({value}) async { + // Navigator.pop(context); + GifLoaderDialogUtils.showMyDialog(context); + var request = this.getCommonRequest().toJson(); + dynamic res; + if (healthId != null || widget.isDubai) { + if (!widget.isDubai) { + request['DOB'] = dob; + } + request['HealthId'] = healthId; + request['IsHijri'] = isHijri; + + authService + .checkActivationCodeRegister(request, value) + .then((result) => { + res = result, + if (result is Map) + { + result = CheckActivationCode.fromJson(result as Map), + if (this.registerd_data != null && this.registerd_data.isRegister == true) + { + // if(widget.isDubai ==false){ + widget.changePageViewIndex!(1), + // if(widget.isDubai ==false){ + + Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)), + } + } + else + { + // Navigator.of(context).pop(), + GifLoaderDialogUtils.hideDialog(context), + Future.delayed(Duration(seconds: 1), () { + AppToast.showErrorToast(message: result); + }), + projectViewModel.analytics.loginRegistration.login_fail(error: result), + projectViewModel.analytics.errorTracking.log('otp_verification_at_confirm_login', error: result), + } + }) + .catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + Future.delayed(Duration(seconds: 1), () { + AppToast.showErrorToast(message: err); + startSMSService(tempType); + }); + }); + } else { + authService + .checkActivationCode(request, value) + .then((result) async => { + res = result, + if (result is Map) + { + result = CheckActivationCode.fromJson(result as Map), + if (result.errorCode == '699') + { + //699 block run here + GifLoaderDialogUtils.hideDialog(context), + Future.delayed(Duration(seconds: 2), () { + AppToast.showErrorToast(message: result.errorEndUserMessage); + Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: Login)); + }) + } + else if (this.registerd_data != null && this.registerd_data.isRegister == true) + { + widget.changePageViewIndex!(1), + Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)), + } + else + { + sharedPref.remove(FAMILY_FILE), + result.list.isFamily = false, + userData = result.list, + sharedPref.setString(BLOOD_TYPE, result.patientBloodType ?? ""), + //Remove o+ from here Added by Aamir + authenticatedUserObject.user = result.list, + projectViewModel.setPrivilege(privilegeList: res), + await sharedPref.setObject(MAIN_USER, result.list), + await sharedPref.setObject(USER_PROFILE, result.list), + loginTokenID = result.logInTokenID, + await sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID), + await sharedPref.setString(TOKEN, result.authenticationTokenID), + checkIfUserAgreedBefore(result), + projectViewModel.analytics.loginRegistration.login_successful(), + } + } + else + { + // Navigator.of(context).pop(), + GifLoaderDialogUtils.hideDialog(context), + Future.delayed(Duration(seconds: 1), () { + Navigator.of(context).pop(); + AppToast.showErrorToast(message: result, localContext: context); + startSMSService(tempType); + }), + + projectViewModel.analytics.loginRegistration.login_fail(error: result), + projectViewModel.analytics.errorTracking.log('otp_verification_at_confirm_login', error: result) + } + }) + .catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + Future.delayed(Duration(seconds: 1), () { + print(err); + AppToast.showErrorToast(message: err); + startSMSService(tempType); + }); + }); + } + } + + checkIfUserAgreedBefore(CheckActivationCode result) { + if (projectViewModel.havePrivilege(109)) { + this.authService.checkIfUserAgreed().then((result) { + if (result['IsPatientAlreadyAgreed']) { + goToHome(); + } else { + this.authService.getUserAgreementContent().then((result) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: UserLoginAgreementPage( + userAgreementText: result['UserAgreementContent'], + authenticatedUserObject: authenticatedUserObject, + appointmentRateViewModel: appointmentRateViewModel, + selectedOption: selectedOption, + isArabic: projectViewModel.isArabic, + ), + ), + (r) => false); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } else { + goToHome(); + } + + // if (result.isNeedUserAgreement == true) { + // // move to agreement page. + // } else { + // goToHome(); + // } + } + + checkIfIsInPatient() { + bool isAdmitted = false; + bool hasAdmissionRequest = false; + GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; + GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel; + ClinicListService service = new ClinicListService(); + service.checkIfInPatientAPI(context).then((res) { + if (res['MessageStatus'] == 1) { + isAdmitted = res['isAdmitted']; + hasAdmissionRequest = res['hasAdmissionRequests']; + print("IS ADMITTED: $isAdmitted"); + print("Has Admission Request: $hasAdmissionRequest"); + if (isAdmitted) { + if (res['PatientAdmittedInformation'].length != 0) { + getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); + projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); + projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); + projectViewModel.setIsPatientAdmitted(true); + } + } + if (hasAdmissionRequest) { + if (res['MedicalInstruction'].length != 0) { + getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]); + // projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']); + projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['projectId']); + projectViewModel.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel); + projectViewModel.setPatientHasAdmissionRequest(true); + } + } + } else {} + }); + } + + insertIMEI() { + authService.insertDeviceImei(selectedOption).then((value) => {}).catchError((err) { + print(err); + }); + } + + getToDoCount() { + toDoProvider.setState(0, 0, true, "0"); + ClinicListService service = new ClinicListService(); + service.getActiveAppointmentNo(context).then((res) { + if (res['MessageStatus'] == 1) { + toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, "0"); + // toDoProvider.setState(res['AppointmentActiveNumber'], true, "0"); + } else {} + }).catchError((err) { + print(err); + }); + } + + goToHome() async { + authenticatedUserObject.isLogin = true; + appointmentRateViewModel.isLogin = true; + projectViewModel.isLogin = true; + projectViewModel.user = authenticatedUserObject.user; + await authenticatedUserObject.getUser(getUser: true); + + // GifLoaderDialogUtils.hideDialog(context); + getToDoCount(); + checkIfIsInPatient(); + appointmentRateViewModel + .getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2) + .then((value) => { + GifLoaderDialogUtils.hideDialog(AppGlobal.context), + if (appointmentRateViewModel.isHaveAppointmentNotRate) + { + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: RateAppointmentDoctor(), + ), + (r) => false) + } + else + { + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: LandingPage(), + ), + (r) => false) + }, + insertIMEI() + }) + .catchError((err) { + print(err); + }); + } + + loading(flag) { + setState(() { + isLoading = flag; + }); + } + + Widget _loginOptionButton(String _title, String _icon, int _flag, int? _loginIndex) { + bool isDisable = (_flag == 3 && !checkIfBiometricAvailable(BiometricType.face) || + _flag == 2 && !checkIfBiometricAvailable(BiometricType.fingerprint) && _flag == 2 && !checkIfBiometricAvailable(BiometricType.strong)); + return InkWell( + onTap: isDisable + ? null + : () { + if (_flag == 0) { + setState(() { + isMoreOption = true; + }); + } else { + authenticateUser(_flag, isActive: _loginIndex); + projectViewModel.analytics.loginRegistration.verify_otp_method(forRegistration: widget.fromRegistration); + } + }, + child: Container( + padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: isDisable ? Colors.grey.withOpacity(0.3) : Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SvgPicture.asset( + _icon, + height: 38, + width: 38, + color: isDisable ? Color(0xff2B353E).withOpacity(0.7) : null, + ), + Text( + TranslationBase.of(context).verifyThrough + " " + _title, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: isDisable ? Color(0xff2B353E).withOpacity(0.7) : Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16), + ), + ], + ), + ), + ); + } + + // todo 'sikander' optimize this after knowing usage + Widget getButton(int flag) { + switch (flag) { + case 4: + return _loginOptionButton(TranslationBase.of(context).verifyWhatsApp, 'assets/images/new/verify_whatsapp.svg', flag, null); + break; + case 1: + return _loginOptionButton(TranslationBase.of(context).verifySMS, 'assets/images/new/verify_sms.svg', flag, null); + break; + case 2: + return _loginOptionButton(TranslationBase.of(context).verifyFingerprint, 'assets/images/new/verify_thumb.svg', flag, BiometricType.fingerprint.index); + break; + case 3: + return _loginOptionButton(TranslationBase.of(context).verifyFaceID, 'assets/images/new/verify_face.svg', flag, BiometricType.face.index); + break; + + default: + return InkWell( + onTap: () => { + setState(() { + isMoreOption = true; + }) + }, + child: RoundedContainer( + height: 150, + backgroundColor: BiometricType.fingerprint.index == 1 ? Colors.white : Colors.white.withOpacity(.7), + borderColor: Colors.grey, + showBorder: true, + child: Padding( + padding: EdgeInsets.fromLTRB(0, 0, 0, 5), + child: Column( + children: [ + Image.asset( + 'assets/images/login/more_icon.png', + height: 45, + width: SizeConfig.imageSizeMultiplier! * 16, + ), + projectViewModel.isArabic + ? SizedBox( + height: 15, + ) + : SizedBox( + height: 20, + ), + Texts(TranslationBase.of(context).moreVerification, fontSize: SizeConfig.textMultiplier! * 1.8, textAlign: TextAlign.center, color: Colors.black) + ], + ), + ), + ), + ); + } + } + + getType(type, context) { + switch (type) { + case 1: + return TranslationBase.of(context).verifySMS; + break; + case 2: + return TranslationBase.of(context).verifyFingerprint; + break; + case 3: + return TranslationBase.of(context).verifyFaceID; + break; + case 4: + return TranslationBase.of(context).verifyWhatsApp; + break; + default: + return TranslationBase.of(context).verifySMS; + break; + } + } + + bool checkIfBiometricAvailable(BiometricType biometricType) { + bool isAvailable = false; + if (_availableBiometrics != null) { + for (var i = 0; i < _availableBiometrics.length; i++) { + if (biometricType == _availableBiometrics[i]) isAvailable = true; + } + } + return isAvailable; + } + + formatDate(date) { + return DateFormat('MMM dd, yyy, kk:mm').format(date); + } + + showLoader(bool isTrue) { + setState(() { + isLoading = isTrue; + }); + } +} diff --git a/lib/pages/login/forgot-password.dart b/lib/pages/login/forgot-password.dart new file mode 100644 index 00000000..529d0b8f --- /dev/null +++ b/lib/pages/login/forgot-password.dart @@ -0,0 +1,261 @@ +import 'package:cloudflare_turnstile/cloudflare_turnstile.dart'; +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/habib_logo_widget.dart'; +import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart'; +import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class ForgotPassword extends StatefulWidget { + @override + _ForgotPassword createState() => _ForgotPassword(); +} + +class _ForgotPassword extends State { + String selectedType = 'Saudi Arabia'; + String countryCode = '966'; + final TextEditingController nationalIDorFile = TextEditingController(); + String mobileNo = ""; + var con; + + final TurnstileController _controller = TurnstileController(); + final TurnstileOptions _options = TurnstileOptions( + size: TurnstileSize.normal, + theme: TurnstileTheme.light, + refreshExpired: TurnstileRefreshExpired.manual, + language: 'en', + retryAutomatically: false, + ); + + String? _token; + + @override + void dispose() { + super.dispose(); + _controller.dispose(); + } + + @override + Widget build(BuildContext context) { + con = context; + + return Scaffold( + backgroundColor: Color(0xfff8f8f8), + appBar: AppBar( + backgroundColor: Colors.transparent, + leading: IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Color(0xff2B353E), + onPressed: () => Navigator.pop(context), + ), + ), + body: Padding( + padding: EdgeInsets.only(bottom: 20, left: 21, right: 21), + child: Column(children: [ + Expanded( + child: ListView( + padding: EdgeInsets.zero, + physics: BouncingScrollPhysics(), + children: [ + SizedBox(height: 12), + HabibLogoWidget(), + SizedBox(height: 50), + Text( + TranslationBase.of(context).forgotDesc, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + SizedBox(height: 20), + PhoneNumberSelectorWidget(onNumberChange: (value) { + setState(() { + mobileNo = value; + }); + }, onCountryChange: (value) { + setState(() { + countryCode = value; + }); + }), + const SizedBox(height: 12.0), + CloudFlareTurnstile( + siteKey: '0x4AAAAAAAkmbvEy63pcxBBt', + baseUrl: BASE_URL, + options: _options, + controller: _controller, + onTokenRecived: (token) { + setState(() { + print("Cloudflare token: $token"); + _token = token; + }); + }, + onTokenExpired: () {}, + mode: TurnstileMode.managed, + errorBuilder: (context, error) { + return Text(error.message); + }, + ), + const SizedBox(height: 48.0), + ], + ), + ), + SizedBox( + height: 43, + width: double.infinity, + child: TextButton( + onPressed: () { + sendPatientIDBySMS(); + locator().loginRegistration.recover_file_number(); + }, + child: Text( + TranslationBase.of(context).submit, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.48), + ), + style: TextButton.styleFrom( + backgroundColor: (mobileNo.length >= 9) == true ? Color(0xffD02127) : Color(0xff575757), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + ), + ), + ]), + ), + ); + + return AppScaffold( + appBarTitle: TranslationBase.of(context).forgotFileNoTitle, + isShowAppBar: true, + isShowDecPage: false, + body: SingleChildScrollView( + child: Container( + padding: EdgeInsets.only(top: 10, left: 20, right: 20), + height: SizeConfig.realScreenHeight! * .8, + width: SizeConfig.realScreenWidth, + child: Column(children: [ + Expanded( + flex: 1, + child: AppText( + TranslationBase.of(context).forgotDesc, + fontSize: SizeConfig.textMultiplier! * 3, + textAlign: TextAlign.start, + marginTop: 10.0, + )), + Expanded( + flex: 2, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [], + ), + MobileNo(onNumberChange: (value) { + setState(() { + mobileNo = value; + }); + }, onCountryChange: (value) { + setState(() { + countryCode = value; + }); + }), + ], + ), + ), + Expanded( + flex: 2, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Row( + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).submit, + () { + // if (mobileNo.length >= 9 == true) + // sendPatientIDBySMS(); + if (mobileNo.length >= 9) sendPatientIDBySMS(); +// print(mobileNo.text); + }, + color: mobileNo.length >= 9 == true ? Colors.grey[900] : Colors.grey, + textColor: Colors.white, + )), + ], + ), + ], + )) + ]), + ))); + } + + sendPatientIDBySMS() { + GifLoaderDialogUtils.showMyDialog(context); + final authService = new AuthProvider(); + authService.sendPatientIDSMS(mobileNo, countryCode, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + this.startSMSService(mobileNo, res['LogInTokenID']); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + startSMSService(mobile, token) { + new SMSOTP( + context, + 1, + mobile, + (value) => {this.checkActivationCode(value, token, int.parse(mobileNo))}, + () => { + print('Faild..'), + }, + ).displayDialog(context); + } + + checkActivationCode(value, token, mobileNo) { + GifLoaderDialogUtils.showMyDialog(context); + final authService = new AuthProvider(); + var request = { + "LogInTokenID": token, + "PatientOutSA": (countryCode == '966' || countryCode == '+966') ? 0 : 1, + "PatientMobileNumber": mobileNo, + "ZipCode": countryCode, + "activationCode": value, + "isRegister": false, + "IsSilentLogin": false + }; + authService.forgotPasswordActivation(request, value).then((res) { + if (res is String) { + GifLoaderDialogUtils.hideDialog(con); + Future.delayed(Duration(seconds: 1), () { + AppToast.showErrorToast(message: res); + }); + } else { + GifLoaderDialogUtils.hideDialog(con); + Navigator.of(context).pop(); + AlertDialogBox( + context: con, + confirmMessage: res['ReturnMessage'], + okText: TranslationBase.of(con).ok, + okFunction: () { + AlertDialogBox.closeAlertDialog(con); + Navigator.of(context).pop(); + }).showAlertDialog(context); + } + }); + } +} diff --git a/lib/pages/login/login-type.dart b/lib/pages/login/login-type.dart new file mode 100644 index 00000000..a9e309bc --- /dev/null +++ b/lib/pages/login/login-type.dart @@ -0,0 +1,272 @@ +import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart'; +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/pages/login/forgot-password.dart'; +import 'package:diplomaticquarterapp/pages/login/login.dart'; +import 'package:diplomaticquarterapp/pages/login/register_new.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/habib_logo_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; + +class LoginType extends StatelessWidget { + static int loginType = 0; + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Color(0xfff8f8f8), + resizeToAvoidBottomInset: false, + appBar: AppBar( + backgroundColor: Colors.transparent, + leading: IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Color(0xff2B353E), + onPressed: () => Navigator.pop(context), + ), + ), + body: Padding( + padding: EdgeInsets.only(bottom: 20, left: 21, right: 21), + child: Column(children: [ + Expanded( + child: ListView( + padding: EdgeInsets.zero, + physics: BouncingScrollPhysics(), + children: [ + SizedBox(height: 12), + HabibLogoWidget(), + SizedBox(height: 50), + Text( + TranslationBase.of(context).logintypeRadio, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + GridView( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9), + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(top: 25), + shrinkWrap: true, + children: [ + getButton(context, TranslationBase.of(context).nationalIdNumber, 'assets/images/new/national_id.svg', 1), + getButton(context, TranslationBase.of(context).medicalFileNumber, 'assets/images/new/medical_file.svg', 2), + ], + ), + SizedBox(height: 20), + RichText( + text: TextSpan( + text: TranslationBase.of(context).forgotPassword, + style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffC9272B), letterSpacing: -0.48, height: 18 / 12), + recognizer: TapGestureRecognizer() + ..onTap = () { + Navigator.of(context).push(FadePage(page: ForgotPassword())); + locator().loginRegistration.forget_file_number(); + }, + ), + ), + ], + ), + ), + SizedBox( + height: 43, + width: double.infinity, + child: TextButton( + onPressed: () { + Navigator.of(context).push(FadePage(page: RegisterNew())); + locator().loginRegistration.register_now(); + }, + child: Text( + TranslationBase.of(context).registerNow, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.48), + ), + style: TextButton.styleFrom( + backgroundColor: Color(0xffD02127), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + ), + ), + ]), + ), + ); + + // AppScaffold( + // appBarTitle: TranslationBase.of(context).login, + // isShowAppBar: true, + // isShowDecPage: false, + // body: SingleChildScrollView( + // child: Container( + // padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30), + // height: SizeConfig.realScreenHeight * .9, + // width: SizeConfig.realScreenWidth, + // child: Column( + // children: [ + // Expanded( + // flex: 4, + // child: Column( + // // mainAxisAlignment: MainAxisAlignment.spaceEvenly, + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Image.asset( + // 'assets/images/DQ/logo.png', + // height: 90, + // width: 90, + // ), + // AppText( + // TranslationBase.of(context).logintypeRadio, + // fontSize: SizeConfig.textMultiplier * 3.5, + // textAlign: TextAlign.start, + // marginBottom: 20.0, + // marginTop: 20.0, + // ), + // Row( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Expanded( + // child: InkWell( + // onTap: () => { + // LoginType.loginType = 1, + // Navigator.of(context).push(FadePage(page: Login())), + // }, + // child: RoundedContainer( + // borderColor: Colors.grey, + // showBorder: true, + // child: Padding( + // padding: EdgeInsets.fromLTRB(20, 10, 20, 10), + // child: Column( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Image.asset( + // 'assets/images/id_card_icon.png', + // height: SizeConfig.imageSizeMultiplier * 12, + // width: SizeConfig.imageSizeMultiplier * 15, + // ), + // SizedBox( + // height: 20, + // ), + // AppText( + // TranslationBase.of(context).idNo, + // fontSize: SizeConfig.textMultiplier * 2, + // fontWeight: FontWeight.bold, + // ) + // ], + // ), + // )))), + // Expanded( + // child: InkWell( + // onTap: () => { + // LoginType.loginType = 2, + // Navigator.of(context).push(FadePage(page: Login())), + // }, + // child: RoundedContainer( + // borderColor: Colors.grey, + // showBorder: true, + // child: Padding( + // padding: EdgeInsets.fromLTRB(25, 10, 25, 10), + // child: Column( + // children: [ + // Image.asset( + // 'assets/images/my_file_white_icon.png', + // height: SizeConfig.imageSizeMultiplier * 12, + // width: SizeConfig.imageSizeMultiplier * 15, + // ), + // SizedBox( + // height: 20, + // ), + // AppText( + // TranslationBase.of(context).fileNo, + // fontSize: SizeConfig.textMultiplier * 2, + // fontWeight: FontWeight.bold, + // ) + // ], + // ), + // )))) + // ], + // ), + // SizedBox( + // height: 25, + // ), + // Divider( + // color: Colors.grey, + // height: 2, + // ), + // Center( + // child: InkWell( + // onTap: () => { + // Navigator.of(context).push(FadePage(page: ForgotPassword())), + // }, + // child: AppText(TranslationBase.of(context).forgotPassword, fontSize: SizeConfig.textMultiplier * 2.5, marginTop: 20.0, underline: true))) + // ]), + // ), + // Expanded( + // flex: 1, + // child: Column( + // mainAxisAlignment: MainAxisAlignment.end, + // children: [ + // Divider( + // color: Colors.grey, + // height: 2, + // ), + // SizedBox( + // height: 10, + // ), + // Row( + // children: [ + // Expanded( + // child: DefaultButton( + // TranslationBase.of(context).registerNow, + // () => { + // Navigator.of(context).push(FadePage(page: Register())), + // }, + // )), + // ], + // ), + // ], + // )) + // ], + // )))); + } + + Widget getButton(BuildContext _context, String _title, String _icon, int _flag) { + var type = ''; + if (_flag == 1) type = 'national id'; + if (_flag == 2) type = 'file number'; + + return InkWell( + onTap: () { + LoginType.loginType = _flag; + LoginRegistration.loginMethod = _flag; + Navigator.of(_context).push(FadePage(page: Login())); + locator().loginRegistration.login_start(method: type); + }, + child: Container( + padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SvgPicture.asset( + _icon, + height: 38, + width: 38, + ), + Text( + _title, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart new file mode 100644 index 00000000..832e0a1e --- /dev/null +++ b/lib/pages/login/login.dart @@ -0,0 +1,500 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/geofencing/requests/GeoZonesRequestModel.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/service/geofencing/GeofencingServices.dart'; +import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; +import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/login/confirm-login.dart'; +import 'package:diplomaticquarterapp/pages/login/login-type.dart'; +import 'package:diplomaticquarterapp/pages/login/register_new.dart'; +import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/habib_logo_widget.dart'; +import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:provider/provider.dart'; + +class Login extends StatefulWidget { + @override + _Login createState() => _Login(); +} + +class _Login extends State { + final util = Utils(); + final nationalIDorFile = TextEditingController(); + final mobileNumberController = TextEditingController(); + int loginType = LoginType.loginType; + String? mobileNo; + String countryCode = '966'; + bool isButtonDisabled = true; + final authService = AuthProvider(); + var sharedPref = AppSharedPreferences(); + bool isLoading = false; + AppointmentRateViewModel appointmentRateViewModel = + locator(); + PharmacyModuleViewModel pharmacyModuleViewModel = + locator(); + + AuthenticatedUserObject authenticatedUserObject = + locator(); + + late ProjectViewModel projectViewModel; + late ToDoCountProviderModel toDoProvider; + + var familyFileProvider = FamilyFilesProvider(); + + @override + void initState() { +// getDeviceToken(); + super.initState(); + + // if (BASE_URL.contains("uat.")) { + // nationalIDorFile.text = "2001273"; + // mobileNumberController.text = mobileNo = "0555416043"; + // } + getRegisterData(); + /* else { + nationalIDorFile.text = "3376044"; + mobileNumberController.text = mobileNo = "0555416575"; + }*/ + } + + getDeviceToken() async { + setState(() async { + nationalIDorFile.text = await sharedPref.getString(PUSH_TOKEN); + }); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + toDoProvider = Provider.of(context); + + return Scaffold( + backgroundColor: Color(0xfff8f8f8), + appBar: AppBar( + backgroundColor: Colors.transparent, + leading: IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Color(0xff2B353E), + onPressed: () => Navigator.pop(context), + ), + ), + body: Padding( + padding: EdgeInsets.only(bottom: 20, left: 21, right: 21), + child: Column(children: [ + Expanded( + child: ListView( + padding: EdgeInsets.zero, + physics: BouncingScrollPhysics(), + children: [ + SizedBox(height: 12), + HabibLogoWidget(), + SizedBox(height: 50), + Text( + loginType == 1 + ? TranslationBase.of(context).enterNationalId + : TranslationBase.of(context).enterFile, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + height: 23 / 16, + ), + ), + SizedBox(height: 20), + PhoneNumberSelectorWidget( + onNumberChange: (value) => {mobileNo = value, validateForm()}, + onCountryChange: (value) => countryCode = value, + mobileNo: this.mobileNo, + ), + SizedBox(height: 12), + Directionality( + textDirection: TextDirection.ltr, + child: inputWidget( + loginType == 1 + ? TranslationBase.of(context).nationalIdNumber + : TranslationBase.of(context).medicalFileNumber, + "Xxxxxxxxx", + nationalIDorFile, + ), + ), + ], + ), + ), + SizedBox( + height: 12, + ), + DefaultButton( + TranslationBase.of(context).login, + () { + if (isButtonDisabled) { + AppToast.showErrorToast(message: TranslationBase.of(context).incorrectNationalId, localContext: context); + } else { + this.startLogin(); + } + }, + disabledColor: Color(0xff575757), + ), + ]), + ), + ); + } + + Widget inputWidget( + String _labelText, String _hintText, TextEditingController _controller, + {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.number, + controller: _controller, + onChanged: (value) => {validateForm()}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + + startLogin() { + if (isButtonDisabled == false) { + checkUserAuthentication(); + } + } + + void validateForm() { + if (util.validateIDBox(nationalIDorFile.text, loginType) == true && + (countryCode == "971" ? true : util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true)) { + setState(() { + isButtonDisabled = false; + }); + } else { + setState(() { + isButtonDisabled = true; + }); + } + } + + checkUserAuthentication() { + // showLoader(true); + var request = CheckPatientAuthenticationReq(); + request.isRegister = false; + request.patientMobileNumber = int.parse(mobileNo!); + request.zipCode = countryCode; + request.searchType = this.loginType; + request.deviceTypeID = this.loginType; + if (this.loginType == 1) { + request.patientIdentificationID = this.nationalIDorFile.text; + request.patientID = 0; + } else { + request.patientIdentificationID = ''; + request.patientID = int.parse(nationalIDorFile.text); + } + sharedPref.setObject(REGISTER_DATA_FOR_REGISTER, request); + GifLoaderDialogUtils.showMyDialog(context); + authService.checkPatientAuthentication(request).then((value) { + // if (value['UserAccountIsActivated']) { + if (value['isSMSSent']) { + sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']); + sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, request); + GifLoaderDialogUtils.hideDialog(context); + Navigator.of(context).push(FadePage(page: ConfirmLogin())); + } else { + if (value['IsAuthenticated']) { + this.checkActivationCode(); + } + } + // } else { + // ConfirmDialog activationDialog = new ConfirmDialog( + // context: context, + // confirmMessage: TranslationBase.of(context).accountDeactivatedMsg, + // okText: TranslationBase.of(context).yes, + // cancelText: TranslationBase.of(context).no, + // okFunction: () => {ConfirmDialog.closeAlertDialog(context), this.activatePatientFile()}, + // cancelFunction: () => {}); + // GifLoaderDialogUtils.hideDialog(context); + // activationDialog.showAlertDialog(context); + // } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: err, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => { + ConfirmDialog.closeAlertDialog(context), + Navigator.of(context).push(FadePage(page: RegisterNew())), + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + projectViewModel.analytics.loginRegistration + .login_fail(error: err.toString()); + }); + } + + activatePatientFile() { + GifLoaderDialogUtils.showMyDialog(context); + Map request = {}; + request["IsActive"] = true; + if (this.loginType == 1) { + request['PatientIdentificationID'] = int.parse(nationalIDorFile.text); + } else { + request['PatientID'] = int.parse(nationalIDorFile.text); + } + request["PatientMobileNumber"] = mobileNo; + authService.deactivateAccount(request, true).then((result) { + GifLoaderDialogUtils.hideDialog(context); + checkUserAuthentication(); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + }); + } + + checkActivationCode({code}) async { + Map request = {}; + if (code == null) request['PatientMobileNumber'] = int.parse(mobileNo!); + request['ZipCode'] = countryCode; + request['SearchType'] = loginType; + request['LoginType'] = loginType; + if (this.loginType == 1) { + request['PatientIdentificationID'] = this.nationalIDorFile.text; + request['PatientID'] = 0; + } else { + request['PatientIdentificationID'] = ''; + request['PatientID'] = int.parse(nationalIDorFile.text); + } + this.authService.checkActivationCode(request, code).then((result) async { + sharedPref.remove(FAMILY_FILE); + // registerGeoZones(); + projectViewModel.setPrivilege(privilegeList: result); + result = CheckActivationCode.fromJson(result); + result.list.isFamily = false; + await this.sharedPref.setString(BLOOD_TYPE, + result.patientBloodType != null ? result.patientBloodType : ""); + await this.sharedPref.setObject(USER_PROFILE, result.list); + await this.sharedPref.setObject(MAIN_USER, result.list); + await this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); + await this.sharedPref.setString(TOKEN, result.authenticationTokenID); + await authenticatedUserObject.getUser(getUser: true); + authenticatedUserObject.isLogin = true; + appointmentRateViewModel.isLogin = true; + projectViewModel.isLogin = true; + authenticatedUserObject.user = result.list; + projectViewModel.user = authenticatedUserObject.user; + + // GifLoaderDialogUtils.hideDialog(context); + // + // getToDoCount(); + // + // Navigator.pushAndRemoveUntil( + // context, + // FadePage( + // page: LandingPage(), + // ), + // (r) => false); + getToDoCount(); + checkIfIsInPatient(); + appointmentRateViewModel + .getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2) + .then((value) => { + GifLoaderDialogUtils.hideDialog(context), + if (appointmentRateViewModel.isHaveAppointmentNotRate) + { + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: RateAppointmentDoctor(), + ), + (r) => false) + } + else + { + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: LandingPage(), + ), + (r) => false) + } + }) + .catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + }); + }); + } + + getToDoCount() { + toDoProvider.setState(0, 0, true, toDoProvider.notificationsCount); + ClinicListService service = new ClinicListService(); + service.getActiveAppointmentNo(context).then((res) { + //print(res['AppointmentActiveNumber']); + if (res['MessageStatus'] == 1) { + // toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount); + toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider.notificationsCount); + + } else {} + }).catchError((err) { + print(err); + }); + } + + checkIfIsInPatient() async { + bool isAdmitted = false; + bool hasAdmissionRequest = false; + GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; + GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel; + ClinicListService? service = new ClinicListService(); + dynamic res = await service.checkIfInPatientAPI(context); + if (res != null) { + if (res['MessageStatus'] == 1) { + isAdmitted = res['isAdmitted']; + hasAdmissionRequest = res['hasAdmissionRequests']; + print("IS ADMITTED: $isAdmitted"); + print("Has Admission Request: $hasAdmissionRequest"); + if (isAdmitted) { + if (res['PatientAdmittedInformation'].length != 0) { + getAdmissionInfoResponseModel = + GetAdmissionInfoResponseModel.fromJson( + res['PatientAdmittedInformation'][0]); + projectViewModel.setInPatientProjectID( + res['PatientAdmittedInformation'][0]['ProjectID']); + projectViewModel + .setInPatientAdmissionInfo(getAdmissionInfoResponseModel); + projectViewModel.setIsPatientAdmitted(true); + } + } + if (hasAdmissionRequest) { + if (res['MedicalInstruction'].length != 0) { + getAdmissionRequestInfoResponseModel = + GetAdmissionRequestInfoResponseModel.fromJson( + res['MedicalInstruction'][0]); + projectViewModel.setInPatientProjectID( + res['MedicalInstruction'][0]['projectId']); + projectViewModel.setInPatientAdmissionRequest( + getAdmissionRequestInfoResponseModel); + projectViewModel.setPatientHasAdmissionRequest(true); + } + } + } + } + } + + void registerGeoZones() async { + await locator().getAllGeoZones(GeoZonesRequestModel()); + projectViewModel.platformBridge().registerHmgGeofences(); + } + + getRegisterData() async { + var registerData = await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN); + await sharedPref.remove(REGISTER_DATA_FOR_LOGIIN); + + if (registerData != null) { + setState(() { + this.nationalIDorFile.text = + registerData['PatientIdentificationID'].toString(); + this.isButtonDisabled = false; + this.loginType = 1; + this.mobileNo = registerData['PatientMobileNumber'].toString(); + }); + } + + // var voipToken = await sharedPref.getString("VOIPToken"); + // setState(() { + // nationalIDorFile.text = voipToken; + // }); + } +} diff --git a/lib/pages/login/register-info.dart b/lib/pages/login/register-info.dart new file mode 100644 index 00000000..c2c78182 --- /dev/null +++ b/lib/pages/login/register-info.dart @@ -0,0 +1,1053 @@ +import 'dart:convert'; + +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart' as checkActivation; +import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; +import 'package:diplomaticquarterapp/models/Authentication/countries_list.dart'; +import 'package:diplomaticquarterapp/models/Authentication/get_patient_occupation_list_response.dart'; +import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/dialog/clinic_list_dialog.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:hijri/hijri_calendar.dart'; +import 'package:intl/intl.dart'; +import 'package:provider/provider.dart'; + +class RegisterInfo extends StatefulWidget { + final Function? changePageViewIndex; + final int page; + + const RegisterInfo({Key? key, this.changePageViewIndex, this.page = 1}) : super(key: key); + + @override + _RegisterInfo createState() => _RegisterInfo(); +} + +class _RegisterInfo extends State { + final authService = new AuthProvider(); + final sharedPref = new AppSharedPreferences(); + RegisterInfoResponse registerInfo = RegisterInfoResponse(); + late bool isLoading; + late int page; + final List locationList = [ + new Location(name: 'KSA', value: '1', nameAr: "السعودية"), + new Location(name: 'Dubai', value: '2', nameAr: "دبي"), + ]; + String language = '1'; + late CheckPatientAuthenticationReq registerd_data; + final List languageList = [ + new Language(name: 'English', value: '2', nameAr: "إنجليزي"), + new Language(name: 'Arabic', value: '1', nameAr: "عربي"), + ]; + final List genderList = [ + new Language(name: 'Male', value: 'M', nameAr: "ذكر"), + new Language(name: 'Female', value: 'F', nameAr: "أنثى"), + ]; + final List maritalList = [ + new Language(name: 'Married', value: 'M', nameAr: "متزوج"), + new Language(name: 'Single', value: 'S', nameAr: "اعزب"), + new Language(name: 'Divorce', value: 'D', nameAr: "الطلاق"), + ]; + String email = ''; + List countriesList = []; + late ToDoCountProviderModel toDoProvider; + String location = '1'; + AuthenticatedUserObject authenticatedUserObject = locator(); + + late ProjectViewModel projectViewModel; + + AppointmentRateViewModel appointmentRateViewModel = locator(); + bool isDubai = false; + RegisterInfoResponse data = RegisterInfoResponse(); + late CheckPatientAuthenticationReq data2; + String gender = 'M'; + String maritalStatus = 'M'; + String nationality = 'SAU'; + String selectedOccupationID = ""; + + // List patientOccupationList = []; + // GetPatientOccupationListResponse? selectedPatientOccupation; + + final GlobalKey projectDropdownKey = GlobalKey(); + + @override + void initState() { + if (widget.page == 1) { + getCountries(); + // getPatientOccupationList(); + } + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { + getRegisterInfo(); + }); + page = widget.page; + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + toDoProvider = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).register, + isShowAppBar: false, + isShowDecPage: false, + body: SingleChildScrollView( + padding: EdgeInsets.all(30), + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Row( + children: [ + Expanded( + child: AppText( + TranslationBase.of(context).personalInfo, + fontSize: 16, + textAlign: TextAlign.left, + fontWeight: FontWeight.bold, + ), + ), + Expanded(child: SizedBox()) + ], + ), + SizedBox(height: 10), + (isDubai && page == 1) + ? Column( + children: [ + SizedBox(height: 20), + getnameField(TranslationBase.of(context).identificationNumber, registerd_data.patientIdentificationID, TranslationBase.of(context).mobileNumber, + registerd_data.patientMobileNumber.toString()), + // SizedBox(height: 20), + projectViewModel.isArabic + ? getnameField( + '', + inputWidget("First Name", "First Name English", 'fNameEn'), + '', + inputWidget("Last Name", "Last Name English", 'lNameEn'), + ) + : SizedBox( + height: 0, + ), + getnameField( + '', + inputWidget(TranslationBase.of(context).firstName, TranslationBase.of(context).firstName, 'fName'), + '', + inputWidget(TranslationBase.of(context).middleName, TranslationBase.of(context).middleName, 'sName'), + ), + + getnameField( + '', + inputWidget(TranslationBase.of(context).lastName, TranslationBase.of(context).lastName, 'lName'), + TranslationBase.of(context).gender, + Container( + height: 20, + child: DropdownButtonHideUnderline( + child: DropdownButton( + isExpanded: true, + value: gender, + hint: Text(TranslationBase.of(context).gender), + iconSize: 40, + elevation: 16, + onChanged: (value) => { + setState(() { + gender = value!; + registerInfo.gender = value; + }) + }, + items: genderList.map>((Language value) { + return DropdownMenuItem( + value: value.value, + child: Text( + projectViewModel.isArabic == 1 ? value.nameAr! : value.name!, + ), + ); + }).toList()))), + ), + SizedBox(height: 20), + getnameField( + TranslationBase.of(context).maritalStatus, + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + isExpanded: true, + value: maritalStatus, + hint: Text(TranslationBase.of(context).maritalStatus), + iconSize: 40, + elevation: 16, + onChanged: (value) => { + setState(() { + maritalStatus = value!; + registerInfo.maritalStatusCode = value; + }) + }, + items: maritalList.map>((Language value) { + return DropdownMenuItem( + value: value.value, + child: Text( + projectViewModel.isArabic == 1 ? value.nameAr! : value.name!, + ), + ); + }).toList()))), + TranslationBase.of(context).nationality, + Container( + height: 22, + child: DropdownButtonHideUnderline( + child: DropdownButton( + isExpanded: true, + value: nationality, + hint: Text(TranslationBase.of(context).nationality), + iconSize: 40, + elevation: 16, + onChanged: (value) => { + setState(() { + nationality = value!; + registerInfo.nationalityCode = value; + }) + }, + items: countriesList.map>((CountriesLists value) { + return DropdownMenuItem( + value: value.iD, + child: Text( + value.name!, + ), + ); + }).toList())))), + SizedBox(height: 20), + getnameField(TranslationBase.of(context).dateOfBirth, registerd_data.dob, "", ""), + SizedBox(height: 20), + ], + ) + : (registerInfo.healthId != null && page == 1) + ? Column( + children: [ + SizedBox(height: 10), + getnameField(TranslationBase.of(context).identificationNumber, registerInfo.idNumber, TranslationBase.of(context).firstName, + registerInfo.firstNameEn == '-' ? registerInfo.firstNameAr : registerInfo.firstNameEn), + SizedBox(height: 10), + getnameField(TranslationBase.of(context).middleName, registerInfo.secondNameEn == '-' ? registerInfo.secondNameEn : registerInfo.secondNameEn, + TranslationBase.of(context).lastName, registerInfo.lastNameEn == '-' ? registerInfo.lastNameEn : registerInfo.lastNameEn), + SizedBox(height: 10), + getnameField( + TranslationBase.of(context).gender, + registerInfo.maritalStatusCode == 'U' + ? 'Unknown' + : registerInfo.maritalStatusCode == 'M' + ? 'Male' + : 'Female', + TranslationBase.of(context).maritalStatus, + registerInfo.maritalStatus), + SizedBox(height: 10), + getnameField(TranslationBase.of(context).nationality, registerInfo.nationality, TranslationBase.of(context).mobileNumber, registerd_data.patientMobileNumber.toString()), + SizedBox(height: 10), + getnameField(TranslationBase.of(context).dateOfBirth, registerInfo.dateOfBirth, "", ""), + ], + ) + : widget.page == 2 + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // (!isDubai) + // ? Container( + // width: double.infinity, + // decoration: containerRadius(Colors.white, 12), + // padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + // child: Row( + // children: [ + // Flexible( + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Text( + // TranslationBase.of(context).selectOccupation, + // style: TextStyle( + // fontSize: 11, + // letterSpacing: -0.44, + // fontWeight: FontWeight.w600, + // ), + // ), + // Container( + // height: 18, + // width: double.infinity, + // child: DropdownButtonHideUnderline( + // child: DropdownButton( + // key: projectDropdownKey, + // hint: Text(TranslationBase.of(context).selectOccupation), + // value: selectedPatientOccupation, + // iconSize: 0, + // isExpanded: true, + // style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black), + // items: patientOccupationList.map((GetPatientOccupationListResponse item) { + // return DropdownMenuItem( + // value: item, + // child: AutoSizeText( + // projectViewModel.isArabic ? item.descriptionN! : item.description!, + // maxLines: 1, + // minFontSize: 10, + // style: TextStyle( + // fontSize: SizeConfig.textMultiplier! * 1.6, + // fontWeight: FontWeight.w600, + // letterSpacing: -0.39, + // height: 0.8, + // ), + // ), + // // Text('${item.name!}'), + // ); + // }).toList(), + // onChanged: (GetPatientOccupationListResponse? newValue) { + // setState(() { + // selectedPatientOccupation = newValue!; + // selectedOccupationID = selectedPatientOccupation!.occupationID!; + // registerInfo.occupationID = selectedOccupationID; + // }); + // debugPrint("Selected Occupation ID: ${registerInfo.occupationID}"); + // }, + // ), + // ), + // ), + // ], + // ), + // ), + // Icon(Icons.keyboard_arrow_down), + // ], + // )) + // : SizedBox(), + mHeight(20), + Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 25), + child: Row(children: [ + Flexible( + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + TranslationBase.of(context).prefferedLanguage, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + isExpanded: true, + value: language, + hint: Text(TranslationBase.of(context).prefferedLanguage), + iconSize: 40, + elevation: 16, + onChanged: (value) => { + setState(() { + language = value!; + }) + }, + items: languageList.map>((Language value) { + return DropdownMenuItem( + value: value.value, + child: Text( + projectViewModel.isArabic == 1 ? value.nameAr! : value.name!, + ), + ); + }).toList()))) + ])) + ])), + SizedBox( + height: 20, + ), + Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 25), + child: Row(children: [ + Flexible( + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + TranslationBase.of(context).selectLocation, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + isExpanded: true, + value: location, + hint: Text(TranslationBase.of(context).selectLocation), + iconSize: 40, + elevation: 16, + onChanged: (value) => { + setState(() { + location = value!; + }) + }, + items: locationList.map>((Location value) { + return DropdownMenuItem( + value: value.value, + child: Text( + projectViewModel.isArabic == 1 ? value.nameAr! : value.name!, + ), + ); + }).toList()))) + ])) + ])), + SizedBox( + height: 20, + ), + Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 12), + margin: EdgeInsets.only(bottom: 0), + child: Row(children: [ + Flexible( + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + TranslationBase.of(context).email, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + child: TextField( + keyboardType: TextInputType.emailAddress, + onChanged: (value) { + setState(() { + email = value; + }); + }, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + )) + ])) + ])), + ], + ) + : SizedBox(), + ]), + ), + bottomSheet: Container( + width: double.maxFinite, + height: 80.0, + child: Row( + children: [ + Expanded( + child: Padding( + padding: EdgeInsets.all(10), + child: DefaultButton(TranslationBase.of(context).cancel, () { + Navigator.of(context).pop(); + // widget.changePageViewIndex!(0); + // getPatientOccupationList(); + locator().loginRegistration.registration_cancel(step: page == 1 ? 'personal info' : 'other details'); + }, textColor: Colors.white, color: Color(0xffD02127))), + ), + Expanded( + child: Padding( + padding: EdgeInsets.all(10), + child: DefaultButton(page == 1 ? TranslationBase.of(context).next : TranslationBase.of(context).register, () { + nextPage(); + page == 1 ? locator().loginRegistration.registration_personal_info() : locator().loginRegistration.registration_patient_info(); + }, textColor: Colors.white, color: isValid() == true ? Color(0xff359846) : Colors.grey)), + ), + ], + ))); + } + + nextPage() async { + if (page == 1) { + if (isDubai) { + await setRegisterData(); + widget.changePageViewIndex!(2); + } else { + widget.changePageViewIndex!(2); + } + } else { + registerNow(); + + // if (isDubai) { + // registerNow(); + // } else { + // if (selectedPatientOccupation != null) { + // registerNow(); + // } else { + // AppToast.showErrorToast(message: TranslationBase.of(context).selectOccupationError); + // } + // } + } + } + + setRegisterData() async { + registerInfo.gender = gender; + registerInfo.maritalStatusCode = maritalStatus; + registerInfo.nationalityCode = nationality; + projectViewModel.setRegisterData(registerInfo); + // await sharedPref.setObject(REGISTER_INFO_DUBAI, registerInfo); + } + + registerNow() { + dynamic request; + + if (isDubai) + request = getTempUserRequestDubai(); + else + request = getTempUserRequest(); + + print(request); + + GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: true); + dynamic res; + this + .authService + .registerUser(request) + .then((result) async => { + if (result is String) + { + GifLoaderDialogUtils.hideDialog(context), + new ConfirmDialog( + context: context, + confirmMessage: result, + okText: TranslationBase.of(context).ok, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => {ConfirmDialog.closeAlertDialog(context)}, + cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)}).showAlertDialog(context) + } + else + { + res = result, + result = checkActivation.CheckActivationCode.fromJson(result), + // result.list.isFamily = false, + // sharedPref.setObject(USER_PROFILE, result.list), + // this.sharedPref.setObject(MAIN_USER, result.list), + // sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID), + // sharedPref.setString(TOKEN, result.authenticationTokenID), + // this.setUser(result), + sharedPref.remove(FAMILY_FILE), + result.list.isFamily = false, + + await sharedPref.setString(BLOOD_TYPE, result.patientBloodType ?? ""), + authenticatedUserObject.user = result.list, + projectViewModel.setPrivilege(privilegeList: res), + await sharedPref.setObject(MAIN_USER, result.list), + await sharedPref.setObject(USER_PROFILE, result.list), + + await sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID), + await sharedPref.setString(TOKEN, result.authenticationTokenID), + AppToast.showSuccessToast(message: TranslationBase.of(context).successRegister), + checkIfUserAgreedBefore(result), + projectViewModel.analytics.loginRegistration.registration_confirmation() + } + }) + .catchError((err) { + // GifLoaderDialogUtils.hideDialog(context); + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: err, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => {ConfirmDialog.closeAlertDialog(context)}, + cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)}); + dialog.showAlertDialog(context); + projectViewModel.analytics.loginRegistration.registration_fail(errorType: ""); + }); + } + + setUser(result) async { + await authenticatedUserObject.getUser(getUser: true); + authenticatedUserObject.isLogin = true; + appointmentRateViewModel.isLogin = true; + projectViewModel.isLogin = true; + authenticatedUserObject.user = result.list; + Navigator.of(context).pushNamed(HOME); + } + + getRegisterInfo() async { + if (await sharedPref.getObject(NHIC_DATA) != null) { + data = RegisterInfoResponse.fromJson(await sharedPref.getObject(NHIC_DATA)); + this.registerInfo = data; + } + if (await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN) != null) { + data2 = CheckPatientAuthenticationReq.fromJson(await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN)); + + setState(() { + this.registerd_data = data2; + isDubai = data2.patientOutSA == 1 ? true : false; + if (isDubai) location = '2'; + }); + } + + // try { + // var patientOccupationListVal = json.decode(await sharedPref.getString(PATIENT_OCCUPATION_LIST)); + // patientOccupationListVal.forEach((v) { + // patientOccupationList.add(new GetPatientOccupationListResponse.fromJson(v)); + // }); + // setState(() {}); + // } catch (ex) { + // print(ex.toString()); + // } + } + + getTempUserRequest() { + DateFormat dateFormat = DateFormat("mm/dd/yyyy"); + print(dateFormat.parse(registerInfo.dateOfBirth!)); + var hDate = new HijriCalendar.fromDate(dateFormat.parse(registerInfo.dateOfBirth!)); + var date = hDate.toString(); + return { + "Patientobject": { + "TempValue": true, + "PatientIdentificationType": registerInfo.idNumber!.substring(0, 1) == "1" ? 1 : 2, + "PatientIdentificationNo": registerInfo.idNumber, + "MobileNumber": registerd_data.patientMobileNumber, + "PatientOutSA": (registerd_data.zipCode == '966' || registerd_data.zipCode == '+966') ? 0 : 1, + "FirstNameN": registerInfo.firstNameAr, + "FirstName": registerInfo.firstNameEn, + "MiddleNameN": registerInfo.secondNameAr, + "MiddleName": registerInfo.secondNameEn, + "LastNameN": registerInfo.lastNameAr, + "LastName": registerInfo.lastNameEn, + "StrDateofBirth": registerInfo.dateOfBirth, + "DateofBirth": DateUtil.convertISODateToJsonDate(registerInfo.dateOfBirth!.replaceAll('/', '-')), + "Gender": registerInfo.gender == 'M' ? 1 : 2, + "NationalityID": registerInfo.nationalityCode, + "eHealthIDField": registerInfo.healthId, + "DateofBirthN": date, + "EmailAddress": email, + "SourceType": location, + "PreferredLanguage": registerd_data.languageID.toString(), + // "OccupationID": registerInfo.occupationID, + "Marital": registerInfo.maritalStatusCode == 'U' + ? '0' + : registerInfo.maritalStatusCode == 'M' + ? '1' + : '2', + }, + "PatientIdentificationID": registerInfo.idNumber, + "PatientMobileNumber": registerd_data.patientMobileNumber.toString()[0] == '0' ? registerd_data.patientMobileNumber : '0' + registerd_data.patientMobileNumber.toString(), + }; + } + + getTempUserRequestDubai() { + DateFormat dateFormat = DateFormat("mm/dd/yyyy"); + registerInfo = projectViewModel.registerInfo; + print(dateFormat.parse(registerd_data.dob!)); + var hDate = new HijriCalendar.fromDate(dateFormat.parse(registerd_data.dob!)); + var date = hDate.toString(); + final DateFormat dateFormat1 = DateFormat('MM/dd/yyyy'); + final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy'); + + return { + "Patientobject": { + "TempValue": true, + "PatientIdentificationType": registerd_data.patientIdentificationID!.substring(0, 1) == "1" ? 1 : 2, + "PatientIdentificationNo": registerd_data.patientIdentificationID, + "MobileNumber": registerd_data.patientMobileNumber, + "PatientOutSA": (registerd_data.zipCode == '966' || registerd_data.zipCode == '+966') ? 0 : 1, + "FirstNameN": registerInfo.firstNameAr ?? "", + "FirstName": registerInfo.firstNameEn ?? "", + "MiddleNameN": registerInfo.secondNameAr ?? ".", + "MiddleName": registerInfo.secondNameEn ?? ".", + "LastNameN": registerInfo.lastNameAr ?? "", + "LastName": registerInfo.lastNameEn ?? "", + "StrDateofBirth": dateFormat1.format(dateFormat2.parse(registerd_data.dob!)), + "DateofBirth": DateUtil.convertISODateToJsonDate(registerd_data.dob!.replaceAll('/', '-')), + "Gender": registerInfo.gender == 'M' ? 1 : 2, + "NationalityID": registerInfo.nationalityCode, + "eHealthIDField": null, + "DateofBirthN": date, + "EmailAddress": email, + "SourceType": location, + "PreferredLanguage": registerd_data.languageID.toString(), + "Marital": registerInfo.maritalStatusCode == 'U' + ? '0' + : registerInfo.maritalStatusCode == 'M' + ? '1' + : '2', + }, + "PatientIdentificationID": registerd_data.patientIdentificationID, + "PatientMobileNumber": registerd_data.patientMobileNumber.toString()[0] == '0' ? registerd_data.patientMobileNumber : '0' + registerd_data.patientMobileNumber.toString(), + "DOB": registerd_data.dob, + "IsHijri": registerd_data.isHijri + }; + } + + bool isValid() { + if ((location != null && language != null && Utils.validEmail(email) == true) || + (registerInfo.firstNameEn != null && registerInfo.lastNameEn != null) || + (projectViewModel.isArabic && registerInfo.firstNameEn != null && registerInfo.firstNameAr != null && registerInfo.lastNameEn != null && registerInfo.lastNameAr != null)) { + return true; + } else { + return false; + } + } + + Widget getnameField(name1, value1, name2, value2) { + return Row( + children: [ + Expanded( + child: Padding( + padding: EdgeInsets.only(left: 5, right: 5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + name1, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.44, + ), + ), + value1 is String + ? Text( + value1, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.44, + ), + ) + : value1, + ], + ))), + Expanded( + child: Padding( + padding: EdgeInsets.only(left: 5, right: 5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + name2, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + letterSpacing: -0.44, + ), + ), + value2 is String + ? Text( + value2, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.44, + ), + ) + : value2, + ], + ))) + ], + ); + } + + checkIfUserAgreedBefore(checkActivation.CheckActivationCode result) { + if (result.isNeedUserAgreement == true) { + //TODO need to implement agreement page here + insertIMEI(); + } else { + insertIMEI(); + } + } + + insertIMEI() async { + var selectedOption = await sharedPref.getInt(LAST_LOGIN); + authService.insertDeviceImei(selectedOption).then((value) => {goToHome()}).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + goToHome() async { + authenticatedUserObject.isLogin = true; + appointmentRateViewModel.isLogin = true; + projectViewModel.isLogin = true; + projectViewModel.user = authenticatedUserObject.user; + await authenticatedUserObject.getUser(getUser: true); + getToDoCount(); + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).validInsurance, + okText: TranslationBase.of(context).yes, + cancelText: TranslationBase.of(context).no, + okFunction: () { + ConfirmDialog.closeAlertDialog(context); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }, + cancelFunction: () { + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + }); + dialog.showAlertDialog(context); + + // int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2; + // appointmentRateViewModel.getIsLastAppointmentRatedList(languageID).then((value) { + // getToDoCount(); + // GifLoaderDialogUtils.hideDialog(AppGlobal.context); + // if (appointmentRateViewModel.isHaveAppointmentNotRate) { + // Navigator.pushAndRemoveUntil( + // context, + // FadePage( + // page: RateAppointmentDoctor(isFromRegistration: true), + // ), + // (r) => false); + // } else { + // ConfirmDialog dialog = new ConfirmDialog( + // context: context, + // confirmMessage: TranslationBase.of(context).validInsurance, + // okText: TranslationBase.of(context).yes, + // cancelText: TranslationBase.of(context).no, + // okFunction: () { + // ConfirmDialog.closeAlertDialog(context); + // Navigator.pushAndRemoveUntil( + // context, + // MaterialPageRoute(builder: (context) => LandingPage()), + // (Route route) => false, + // ); + // Navigator.push(context, FadePage(page: InsuranceUpdate())); + // }, + // cancelFunction: () { + // Navigator.pushAndRemoveUntil( + // context, + // MaterialPageRoute(builder: (context) => LandingPage()), + // (Route route) => false, + // ); + // }); + // dialog.showAlertDialog(context); + // } + // }).catchError((err) { + // print(err); + // //GifLoaderDialogUtils.hideDialog(context); + // }); + // SMSOTP.showLoadingDialog(context, false), + } + + getToDoCount() { + toDoProvider.setState(0, 0, true, "0"); + ClinicListService service = new ClinicListService(); + service.getActiveAppointmentNo(context).then((res) { + if (res['MessageStatus'] == 1) { + // toDoProvider.setState(res['AppointmentActiveNumber'], true, "0"); + toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, "0"); + } else {} + }).catchError((err) { + print(err); + }); + } + + getCountries() { + ClinicListService service = new ClinicListService(); + service.getCountries().then((res) { + if (res['MessageStatus'] == 1) { + res['ListNationality'].forEach((items) => {countriesList.add(CountriesLists.fromJson(items))}); + + setState(() {}); + } + }).catchError((err) { + print(err); + }); + } + + Widget inputWidget(String _labelText, String _hintText, String name, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 10, right: 10, bottom: 5, top: 5), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.text, + // controller: _controller, + onChanged: (value) => { + setState(() { + switch (name) { + case 'fName': + { + if (projectViewModel.isArabic) { + registerInfo.firstNameAr = value; + } else { + registerInfo.firstNameEn = value; + registerInfo.firstNameAr = '...'; + } + } + break; + case 'sName': + { + if (projectViewModel.isArabic) { + registerInfo.secondNameAr = value.isEmpty ? "." : value; + registerInfo.secondNameEn = '...'; + } else { + registerInfo.secondNameEn = value.isEmpty ? "." : value; + registerInfo.secondNameAr = '...'; + } + } + break; + case 'lName': + { + if (projectViewModel.isArabic) { + registerInfo.lastNameAr = value; + } else { + registerInfo.lastNameEn = value; + registerInfo.lastNameAr = '...'; + } + } + break; + case 'fNameEn': + registerInfo.firstNameEn = value; + break; + case 'lNameEn': + registerInfo.lastNameEn = value; + break; + } + }) + //_controller.text =value + }, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + + void openDropdown(GlobalKey key) { + GestureDetector? detector; + void searchForGestureDetector(BuildContext element) { + element.visitChildElements((element) { + if (element.widget != null && element.widget is GestureDetector) { + detector = element.widget as GestureDetector?; + // return false; + } else { + searchForGestureDetector(element); + } + // return true; + }); + } + + searchForGestureDetector(key.currentContext!); + assert(detector != null); + detector!.onTap!(); + } +} + +class Language { + final String? name; + final String? value; + final String? nameAr; + + Language({this.name, this.value, this.nameAr}); +} + +class Location { + final String? name; + final String? value; + final String? nameAr; + + Location({this.name, this.value, this.nameAr}); +} diff --git a/lib/pages/login/register.dart b/lib/pages/login/register.dart new file mode 100644 index 00000000..fdb04362 --- /dev/null +++ b/lib/pages/login/register.dart @@ -0,0 +1,439 @@ +import 'dart:convert'; + +import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart'; +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Authentication/check_user_status_reponse.dart'; +import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart'; +import 'package:diplomaticquarterapp/models/Authentication/checkpatient_for_registration.dart'; +import 'package:diplomaticquarterapp/models/Authentication/get_patient_occupation_list_response.dart'; +import 'package:diplomaticquarterapp/pages/login/confirm-login.dart'; +import 'package:diplomaticquarterapp/pages/login/login-type.dart'; +import 'package:diplomaticquarterapp/pages/login/login.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart'; +import 'package:intl/intl.dart' as intl; +import 'package:provider/provider.dart'; + +class Register extends StatefulWidget { + final Function? changePageViewIndex; + + const Register({Key? key, this.changePageViewIndex}) : super(key: key); + + @override + _Register createState() => _Register(); +} + +class _Register extends State { + final nationalIDorFile = TextEditingController(); + final int loginType = LoginType.loginType; + late String mobileNo; + String countryCode = '966'; + var isHijri; + final util = Utils(); + late DateTime selectedDate; + TextEditingController dob = TextEditingController(); + TextEditingController dobEn = TextEditingController(); + + bool isButtonDisabled = true; + final authService = new AuthProvider(); + final sharedPref = new AppSharedPreferences(); + + late bool isLoading; + + List patientOccupationList = []; + + GetPatientOccupationListResponse? selectedPatientOccupation; + + @override + void initState() { + getPatientOccupationList(); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).register, + isShowAppBar: false, + isShowDecPage: false, + showNewAppBar: false, + showNewAppBarTitle: true, + body: Column( + children: [ + Expanded( + child: ListView( + padding: EdgeInsets.all(21), + physics: BouncingScrollPhysics(), + children: [ + SizedBox(height: 10), + Padding( + padding: EdgeInsets.all(10), + child: Text( + TranslationBase.of(context).enterNationalId, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + )), + SizedBox(height: 10), + PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value), + SizedBox(height: 12), + Directionality(textDirection: TextDirection.ltr, child: inputWidget(TranslationBase.of(context).nationalIdNumber, "Xxxxxxxxx", nationalIDorFile)), + SizedBox(height: 20), + Row( + children: [ + Expanded( + child: Row( + children: [ + Radio( + value: 1, + groupValue: isHijri, + onChanged: (value) { + setState(() { + isHijri = value; + }); + validateForm(); + }, + ), + Text(TranslationBase.of(context).hijriDate), + ], + ), + ), + Expanded( + child: Row( + children: [ + Radio( + value: 0, + groupValue: isHijri, + onChanged: (value) { + setState(() { + isHijri = value; + }); + validateForm(); + }, + ), + Text(TranslationBase.of(context).gregorianDate), + ], + ), + ), + ], + ), + Row(children: [ + Container( + width: SizeConfig.realScreenWidth! * .89, + child: isHijri == 1 + ? Directionality( + textDirection: TextDirection.ltr, + child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dob, + isNumber: false, + suffix: Icon( + Icons.calendar_today, + size: 16, + ))) + : Container( + child: InkWell( + onTap: () { + if (isHijri != null) _selectDate(context); + }, + child: Directionality( + textDirection: TextDirection.ltr, + child: inputWidget(TranslationBase.of(context).dob, "DD/MM/YYYYY", dobEn, + isNumber: false, + isEnable: false, + suffix: Icon( + Icons.calendar_today, + size: 16, + )))))), + ]) + ], + ), + ), + Container( + width: double.maxFinite, + // height: 80.0, + color: Colors.white, + // margin: EdgeInsets.only(bottom: 50.0), + child: Row( + children: [ + Expanded( + child: Padding( + padding: EdgeInsets.all(10), + child: DefaultButton(TranslationBase.of(context).cancel, () { + Navigator.of(context).pop(); + locator().loginRegistration.registration_cancel(step: 'enter details'); + }, textColor: Colors.white, color: Color(0xffD02127))), + ), + Expanded( + child: Padding( + padding: EdgeInsets.all(10), + child: DefaultButton(TranslationBase.of(context).next, () { + startRegistration(); + locator().loginRegistration.registration_enter_details(); + }, textColor: Colors.white, color: isButtonDisabled == true ? Colors.grey : Color(0xff359846))), + ), + ], + ), + ) + ], + ), + ); + } + + Future _selectDate(BuildContext context) async { + DatePicker.showDatePicker( + context, + showTitleActions: true, + minTime: DateTime(DateTime.now().year - 100, 1, 1), + maxTime: DateTime.now(), + onConfirm: (date) { + selectedDate = date; + setState(() { + final intl.DateFormat dateFormat = intl.DateFormat('dd/MM/yyyy'); + dobEn.text = dateFormat.format(date); + }); + }, + currentTime: DateTime.now(), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false, bool isNumber = true, Icon? suffix}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: isNumber ? TextInputType.numberWithOptions(signed: true) : TextInputType.datetime, + controller: _controller, + onChanged: (value) => {validateForm()}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + if (suffix != null) suffix + ], + ), + ), + ); + } + + startRegistration() { + final intl.DateFormat dateFormat = intl.DateFormat('dd/MM/yyyy'); + if (isButtonDisabled == false) { + var request = CheckPatientForRegistration(); + request.patientMobileNumber = int.parse(mobileNo); + request.zipCode = countryCode; + request.patientOutSA = countryCode == '966' ? 0 : 1; + + request.patientIdentificationID = int.parse(nationalIDorFile.text); + request.patientID = 0; + request.isRegister = true; + request.dob = isHijri == 1 ? dob.text : dateFormat.format(selectedDate); + request.isHijri = isHijri; + this.checkPatientForRegisteration(request); + } + } + + checkPatientForRegisteration(request) { + int languageID = Provider.of(context, listen: false).isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + this.authService.checkPatientForRegisteration(request, languageID).then((response) => {checkUserStatus(response, request)}).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: err, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => { + ConfirmDialog.closeAlertDialog(context), + Navigator.of(context).push(FadePage(page: Register())), + }, + cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)}); + dialog.showAlertDialog(context); + }); + } + + void validateForm() { + if (util.validateIDBox(nationalIDorFile.text, loginType) == true && + mobileNo.length >= 9 && + util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true && + isHijri != null && + (dobEn.text != null || dob.text != null)) { + setState(() { + isButtonDisabled = false; + }); + } else { + setState(() { + isButtonDisabled = true; + }); + } + } + + checkUserStatus(response, CheckPatientForRegistration request) async { + GifLoaderDialogUtils.hideDialog(context); + if (response is Map) { + var nRequest = request.toJson(); + nRequest['LogInTokenID'] = response['LogInTokenID']; + if (response['hasFile'] == true) { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: response['ErrorEndUserMessage'], + okText: TranslationBase.of(context).ok, + cancelText: TranslationBase.of(context).cancel, + okFunction: () { + AlertDialogBox.closeAlertDialog(context); + sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, nRequest); + LoginRegistration.loginMethod = 1; // 1=NationalID, by default from Registration + Navigator.of(context).push(FadePage(page: Login())); + }, + cancelFunction: () {}) + .showAlertDialog(context); + } else { + final intl.DateFormat dateFormat = intl.DateFormat('dd/MM/yyyy'); + nRequest['forRegister'] = true; + nRequest['isRegister'] = true; + nRequest["PatientIdentificationID"] = nRequest["PatientIdentificationID"].toString(); + nRequest['dob'] = isHijri == 1 ? dob.text : dateFormat.format(selectedDate); + nRequest['isHijri'] = isHijri; + sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, nRequest); + sharedPref.setString(LOGIN_TOKEN_ID, response['LogInTokenID']); + if (request.patientOutSA == 0) { + this.chekUserData(response['LogInTokenID']); + } else { + Navigator.of(context).push(FadePage(page: ConfirmLogin(changePageViewIndex: widget.changePageViewIndex, fromRegistration: true, isDubai: true))); + } + } + } else { + // if (response['ErrorCode'] == '-986') { + //AppToast.showErrorToast(message: response); + AlertDialogBox( + context: context, + confirmMessage: response, + okText: TranslationBase.of(context).ok, + okFunction: () { + AlertDialogBox.closeAlertDialog(context); + Navigator.of(context).pop(); + }).showAlertDialog(context); + //} + } + } + + chekUserData(loginToken) { + // let m = hijri(this.dateOfBirth).locale('en'); + // // const dateHijri = m.format('iDD/iMM/iYYYY'); + // const request = { + // PatientIdentificationID: this.id.toString(), + // // TokenID: token, + // DOB: this.dateOption === '1' ? this.dateOfBirth : moment(this.dateOfBirth).format('DD/MM/YYYY'), + // IsHijri: Number(this.dateOption) + // } + + final intl.DateFormat dateFormat = intl.DateFormat('dd/MM/yyyy'); + GifLoaderDialogUtils.showMyDialog(context); + var request = CheckUserStatusRequest(); + request.patientIdentificationID = nationalIDorFile.text; + request.dOB = isHijri == 1 ? dob.text : dateFormat.format(selectedDate); + request.isHijri = isHijri; + request.patientOutSA = countryCode == '966' ? 0 : 1; + this.authService.checkUserStatus(request).then((result) => { + GifLoaderDialogUtils.hideDialog(context), + if (result is Map) + { + result = CheckUserStatusResponse.fromJson(result as Map), + sharedPref.setObject(NHIC_DATA, result), + // widget.changePageViewIndex!(1), + Navigator.of(context).push(FadePage(page: ConfirmLogin(changePageViewIndex: widget.changePageViewIndex, fromRegistration: true))), + } + else + { + AppToast.showErrorToast(message: result != null ? result : TranslationBase.of(context).somethingWentWrong), + } + }); + } + + getPatientOccupationList() async { + patientOccupationList.clear(); + await authService.getPatientOccupationList().then((result) { + sharedPref.setString(PATIENT_OCCUPATION_LIST, json.encode(result['GetOccupationLst'])); + }).catchError((err) { + AppToast.showErrorToast(message: err); + }); + } +} diff --git a/lib/pages/login/register_new.dart b/lib/pages/login/register_new.dart new file mode 100644 index 00000000..8a5b5ec8 --- /dev/null +++ b/lib/pages/login/register_new.dart @@ -0,0 +1,201 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/pages/login/login-type.dart'; +import 'package:diplomaticquarterapp/pages/login/register-info.dart'; +import 'package:diplomaticquarterapp/pages/login/register.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; + +class RegisterNew extends StatefulWidget { + @override + _RegisterNew createState() => _RegisterNew(); +} + +class _RegisterNew extends State { + final nationalIDorFile = TextEditingController(); + final int loginType = LoginType.loginType; + late String mobileNo; + String countryCode = '966'; + var isHijri; + final util = Utils(); + late DateTime selectedDate; + late String dob; + bool isButtonDisabled = true; + final authService = new AuthProvider(); + final sharedPref = new AppSharedPreferences(); + late PageController _controller; + late bool isLoading; + int _currentIndex = 0; + + @override + void initState() { + super.initState(); + _controller = new PageController(); + } + + @override + void dispose() { + super.dispose(); + } + + changePageViewIndex(pageIndex) { + _controller.jumpToPage(pageIndex); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).register, + isShowAppBar: true, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + body: SingleChildScrollView( + child: Container( + height: SizeConfig.realScreenHeight! * .9, + width: SizeConfig.realScreenWidth, + child: Column(children: [ + Container( + width: double.infinity, + padding: EdgeInsets.only(left: 20, right: 20, top: 12), + child: Row( + children: [ + Expanded( + child: showProgress( + title: TranslationBase.of(context).enterDetails, + status: _currentIndex == 0 + ? TranslationBase.of(context).inPrgress + : _currentIndex > 0 + ? TranslationBase.of(context).completed + : TranslationBase.of(context).locked, + color: _currentIndex == 0 ? CustomColors.orange : CustomColors.green, + ), + ), + Expanded( + child: showProgress( + title: TranslationBase.of(context).patientInfo, + status: _currentIndex == 1 + ? TranslationBase.of(context).inPrgress + : _currentIndex > 1 + ? TranslationBase.of(context).completed + : TranslationBase.of(context).locked, + color: _currentIndex == 1 + ? CustomColors.orange + : _currentIndex > 1 + ? CustomColors.green + : CustomColors.grey2, + ), + ), + showProgress( + title: TranslationBase.of(context).otherInfo, + status: _currentIndex == 2 ? TranslationBase.of(context).inPrgress : TranslationBase.of(context).locked, + color: _currentIndex == 2 + ? CustomColors.orange + : _currentIndex > 3 + ? CustomColors.green + : CustomColors.grey2, + isNeedBorder: false, + ), + ], + ), + ), + Expanded( + child: PageView( + physics: NeverScrollableScrollPhysics(), + controller: _controller, + onPageChanged: (index) { + setState(() { + _currentIndex = index; + }); + }, + scrollDirection: Axis.horizontal, + children: [ + Register( + changePageViewIndex: changePageViewIndex, + ), + + RegisterInfo( + changePageViewIndex: changePageViewIndex, + ), + RegisterInfo(changePageViewIndex: changePageViewIndex, page: 2), + // NewEReferralStepOnePage( + // changePageViewIndex: changePageViewIndex, + // createEReferralRequestModel: createEReferralRequestModel, + // ), + // NewEReferralStepTowPage( + // changePageViewIndex: changePageViewIndex, + // createEReferralRequestModel: createEReferralRequestModel, + // ), + // NewEReferralStepThreePage( + // changePageViewIndex: changePageViewIndex, + // createEReferralRequestModel: createEReferralRequestModel, + // ), + ], + ), + ), + ]), + )), + ); + } + + Widget showProgress({String? title, String? status, Color? color, bool isNeedBorder = true}) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + width: 26, + height: 26, + decoration: containerRadius(color!, 200), + child: Icon( + Icons.done, + color: Colors.white, + size: 16, + ), + ), + if (isNeedBorder) + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: mDivider(Colors.grey), + )), + ], + ), + mHeight(8), + Text( + title!, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + letterSpacing: -0.44, + ), + ), + mHeight(2), + Container( + padding: EdgeInsets.all(5), + decoration: containerRadius(color!.withOpacity(0.2), 4), + child: Text( + status!, + style: TextStyle( + fontSize: 8, + fontWeight: FontWeight.w600, + letterSpacing: -0.32, + color: color, + ), + ), + ), + ], + ) + ], + ); + } +} diff --git a/lib/pages/login/register_new_dubai.dart b/lib/pages/login/register_new_dubai.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/pages/login/user-login-agreement-page.dart b/lib/pages/login/user-login-agreement-page.dart new file mode 100644 index 00000000..96e67f14 --- /dev/null +++ b/lib/pages/login/user-login-agreement-page.dart @@ -0,0 +1,828 @@ +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/TermsConditionsViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_info_response_model.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_admission_request_info_response_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/Loader/gif_loader_container.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_html/flutter_html.dart'; +import 'package:provider/provider.dart'; +import 'package:webview_flutter/webview_flutter.dart'; + +class UserLoginAgreementPage extends StatefulWidget { + final String userAgreementText; + final AuthenticatedUserObject authenticatedUserObject; + final AppointmentRateViewModel appointmentRateViewModel; + final int selectedOption; + final isArabic; + + UserLoginAgreementPage({required this.userAgreementText, required this.authenticatedUserObject, required this.appointmentRateViewModel, required this.selectedOption, required this.isArabic}); + + @override + State createState() => _UserLoginAgreementPageState(); +} + +class _UserLoginAgreementPageState extends State { + late ProjectViewModel projectViewModel; + late ToDoCountProviderModel toDoProvider; + final authService = AuthProvider(); + + late final WebViewController _controller; + bool isPageLoaded = false; + + bool isTermsAndConditionsPage = true; + bool acceptTerms = false; + + @override + void initState() { + super.initState(); + _controller = WebViewController() + ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..setNavigationDelegate( + NavigationDelegate( + onProgress: (int progress) { + // Update loading bar. + print("Progress: $progress"); + }, + onPageStarted: (String url) {}, + onPageFinished: (String url) { + setState(() { + isPageLoaded = true; + }); + }, + onHttpError: (HttpResponseError error) {}, + onWebResourceError: (WebResourceError error) {}, + onNavigationRequest: (NavigationRequest request) { + if (request.url.startsWith('https://www.youtube.com/')) { + return NavigationDecision.prevent; + } + return NavigationDecision.navigate; + }, + ), + ) + ..loadRequest(Uri.parse(widget.isArabic ? "https://hmg.com/ar/Pages/MBTerms.aspx" : "https://hmg.com/en/Pages/MBTerms.aspx")); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + toDoProvider = Provider.of(context); + return BaseView( + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).userAgreement, + body: + // isTermsAndConditionsPage + // ? + // getTermsAndConditionsContent(), + // : + isPageLoaded + ? WebViewWidget(controller: _controller) + : Container( + child: Center( + child: GifLoaderContainer( + barrierDismissible: false, + ), + ), + ), + // Padding( + // padding: const EdgeInsets.all(8.0), + // child: SingleChildScrollView(child: WebViewWidget(controller: _controller) + // // Html( + // // data: widget.userAgreementText, + // // ), + // ), + // ), + bottomSheet: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only(topLeft: Radius.circular(10), topRight: Radius.circular(10), bottomLeft: Radius.circular(10), bottomRight: Radius.circular(10)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 5, + blurRadius: 7, + offset: Offset(0, 3), // changes position of shadow + ), + ], + ), + padding: EdgeInsets.only(left: 21, right: 21, top: 15, bottom: 15), + width: double.infinity, + // color: Colors.white, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(height: 12), + Text( + TranslationBase.of(context).continueAgreeTerms, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + mHeight(24.0), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Checkbox( + value: acceptTerms, + onChanged: (v) { + setState(() => acceptTerms = v!); + }), + Expanded( + child: Text( + TranslationBase.of(context).termsConditionsRead, + style: TextStyle( + fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + ), + ], + ), + SizedBox(height: 12), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: CustomColors.green, + elevation: 0, + onPressed: isPageLoaded + ? () { + // if (isTermsAndConditionsPage) { + if (acceptTerms) { + addUsageAgreement(); + // setState(() { + // isTermsAndConditionsPage = false; + // }); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms); + } + // } else { + // addUsageAgreement(); + // } + } + : null, + child: Text(TranslationBase.of(context).acceptLbl.toUpperCase(), + style: TextStyle( + fontSize: 18.0, + color: Colors.white, + )), + ), + ), + ), + mWidth(7), + Expanded( + flex: 1, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: Color(0xffc5272d), + elevation: 0, + onPressed: isPageLoaded + ? () { + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: LandingPage(), + ), + (r) => false); + } + : null, + child: Text(TranslationBase.of(context).declineLbl.toUpperCase(), style: TextStyle(fontSize: 18.0, color: Colors.white)), + ), + ), + ), + ], + ), + ], + ), + ), + ), + ); + } + + Widget getTermsAndConditionsContent() { + return SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).termsHeading, + style: + TextStyle(fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions1, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions2, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions3, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + // InkWell( + // onTap: () async { + // await launchUrl(uri); + // Uri.parse(widget.isArabic ? "https://hmg.com/ar/Pages/Privacy.aspx" : "https://hmg.com/en/Pages/Privacy.aspx"); + // }, + // child: Text( + // TranslationBase.of(context).clickPrivacyPolicy, + // style: TextStyle( + // fontSize: 16, + // fontWeight: FontWeight.bold, + // fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), + // color: Colors.blue, + // letterSpacing: -1.44, + // height: 35 / 24, + // decoration: TextDecoration.underline), + // ), + // ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions4, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions5, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading2, + style: + TextStyle(fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions6, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading3, + style: + TextStyle(fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions7, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions8, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions9, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions10, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions11, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions12, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions12a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions12b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions12c, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions13, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions14, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions14a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions14b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading4, + style: + TextStyle(fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions15, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions16, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions16a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions16b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions17, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions18, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions19, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions19a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions19b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading5, + style: + TextStyle(fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions20, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions21, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading6, + style: + TextStyle(fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions21, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions22, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions23, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions24, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading7, + style: + TextStyle(fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions25, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions25a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions25b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions25c, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions26, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions27, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions28, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions29, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions30, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions31, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions32, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading8, + style: + TextStyle(fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions33, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions33a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions33b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions34, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions34a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions34b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions34c, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions34d, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions34e, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions35, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions35a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions35b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions35c, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions35d, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions35e, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions36, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions37, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions38, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions39, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions39a, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions39b, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions39c, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions39d, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading9, + style: + TextStyle(fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions40, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions41, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading10, + style: + TextStyle(fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions42, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions43, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading11, + style: + TextStyle(fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions44, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsHeading12, + style: + TextStyle(fontSize: 20, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(12.0), + Text( + TranslationBase.of(context).termsConditions45, + style: TextStyle(fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + mHeight(24.0), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Checkbox( + value: acceptTerms, + onChanged: (v) { + setState(() => acceptTerms = v!); + }), + Expanded( + child: Text( + TranslationBase.of(context).termsConditionsRead, + style: TextStyle( + fontSize: 16, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24), + ), + ), + ], + ), + mHeight(150.0), + ], + ), + ), + ); + } + + addUsageAgreement() { + GifLoaderDialogUtils.showMyDialog(context); + this.authService.addUserAgreementContent().then((result) { + goToHome(); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + checkIfIsInPatient() { + bool isAdmitted = false; + bool hasAdmissionRequest = false; + GetAdmissionInfoResponseModel getAdmissionInfoResponseModel; + GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel; + ClinicListService service = new ClinicListService(); + service.checkIfInPatientAPI(context).then((res) { + if (res['MessageStatus'] == 1) { + isAdmitted = res['isAdmitted']; + hasAdmissionRequest = res['hasAdmissionRequests']; + print("IS ADMITTED: $isAdmitted"); + print("Has Admission Request: $hasAdmissionRequest"); + if (isAdmitted) { + if (res['PatientAdmittedInformation'].length != 0) { + getAdmissionInfoResponseModel = GetAdmissionInfoResponseModel.fromJson(res['PatientAdmittedInformation'][0]); + projectViewModel.setInPatientProjectID(res['PatientAdmittedInformation'][0]['ProjectID']); + projectViewModel.setInPatientAdmissionInfo(getAdmissionInfoResponseModel); + projectViewModel.setIsPatientAdmitted(true); + } + } + if (hasAdmissionRequest) { + if (res['MedicalInstruction'].length != 0) { + getAdmissionRequestInfoResponseModel = GetAdmissionRequestInfoResponseModel.fromJson(res['MedicalInstruction'][0]); + // projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['ProjectID']); + projectViewModel.setInPatientProjectID(res['MedicalInstruction'][0]['projectId']); + projectViewModel.setInPatientAdmissionRequest(getAdmissionRequestInfoResponseModel); + projectViewModel.setPatientHasAdmissionRequest(true); + } + } + } else {} + }); + } + + goToHome() async { + widget.authenticatedUserObject.isLogin = true; + widget.appointmentRateViewModel.isLogin = true; + projectViewModel.isLogin = true; + projectViewModel.user = widget.authenticatedUserObject.user; + await widget.authenticatedUserObject.getUser(getUser: true); + + // GifLoaderDialogUtils.hideDialog(context); + getToDoCount(); + checkIfIsInPatient(); + widget.appointmentRateViewModel + .getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2) + .then((value) => { + GifLoaderDialogUtils.hideDialog(context), + if (widget.appointmentRateViewModel.isHaveAppointmentNotRate) + { + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: RateAppointmentDoctor(), + ), + (r) => false) + } + else + { + GifLoaderDialogUtils.hideDialog(context), + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: LandingPage(), + ), + (r) => false) + }, + insertIMEI() + }) + .catchError((err) { + print(err); + }); + } + + insertIMEI() { + authService.insertDeviceImei(widget.selectedOption).then((value) => {}).catchError((err) { + print(err); + }); + } + + getToDoCount() { + toDoProvider.setState(0, 0, true, "0"); + ClinicListService service = new ClinicListService(); + service.getActiveAppointmentNo(context).then((res) { + if (res['MessageStatus'] == 1) { + toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, "0"); + // toDoProvider.setState(res['AppointmentActiveNumber'], true, "0"); + } else {} + }).catchError((err) { + print(err); + }); + } +} diff --git a/lib/pages/login/welcome.dart b/lib/pages/login/welcome.dart new file mode 100644 index 00000000..8b9e282f --- /dev/null +++ b/lib/pages/login/welcome.dart @@ -0,0 +1,109 @@ +import 'package:diplomaticquarterapp/analytics/google-analytics.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/pages/login/login-type.dart'; +import 'package:diplomaticquarterapp/pages/login/register.dart'; +import 'package:diplomaticquarterapp/pages/login/register_new.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; + +class WelcomeLogin extends StatefulWidget { + @override + _WelcomeLogin createState() => _WelcomeLogin(); +} + +class _WelcomeLogin extends State { + bool isLoading = true; + + @override + void initState() { + isLoading = true; + super.initState(); + } + + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).welcome, + isShowDecPage: false, + isShowAppBar: true, + showNewAppBar: true, + backgroundColor: Color(0xffF8F8F8), + showNewAppBarTitle: false, + body: Column( + children: [ + Expanded( + child: ListView( + padding: EdgeInsets.only(left: 21, right: 21), + physics: BouncingScrollPhysics(), + children: [ + SizedBox(height: 12), + Row( + children: [ + SvgPicture.asset( + "assets/images/new/hmg_icon.svg", + height: 62, + width: 62, + ), + ], + ), + SizedBox(height: 24), + Text( + TranslationBase.of(context).welcome, + style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 23 / 24), + ), + SizedBox(height: 16), + // Text( + // TranslationBase.of(context).welcomeText, + // style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + // ), + Text( + TranslationBase.of(context).welcomeText2, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + SizedBox( + height: 14, + ), + ], + ), + ), + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).no, + () => { + Navigator.of(context).push(FadePage(page: RegisterNew())), + locator().loginRegistration.visited_alhabib_group(false), + }, + color: CustomColors.accentColor, + textColor: Colors.white, + ), + ), + SizedBox(width: 8), + Expanded( + child: DefaultButton( + TranslationBase.of(context).yes, + () => { + Navigator.of(context).push(FadePage(page: LoginType())), + locator().loginRegistration.visited_alhabib_group(true), + }, + color: CustomColors.green, + ), + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/medical/active_medications/ActiveMedicationsPage.dart b/lib/pages/medical/active_medications/ActiveMedicationsPage.dart new file mode 100644 index 00000000..2744183e --- /dev/null +++ b/lib/pages/medical/active_medications/ActiveMedicationsPage.dart @@ -0,0 +1,204 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/ActiveMedicationsViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/active_medications/reminder_page.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class ActiveMedicationsPage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getActiveMedication(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: true, + baseViewModel: model, + appBarTitle: TranslationBase.of(context).activeMedications, + body: model.activePrescriptionReport.length > 0 ? Container( + child: ListView.builder( + itemCount: model.activePrescriptionReport.length, + itemBuilder: (context, index) => Container( + width: double.infinity, + child: Container( + margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 4, bottom: 4), + decoration: cardRadius(12), + child: Padding( + padding: const EdgeInsets.only(top: 12, bottom: 20, left: 20, right: 20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + model.activePrescriptionReport[index].itemDescription!, + style: TextStyle( + fontSize: 16, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + mHeight(10), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + // Container( + // child: Container( + // child: Image.memory( + // Utils.dataFromBase64String(model.activePrescriptionReport[index].imageString), + // fit: BoxFit.cover, + // height: SizeConfig.imageSizeMultiplier * 19, + // width: SizeConfig.imageSizeMultiplier * 18, + // ), + // margin: EdgeInsets.zero, + // clipBehavior: Clip.antiAlias, + // decoration: cardRadius(2000), + // ), + // clipBehavior: Clip.antiAlias, + // decoration: containerColorRadiusBorderWidth(Colors.white, 200, Colors.grey[200], 1), + // ), + // mWidth(12), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Text( + TranslationBase.of(context).expiryDateTitle + ": ", + style: TextStyle( + color: Colors.grey, + fontSize: 12, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + Text( + DateUtil.getDayMonthYearDateFormatted(model.activePrescriptionReport[index].orderDate!), + style: TextStyle( + fontSize: 13, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).frequency + ": ", + style: TextStyle( + color: Colors.grey, + fontSize: 12, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + Text( + model.activePrescriptionReport[index].frequency!, + style: TextStyle( + fontSize: 13, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).route + ": ", + style: TextStyle( + color: Colors.grey, + fontSize: 12, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + Text( + model.activePrescriptionReport[index].route!, + style: TextStyle( + fontSize: 13, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).dailyDoses + ": ", + style: TextStyle( + color: Colors.grey, + fontSize: 12, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + Text( + model.activePrescriptionReport[index].doseDailyQuantity.toString(), + style: TextStyle( + fontSize: 13, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + mHeight(12), + ], + ), + ], + ), + Container( + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: ReminderPage( + frequency: model.activePrescriptionReport[index].frequencyNumber!, + days: model.activePrescriptionReport[index].days!, + itemDescription: model.activePrescriptionReport[index].itemDescription!, + ), + ), + ); + }, + child: Column( + children: [ + Icon( + Icons.notifications_outlined, + color: Colors.red, + size: 28, + ), + Texts( + TranslationBase.of(context).addReminder, + color: Colors.red, + fontSize: 11.0, + ) + ], + ), + ), + ), + ], + ), + ], + ), + ), + ), + ), + ), + ) : getNoDataWidget(context), + ), + ); + } +} diff --git a/lib/pages/medical/active_medications/DayCheckBoxDialog.dart b/lib/pages/medical/active_medications/DayCheckBoxDialog.dart new file mode 100644 index 00000000..49e6e1f6 --- /dev/null +++ b/lib/pages/medical/active_medications/DayCheckBoxDialog.dart @@ -0,0 +1,161 @@ +import 'package:device_calendar/device_calendar.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class DayCheckBoxDialog extends StatefulWidget { + final Function(List) onValueSelected; + final String title; + final List selectedDaysOfWeek; + final List daysOfWeek = [ + DayOfWeek.Monday, + DayOfWeek.Tuesday, + DayOfWeek.Wednesday, + DayOfWeek.Thursday, + DayOfWeek.Friday, + DayOfWeek.Saturday, + DayOfWeek.Sunday, + ]; + + DayCheckBoxDialog( + {Key? key, required this.onValueSelected, required this.selectedDaysOfWeek, required this.title}); + + @override + _DayCheckBoxDialogState createState() => _DayCheckBoxDialogState(); +} + +class _DayCheckBoxDialogState extends State { + @override + Widget build(BuildContext context) { + return SimpleDialog( + title: Container( + width: double.infinity, + child: Center( + child: Texts( + widget.title, + textAlign: TextAlign.center, + ))), + children: [ + Container( + height: widget.daysOfWeek.length > 3 + ? MediaQuery.of(context).size.height * 0.6 + : null, + child: SingleChildScrollView( + child: Column( + children: [ + Divider(), + ...List.generate( + widget.daysOfWeek.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + if (widget.selectedDaysOfWeek + .contains(widget.daysOfWeek[index])) + widget.selectedDaysOfWeek + .remove(widget.daysOfWeek[index]); + else + widget.selectedDaysOfWeek + .add(widget.daysOfWeek[index]); + }); + }, + child: ListTile( + title: Text(DateUtil.getDay(widget.daysOfWeek[index])), + leading: Checkbox( + value: widget.selectedDaysOfWeek + .contains(widget.daysOfWeek[index]), + onChanged: (value) { + setState(() { + if (widget.selectedDaysOfWeek + .contains(widget.daysOfWeek[index])) + widget.selectedDaysOfWeek + .remove(widget.daysOfWeek[index]); + else + widget.selectedDaysOfWeek + .add(widget.daysOfWeek[index]); + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + ], + ), + ), + SizedBox( + height: 5.0, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context) + .cancel + .toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(widget.selectedDaysOfWeek); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + ), + ), + ), + ), + ), + ], + ) + ], + ), + ), + ) + ], + ); + } + + +} diff --git a/lib/pages/medical/active_medications/reminder_page.dart b/lib/pages/medical/active_medications/reminder_page.dart new file mode 100644 index 00000000..3c775bdc --- /dev/null +++ b/lib/pages/medical/active_medications/reminder_page.dart @@ -0,0 +1,295 @@ +import 'package:device_calendar/device_calendar.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/ActiveMedicationsViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.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:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart'; +import 'package:provider/provider.dart'; + +import 'DayCheckBoxDialog.dart'; + +// ignore: must_be_immutable +class ReminderPage extends StatefulWidget { + final int? frequency; + final int? days; + final String? itemDescription; + + List _scheduleList =[]; + List daysOfWeek = [DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday, DayOfWeek.Saturday, DayOfWeek.Sunday]; + + late DateTime startDay; + late DateTime endDay; + + ReminderPage({Key? key, this.frequency, this.days, this.itemDescription}) { + startDay = DateTime.now(); + endDay = DateTime.now().add(Duration(days: days!)); + int hour = (24 ~/ frequency!).round(); + int durations = 24 ~/ hour; + for (int count = 0; count < durations; count++) { + _scheduleList.add(DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day, (hour * count))); + } + } + + @override + _ReminderPageState createState() => _ReminderPageState(); +} + +class _ReminderPageState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + return BaseView( + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).reminder, + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: double.maxFinite, + child: Texts(TranslationBase.of(context).reminderDes, textAlign: TextAlign.start), + ), + Divider(), + SizedBox( + height: 12, + ), + Texts(TranslationBase.of(context).startDay), + SizedBox( + height: 6, + ), + InkWell( + onTap: () { + DatePicker.showDatePicker(context, showTitleActions: true, minTime: DateTime(DateTime.now().year, DateTime.now().month - 1, 1), maxTime: DateTime.now(), onConfirm: (date) { + setState(() { + widget.startDay = date; + }); + }, currentTime: widget.startDay, locale: projectViewModel.localeType); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(getStartDay()), + Icon( + Icons.calendar_today, + color: Colors.black, + ) + ], + ), + ), + ), + SizedBox( + height: 12, + ), + Texts(TranslationBase.of(context).endDay), + SizedBox( + height: 6, + ), + InkWell( + onTap: () { + DatePicker.showDatePicker(context, showTitleActions: true, minTime: DateTime(DateTime.now().year, DateTime.now().month - 1, 1), maxTime: DateTime.now(), onConfirm: (date) { + setState(() { + widget.endDay = date; + }); + }, currentTime: widget.endDay, locale: projectViewModel.localeType); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(getEndDay()), + Icon( + Icons.calendar_today, + color: Colors.black, + ) + ], + ), + ), + ), + SizedBox( + height: 12, + ), + Texts(TranslationBase.of(context).days), + SizedBox( + height: 6, + ), + InkWell( + onTap: () => confirmSelectDayDialog(), + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Texts( + getDays(), + )), + Icon( + Icons.arrow_drop_down, + color: Colors.black, + ) + ], + ), + ), + ), + ...List.generate( + widget._scheduleList.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 7, + ), + Texts(TranslationBase.of(context).scheduleTime), + SizedBox( + height: 7, + ), + InkWell( + onTap: () { + DatePicker.showTimePicker(context, showTitleActions: true, onConfirm: (date) { + setState(() { + widget._scheduleList[index] = date; + }); + }, currentTime: widget._scheduleList[index], locale: projectViewModel.localeType); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(getDateTime(widget._scheduleList[index])), + Icon( + Icons.access_time, + color: Colors.black, + ) + ], + ), + ), + ), + ], + )), + Container( + width: double.maxFinite, + height: MediaQuery.of(context).size.height * 0.12, + ), + ], + ), + ), + ), + bottomSheet: Container( + width: double.infinity, + color: Theme.of(context).scaffoldBackgroundColor, + padding: EdgeInsets.all(10), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + // Expanded( + // child: DefaultButton( + // TranslationBase.of(context).cancel, + // () { + // Navigator.pop(context); + // }, + // color: Color(0xffC5272D), + // ), + // ), + // SizedBox(width: 10), + Expanded( + child: DefaultButton( + TranslationBase.of(context).ok.toUpperCase(), + () { + schedule(); + }, + color: Color(0xff359846), + ), + ), + ], + ), + ), + ), + ); + } + + schedule() async { + List scheduleDateTime = calculateDaysInterval(widget.startDay, widget.endDay); + + CalendarUtils calendarUtils = await CalendarUtils.getInstance(); + + calendarUtils.createOrUpdateEvents(scheduleList: widget._scheduleList, description: widget.itemDescription, title: widget.itemDescription, scheduleDateTime: scheduleDateTime); + + Navigator.pop(context); + } + + List calculateDaysInterval(DateTime startDate, DateTime endDate) { + List days = []; + for (int i = 0; i <= endDate.difference(startDate).inDays; i++) { + widget._scheduleList.forEach((element) { + days.add(startDate.add(Duration(days: i, hours: element.hour, minutes: element.minute))); + }); + } + return days; + } + + String getStartDay() { + return "${DateUtil.getMonth(widget.startDay.month)} ${widget.startDay.day}, ${widget.startDay.year}"; + } + + String getEndDay() { + return "${DateUtil.getMonth(widget.endDay.month)} ${widget.endDay.day}, ${widget.endDay.year}"; + } + + String getDateTime(DateTime dateTime) { + return '${dateTime.hour}:${dateTime.minute}'; + } + + String getDays() { + String days = ""; + widget.daysOfWeek.forEach((element) { + days += "${DateUtil.getDay(element)},"; + }); + return days; + } + + void confirmSelectDayDialog() { + showDialog( + context: context, + builder: (cxt) => DayCheckBoxDialog( + title: 'Select Day', + selectedDaysOfWeek: widget.daysOfWeek, + onValueSelected: (value) { + setState(() { + widget.daysOfWeek = value; + }); + }, + ), + ); + } +} diff --git a/lib/pages/medical/allergies_page.dart b/lib/pages/medical/allergies_page.dart new file mode 100644 index 00000000..599d91b0 --- /dev/null +++ b/lib/pages/medical/allergies_page.dart @@ -0,0 +1,62 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/AllergiesViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.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'; + +class AllergiesPage extends StatelessWidget { + List imagesInfo =[]; + @override + Widget build(BuildContext context) { + imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/alllergies/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/alllergies/ar/0.png')); + return BaseView( + onModelReady: (model) => model.getAllergies(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).allergies, + baseViewModel: model, + description: TranslationBase.of(context).infoAllergies, + imagesInfo: imagesInfo, + body: model.allergies.isNotEmpty ? ListView.builder( + itemCount: model.allergies.length, + itemBuilder: (context, index) => Container( + margin: EdgeInsets.all(15), + padding: EdgeInsets.all(10), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: Colors.white, + ), + child: Row( + children: [ + Image.asset( + 'assets/images/new-design/allergiesDetails.png', + width: 50, + height: 50, + fit: BoxFit.cover, + ), + SizedBox( + width: 15, + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(TranslationBase.of(context).remarks+" :"), + Texts(TranslationBase.of(context).description + ": " + model.allergies[index].description! ?? ''), + ], + ), + ) + ], + ), + ), + ) : getNoDataWidget(context), + ), + ); + } +} diff --git a/lib/pages/medical/ask_doctor/ViewDoctorResponsesPage.dart b/lib/pages/medical/ask_doctor/ViewDoctorResponsesPage.dart new file mode 100644 index 00000000..b96a6992 --- /dev/null +++ b/lib/pages/medical/ask_doctor/ViewDoctorResponsesPage.dart @@ -0,0 +1,342 @@ +import 'package:diplomaticquarterapp/core/model/ask_doctor/DoctorResponse.dart'; +import 'package:diplomaticquarterapp/core/service/medical/ask_doctor_services.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class ViewDoctorResponsesPage extends StatefulWidget { + final DoctorResponse? doctorResponse; + + const ViewDoctorResponsesPage({Key? key, this.doctorResponse}) : super(key: key); + + @override + State createState() => _ViewDoctorResponsesPageState(); +} + +class _ViewDoctorResponsesPageState extends State { + int rate = 1; + TextEditingController textController = new TextEditingController(); + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.updateReadStatus(transactionNo: widget.doctorResponse!.transactionNo!), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF8F8F8), + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).viewDoctorResponses, + baseViewModel: model, + body: SingleChildScrollView( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [getResponsesList()], + ), + ), + ), + ), + ); + } + + Widget getResponsesList() { + return ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), + itemBuilder: (context, _index) { + return Container( + padding: const EdgeInsets.only(left: 20, right: 12, top: 12, bottom: 12), + height: 160, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + border: Border.all(width: 1, color: Color(0xffEFEFEF)), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: Text( + (widget.doctorResponse!.doctorName ?? ""), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.64, + ), + ), + ), + Container( + child: Text( + (DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.doctorResponse!.createdOn!)) ?? ""), + style: TextStyle( + fontSize: 14, + color: Color(0xff2E303A), + letterSpacing: -0.64, + ), + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text( + widget.doctorResponse!.transactions![_index]['DoctorResponse'], + style: TextStyle( + fontSize: 16, + color: Color(0xff2E303A), + letterSpacing: -0.64, + ), + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: DefaultButton( + TranslationBase.of(context).rateDoctorResponse, + () { + openResponseRateDialog(context); + }, + color: CustomColors.accentColor, + ), + ), + ], + ), + ); + }, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemCount: widget.doctorResponse!.transactions!.length); + } + + void openResponseRateDialog(BuildContext context) { + showModalBottomSheet( + context: context, + enableDrag: true, + isDismissible: true, + isScrollControlled: true, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.only(topLeft: Radius.circular(12), topRight: Radius.circular(12)), + ), + backgroundColor: Colors.white, + builder: (context) { + return StatefulBuilder(builder: (BuildContext context, StateSetter setState) { + return Container( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + height: 16.0, + ), + Text( + TranslationBase.of(context).rateDoctorResponseHeading, + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.64, + ), + ), + Padding( + padding: const EdgeInsets.all(24.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Container( + margin: rate == 1 ? EdgeInsets.only(left: 3.0, right: 3.0) : EdgeInsets.only(left: 0.0, right: 0.0), + decoration: rate == 1 + ? BoxDecoration(borderRadius: BorderRadius.circular(100), border: Border.all(width: 3, color: CustomColors.green)) + : BoxDecoration(borderRadius: BorderRadius.circular(100), border: Border.all(width: 3, color: CustomColors.white)), + child: IconButton( + onPressed: () { + rate = 1; + setState(() {}); + }, + iconSize: 35, + icon: SvgPicture.asset('assets/images/new/appointment-rating/5.svg'), + ), + ), + Container( + margin: rate == 0 ? EdgeInsets.only(left: 3.0, right: 3.0) : EdgeInsets.only(left: 0.0, right: 0.0), + decoration: rate == 0 + ? BoxDecoration(borderRadius: BorderRadius.circular(100), border: Border.all(width: 3, color: CustomColors.green)) + : BoxDecoration(borderRadius: BorderRadius.circular(100), border: Border.all(width: 3, color: CustomColors.white)), + child: IconButton( + onPressed: () { + rate = 0; + setState(() {}); + }, + iconSize: 35, + icon: SvgPicture.asset('assets/images/new/appointment-rating/1.svg'), + ), + ), + ], + ), + ), + if (rate == 0) + Container( + padding: const EdgeInsets.all(24.0), + child: Padding( + padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), + child: inputWidget(TranslationBase.of(context).comments, "", textController, isEnable: true), + ), + ), + SizedBox( + height: 16.0, + ), + Container( + margin: EdgeInsets.fromLTRB(24.0, 0.0, 24.0, 24.0), + child: DefaultButton( + TranslationBase.of(context).submit, + () { + if (rate == 0 && textController.text.isEmpty) { + AppToast.showErrorToast(message: "Please enter comments"); + } else { + rateDoctorResponse(); + } + }, + color: CustomColors.accentColor, + ), + ), + ], + ), + ); + }); + }).then((value) { + rate = 1; + setState(() {}); + }); + } + + void rateDoctorResponse() { + GifLoaderDialogUtils.showMyDialog(context); + AskDoctorService service = new AskDoctorService(); + service + .rateDoctorResponse( + transactionNo: widget.doctorResponse!.transactionNo!, + questionType: widget.doctorResponse!.requestType!, + rate: rate, + notes: textController.text, + mobileNo: projectViewModel.user!.mobileNumber!, + idNo: projectViewModel.user!.patientIdentificationNo!, + patientName: projectViewModel.user!.firstName! + " " + projectViewModel.user!.lastName!, + projectID: widget.doctorResponse!.projectID, + language: projectViewModel.isArabic ? "ar" : "en") + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: res['SuccessMsg']); + Navigator.of(context).pop(); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: isEnable ? Colors.white : CustomColors.grey2.withOpacity(0.4), + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.all(40.0), + keyboardType: TextInputType.text, + controller: _controller, + onChanged: (value) => {}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + fillColor: CustomColors.accentColor, + hintStyle: TextStyle( + fontSize: isEnable ? 14 : 24, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: isEnable ? Color(0xff575757) : CustomColors.black, + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } +} diff --git a/lib/pages/medical/ask_doctor/ask_doctor_home_page.dart b/lib/pages/medical/ask_doctor/ask_doctor_home_page.dart new file mode 100644 index 00000000..ee6860a0 --- /dev/null +++ b/lib/pages/medical/ask_doctor/ask_doctor_home_page.dart @@ -0,0 +1,78 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'ask_doctor_page.dart'; +import 'doctor_response.dart'; + +class AskDoctorHomPage extends StatefulWidget { + @override + _AskDoctorHomPageState createState() => _AskDoctorHomPageState(); +} + +class _AskDoctorHomPageState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + + int filterType = 0; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).askDoctor, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF8F8F8), + isShowDecPage: true, + description: TranslationBase.of(context).infoAskDoc, + imagesInfo: [ + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/ar/0.png'), + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/ar/1.png') + ], + body: Column( + children: [ + Row( + children: [ + MyTabView(TranslationBase.of(context).askDoctor, FilterType.Clinic, filterType == 0 ? FilterType.Clinic : FilterType.Hospital, () { + if (filterType != 0) + setState(() { + filterType = 0; + }); + }), + MyTabView(TranslationBase.of(context).doctorResponses, FilterType.Hospital, filterType != 0 ? FilterType.Hospital : FilterType.Clinic, () { + if (filterType == 0) + setState(() { + filterType = 1; + }); + }), + ], + ), + Expanded( + child: IndexedStack( + index: filterType, + children: [AskDoctorPage(), DoctorResponse()], + ), + ) + ], + ), + ); + } +} diff --git a/lib/pages/medical/ask_doctor/ask_doctor_page.dart b/lib/pages/medical/ask_doctor/ask_doctor_page.dart new file mode 100644 index 00000000..96cd9944 --- /dev/null +++ b/lib/pages/medical/ask_doctor/ask_doctor_page.dart @@ -0,0 +1,159 @@ +import 'package:diplomaticquarterapp/core/service/medical/ask_doctor_services.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/ask_doctor/request_type.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class AskDoctorPage extends StatelessWidget { + AskDoctorService service = new AskDoctorService(); + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getMyDoctor(), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + body: model.patientDoctorAppointmentListHospital.length > 0 ? _appointmentExpandableList(model.patientDoctorAppointmentListHospital, model) : noDoctor(context), + ), + ); + } + + Widget noDoctor(BuildContext context) { + return Container( + margin: EdgeInsets.only(left: 50.0, right: 50.0), + child: Center( + child: Text(TranslationBase.of(context).askDocEmpty, textAlign: TextAlign.center, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: CustomColors.accentColor)), + ), + ); + } + + Widget _appointmentExpandableList(List _patientDoctorAppointmentList, model) { + return ListView.separated( + addAutomaticKeepAlives: true, + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(top: 12), + separatorBuilder: (context, index) { + return Container( + height: 12, + margin: EdgeInsets.only(left: 21, right: 21), + // color: Color(0xffD9D9D9), + ); + }, + itemBuilder: (context, index) { + List _doctorList = _patientDoctorAppointmentList[index].patientDoctorAppointmentList!; + return AppExpandableNotifier( + title: _patientDoctorAppointmentList[index].filterName, + bodyWidget: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), + itemBuilder: (context, _index) { + DoctorList _doctor = _doctorList[_index]; + DoctorList doctorList = DoctorList( + date: _doctor.date, + projectID: _doctor.projectID, + setupID: _doctor.setupID, + clinicID: _doctor.clinicID, + projectName: _doctor.projectName, + clinicName: _doctor.clinicName, + actualDoctorRate: _doctor.actualDoctorRate, + doctorID: _doctor.doctorID, + doctorRate: _doctor.doctorRate, + gender: _doctor.gender, + doctorTitle: _doctor.doctorTitle, + name: _doctor.name, + speciality: _doctor.speciality, + doctorImageURL: _doctor.doctorImageURL, + nationalityFlagURL: _doctor.nationalityFlagURL); + return DoctorView( + doctor: doctorList, + isLiveCareAppointment: false, + isShowFlag: false, + onTap: () async { + if (await checkIfDoctorAvailable(_doctor, context)) { + GifLoaderDialogUtils.showMyDialog(context); + service.getCallInfoHoursResult(doctorId: _doctor.doctorID, projectId: _doctor.projectID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + Navigator.push( + context, + FadePage( + page: RequestTypePage(doctorList: _doctor), + ), + ); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + if (err != null) AppToast.showErrorToast(message: err.toString()); + print(err); + }); + } + }, + ); + }, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemCount: _doctorList.length), + ); + }, + itemCount: _patientDoctorAppointmentList.length, + ); + } + + Future checkIfDoctorAvailable(DoctorList _doctor, BuildContext context) async { + AskDoctorService askDocservice = new AskDoctorService(); + bool isAvailable = false; + GifLoaderDialogUtils.showMyDialog(context); + await askDocservice.isDoctorAvailable(doctorId: _doctor.doctorID, projectId: _doctor.projectID, clinicId: _doctor.clinicID).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res != null) { + print(res['IsDoctorAvailable']); + if (res['IsDoctorAvailable']) { + isAvailable = true; + } else { + isAvailable = false; + AppToast.showErrorToast(message: res['endUserMessage'], localContext: context); + } + } else { + isAvailable = true; + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + if (err != null) AppToast.showErrorToast(message: err.toString(), localContext: context); + print(err); + }); + + return Future.value(isAvailable); + } + + String getDate(String date) { + DateTime dateObj = DateUtil.convertStringToDate(date); + return DateUtil.getWeekDay(dateObj.weekday) + + ", " + + dateObj.day.toString() + + " " + + DateUtil.getMonth(dateObj.month) + + " " + + dateObj.year.toString() + + " " + + dateObj.hour.toString() + + ":" + + getMinute(dateObj); + } + + String getMinute(DateTime dateObj) { + if (dateObj.minute == 0) { + return dateObj.minute.toString() + "0"; + } else { + return dateObj.minute.toString(); + } + } +} diff --git a/lib/pages/medical/ask_doctor/doctor_response.dart b/lib/pages/medical/ask_doctor/doctor_response.dart new file mode 100644 index 00000000..0f7c1a09 --- /dev/null +++ b/lib/pages/medical/ask_doctor/doctor_response.dart @@ -0,0 +1,192 @@ +import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_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/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'ViewDoctorResponsesPage.dart'; + +class DoctorResponse extends StatelessWidget { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getDoctorResponse(), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 16, + ), + AppExpandableNotifier( + headerWidget: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(TranslationBase.of(context).newDes), + Container( + width: 30, + height: 30, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.red[800], + ), + child: Center( + child: Texts( + '${model.doctorResponseList.length}', + color: Colors.white, + ), + ), + ) + ], + ), + ), + bodyWidget: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: model.doctorResponseList.map( + (doctor) { + return InkWell( + onTap: () { + ///go to page ViewDoctorResponsesPage + if (doctor.transactions != null && doctor.transactions!.isNotEmpty) { + Navigator.push( + context, + FadePage( + page: ViewDoctorResponsesPage( + doctorResponse: doctor, + ), + ), + ); + } else { + Utils.showErrorToast("There are no doctor responses for this request."); + } + }, + child: Container( + height: 100, + margin: EdgeInsets.only(top: 8, bottom: 8), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + color: Colors.white, + border: Border.all(color: Colors.grey[300]!), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts('${doctor.doctorName}'), + SizedBox( + height: 5, + ), + Texts('${doctor.requestTypeDescription}'), + ], + ), + ), + ), + Padding( + padding: const EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0), + child: Icon(projectViewModel.isArabic ? Icons.arrow_back_ios : Icons.arrow_forward_ios), + ) + ], + ), + ), + ); + }, + ).toList(), + ), + ), + AppExpandableNotifier( + headerWidget: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(TranslationBase.of(context).all), + Container( + width: 30, + height: 30, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.red[800], + ), + child: Center( + child: Texts( + '${model.doctorResponseList.length}', + color: Colors.white, + ), + ), + ) + ], + ), + ), + bodyWidget: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: model.doctorResponseList.map( + (doctor) { + return InkWell( + onTap: () {}, + child: Container( + height: 85, + margin: EdgeInsets.only(top: 8, bottom: 8), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + color: Colors.white, + border: Border.all(color: Colors.grey[300]!), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts('${doctor.doctorName}'), + SizedBox( + height: 5, + ), + Texts('${doctor.requestTypeDescription}'), + ], + ), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Icon(projectViewModel.isArabic ? Icons.arrow_back_ios : Icons.arrow_forward_ios), + ) + ], + ), + ), + ); + }, + ).toList(), + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/medical/ask_doctor/request_type.dart b/lib/pages/medical/ask_doctor/request_type.dart new file mode 100644 index 00000000..2dece140 --- /dev/null +++ b/lib/pages/medical/ask_doctor/request_type.dart @@ -0,0 +1,130 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class RequestTypePage extends StatefulWidget { + final DoctorList? doctorList; + + RequestTypePage({Key? key, this.doctorList}); + + @override + _RequestTypePageState createState() => _RequestTypePageState(); +} + +class _RequestTypePageState extends State { + String selected = ""; + int parameterCode = -1; + String question = ""; + + @override + Widget build(BuildContext context) { + return BaseView( + // onModelReady: (model) => model.getQuestionTypes(), + onModelReady: (model) => model.getCallRequestTypeLOVs(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).requestType, + baseViewModel: model, + showNewAppBar: true, + showNewAppBarTitle: true, + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.all(10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ...List.generate( + model.askDoctorReqTypes.length, + (index) => Container( + width: double.maxFinite, + height: 55, + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8.0)), + margin: EdgeInsets.all(8.0), + child: InkWell( + onTap: () { + setState(() { + selected = model.askDoctorReqTypes[index].description!; + parameterCode = model.askDoctorReqTypes[index].parameterCode!; + }); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text(model.askDoctorReqTypes[index].description!), + ), + Radio( + value: model.askDoctorReqTypes[index].description, + groupValue: selected, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + selected = value!; + parameterCode = model.askDoctorReqTypes[index].parameterCode!; + }); + }, + ), + ], + ), + ), + ), + ), + if (parameterCode == 6) + Container( + margin: EdgeInsets.only(left: 10, right: 10), + child: NewTextFields( + hintText: TranslationBase.of(context).questionHere, + minLines: 2, + maxLines: 15, + onChanged: (value) { + setState(() { + question = value; + }); + }, + ), + ), + Container( + width: double.maxFinite, + height: MediaQuery.of(context).size.height * 0.2, + ), + ], + ), + ), + ), + bottomSheet: Container( + width: double.maxFinite, + height: 80.0, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Container( + width: MediaQuery.of(context).size.width * 0.8, + child: DefaultButton( + TranslationBase.of(context).submit, + () => { + model.sendRequestLOV(doctorList: widget.doctorList!, requestType: parameterCode.toString(), remark: question).then((value) { + if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) { + Navigator.pop(context); + AppToast.showSuccessToast(message: TranslationBase.of(context).RRTRequestSuccess); + } + }) + }, + color: Color(0xffD02127), + textColor: Colors.white, + disabledColor: Color(0xffEAEAEA), + ), + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/medical/balance/advance_payment_page.dart b/lib/pages/medical/balance/advance_payment_page.dart new file mode 100644 index 00000000..19e4551c --- /dev/null +++ b/lib/pages/medical/balance/advance_payment_page.dart @@ -0,0 +1,478 @@ +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/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../../core/model/my_balance/AdvanceModel.dart'; +import 'confirm_payment_page.dart'; +import 'new_text_Field.dart'; + +enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } + +class AdvancePaymentPage extends StatefulWidget { + @override + _AdvancePaymentPageState createState() => _AdvancePaymentPageState(); +} + +class _AdvancePaymentPageState extends State { + TextEditingController _fileTextController = TextEditingController(); + TextEditingController _notesTextController = TextEditingController(); + BeneficiaryType beneficiaryType = BeneficiaryType.NON; + HospitalsModel _selectedHospital = HospitalsModel(); + String amount = ""; + String email = ""; + PatientInfo _selectedPatientInfo = PatientInfo(); + AuthenticatedUser authenticatedUser = AuthenticatedUser(); + GetAllSharedRecordsByStatusList selectedPatientFamily = GetAllSharedRecordsByStatusList(); + AdvanceModel advanceModel = AdvanceModel(); + + AppSharedPreferences sharedPref = AppSharedPreferences(); + AuthenticatedUser authUser = AuthenticatedUser(); + + List imagesInfo =[]; + + late ProjectViewModel projectViewModel; + + @override + void initState() { + super.initState(); + getAuthUser(); + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/advance-payment/en/0.png', + imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/advance-payment/ar/0.png')); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) { + model.getHospitals(projectViewModel.isArabic ? 1 : 2, isAdvancePayment: true); + model.getFamilyFiles(); + }, + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + imagesInfo: imagesInfo, + appBarTitle: TranslationBase.of(context).advancePayment, + description: TranslationBase.of(context).infoAdvancePayment, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + padding: EdgeInsets.all(21), + physics: BouncingScrollPhysics(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + TranslationBase.of(context).advancePaymentLabel, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + SizedBox(height: 12), + InkWell( + onTap: () { + List list = [ + RadioSelectionDialogModel(TranslationBase.of(context).myAccount, 0), + RadioSelectionDialogModel(TranslationBase.of(context).myFamilyFiles, 1), + RadioSelectionDialogModel(TranslationBase.of(context).otherAccount, 2), + ]; + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: + beneficiaryType == BeneficiaryType.MyAccount ? 0 : (beneficiaryType == BeneficiaryType.MyFamilyFiles ? 1 : (beneficiaryType == BeneficiaryType.OtherAccount ? 2 : -1)), + onValueSelected: (index) { + var type; + if (index == 0) { + type = BeneficiaryType.MyAccount; + } else if (index == 1) { + type = BeneficiaryType.MyFamilyFiles; + } else { + type = BeneficiaryType.OtherAccount; + } + + setState(() { + if (type == BeneficiaryType.MyAccount) { + _fileTextController.text = model.user!.patientID.toString(); + advanceModel.depositorName = model.user!.firstName! + " " + model.user!.lastName!; + } else + _fileTextController.text = ""; + + beneficiaryType = type; + }); + }, + ), + ); + }, + child: Container( + padding: EdgeInsets.all(8), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + getBeneficiaryType(), + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + Icon(Icons.arrow_drop_down) + ], + ), + ), + ), + if (beneficiaryType == BeneficiaryType.MyFamilyFiles) SizedBox(height: 12), + if (beneficiaryType == BeneficiaryType.MyFamilyFiles) + InkWell( + onTap: () { + // GifLoaderDialogUtils.showMyDialog(context); + model.getFamilyFiles().then((value) { + // GifLoaderDialogUtils.hideDialog(context); + confirmSelectFamilyDialog(model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList!); + }); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + getFamilyMembersName(), + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + Icon(Icons.arrow_drop_down), + ], + ), + ), + ), + SizedBox(height: 12), + NewTextFields( + hintText: TranslationBase.of(context).fileNumber, + controller: _fileTextController, + readOnly: beneficiaryType == BeneficiaryType.OtherAccount ? false : true, + ), + if (beneficiaryType == BeneficiaryType.OtherAccount) SizedBox(height: 12), + if (beneficiaryType == BeneficiaryType.OtherAccount) + InkWell( + onTap: () { + if (_fileTextController.text.isNotEmpty) { + GifLoaderDialogUtils.showMyDialog(context); + model.getPatientInfoByPatientID(id: _fileTextController.text).then((value) { + GifLoaderDialogUtils.hideDialog(context); + confirmSelectPatientDialog(model.patientInfoList); + }); + } else + AppToast.showErrorToast(message: 'Please Enter The File Number'); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + getPatientName(), + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + Icon(Icons.arrow_drop_down), + ], + ), + ), + ), + SizedBox(height: 12), + InkWell( + onTap: () => confirmSelectHospitalDialog(model.hospitals), + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + getHospitalName(), + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + Icon(Icons.arrow_drop_down), + ], + ), + ), + ), + SizedBox(height: 12), + NewTextFields( + hintText: TranslationBase.of(context).amount, + keyboardType: TextInputType.numberWithOptions(signed: false, decimal: true), + onChanged: (value) { + setState(() { + amount = value; + }); + }, + ), + SizedBox(height: 12), + if (model.user != null) + NewTextFields( + hintText: TranslationBase.of(context).depositorEmail, + initialValue: model.user.emailAddress, + onChanged: (value) { + email = value; + }, + ), + SizedBox(height: 12), + NewTextFields( + hintText: TranslationBase.of(context).notes, + controller: _notesTextController, + ), + SizedBox( + height: MediaQuery.of(context).size.height * 0.15, + ) + ], + ), + ), + ), + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).submit, + (amount.isEmpty || _fileTextController.text.isEmpty || _selectedHospital == null) + ? null + : () { + var mobileNum; + var patientName; + + if (beneficiaryType == BeneficiaryType.MyFamilyFiles) { + mobileNum = selectedPatientFamily.mobileNumber; + patientName = selectedPatientFamily.patientName; + } + + if (beneficiaryType == BeneficiaryType.MyAccount) { + mobileNum = model.user!.mobileNumber; + patientName = model.user!.firstName; + } + + if (beneficiaryType == BeneficiaryType.OtherAccount) { + mobileNum = _selectedPatientInfo.mobileNumber; + patientName = _selectedPatientInfo.fullName; + } + + advanceModel.fileNumber = _fileTextController.text; + advanceModel.hospitalsModel = _selectedHospital; + advanceModel.note = _notesTextController.text; + advanceModel.email = email ?? model.user!.emailAddress; + advanceModel.amount = amount; + advanceModel.mobileNumber = mobileNum; + advanceModel.patientName = patientName; + GifLoaderDialogUtils.showMyDialog(context); + + model.getPatientInfoByPatientIDAndMobileNumber(advanceModel).then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (model.state != ViewState.Error && model.state != ViewState.ErrorLocal) { + Utils.hideKeyboard(context); + Navigator.push( + context, + FadePage( + page: PaymentMethod( + onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) { + setState(() {}); + }, + isShowInstallments: false, + isFromAdvancePayment: true), + ), + ).then( + (value) { + Navigator.push( + context, + FadePage( + page: ConfirmPaymentPage( + advanceModel: advanceModel, + selectedPaymentMethod: value[0], + patientInfoAndMobileNumber: model.patientInfoAndMobileNumber, + authenticatedUser: authUser, + installmentPlan: value[1], + ), + ), + ); + projectViewModel.analytics.advancePayments.payment_method(method: value[0].toString().toLowerCase(), type: 'wallet'); + }, + ); + } + }); + projectViewModel.analytics.advancePayments.wallet_payment_details(); + }, + color: Color(0xffD02127), + textColor: Colors.white, + disabledColor: Color(0xffEAEAEA), + ), + ), + ], + ), + ), + ); + } + + int _selectedHospitalIndex = -1; + + void confirmSelectHospitalDialog(List hospitals) { + List list = [ + for (int i = 0; i < hospitals.length; i++) RadioSelectionDialogModel(hospitals[i].name! + ' ${hospitals[i].distanceInKilometers} ' + TranslationBase.of(context).km, i), + ]; + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: _selectedHospitalIndex, + isScrollable: true, + onValueSelected: (index) { + _selectedHospitalIndex = index; + _selectedHospital = hospitals[index]; + setState(() {}); + }, + ), + ); + } + + int _selectedPatientIndex = -1; + + void confirmSelectPatientDialog(List patientInfoList) { + List list = [ + for (int i = 0; i < patientInfoList.length; i++) RadioSelectionDialogModel(patientInfoList[i].fullName!, i), + ]; + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + isScrollable: true, + selectedIndex: _selectedPatientIndex, + onValueSelected: (index) { + _selectedPatientIndex = index; + _selectedPatientInfo = patientInfoList[index]; + advanceModel.depositorName = _selectedPatientInfo.fullName; + setState(() {}); + }, + ), + ); + } + + int _selectedFamilyMemberIndex = -1; + + void confirmSelectFamilyDialog(List getAllSharedRecordsByStatusList) { + if (getAllSharedRecordsByStatusList.isNotEmpty) { + List list = [ + for (int i = 0; i < getAllSharedRecordsByStatusList.length; i++) + if (getAllSharedRecordsByStatusList[i].status == 3) RadioSelectionDialogModel(getAllSharedRecordsByStatusList[i].patientName!, i), + ]; + // GifLoaderDialogUtils.hideDialog(context); + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + isScrollable: true, + selectedIndex: _selectedFamilyMemberIndex, + onValueSelected: (index) { + _selectedFamilyMemberIndex = index; + selectedPatientFamily = getAllSharedRecordsByStatusList[index]; + _fileTextController.text = selectedPatientFamily.responseID.toString(); + setState(() {}); + }, + ), + ); + } + } + + String getBeneficiaryType() { + switch (beneficiaryType) { + case BeneficiaryType.MyAccount: + return TranslationBase.of(context).myAccount; + case BeneficiaryType.MyFamilyFiles: + return TranslationBase.of(context).myFamilyFiles; + break; + case BeneficiaryType.OtherAccount: + return TranslationBase.of(context).otherAccount; + break; + case BeneficiaryType.NON: + return TranslationBase.of(context).selectBeneficiary; + } + return TranslationBase.of(context).selectBeneficiary; + } + + String getHospitalName() { + if (_selectedHospital != null && _selectedHospital.name != null) + return _selectedHospital.name!; + else + return TranslationBase.of(context).selectHospital; + } + + String getPatientName() { + if (_selectedPatientInfo != null) + return _selectedPatientInfo.fullName ??""; + else + return TranslationBase.of(context).selectPatientName; + } + + getAuthUser() async { + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + setState(() { + authUser = data; + }); + } + } + + String getFamilyMembersName() { + if (selectedPatientFamily.patientName != null) + return selectedPatientFamily.patientName!; + else + return TranslationBase.of(context).selectFamilyPatientName; + } +} diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart new file mode 100644 index 00000000..70ff4821 --- /dev/null +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -0,0 +1,551 @@ +import 'dart:developer'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/PayfortEnums.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/ApplePayInsertRequest.dart'; +import 'package:diplomaticquarterapp/models/apple_pay_request.dart'; +import 'package:diplomaticquarterapp/models/apple_pay_response.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_project_details_resp_model.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; +import 'new_text_Field.dart'; + +class ConfirmPaymentPage extends StatefulWidget { + final AdvanceModel? advanceModel; + final PatientInfoAndMobileNumber? patientInfoAndMobileNumber; + final String? selectedPaymentMethod; + AuthenticatedUser? authenticatedUser; + String? installmentPlan; + + ConfirmPaymentPage({this.advanceModel, this.patientInfoAndMobileNumber, this.selectedPaymentMethod, this.authenticatedUser, this.installmentPlan}); + + @override + _ConfirmPaymentPageState createState() => _ConfirmPaymentPageState(); +} + +class _ConfirmPaymentPageState extends State { + late MyInAppBrowser browser; + late ProjectViewModel projectViewModel; + + AppSharedPreferences sharedPref = AppSharedPreferences(); + + String transID = ""; + + late String tamaraPaymentStatus; + late String tamaraOrderID; + + // Pay _payClient; + + @override + void initState() { + // _payClient = Pay.withAssets([ + // 'applepay.json', + // ]); + super.initState(); + } + + void submit(MyBalanceViewModel model, code) { + final activationCode = code; + GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + model.checkActivationCodeForAdvancePayment(activationCode: activationCode).then((value) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + Navigator.pop(context, true); + AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + appo.projectID = widget.patientInfoAndMobileNumber!.projectID; + + if (widget.selectedPaymentMethod == "ApplePay") { + if (projectViewModel.havePrivilege(103)) { + startApplePay(); + } else { + openPayment(widget.selectedPaymentMethod!, widget.authenticatedUser!, double.parse(widget.advanceModel!.amount!), AppoitmentAllHistoryResultList()); + } + } else { + openPayment(widget.selectedPaymentMethod!, widget.authenticatedUser!, double.parse(widget.advanceModel!.amount!), AppoitmentAllHistoryResultList()); + } + + projectViewModel.analytics.advancePayments.payment_otp_confirmation(method: widget.selectedPaymentMethod!.toLowerCase(), type: 'wallet'); + // openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, double.parse(widget.advanceModel.amount), null); + }); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + void showSMSDialog(MyBalanceViewModel model) { + new SMSOTP( + context, + 1, + widget.patientInfoAndMobileNumber!.mobileNumber, + (value) { + submit(model, value); + }, + () => { + Navigator.pop(context), + }, + ).displayDialog(context); + } + + projectViewModel = Provider.of(context); + return BaseView( + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).advancePayment, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Container( + margin: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).confirmThePayment, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ), + SizedBox( + height: 12, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + height: 100.0, + padding: EdgeInsets.all(7.0), + width: MediaQuery.of(context).size.width * 0.30, + child: widget.selectedPaymentMethod == "ApplePay" + ? SvgPicture.asset( + getImagePath(widget.selectedPaymentMethod!), + ) + : Image.asset(getImagePath(widget.selectedPaymentMethod!)), + ), + Row( + children: [ + widget.advanceModel!.hospitalsModel!.projectOutSA! ? Container() : projectViewModel.isArabic ? Container() : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 20, height: 20), + mWidth(6), + Text( + widget.advanceModel!.hospitalsModel!.projectOutSA! ? '${widget.advanceModel!.amount} ' + TranslationBase.of(context).aed : '${widget.advanceModel!.amount}', + // '${widget.advanceModel.amount} ' + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.w900, + letterSpacing: -0.48, + ), + ), + mWidth(6), + widget.advanceModel!.hospitalsModel!.projectOutSA! ? Container() : projectViewModel.isArabic ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 20, height: 20) : Container(), + ], + ) + ], + ), + SizedBox( + height: 12, + ), + Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.all(3), + child: NewTextFields( + hintText: TranslationBase.of(context).fileNumber, + initialValue: widget.advanceModel!.fileNumber!, + isEnabled: false, + ), + ), + ), + Expanded( + child: Container( + margin: EdgeInsets.all(3), + child: NewTextFields( + hintText: TranslationBase.of(context).name, + initialValue: widget.patientInfoAndMobileNumber!.firstName!, + isEnabled: false, + ), + ), + ), + ], + ), + SizedBox( + height: 12, + ), + NewTextFields( + hintText: TranslationBase.of(context).mobileNumber, + initialValue: widget.patientInfoAndMobileNumber!.mobileNumber!, + isEnabled: false, + ), + SizedBox( + height: 12, + ), + NewTextFields( + hintText: TranslationBase.of(context).depositorName, + initialValue: model.user!.firstName! + " " + model.user!.middleName! + " " + model.user!.lastName!, + isEnabled: false, + ), + SizedBox( + height: 12, + ), + NewTextFields( + hintText: TranslationBase.of(context).notes, + initialValue: widget.advanceModel!.note!, + isEnabled: false, + ), + ], + ), + ), + ), + bottomSheet: Container( + color: Colors.white, + child: Container( + // height: MediaQuery.of(context).size.width * 0.18, + width: double.infinity, + padding: EdgeInsets.all(20), + child: DefaultButton( + TranslationBase.of(context).confirm.toUpperCase(), + () async { + if (widget.advanceModel!.fileNumber == projectViewModel.user.patientID.toString()) { + if (widget.selectedPaymentMethod == "ApplePay") { + if (projectViewModel.havePrivilege(103)) { + startApplePay(); + } else { + openPayment(widget.selectedPaymentMethod!, widget.authenticatedUser!, double.parse(widget.advanceModel!.amount!), AppoitmentAllHistoryResultList()); + } + } else { + openPayment(widget.selectedPaymentMethod!, widget.authenticatedUser!, double.parse(widget.advanceModel!.amount!), AppoitmentAllHistoryResultList()); + } + } else { + GifLoaderDialogUtils.showMyDialog(context); + model.sendActivationCodeForAdvancePayment(patientID: int.parse(widget.advanceModel!.fileNumber!), projectID: widget.advanceModel!.hospitalsModel!.iD).then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) showSMSDialog(model); + }); + } + projectViewModel.analytics.advancePayments.payment_confirm(method: widget.selectedPaymentMethod!.toLowerCase(), type: 'wallet'); + + // startApplePay(); + // if() + // GifLoaderDialogUtils.showMyDialog(context); + // model.sendActivationCodeForAdvancePayment(patientID: int.parse(widget.advanceModel.fileNumber), projectID: widget.advanceModel.hospitalsModel.iD).then((value) { + // GifLoaderDialogUtils.hideDialog(context); + // if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) showSMSDialog(model); + // }); + }, + ), + ), + ), + ), + ); + } + + void startApplePay() async { + transID = Utils.getAdvancePaymentTransID(widget.advanceModel!.hospitalsModel!.iD!, int.parse(widget.advanceModel!.fileNumber!)); + print("TransactionID: $transID"); + GifLoaderDialogUtils.showMyDialog(context); + + LiveCareService service = new LiveCareService(); + ApplePayInsertRequest applePayInsertRequest = new ApplePayInsertRequest(); + + PayfortProjectDetailsRespModel? payfortProjectDetailsRespModel; + await context + .read() + .getProjectDetailsForPayfort(projectId: widget.advanceModel!.hospitalsModel!.iD, serviceId: ServiceTypeEnum.advancePayment.getIdFromServiceEnum()) + .then((value) { + payfortProjectDetailsRespModel = value!; + }); + + applePayInsertRequest.clientRequestID = transID; + applePayInsertRequest.clinicID = 0; + applePayInsertRequest.currency = projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR"; + // applePayInsertRequest.customerEmail = projectViewModel.authenticatedUserObject.user.emailAddress; + applePayInsertRequest.customerEmail = "CustID_${widget.advanceModel!.fileNumber}@HMG.com"; + applePayInsertRequest.customerID = widget.advanceModel!.fileNumber; + applePayInsertRequest.customerName = projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user.lastName!; + applePayInsertRequest.deviceToken = await AppSharedPreferences().getString(PUSH_TOKEN); + applePayInsertRequest.voipToken = await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN); + applePayInsertRequest.doctorID = 0; + applePayInsertRequest.projectID = widget.advanceModel!.hospitalsModel!.iD.toString(); + applePayInsertRequest.serviceID = ServiceTypeEnum.advancePayment.getIdFromServiceEnum().toString(); + applePayInsertRequest.channelID = 3; + applePayInsertRequest.patientID = widget.advanceModel!.fileNumber; + applePayInsertRequest.patientTypeID = projectViewModel.authenticatedUserObject.user.patientType; + applePayInsertRequest.patientOutSA = projectViewModel.authenticatedUserObject.user.outSA; + applePayInsertRequest.appointmentDate = null; + applePayInsertRequest.appointmentNo = 0; + applePayInsertRequest.orderDescription = "Advance Payment"; + applePayInsertRequest.liveServiceID = "0"; + applePayInsertRequest.latitude = "0.0"; + applePayInsertRequest.longitude = "0.0"; + applePayInsertRequest.amount = widget.advanceModel!.amount.toString(); + applePayInsertRequest.isSchedule = "0"; + applePayInsertRequest.language = projectViewModel.isArabic ? 'ar' : 'en'; + applePayInsertRequest.languageID = projectViewModel.isArabic ? 1 : 2; + applePayInsertRequest.userName = int.parse(widget.advanceModel!.fileNumber!); + applePayInsertRequest.responseContinueURL = "http://hmg.com/Documents/success.html"; + applePayInsertRequest.backClickUrl = "http://hmg.com/Documents/success.html"; + applePayInsertRequest.paymentOption = "ApplePay"; + + applePayInsertRequest.isMobSDK = true; + applePayInsertRequest.merchantReference = transID; + applePayInsertRequest.merchantIdentifier = payfortProjectDetailsRespModel!.merchantIdentifier; + applePayInsertRequest.commandType = "PURCHASE"; + applePayInsertRequest.signature = payfortProjectDetailsRespModel!.signature; + applePayInsertRequest.accessCode = payfortProjectDetailsRespModel!.accessCode; + applePayInsertRequest.shaRequestPhrase = payfortProjectDetailsRespModel!.shaRequest; + applePayInsertRequest.shaResponsePhrase = payfortProjectDetailsRespModel!.shaResponse; + applePayInsertRequest.returnURL = ""; + + service.applePayInsertRequest(applePayInsertRequest, context).then((res) async { + if (res["MessageStatus"] == 1) { + await context.read().initiateApplePayWithPayfort( + customerName: projectViewModel.authenticatedUserObject.user.firstName! + " " + projectViewModel.authenticatedUserObject.user.lastName!, + // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, + customerEmail: "CustID_${widget.advanceModel!.fileNumber!}@HMG.com", + orderDescription: "Advance Payment", + orderAmount: double.parse(widget.advanceModel!.amount!), + merchantReference: transID, + payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, + currency: projectViewModel.authenticatedUserObject.user.outSA == 1 ? "AED" : "SAR", + onFailed: (failureResult) async { + GifLoaderDialogUtils.hideDialog(context); + log("failureResult: ${failureResult.message.toString()}"); + AppToast.showErrorToast(message: failureResult.message.toString()); + }, + onSuccess: (successResult) async { + log("Payfort: ${successResult.responseMessage}"); + await context.read().addPayfortApplePayResponse(num.parse(widget.advanceModel!.fileNumber!), result: successResult); + checkPaymentStatus(AppoitmentAllHistoryResultList()); + }, + projectId: widget.advanceModel!.hospitalsModel!.iD, + serviceTypeEnum: ServiceTypeEnum.advancePayment, + ); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: "An error occurred while processing your request"); + } + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + }); + } + + String getApplePayPaymentType(dynamic paymentMethod) { + switch (paymentMethod) { + case 1: + return 'debit'; + break; + case 2: + return 'credit'; + break; + case 3: + return 'prepaid'; + break; + } + return 'debit'; + } + + String getImagePath(String paymentMethod) { + switch (paymentMethod) { + case "MADA": + return 'assets/images/new/payment/Mada.png'; + break; + case "SADAD": + return 'assets/images/new-design/sadad.png'; + break; + case "VISA": + return 'assets/images/new/payment/visa.png'; + break; + case "MASTERCARD": + return 'assets/images/new/payment/Mastercard.png'; + break; + case "Installment": + return 'assets/images/new/payment/installments.png'; + break; + case "ApplePay": + return 'assets/images/new/payment/Apple_Pay.svg'; + // return 'assets/images/new/payment/Apple_Pay.png'; + break; + case "TAMARA": + return 'assets/images/new/payment/tamara.png'; + break; + } + + return 'assets/images/new-design/mada.png'; + } + + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo) { + browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); + + transID = Utils.getAdvancePaymentTransID(widget.advanceModel!.hospitalsModel!.iD, int.parse(widget.advanceModel!.fileNumber!)); + + browser.openPaymentBrowser( + amount, + "Advance Payment", + transID, + widget.advanceModel!.hospitalsModel!.iD.toString(), + widget.advanceModel!.email!, + paymentMethod, + widget.patientInfoAndMobileNumber!.patientType, + widget.advanceModel!.patientName!, + widget.advanceModel!.fileNumber!, + authenticatedUser, + browser, + false, + "3", + "0", + context, + "", + "", + "", + "", + widget.installmentPlan); + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + + if (widget.selectedPaymentMethod == "TAMARA") { + Uri uri = new Uri.dataFromString(url); + tamaraPaymentStatus = uri.queryParameters['paymentStatus']!; + tamaraOrderID = uri.queryParameters['orderId']!; + print(tamaraPaymentStatus); + print(tamaraOrderID); + } + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (browser.isOpened()) browser.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called"); + if (widget.selectedPaymentMethod == "TAMARA" && tamaraPaymentStatus != null && tamaraPaymentStatus == "approved") { + var res = { + "Amount": double.parse(widget.advanceModel!.amount!), + "ErrorMessage": null, + "Fort_id": tamaraOrderID, + "Merchant_Reference": "5058637919318707883366", + "PaymentMethod": "TAMARA", + "Response_Message": "Success" + }; + createAdvancePayment(res, appo); + } else { + checkPaymentStatus(appo); + } + } + + checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + String txn_ref; + String amount; + String payment_method; + final currency = projectViewModel.user!.outSA == 0 ? "sar" : 'aed'; + GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + DoctorsListService service = new DoctorsListService(); + service.checkPaymentStatus(transID, false, AppGlobal.context).then((res) { + String paymentInfo = res['Response_Message']; + if (paymentInfo == 'Success') { + txn_ref = res['Merchant_Reference']; + amount = res['Amount'].toString(); + payment_method = res['PaymentMethod']; + createAdvancePayment(res, appo); + projectViewModel.analytics.advancePayments.payment_success( + payment_type: 'wallet', payment_method: payment_method, txn_amount: "$amount", txn_currency: currency, txn_number: txn_ref, hospital: widget.advanceModel!.hospitalsModel!.name!); + } else { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showErrorToast(message: res['Response_Message']); + amount = widget.advanceModel!.amount!; + payment_method = widget.selectedPaymentMethod!; + projectViewModel.analytics.advancePayments.payment_fail( + payment_type: 'wallet', + payment_method: payment_method, + txn_amount: "$amount", + txn_currency: currency, + hospital: widget.advanceModel!.hospitalsModel!.name!, + error_type: res['Response_Message']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + String paymentReference = res['Fort_id'].toString(); + service.HIS_createAdvancePayment(appo, widget.advanceModel!.hospitalsModel!.iD.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], widget.patientInfoAndMobileNumber!.patientType, + widget.advanceModel!.patientName!, widget.advanceModel!.fileNumber, AppGlobal.context) + .then((res) { + addAdvancedNumberRequest( + Utils.isVidaPlusProject(projectViewModel, widget.advanceModel!.hospitalsModel!.iD) + ? res['OnlineCheckInAppointments'][0]['AdvanceNumber_VP'].toString() + : res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), + paymentReference, + 0, + appo); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, AppoitmentAllHistoryResultList appo) { + DoctorsListService service = new DoctorsListService(); + service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + navigateToHome(AppGlobal.context); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + Future navigateToHome(context) async { + Navigator.of(context).pushNamed(HOME); + } +} diff --git a/lib/pages/medical/balance/dialogs/ConfirmSMSDialog.dart b/lib/pages/medical/balance/dialogs/ConfirmSMSDialog.dart new file mode 100644 index 00000000..de22c7af --- /dev/null +++ b/lib/pages/medical/balance/dialogs/ConfirmSMSDialog.dart @@ -0,0 +1,375 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class ConfirmSMSDialog extends StatefulWidget { + final String? phoneNumber; + final AdvanceModel? advanceModel; + final PatientInfoAndMobileNumber? patientInfoAndMobileNumber; + final String? selectedPaymentMethod; + + const ConfirmSMSDialog( + {Key? key, + this.phoneNumber, + this.advanceModel, + this.selectedPaymentMethod, + this.patientInfoAndMobileNumber}) + : super(key: key); + + @override + _ConfirmSMSDialogState createState() => _ConfirmSMSDialogState(); +} + +class _ConfirmSMSDialogState extends State { + final verifyAccountForm = GlobalKey(); + Map verifyAccountFormValue = { + 'digit1': null, + 'digit2': null, + 'digit3': null, + 'digit4': null, + }; + + TextEditingController digit1 = TextEditingController(text: ""); + TextEditingController digit2 = TextEditingController(text: ""); + TextEditingController digit3 = TextEditingController(text: ""); + TextEditingController digit4 = TextEditingController(text: ""); + + String timerText = (TIMER_MIN - 1).toString() + ':59'; + int min = TIMER_MIN - 1; + int sec = 59; + late Timer _timer; + + resendCode() { + min = TIMER_MIN - 1; + sec = 59; + _timer = Timer.periodic(Duration(seconds: 1), (Timer timer) { + if (min <= 0 && sec <= 0) { + timer.cancel(); + } else { + setState(() { + sec = sec - 1; + if (sec == 0 && min == 0) { + Navigator.pop(context); + min = 0; + sec = 0; + } else if (sec == 0) { + min = min - 1; + sec = 59; + } + timerText = min.toString() + ':' + sec.toString(); + }); + } + }); + } + + late FocusNode focusD1; + late FocusNode focusD2; + late FocusNode focusD3; + late FocusNode focusD4; + + @override + void initState() { + super.initState(); + resendCode(); + focusD1 = FocusNode(); + focusD2 = FocusNode(); + focusD3 = FocusNode(); + focusD4 = FocusNode(); + } + + @override + void dispose() { + _timer.cancel(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + builder: (_, model, w) => Dialog( + elevation: 0.6, + child: Container( + height: 520, + child: ListView( + children: [ + Container( + width: double.infinity, + height: 40, + color: Colors.grey[700], + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 4, + child: Center( + child: Texts( + 'SMS', + color: Colors.white, + textAlign: TextAlign.center, + ))), + Expanded( + flex: 1, + child: InkWell( + onTap: () => Navigator.pop(context), + child: Container( + decoration: BoxDecoration( + shape: BoxShape.circle, color: Colors.white), + child: Icon( + Icons.clear, + color: Colors.grey[900], + )), + ), + ) + ], + ), + ), + Image.asset( + 'assets/images/login/103.png', + height: MediaQuery.of(context).size.width * 0.25, + width: MediaQuery.of(context).size.width * 0.25, + ), + SizedBox( + height: 12, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + TranslationBase.of(context).pleaseEnterTheVerificationCode + + '[${widget.phoneNumber}]', + textAlign: TextAlign.center, + ), + ), + SizedBox( + height: 12, + ), + Form( + key: verifyAccountForm, + child: Container( + width: SizeConfig.realScreenWidth! * 0.90, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 30, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Container( + width: 65, + child: TextFormField( + textInputAction: TextInputAction.next, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 3, + ), + focusNode: focusD1, + //maxLength: 1, + controller: digit1, + textAlign: TextAlign.center, + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + onSaved: (val) { + verifyAccountFormValue['digit1'] = val; + }, + validator: validateCodeDigit, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD2); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context).requestFocus(focusD2); + } + }, + ), + ), + Container( + width: 65, + child: TextFormField( + focusNode: focusD2, + controller: digit2, + textInputAction: TextInputAction.next, + //maxLength: 1, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 3, + ), + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + validator: validateCodeDigit, + onSaved: (val) { + verifyAccountFormValue['digit2'] = val; + }, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD3); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context).requestFocus(focusD3); + } + }, + ), + ), + Container( + width: 65, + child: TextFormField( + focusNode: focusD3, + controller: digit3, + textInputAction: TextInputAction.next, + //maxLength: 1, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 3, + ), + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + validator: validateCodeDigit, + onSaved: (val) { + verifyAccountFormValue['digit3'] = val; + }, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD4); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context) + .requestFocus(focusD4); + } + }, + )), + Container( + width: 65, + child: TextFormField( + focusNode: focusD4, + controller: digit4, + // maxLength: 1, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: SizeConfig.textMultiplier! * 3, + ), + keyboardType: TextInputType.number, + decoration: buildInputDecoration(context), + validator: validateCodeDigit, + onSaved: (val) { + verifyAccountFormValue['digit4'] = val; + }, + onFieldSubmitted: (_) { + FocusScope.of(context).requestFocus(focusD4); + submit(model); + }, + onChanged: (val) { + if (val.length == 1) { + FocusScope.of(context) + .requestFocus(focusD4); + submit(model); + } + }), + ) + ], + ), + SizedBox( + height: 8, + ), + if (model.state == ViewState.ErrorLocal || + model.state == ViewState.Error) + Container( + margin: EdgeInsets.only(left: 8, right: 8), + width: double.maxFinite, + child: Texts( + model.error, + color: Colors.red, + ), + ), + SizedBox(height: 20), + // buildText(), + + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + TranslationBase.of(context) + .theVerificationCodeExpiresIn + + ' $timerText', + textAlign: TextAlign.center, + ), + ), + SizedBox(height: 20), + + Container( + width: double.maxFinite, + padding: EdgeInsets.all(12), + child: SecondaryButton( + textColor: Colors.white, + label: + TranslationBase.of(context).submit.toUpperCase(), + onTap: () { + submit(model); + }, + ), + ), + ], + ), + ), + ) + ], + ), + ), + ), + ); + } + + void submit(MyBalanceViewModel model) { + if (verifyAccountForm.currentState!.validate()) { + final activationCode = + digit1.text + digit2.text + digit3.text + digit4.text; + GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + model + .checkActivationCodeForAdvancePayment(activationCode: activationCode) + .then((value) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + Navigator.pop(context, true); + }); + } + } + + String validateCodeDigit(value) { + if (value.isEmpty) { + return ''; + } + return "null"; + } + + InputDecoration buildInputDecoration(BuildContext context) { + return InputDecoration( + // ts/images/password_icon.png + contentPadding: EdgeInsets.only(top: 20, bottom: 20), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5)), + borderSide: BorderSide(color: Colors.black), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + borderSide: BorderSide(color: Theme.of(context).primaryColor), + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + borderSide: BorderSide(color: CustomColors.accentColor), + ), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + borderSide: BorderSide(color: CustomColors.accentColor), + ), + ); + } +} diff --git a/lib/pages/medical/balance/dialogs/SelectCiteisDialog.dart b/lib/pages/medical/balance/dialogs/SelectCiteisDialog.dart new file mode 100644 index 00000000..e7c766fd --- /dev/null +++ b/lib/pages/medical/balance/dialogs/SelectCiteisDialog.dart @@ -0,0 +1,139 @@ +//import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/model/blooddonation/get_all_cities.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +// todo 'sikander' remove this file when usage known +class SelectCiteisDialog extends StatefulWidget { + final List? hospitals; + final Function(CitiesModel)? onValueSelected; + CitiesModel? selectedHospital; + + SelectCiteisDialog( + {Key? key, this.hospitals, this.onValueSelected, this.selectedHospital}); + + @override + _SelectCiteisDialogState createState() => _SelectCiteisDialogState(); +} + +class _SelectCiteisDialogState extends State { + @override + void initState() { + super.initState(); + + widget.selectedHospital = widget.selectedHospital ?? widget.hospitals![0]; + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + + return SimpleDialog( + children: [ + Column( + children: [ + Divider(), + ...List.generate( + widget.hospitals!.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.selectedHospital = widget.hospitals![index]; + }); + }, + child: ListTile( + // title: Text(widget.hospitals[index].description + + // ' ${widget.hospitals[index].distanceInKilometers} KM'), + title: Text(projectProvider.isArabic + ? widget.hospitals![index].descriptionN! + : widget.hospitals![index].description!), + leading: Radio( + value: widget.hospitals![index], + groupValue: widget.selectedHospital, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + widget.selectedHospital = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + ], + ), + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected!(widget.selectedHospital!); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + )), + ), + ), + ), + ], + ) + ], + ) + ], + ); + } +} diff --git a/lib/pages/medical/balance/my_balance_page.dart b/lib/pages/medical/balance/my_balance_page.dart new file mode 100644 index 00000000..462c71c2 --- /dev/null +++ b/lib/pages/medical/balance/my_balance_page.dart @@ -0,0 +1,233 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/model/my_balance/patient_advance_balance_amount.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:provider/provider.dart'; + +import 'advance_payment_page.dart'; + +class MyBalancePage extends StatelessWidget { + List imagesInfo = []; + + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/my-balance/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/my-balance/ar/0.png')); + return BaseView( + onModelReady: (model) => model.getPatientAdvanceBalanceAmount(), + builder: (_, model, w) => AppScaffold( + baseViewModel: model, + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).myWallet, + imagesInfo: imagesInfo, + description: TranslationBase.of(context).infoMyBalance, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.fromLTRB(14, 12, 10, 12), + decoration: BoxDecoration( + color: Color(0xff2B353E), + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SvgPicture.asset( + "assets/images/new/services/balance_credit.svg", + height: 40, + width: 40, + color: Colors.white, + ), + SizedBox(height: 6), + Text( + TranslationBase.of(context).totalBalance, + style: TextStyle( + fontSize: 16, + letterSpacing: -0.96, + fontWeight: FontWeight.bold, + color: Colors.white, + //height: 16/22 + ), + ), + ], + ), + ), + Container( + padding: EdgeInsets.fromLTRB(14, 10, 12, 10), + decoration: BoxDecoration( + color: Color(0xff3f4850), + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + mainAxisSize: MainAxisSize.min, + children: [ + Row( + children: [ + projectViewModel.user!.outSA == 1 + ? Container() + : projectViewModel.isArabic + ? Container() + : SvgPicture.asset( + "assets/images/new/Saudi_Riyal_Symbol.svg", + width: 22, + height: 22, + color: Colors.white, + ), + mWidth(6), + Text( + double.parse(model.totalAdvanceBalanceAmount?.toString() ?? "0").toStringAsFixed(2), + style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.bold, + letterSpacing: -1.44, + height: 24 / 21, + color: Colors.white, + ), + ), + mWidth(6), + projectViewModel.user!.outSA == 1 + ? Container() + : projectViewModel.isArabic + ? SvgPicture.asset( + "assets/images/new/Saudi_Riyal_Symbol.svg", + width: 22, + height: 22, + color: Colors.white, + ) + : Container(), + ], + ), + Text( + projectViewModel.user!.outSA == 1 ? TranslationBase.of(context).aed : "", + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + letterSpacing: -0.96, + color: Colors.white, + ), + ), + ], + ), + ), + ], + ), + ), + SizedBox(height: 12), + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (cxt, index) { + PatientAdvanceBalanceAmount balanceAmount = model.patientAdvanceBalanceAmountList[index]; + double amount = double.parse(balanceAmount.patientAdvanceBalanceAmount?.toString() ?? "0"); + return Container( + padding: EdgeInsets.fromLTRB(14, 18, 14, 18), + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + balanceAmount!.projectDescription!, + style: TextStyle( + fontSize: 16, + letterSpacing: -0.64, + fontWeight: amount > 0 ? FontWeight.bold : FontWeight.w500, + color: Color(0xff2E303A), + ), + ), + ), + Row( + children: [ + projectViewModel.user!.outSA == 1 + ? Container() + : projectViewModel.isArabic + ? Container() + : SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16), + mWidth(6), + Text( + amount.toStringAsFixed(2) + " " + (projectViewModel.user!.outSA == 1 ? TranslationBase.of(context).aed : ""), + style: TextStyle( + fontSize: 16, + letterSpacing: -0.64, + fontWeight: amount > 0 ? FontWeight.bold : FontWeight.w500, + color: Color(0xff2E303A), + ), + ), + mWidth(6), + projectViewModel.user!.outSA == 1 + ? Container() + : projectViewModel.isArabic + ? SvgPicture.asset("assets/images/new/Saudi_Riyal_Symbol.svg", width: 16, height: 16) + : Container(), + ], + ), + ], + ), + ); + }, + separatorBuilder: (cxt, index) => SizedBox(height: 12), + itemCount: model.patientAdvanceBalanceAmountList.length), + ], + ), + ), + ), + DefaultButton( + TranslationBase.of(context).createAdvancedPayment, + () { + Navigator.push(context, FadePage(page: AdvancePaymentPage())); + projectViewModel.analytics.advancePayments.wallet_recharge(service_type: 'alhabib wallet'); + }, + ).insideContainer, + ], + ), + ), + ); + } +} diff --git a/lib/pages/medical/balance/new_text_Field.dart b/lib/pages/medical/balance/new_text_Field.dart new file mode 100644 index 00000000..fb9d8bed --- /dev/null +++ b/lib/pages/medical/balance/new_text_Field.dart @@ -0,0 +1,213 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +class NumberTextInputFormatter extends TextInputFormatter { + @override + TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) { + final int newTextLength = newValue.text.length; + int selectionIndex = newValue.selection.end; + int usedSubstringIndex = 0; + final StringBuffer newText = StringBuffer(); + if (newTextLength >= 1) { + newText.write('('); + if (newValue.selection.end >= 1) selectionIndex++; + } + if (newTextLength >= 4) { + newText.write(newValue.text.substring(0, usedSubstringIndex = 3) + ') '); + if (newValue.selection.end >= 3) selectionIndex += 2; + } + if (newTextLength >= 7) { + newText.write(newValue.text.substring(3, usedSubstringIndex = 6) + '-'); + if (newValue.selection.end >= 6) selectionIndex++; + } + if (newTextLength >= 11) { + newText.write(newValue.text.substring(6, usedSubstringIndex = 10) + ' '); + if (newValue.selection.end >= 10) selectionIndex++; + } + // Dump the rest. + if (newTextLength >= usedSubstringIndex) newText.write(newValue.text.substring(usedSubstringIndex)); + return TextEditingValue( + text: newText.toString(), + selection: TextSelection.collapsed(offset: selectionIndex), + ); + } +} + +final _mobileFormatter = NumberTextInputFormatter(); + +class NewTextFields extends StatefulWidget { + NewTextFields( + {Key? key, + this.type, + this.hintText, + this.suffixIcon, + this.autoFocus, + this.onChanged, + this.initialValue, + this.minLines, + this.maxLines, + this.inputFormatters, + this.padding, + this.focus = false, + this.maxLengthEnforced = true, + this.suffixIconColor, + this.inputAction, + this.onSubmit, + this.keepPadding = true, + this.textCapitalization = TextCapitalization.none, + this.controller, + this.keyboardType, + this.validator, + this.borderOnlyError = false, + this.onSaved, + this.onSuffixTap, + this.readOnly = false, + this.maxLength, + this.prefixIcon, + this.bare = false, + this.onTap, + this.fontSize = 14.0, + this.fontWeight = FontWeight.w600, + this.hintColor, + this.isEnabled = true, + this.counterText = ""}) + : super(key: key); + + final String? hintText; + + // final String initialValue; + final String? type; + final bool? autoFocus; + final IconData? suffixIcon; + final Color? suffixIconColor; + final Icon? prefixIcon; + final VoidCallback? onTap; + final TextEditingController? controller; + final TextInputType? keyboardType; + final FormFieldValidator? validator; + final Function(String?)? onSaved; + final Function? onSuffixTap; + final Function(String)? onChanged; + final Function(String)? onSubmit; + final bool readOnly; + final int? maxLength; + final int? minLines; + final int? maxLines; + final bool maxLengthEnforced; + final bool bare; + final bool isEnabled; + final TextInputAction? inputAction; + final double fontSize; + final FontWeight fontWeight; + final bool keepPadding; + final TextCapitalization textCapitalization; + final List? inputFormatters; + final EdgeInsets? padding; + final bool focus; + final bool borderOnlyError; + final Color? hintColor; + final String? initialValue; + final String counterText; + + @override + _NewTextFieldsState createState() => _NewTextFieldsState(); +} + +class _NewTextFieldsState extends State { + final FocusNode _focusNode = FocusNode(); + bool focus = false; + bool view = false; + + @override + void initState() { + super.initState(); + _focusNode.addListener(() { + setState(() { + focus = _focusNode.hasFocus; + }); + }); + } + + @override + void didUpdateWidget(NewTextFields oldWidget) { + if (widget.focus) _focusNode.requestFocus(); + super.didUpdateWidget(oldWidget); + } + + @override + void dispose() { + _focusNode.dispose(); + super.dispose(); + } + + bool _determineReadOnly() { + if (widget.readOnly != null && widget.readOnly) { + _focusNode.unfocus(); + return true; + } else { + return false; + } + } + + @override + Widget build(BuildContext context) { + return AnimatedContainer( + duration: Duration(milliseconds: 300), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Container( + margin: EdgeInsets.only(top: 8), + child: TextFormField( + enabled: widget.isEnabled, + initialValue: widget.initialValue, + keyboardAppearance: Theme.of(context).brightness, + scrollPhysics: BouncingScrollPhysics(), + textCapitalization: widget.textCapitalization, + onFieldSubmitted: widget.inputAction == TextInputAction.next + ? (widget.onSubmit != null + ? widget.onSubmit + : (val) { + _focusNode.nextFocus(); + }) + : widget.onSubmit, + textInputAction: widget.inputAction, + minLines: widget.minLines ?? 1, + maxLines: widget.maxLines ?? 1, + // maxLengthEnforced: widget.maxLengthEnforced, + onChanged: widget.onChanged, + focusNode: _focusNode, + maxLength: widget.maxLength ?? null, + controller: widget.controller, + keyboardType: widget.keyboardType, + readOnly: _determineReadOnly(), + obscureText: widget.type == "password" && !view ? true : false, + autofocus: widget.autoFocus ?? false, + validator: widget.validator, + onSaved: widget.onSaved, + // style: Theme.of(context).textTheme.bodyText2!.copyWith(fontSize: widget.fontSize, fontWeight: widget.fontWeight), + style: TextStyle(color: Colors.black, letterSpacing: 0.6, fontSize: widget.fontSize, fontWeight: widget.fontWeight), + inputFormatters: widget.keyboardType == TextInputType.phone + ? [ + FilteringTextInputFormatter.digitsOnly, + _mobileFormatter, + ] + : widget.inputFormatters, + decoration: InputDecoration( + labelText: widget.hintText, + counterText: widget.counterText, + labelStyle: TextStyle(color: Colors.black), + errorBorder: OutlineInputBorder(borderSide: BorderSide(color: CustomColors.accentColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(12.0)), + focusedErrorBorder: OutlineInputBorder(borderSide: BorderSide(color: CustomColors.accentColor.withOpacity(0.5), width: 1.0), borderRadius: BorderRadius.circular(8.0)), + focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)), + disabledBorder: OutlineInputBorder(borderSide: BorderSide(color: Colors.white, width: 1.0), borderRadius: BorderRadius.circular(12)), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.white, width: 1.0), + borderRadius: BorderRadius.circular(12), + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/medical/dental_instructions_page.dart b/lib/pages/medical/dental_instructions_page.dart new file mode 100644 index 00000000..133165d7 --- /dev/null +++ b/lib/pages/medical/dental_instructions_page.dart @@ -0,0 +1,85 @@ +import 'package:diplomaticquarterapp/models/get_dental_instructions_response_model.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; + +class DentalInstructionsPage extends StatefulWidget { + const DentalInstructionsPage(); + + @override + State createState() => _DentalInstructionsPageState(); +} + +class _DentalInstructionsPageState extends State { + GetDentalInstructionsResponseModel? getDentalInstructionsResponseModel; + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((_) { + getDentalInstructions(); + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).myinstructions, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Container( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + children: [ + getDentalInstructionsResponseModel != null && getDentalInstructionsResponseModel!.data!.isNotEmpty + ? ListView.builder( + itemCount: getDentalInstructionsResponseModel!.data!.length, + shrinkWrap: true, + itemBuilder: (context, index) { + return Padding( + padding: EdgeInsets.only(top: 16.0, bottom: 16.0), + child: Text( + getDentalInstructionsResponseModel!.data![index].smsContent!, + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.56, + color: Color(0xff575757), + ), + ), + ); + }, + ) + : Center(child: getNoDataWidget(context)), + ], + ), + ), + ), + ), + ); + } + + getDentalInstructions() { + GifLoaderDialogUtils.showMyDialog(context); + ClinicListService service = new ClinicListService(); + service.getDentalInstructions().then((res) { + print(res["ProcedureNotificationResponse"]); + getDentalInstructionsResponseModel = GetDentalInstructionsResponseModel.fromJson(res["ProcedureNotificationResponse"]); + GifLoaderDialogUtils.hideDialog(context); + setState(() {}); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err.toString()); + }); + } +} diff --git a/lib/pages/medical/doctor/doctor_home_page.dart b/lib/pages/medical/doctor/doctor_home_page.dart new file mode 100644 index 00000000..c75d9582 --- /dev/null +++ b/lib/pages/medical/doctor/doctor_home_page.dart @@ -0,0 +1,99 @@ +import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/my_doctor_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class DoctorHomePage extends StatelessWidget { + List imagesInfo =[]; + @override + Widget build(BuildContext context) { + imagesInfo + .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-doctor/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-doctor/ar/0.png')); + imagesInfo + .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-doctor/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-doctor/ar/1.png')); + return BaseView( + onModelReady: (model) => model.getMyDoctor(), + builder: (context, MyDoctorViewModel model, widget) => AppScaffold( + baseViewModel: model, + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).myDoctor, + description: TranslationBase.of(context).infoMyDoctor, + infoList: TranslationBase.of(context).infoMyDoctorPoints, + showNewAppBar: true, + showNewAppBarTitle: true, + imagesInfo: imagesInfo, + backgroundColor: Color(0xffF8F8F8), + body: Column( + children: [ + Row( + children: [ + MyTabView(TranslationBase.of(context).byClinic, FilterType.Clinic, model.filterType, () { + model.setFilterType(FilterType.Clinic); + }), + MyTabView(TranslationBase.of(context).byHospital, FilterType.Hospital, model.filterType, () { + model.setFilterType(FilterType.Hospital); + }), + ], + ), + Expanded( + child: FractionallySizedBox( + widthFactor: 1.0, + child: ListView.separated( + physics: BouncingScrollPhysics(), + separatorBuilder: (context, index) { + return Container( + height: 12, + margin: EdgeInsets.only(left: 21, right: 21), + // color: Color(0xffD9D9D9), + ); + }, + itemBuilder: (context, index) { + return AppExpandableNotifier( + title: model.patientDoctorAppointmentList[index].filterName, + bodyWidget: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), + itemBuilder: (context, _index) { + DoctorList _doctorList = model.patientDoctorAppointmentList[index].patientDoctorAppointmentList![_index]; + DoctorList doctorList = DoctorList( + projectID: _doctorList.projectID, + setupID: _doctorList.setupID, + clinicID: _doctorList.clinicID, + projectName: _doctorList.projectName, + clinicName: _doctorList.clinicName, + actualDoctorRate: _doctorList.actualDoctorRate, + doctorID: _doctorList.doctorID, + date: _doctorList.appointmentDate, + doctorRate: _doctorList.doctorRate, + gender: _doctorList.gender, + doctorTitle: _doctorList.doctorTitle, + name: _doctorList.name, + doctorImageURL: _doctorList.doctorImageURL, + nationalityFlagURL: _doctorList.nationalityFlagURL); + return DoctorView( + doctor: doctorList, + isLiveCareAppointment: _doctorList.isLiveCareClinic!, + ); + }, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemCount: model.patientDoctorAppointmentList[index].patientDoctorAppointmentList!.length), + ); + }, + itemCount: model.patientDoctorAppointmentList.length), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/medical/doctor/doctor_information_page.dart b/lib/pages/medical/doctor/doctor_information_page.dart new file mode 100644 index 00000000..262bd87c --- /dev/null +++ b/lib/pages/medical/doctor/doctor_information_page.dart @@ -0,0 +1,199 @@ +import 'package:diplomaticquarterapp/core/model/doctor/doctor_profile.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class DoctorInformation extends StatefulWidget { + final DoctorProfile doctorProfile; + + const DoctorInformation({Key? key, required this.doctorProfile}) : super(key: key); + + @override + _DoctorInformationState createState() => _DoctorInformationState(); +} + +class _DoctorInformationState extends State { + bool _isShowInfo = true; + bool _isScientificQualification = true; + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey[200], + body: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(top: 10, right: 10, left: 10), + padding: EdgeInsets.all(10.0), + width: double.infinity, + //height: 250, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(10.0)), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Icon( + Icons.person, + size: 25, + color: Colors.red[700], + ), + SizedBox( + width: 10, + ), + Expanded(child: Texts(widget.doctorProfile.doctorName)), + InkWell( + onTap: () { + setState(() { + _isShowInfo = !_isShowInfo; + }); + }, + child: Container( + margin: EdgeInsets.all(5), + decoration: + BoxDecoration(shape: BoxShape.circle, boxShadow: [ + BoxShadow( + color: Colors.red[700]!, + blurRadius: 1.0, + spreadRadius: 0.0, + ) + ]), + child: Icon( + _isShowInfo + ? Icons.keyboard_arrow_up + : Icons.keyboard_arrow_down , + size: 25, + color: Colors.white, + )), + ), + ], + ), + if (_isShowInfo) + AnimatedContainer( + duration: Duration(milliseconds: 7000), + margin: EdgeInsets.only(top: 20), + // height: 150, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts('Gender'), + Texts( + widget.doctorProfile.genderDescription, + variant: 'overline', + ), + ], + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts('Nationality'), + Texts( + widget.doctorProfile.nationalityName, + variant: 'overline', + ), + ], + ), + ], + ), + SizedBox( + height: 5, + ), + Divider( + height: 3, + color: Colors.grey, + ), + SizedBox( + height: 5, + ), + Texts('Clinic'), + Texts( + widget.doctorProfile.clinicDescription, + variant: 'overline', + ), + ], + ), + ) + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 10, right: 10, left: 10), + padding: EdgeInsets.all(10.0), + width: double.infinity, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(10.0)), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Icon( + Icons.local_play, + size: 25, + color: Colors.red[700], + ), + SizedBox( + width: 10, + ), + Expanded(child: Texts(widget.doctorProfile.doctorName)), + InkWell( + onTap: () { + setState(() { + _isScientificQualification = + !_isScientificQualification; + }); + }, + child: Container( + margin: EdgeInsets.all(5), + decoration: + BoxDecoration(shape: BoxShape.circle, boxShadow: [ + BoxShadow( + color: Colors.red[700]!, + blurRadius: 1.0, + spreadRadius: 0.0, + ) + ]), + child: Icon( + _isScientificQualification + ? Icons.keyboard_arrow_up + : Icons.keyboard_arrow_down, + size: 25, + color: Colors.white, + )), + ), + ], + ), + if (_isScientificQualification) + AnimatedContainer( + duration: Duration(milliseconds: 7000), + margin: EdgeInsets.only(top: 20), + // height: 150, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(widget.doctorProfile.doctorProfileInfo,) + ], + ), + ) + ], + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/medical/doctor/doctor_profile_page.dart b/lib/pages/medical/doctor/doctor_profile_page.dart new file mode 100644 index 00000000..5f9436c9 --- /dev/null +++ b/lib/pages/medical/doctor/doctor_profile_page.dart @@ -0,0 +1,178 @@ +import 'package:diplomaticquarterapp/core/model/doctor/patient_doctor_appointment.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/my_doctor_view_model.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class DoctorProfilePage extends StatefulWidget { + final PatientDoctorAppointment patientDoctorAppointment; + + DoctorProfilePage({required this.patientDoctorAppointment}); + + @override + _DoctorProfilePageState createState() => + _DoctorProfilePageState(patientDoctorAppointment); +} + +class _DoctorProfilePageState extends State + with TickerProviderStateMixin { + late TabController _tabController; + late PatientDoctorAppointment patientDoctorAppointment; + + _DoctorProfilePageState(this.patientDoctorAppointment); + + @override + void initState() { + _tabController = new TabController(length: 2, vsync: this); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + /* onModelReady: (model) => model.getDoctorProfileAndRating( + doctorId: widget.patientDoctorAppointment.doctorID, + clinicID: widget.patientDoctorAppointment.clinicID, + projectID: widget.patientDoctorAppointment.projectID),*/ + builder: (context, model, widget) => DoctorView(doctor: model.doctorList,)/*AppScaffold( + isShowAppBar: true, + appBarTitle: 'Doctor Profile', + baseViewModel: model, + body: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + color: Colors.white, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(top: 20.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.all(5), + width: 50, + height: 50, + decoration: BoxDecoration( + shape: BoxShape.circle, color: Colors.grey), + child: Icon( + Icons.calendar_view_day, + size: 25, + color: Colors.white, + )), + ClipRRect( + borderRadius: BorderRadius.circular(100.0), + child: Image.network( + patientDoctorAppointment.doctorImageURL, + fit: BoxFit.fill, + height: 120.0, + width: 120.0), + ), + Container( + margin: EdgeInsets.all(5), + width: 50, + height: 50, + decoration: BoxDecoration( + shape: BoxShape.circle, color: Colors.grey), + child: Icon( + Icons.format_list_bulleted, + size: 25, + color: Colors.white, + )), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + alignment: Alignment.center, + child: Text(patientDoctorAppointment.doctorName, + style: TextStyle( + fontSize: 20.0, + color: Colors.grey[900], + letterSpacing: 1.0)), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + alignment: Alignment.center, + child: Text(patientDoctorAppointment.clinicName, + style: TextStyle( + fontSize: 12.0, + color: Colors.grey[900], + letterSpacing: 1.0)), + ), + Container( + margin: EdgeInsets.only(top: 5.0), + alignment: Alignment.center, + child: RatingBar.readOnly( + initialRating: + model.doctorRating.doctorRate?.toDouble() ?? 0.0, + size: 35.0, + filledColor: Colors.yellow[700], + emptyColor: Colors.grey[500], + isHalfAllowed: true, + halfFilledIcon: Icons.star_half, + filledIcon: Icons.star, + emptyIcon: Icons.star, + ), + ), + Container( + margin: EdgeInsets.only(top: 5.0), + alignment: Alignment.center, + child: Text( + "(${model.doctorRating.patientNumber ?? 0} Reviews)", + style: TextStyle( + fontSize: 14.0, + color: Colors.blue[800], + letterSpacing: 1.0, + decoration: TextDecoration.underline, + )), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Divider( + color: Colors.grey[500], + ), + ), + TabBar( + indicatorColor: Colors.red[800], + indicatorWeight: 3.0, + tabs: [ + Tab( + child: Text('Doctor Information', + style: TextStyle(color: Colors.black))), + Tab( + child: Text(TranslationBase.of(context).availableAppo, + style: TextStyle(color: Colors.black)), + ) + ], + controller: _tabController, + ), + Container( + height: MediaQuery.of(context).size.height * 0.8, + child: TabBarView( + physics: BouncingScrollPhysics(), + + children: [ + DoctorInformation( + doctorProfile: model.doctorProfile, + ), + Container(), +// DocAvailableAppointments(doctor: model.doctorList,) + ], + controller: _tabController, + ), + ), + ], + ), + ), + ], + ), + ), + )*/, + ); + } +} diff --git a/lib/pages/medical/eye/ClassesPage.dart b/lib/pages/medical/eye/ClassesPage.dart new file mode 100644 index 00000000..f4a87cb9 --- /dev/null +++ b/lib/pages/medical/eye/ClassesPage.dart @@ -0,0 +1,154 @@ +import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class ClassesPage extends StatelessWidget { + final ListHISGetGlassPerscription? glassPerscription; + final int? appointmentNo; + final String? projectName; + final int? projectID; + + const ClassesPage({Key? key, this.glassPerscription, this.appointmentNo, this.projectName, this.projectID}) : super(key: key); + + @override + Widget build(BuildContext context) { + return SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(top: 20, left: 20, right: 20, bottom: 20), + child: Column( + children: [ + Container( + decoration: cardRadius(12), + child: Container( + + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + TranslationBase.of(context).rightEye, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + ), + getRow(TranslationBase.of(context).sphere, '${glassPerscription?.rightEyeSpherical}', '-'), + getRow(TranslationBase.of(context).cylinder, '${glassPerscription?.rightEyeCylinder}', '-'), + getRow(TranslationBase.of(context).axis, '${glassPerscription?.rightEyeAxis}', '-'), + getRow(TranslationBase.of(context).prism, '${glassPerscription?.rightEyePrism}', '-'), + getRow(TranslationBase.of(context).va, '${glassPerscription?.rightEyeVA}', '-',isLast:true), + ], + ), + ), + ), + SizedBox( + height: 12, + ), + Container( + decoration: cardRadius(12), + child: Container( child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + TranslationBase.of(context).leftEye, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + ), + getRow(TranslationBase.of(context).sphere, '${glassPerscription?.leftEyeSpherical}', '-'), + getRow(TranslationBase.of(context).cylinder, '${glassPerscription?.leftEyeCylinder}', '-'), + getRow(TranslationBase.of(context).axis, '${glassPerscription?.leftEyeAxis}', '-'), + getRow(TranslationBase.of(context).prism, '${glassPerscription?.leftEyePrism}', '-'), + getRow(TranslationBase.of(context).va, '${glassPerscription?.leftEyeVA}', '-',isLast:true), + ], + ), + ), + ), + SizedBox( + height: 17, + ), + // Container( + // width: double.infinity, + // child: SecondaryButton( + // label: TranslationBase.of(context).sendEmail, + // onTap: () { + // showConfirmMessage(context, () async { + // GifLoaderDialogUtils.showMyDialog(context); + // await model.sendGlassesPrescriptionEmail(appointmentNo: appointmentNo, projectName: projectName, projectID: projectID); + // GifLoaderDialogUtils.hideDialog(context); + // }, model.user.emailAddress); + // }, + // textColor: Colors.white, + // color: Colors.red[700], + // icon: Icon( + // Icons.email, + // color: Colors.white, + // ), + // ), + // ) + ], + ), + ), + ); + } + + void showConfirmMessage(BuildContext context, GestureTapCallback onTap, String email) { + showDialog( + context: context, + builder: (cxt) => ConfirmSendEmailDialog( + email: email, + onTapSendEmail: () { + onTap(); + }, + ), + ); + } + + Widget getRow(String title, String val1, String val2,{bool isLast=false}) => Padding( + padding: const EdgeInsets.only(left: 8,right: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded(flex: 4, child: Text(title,style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600, letterSpacing: -0.4))), + Expanded( + flex: 2, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Text( + val1 == 'null' ? '-' : val1, + style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600, letterSpacing: -0.4), + ), + Text( + val2 != 'null' ? '-' : val2, + style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600, letterSpacing: -0.4), + ), + ], + ), + ) + ], + ), + ), + isLast?Container(height: 4,): Divider() + ], + ), + ); +} diff --git a/lib/pages/medical/eye/ContactLensPage.dart b/lib/pages/medical/eye/ContactLensPage.dart new file mode 100644 index 00000000..b459df15 --- /dev/null +++ b/lib/pages/medical/eye/ContactLensPage.dart @@ -0,0 +1,178 @@ +import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.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/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class ContactLensPage extends StatelessWidget { + final ListHISGetContactLensPerscription? listHISGetContactLensPerscription; + final int? appointmentNo; + final String? projectName; + final int? projectID; + + const ContactLensPage({Key? key, this.listHISGetContactLensPerscription, this.appointmentNo, this.projectName, this.projectID}) : super(key: key); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + builder: (_, model, w) => AppScaffold( + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(top: 20, left: 20, right: 20, bottom: 20), + child: Column( + children: [ + Container( + decoration: cardRadius(12), + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + TranslationBase.of(context).rightEye, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + ), + getRow(TranslationBase.of(context).brand, '${listHISGetContactLensPerscription!.brand}'), + getRow('B.C', '${listHISGetContactLensPerscription!.baseCurve}'), + getRow(TranslationBase.of(context).power, '${listHISGetContactLensPerscription!.power}'), + getRow(TranslationBase.of(context).diameter, '${listHISGetContactLensPerscription!.diameter}'), + getRow('OZ', '${listHISGetContactLensPerscription!.oZ}'), + getRow('CT', '${listHISGetContactLensPerscription!.cT}'), + getRow('Blend', '${listHISGetContactLensPerscription!.blend}'), + getRow(TranslationBase.of(context).remarks, '${listHISGetContactLensPerscription!.remarks}', isLast: true), + ], + ), + ), + ), + SizedBox( + height: 12, + ), + Container( + decoration: cardRadius(12), + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + TranslationBase.of(context).leftEye, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + ), + getRow(TranslationBase.of(context).brand, '${listHISGetContactLensPerscription!.brand}'), + getRow('B.C', '${listHISGetContactLensPerscription!.baseCurve ?? "-"}'), + getRow(TranslationBase.of(context).power, '${listHISGetContactLensPerscription!.power}'), + getRow(TranslationBase.of(context).diameter, '${listHISGetContactLensPerscription!.diameter}'), + getRow('OZ', '${listHISGetContactLensPerscription!.oZ}'), + getRow('CT', '${listHISGetContactLensPerscription!.cT}'), + getRow('Blend', '${listHISGetContactLensPerscription!.blend}'), + getRow(TranslationBase.of(context).remarks, '${listHISGetContactLensPerscription!.remarks}', isLast: true), + ], + ), + ), + ), + SizedBox( + height: 17, + ), + // if (projectViewModel.havePrivilege(15)) + // Container( + // width: double.infinity, + // child: SecondaryButton( + // label: TranslationBase.of(context).sendEmail, + // textColor: Colors.white, + // color: Colors.red[700], + // onTap: (){ + // showConfirmMessage(context, () async { + // GifLoaderDialogUtils.showMyDialog(context); + // await model.sendContactLensPrescriptionEmail( + // appointmentNo: appointmentNo, + // projectName: projectName, + // projectID: projectID); + // GifLoaderDialogUtils.hideDialog(context); + // }, model.user.emailAddress); + // }, + // icon: Icon( + // Icons.email, + // color: Colors.white, + // ), + // ), + // ) + ], + ), + ), + ), + ), + ); + } + + Widget getRow(String title, String val1, {bool isLast = false}) => Padding( + padding: const EdgeInsets.only(left: 8, right: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Expanded( + flex: 4, + child: Text( + title, + style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600, letterSpacing: -0.4), + )), + Expanded( + flex: 2, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + val1 == 'null' ? '-' : val1, + style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600, letterSpacing: -0.4), + ), + ], + ), + ) + ], + ), + ), + isLast + ? Container( + height: 4, + ) + : Divider() + ], + ), + ); + + void showConfirmMessage(BuildContext context, GestureTapCallback onTap, String email) { + showDialog( + context: context, + builder: (cxt) => ConfirmSendEmailDialog( + email: email, + onTapSendEmail: () { + onTap(); + }, + ), + ); + } +} diff --git a/lib/pages/medical/eye/EyeHomePage.dart b/lib/pages/medical/eye/EyeHomePage.dart new file mode 100644 index 00000000..e7a5c42b --- /dev/null +++ b/lib/pages/medical/eye/EyeHomePage.dart @@ -0,0 +1,409 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart'; +import 'package:diplomaticquarterapp/models/header_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:provider/provider.dart'; + +import 'ClassesPage.dart'; +import 'ContactLensPage.dart'; + +class EyeHomePage extends StatefulWidget { + final AppoimentAllHistoryResultList? appointmentAllHistoryResultList; + + const EyeHomePage({Key? key, this.appointmentAllHistoryResultList}) : super(key: key); + + @override + _EyeHomePageState createState() => _EyeHomePageState(); +} + +class _EyeHomePageState extends State with SingleTickerProviderStateMixin { + TabController? _tabController; + List? doctorDetailsList = []; + ProjectViewModel? projectViewModel; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + _tabController!.addListener(() { + setState(() {}); + }); + } + + @override + void dispose() { + super.dispose(); + _tabController!.dispose(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + appBarTitle: widget.appointmentAllHistoryResultList!.doctorTitle! + " " + widget.appointmentAllHistoryResultList!.doctorNameObj!, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + body: Column( + children: [ + DoctorHeader( + headerModel: HeaderModel( + widget.appointmentAllHistoryResultList!.doctorTitle! + " " + widget.appointmentAllHistoryResultList!.doctorNameObj!, + widget.appointmentAllHistoryResultList!.doctorID!, + widget.appointmentAllHistoryResultList!.doctorImageURL!, + widget.appointmentAllHistoryResultList!.doctorSpeciality !=null ? widget.appointmentAllHistoryResultList!.doctorSpeciality! : [], + "", + widget.appointmentAllHistoryResultList!.projectName!, + DateUtil.convertStringToDate(widget.appointmentAllHistoryResultList!.appointmentDate!), + widget.appointmentAllHistoryResultList!.startTime!.substring(0, 5), + "null", + widget.appointmentAllHistoryResultList!.doctorRate, + widget.appointmentAllHistoryResultList!.actualDoctorRate, + widget.appointmentAllHistoryResultList!.noOfPatientsRate, + "", + //model.user.emailAddress, + ), + isNeedToShowButton: _tabController!.index == 0 ? true : projectViewModel!.havePrivilege(15), + showConfirmMessageDialog: false, + onRatingAndReviewTap: getDoctorRatingsDetails, + onTap: () { + print("Email.."); + + showDialog( + context: context, + builder: (cxt) => ConfirmSendEmailDialog( + email: projectViewModel!.user!.emailAddress!, + onTapSendEmail: () async{ + GifLoaderDialogUtils.showMyDialog(context); + await model.sendGlassesPrescriptionEmail( + appointmentNo: widget.appointmentAllHistoryResultList!.appointmentNo!, + projectName: widget.appointmentAllHistoryResultList!.projectName!, + projectID: widget.appointmentAllHistoryResultList!.projectID!); + GifLoaderDialogUtils.hideDialog(context); + }, + ), + ); + }, + ), + Container( + height: 45.0, + width: double.infinity, + child: Center( + child: TabBar( + isScrollable: false, + controller: _tabController, + indicatorWeight: 2.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Theme.of(context).primaryColor, + labelPadding: EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0), + unselectedLabelColor: Colors.grey[800], + tabs: [ + Container( + // width: double.infinity, + child: Center( + child: Text( + TranslationBase.of(context).classes, + style: TextStyle( + fontWeight: FontWeight.w600, + // fontSize: 12, + letterSpacing: -0.36, + ), + ), + ), + ), + Container( + // width: double.infinity, + child: Center( + child: Text( + TranslationBase.of(context).contactLens, + style: TextStyle( + fontWeight: FontWeight.w600, + // fontSize: 12, + letterSpacing: -0.36, + ), + ), + ), + ), + ], + ), + ), + ), + Expanded( + child: TabBarView( + physics: NeverScrollableScrollPhysics(), + controller: _tabController, + children: [ + ClassesPage( + glassPerscription: widget.appointmentAllHistoryResultList!.listHISGetGlassPerscription![0], + appointmentNo: widget.appointmentAllHistoryResultList!.appointmentNo, + projectName: widget.appointmentAllHistoryResultList!.projectName, + projectID: widget.appointmentAllHistoryResultList!.projectID, + ), + ContactLensPage( + listHISGetContactLensPerscription: widget.appointmentAllHistoryResultList!.listHISGetContactLensPerscription![0], + appointmentNo: widget.appointmentAllHistoryResultList!.appointmentNo, + projectName: widget.appointmentAllHistoryResultList!.projectName, + projectID: widget.appointmentAllHistoryResultList!.projectID, + ) + ], + ), + ) + ], + ), + ), + ); + } + // + // void showConfirmMessage(BuildContext context, GestureTapCallback onTap, String email) { + // + // } + + void getDoctorRatingsDetails() { + GifLoaderDialogUtils.showMyDialog(context); + DoctorsListService service = new DoctorsListService(); + service.getDoctorsRatingDetails(widget.appointmentAllHistoryResultList!.doctorID!, projectViewModel!.isArabic ? 1 : 2, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + doctorDetailsList!.clear(); + res['DoctorRatingDetailsList'].forEach((v) { + doctorDetailsList!.add(new DoctorRateDetails.fromJson(v)); + }); + showRatingDialog(doctorDetailsList!); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } + + void showRatingDialog(List doctorDetailsList) { + showGeneralDialog( + barrierColor: Colors.black.withOpacity(0.5), + transitionBuilder: (context, a1, a2, widget) { + final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0; + return Transform( + transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), + child: Opacity( + opacity: a1.value, + child: Dialog( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + // height: 400.0, + width: MediaQuery.of(context).size.width * 0.8, + color: Colors.white, + child: Column( + children: [ + Container( + alignment: Alignment.center, + width: MediaQuery.of(context).size.width, + color: Theme.of(context).primaryColor, + margin: EdgeInsets.only(bottom: 5.0), + padding: EdgeInsets.all(10.0), + child: Text(TranslationBase.of(context).doctorRating, style: TextStyle(fontSize: 22.0, color: Colors.white))), + Container( + margin: EdgeInsets.only(top: 0.0), + child: Text(this.widget.appointmentAllHistoryResultList!.actualDoctorRate!.ceilToDouble().toString(), style: TextStyle(fontSize: 32.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 5.0), + alignment: Alignment.center, + child: RatingBar( + initialRating: this.widget.appointmentAllHistoryResultList!.actualDoctorRate!.toDouble(), + direction: Axis.horizontal, + itemCount: 5, + itemSize: 20.0, + allowHalfRating: true, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon(Icons.star, color: CustomColors.accentColor,), + half: Icon(Icons.star_half, color: CustomColors.accentColor,), + empty: Icon(Icons.star, color: CustomColors.accentColor,), + ), + tapOnlyMode: true, + unratedColor: Colors.grey[500], + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text(this.widget.appointmentAllHistoryResultList!.noOfPatientsRate.toString() + " " + TranslationBase.of(context).reviews, + style: TextStyle(fontSize: 14.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[0].patientNumber), + height: 6.0, + child: Container( + color: Colors.green[700], + ), + ), + ), + ], + ), + ), + Container( + child: Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).v_good, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[1].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffB7B723), + ), + ), + ), + ], + ), + ), + Container( + child: Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).good, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[2].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffEBA727), + ), + ), + ), + ], + ), + ), + Container( + child: Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).average, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[3].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffEB7227), + ), + ), + ), + ], + ), + ), + Container( + child: Row( + children: [ + Container( + width: 100.0, + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).below_average, style: TextStyle(fontSize: 13.0, color: Colors.black))), + Container( + margin: EdgeInsets.only(top: 10.0), + child: SizedBox( + width: getRatingWidth(doctorDetailsList[4].patientNumber), + height: 6.0, + child: Container( + color: Color(0xffE20C0C), + ), + ), + ), + ], + ), + ), + Container(margin: EdgeInsets.only(top: 40.0), child: Divider()), + Container( + margin: EdgeInsets.only(top: 0.0), + child: Align( + alignment: FractionalOffset.bottomCenter, + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width, + height: 40.0, + child: CustomTextButton( + elevation: 0.0, + backgroundColor: Colors.white, + disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38), + disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12), + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text(TranslationBase.of(context).cancel, + style: TextStyle( + fontSize: 18.0, + color: Colors.red, + )), + ), + ), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ); + }, + transitionDuration: Duration(milliseconds: 500), + barrierDismissible: true, + barrierLabel: '', + context: context, + pageBuilder: (context, animation1, animation2) { + return SizedBox(); + }); + } + + double getRatingWidth(int patientNumber) { + var width = (patientNumber / this.widget.appointmentAllHistoryResultList!.noOfPatientsRate!) * 100; + return width; + } +} diff --git a/lib/pages/medical/eye/EyeMeasurementsPage.dart b/lib/pages/medical/eye/EyeMeasurementsPage.dart new file mode 100644 index 00000000..652c0a24 --- /dev/null +++ b/lib/pages/medical/eye/EyeMeasurementsPage.dart @@ -0,0 +1,126 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../../uitl/gif_loader_dialog_utils.dart'; +import '../../../widgets/dialogs/confirm_send_email_dialog.dart'; +import 'EyeHomePage.dart'; + +class EyeMeasurementsPage extends StatelessWidget { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getEyeMeasurement(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + baseViewModel: model, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + description: TranslationBase.of(context).infoEye, + imagesInfo: [ + ImagesInfo( + imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/eye-measurements/ar/0.png', + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/eye-measurements/en/0.png') + ], + appBarTitle: TranslationBase.of(context).eyeMeasurements, + body: SingleChildScrollView( + child: Column( + children: [ + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + padding: EdgeInsets.only(top: 12), + separatorBuilder: (context, index) { + return Container( + height: 12, + margin: EdgeInsets.only(left: 21, right: 21), + // color: Color(0xffD9D9D9), + ); + }, + itemBuilder: (context, index) { + List _appointmentAllHistoryResultList = model.appointmentFilter[index].appointmentAllHistoryResultList; + return AppExpandableNotifier( + title: model.appointmentFilter[index].filterName, + bodyWidget: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), + itemBuilder: (context, _index) { + AppoimentAllHistoryResultList _appointmentResult = _appointmentAllHistoryResultList[_index]; + + return DoctorCard( + onTap: () => Navigator.push( + context, + FadePage( + page: EyeHomePage( + appointmentAllHistoryResultList: _appointmentResult, + ), + ), + ), + onEmailTap: () { + showConfirmMessage(context, () async { + GifLoaderDialogUtils.showMyDialog(context); + await model.sendGlassesPrescriptionEmail( + appointmentNo: _appointmentResult!.appointmentNo!, + projectName: _appointmentResult!.projectName!, + projectID: _appointmentResult!.projectID!); + GifLoaderDialogUtils.hideDialog(context); + }, projectViewModel!.user!.emailAddress!); + }, + isInOutPatient: _appointmentResult.isInOutPatient, + name: _appointmentResult.doctorTitle! + " " + _appointmentResult.doctorNameObj!, + // billNo: "appointmentResult.do", + profileUrl: _appointmentResult.doctorImageURL, + subName: _appointmentResult.clinicName, + isLiveCareAppointment: _appointmentResult.isLiveCareAppointment, + date: DateUtil.convertStringToDate(_appointmentResult.appointmentDate!), + isSortByClinic: false, + rating: _appointmentResult.actualDoctorRate! + 0.0, + // appointmentTime: _appointmentResult.startTime.substring(0, 5), + // remainingTimeInMinutes: (_appointmentResult.patientStatusType == AppointmentType.BOOKED || _appointmentResult.patientStatusType == AppointmentType.CONFIRMED) + // ? _appointmentResult.remaniningHoursTocanPay + // : null + + //projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate) : DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate), + ); + }, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemCount: _appointmentAllHistoryResultList.length), + ); + }, + itemCount: model.appointmentFilter.length, + ), + + ], + ), + ), + ), + ); + } + void showConfirmMessage(BuildContext context, GestureTapCallback onTap, String email) { + showDialog( + context: context, + builder: (cxt) => ConfirmSendEmailDialog( + email: email, + onTapSendEmail: () { + onTap(); + }, + ), + ); + } + +} diff --git a/lib/pages/medical/labs/laboratory_result_page.dart b/lib/pages/medical/labs/laboratory_result_page.dart new file mode 100644 index 00000000..8441492e --- /dev/null +++ b/lib/pages/medical/labs/laboratory_result_page.dart @@ -0,0 +1,134 @@ +import 'dart:convert'; +import 'dart:io'; +import 'dart:typed_data'; + +import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/LabResult/laboratory_result_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:open_filex/open_filex.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:provider/provider.dart'; + +class LaboratoryResultPage extends StatefulWidget { + final PatientLabOrders? patientLabOrders; + + LaboratoryResultPage({Key? key, this.patientLabOrders}); + + @override + _LaboratoryResultPageState createState() => _LaboratoryResultPageState(); +} + +class _LaboratoryResultPageState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getLaboratoryResult( + invoiceNo: widget.patientLabOrders!.invoiceNo, + invoiceType: widget.patientLabOrders!.invoiceType, + clinicID: widget.patientLabOrders!.clinicID, + projectID: widget.patientLabOrders!.projectID, + orderNo: widget.patientLabOrders!.orderNo, + setupID: widget.patientLabOrders!.setupID, + isVidaPlus: Utils.isVidaPlusProject(projectViewModel, int.parse(widget.patientLabOrders!.projectID!)), + ), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + appBarTitle: widget.patientLabOrders!.doctorName!, + baseViewModel: model, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF8F8F8), + body: SingleChildScrollView( + child: Column( + children: [ + ListView.builder( + addAutomaticKeepAlives: true, + physics: BouncingScrollPhysics(), + shrinkWrap: true, + padding: EdgeInsets.only(bottom: 12), + itemBuilder: (context, index) => LaboratoryResultWidget( + onTap: () async { + GifLoaderDialogUtils.showMyDialog(context); + await model.sendLabReportEmail( + patientLabOrder: widget.patientLabOrders, + mes: TranslationBase.of(context).sendSuc, + userObj: projectViewModel.user, + languageID: projectViewModel.isArabic ? 1 : 2, + isDownload: true, + isVidaPlus: Utils.isVidaPlusProject( + projectViewModel, + int.parse(widget.patientLabOrders!.projectID!), + ), + ); + GifLoaderDialogUtils.hideDialog(context); + }, + billNo: widget.patientLabOrders!.invoiceNo, + // details: model.patientLabSpecialResult[index].resultDataHTML, + details: model.patientLabSpecialResult.isEmpty ? null : getSpecialResults(model), + orderNo: widget.patientLabOrders!.orderNo, + patientLabOrder: widget.patientLabOrders, + projectName: widget.patientLabOrders!.projectName, + ), + itemCount: 1, + ), + SizedBox( + height: 120.0, + ) + ], + ), + ), + // bottomSheet: Container( + // color: Colors.white, + // height: MediaQuery.of(context).size.height * 0.081, + // width: double.infinity, + // padding: EdgeInsets.all(12.0), + // child: Column( + // children: [ + // Container( + // width: MediaQuery.of(context).size.width * 0.9, + // child: DefaultButton( + // TranslationBase.of(context).downloadReport, + // () async { + // GifLoaderDialogUtils.showMyDialog(context); + // await model.sendLabReportEmail(patientLabOrder: widget.patientLabOrders, mes: TranslationBase.of(context).sendSuc, userObj: projectViewModel.user, isVidaPlus: Utils.isVidaPlusProject(projectViewModel, num.parse(widget.patientLabOrders.projectID)), isDownload: true); + // GifLoaderDialogUtils.hideDialog(context); + // try { + // String path = await _createFileFromString(model.labReportPDF, "pdf"); + // OpenFilex.open(path); + // } catch (ex) { + // AppToast.showErrorToast(message: "Cannot open file."); + // } + // }, + // textColor: Colors.white, + // ), + // ), + // ], + // ), + // ), + ), + ); + } + + String getSpecialResults(LabsViewModel model) { + String labResults = ""; + model.patientLabSpecialResult.forEach((element) { + if (element.resultDataHTML != null) { + labResults += (element.resultDataHTML! + "

"); + } else { + labResults += ("
No Result Available
"); + } + }); + return labResults; + } +} diff --git a/lib/pages/medical/labs/labs_home_page.dart b/lib/pages/medical/labs/labs_home_page.dart new file mode 100644 index 00000000..5a163c10 --- /dev/null +++ b/lib/pages/medical/labs/labs_home_page.dart @@ -0,0 +1,108 @@ +import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/labs_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/data_display/medical/doctor_card.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'laboratory_result_page.dart'; + +class LabsHomePage extends StatelessWidget { + List imagesInfo = []; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-lab/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-lab/ar/0.png')); + return BaseView( + onModelReady: (model) => model.getLabs(), + builder: (context, LabsViewModel model, widget) => AppScaffold( + baseViewModel: model, + isShowAppBar: true, + description: TranslationBase.of(context).infoLab, + appBarTitle: TranslationBase.of(context).labResults, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF8F8F8), + imagesInfo: imagesInfo, + body: Column( + children: [ + Row( + children: [ + MyTabView(TranslationBase.of(context).byClinic, FilterType.Clinic, model.filterType, () { + model.setFilterType(FilterType.Clinic); + }), + MyTabView(TranslationBase.of(context).byHospital, FilterType.Hospital, model.filterType, () { + model.setFilterType(FilterType.Hospital); + }), + ], + ), + Expanded( + child: FractionallySizedBox( + widthFactor: 1.0, + child: ListView.separated( + addAutomaticKeepAlives: true, + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(top: 12), + separatorBuilder: (context, index) { + return Container( + height: 12, + margin: EdgeInsets.only(left: 21, right: 21), + // color: Color(0xffD9D9D9), + ); + }, + itemBuilder: (context, index) { + return AppExpandableNotifier( + title: model.patientLabOrdersList[index].filterName, + bodyWidget: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), + itemBuilder: (context, _index) { + PatientLabOrders labOrder = model.patientLabOrdersList[index].patientLabOrdersList[_index]; + bool _isSortByClinic = model.filterType == FilterType.Clinic; + return DoctorCard( + onTap: () => Navigator.push( + context, + FadePage( + page: LaboratoryResultPage( + patientLabOrders: labOrder, + ), + ), + ), + isInOutPatient: labOrder.isInOutPatient, + name: TranslationBase.of(context).dr + " " + labOrder.doctorName!, + billNo: labOrder.invoiceNo, + profileUrl: labOrder.doctorImageURL, + subName: _isSortByClinic ? (labOrder.projectName ?? labOrder.clinicDescription) : (labOrder.clinicDescription ?? labOrder.projectName), + isLiveCareAppointment: labOrder.isLiveCareAppointment, + date: labOrder.orderDate, + isSortByClinic: _isSortByClinic, + isLabOrderResult: true, + resultStatus: labOrder.status!, + resultStatusDesc: labOrder.statusDesc!, + //projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate) : DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate), + ); + }, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemCount: model.patientLabOrdersList[index].patientLabOrdersList.length), + ); + }, + itemCount: model.patientLabOrdersList.length), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/medical/labs/passport_update_page.dart b/lib/pages/medical/labs/passport_update_page.dart new file mode 100644 index 00000000..61e74acb --- /dev/null +++ b/lib/pages/medical/labs/passport_update_page.dart @@ -0,0 +1,299 @@ +import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class PassportUpdatePage extends StatefulWidget { + @override + _PassportUpdatePageState createState() => _PassportUpdatePageState(); +} + +class _PassportUpdatePageState extends State { + TextEditingController passportNumber = new TextEditingController(); + bool? _isButtonDisabled; + ProjectViewModel? projectViewModel; + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((_) => getPassportNumber()); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).passportNumber, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Container( + child: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: double.infinity, + child: Container( + decoration: cardRadius(12), + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).covidBookAppo, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16, + letterSpacing: -0.64, + ), + ), + mHeight(6), + Row( + children: [ + Text( + TranslationBase.of(context).patientName + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel!.user!.firstName! + " " + projectViewModel!.user!.lastName!, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).identificationNumber + ":", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 10, + letterSpacing: -0.6, + color: CustomColors.grey, + ), + ), + mWidth(3), + Text( + projectViewModel!.user!.patientIdentificationNo!, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + ], + ), + ), + ), + ), + mHeight(40), + SvgPicture.asset("assets/images/new/passport.svg", width: 40.0, fit: BoxFit.fill), + mHeight(12), + Text( + TranslationBase.of(context).enterPassportNumber, + textAlign: TextAlign.start, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + color: Colors.black, + letterSpacing: -0.64, + ), + ), + mHeight(8), + inputWidget(TranslationBase.of(context).passportNumber, "", passportNumber), + ], + ), + ), + ), + ), + Container( + width: MediaQuery.of(context).size.width, + margin: EdgeInsets.only(top: 12.0, left: 12.0, right: 12.0, bottom: 10.0), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + height: 45.0, + child: CustomTextButton( + backgroundColor: Color(0xFFc5272d), + disabledForegroundColor: Colors.red[300]!.withOpacity(0.38), + disabledBackgroundColor: Colors.red[300]!.withOpacity(0.12), + elevation: 0, + onPressed: () { + if (_isButtonDisabled == false) + updatePassportNumber(); + else + AppToast.showErrorToast(message: TranslationBase.of(context).validPassportNumber); + }, + child: Text( + TranslationBase.of(context).submit, + style: TextStyle( + fontSize: 16.0, + letterSpacing: -0.64, + color: Colors.white, + ), + ), + ), + ), + ), + ], + ), + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.text, + controller: _controller, + onChanged: (value) => {_onPassportTextChanged(value)}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + + _onPassportTextChanged(content) { + if (content.length >= 1) { + setState(() { + _isButtonDisabled = false; + }); + } else { + setState(() { + _isButtonDisabled = true; + }); + } + } + + void updatePassportNumber() { + LabsService service = new LabsService(); + GifLoaderDialogUtils.showMyDialog(context); + + service.updateCovidPassportNumber(passportNumber.text).then((res) { + GifLoaderDialogUtils.hideDialog(context); + Navigator.of(context).pop(true); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + void getPassportNumber() { + LabsService service = new LabsService(); + GifLoaderDialogUtils.showMyDialog(context); + + service.getCovidPassportNumber().then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['Covid19_Certificate_GetPassportList'].length != 0) { + passportNumber.text = res['Covid19_Certificate_GetPassportList'][0]['PassportNo'] ?? ""; + if (res['Covid19_Certificate_GetPassportList'][0]['PassportNo'] != "") { + _isButtonDisabled = false; + } + } else { + passportNumber.text = ""; + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} diff --git a/lib/pages/medical/medical_profile_page_new.dart b/lib/pages/medical/medical_profile_page_new.dart new file mode 100644 index 00000000..55b6a4c6 --- /dev/null +++ b/lib/pages/medical/medical_profile_page_new.dart @@ -0,0 +1,178 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/time_line_new_widget.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class MedicalProfilePageNew extends StatefulWidget { + Function()? onTap; + String? a; + + MedicalProfilePageNew({this.onTap}); + + @override + _MedicalProfilePageState createState() => _MedicalProfilePageState(); +} + +class _MedicalProfilePageState extends State { + var authProvider = new AuthProvider(); + List medical = []; + ProjectViewModel? projectViewModel; + + List projectsList = []; + HospitalsModel? _selectedHospital; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + var appoCountProvider = Provider.of(context); + List myMedicalList = + Utils.myMedicalList(projectViewModel: projectViewModel!, context: context, count: appoCountProvider.count, isLogin: projectViewModel!.isLogin, onWeCareClick: openWeCareProjectSelection); + return BaseView( + onModelReady: (model) => model.getAppointmentHistory(isForTimeLine: true), + builder: (_, model, widget1) => AppScaffold( + isShowDecPage: false, + isShowAppBar: false, + baseViewModel: model, + showNewAppBar: true, + isHelp: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).medicalFileTitle, + onTap: widget.onTap, + body: Container( + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TimeLineView(model.isLogin, projectViewModel!.isArabic, model.appoitmentAllHistoryResultList, model), + SizedBox( + height: 20, + ), + Padding( + padding: EdgeInsets.only(left: 12, right: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + projectViewModel!.isLogin + ? Text( + projectViewModel?.user.firstName ?? "", + style: TextStyle(color: Colors.black, fontSize: SizeConfig.textMultiplier! * 1.8), + ) + : Container(), + Text( + TranslationBase.of(context).medicalFileTitle, + style: TextStyle( + color: Colors.black, + fontSize: SizeConfig.textMultiplier! * 3, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + SizedBox( + height: 20, + ), + Padding( + padding: EdgeInsets.only(left: 12, right: 12), + child: GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + padding: EdgeInsets.zero, + itemCount: myMedicalList.length, + itemBuilder: (BuildContext context, int index) { + return myMedicalList[index]; + }, + ), + ), + SizedBox( + height: 12, + ), + ], + ), + ), + ), + ), + ); + } + + openWeCareProjectSelection() { + int _selectedHospitalIndex = -1; + int languageID = projectViewModel!.isArabic ? 1 : 2; + GifLoaderDialogUtils.showMyDialog(context); + ClinicListService service = new ClinicListService(); + List projectsListLocal = []; + service.getProjectsList(languageID, context).then((res) { + if (res['MessageStatus'] == 1) { + setState(() { + res['ListProject'].forEach((v) { + projectsListLocal.add(new HospitalsModel.fromJson(v)); + }); + projectsList = projectsListLocal; + }); + GifLoaderDialogUtils.hideDialog(context); + List list = [ + for (int i = 0; i < projectsList.length; i++) RadioSelectionDialogModel(projectsList[i].name! + ' ${projectsList[i].distanceInKilometers} ' + TranslationBase.of(context).km, i), + ]; + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + buttonText: TranslationBase.of(context).confirm, + listData: list, + selectedIndex: _selectedHospitalIndex, + isScrollable: true, + onValueSelected: (index) { + _selectedHospitalIndex = index; + _selectedHospital = projectsList[index]; + openWeCareURL(_selectedHospital!.iD); + // setState(() {}); + }, + ), + ); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + }).catchError((err) { + print(err); + }); + } + + openWeCareURL(int projectID) { + GifLoaderDialogUtils.showMyDialog(context); + ClinicListService service = new ClinicListService(); + service.getWeCareURL(projectID).then((res) { + print(res["Consent_VirtualJurny_Url_GetByProjectIDList"][0]["Url"]); + Uri uri = Uri.parse(res["Consent_VirtualJurny_Url_GetByProjectIDList"][0]["Url"]); + GifLoaderDialogUtils.hideDialog(context); + launchUrl(uri, mode: LaunchMode.inAppWebView); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err.toString()); + }); + } +} + +class Medical { + final String? title; + final String? imagePath; + final String? subTitle; + final Widget? page; + + Medical({this.title, this.imagePath, this.subTitle, this.page}); +} diff --git a/lib/pages/medical/my_admissions_page.dart b/lib/pages/medical/my_admissions_page.dart new file mode 100644 index 00000000..956395c4 --- /dev/null +++ b/lib/pages/medical/my_admissions_page.dart @@ -0,0 +1,61 @@ +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; + +class MyAdmissionsPage extends StatefulWidget { + @override + _MyAdmissionsPageState createState() => _MyAdmissionsPageState(); +} + +class _MyAdmissionsPageState extends State { + @override + Widget build(BuildContext context) { + return AppScaffold( + body: ListView( + children: [ + AppExpandableNotifier( + title: 'Arryan Hospital', + bodyWidget: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + DoctorCard( + name: 'Dr Mohammad Aljammal', + date:DateTime.now(),// 'Feb 14, 2020', + profileUrl: + 'https://scontent.famm4-1.fna.fbcdn.net/v/t31.0-8/30425660_1862582094040824_7851633779570222226_o.jpg?_nc_cat=101&_nc_sid=09cbfe&_nc_eui2=AeF3TI6D2_tFS5QoQsqyaCKd2zBfzh74hOzbMF_OHviE7PQdLHRwmBoIOiKyWmK9MskOshPjkU73a5EdQMA3dqnV&_nc_ohc=1feou2fDCuIAX_Ra9qB&_nc_ht=scontent.famm4-1.fna&oh=709d34d1c284de1d0aa08ed37b0ac09a&oe=5F3C5ACB', + rating: 3.8, + subName: 'Jammal', + ), + DoctorCard( + name: 'Dr Mohammad Aljammal', + date: DateTime.now(),//'Feb 14, 2020', + profileUrl: + 'https://scontent.famm4-1.fna.fbcdn.net/v/t31.0-8/30425660_1862582094040824_7851633779570222226_o.jpg?_nc_cat=101&_nc_sid=09cbfe&_nc_eui2=AeF3TI6D2_tFS5QoQsqyaCKd2zBfzh74hOzbMF_OHviE7PQdLHRwmBoIOiKyWmK9MskOshPjkU73a5EdQMA3dqnV&_nc_ohc=1feou2fDCuIAX_Ra9qB&_nc_ht=scontent.famm4-1.fna&oh=709d34d1c284de1d0aa08ed37b0ac09a&oe=5F3C5ACB', + rating: 3.8, + subName: 'Jammal', + ), + ], + ), + ), + + AppExpandableNotifier( + title: 'Arryan Hospital', + bodyWidget: DoctorCard( + onTap: () { + //TODO when we need it + }, + name: 'Dr Mohammad Aljammal', + date: DateTime.now(),//'Feb 14, 2020', + profileUrl: + 'https://scontent.famm4-1.fna.fbcdn.net/v/t31.0-8/30425660_1862582094040824_7851633779570222226_o.jpg?_nc_cat=101&_nc_sid=09cbfe&_nc_eui2=AeF3TI6D2_tFS5QoQsqyaCKd2zBfzh74hOzbMF_OHviE7PQdLHRwmBoIOiKyWmK9MskOshPjkU73a5EdQMA3dqnV&_nc_ohc=1feou2fDCuIAX_Ra9qB&_nc_ht=scontent.famm4-1.fna&oh=709d34d1c284de1d0aa08ed37b0ac09a&oe=5F3C5ACB', + rating: 4.8, + subName: 'Jammal', + ), + ), + + ], + ), + ); + } +} diff --git a/lib/pages/medical/my_invoices/invoice_detail_page.dart b/lib/pages/medical/my_invoices/invoice_detail_page.dart new file mode 100644 index 00000000..767354e2 --- /dev/null +++ b/lib/pages/medical/my_invoices/invoice_detail_page.dart @@ -0,0 +1,307 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/MyInvoices/DentalInvoiceDetailResponse.dart'; +import 'package:diplomaticquarterapp/models/MyInvoices/GetDentalAppointmentsResponse.dart'; +import 'package:diplomaticquarterapp/models/header_model.dart'; +import 'package:diplomaticquarterapp/services/my_invoice_service/my_invoice_services.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class InvoiceDetail extends StatefulWidget { + final DoctorList doctor; + final ListDentalAppointments listDentalAppointments; + final DentalInvoiceDetailResponse dentalInvoiceDetailResponse; + final BuildContext context; + + InvoiceDetail(this.doctor, this.listDentalAppointments, this.dentalInvoiceDetailResponse, this.context); + + @override + _InvoiceDetailState createState() => _InvoiceDetailState(); +} + +class _InvoiceDetailState extends State { + dynamic totalServiceRate = 0; + + dynamic totalDiscount = 0; + + dynamic totalVAT = 0; + + dynamic subTotal = 0; + + dynamic grandTotal = 0; + + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + generateInvoiceDetails(); + return AppScaffold( + appBarTitle: widget.doctor.doctorTitle != null ? widget.doctor.doctorTitle.toString() : TranslationBase.of(context).dr + " " + widget.doctor.name.toString(), + isShowAppBar: true, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + body: SingleChildScrollView( + child: Container( + child: Column( + children: [ + // DoctorView(doctor: doctor, isLiveCareAppointment: false, isShowFlag: false), + DoctorHeader( + headerModel: HeaderModel( + widget.doctor.name!, + widget.doctor.doctorID!, + widget.doctor.doctorImageURL!, + widget.doctor.speciality??[""], + widget.doctor.clinicName!, + widget.doctor.projectName!, + DateUtil.convertStringToDate(widget.doctor.date), + null, + widget.doctor.nationalityFlagURL != null ? widget.doctor.nationalityFlagURL! : "" , + widget.doctor.doctorRate, + widget.doctor.actualDoctorRate, + widget.doctor.noOfPatientsRate ?? 0, + projectViewModel.user!.emailAddress!, + decimalDoctorRate: widget.doctor.decimalDoctorRate.toString()), + onTap: () { + sendInvoiceEmail(); + }, + ), + Container( + child: Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 8, right: 16, bottom: 16), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Table( + columnWidths: { + 0: FlexColumnWidth(2.0), + 1: FlexColumnWidth(1.5), + 2: FlexColumnWidth(1.5), + 3: FlexColumnWidth(1.5), + }, + children: fullData(context), + ), + ], + ), + ), + ), + ), + Container( + width: double.infinity, + child: Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 8, right: 16, bottom: 16), + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Text(TranslationBase.of(context).cardDetail, style: TextStyle(color: Colors.black, letterSpacing: -0.64, fontSize: 18.0, fontWeight: FontWeight.bold)), + ), + MyRichText( + TranslationBase.of(context).insuranceCompany + ": ", + projectViewModel.isArabic + ? widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].groupNameN + : widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].companyName, + projectViewModel.isArabic), + MyRichText( + TranslationBase.of(context).insuranceID + ": ", + widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].insuranceID != null ? widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].insuranceID! : "N/A", + projectViewModel.isArabic), + ], + ), + ), + ), + ), + Container( + width: double.infinity, + child: Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 8, right: 16, bottom: 16), + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Text(TranslationBase.of(context).totalBalance, style: TextStyle(letterSpacing: -0.64, color: Colors.black, fontSize: 18.0, fontWeight: FontWeight.bold)), + ), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 10, bottom: 5), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).discount), + ), + Expanded( + child: _getNormalText(this.totalDiscount.toString(), isBold: true), + ) + ], + ), + ), + mDivider( Color(0xffEFEFEF),), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 10, bottom: 5), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).totalVAT.toString() + + " (" + + widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![0].vATPercentage.toString() + + "%): "), + ), + Expanded( + child: _getNormalText(num.tryParse(this.totalVAT.toString())!.toStringAsFixed(2), isBold: true), + ) + ], + ), + ), + mDivider( Color(0xffEFEFEF),), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 10, bottom: 5), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).total), + ), + Expanded( + child: _getNormalText(this.subTotal.toString(), isBold: true), + ) + ], + ), + ), + mDivider( Color(0xffEFEFEF),), + Container( + width: double.infinity, + padding: EdgeInsets.only(top: 10, bottom: 5), + child: Row( + children: [ + Expanded( + child: _getNormalText(TranslationBase.of(context).paid), + ), + Expanded( + child: _getNormalText(this.grandTotal.toString(), isBold: true), + ) + ], + ), + ), + ], + ), + ), + )), + SizedBox( + height: 100.0, + ), + ], + ), + ), + )); + } + + void generateInvoiceDetails() { + totalServiceRate = 0; + totalDiscount = 0; + totalVAT = 0; + subTotal = 0; + grandTotal = 0; + + List listConsultations = []; + + widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.forEach((item) { + var i = listConsultations.indexWhere((x) => x.procedureID == item.procedureID); + if (i <= -1) { + listConsultations.add(item); + } + }); + + listConsultations.forEach((element) { + print(element.procedureID); + this.totalServiceRate += element.total; + this.totalDiscount += element.discountAmount; + this.totalVAT += element.totalVATAmount; + }); + + this.subTotal = this.totalServiceRate - this.totalDiscount; + this.grandTotal = this.subTotal + this.totalVAT; + } + + sendInvoiceEmail() { + GifLoaderDialogUtils.showMyDialog(widget.context); + MyInvoicesService myInvoicesService = new MyInvoicesService(); + + myInvoicesService.sendDentalAppointmentInvoiceEmail(widget.listDentalAppointments.projectID!, widget.listDentalAppointments.appointmentNo!, widget.context).then((res) { + GifLoaderDialogUtils.hideDialog(widget.context); + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: TranslationBase.of(widget.context).emailSentSuccessfully); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(widget.context); + print(err); + AppToast.showErrorToast(message: err); + Navigator.of(widget.context).pop(); + }); + } + + List fullData(context) { + List tableRow = []; + + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).description), + Utils.tableColumnTitle(TranslationBase.of(context).quantity), + Utils.tableColumnTitle(TranslationBase.of(context).price), + Utils.tableColumnTitle(TranslationBase.of(context).total), + ], + ), + ); + for (int i = 0; i < widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length; i++) { + tableRow.add( + TableRow(children: [ + Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].procedureName}', + isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].quantity}', + isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].price.toString()}', + isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation![i].total.toString()}', + isLast: i == (widget.dentalInvoiceDetailResponse.listEInvoiceForDental![0].listConsultation!.length - 1), mProjectViewModel: projectViewModel), + ]), + ); + } + return tableRow; + } + + _getNormalText(text, {bool isBold = false}) { + return Text( + text, + style: TextStyle( + fontSize: isBold ? 14 : 12, + letterSpacing: -0.5, + color: isBold ? Colors.black : Colors.grey[700], + fontWeight: FontWeight.w600, + ), + ); + } +} diff --git a/lib/pages/medical/my_invoices/my_invoice_page.dart b/lib/pages/medical/my_invoices/my_invoice_page.dart new file mode 100644 index 00000000..2d287c39 --- /dev/null +++ b/lib/pages/medical/my_invoices/my_invoice_page.dart @@ -0,0 +1,144 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart' as DoctorListResponse; +import 'package:diplomaticquarterapp/models/MyInvoices/DentalInvoiceDetailResponse.dart'; +import 'package:diplomaticquarterapp/models/MyInvoices/GetDentalAppointmentsResponse.dart'; +import 'package:diplomaticquarterapp/pages/medical/my_invoices/invoice_detail_page.dart'; +import 'package:diplomaticquarterapp/services/my_invoice_service/my_invoice_services.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.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'; + +class MyInvoices extends StatefulWidget { + @override + _MyInvoicesState createState() => _MyInvoicesState(); +} + +class _MyInvoicesState extends State { + bool isDataLoaded = false; + GetDentalAppointmentsResponse? getDentalAppointmentsResponse; + DentalInvoiceDetailResponse? dentalInvoiceDetailResponse; + + ProjectViewModel? projectViewModel; + List imagesInfo =[]; + + @override + void initState() { + imagesInfo + .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-invoice/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-invoice/ar/0.png')); + + WidgetsBinding.instance.addPostFrameCallback((_) { + if (projectViewModel!.isLogin) getDentalAppointments(); + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).myInvoice, + isShowAppBar: true, + isShowDecPage: true, + showNewAppBar: true, + showNewAppBarTitle: true, + imagesInfo: imagesInfo, + body: Container( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: isDataLoaded + ? Column( + children: [ + ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), + itemBuilder: (context, index) { + return DoctorCard( + onTap: () => openInvoiceDetailsPage(getDentalAppointmentsResponse!.listDentalAppointments![index]), + isInOutPatient: true, + name: TranslationBase.of(context).dr.toString() + " " + (projectViewModel!.isArabic ? getDentalAppointmentsResponse!.listDentalAppointments![index].doctorNameN.toString() : getDentalAppointmentsResponse!.listDentalAppointments![index].doctorName.toString()), + billNo: getDentalAppointmentsResponse!.listDentalAppointments![index].invoiceNo.toString(), + profileUrl: getDentalAppointmentsResponse!.listDentalAppointments![index].doctorImageURL, + subName: getDentalAppointmentsResponse!.listDentalAppointments![index].projectName, + isLiveCareAppointment: false, + date: DateUtil.convertStringToDate(getDentalAppointmentsResponse!.listDentalAppointments![index].appointmentDate!), + isSortByClinic: true, + ); + }, + itemCount: getDentalAppointmentsResponse!.listDentalAppointments!.length, + separatorBuilder: (context, index) => SizedBox(height: 14), + ), + ], + ) + : Container(), + ), + )); + } + + openInvoiceDetailsPage(ListDentalAppointments listDentalAppointments) { + GifLoaderDialogUtils.showMyDialog(context); + MyInvoicesService myInvoicesService = new MyInvoicesService(); + + DoctorListResponse.DoctorList doctor = new DoctorListResponse.DoctorList(); + + doctor.name = projectViewModel!.isArabic ? listDentalAppointments.doctorNameN : listDentalAppointments.doctorName; + doctor.projectName = listDentalAppointments.projectName; + doctor.date = listDentalAppointments.appointmentDate; + doctor.actualDoctorRate = 0; + doctor.doctorImageURL = listDentalAppointments.doctorImageURL; + doctor.projectID = listDentalAppointments.projectID; + doctor.dayName = listDentalAppointments.invoiceNo; + doctor.clinicName = listDentalAppointments.invoiceNo.toString(); + doctor.date = listDentalAppointments.appointmentDate; + doctor.noOfPatientsRate = listDentalAppointments.patientNumber; + doctor.actualDoctorRate = listDentalAppointments.doctorRate; + doctor.decimalDoctorRate = listDentalAppointments.decimalDoctorRate; + doctor.doctorID = listDentalAppointments.doctorID; + + myInvoicesService.getDentalAppointmentInvoice(listDentalAppointments.projectID!, listDentalAppointments.appointmentNo!, listDentalAppointments.invoiceNo!, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + setState(() { + if (res['MessageStatus'] == 1) { + dentalInvoiceDetailResponse = DentalInvoiceDetailResponse.fromJson(res as Map); + Navigator.push(context, FadePage(page: InvoiceDetail(doctor, listDentalAppointments, dentalInvoiceDetailResponse!, context))); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + isDataLoaded = true; + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err.toString()); + }); + } + + getDentalAppointments() { + GifLoaderDialogUtils.showMyDialog(context); + MyInvoicesService myInvoicesService = new MyInvoicesService(); + + myInvoicesService.getAllDentalAppointments(0, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + setState(() { + if (res['MessageStatus'] == 1) { + getDentalAppointmentsResponse = GetDentalAppointmentsResponse.fromJson(res as Map); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + isDataLoaded = true; + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + Navigator.of(context).pop(); + }); + } +} diff --git a/lib/pages/medical/my_trackers/Weight/AddWeightPage.dart b/lib/pages/medical/my_trackers/Weight/AddWeightPage.dart new file mode 100644 index 00000000..52f8a86b --- /dev/null +++ b/lib/pages/medical/my_trackers/Weight/AddWeightPage.dart @@ -0,0 +1,292 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart'; +import 'package:provider/provider.dart'; + +class AddWeightPage extends StatefulWidget { + final WeightPressureViewModel? model; + final bool? isUpdate; + final DateTime? dayWeightDate; + final int? lineItemNo; + final String? weightValue; + final String? measureTimeSelectedType; + final int? weightUnit; + + AddWeightPage({Key? key, this.model, this.isUpdate = false, this.dayWeightDate, this.lineItemNo, this.weightValue, this.measureTimeSelectedType, this.weightUnit}) : super(key: key); + + @override + _AddWeightPageState createState() => _AddWeightPageState(); +} + +class _AddWeightPageState extends State { + TextEditingController _weightValueController = TextEditingController(); + DateTime dayWeightDate = DateTime.now(); + DateTime timeWeightDate = DateTime.now(); + int weightUnit = 0; + final List measureUnitEnList = [ + 'Pound', + 'Kg', + ]; + final List measureUnitArList = [ + "باوند", + "كيلو جرام", + ]; + String? measureTimeSelectedType; + bool isButtonDisabled = true; + + @override + void initState() { + super.initState(); + if (widget.isUpdate!) { + dayWeightDate = widget.dayWeightDate!; + timeWeightDate = widget.dayWeightDate!; + measureTimeSelectedType = widget.measureTimeSelectedType!; + weightUnit = widget.weightUnit!; + _weightValueController.text = widget.weightValue!; + validateForm(); + } + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + return AppScaffold( + isShowAppBar: true, + appBarTitle: widget.isUpdate! ? TranslationBase.of(context).update : TranslationBase.of(context).add, + showNewAppBar: true, + showNewAppBarTitle: true, + body: Column( + children: [ + Expanded( + child: ListView( + padding: EdgeInsets.all(21), + physics: BouncingScrollPhysics(), + children: [ + NewTextFields( + hintText: TranslationBase.of(context).weightAdd, + controller: _weightValueController, + keyboardType: TextInputType.number, + onChanged: (value) => validateForm(), + fontWeight: FontWeight.normal, + fontSize: 14, + ), + SizedBox(height: 12), + InkWell( + onTap: () { + List list = [ + RadioSelectionDialogModel(projectViewModel.isArabic ? measureUnitArList[0] : measureUnitEnList[0], 0), + RadioSelectionDialogModel(projectViewModel.isArabic ? measureUnitArList[1] : measureUnitEnList[1], 1), + ]; + + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: weightUnit, + onValueSelected: (index) { + weightUnit = index; + measureTimeSelectedType = list[index].title; + setState(() {}); + validateForm(); + }, + ), + ); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(measureTimeSelectedType ?? TranslationBase.of(context).other), + Icon( + Icons.arrow_drop_down, + color: Colors.grey, + ) + ], + ), + ), + ), + SizedBox(height: 12), + InkWell( + onTap: () { + DatePicker.showDatePicker( + context, + showTitleActions: true, + minTime: DateTime(DateTime.now().year - 1, 1, 1), + maxTime: DateTime.now(), + onConfirm: (date) { + setState(() { + dayWeightDate = date; + }); + }, + currentTime: dayWeightDate, + locale: projectViewModel.localeType, + ); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(TranslationBase.of(context).date), + Texts(getDate()), + ], + ), + ), + ), + SizedBox(height: 12), + InkWell( + onTap: () { + DatePicker.showTimePicker( + context, + showTitleActions: true, + onConfirm: (date) { + setState(() { + timeWeightDate = date; + }); + }, + currentTime: timeWeightDate, + locale: projectViewModel.localeType, + ); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [Texts(TranslationBase.of(context).time), Texts(getTime())], + ), + ), + ), + widget.isUpdate! + ? Container( + padding: EdgeInsets.all(10), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + InkWell( + child: Texts( + TranslationBase.of(context).delete, + decoration: TextDecoration.underline, + fontWeight: FontWeight.bold, + color: Colors.red[900], + ), + onTap: () { + showDialog( + context: context, + builder: (cxt) => ConfirmWithMessageDialog( + message: TranslationBase.of(context).removeMeasure, + onTap: () async { + GifLoaderDialogUtils.showMyDialog(context); + widget.model!.deleteWeightResult(lineItemNo: widget.lineItemNo!).then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (widget.model!.state == ViewState.ErrorLocal) + AppToast.showErrorToast(message: widget.model!.error); + else + Navigator.pop(context); + }).catchError((e) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: widget.model!.error); + }); + }, + ), + ); + return; + }) + ], + ), + ) + : Container() + ], + ), + ), + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).save.toUpperCase(), + isButtonDisabled + ? null + : () async { + if (_weightValueController.text.isNotEmpty) { + GifLoaderDialogUtils.showMyDialog(context); + if (widget.isUpdate!) { + widget.model! + .updateWeightResult( + weightDate: '${dayWeightDate.year}-${dayWeightDate.month}-${dayWeightDate.day} ${timeWeightDate.hour}:${timeWeightDate.minute}:00', + weightMeasured: _weightValueController.text.toString(), + weightUnit: weightUnit, + lineItemNo: widget.lineItemNo!) + .then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (widget.model!.state == ViewState.Error) + AppToast.showErrorToast(message: widget.model!.error); + else + Navigator.pop(context); + }); + } else + widget.model + !.addWeightResult( + weightDate: '${dayWeightDate.year}-${dayWeightDate.month}-${dayWeightDate.day} ${timeWeightDate.hour}:${timeWeightDate.minute}:00', + weightMeasured: _weightValueController.text.toString(), + weightUnit: weightUnit, + ) + .then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (widget.model!.state == ViewState.Error) + AppToast.showErrorToast(message: widget.model!.error); + else + Navigator.pop(context); + }); + } + }, + disabledColor: Colors.grey, + ), + ) + ], + ), + ); + } + + String getDate() { + return "${DateUtil.getMonth(dayWeightDate.month)} ${dayWeightDate.day}, ${dayWeightDate.year}"; + } + + String getTime() { + return " ${timeWeightDate.hour}:${timeWeightDate.minute}"; + } + + void validateForm() { + if (_weightValueController.text.length > 0 && measureTimeSelectedType != null) { + setState(() { + isButtonDisabled = false; + }); + } else { + setState(() { + isButtonDisabled = true; + }); + } + } +} diff --git a/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart b/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart new file mode 100644 index 00000000..8e15bc6a --- /dev/null +++ b/lib/pages/medical/my_trackers/Weight/WeightHomePage.dart @@ -0,0 +1,146 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'AddWeightPage.dart'; +import 'WeightMonthlyPage.dart'; +import 'WeightWeeklyPage.dart'; +import 'WeightYeaPage.dart'; + +class WeightHomePage extends StatefulWidget { + @override + _WeightHomePageState createState() => _WeightHomePageState(); +} + +class _WeightHomePageState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 3, vsync: this); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getWeight(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).weight, + backgroundColor: CustomColors.appBackgroudGrey2Color, + appBarIcons: [ + IconButton( + icon: Icon(Icons.email), + color: Colors.white, + onPressed: () { + showDialog( + context: context, + builder: (cxt) => ConfirmSendEmailDialog( + email: model.user!.emailAddress, + onTapSendEmail: () async { + GifLoaderDialogUtils.showMyDialog(context); + model.sendReportByEmail().then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (model.state == ViewState.ErrorLocal) { + AppToast.showErrorToast(message: model.error); + } else { + AppToast.showSuccessToast( + message: TranslationBase.of(context).emailSentSuccessfully, + ); + } + }).catchError((e) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: model.error); + }); + }, + ), + ); + }, + ), + ], + baseViewModel: model, + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).weekly), Text(TranslationBase.of(context).monthlyT), Text(TranslationBase.of(context).yearly)], + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + WeightWeeklyPage( + model: model, + ), + WeightMonthlyPage( + model: model, + ), + WeightYearPage( + model: model, + ) + ], + ), + ) + ], + ), + floatingActionButton: FloatingActionButton( + child: Icon( + Icons.add, + color: Colors.white, + ), + backgroundColor: CustomColors.accentColor, + onPressed: () { + Navigator.push( + context, + FadePage( + page: AddWeightPage( + model: model, + ), + ), + ); + }, + ), + ), + ); + } +} diff --git a/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart b/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart new file mode 100644 index 00000000..d890c157 --- /dev/null +++ b/lib/pages/medical/my_trackers/Weight/WeightMonthlyPage.dart @@ -0,0 +1,124 @@ +import "package:collection/collection.dart"; +import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthLineChartCurved.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class WeightMonthlyPage extends StatelessWidget { + final WeightPressureViewModel? model; + + WeightMonthlyPage({ + Key? key, + this.model, + }) : super(key: key); + List monthlyGroup = []; + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + //if (projectViewModel == null) + projectViewModel = Provider.of(context); + groupData(); + return ListView( + children: [ + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: MonthLineChartCurved( + horizontalInterval: 1.0, + title: TranslationBase.of(context).weight, + timeSeries: model!.weighMonthTimeSeriesData.isEmpty ? [TimeSeriesSales3(0, 0.0)] : model!.weighMonthTimeSeriesData, + indexes: model!.weighMonthTimeSeriesData.length ~/ 5.5, + ), + ), + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts(TranslationBase.of(context).details), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + model!.weighMonthTimeSeriesData.isEmpty + ? Container( + child: Center( + child: Texts(TranslationBase.of(context).noDataAvailable), + ), + ) + : Column(children: [ + for (var monthly in monthlyGroup) + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Container( + width: double.maxFinite, + padding: EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 5), + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)), + child: Texts(monthly[0])), + Table( + columnWidths: { + 0: FlexColumnWidth(2.5), + // 2: FlexColumnWidth(1.8), + }, + children: fullData(context, monthly[1]), + ) + ]) + ]) + ], + ), + ) + ], + ), + ), + mHeight(80), + ], + ); + } + + List fullData(BuildContext context, model) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).time), + Utils.tableColumnTitle(TranslationBase.of(context).value), + ], + ), + ); + model.forEach( + (diabtec) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue('${DateUtil.getDayMonthYearDateFormatted(diabtec.weightDate)} ', isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${diabtec.weightDate.hour}:${diabtec.weightDate.minute}', isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${diabtec.weightMeasured}', isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + }, + ); + return tableRow; + } + + groupData() { + monthlyGroup.clear(); + var groupedArray = groupBy(model!.monthWeightMeasurementResult, (obj) => DateUtil.getMonth(obj.weightDate!.month) + ' ' + obj.weightDate!.year.toString()); + groupedArray.entries.forEach((e) => monthlyGroup.add([e.key, e.value])); + } +} diff --git a/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart b/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart new file mode 100644 index 00000000..05cafe04 --- /dev/null +++ b/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart @@ -0,0 +1,146 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:diplomaticquarterapp/widgets/charts/show_chart.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'AddWeightPage.dart'; + +class WeightWeeklyPage extends StatelessWidget { + final WeightPressureViewModel model; + + WeightWeeklyPage({ Key? key, required this.model}) : super(key: key); + + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + ///if (projectViewModel == null) + projectViewModel = Provider.of(context); + return ListView( + children: [ + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: ShowChart( + title: TranslationBase.of(context).weight, + timeSeries: model.weightWeekTimeSeriesData.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model.weightWeekTimeSeriesData, + indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0, + horizontalInterval: 2, + ), + ), + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts(TranslationBase.of(context).details), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + model.weightWeekTimeSeriesData.isEmpty + ? Container( + child: Center( + child: Texts(TranslationBase.of(context).noDataAvailable), + ), + ) + : Table( + columnWidths: { + 0: FlexColumnWidth(2.5), + }, + children: fullData(context, model), + ), + ], + ), + ) + ], + ), + ), + mHeight(80), + ], + ); + } + + List fullData(BuildContext context, WeightPressureViewModel model) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).time), + Utils.tableColumnTitle(TranslationBase.of(context).measured), + Utils.tableColumnTitle(TranslationBase.of(context).edit), + ], + ), + ); + model.weekWeightMeasurementResult.forEach( + (diabtec) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue('${DateUtil.getDayMonthYearDateFormatted(diabtec.weightDate!)} ', isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${diabtec.weightDate!.hour}:${diabtec.weightDate!.minute}', isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${diabtec.weightMeasured}', isCapitable: false, mProjectViewModel: projectViewModel), + Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ + SizedBox(height: 12), + Container( + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: AddWeightPage( + isUpdate: true, + dayWeightDate: diabtec.weightDate, + measureTimeSelectedType: diabtec.unit == "1" ? 'Kg' : 'Pound', + weightValue: diabtec.weightMeasured.toString(), + lineItemNo: diabtec.lineItemNo, + weightUnit: int.parse(diabtec.unit), + model: model, + ), + ), + ).then((value) { + if (model.weekWeightMeasurementResult.isEmpty) { + model.weightWeekTimeSeriesData.clear(); + } + }); + }, + child: Container( + child: Icon( + Icons.edit, + color: Color(0xff575757), + ), + ), + ), + ), + SizedBox(height: 6), + Divider( + height: 1, + color: Color(0xffEFEFEF), + thickness: 1, + ) + ]), + ], + ), + ); + }, + ); + return tableRow; + } +} diff --git a/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart b/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart new file mode 100644 index 00000000..a79eb958 --- /dev/null +++ b/lib/pages/medical/my_trackers/Weight/WeightYeaPage.dart @@ -0,0 +1,122 @@ +import "package:collection/collection.dart"; +import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/LineChartCurved.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:diplomaticquarterapp/widgets/charts/show_chart.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:provider/provider.dart'; + +class WeightYearPage extends StatelessWidget { + final WeightPressureViewModel model; + + WeightYearPage({ + Key? key, + required this.model, + }) : super(key: key); + List monthlyGroup = []; + ProjectViewModel? projectViewModel; + @override + Widget build(BuildContext context) { + if (projectViewModel == null) projectViewModel = Provider.of(context); + groupData(); + return ListView( + children: [ + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: ShowChart( + horizontalInterval: 2.0, + title: TranslationBase.of(context).weight, + timeSeries: model.weightYearTimeSeriesData.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model.weightYearTimeSeriesData, + indexes: model.weightYearTimeSeriesData.length ~/ 5.5, + )), + + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start,children: [ Padding( + padding: const EdgeInsets.all(8.0), + child: Texts(TranslationBase.of(context).details), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + model.weightYearTimeSeriesData.isEmpty + ? Container( + child: Center( + child: Texts(TranslationBase.of(context).noDataAvailable), + ), + ) + : Column(children: [ + for (var monthly in monthlyGroup) + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Container( + width: double.maxFinite, + padding: EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 5), + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)), + child: Texts(monthly[0])), + Table( + columnWidths: { + 0: FlexColumnWidth(2.5), + }, + children: fullData(context, monthly[1]), + ) + ]) + ]), + ], + ), + )], + ), + ), + mHeight(80), + ], + ); + } + + List fullData(BuildContext context, model) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).time), + Utils.tableColumnTitle(TranslationBase.of(context).value), + ], + ), + ); + model.forEach( + (diabtec) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue('${DateUtil.getDayMonthYearDateFormatted(diabtec.weightDate)} ', + isCapitable: false, mProjectViewModel: projectViewModel!), + Utils.tableColumnValue('${diabtec.weightDate.hour}:${diabtec.weightDate.minute}', isCapitable: false, mProjectViewModel: projectViewModel!), + Utils.tableColumnValue('${diabtec.weightMeasured}', isCapitable: false, mProjectViewModel: projectViewModel!), + ], + ), + ); + }, + ); + return tableRow; + } + + groupData() { + monthlyGroup.clear(); + var groupedArray = groupBy(model.yearWeightMeasurementResult.reversed, (obj) => DateUtil.getMonth(obj.weightDate!.month) + ' ' + obj.weightDate!.year.toString()); + groupedArray.entries.forEach((e) => monthlyGroup.add([e.key, e.value])); + } +} diff --git a/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart new file mode 100644 index 00000000..780f94f5 --- /dev/null +++ b/lib/pages/medical/my_trackers/blood_pressure/AddBloodPressurePage.dart @@ -0,0 +1,304 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/blood_pressure_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart'; +import 'package:provider/provider.dart'; + +class AddBloodPressurePage extends StatefulWidget { + final DateTime? bloodSugarDate; + final String? measureTimeSelectedType; + final bool? isUpdate; + final int? lineItemNo; + final int? measuredArm; + final String? bloodSystolicValue; + final String? bloodDiastolicValue; + final BloodPressureViewMode? model; + + const AddBloodPressurePage( + {Key? key, this.bloodSugarDate, this.measureTimeSelectedType, this.isUpdate = false, this.lineItemNo, this.measuredArm, this.model, this.bloodSystolicValue, this.bloodDiastolicValue}) + : super(key: key); + + @override + _AddBloodPressurePageState createState() => _AddBloodPressurePageState(); +} + +class _AddBloodPressurePageState extends State { + TextEditingController _bloodSystolicValueController = TextEditingController(); + TextEditingController _bloodDiastolicValueController = TextEditingController(); + DateTime bloodSugarDate = DateTime.now(); + DateTime timeSugarDate = DateTime.now(); + int measuredArm = 0; + bool isButtonDisabled = true; + final List measureTimeEnList = ['Left Arm', 'Right Arm']; + final List measureTimeArList = ['الذراع الأيسر', 'الذراع الأيمن']; + String measureTimeSelectedType = 'Left Arm'; + + @override + void initState() { + super.initState(); + if (widget.isUpdate!) { + bloodSugarDate = widget.bloodSugarDate!; + bloodSugarDate = widget.bloodSugarDate!; + measureTimeSelectedType = widget.measureTimeSelectedType!; + measuredArm = widget.measuredArm!; + if (measuredArm > 1) measuredArm = measuredArm - 1; + + _bloodSystolicValueController.text = widget.bloodSystolicValue!; + _bloodDiastolicValueController.text = widget.bloodDiastolicValue!; + validateForm(); + } + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + return AppScaffold( + isShowAppBar: true, + appBarTitle: widget.isUpdate! ? TranslationBase.of(context).update : TranslationBase.of(context).add, + showNewAppBar: true, + showNewAppBarTitle: true, + body: Column( + children: [ + Expanded( + child: ListView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + children: [ + NewTextFields( + hintText: TranslationBase.of(context).systolicAdd, + controller: _bloodSystolicValueController, + keyboardType: TextInputType.number, + maxLength: 3, + onChanged: (value) => validateForm(), + fontWeight: FontWeight.normal, + fontSize: 14, + ), + SizedBox(height: 12), + NewTextFields( + hintText: TranslationBase.of(context).diastolicAdd, + controller: _bloodDiastolicValueController, + keyboardType: TextInputType.number, + maxLength: 3, + onChanged: (value) => validateForm(), + fontWeight: FontWeight.normal, + fontSize: 14, + ), + SizedBox(height: 12), + InkWell( + onTap: () { + List list = [ + RadioSelectionDialogModel(projectViewModel.isArabic ? measureTimeArList[0] : measureTimeEnList[0], 0), + RadioSelectionDialogModel(projectViewModel.isArabic ? measureTimeArList[1] : measureTimeEnList[1], 1), + ]; + + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: measuredArm, + onValueSelected: (index) { + measuredArm = index; + measureTimeSelectedType = list[index].title; + setState(() {}); + validateForm(); + }, + ), + ); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(projectViewModel.isArabic ? measureTimeArList[measuredArm] : measureTimeEnList[measuredArm]), + Icon( + Icons.arrow_drop_down, + color: Colors.grey, + ) + ], + ), + ), + ), + SizedBox(height: 12), + InkWell( + onTap: () { + DatePicker.showDatePicker(context, showTitleActions: true, minTime: DateTime(DateTime.now().year - 1, 1, 1), maxTime: DateTime.now(), onConfirm: (date) { + setState( + () { + bloodSugarDate = date; + }, + ); + }, currentTime: bloodSugarDate, locale: projectViewModel.localeType); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(TranslationBase.of(context).date), + Texts(getDate()), + ], + ), + ), + ), + SizedBox(height: 12), + InkWell( + onTap: () { + DatePicker.showTimePicker(context, showTitleActions: true, onConfirm: (date) { + setState( + () { + timeSugarDate = date; + }, + ); + }, currentTime: timeSugarDate, locale: projectViewModel.localeType); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [Texts(TranslationBase.of(context).time), Texts(getTime())], + ), + ), + ), + widget.isUpdate! + ? Container( + padding: EdgeInsets.all(10), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + InkWell( + child: Texts( + TranslationBase.of(context).delete, + decoration: TextDecoration.underline, + fontWeight: FontWeight.bold, + color: Colors.red[900], + ), + onTap: () { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).removeMeasure, + okText: TranslationBase.of(context).ok, + cancelText: TranslationBase.of(context).cancel, + okFunction: () async { + ConfirmDialog.closeAlertDialog(context); + + GifLoaderDialogUtils.showMyDialog(context); + widget.model!.deactivateDiabeticStatus(lineItemNo: widget.lineItemNo!).then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (widget.model!.state == ViewState.ErrorLocal) + AppToast.showErrorToast(message: widget.model!.error); + else + Navigator.pop(context); + }).catchError((e) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: widget.model!.error); + }); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + }) + ], + )) + : Container() + ], + ), + ), + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).save, + isButtonDisabled + ? null + : () async { + if (_bloodSystolicValueController.text.isNotEmpty && _bloodDiastolicValueController.text.isNotEmpty) { + GifLoaderDialogUtils.showMyDialog(context); + widget.model + !.addORUpdateDiabtecResult( + isUpdate: widget.isUpdate!, + bloodPressureDate: '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00', + diastolicPressure: _bloodDiastolicValueController.text.toString(), + systolicePressure: _bloodSystolicValueController.text.toString(), + measuredArm: (measuredArm), + lineItemNo: widget.lineItemNo) + .then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (widget.model!.state == ViewState.BusyLocal) + AppToast.showErrorToast(message: widget.model!.error); + else + Navigator.pop(context); + ; + }).catchError((e) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: widget.model!.error); + }); + } + }, + disabledColor: Colors.grey, + ), + ) + ], + ), + ); + } + + String getDate() { + return "${DateUtil.getMonth(bloodSugarDate.month)} ${bloodSugarDate.day}, ${bloodSugarDate.year}"; + } + + String getTime() { + return " ${timeSugarDate.hour}:${timeSugarDate.minute}"; + } + + void validateForm() { + print("_bloodSystolicValueController " + _bloodSystolicValueController.text.length.toString()); + if (_bloodSystolicValueController.text.length > 0 && _bloodDiastolicValueController.text.length > 0) { + setState(() { + isButtonDisabled = false; + }); + } else { + setState(() { + isButtonDisabled = true; + }); + } + // if(measureTimeSelectedType == 'Left Arm'){ + // setState(() { + // isButtonDisabled = false; + // }); + // }else if(_bloodSystolicValueController.text.length < 0){ + // setState(() { + // isButtonDisabled = false; + // }); + // }else if(_bloodDiastolicValueController.text.length < 0){ + // setState(() { + // isButtonDisabled = false; + // }); + // }else{ + // setState(() { + // isButtonDisabled = true; + // }); + // } + } +} diff --git a/lib/pages/medical/my_trackers/blood_pressure/BloodPressureHomePage.dart b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureHomePage.dart new file mode 100644 index 00000000..d7230cdd --- /dev/null +++ b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureHomePage.dart @@ -0,0 +1,159 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/blood_pressure_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'AddBloodPressurePage.dart'; +import 'BloodPressureMonthly.dart'; +import 'BloodPressureYeaPage.dart'; +import 'bloodPressureWeeklyPage.dart'; + +class BloodPressureHomePage extends StatefulWidget { + @override + _BloodPressureHomePageState createState() => _BloodPressureHomePageState(); +} + +class _BloodPressureHomePageState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 3, vsync: this); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getBloodPressure(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).bloodPressure, + showNewAppBar: true, + showNewAppBarTitle: true, + baseViewModel: model, + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).weekly), Text(TranslationBase.of(context).monthlyT), Text(TranslationBase.of(context).yearly)], + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + BloodPressureWeeklyPage( + model: model, + ), + BloodPressureMonthlyPage( + model: model, + ), + BloodPressureYearPage( + model: model, + ) + ], + ), + ) + ], + ), + floatingActionButton: Stack(children: [ + Positioned( + bottom: 60, + right: projectViewModel.isArabic ? MediaQuery.of(context).size.width * .85 : 0, + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: AddBloodPressurePage( + model: model, + ))).then((value) { + model.getBloodPressure(); + }); + }, + child: Container( + width: 50, + height: 50, + decoration: BoxDecoration(shape: BoxShape.circle, color: Theme.of(context).primaryColor), + child: Center( + child: Icon( + Icons.add, + color: Colors.white, + ), + )), + )) + ]), + bottomSheet: Container( + color: Theme.of(context).scaffoldBackgroundColor, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: DefaultButton( + TranslationBase.of(context).sendEmail, + () { + showDialog( + context: context, + builder: (cxt) => ConfirmSendEmailDialog( + email: model.user!.emailAddress, + onTapSendEmail: () async { + GifLoaderDialogUtils.showMyDialog(context); + model.sendReportByEmail().then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (model.state == ViewState.ErrorLocal) { + AppToast.showErrorToast(message: model.error); + } else { + AppToast.showSuccessToast( + message: TranslationBase.of(context).emailSentSuccessfully, + ); + } + }).catchError((e) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: model.error); + }); + }, + ), + ); + }, + // label: TranslationBase.of(context).sendEmail, + // backgroundColor: Colors.red[900], + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/medical/my_trackers/blood_pressure/BloodPressureMonthly.dart b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureMonthly.dart new file mode 100644 index 00000000..1eabcce2 --- /dev/null +++ b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureMonthly.dart @@ -0,0 +1,118 @@ +import "package:collection/collection.dart"; +import 'package:diplomaticquarterapp/core/viewModels/medical/blood_pressure_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthCurvedChartBloodPressure.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class BloodPressureMonthlyPage extends StatelessWidget { + final BloodPressureViewMode? model; + + BloodPressureMonthlyPage({Key? key, this.model}) : super(key: key); + List monthlyGroup = []; + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + // if (projectViewModel == null) + projectViewModel = Provider.of(context); + groupData(); + return ListView( + children: [ + Container( + margin: EdgeInsets.only(top: 12, left: 8, right: 8), + color: Colors.white, + child: + MonthCurvedChartBloodPressure( + horizontalInterval: 20.0, + title: TranslationBase.of(context).bloodPressure, + timeSeries1: model!.weighMonthTimeSeriesDataTop.isEmpty ? [TimeSeriesSales3(0, 0.0)] : model!.weighMonthTimeSeriesDataTop, + timeSeries2: model!.weighMonthTimeSeriesDataLow.isEmpty ? [TimeSeriesSales3(0, 0.0)] : model!.weighMonthTimeSeriesDataLow, + indexes: model!.weighMonthTimeSeriesDataLow.length ~/ 5.5, + ), + ), + SizedBox( + height: 12, + ), + // Padding( + // padding: const EdgeInsets.all(8.0), + // child: Texts(TranslationBase.of(context).details), + // ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + model!.weighMonthTimeSeriesDataTop.isEmpty + ? Container( + child: Center( + child: Texts(TranslationBase.of(context).noDataAvailable), + ), + ) + : Column(children: [ + for (var monthly in monthlyGroup) + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Container( + width: double.maxFinite, + padding: EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 5), + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)), + child: Texts(monthly[0])), + Table( + columnWidths: { + 0: FlexColumnWidth(1.8), + 2: FlexColumnWidth(1.8), + }, + children: fullData(context, monthly[1]), + ) + ]) + ]), + SizedBox(height: 80) + ], + ), + ) + ], + ); + } + + List fullData(BuildContext context, model) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).time), + Utils.tableColumnTitle(TranslationBase.of(context).arm), + Utils.tableColumnTitle(TranslationBase.of(context).value), + ], + ), + ); + model.forEach( + (diabtec) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue('${DateUtil.getDayMonthYearDateFormatted(diabtec.bloodPressureDate)}', isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${diabtec.bloodPressureDate.hour}:${diabtec.bloodPressureDate.minute}', isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(diabtec.measuredArmDesc, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${diabtec.systolicePressure}/${diabtec.diastolicPressure}', isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + }, + ); + return tableRow; + } + + groupData() { + monthlyGroup.clear(); + var groupedArray = groupBy(model!.bloodPressureService.monthDiabtecPatientResult, (obj) => DateUtil.getMonth(obj.bloodPressureDate!.month) + ' ' + obj.bloodPressureDate!.year.toString()); + groupedArray.entries.forEach((e) => monthlyGroup.add([e.key, e.value])); + } +} diff --git a/lib/pages/medical/my_trackers/blood_pressure/BloodPressureYeaPage.dart b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureYeaPage.dart new file mode 100644 index 00000000..260cdbed --- /dev/null +++ b/lib/pages/medical/my_trackers/blood_pressure/BloodPressureYeaPage.dart @@ -0,0 +1,114 @@ +import "package:collection/collection.dart"; +import 'package:diplomaticquarterapp/core/viewModels/medical/blood_pressure_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart'; +import 'package:diplomaticquarterapp/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.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:provider/provider.dart'; + +class BloodPressureYearPage extends StatelessWidget { + final BloodPressureViewMode model; + + BloodPressureYearPage({Key? key, required this.model}) : super(key: key); + List monthlyGroup = []; + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + // if (projectViewModel == null) + projectViewModel = Provider.of(context); + groupData(); + return ListView( + children: [ + Container( + margin: EdgeInsets.only(top: 12, left: 8, right: 8), + color: Colors.white, + child: LineChartCurvedBloodPressure( + title: TranslationBase.of(context).bloodPressure, + timeSeries1: model.weightYearTimeSeriesDataTop.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model.weightYearTimeSeriesDataTop, + timeSeries2: model.weightYearTimeSeriesDataLow.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model.weightYearTimeSeriesDataLow, + indexes: model.weightWeekTimeSeriesDataLow.length ~/ 5.5, + ), + ), + SizedBox( + height: 12, + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + model.weightYearTimeSeriesDataTop.isEmpty + ? Container( + child: Center( + child: Texts(TranslationBase.of(context).noDataAvailable), + ), + ) + : Column(children: [ + for (var monthly in monthlyGroup) + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Container( + width: double.maxFinite, + padding: EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 5), + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)), + child: Texts(monthly[0])), + Table( + columnWidths: { + 0: FlexColumnWidth(1.8), + 2: FlexColumnWidth(1.8), + }, + children: fullData(context, monthly[1]), + ) + ]) + ]), + SizedBox(height: 80) + ], + ), + ) + ], + ); + } + + List fullData(BuildContext context, model) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).time), + Utils.tableColumnTitle(TranslationBase.of(context).arm), + Utils.tableColumnTitle(TranslationBase.of(context).value), + ], + ), + ); + model.forEach( + (diabtec) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue('${DateUtil.getDayMonthYearDateFormatted(diabtec.bloodPressureDate)}', isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${diabtec.bloodPressureDate.hour}:${diabtec.bloodPressureDate.minute}', isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(diabtec.measuredArmDesc, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${diabtec.systolicePressure}/${diabtec.diastolicPressure}', isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + }, + ); + return tableRow; + } + + groupData() { + monthlyGroup.clear(); + var groupedArray = groupBy(model.bloodPressureService.yearDiabtecPatientResult.reversed, (obj) => DateUtil.getMonth(obj.bloodPressureDate!.month) + ' ' + obj.bloodPressureDate!.year.toString()); + groupedArray.entries.forEach((e) => monthlyGroup.add([e.key, e.value])); + } +} diff --git a/lib/pages/medical/my_trackers/blood_pressure/bloodPressureWeeklyPage.dart b/lib/pages/medical/my_trackers/blood_pressure/bloodPressureWeeklyPage.dart new file mode 100644 index 00000000..9d0d6685 --- /dev/null +++ b/lib/pages/medical/my_trackers/blood_pressure/bloodPressureWeeklyPage.dart @@ -0,0 +1,147 @@ +import 'package:diplomaticquarterapp/core/viewModels/medical/blood_pressure_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'AddBloodPressurePage.dart'; + +class BloodPressureWeeklyPage extends StatelessWidget { + final BloodPressureViewMode? model; + + BloodPressureWeeklyPage({Key? key, this.model}) : super(key: key); + + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + // if (projectViewModel == null) + projectViewModel = Provider.of(context); + return ListView( + children: [ + Container( + margin: EdgeInsets.only(top: 12, left: 8, right: 8, bottom: 12.0), + padding: EdgeInsets.only(bottom: 12.0), + color: Colors.white, + child: LineChartCurvedBloodPressure( + title: TranslationBase.of(context).bloodPressure, + timeSeries1: model!.weightWeekTimeSeriesDataTop.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model!.weightWeekTimeSeriesDataTop, + timeSeries2: model!.weightWeekTimeSeriesDataLow.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model!.weightWeekTimeSeriesDataLow, + indexes: model!.weightWeekTimeSeriesDataLow.length ~/ 5.5, + ), + ), + SizedBox( + height: 12, + ), + // Padding( + // padding: const EdgeInsets.all(8.0), + // child: Texts(TranslationBase.of(context).details), + // ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + model!.bloodPressureService.weekDiabtecPatientResult.isEmpty + ? Container( + child: Center( + child: Texts(TranslationBase.of(context).noDataAvailable), + ), + ) + : Table( + columnWidths: { + 0: FlexColumnWidth(1.8), + 2: FlexColumnWidth(1.8), + }, + children: fullData(context, model!), + ), + SizedBox(height: 80) + ], + ), + ) + ], + ); + } + + List fullData(BuildContext context, BloodPressureViewMode bloodSugarViewMode) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).time), + Utils.tableColumnTitle(TranslationBase.of(context).measured), + Utils.tableColumnTitle(TranslationBase.of(context).value), + Utils.tableColumnTitle(TranslationBase.of(context).edit), + ], + ), + ); + model!.weekDiabtecPatientResult!.reversed.forEach( + (diabtec) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue('${DateUtil.getDayMonthYearDateFormatted(diabtec.bloodPressureDate!)} ', isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(diabtec.bloodPressureDate!.hour.toString() + ':' + diabtec.bloodPressureDate!.minute.toString(), isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${diabtec.measuredArmDesc}', isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${diabtec.systolicePressure}/${diabtec.diastolicPressure}', isCapitable: false, mProjectViewModel: projectViewModel), + Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ + SizedBox(height: 12), + Container( + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: AddBloodPressurePage( + model: model, + isUpdate: true, + lineItemNo: diabtec.lineItemNo, + bloodSugarDate: diabtec.bloodPressureDate, + bloodDiastolicValue: diabtec.diastolicPressure.toString(), + bloodSystolicValue: diabtec.systolicePressure.toString(), + measureTimeSelectedType: diabtec.measuredArmDesc, + measuredArm: diabtec.measuredArm, + ), + ), + ).then((value) { + model!.getBloodPressure(); + if (model!.weekDiabtecPatientResult.isEmpty) { + model!.weightWeekTimeSeriesDataTop.clear(); + model!.weightWeekTimeSeriesDataLow.clear(); + } + }); + }, + child: Container( + // height: 70, + // padding: EdgeInsets.all(10), + child: Icon( + Icons.edit, + color: Color(0xff575757), + ), + ), + ), + ), + SizedBox(height: 6), + Divider( + height: 1, + color: Color(0xffEFEFEF), + thickness: 1, + ) + ]), + ], + ), + ); + }, + ); + return tableRow; + } +} diff --git a/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart b/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart new file mode 100644 index 00000000..279775f5 --- /dev/null +++ b/lib/pages/medical/my_trackers/blood_suger/AddBloodSugarPage.dart @@ -0,0 +1,348 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/blood_sugar_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart'; +import 'package:provider/provider.dart'; + +class AddBloodSugarPage extends StatefulWidget { + final DateTime? bloodSugarDate; + final String? measureUnitSelectedType; + final bool? isUpdate; + final String? measuredTime; + final String? bloodSugarValue; + final int? lineItemNo; + final String? measuredSelectedType; + final BloodSugarViewMode? bloodSugarViewMode; + + AddBloodSugarPage( + {Key? key, this.bloodSugarDate, this.measureUnitSelectedType, this.isUpdate = false, this.measuredTime, this.bloodSugarValue, this.lineItemNo, this.bloodSugarViewMode, this.measuredSelectedType}) + : super(key: key); + + @override + _AddBloodSugarPageState createState() => _AddBloodSugarPageState(); +} + +class _AddBloodSugarPageState extends State { + TextEditingController _bloodSugarValueController = TextEditingController(); + DateTime bloodSugarDate = DateTime.now(); + DateTime timeSugarDate = DateTime.now(); + String measureUnitSelectedType = 'mg/dlt'; + int measuredTime = 9; + bool isButtonDisabled = true; + + int _selectedMeasureUnitIndex = 0; + final List measureUnitList = ['mg/dlt', 'mol/L']; + final List measureTimeEnList = [ + 'Before Breakfast', + 'After Breakfast', + 'Before Lunch', + 'After Lunch', + 'Before Dinner', + 'After Dinner', + 'Before Sleep', + 'After Sleep', + 'Fasting', + 'Other', + ]; + final List measureTimeArList = [ + "قبل الإفطار", + "بعد الإفطار", + "قبل الغداء", + "بعد الغداء", + "قبل العشاء", + "بعد العشاء", + "قبل النوم", + "بعد النوم", + "صائم", + "آخر", + ]; + int? _selectedMeasureTimeIndex =9; + String? measureTimeSelectedType; + + @override + void initState() { + super.initState(); + if (widget.isUpdate!) { + bloodSugarDate = widget.bloodSugarDate!; + timeSugarDate = widget.bloodSugarDate!; + measureUnitSelectedType = widget.measureUnitSelectedType!; + if (measureTimeEnList.contains(widget.measuredTime)) + measuredTime = measureTimeEnList.indexOf(widget.measuredTime!); + else if (measureTimeArList.contains(widget.measuredTime)) measuredTime = measureTimeArList.indexOf(widget.measuredTime!); + _bloodSugarValueController.text = widget.bloodSugarValue!; + measureTimeSelectedType = widget.measuredSelectedType; + validateForm(); + } + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: widget.isUpdate! ? TranslationBase.of(context).update : TranslationBase.of(context).add, + body: Column( + children: [ + Expanded( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + child: Column( + children: [ + NewTextFields( + hintText: TranslationBase.of(context).sugarAdd, + controller: _bloodSugarValueController, + keyboardType: TextInputType.number, + onChanged: (value) => validateForm(), + fontWeight: FontWeight.normal, + fontSize: 14, + ), + SizedBox(height: 12), + InkWell( + onTap: () { + confirmSelectMeasureUnitDialog(); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(measureUnitSelectedType), + Icon( + Icons.arrow_drop_down, + color: Colors.grey, + ) + ], + ), + ), + ), + SizedBox(height: 12), + InkWell( + onTap: () { + DatePicker.showDatePicker(context, showTitleActions: true, minTime: DateTime(DateTime.now().year - 1, 1, 1), maxTime: DateTime.now(), onConfirm: (date) { + setState(() { + bloodSugarDate = date; + }); + }, currentTime: bloodSugarDate, locale: projectViewModel.localeType); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(TranslationBase.of(context).date), + Texts(getDate()), + ], + ), + ), + ), + SizedBox(height: 12), + InkWell( + onTap: () { + DatePicker.showTimePicker(context, showTitleActions: true, onConfirm: (date) { + setState(() { + timeSugarDate = date; + }); + }, currentTime: timeSugarDate, locale: projectViewModel.localeType); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [Texts(TranslationBase.of(context).time), Texts(getTime())], + ), + ), + ), + SizedBox(height: 12), + InkWell( + onTap: () { + confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeArList : measureTimeEnList); + }, + child: Container( + padding: EdgeInsets.all(12), + width: double.infinity, + height: 65, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(measureTimeSelectedType ?? TranslationBase.of(context).other), + Icon( + Icons.arrow_drop_down, + color: Colors.grey, + ) + ], + ), + ), + ), + widget.isUpdate! + ? Container( + padding: EdgeInsets.all(10), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + InkWell( + child: Texts( + TranslationBase.of(context).delete, + decoration: TextDecoration.underline, + fontWeight: FontWeight.bold, + color: Colors.red[900], + ), + onTap: () { + showDialog( + context: context, + builder: (cxt) => ConfirmWithMessageDialog( + message: TranslationBase.of(context).removeMeasure, + onTap: () async { + GifLoaderDialogUtils.showMyDialog(context); + widget.bloodSugarViewMode!.deactivateDiabeticStatus(lineItemNo: widget.lineItemNo!).then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (widget.bloodSugarViewMode!.state == ViewState.ErrorLocal) + AppToast.showErrorToast(message: widget.bloodSugarViewMode!.error); + else + Navigator.pop(context); + }).catchError((e) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: widget.bloodSugarViewMode!.error); + }); + }, + ), + ); + }, + ) + ], + ), + ) + : Container() + ], + ), + ), + ), + DefaultButton( + TranslationBase.of(context).save, + isButtonDisabled + ? null + : () async { + if (_bloodSugarValueController.text.isNotEmpty) { + GifLoaderDialogUtils.showMyDialog(context); + if (widget.isUpdate!) { + await widget.bloodSugarViewMode!.updateDiabtecResult( + month: bloodSugarDate, + hour: timeSugarDate, + diabtecUnit: measureUnitSelectedType, + measuredTime: measuredTime, + lineItemNo: widget.lineItemNo, + bloodSugerResult: _bloodSugarValueController.text.toString()); + + GifLoaderDialogUtils.hideDialog(context); + if (widget.bloodSugarViewMode!.state == ViewState.ErrorLocal) + AppToast.showErrorToast(message: widget.bloodSugarViewMode!.error); + else + Navigator.pop(context); + } else { + await widget.bloodSugarViewMode!.addDiabtecResult( + diabtecUnit: measureUnitSelectedType, + measuredTime: measuredTime, + bloodSugerResult: _bloodSugarValueController.text.toString(), + bloodSugerDateChart: '${bloodSugarDate.year}-${bloodSugarDate.month}-${bloodSugarDate.day} ${timeSugarDate.hour}:${timeSugarDate.minute}:00', + ); + + GifLoaderDialogUtils.hideDialog(context); + if (widget.bloodSugarViewMode!.state == ViewState.Error) + AppToast.showErrorToast(message: widget.bloodSugarViewMode!.error); + else + Navigator.pop(context); + } + } + }, + disabledColor: Colors.grey, + ).insideContainer, + ], + ), + ); + } + + String getDate() { + return "${DateUtil.getMonth(bloodSugarDate.month)} ${bloodSugarDate.day}, ${bloodSugarDate.year}"; + } + + String getTime() { + return " ${timeSugarDate.hour}:${timeSugarDate.minute}"; + } + + void confirmSelectMeasureUnitDialog() { + List list = [ + RadioSelectionDialogModel("mg/dlt", 0), + RadioSelectionDialogModel("mol/L", 1), + ]; + + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: _selectedMeasureUnitIndex, + onValueSelected: (index) { + _selectedMeasureUnitIndex = index; + measureUnitSelectedType = list[index].title; + setState(() {}); + }, + ), + ); + } + + void confirmSelectMeasureTimeDialog(List dataList) { + List list = [ + for (int i = 0; i < dataList.length; i++) RadioSelectionDialogModel(dataList[i], i), + ]; + + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: _selectedMeasureTimeIndex, + isScrollable: true, + onValueSelected: (index) { + _selectedMeasureTimeIndex = index; + measureTimeSelectedType = list[index].title; + measuredTime = index; + setState(() {}); + }, + ), + ); + } + + void validateForm() { + if (_bloodSugarValueController.text.length > 0) { + setState(() { + isButtonDisabled = false; + }); + } else { + setState(() { + isButtonDisabled = true; + }); + } + } +} diff --git a/lib/pages/medical/my_trackers/blood_suger/BloodMonthly.dart b/lib/pages/medical/my_trackers/blood_suger/BloodMonthly.dart new file mode 100644 index 00000000..59cc2e12 --- /dev/null +++ b/lib/pages/medical/my_trackers/blood_suger/BloodMonthly.dart @@ -0,0 +1,116 @@ +import "package:collection/collection.dart"; +import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/blood_sugar_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthLineChartCurved.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.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:provider/provider.dart'; + +class BloodMonthlyPage extends StatelessWidget { + final List? diabtecPatientResult; + final List? timeSeriesData; + final BloodSugarViewMode? bloodSugarViewMode; + + BloodMonthlyPage({Key? key, this.diabtecPatientResult, this.timeSeriesData, this.bloodSugarViewMode}) : super(key: key); + + List monthlyGroup = []; + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + groupData(); + return AppScaffold( + body: ListView( + children: [ + Container( + margin: EdgeInsets.only(top: 12, left: 8, right: 8), + width: double.maxFinite, + color: Colors.white, + child: MonthLineChartCurved( + title: '${TranslationBase.of(context).bloodSugar}', + timeSeries: timeSeriesData!.isEmpty ? [TimeSeriesSales3(0, 0.0)] : timeSeriesData!, + indexes: timeSeriesData!.length ~/ 5.5, + )), + SizedBox( + height: 12, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts(TranslationBase.of(context).details), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + timeSeriesData!.isEmpty + ? Container( + child: Center( + child: Texts(TranslationBase.of(context).noDataAvailable), + ), + ) + : Column(children: [ + for (var monthly in monthlyGroup) + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Container( + width: double.maxFinite, + padding: EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 5), + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)), + child: Texts(monthly[0])), + Table( + columnWidths: { + 0: FlexColumnWidth(1.8), + 2: FlexColumnWidth(1.8), + }, + children: fullData(context, monthly[1]), + ) + ]) + ]), + ])) + ], + ), + ); + } + + List fullData(BuildContext context, e) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).time), + Utils.tableColumnTitle(TranslationBase.of(context).measured), + Utils.tableColumnTitle(TranslationBase.of(context).value), + ], + ), + ); + e.forEach( + (diabtec) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue(DateUtil.getDayMonthYearDateFormatted(diabtec.dateChart), isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(diabtec.dateChart.hour.toString() + ':' + diabtec.dateChart.minute.toString(), isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(diabtec.measuredDesc, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(diabtec.resultValue.toString(), isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + }, + ); + return tableRow; + } + + groupData() { + monthlyGroup.clear(); + var groupedArray = groupBy(diabtecPatientResult!, (obj) => DateUtil.getMonth(obj.dateChart!.month) + ' ' + obj.dateChart!.year.toString()); + groupedArray.entries.forEach((e) => monthlyGroup.add([e.key, e.value])); + } +} diff --git a/lib/pages/medical/my_trackers/blood_suger/BloodYeaPage.dart b/lib/pages/medical/my_trackers/blood_suger/BloodYeaPage.dart new file mode 100644 index 00000000..3e284565 --- /dev/null +++ b/lib/pages/medical/my_trackers/blood_suger/BloodYeaPage.dart @@ -0,0 +1,121 @@ +import "package:collection/collection.dart"; +import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/blood_sugar_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:diplomaticquarterapp/widgets/charts/show_chart.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class BloodYearPage extends StatelessWidget { + final List? diabtecPatientResult; + final List? timeSeriesData; + final BloodSugarViewMode? bloodSugarViewMode; + + BloodYearPage({Key? key, this.diabtecPatientResult, this.timeSeriesData, this.bloodSugarViewMode}) : super(key: key); + List yearlyGroup = []; + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + // if (projectViewModel == null) + projectViewModel = Provider.of(context); + + groupData(); + return ListView( + children: [ + Container( + margin: EdgeInsets.only(top: 12, left: 8, right: 8), + width: double.maxFinite, + color: Colors.white, + child: ShowChart( + title: TranslationBase.of(context).weight, + timeSeries: timeSeriesData!.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : timeSeriesData, + indexes: timeSeriesData!.length ~/ 5.5, + horizontalInterval: 2, + ), + ), + SizedBox( + height: 12, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts(TranslationBase.of(context).details), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + timeSeriesData!.isEmpty + ? Container( + child: Center( + child: Texts(TranslationBase.of(context).noDataAvailable), + ), + ) + : Column(children: [ + for (var monthly in yearlyGroup) + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Container( + width: double.maxFinite, + padding: EdgeInsets.only(top: 10, bottom: 10, left: 5, right: 5), + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)), + child: Texts(monthly[0])), + Table( + columnWidths: { + 0: FlexColumnWidth(1.8), + 2: FlexColumnWidth(1.8), + }, + children: fullData(context, monthly[1]), + ) + ]) + ]), + SizedBox(height: 80) + ], + ), + ) + ], + ); + } + + List fullData(BuildContext context, yearlyGroup) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).time), + Utils.tableColumnTitle(TranslationBase.of(context).measured), + Utils.tableColumnTitle(TranslationBase.of(context).value), + ], + ), + ); + yearlyGroup.forEach( + (diabtec) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue(DateUtil.getDayMonthYearDateFormatted(diabtec.dateChart), isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(diabtec.dateChart.hour.toString() + ':' + diabtec.dateChart.minute.toString(), isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(diabtec.measuredDesc, isCapitable: false, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(diabtec.resultValue.toString(), isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + }, + ); + return tableRow; + } + + groupData() { + yearlyGroup.clear(); + var groupedArray = groupBy(diabtecPatientResult!.reversed, (obj) => DateUtil.getMonth(obj.dateChart!.month) + ' ' + obj.dateChart!.year.toString()); + groupedArray.entries.forEach((e) => yearlyGroup.add([e.key, e.value])); + } +} diff --git a/lib/pages/medical/my_trackers/blood_suger/blood_sugar_home_page.dart b/lib/pages/medical/my_trackers/blood_suger/blood_sugar_home_page.dart new file mode 100644 index 00000000..b7f74988 --- /dev/null +++ b/lib/pages/medical/my_trackers/blood_suger/blood_sugar_home_page.dart @@ -0,0 +1,165 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/blood_sugar_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'AddBloodSugarPage.dart'; +import 'BloodMonthly.dart'; +import 'BloodYeaPage.dart'; +import 'blood_sugar_weekly_page.dart'; + +class BloodSugarHomePage extends StatefulWidget { + @override + _BloodSugarHomePageState createState() => _BloodSugarHomePageState(); +} + +class _BloodSugarHomePageState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 3, vsync: this); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getBloodSugar(), + builder: (_, model, w) => AppScaffold( + showNewAppBar: true, + isShowDecPage: true, + showNewAppBarTitle: true, + baseViewModel: model, + appBarTitle: TranslationBase.of(context).bloodSugar, + // baseViewModel: model, + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).weekly), Text(TranslationBase.of(context).monthlyT), Text(TranslationBase.of(context).yearly)], + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + BloodSugarWeeklyPage( + timeSeriesData: model.bloodWeekTimeSeriesData, + diabtecPatientResult: model.weekDiabtecPatientResult, + bloodSugarViewMode: model, + ), + BloodMonthlyPage( + timeSeriesData: model.monthTimeSeriesData, + diabtecPatientResult: model.monthDiabtecPatientResult, + bloodSugarViewMode: model, + ), + BloodYearPage( + timeSeriesData: model.yearTimeSeriesData, + diabtecPatientResult: model.yearDiabtecPatientResult, + bloodSugarViewMode: model, + ) + ], + ), + ) + ], + ), + floatingActionButton: Stack( + children: [ + Positioned( + bottom: 60, + right: projectViewModel.isArabic ? MediaQuery.of(context).size.width * .85 : 0, + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: AddBloodSugarPage( + bloodSugarViewMode: model, + ))); + }, + child: Container( + width: 50, + height: 50, + decoration: BoxDecoration(shape: BoxShape.circle, color: Theme.of(context).primaryColor), + child: Center( + child: Icon( + Icons.add, + color: Colors.white, + ), + )), + ), + ), + ], + ), + bottomSheet: Container( + color: Theme.of(context).scaffoldBackgroundColor, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: DefaultButton( + TranslationBase.of(context).sendEmail, + () { + showDialog( + context: context, + builder: (cxt) => ConfirmSendEmailDialog( + email: model.user!.emailAddress, + onTapSendEmail: () async { + GifLoaderDialogUtils.showMyDialog(context); + model.sendReportByEmail().then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (model.state == ViewState.ErrorLocal) { + AppToast.showErrorToast(message: model.error); + } else { + AppToast.showSuccessToast( + message: TranslationBase.of(context).emailSentSuccessfully, + ); + } + }).catchError((e) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: model.error); + }); + }, + ), + ); + }, + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/medical/my_trackers/blood_suger/blood_sugar_weekly_page.dart b/lib/pages/medical/my_trackers/blood_suger/blood_sugar_weekly_page.dart new file mode 100644 index 00000000..2b74395d --- /dev/null +++ b/lib/pages/medical/my_trackers/blood_suger/blood_sugar_weekly_page.dart @@ -0,0 +1,151 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/blood_sugar_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:diplomaticquarterapp/widgets/charts/show_chart.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/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'AddBloodSugarPage.dart'; + +class BloodSugarWeeklyPage extends StatelessWidget { + final List? diabtecPatientResult; + final BloodSugarViewMode? bloodSugarViewMode; + final List? timeSeriesData; + ProjectViewModel? projectViewModel; + + BloodSugarWeeklyPage({Key? key, this.diabtecPatientResult, this.bloodSugarViewMode, this.timeSeriesData}) : super(key: key); + + @override + Widget build(BuildContext context) { + if (projectViewModel == null) projectViewModel = Provider.of(context); + return AppScaffold( + body: ListView( + children: [ + Container( + margin: EdgeInsets.only(top: 12, left: 8, right: 8), + color: Colors.white, + child: ShowChart( + title: TranslationBase.of(context).weight, + timeSeries: timeSeriesData!.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : timeSeriesData, + indexes: timeSeriesData!.length ~/ 5.5, + horizontalInterval: 2, + ), + ), + SizedBox( + height: 12, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts(TranslationBase.of(context).details), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + timeSeriesData!.isEmpty + ? Container( + child: Center( + child: Texts(TranslationBase.of(AppGlobal.context).noDataAvailable), + ), + ) + : Table( + columnWidths: { + 0: FlexColumnWidth(1.8), + 2: FlexColumnWidth(1.8), + }, + children: fullData(context, bloodSugarViewMode!), + ), + SizedBox( + height: 80, + ) + ], + ), + ) + ], + ), + ); + } + + List fullData(BuildContext context, BloodSugarViewMode bloodSugarViewMode) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).time), + Utils.tableColumnTitle(TranslationBase.of(context).measured), + Utils.tableColumnTitle(TranslationBase.of(context).value), + Utils.tableColumnTitle(TranslationBase.of(context).edit), + ], + ), + ); + diabtecPatientResult!.forEach( + (diabtec) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue(DateUtil.getDayMonthYearDateFormatted(diabtec.dateChart!), isCapitable: false, mProjectViewModel: projectViewModel!), + Utils.tableColumnValue(diabtec.dateChart!.hour.toString() + ':' + diabtec.dateChart!.minute.toString(), isCapitable: false, mProjectViewModel: projectViewModel!), + Utils.tableColumnValue(diabtec.measuredDesc!, isCapitable: false, mProjectViewModel: projectViewModel!), + Utils.tableColumnValue(diabtec.resultValue.toString(), isCapitable: false, mProjectViewModel: projectViewModel!), + Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ + SizedBox(height: 12), + Container( + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: AddBloodSugarPage( + isUpdate: true, + bloodSugarDate: diabtec.dateChart, + measuredTime: diabtec.measuredDesc, + bloodSugarValue: diabtec.resultValue.toString(), + lineItemNo: diabtec.lineItemNo, + measureUnitSelectedType: diabtec.unit, + bloodSugarViewMode: bloodSugarViewMode, + measuredSelectedType: diabtec.measuredDesc, + ), + ), + ).then((value) { + if (bloodSugarViewMode.weekDiabtecPatientResult.isEmpty) { + timeSeriesData!.clear(); + } + }); + }, + child: Container( + // height: 70, + // padding: EdgeInsets.all(10), + child: Icon( + Icons.edit, + color: Color(0xff575757), + ), + ), + ), + ), + SizedBox(height: 6), + Divider( + height: 1, + color: Color(0xffEFEFEF), + thickness: 1, + ) + ]), + ], + ), + ); + }, + ); + return tableRow; + } +} diff --git a/lib/pages/medical/my_trackers/my_trackers.dart b/lib/pages/medical/my_trackers/my_trackers.dart new file mode 100644 index 00000000..c6e7d5dc --- /dev/null +++ b/lib/pages/medical/my_trackers/my_trackers.dart @@ -0,0 +1,77 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/pages/medical/my_trackers/Weight/WeightHomePage.dart'; +import 'package:diplomaticquarterapp/pages/medical/my_trackers/blood_suger/blood_sugar_home_page.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'blood_pressure/BloodPressureHomePage.dart'; + +class MyTrackers extends StatelessWidget { + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).myTracker, + showNewAppBar: true, + isShowDecPage: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF8F8F8), + description: TranslationBase.of(context).infoTrackers, + imagesInfo: [ + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-trackers/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-trackers/ar/0.png') + ], + body: SingleChildScrollView( + child: Container( + child: GridView( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.all(21), + shrinkWrap: true, + children: [ + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: BloodSugarHomePage())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).bloodSugar, + imagePath: 'assets/tracker/blood-suger.png', + subTitle: "", + isPngImage: true, + width: 45.0, + height: 45.0, + ), + ), + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: BloodPressureHomePage())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).bloodPressure, + imagePath: 'assets/tracker/blood-pressure.png', + subTitle: "", + isPngImage: true, + width: 45.0, + height: 45.0, + ), + ), + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: WeightHomePage())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).weight, + imagePath: 'assets/tracker/weight.png', + subTitle: "", + isPngImage: true, + width: 45.0, + height: 45.0, + ), + ), + ])), + ), + ); + } +} diff --git a/lib/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart b/lib/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart new file mode 100644 index 00000000..5f093eb7 --- /dev/null +++ b/lib/pages/medical/my_trackers/widget/CurvedChartBloodPressure.dart @@ -0,0 +1,280 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:fl_chart/fl_chart.dart'; +import 'package:flutter/material.dart'; + +import '../../../../Constants.dart'; + +class CurvedChartBloodPressure extends StatelessWidget { + final String? title; + final List? timeSeries1; + final List? timeSeries2; + final int? indexes; + final double? horizontalInterval; + + CurvedChartBloodPressure({this.title, this.timeSeries1, this.indexes, this.timeSeries2, this.horizontalInterval = 20.0}); + + List xAxixs = []; + List yAxixs = []; + + @override + Widget build(BuildContext context) { + getXaxix(); + return AspectRatio( + aspectRatio: 1.1, + child: Container( + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(18)), + // color: Colors.white, + ), + child: Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + const SizedBox( + height: 15, + ), + Text( + title!, + style: TextStyle(color: Colors.black, fontSize: 15, letterSpacing: 2), + textAlign: TextAlign.center, + ), + SizedBox( + height: 10, + ), + Expanded( + child: Padding( + padding: const EdgeInsets.only(right: 18.0, left: 16.0, top: 15), + child: LineChart( + sampleData1(context), + duration: const Duration(milliseconds: 250), + ), + ), + ), + SizedBox( + height: 10, + ), + Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + children: [ + Container( + width: 20, + height: 20, + decoration: BoxDecoration(shape: BoxShape.rectangle, color: Theme.of(context).primaryColor), + ), + SizedBox( + width: 5, + ), + Texts(TranslationBase.of(context).systolicLng) + ], + ), + SizedBox( + width: 15, + ), + Row( + children: [ + Container( + width: 20, + height: 20, + decoration: BoxDecoration(shape: BoxShape.rectangle, color: secondaryColor), + ), + SizedBox( + width: 5, + ), + Texts(TranslationBase.of(context).diastolicLng) + ], + ), + ], + ) + ], + ), + ], + ), + ), + ); + } + + getXaxix() { + for (int index = 0; index < timeSeries1!.length; index++) { + int mIndex = indexes! * index; + if (mIndex < timeSeries1!.length) { + xAxixs.add(mIndex); + } + } + } + + LineChartData sampleData1(context) { + return LineChartData( + lineTouchData: LineTouchData( + touchTooltipData: LineTouchTooltipData( + tooltipBgColor: Colors.white, + ), + touchCallback: (touchEvent, LineTouchResponse? touchResponse) {}, + handleBuiltInTouches: true, + ), + gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true), + titlesData: FlTitlesData( + bottomTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: true, + getTitlesWidget: (value, TitleMeta) { + TextStyle style = TextStyle( + color: Colors.black, + fontSize: 10, + ); + if (timeSeries1!.length < 15) { + if (timeSeries1!.length > value.toInt()) { + return Text( + '${timeSeries1![value.toInt()].time.month}/ ${timeSeries1![value.toInt()].time.year}', + style: style, + ); + } else + //return Text(""); + return SizedBox(); + } else { + if (value.toInt() == 0) + return Text( + '${timeSeries1![value.toInt()].time.month}/ ${timeSeries1![value.toInt()].time.year}', + style: style, + ); + if (value.toInt() == timeSeries1!.length - 1) + return Text( + '${timeSeries1![value.toInt()].time.month}/ ${timeSeries1![value.toInt()].time.year}', + style: style, + ); + if (xAxixs.contains(value.toInt())) { + return Text( + '${timeSeries1![value.toInt()].time.month}/ ${timeSeries1![value.toInt()].time.year}', + style: style, + ); + } + } + return SizedBox(); + }, + + // margin: 22, + ), + ), + leftTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: true, + interval: getMaxY() - getMinY() <= 500 + ? 50 + : getMaxY() - getMinY() <= 1000 + ? 100 + : 200, + getTitlesWidget: (value, TitleMeta) { + TextStyle style = TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 10, + ); + return SizedBox(); + } + + // margin: 12, + ), + ), + ), + borderData: FlBorderData( + show: true, + border: const Border( + bottom: BorderSide( + color: Colors.black, + width: 0.5, + ), + left: BorderSide( + color: Colors.black, + ), + right: BorderSide( + color: Colors.black, + ), + top: BorderSide( + color: Colors.transparent, + ), + ), + ), + minX: 0, + maxX: (timeSeries1!.length - 1).toDouble(), + maxY: getMaxY() + 0.3, + minY: getMinY(), + lineBarsData: getData(context), + ); + } + + double getMaxY() { + double max = 0; + timeSeries1!.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble > max) max = resultValueDouble; + }); + timeSeries2!.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble > max) max = resultValueDouble; + }); + + return max.roundToDouble(); + } + + double getMinY() { + double min = timeSeries1![0].sales; + timeSeries1!.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble < min) min = resultValueDouble; + }); + timeSeries2!.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble < min) min = resultValueDouble; + }); + + int value = min.toInt(); + + return value.toDouble(); + } + + List getData(context) { + List spots = []; + for (int index = 0; index < timeSeries1!.length; index++) { + spots.add(FlSpot(index.toDouble(), timeSeries1![index].sales)); + } + + List spots2 = []; + for (int index = 0; index < timeSeries2!.length; index++) { + spots2.add(FlSpot(index.toDouble(), timeSeries2![index].sales)); + } + + final LineChartBarData lineChartBarData1 = LineChartBarData( + spots: spots, + isCurved: true, + color: Colors.red, + barWidth: 5, + isStrokeCapRound: true, + dotData: FlDotData( + show: false, + ), + belowBarData: BarAreaData( + show: false, + ), + ); + final LineChartBarData lineChartBarData2 = LineChartBarData( + spots: spots2, + isCurved: true, + color: Theme.of(context).primaryColor, + barWidth: 5, + isStrokeCapRound: true, + dotData: FlDotData( + show: false, + ), + belowBarData: BarAreaData( + show: false, + ), + ); + + return [lineChartBarData1, lineChartBarData2]; + } +} diff --git a/lib/pages/medical/my_trackers/widget/LineChartCurved.dart b/lib/pages/medical/my_trackers/widget/LineChartCurved.dart new file mode 100644 index 00000000..882cf034 --- /dev/null +++ b/lib/pages/medical/my_trackers/widget/LineChartCurved.dart @@ -0,0 +1,304 @@ +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:fl_chart/fl_chart.dart'; +import 'package:flutter/material.dart'; + +import '../../../../Constants.dart'; + +class LineChartCurved extends StatelessWidget { + final String? title; + final List? timeSeries; + final int? indexes; + final double? horizontalInterval; + + LineChartCurved({this.title, this.timeSeries, this.indexes, this.horizontalInterval = 20.0}); + + List xAxixs = []; + List yAxixs = []; + + @override + Widget build(BuildContext context) { + getXaxix(); + getYaxix(); + return AspectRatio( + aspectRatio: 1.0, + child: Container( + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(18)), + // color: Colors.white, + ), + child: Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + const SizedBox( + height: 4, + ), + Text( + title!, + style: TextStyle(color: Colors.black, fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600), + textAlign: TextAlign.center, + ), + SizedBox( + height: 10, + ), + Expanded( + child: Padding( + padding: const EdgeInsets.only(right: 18.0, left: 16.0), + child: LineChart( + sampleData1(context), + duration: const Duration(milliseconds: 250), + ), + ), + ), + const SizedBox( + height: 10, + ), + ], + ), + ], + ), + ), + ); + } + + getXaxix() { + for (int index = 0; index < timeSeries!.length; index++) { + int mIndex = indexes! * index; + if (mIndex < timeSeries!.length) { + xAxixs.add(mIndex); + } + } + } + + getYaxix() { + int indexess = (timeSeries!.length * 0.30).toInt(); + for (int index = 0; index < timeSeries!.length; index++) { + int mIndex = indexess * index; + if (mIndex < timeSeries!.length) { + yAxixs.add(timeSeries![mIndex].sales); + } + } + } + + // LineChartData sampleData1(context) { + // return LineChartData( + // lineTouchData: LineTouchData( + // touchTooltipData: LineTouchTooltipData( + // tooltipBgColor: Colors.white, + // ), + // touchCallback: (LineTouchResponse touchResponse) {}, + // handleBuiltInTouches: true, + // ), + // gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true, horizontalInterval: 14, verticalInterval: 14), + // titlesData: FlTitlesData( + // bottomTitles: SideTitles( + // showTitles: true, + // getTextStyles: (value) => const TextStyle( + // color: Colors.black, + // fontSize: 10, + // ), + // // rotateAngle: 90, + // //rotateAngle:-65, + // margin: 22, + // getTitles: (value) { + // if (timeSeries.length < 15) { + // if (timeSeries.length > value.toInt()) { + // return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; + // } else + // return ''; + // } else { + // if (value.toInt() == 0) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; + // if (value.toInt() == timeSeries.length - 1) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; + // if (xAxixs.contains(value.toInt())) { + // return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}'; + // } + // } + // return ''; + // }, + // ), + // leftTitles: SideTitles( + // showTitles: true, + // // interval:getMaxY() - getMinY() <=500?50:getMaxY() - getMinY() <=1000?100:200, + // interval: 3, + // getTextStyles: (value) => const TextStyle( + // color: Colors.black, + // fontWeight: FontWeight.bold, + // fontSize: 10, + // ), + // + // margin: 12, + // ), + // ), + // borderData: FlBorderData( + // show: true, + // border: const Border( + // bottom: BorderSide( + // color: Colors.black, + // width: 0.5, + // ), + // left: BorderSide( + // color: Colors.black, + // ), + // right: BorderSide( + // color: Colors.black, + // ), + // top: BorderSide( + // color: Colors.transparent, + // ), + // ), + // ), + // minX: 0, + // maxX: (timeSeries.length - 1).toDouble(), + // maxY: getMaxY() + 0.3, + // minY: 0, + // //getMinY(), + // lineBarsData: getData(context), + // ); + // } + + LineChartData sampleData1(context) { + return LineChartData( + lineTouchData: LineTouchData( + touchTooltipData: LineTouchTooltipData( + tooltipBgColor: Colors.white, + ), + touchCallback: (touchEvent, LineTouchResponse? touchResponse) {}, + handleBuiltInTouches: true, + ), + gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true, horizontalInterval: 14, verticalInterval: 14), + titlesData: FlTitlesData( + bottomTitles: AxisTitles( + axisNameSize: 22, + sideTitles: SideTitles( + showTitles: true, +//Changed By Aamir + // rotateAngle: -65, + // margin: 22, + getTitlesWidget: (value, title) { + TextStyle style = TextStyle( + color: Colors.black, + fontSize: 10, + ); + if (timeSeries!.length < 15) { + if (timeSeries!.length > value.toInt()) { + return Text( + '${timeSeries![value.toInt()].time.month}/ ${timeSeries![value.toInt()].time.year}', + style: style, + ); + } else + return SizedBox(); + } else { + if (value.toInt() == 0) return Text('${timeSeries![value.toInt()].time.month}/ ${timeSeries![value.toInt()].time.year}', style: style); + if (value.toInt() == timeSeries!.length - 1) return Text('${timeSeries![value.toInt()].time.month}/ ${timeSeries![value.toInt()].time.year}', style: style); + if (xAxixs.contains(value.toInt())) { + return Text( + '${timeSeries![value.toInt()].time.month}/ ${timeSeries![value.toInt()].time.year}', + style: style, + ); + } + } + return SizedBox(); + }, + ), + ), + leftTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: true, + interval: 3.0, + getTitlesWidget: (val, title) { + TextStyle styl = const TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 10, + ); + return Text( + "", + style: styl, + ); + } + // interval: getMaxY() - getMinY() <= 500 + // ? getMaxY() - getMinY() <= 50 + // ? 10 + // : 10 + // : getMaxY() - getMinY() <= 1000 + // ? 100 + // : getMaxY() - getMinY() >= 10000 + // ? 5000 + // : 200, + //margin: 12, + ), + )), + borderData: FlBorderData( + show: true, + border: const Border( + bottom: BorderSide( + color: Colors.black, + width: 0.5, + ), + left: BorderSide( + color: Colors.black, + ), + right: BorderSide( + color: Colors.black, + ), + top: BorderSide( + color: Colors.transparent, + ), + ), + ), + minX: 0, + maxX: (timeSeries!.length - 1).toDouble(), + maxY: getMaxY() + 0.3, + minY: 0, + //getMinY(), + lineBarsData: getData(context), + ); + } + + double getMaxY() { + double max = 0; + timeSeries!.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble > max) max = resultValueDouble; + }); + + return max.roundToDouble(); + } + + double getMinY() { + double min = timeSeries!.isEmpty ? 0 : timeSeries!.first.sales; + timeSeries!.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble < min) min = resultValueDouble; + }); + int value = min.toInt(); + + return value.toDouble(); + } + + List getData(context) { + List spots = []; + for (int index = 0; index < timeSeries!.length; index++) { + spots.add(FlSpot(index.toDouble(), timeSeries![index].sales)); + } + + final LineChartBarData lineChartBarData1 = LineChartBarData( + spots: spots, + isCurved: true, + color: secondaryColor, + barWidth: 1.5, + isStrokeCapRound: true, + dotData: FlDotData( + show: false, + ), + belowBarData: BarAreaData( + show: false, + ), + ); + + return [ + lineChartBarData1, + ]; + } +} diff --git a/lib/pages/medical/my_trackers/widget/MonthCurvedChartBloodPressure.dart b/lib/pages/medical/my_trackers/widget/MonthCurvedChartBloodPressure.dart new file mode 100644 index 00000000..54228d1e --- /dev/null +++ b/lib/pages/medical/my_trackers/widget/MonthCurvedChartBloodPressure.dart @@ -0,0 +1,263 @@ +import 'package:diplomaticquarterapp/Constants.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:fl_chart/fl_chart.dart'; +import 'package:flutter/material.dart'; + +class MonthCurvedChartBloodPressure extends StatelessWidget { + final String? title; + final List? timeSeries1; + final List? timeSeries2; + final int? indexes; + final double? horizontalInterval; + + MonthCurvedChartBloodPressure({this.title, this.timeSeries1, this.indexes, this.timeSeries2, this.horizontalInterval = 20.0}); + + List xAxixs = []; + List yAxixs = []; + + @override + Widget build(BuildContext context) { + getXaxix(); + return AspectRatio( + aspectRatio: 1.0, + child: Container( + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(18)), + // color: Colors.white, + ), + child: Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + const SizedBox( + height: 15, + ), + Text( + title!, + style: TextStyle(color: Colors.black, fontSize: 15, letterSpacing: 2), + textAlign: TextAlign.center, + ), + SizedBox( + height: 10, + ), + Expanded( + child: Padding( + padding: const EdgeInsets.only(right: 18.0, left: 16.0, top: 15), + child: LineChart( + sampleData1(context), + duration: const Duration(milliseconds: 250), + ), + ), + ), + SizedBox( + height: 10, + ), + Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + children: [ + Container( + width: 20, + height: 20, + decoration: BoxDecoration(shape: BoxShape.rectangle, color: Theme.of(context).primaryColor), + ), + SizedBox( + width: 5, + ), + Texts(TranslationBase.of(context).systolicLng) + ], + ), + SizedBox( + width: 15, + ), + Row( + children: [ + Container( + width: 20, + height: 20, + decoration: BoxDecoration(shape: BoxShape.rectangle, color: secondaryColor), + ), + SizedBox( + width: 5, + ), + Texts(TranslationBase.of(context).diastolicLng) + ], + ), + ], + ) + ], + ), + ], + ), + ), + ); + } + + getXaxix() { + for (int index = 0; index < timeSeries1!.length; index++) { + int mIndex = indexes! * index; + if (mIndex < timeSeries1!.length) { + xAxixs.add(mIndex); + } + } + } + + LineChartData sampleData1(context) { + return LineChartData( + lineTouchData: LineTouchData( + touchTooltipData: LineTouchTooltipData( + tooltipBgColor: Colors.white, + ), + touchCallback: (touchEvent, LineTouchResponse? touchResponse) {}, + handleBuiltInTouches: true, + ), + gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true, horizontalInterval: 14, verticalInterval: 14), + titlesData: FlTitlesData( + bottomTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: true, + getTitlesWidget: (value, title) { + TextStyle styl = const TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 10, + ); + return Text( + timeSeries1![value.toInt()].time.toString(), + style: styl, + ); + }), + ), + leftTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: true, + interval: getMaxY() - getMinY() <= 500 + ? 10 + : getMaxY() - getMinY() <= 1000 + ? 30 + : 40, + getTitlesWidget: (value, title) { + TextStyle styl = const TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 10, + ); + return Text( + timeSeries1![value.toInt()].time.toString(), + style: styl, + ); + } + // getTitles: (value) { + // // if (value.toInt() == 0) + // // return '${value.toInt()}'; + // // else if (value.toInt() % horizontalInterval == 0) + // // return '${value.toInt()}'; + // // else + // return '${value.toInt()}'; + // }, + // margin: 12, + ), + ), + ), + borderData: FlBorderData( + show: true, + border: const Border( + bottom: BorderSide( + color: Colors.black, + width: 0.5, + ), + left: BorderSide( + color: Colors.black, + ), + right: BorderSide( + color: Colors.black, + ), + top: BorderSide( + color: Colors.transparent, + ), + ), + ), + minX: 0, + maxX: (timeSeries1!.length - 1).toDouble(), + maxY: getMaxY() + 0.3, + minY: getMinY(), + lineBarsData: getData(context), + ); + } + + double getMaxY() { + double max = 0; + timeSeries1!.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble > max) max = resultValueDouble; + }); + timeSeries2!.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble > max) max = resultValueDouble; + }); + + return max.roundToDouble(); + } + + double getMinY() { + double min = timeSeries1![0].sales; + timeSeries1!.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble < min) min = resultValueDouble; + }); + timeSeries2!.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble < min) min = resultValueDouble; + }); + + int value = min.toInt(); + + return value.toDouble(); + } + + List getData(context) { + List spots = []; + for (int index = 0; index < timeSeries1!.length; index++) { + spots.add(FlSpot(index.toDouble(), timeSeries1![index].sales)); + } + + List spots2 = []; + for (int index = 0; index < timeSeries2!.length; index++) { + spots2.add(FlSpot(index.toDouble(), timeSeries2![index].sales)); + } + + final LineChartBarData lineChartBarData1 = LineChartBarData( + spots: spots, + isCurved: true, + color: Colors.red, + barWidth: 1.5, + isStrokeCapRound: true, + dotData: FlDotData( + show: false, + ), + belowBarData: BarAreaData( + show: false, + ), + ); + final LineChartBarData lineChartBarData2 = LineChartBarData( + spots: spots2, + isCurved: true, + color: Theme.of(context).primaryColor, + barWidth: 1.5, + isStrokeCapRound: true, + dotData: FlDotData( + show: false, + ), + belowBarData: BarAreaData( + show: false, + ), + ); + + return [lineChartBarData1, lineChartBarData2]; + } +} diff --git a/lib/pages/medical/my_trackers/widget/MonthLineChartCurved.dart b/lib/pages/medical/my_trackers/widget/MonthLineChartCurved.dart new file mode 100644 index 00000000..9a6616f9 --- /dev/null +++ b/lib/pages/medical/my_trackers/widget/MonthLineChartCurved.dart @@ -0,0 +1,224 @@ +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:fl_chart/fl_chart.dart'; +import 'package:flutter/material.dart'; + +import '../../../../Constants.dart'; + +class MonthLineChartCurved extends StatelessWidget { + final String? title; + final List? timeSeries; + final int? indexes; + final double? horizontalInterval; + + MonthLineChartCurved({this.title, this.timeSeries, this.indexes, this.horizontalInterval = 15.0}); + + List xAxixs = []; + List yAxixs = []; + + @override + Widget build(BuildContext context) { + getXaxix(); + getYaxix(); + return AspectRatio( + aspectRatio: 1.1, + child: Container( + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(18)), + // color: Colors.white, + ), + child: Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + const SizedBox( + height: 4, + ), + Text( + title!, + style: TextStyle(color: Colors.black, fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600), + textAlign: TextAlign.center, + ), + SizedBox( + height: 10, + ), + Expanded( + child: Padding( + padding: const EdgeInsets.only(right: 18.0, left: 16.0, top: 15, bottom: 15), + child: LineChart( + sampleData1(context), + duration: const Duration(milliseconds: 250), + ), + ), + ), + const SizedBox( + height: 10, + ), + ], + ), + ], + ), + ), + ); + } + + getXaxix() { + for (int index = 0; index < timeSeries!.length; index++) { + int mIndex = indexes! * index; + if (mIndex < timeSeries!.length) { + xAxixs.add(mIndex); + } + } + } + + getYaxix() { + int indexess = (timeSeries!.length * 0.30).toInt(); + for (int index = 0; index < timeSeries!.length; index++) { + int mIndex = indexess * index; + if (mIndex < timeSeries!.length) { + yAxixs.add(timeSeries![mIndex].sales); + } + } + } + + LineChartData sampleData1(context) { + return LineChartData( + lineTouchData: LineTouchData( + touchTooltipData: LineTouchTooltipData( + tooltipBgColor: Colors.white, + ), + touchCallback: (touchEvent, LineTouchResponse? touchResponse) {}, + handleBuiltInTouches: true, + ), + gridData: FlGridData( + horizontalInterval: 12, + show: true, + drawVerticalLine: true, + drawHorizontalLine: true, + verticalInterval: 12, + ), + titlesData: FlTitlesData( + bottomTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: true, + getTitlesWidget: (value, title) { + TextStyle styl = const TextStyle( + color: Colors.black, + fontSize: 10, + ); + return Text( + '${value.toInt()}', + style: styl, + ); + } + // margin: 22, + ), + ), + leftTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: true, + getTitlesWidget: (value, title) { + TextStyle styl = const TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 10, + ); + return Text( + '', + style: styl, + ); + }, + interval: getMaxY() - getMinY() <= 500 + ? 50 + : getMaxY() - getMinY() <= 1000 + ? 100 + : 200, + + // getTitles: (value) { + // if (value.toInt() == 0) + // return '${value.toInt()}'; + // else if (value.toInt() % horizontalInterval == 0) + // return '${value.toInt()}'; + // else + // return ''; + // }, + // margin: 12, + ), + ), + ), + borderData: FlBorderData( + show: true, + border: const Border( + bottom: BorderSide( + color: Colors.black, + width: 0.5, + ), + left: BorderSide( + color: Colors.black, + ), + right: BorderSide( + color: Colors.black, + ), + top: BorderSide( + color: Colors.transparent, + ), + ), + ), + minX: 0, + maxX: (timeSeries!.length - 1).toDouble(), + maxY: getMaxY() + 0.3, + minY: getMinY(), + lineBarsData: getData(context), + ); + } + + double getMaxY() { + double max = 0; + timeSeries!.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble > max) max = resultValueDouble; + }); + + return max.roundToDouble(); + } + + double getMinY() { + double min = timeSeries![0].sales; + timeSeries!.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble < min) min = resultValueDouble; + }); + int value = min.toInt(); + + return value.toDouble(); + } + + List getData(context) { + List spots = []; + if (timeSeries!.length == 0) { + spots.add(FlSpot(0, 0)); + } + for (int index = 0; index < timeSeries!.length; index++) { + spots.add(FlSpot(index.toDouble(), timeSeries![index].sales)); + } + + final LineChartBarData lineChartBarData1 = LineChartBarData( + spots: spots, + isCurved: true, + color: secondaryColor, + barWidth: 1.5, + isStrokeCapRound: true, + curveSmoothness: 0.0, + dotData: FlDotData( + show: false, + ), + belowBarData: BarAreaData( + show: false, + ), + ); + + return [ + lineChartBarData1, + ]; + } +} diff --git a/lib/pages/medical/my_trackers/widget/TabBarWidget.dart b/lib/pages/medical/my_trackers/widget/TabBarWidget.dart new file mode 100644 index 00000000..779a6b98 --- /dev/null +++ b/lib/pages/medical/my_trackers/widget/TabBarWidget.dart @@ -0,0 +1,73 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class TabBarWidget extends StatelessWidget { + final TabController tabController; + + const TabBarWidget({Key? key, required this.tabController}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Stack( + children: [ + Positioned( + bottom: 1, + left: 0, + right: 0, + child: BackdropFilter( + filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), + child: Container( + color: + Theme.of(context).scaffoldBackgroundColor.withOpacity(0.8), + height: 70.0, + ), + ), + ), + Center( + child: Container( + height: 55.0, + color: Colors.white, + child: Center( + child: TabBar( + isScrollable: true, + controller: tabController, + indicatorWeight: 5.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Theme.of(context).primaryColor, + labelPadding: + EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0), + unselectedLabelColor: Colors.grey[800], + tabs: [ + Container( + width: MediaQuery.of(context).size.width * 0.33, + child: Center( + child: Texts(TranslationBase.of(context).weekly), + ), + ), + Container( + width: MediaQuery.of(context).size.width * 0.33, + child: Center( + child: Texts(TranslationBase.of(context).monthlyT), + ), + ), + Container( + width: MediaQuery.of(context).size.width * 0.34, + child: Center( + child: Texts(TranslationBase.of(context).yearly), + ), + ), + ], + ), + ), + ), + ), + ], + ); + } + @override + Size get preferredSize => Size(double.maxFinite, 60); +} diff --git a/lib/pages/medical/patient_sick_leave_page.dart b/lib/pages/medical/patient_sick_leave_page.dart new file mode 100644 index 00000000..e6802145 --- /dev/null +++ b/lib/pages/medical/patient_sick_leave_page.dart @@ -0,0 +1,195 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/model/sick_leave/admission_status_for_sick_leave.dart'; +import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart'; +import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/patient_sick_leave_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/sickleave_workplace_update_page.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class PatientSickLeavePage extends StatefulWidget { + @override + _PatientSickLeavePageState createState() => _PatientSickLeavePageState(); +} + +class _PatientSickLeavePageState extends State { + List imagesInfo = []; + + @override + void initState() { + imagesInfo.add( + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/ar/0.png')); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getSickLeave(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).sickLeaves, + description: TranslationBase.of(context).infoSickLeaves, + infoList: TranslationBase.of(context).infoSickLeavePoints, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF7F7F7), + imagesInfo: imagesInfo, + baseViewModel: model, + body: model.sickLeaveList.isNotEmpty + ? ListView.separated( + physics: BouncingScrollPhysics(), + itemCount: model.sickLeaveList.length, + padding: EdgeInsets.all(21), + separatorBuilder: (context, index) => SizedBox(height: 14), + itemBuilder: (context, index) => DoctorCard( + isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment, + name: model.sickLeaveList[index].doctorName, + date: model.sickLeaveList[index].appointmentDate, + profileUrl: model.sickLeaveList[index].doctorImageURL, + rating: model.sickLeaveList[index].actualDoctorRate!.toDouble(), + subName: model.sickLeaveList[index].clinicName, + isSortByClinic: false, + isInOutPatient: model.sickLeaveList[index].isInOutPatient, + isSickLeave: true, + sickLeaveStatus: model.sickLeaveList[index].status ?? 0, + onEmailTap: () { + showConfirmMessage(model, index); + }, + ), + ) + : getNoDataWidget(context), + ), + ); + } + + void showConfirmMessage(PatientSickLeaveViewMode model, int index) { + if (model.sickLeaveList[index].status == 1) { + openWorkPlaceUpdatePage(model.sickLeaveList[index].requestNo!, model.sickLeaveList[index]!.setupID!, model, index, model.sickLeaveList[index]!.projectID!); + } else if (model.sickLeaveList[index].status == 2) { + // showEmailDialog(model, index); + model.sendSickLeaveEmail( + message: TranslationBase.of(context).emailSentSuccessfully, + requestNo: model.sickLeaveList[index].requestNo!, + doctorName: model.sickLeaveList[index].doctorName!, + projectName: model.sickLeaveList[index].projectName!, + setupID: model.sickLeaveList[index].setupID!, + projectID: model.sickLeaveList[index].projectID!, + isDownload: true); + } else { + showApprovalDialog(); + } + } + + void showApprovalDialog() { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).needApproval, + okText: TranslationBase.of(context).ok, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () { + Navigator.of(context).pop(); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + + void showEmailDialog(PatientSickLeaveViewMode model, int index) { + showDialog( + context: context, + builder: (cxt) => ConfirmSendEmailDialog( + email: model.user!.emailAddress!, + onTapSendEmail: () { + model.sendSickLeaveEmail( + message: TranslationBase.of(context).emailSentSuccessfully, + requestNo: model.sickLeaveList[index].requestNo!, + doctorName: model.sickLeaveList[index].doctorName!, + projectName: model.sickLeaveList[index].projectName!, + setupID: model.sickLeaveList[index].setupID!, + projectID: model.sickLeaveList[index].projectID!, + isDownload: true); + model.getSickLeave(); + }, + ), + ); + } + + Future openWorkPlaceUpdatePage(int requestNumber, String setupID, PatientSickLeaveViewMode model, int index, int projectID) async { + if (model.sickLeaveList[index].admissionNo != 0 && model.sickLeaveList[index].admissionNo != null) { + getSickLeaveStatusByAdmissionNo(requestNumber, setupID, model, index, projectID); + } else { + openWorkPlaceUpdatePageFunc(requestNumber, setupID, model, index, projectID); + } + } + + void getSickLeaveStatusByAdmissionNo(int requestNumber, String setupID, PatientSickLeaveViewMode model, int index, int projectID) { + AdmissionStatusForSickLeave admissionStatusForSickLeave; + + LabsService service = new LabsService(); + GifLoaderDialogUtils.showMyDialog(context); + + service.getSickLeaveStatusByAdmissionNo(model.sickLeaveList[index]!.projectID!, model.sickLeaveList[index].admissionNo!).then((res) { + print(res); + GifLoaderDialogUtils.hideDialog(context); + if (res != null && res["List_GetSickLeaveStatusByAdmissionNo"] != null) { + if (res["List_GetSickLeaveStatusByAdmissionNo"].length != 0) { + admissionStatusForSickLeave = AdmissionStatusForSickLeave.fromJson(res["List_GetSickLeaveStatusByAdmissionNo"][0]); + if (admissionStatusForSickLeave.status != 6) { + AppToast.showErrorToast(message: TranslationBase.of(context).sickLeaveAdmittedPatient); + } else { + openWorkPlaceUpdatePageFunc(requestNumber, setupID, model, index, projectID); + } + } else { + openWorkPlaceUpdatePageFunc(requestNumber, setupID, model, index, projectID); + } + } else { + openWorkPlaceUpdatePageFunc(requestNumber, setupID, model, index, projectID); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + void openWorkPlaceUpdatePageFunc(int requestNumber, String setupID, PatientSickLeaveViewMode model, int index, int projectID) { + Navigator.push( + context, + FadePage( + page: WorkplaceUpdatePage( + requestNumber: requestNumber, + setupID: setupID, + projectID: projectID, + ), + ), + ).then( + (value) { + print(value); + if (value != null && value == true) { + model.getSickLeave(); + // showEmailDialog(model, index); + model.sendSickLeaveEmail( + message: TranslationBase.of(context).emailSentSuccessfully, + requestNo: model.sickLeaveList[index].requestNo!, + doctorName: model.sickLeaveList[index].doctorName!, + projectName: model.sickLeaveList[index].projectName!, + setupID: model.sickLeaveList[index].setupID!, + projectID: model.sickLeaveList[index].projectID!, + isDownload: true); + } + }, + ); + } +} diff --git a/lib/pages/medical/prescriptions/PrescriptionIDeliveryAddressPage.dart b/lib/pages/medical/prescriptions/PrescriptionIDeliveryAddressPage.dart new file mode 100644 index 00000000..ebc2bd4a --- /dev/null +++ b/lib/pages/medical/prescriptions/PrescriptionIDeliveryAddressPage.dart @@ -0,0 +1,370 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/PrescriptionDeliveryViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:geolocator/geolocator.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:provider/provider.dart'; + +import 'PrescriptionOrderOverveiw.dart'; + +class PrescriptionDeliveryAddressPage extends StatefulWidget { + final Prescriptions prescriptions; + final List? prescriptionReportList; + final List? prescriptionReportEnhList; + + const PrescriptionDeliveryAddressPage({Key? key, required this.prescriptions, this.prescriptionReportList, this.prescriptionReportEnhList}) : super(key: key); + + @override + _PrescriptionDeliveryAddressPageState createState() => _PrescriptionDeliveryAddressPageState(); +} + +class _PrescriptionDeliveryAddressPageState extends State { + late AddressInfo _selectedAddress = AddressInfo(); + int _selectedAddressIndex = -1; + Completer _controller = Completer(); + late ProjectViewModel projectViewModel; + late LocationUtils locationUtils; + + CameraPosition _kGooglePlex = CameraPosition( + target: LatLng(24.665011045779107, 46.73502189439707), + zoom: 14.4746, + ); + Set markers = new Set(); + double latitude = 0; + double longitude = 0; + + @override + void initState() { + super.initState(); + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) => locationUtils.getCurrentLocation()); + } + + // _getCurrentLocation() async { + // if (await PermissionService.isLocationEnabled()) { + // await Geolocator.getLastKnownPosition().then((value) { + // latitude = value.latitude; + // longitude = value.longitude; + // _kGooglePlex = CameraPosition( + // target: LatLng(latitude, longitude), + // zoom: 14.4746, + // ); + // }).catchError((e) { + // latitude = 24.665011045779107; + // longitude = 46.73502189439707; + // }); + // } else { + // if (Platform.isAndroid) { + // Utils.showPermissionConsentDialog(AppGlobal.context, TranslationBase.of(AppGlobal.context).locationPermissionDialog, () { + // Geolocator.getLastKnownPosition().then((value) { + // latitude = value.latitude; + // latitude = value.longitude; + // _kGooglePlex = CameraPosition( + // target: LatLng(latitude, longitude), + // zoom: 14.4746, + // ); + // }).catchError((e) { + // latitude = 24.665011045779107; + // latitude = 46.73502189439707; + // }); + // }); + // } else { + // await Geolocator.getLastKnownPosition().then((value) { + // latitude = value.latitude; + // latitude = value.longitude; + // _kGooglePlex = CameraPosition( + // target: LatLng(latitude, longitude), + // zoom: 14.4746, + // ); + // }).catchError((e) { + // latitude = 24.665011045779107; + // latitude = 46.73502189439707; + // }); + // } + // } + // } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getCustomerInfo(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).shippingAddresss, + baseViewModel: model, + showNewAppBarTitle: true, + showNewAppBar: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Container( + child: Column( + children: [ + Expanded( + child: SingleChildScrollView( + padding: EdgeInsets.all(21), + physics: BouncingScrollPhysics(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + CommonDropDownView(TranslationBase.of(context).selectAddress, getAddressName(), () { + List list = [ + for (int i = 0; i < model.addressesList.length; i++) RadioSelectionDialogModel(model.addressesList[i].address1!, i), + ]; + + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + isScrollable: true, + selectedIndex: _selectedAddressIndex, + onValueSelected: (index) { + _selectedAddressIndex = index; + _selectedAddress = model.addressesList[index]; + List latLongArr = _selectedAddress!.latLong!.split(','); + + latitude = double.parse(latLongArr[0]); + longitude = double.parse(latLongArr[1]); + markers = Set(); + markers.add( + Marker( + markerId: MarkerId( + _selectedAddress!.latLong.hashCode.toString(), + ), + position: LatLng(latitude, longitude), + ), + ); + _kGooglePlex = CameraPosition( + target: LatLng(latitude, longitude), + zoom: 14.4746, + ); + setState(() {}); + }, + ), + ); + }).withBorderedContainer, + SizedBox(height: 12), + InkWell( + onTap: () async { + Navigator.push( + context, + FadePage( + page: LocationPage( + // latitude: latitude, + // longitude: longitude, + ), + ), + ).then((value) { + if (value != null && value is AddNewAddressRequestModel) { + setState(() { + _selectedAddress = AddressInfo( + id: value.customer!.id.toString(), + email: value.customer!.email, + firstName: value.customer!.addresses![0].firstName, + lastName: value.customer!.addresses![0].lastName, + address1: value.customer!.addresses![0].address1, + address2: value.customer!.addresses![0].address2, + city: value.customer!.addresses![0].city, + country: value.customer!.addresses![0].country, + phoneNumber: value.customer!.addresses![0].phoneNumber, + latLong: value.customer!.addresses![0].latLong, + company: value.customer!.addresses![0].company, + countryId: value.customer!.addresses![0].countryId, + createdOnUtc: value.customer!.addresses![0].createdOnUtc, + customerAttributes: value.customer!.addresses![0].customerAttributes, + faxNumber: value.customer!.addresses![0].faxNumber, + province: value.customer!.addresses![0].province, + stateProvinceId: value.customer!.addresses![0].stateProvinceId, + zipPostalCode: value.customer!.addresses![0].zipPostalCode, + ); + List latLongArr = _selectedAddress!.latLong!.split(','); + + latitude = double.parse(latLongArr[0]); + longitude = double.parse(latLongArr[1]); + markers = Set(); + markers.add( + Marker( + markerId: MarkerId( + _selectedAddress!.latLong.hashCode.toString(), + ), + position: LatLng(latitude, longitude), + ), + ); + _kGooglePlex = CameraPosition( + target: LatLng(latitude, longitude), + zoom: 14.4746, + ); + }); + } + }); + }, + child: Row( + children: [ + Icon(Icons.add_circle_outline_sharp), + mWidth(12), + Text( + TranslationBase.of(context).addNewAddress, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + letterSpacing: -0.46, + ), + ), + ], + ), + ), + SizedBox(height: 12), + if (_selectedAddress != null) + Container( + decoration: cardRadius(15), + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).selectAddress + ":", + style: TextStyle(fontSize: 14, color: Color(0xff575757), fontWeight: FontWeight.w600, letterSpacing: -0.56), + ), + mHeight(12), + Container( + height: 175, + decoration: containerColorRadiusBorder(Colors.white, 12, Color(0xffDDDDDD)), + clipBehavior: Clip.antiAlias, + child: Container( + decoration: cardRadius(10), + clipBehavior: Clip.antiAlias, + margin: const EdgeInsets.all(0), + child: Image.network( + "https://maps.googleapis.com/maps/api/staticmap?center=" + + _kGooglePlex.target.latitude.toString() + + "," + + _kGooglePlex.target.longitude.toString() + + "&zoom=16&size=600x300&maptype=roadmap&markers=color:red%7C" + + _kGooglePlex.target.latitude.toString() + + "," + + _kGooglePlex.target.longitude.toString() + + "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8", + width: double.infinity, + height: double.infinity, + fit: BoxFit.cover, + ), + ), + ), + SizedBox(height: 18), + Text( + TranslationBase.of(context).shippingAddresss + ":", + style: TextStyle(fontSize: 14, color: Color(0xff575757), fontWeight: FontWeight.w600, letterSpacing: -0.56), + ), + SizedBox(height: 2), + Text( + '${model.user!.firstName} ${model.user!.lastName}', + style: TextStyle(fontSize: 12, color: Color(0xff2B353E), fontWeight: FontWeight.w600, letterSpacing: -0.48), + ), + Text( + _selectedAddress!.address1 ??"", + style: TextStyle(fontSize: 12, color: Color(0xff2B353E), fontWeight: FontWeight.w600, letterSpacing: -0.48), + ), + Text( + _selectedAddress!.address2 ??"", + style: TextStyle(fontSize: 12, color: Color(0xff2B353E), fontWeight: FontWeight.w600, letterSpacing: -0.48), + ), + Text( + (_selectedAddress!.city) ??"" + " " + (_selectedAddress!.country ?? ""), + style: TextStyle(fontSize: 12, color: Color(0xff2B353E), fontWeight: FontWeight.w600, letterSpacing: -0.48), + ), + ], + ), + ) + ], + ), + ), + ), + DefaultButton( + TranslationBase.of(context).continues.toUpperCase(), + _selectedAddress == null + ? null + : () { + Navigator.push( + context, + FadePage( + page: PrescriptionOrderOverview( + latitude: latitude, + longitude: longitude, + prescriptionReportEnhList: widget.prescriptionReportEnhList!, + prescriptionReportList: widget.prescriptionReportList!, + prescriptions: widget.prescriptions, + selectedAddress: _selectedAddress, + ), + ), + ); + }, + disabledColor: CustomColors.grey2, + ).insideContainer, + ], + ), + ), + ), + ); + } + + void confirmSelectLocationDialog( + List addresses, + ) { + showDialog( + context: context, + builder: (cxt) => SelectLocationDialog( + addresses: addresses, + selectedAddress: _selectedAddress, + onValueSelected: (value) { + setState(() { + _selectedAddress = value; + List latLongArr = value.latLong!.split(','); + + latitude = double.parse(latLongArr[0]); + longitude = double.parse(latLongArr[1]); + markers = Set(); + markers.add( + Marker( + markerId: MarkerId( + _selectedAddress!.latLong.hashCode.toString(), + ), + position: LatLng(latitude, longitude), + ), + ); + _kGooglePlex = CameraPosition( + target: LatLng(latitude, longitude), + zoom: 14.4746, + ); + }); + }, + ), + ); + } + + String getAddressName() { + return _selectedAddress!=null && _selectedAddress!.address1 !=null? _selectedAddress!.address1! : ""; + } +} diff --git a/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart b/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart new file mode 100644 index 00000000..f8b0b876 --- /dev/null +++ b/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart @@ -0,0 +1,240 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/PrescriptionDeliveryViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/show_zoom_image_dialog.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class PrescriptionOrderOverview extends StatelessWidget { + final Prescriptions prescriptions; + final List? prescriptionReportList; + final List? prescriptionReportEnhList; + final AddressInfo? selectedAddress; + final double? latitude; + final double? longitude; + + PrescriptionOrderOverview({Key? key, required this.prescriptions, this.prescriptionReportList, this.prescriptionReportEnhList, this.selectedAddress, this.latitude, this.longitude}); + + @override + Widget build(BuildContext context) { + return BaseView( + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).orderOverview, + baseViewModel: model, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Container( + height: double.infinity, + child: Column( + children: [ + Expanded( + child: Column( + children: [ + if (!prescriptions.isInOutPatient!) + Container( + margin: EdgeInsets.all(12), + decoration: cardRadius(12), + clipBehavior: Clip.antiAlias, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + children: [ + ...List.generate( + prescriptionReportList!.length, + (index) => Container( + margin: EdgeInsets.all(0.0), + decoration: cardRadius(0), + child: Row( + children: [ + ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(5)), + child: Image.network( + prescriptionReportList![index].imageSRCUrl!, + fit: BoxFit.cover, + width: 60, + height: 70, + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Text( + prescriptionReportList![index].itemDescription!.isNotEmpty + ? prescriptionReportList![index].itemDescription! + : prescriptionReportList![index].itemDescriptionN!, + style: TextStyle(fontFamily: prescriptionReportList![index].itemDescription!.isNotEmpty ? 'Poppins' : 'Cairo'))), + )), + ], + ), + )) + ], + ), + ), + ) + else + Container( + margin: EdgeInsets.all(12), + decoration: cardRadius(12), + clipBehavior: Clip.antiAlias, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ...List.generate( + prescriptionReportEnhList!.length, + (index) => Container( + margin: EdgeInsets.all(0.0), + // decoration: cardRadius(0), + child: Row( + children: [ + // InkWell( + // onTap: () { + // showZoomImageDialog(context, prescriptionReportEnhList[index].imageSRCUrl); + // }, + // child: Stack( + // alignment: Alignment.center, + // children: [ + // Container( + // margin: EdgeInsets.only(bottom: 10.0), + // decoration: BoxDecoration( + // border: Border.all(width: 1.0, color: Color(0xffEBEBEB)), + // borderRadius: BorderRadius.all(Radius.circular(30.0)), + // ), + // child: ClipRRect( + // borderRadius: BorderRadius.all(Radius.circular(30)), + // child: Image.network( + // prescriptionReportEnhList[index].imageSRCUrl, + // fit: BoxFit.cover, + // width: 48, + // height: 48, + // ), + // ), + // ), + // Container( + // margin: EdgeInsets.only(bottom: 10.0), + // child: Icon( + // Icons.search, + // size: 18, + // color: Colors.white, + // ), + // padding: EdgeInsets.all(3), + // decoration: containerRadius(Colors.black.withOpacity(0.3), 200), + // ) + // ], + // ), + // ), + // SizedBox(width: 14), + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + (prescriptionReportList![index].itemDescription!.isNotEmpty + ? prescriptionReportList![index].itemDescription! + : prescriptionReportList![index].itemDescriptionN! ?? ''), + style: TextStyle( + fontFamily: prescriptionReportList![index].itemDescription!.isNotEmpty ? 'Poppins' : 'Cairo', + letterSpacing: -0.64, + color: Color(0xff2E303A), + fontSize: 16.0, + fontWeight: FontWeight.w600)), + ], + ), + ), + ), + ], + ), + ), + ) + ], + ), + ), + ), + ], + ), + ), + Container( + // decoration: cardRadius(0), + margin: EdgeInsets.zero, + child: Container( + width: double.infinity, + margin: EdgeInsets.all(12), + child: DefaultButton( + TranslationBase.of(context).submit.toUpperCase(), + () async { + showDialog( + context: context, + builder: (cxt) => ConfirmWithMessageDialog( + message: TranslationBase.of(context).confirmPrescription, + okTitle: TranslationBase.of(context).ok, + onTap: () async { + GifLoaderDialogUtils.showMyDialog(context); + await model + .insertDeliveryOrder( + lineItemNo: 1, + longitude: longitude, + latitude: latitude, + appointmentNo: prescriptions.appointmentNo, + dischargeID: prescriptions.dischargeNo, + projectID: prescriptions.projectID, + createdBy: model.user!.patientID) + .then((value) { + GifLoaderDialogUtils.hideDialog(context); + if (model.state == ViewState.ErrorLocal) + showErrorDialog(context, model.error); + else { + Navigator.pop(context); + Navigator.pop(context); + Navigator.pop(context, true); + } + }).catchError((e) { + GifLoaderDialogUtils.hideDialog(context); + }); + }, + ), + ); + }, + )), + ) + ], + ), + ), + ), + ); + } + + void showErrorDialog(BuildContext context, String error) { + showDialog( + context: context, + builder: (cxt) => ConfirmWithMessageDialog( + message: TranslationBase.of(context).youAlreadyHaveOrder, + okTitle: TranslationBase.of(context).orderOverview, + onTap: () { + Navigator.pop(context); + Navigator.pop(context); + Navigator.pop(context, true); + }, + ), + ); + } +} diff --git a/lib/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart b/lib/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart new file mode 100644 index 00000000..88b99b45 --- /dev/null +++ b/lib/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart @@ -0,0 +1,102 @@ +import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/hospital_location.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class PharmacyForPrescriptionsPage extends StatelessWidget { + final itemID; + final PrescriptionReport? prescriptionReport; + + PharmacyForPrescriptionsPage({Key? key, this.itemID, this.prescriptionReport}); + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getListPharmacyForPrescriptions(itemId: itemID), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).availability, + baseViewModel: model, + body: Column( + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(21, 21, 21, 10), + child: Container( + width: double.infinity, + padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12), + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Row( + children: [ + ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(5)), + child: Image.network( + prescriptionReport?.imageSRCUrl ?? "", + fit: BoxFit.cover, + width: 60, + height: 70, + ), + ), + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts((prescriptionReport?.itemDescription ?? "").isNotEmpty ? prescriptionReport?.itemDescription ?? "" : prescriptionReport?.itemDescriptionN ?? ''), + ), + ), + ) + ], + ), + ), + ), + model.pharmacyPrescriptionsList.isNotEmpty == true + ? Expanded( + child: ListView.builder( + scrollDirection: Axis.vertical, + padding: EdgeInsets.fromLTRB(21, 11, 21, 21), + physics: BouncingScrollPhysics(), + itemBuilder: (context, index) { + GetHMGLocationsModel location = GetHMGLocationsModel(); + location.locationName = model.pharmacyPrescriptionsList[index].locationDescription; + location.cityName = model.pharmacyPrescriptionsList[index].cityName; + location.phoneNumber = model.pharmacyPrescriptionsList[index].phoneNumber; + location.latitude = model.pharmacyPrescriptionsList[index].latitude; + location.longitude = model.pharmacyPrescriptionsList[index].longitude; + location.distanceInKilometers = model.pharmacyPrescriptionsList[index].distanceInKilometers; + return HospitalLocation(location, showCity: true); + }, + itemCount: model.pharmacyPrescriptionsList.length, + ), + ) + : Padding( + padding: const EdgeInsets.only(top: 65.0), + child: Texts( + TranslationBase.of(context).thisItemIsNotAvailable, + textAlign: TextAlign.center, + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/medical/prescriptions/prescription_details_inp.dart b/lib/pages/medical/prescriptions/prescription_details_inp.dart new file mode 100644 index 00000000..b446fed2 --- /dev/null +++ b/lib/pages/medical/prescriptions/prescription_details_inp.dart @@ -0,0 +1,275 @@ +import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_inp.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; +import 'package:diplomaticquarterapp/models/header_model.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart'; +import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/show_zoom_image_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:jiffy/jiffy.dart'; +import 'package:provider/provider.dart'; + +class PrescriptionDetailsPageINP extends StatelessWidget { + final PrescriptionReportINP? prescriptionReport; + final Prescriptions prescriptions; + + PrescriptionDetailsPageINP({Key? key, this.prescriptionReport, required this.prescriptions}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).prescriptions, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + DoctorHeader( + headerModel: HeaderModel( + prescriptions.doctorName!, + prescriptions.doctorID!, + prescriptions.doctorImageURL!, + prescriptions.speciality ?? [""], + "", + prescriptions.name!, + DateUtil.convertStringToDate(prescriptions.appointmentDate!), + DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptions.appointmentDate!)), + prescriptions.nationalityFlagURL ?? "", + prescriptions.doctorRate, + prescriptions.actualDoctorRate, + prescriptions.noOfPatientsRate, + "", + ), + isNeedToShowButton: false, + ), + Expanded( + child: ListView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + children: [ + Container( + padding: EdgeInsets.all(14), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(10.0)), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Row( + children: [ + InkWell( + child: Stack( + alignment: Alignment.center, + children: [ + Container( + child: Image.network( + prescriptionReport!.imageSRCUrl!, + fit: BoxFit.cover, + width: 48, + height: 49, + ), + margin: EdgeInsets.zero, + clipBehavior: Clip.antiAlias, + decoration: cardRadius(2000), + ), + Container( + child: Icon( + Icons.search, + size: 18, + color: Colors.white, + ), + padding: EdgeInsets.all(6), + decoration: containerRadius(Colors.black.withOpacity(0.3), 200), + ) + ], + ), + onTap: () { + showZoomImageDialog(context, prescriptionReport!.imageSRCUrl!); + }, + ), + SizedBox(width: 12), + Expanded( + child: Text( + (prescriptionReport!.itemDescription!.isNotEmpty ? prescriptionReport!.itemDescription : prescriptionReport!.itemDescriptionN ?? '')!.toLowerCase().capitalizeFirstofEach, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), + ), + ) + ], + ), + SizedBox(height: 12), + Table(border: TableBorder(horizontalInside: BorderSide(width: 1, color: Colors.black, style: BorderStyle.solid)), children: [ + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).route, showDivider: false), + Utils.tableColumnTitle(TranslationBase.of(context).frequency, showDivider: false), + Utils.tableColumnTitle(TranslationBase.of(context).dailyDoses, showDivider: false), + Utils.tableColumnTitle(TranslationBase.of(context).duration, showDivider: false) + ], + ), + TableRow( + children: [ + Utils.tableColumnValue(prescriptionReport?.routeN ?? '', isLast: true, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(prescriptionReport?.frequencyN ?? '', isLast: true, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(prescriptionReport?.doseDailyQuantity.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(prescriptionReport?.days.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel), + ], + ), + ]), + Text( + TranslationBase.of(context).remarks, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48), + ), + Text( + prescriptionReport!.remarks!, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + ], + ), + ), + ], + ), + ), + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).availability, + () { + Navigator.push( + context, + FadePage( + page: PharmacyForPrescriptionsPage( + itemID: prescriptionReport!.itemID, + prescriptionReport: PrescriptionReport.fromJson(prescriptionReport!.toJson()), + ), + ), + ); + }, + iconData: Icons.location_on, + color: Color(0xff359846), + ), + ), + SizedBox(width: 10), + Expanded( + child: DefaultButton( + TranslationBase.of(context).addReminder, + () { + DateTime startDate = DateTime.now(); + DateTime endDate = DateTime(startDate.year, startDate.month, startDate.day + prescriptionReport!.days!); + + showReminderDialog( + context, + endDate, + "", + prescriptionReport!.itemID.toString(), + "", + "", + title: "${prescriptionReport!.itemDescriptionN} Prescription Reminder", + description: "${prescriptionReport!.itemDescriptionN} ${prescriptionReport!.frequencyN} ${prescriptionReport!.routeN} ", + onSuccess: () { + AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); + }, + onMultiDateSuccess: (int selectedIndex) { + setCalender(context, prescriptionReport!.itemID.toString(), selectedIndex); + }, + ); + return; + }, + iconData: Icons.notifications_active, + color: Color(0xffD02127), + fontSize: 13.0, + //textColor: Color(0xff2B353E), + ), + ), + ], + ), + ), + ], + ), + ); + } + + setCalender(BuildContext context, String eventId, int reminderIndex) async { + CalendarUtils calendarUtils = await CalendarUtils.getInstance(); + int frequencyNumber = int.parse(prescriptionReport!.frequency!); + + DateTime actualDate = DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day, 8, 0); //Time will start at 8:00 AM from starting date + if (frequencyNumber == null) frequencyNumber = 1; //Some time frequency number is null so by default will be 2 + + int remainingDays = + prescriptionReport!.days! - (Jiffy.parseFromDateTime(DateTime.now()).diff(Jiffy.parseFromDateTime(DateUtil.convertStringToDate(prescriptionReport!.orderDate!)), unit: Unit.day).toInt()); + + GifLoaderDialogUtils.showMyDialog(context); + + for (int i = 0; i < remainingDays; i++) { + //event for number of days. + for (int j = 0; j < frequencyNumber; j++) { + // event for number of times per day. + if (j != 0) { + actualDate.add(new Duration(hours: 8)); // 8 hours addition for daily dose. + } + //Time subtraction from actual reminder time. like before 30, or 1 hour. + if (reminderIndex == 0) { + // Before 30 mints + actualDate = Jiffy.parseFromDateTime(actualDate).subtract(minutes: 30).dateTime; + // dateTime.add(new Duration(minutes: -30)); + } else if (reminderIndex == 1) { + // Before 1 hour + // dateTime.add(new Duration(minutes: -60)); + actualDate = Jiffy.parseFromDateTime(actualDate).subtract(hours: 1).dateTime; + } else if (reminderIndex == 2) { + // Before 1 hour and 30 mints + // dateTime.add(new Duration(minutes: -90)); + actualDate = Jiffy.parseFromDateTime(actualDate).subtract(hours: 1, minutes: 30).dateTime; + } else if (reminderIndex == 3) { + // Before 2 hours + // dateTime.add(new Duration(minutes: -120)); + actualDate = Jiffy.parseFromDateTime(actualDate).subtract(hours: 2).dateTime; + } + calendarUtils + .createOrUpdateEvent( + title: "${prescriptionReport!.itemDescriptionN} Prescription Reminder", + description: "${prescriptionReport!.itemDescriptionN} ${prescriptionReport!.frequencyN} ${prescriptionReport!.routeN} ", + scheduleDateTime: actualDate, + eventId: eventId + (i.toString() + j.toString()), //event id with varitions + ) + .then((value) {}); + actualDate = DateTime(actualDate.year, actualDate.month, actualDate.day, 8, 0); + } + actualDate = Jiffy.parseFromDateTime(actualDate).add(days: 1).dateTime; + print(actualDate); + } + AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); + GifLoaderDialogUtils.hideDialog(context); + } +} diff --git a/lib/pages/medical/prescriptions/prescription_details_page.dart b/lib/pages/medical/prescriptions/prescription_details_page.dart new file mode 100644 index 00000000..4ee85086 --- /dev/null +++ b/lib/pages/medical/prescriptions/prescription_details_page.dart @@ -0,0 +1,458 @@ +import 'dart:collection'; +import 'dart:io'; + +import 'package:device_calendar/device_calendar.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; +import 'package:diplomaticquarterapp/models/header_model.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart'; +import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/show_zoom_image_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:jiffy/jiffy.dart'; +import 'package:manage_calendar_events/manage_calendar_events.dart' as ios; +import 'package:provider/provider.dart'; + +class PrescriptionDetailsPage extends StatefulWidget { + final PrescriptionReport? prescriptionReport; + final Prescriptions? prescriptions; + + PrescriptionDetailsPage({Key? key, this.prescriptionReport, this.prescriptions}); + + @override + _PrescriptionDetailsPageState createState() => _PrescriptionDetailsPageState(); +} + +class _PrescriptionDetailsPageState extends State { + bool hasReminder = false; + late LocationUtils locationUtils; + + @override + void initState() { + checkAndRemove(delete: false); + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + WidgetsBinding.instance.addPostFrameCallback((_) => locationUtils.getCurrentLocation()); + super.initState(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).prescriptions, + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + DoctorHeader( + headerModel: HeaderModel( + widget.prescriptions!.doctorName!, + widget.prescriptions!.doctorID!, + widget.prescriptions!.doctorImageURL!, + widget.prescriptions!.speciality ?? [""], + "", + widget.prescriptions!.name!, + DateUtil.convertStringToDate(widget.prescriptions!.appointmentDate!), + DateUtil.formatDateToTime(DateUtil.convertStringToDate(widget.prescriptions!.appointmentDate!)), + widget.prescriptions!.nationalityFlagURL!, + widget.prescriptions!.doctorRate, + widget.prescriptions!.actualDoctorRate, + widget.prescriptions!.noOfPatientsRate, + "", + ), + isNeedToShowButton: false, + ), + Expanded( + child: ListView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + children: [ + Container( + padding: EdgeInsets.all(14), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(10.0)), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Row( + children: [ + // InkWell( + // child: Stack( + // alignment: Alignment.center, + // children: [ + // Container( + // child: Image.network( + // widget.prescriptionReport.imageSRCUrl, + // fit: BoxFit.cover, + // width: 48, + // height: 49, + // ), + // margin: EdgeInsets.zero, + // clipBehavior: Clip.antiAlias, + // decoration: cardRadius(2000), + // ), + // Container( + // child: Icon( + // Icons.search, + // size: 18, + // color: Colors.white, + // ), + // padding: EdgeInsets.all(6), + // decoration: containerRadius(Colors.black.withOpacity(0.3), 200), + // ) + // ], + // ), + // onTap: () { + // showZoomImageDialog(context, widget.prescriptionReport.imageSRCUrl); + // }, + // ), + // SizedBox(width: 12), + Expanded( + child: Text( + (widget.prescriptionReport!.itemDescription!.isNotEmpty ? widget.prescriptionReport!.itemDescription : widget.prescriptionReport!.itemDescriptionN ?? '')! + .toLowerCase() + .capitalizeFirstofEach, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), + ), + ) + ], + ), + SizedBox(height: 12), + Table(border: TableBorder(horizontalInside: BorderSide(width: 1, color: Colors.black, style: BorderStyle.solid)), children: [ + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).route, showDivider: false), + Utils.tableColumnTitle(TranslationBase.of(context).frequency, showDivider: false), + Utils.tableColumnTitle(TranslationBase.of(context).dailyDoses, showDivider: false), + Utils.tableColumnTitle(TranslationBase.of(context).duration, showDivider: false) + ], + ), + TableRow( + children: [ + Utils.tableColumnValue(widget.prescriptionReport?.routeN ?? '', isLast: true, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(widget.prescriptionReport?.frequencyN ?? '', isLast: true, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(widget.prescriptionReport?.doseDailyQuantity.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(widget.prescriptionReport?.days.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel), + ], + ), + ]), + Text( + TranslationBase.of(context).remarks, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48), + ), + Text( + widget.prescriptionReport!.remarks!, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + ], + ), + ), + ], + ), + ), + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).availability, + () { + Navigator.push( + context, + FadePage( + page: PharmacyForPrescriptionsPage( + itemID: widget.prescriptionReport!.itemID, + prescriptionReport: widget.prescriptionReport, + ), + ), + ); + }, + iconData: Icons.location_on, + color: Color(0xff359846), + ), + ), + SizedBox(width: 10), + Expanded( + child: DefaultButton( + hasReminder ? TranslationBase.of(context).cancelReminder : TranslationBase.of(context).addReminder, + () { + if (hasReminder) { + checkAndRemove(delete: true); + } else { + DateTime startDate = DateTime.now(); + DateTime endDate = DateTime(startDate.year, startDate.month, startDate.day + widget.prescriptionReport!.days!); + showReminderDialog( + context, + endDate, + "", + widget.prescriptionReport!.itemID.toString(), + "", + "", + title: "${widget.prescriptionReport!.itemDescriptionN} Prescription Reminder", + description: "${widget.prescriptionReport!.itemDescriptionN} ${widget.prescriptionReport!.frequencyN} ${widget.prescriptionReport!.routeN} ", + onSuccess: () { + AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); + }, + isMultiAllowed: true, + onMultiDateSuccess: (int selectedIndex) { + setCalender(context, widget.prescriptionReport!.itemID.toString(), selectedIndex); + }, + ); + return; + } + }, + iconData: Icons.notifications_active, + color: Color(0xffD02127), + fontSize: 13.0, + //textColor: Color(0xff2B353E), + ), + ), + ], + ), + ), + ], + ), + ); + } + + // checkAndRemove({bool delete = false}) async { + // final ios.CalendarPlugin _myPlugin = ios.CalendarPlugin(); + // CalendarUtils calendarUtils = await CalendarUtils.getInstance(); + // DateTime startEventsDate = Jiffy.parseFromDateTime(DateTime.now()).subtract(days: 30).dateTime; + // DateTime endEventsDate = Jiffy.parseFromDateTime(DateTime.now()).add(days: 120).dateTime; + // RetrieveEventsParams params = new RetrieveEventsParams(startDate: startEventsDate, endDate: endEventsDate); + // + // if (calendarUtils.calendars != null) { + // print(calendarUtils.calendars); + // if (Platform.isAndroid) { + // Future.forEach( + // calendarUtils.calendars, + // (Calendar calender) => { + // calendarUtils.retrieveEvents(calender.id!, params).then((value) { + // Result> events = value; + // events.data!.forEach((element) { + // if (delete) { + // if (element.title!.contains(widget.prescriptionReport!.itemDescriptionN!)) calendarUtils.deleteEvent(calender, element); + // AppToast.showSuccessToast(message: TranslationBase.of(context).reminderCancelSuccess); + // setState(() { + // hasReminder = false; + // }); + // } else { + // if (element.title!.contains(widget.prescriptionReport!.itemDescriptionN!)) + // setState(() { + // hasReminder = true; + // }); + // } + // }); + // }), + // }); + // } else { + // List? iosCall = await _myPlugin.getCalendars(); + // Future.forEach( + // iosCall!, + // (ios.Calendar cal) async => { + // print(cal), + // calendarUtils.retrieveEvents(cal.id!, params).then((value) { + // Result> events = value; + // events.data!.forEach((element) { + // if (delete) { + // if (element.title!.contains(widget.prescriptionReport!.itemDescriptionN!)) calendarUtils.deleteEvent(Calendar(id: cal.id, name: cal.name, accountName: cal.accountName), element); + // AppToast.showSuccessToast(message: TranslationBase.of(context).reminderCancelSuccess); + // setState(() { + // hasReminder = false; + // }); + // } else { + // if (element.title!.contains(widget.prescriptionReport!.itemDescriptionN!)) + // setState(() { + // hasReminder = true; + // }); + // } + // }); + // }), + // }, + // ); + // } + // } + // } + + Future checkAndRemove({bool delete = false}) async { + final ios.CalendarPlugin _myPlugin = ios.CalendarPlugin(); + CalendarUtils calendarUtils = await CalendarUtils.getInstance(); + DateTime startEventsDate = Jiffy.parseFromDateTime(DateTime.now()).subtract(days: 30).dateTime; + DateTime endEventsDate = Jiffy.parseFromDateTime(DateTime.now()).add(days: 120).dateTime; + RetrieveEventsParams params = RetrieveEventsParams(startDate: startEventsDate, endDate: endEventsDate); + + if (calendarUtils.calendars != null) { + if (Platform.isAndroid) { + await processEvents(calendarUtils.calendars, calendarUtils, params, delete); + } else { + List? iosCalendars = await _myPlugin.getCalendars(); + if (iosCalendars != null) { + await processEvents(iosCalendars.map((cal) => Calendar(id: cal.id, name: cal.name, accountName: cal.accountName)).toList(), calendarUtils, params, delete); + } + } + } + } + + Future processEvents(List calendars, calendarUtils, params, delete) async { + for (var calendar in calendars) { + Result> events = await calendarUtils.retrieveEvents(calendar.id!, params); + for (var event in events.data!) { + if (event.title!.contains(widget.prescriptionReport!.itemDescriptionN!)) { + if (delete) { + await calendarUtils.deleteEvent(calendar, event); + AppToast.showSuccessToast(message: TranslationBase.of(context).reminderCancelSuccess); + setState(() { + hasReminder = false; + }); + } else { + setState(() { + hasReminder = true; + }); + } + } + } + } + } + + // cancelReminders() async { + // CalendarUtils calendarUtils = await CalendarUtils.getInstance(); + // final ios.CalendarPlugin _myPlugin = ios.CalendarPlugin(); + // DateTime startEventsDate = Jiffy.parseFromDateTime(DateTime.now()).subtract(days: 30).dateTime; + // DateTime endEventsDate = Jiffy.parseFromDateTime(DateTime.now()).add(days: 120).dateTime; + // RetrieveEventsParams params = RetrieveEventsParams(startDate: startEventsDate, endDate: endEventsDate); + // + // if (Platform.isAndroid) { + // Future.forEach( + // calendarUtils.calendars, + // (Calendar calender) => { + // calendarUtils.retrieveEvents(calender.id!, params).then((value) { + // Result> events = value; + // events.data!.forEach((element) { + // if (element.title!.contains(widget.prescriptionReport!.itemDescriptionN!)) calendarUtils.deleteEvent(calender, element); + // }); + // }), + // }); + // } else { + // List? iosCal = await _myPlugin.getCalendars(); + // Future.forEach( + // iosCal!, + // (ios.Calendar cale) async => { + // calendarUtils.retrieveEvents(cale.id!, params).then((value) { + // Result> events = value; + // events.data!.forEach((element) { + // print(element.title); + // if (element.title!.contains(widget.prescriptionReport!.itemDescriptionN!)) + // calendarUtils.deleteEvent( + // Calendar( + // id: cale.id, + // name: cale.name, + // accountName: cale.accountName, + // ), + // element); + // }); + // }), + // }); + // AppToast.showSuccessToast(message: TranslationBase.of(context).reminderCancelSuccess); + // setState(() { + // hasReminder = false; + // }); + // } + // } + + setCalender(BuildContext context, String eventId, int reminderIndex) async { + DateTime actualDate = DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day, 8, 0); + if (widget.prescriptionReport?.frequencyNumber == null) widget.prescriptionReport!.frequencyNumber = 2; //Some time frequency number is null so by default will be 2 + + int remainingDays = widget.prescriptionReport!.days! - + (Jiffy.parseFromDateTime(DateTime.now()).diff(Jiffy.parseFromDateTime(DateUtil.convertStringToDate(widget.prescriptionReport!.orderDate!)), unit: Unit.day) as int); + if (remainingDays.isNegative) { + Utils.showErrorToast("Prescription date has been already passed you can not add a reminder for this prescription."); + return; + } + CalendarUtils calendarUtils = await CalendarUtils.getInstance(); + GifLoaderDialogUtils.showMyDialog(context); + + try { + for (int i = 0; i < remainingDays; i++) { + //event for number of days. + for (int j = 0; j < widget.prescriptionReport!.frequencyNumber!; j++) { + // event for number of times per day. + if (j != 0) { + actualDate.add(new Duration(hours: 8)); // 8 hours addition for daily dose. + } + //Time subtraction from actual reminder time. like before 30, or 1 hour. + if (reminderIndex == 0) { + // Before 30 mints + actualDate = Jiffy.parseFromDateTime(actualDate).subtract(minutes: 30).dateTime; + // dateTime.add(new Duration(minutes: -30)); + } else if (reminderIndex == 1) { + // Before 1 hour + // dateTime.add(new Duration(minutes: -60)); + actualDate = Jiffy.parseFromDateTime(actualDate).subtract(hours: 1).dateTime; + } else if (reminderIndex == 2) { + // Before 1 hour and 30 mints + // dateTime.add(new Duration(minutes: -90)); + actualDate = Jiffy.parseFromDateTime(actualDate).subtract(hours: 1, minutes: 30).dateTime; + } else if (reminderIndex == 3) { + // Before 2 hours + // dateTime.add(new Duration(minutes: -120)); + actualDate = Jiffy.parseFromDateTime(actualDate).subtract(hours: 2).dateTime; + } + + calendarUtils.createOrUpdateEvent( + title: "${widget.prescriptionReport!.itemDescriptionN} Prescription Reminder", + description: "${widget.prescriptionReport!.itemDescriptionN} ${widget.prescriptionReport!.frequencyN} ${widget.prescriptionReport!.routeN} ", + scheduleDateTime: actualDate, + eventId: eventId + (i.toString() + j.toString()), //event id with varitions + ); + + actualDate = DateTime(actualDate.year, actualDate.month, actualDate.day, 8, 0); + } + actualDate = Jiffy.parseFromDateTime(actualDate).add(days: 1).dateTime; + print(actualDate); + } + } catch (ex) { + print("catch:$ex"); + } + + AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); + Future.delayed(Duration(seconds: 2), () { + GifLoaderDialogUtils.hideDialog(context); + }); + setState(() { + hasReminder = true; + }); + } +} diff --git a/lib/pages/medical/prescriptions/prescription_items_page.dart b/lib/pages/medical/prescriptions/prescription_items_page.dart new file mode 100644 index 00000000..70ce271a --- /dev/null +++ b/lib/pages/medical/prescriptions/prescription_items_page.dart @@ -0,0 +1,461 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; +import 'package:diplomaticquarterapp/main.dart'; +import 'package:diplomaticquarterapp/models/header_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_inp.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/show_zoom_image_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../../widgets/dialogs/confirm_send_email_dialog.dart'; +import 'PrescriptionIDeliveryAddressPage.dart'; + +class PrescriptionItemsPage extends StatelessWidget { + final Prescriptions prescriptions; + late ProjectViewModel projectViewModel; + + PrescriptionItemsPage({Key? key, required this.prescriptions}); + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getPrescriptionReport(prescriptions: prescriptions), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + appBarTitle: prescriptions.doctorName!, + baseViewModel: model, + showNewAppBar: true, + showNewAppBarTitle: true, + body: model.state != ViewState.Busy + ? Column( + children: [ + Expanded( + child: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Column( + children: [ + DoctorHeader( + headerModel: HeaderModel( + prescriptions.doctorName!, + prescriptions.doctorID!, + prescriptions.doctorImageURL!, + prescriptions.speciality ?? [""], + "", + prescriptions.name!, + DateUtil.convertStringToDate(prescriptions.appointmentDate!), + DateUtil.formatDateToTime( + model.prescriptionReportEnhList.length > 0 || model.prescriptionReportListINP.length > 0 + ? DateUtil.convertStringToDate( + model.prescriptionReportEnhList.length > 0 ? model.prescriptionReportEnhList[0].orderDate! : model.prescriptionReportListINP[0].orderDate!, + ) + : DateTime.now(), + ), + prescriptions.nationalityFlagURL ?? "", + prescriptions.doctorRate, + prescriptions.actualDoctorRate, + prescriptions.noOfPatientsRate, + projectViewModel.user.emailAddress!, + ), + isNeedToShowButton: (model.prescriptionReportListINP.length > 0 || model.prescriptionReportEnhList.length > 0) ? projectViewModel.havePrivilege(13) : false, + buttonTitle: TranslationBase.of(context).download, + buttonIcon: "assets/images/new/download_1.svg", + showConfirmMessageDialog: false, + isDownload: true, + onTap: () async { + // showConfirmMessage(context, model); + GifLoaderDialogUtils.showMyDialog(context); + await model.sendPrescriptionEmail( + appointmentDate: prescriptions.appointmentDate!, + patientID: prescriptions.patientID!, + clinicName: prescriptions.companyName!, + doctorName: prescriptions.doctorName!, + doctorID: prescriptions.doctorID!, + mes: TranslationBase.of(context).sendSuc, + projectID: prescriptions.projectID!, + isInOutPatient: prescriptions.isInOutPatient!, + isDownload: true); + GifLoaderDialogUtils.hideDialog(context); + }, + ), + if (!prescriptions.isInOutPatient!) + model.prescriptionReportListINP.length > 0 + ? ListView.separated( + itemBuilder: (context, index) { + return InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: PrescriptionDetailsPageINP( + prescriptionReport: model.prescriptionReportListINP[index], + prescriptions: prescriptions, + ), + ), + ); + }, + child: Container( + width: double.infinity, + child: Container( + margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 4, bottom: 4), + decoration: cardRadius(12), + child: Padding( + padding: EdgeInsets.only(top: 12, bottom: 20, left: projectViewModel.isArabic ? 12 : 20, right: projectViewModel.isArabic ? 20 : 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + model.prescriptionReportListINP[index].itemDescription!.isNotEmpty + ? model.prescriptionReportListINP[index].itemDescription! + : model.prescriptionReportListINP[index].itemDescriptionN ?? '', + style: TextStyle( + fontSize: 16, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + mHeight(10), + Row( + children: [ + // InkWell( + // child: Stack( + // alignment: Alignment.center, + // children: [ + // Container( + // child: Image.network( + // model.prescriptionReportListINP[index].imageSRCUrl, + // fit: BoxFit.cover, + // width: 60, + // height: 60, + // ), + // margin: EdgeInsets.zero, + // clipBehavior: Clip.antiAlias, + // decoration: cardRadius(2000), + // ), + // Container( + // child: Icon( + // Icons.search, + // size: 18, + // color: Colors.white, + // ), + // padding: EdgeInsets.all(6), + // decoration: containerRadius(Colors.black.withOpacity(0.3), 200), + // ) + // ], + // ), + // onTap: () { + // showZoomImageDialog( + // context, + // model.prescriptionReportListINP[index].imageSRCUrl, + // ); + // }, + // ), + // mWidth(12), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Text( + TranslationBase.of(context).route + ": ", + style: TextStyle( + color: Colors.grey, + fontSize: 10, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + Text( + model.prescriptionReportListINP[index].route!, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + Row( + children: [ + Text( + TranslationBase.of(context).dailyDoses + ": ", + style: TextStyle( + color: Colors.grey, + fontSize: 10, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + Text( + model.prescriptionReportListINP[index].doseDailyQuantity.toString(), + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + mHeight(12), + Text( + model.prescriptionReportListINP[index].remarks!, + style: TextStyle( + color: Colors.grey, + fontSize: 10, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + ], + ) + ], + ), + ], + ), + ), + Icon( + Icons.arrow_forward, + size: 16, + ), + ], + ), + ), + ), + ), + ); + }, + separatorBuilder: (context, index) { + return mHeight(8); + }, + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: model.prescriptionReportListINP.length) + : Padding( + padding: const EdgeInsets.only(top: 150.0), + child: getNoDataWidget(context), + ) + else + model.prescriptionReportEnhList.length > 0 + ? ListView.separated( + padding: EdgeInsets.all(21), + itemBuilder: (context, index) { + return InkWell( + onTap: () { + PrescriptionReport prescriptionReport = PrescriptionReport( + imageSRCUrl: model.prescriptionReportEnhList[index].imageSRCUrl, + itemDescription: model.prescriptionReportEnhList[index].itemDescription, + itemDescriptionN: model.prescriptionReportEnhList[index].itemDescription, + routeN: model.prescriptionReportEnhList[index].route, + frequency: model.prescriptionReportEnhList[index].frequency, + frequencyN: model.prescriptionReportEnhList[index].frequency, + doseDailyQuantity: model.prescriptionReportEnhList[index].doseDailyQuantity, + days: model.prescriptionReportEnhList[index].days, + itemID: model.prescriptionReportEnhList[index].itemID, + orderDate: model.prescriptionReportEnhList[index].orderDate, + startDate: model.prescriptionReportEnhList[index].startDate, + remarks: model.prescriptionReportEnhList[index].remarks); + Navigator.push( + context, + FadePage( + page: PrescriptionDetailsPage( + prescriptionReport: prescriptionReport, + prescriptions: prescriptions, + ), + ), + ); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Padding( + padding: EdgeInsets.only(top: 12, bottom: 20, left: projectViewModel.isArabic ? 12 : 20, right: projectViewModel.isArabic ? 20 : 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + (model.prescriptionReportEnhList[index].itemDescription!.isNotEmpty + ? model.prescriptionReportEnhList[index].itemDescription + : model.prescriptionReportEnhList[index].itemDescriptionN ?? '')! + .toLowerCase() + .capitalizeFirstofEach, + style: TextStyle( + fontSize: 16, + color: Color(0xff2E303A), + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + mHeight(10), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // InkWell( + // child: Stack( + // alignment: Alignment.center, + // children: [ + // Container( + // child: Image.network( + // model.prescriptionReportEnhList[index].imageSRCUrl, + // fit: BoxFit.cover, + // width: 60, + // height: 60, + // ), + // margin: EdgeInsets.zero, + // clipBehavior: Clip.antiAlias, + // decoration: cardRadius(2000), + // ), + // Container( + // child: Icon( + // Icons.search, + // size: 18, + // color: Colors.white, + // ), + // padding: EdgeInsets.all(6), + // decoration: containerRadius(Colors.black.withOpacity(0.3), 200), + // ) + // ], + // ), + // onTap: () { + // showZoomImageDialog( + // context, + // model.prescriptionReportEnhList[index].imageSRCUrl, + // ); + // }, + // ), + // mWidth(12), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + MyRichText(TranslationBase.of(context).route + ": ", model.prescriptionReportEnhList[index].route!, projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).dailyDoses + ": ", model.prescriptionReportEnhList[index].doseDailyQuantity.toString(), + projectViewModel.isArabic), + mHeight(9), + Text( + model.prescriptionReportEnhList[index].remarks!, + style: TextStyle( + color: Color(0xff575757), + fontSize: 12, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ) + ], + ), + ], + ), + ), + Icon( + Icons.arrow_forward, + size: 16, + ), + ], + ), + ), + ), + ); + }, + separatorBuilder: (context, index) { + return mHeight(12); + }, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemCount: model.prescriptionReportEnhList.length) + : Padding( + padding: const EdgeInsets.only(top: 150.0), + child: getNoDataWidget(context), + ), + ], + ), + ), + ), + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).resendOrder, + () { + if (model.isMedDeliveryAllowed == false) { + AppToast.showErrorToast(message: TranslationBase.of(context).prescriptionDeliveryError); + } else { + Navigator.push( + context, + FadePage( + page: PrescriptionDeliveryAddressPage( + prescriptions: prescriptions, + prescriptionReportList: model.prescriptionReportList, + prescriptionReportEnhList: model.prescriptionReportEnhList, + ), + ), + ); + } + }, + color: model.isMedDeliveryAllowed == false ? Color(0xff575757) : Color(0xff359846), + disabledColor: Color(0xff575757), + ), + ), + ], + ) + : Container(), + ), + ); + } + + void showConfirmMessage(BuildContext context, PrescriptionsViewModel model) { + showDialog( + context: context, + builder: (cxt) => ConfirmSendEmailDialog( + email: projectViewModel.user!.emailAddress!, + onTapSendEmail: () { + model.sendPrescriptionEmail( + appointmentDate: prescriptions.appointmentDate!, + patientID: prescriptions.patientID!, + clinicName: prescriptions.companyName!, + doctorName: prescriptions.doctorName!, + doctorID: prescriptions.doctorID!, + mes: TranslationBase.of(context).sendSuc, + projectID: prescriptions.projectID!, + isInOutPatient: prescriptions.isInOutPatient!, + isDownload: true); + }, + ), + ); + } +} diff --git a/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart b/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart new file mode 100644 index 00000000..ad47c841 --- /dev/null +++ b/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart @@ -0,0 +1,196 @@ +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class PrescriptionsHistoryDetailsPage extends StatelessWidget { + final GetCMCAllOrdersResponseModel prescriptionsOrder; + + PrescriptionsHistoryDetailsPage({Key? key, required this.prescriptionsOrder}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getPrescriptionReportDetailsRC(prescriptionsOrder.iD!, projectViewModel.user!.patientID), + builder: (_, model, widget) { + int status = prescriptionsOrder.statusId!; + String _statusDisp = prescriptionsOrder.statusText!; + late Color _color; + if (status == 1) { + //pending + _color = Color(0xffCC9B14); + } else if (status == 2) { + //processing + _color = Color(0xff2E303A); + } else if (status == 3) { + //completed + _color = Color(0xff359846); + } else if (status == 4 || status == 6 || status == 7) { + //cancel // Rejected + _color = Color(0xffD02127); + } + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).orderDetails, + baseViewModel: model, + showNewAppBar: true, + backgroundColor: Color(0xffF8F8F8), + showNewAppBarTitle: true, + body: Column( + children: [ + Expanded( + child: ListView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + children: [ + Container( + decoration: BoxDecoration( + color: _color, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Container( + margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), + padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 1), + borderRadius: BorderRadius.only( + bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0), + ), + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _statusDisp, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _color, letterSpacing: -0.4, height: 16 / 10), + ), + Text( + '${TranslationBase.of(context).orderNo}. ${prescriptionsOrder.iD}', + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + ], + ), + ), + Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text( + DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(prescriptionsOrder.created!)!), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10), + ), + ], + ) + ], + ), + SizedBox(height: 16), + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index) => Row( + children: [ + Container( + decoration: BoxDecoration( + border: Border.all(width: 1.0, color: Color(0xffEBEBEB)), + borderRadius: BorderRadius.all(Radius.circular(30.0)), + ), + child: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(30)), + child: Image.network( + model.prescriptionsOrderListRC[index].image!, + fit: BoxFit.cover, + width: 48, + height: 48, + ), + ), + ), + SizedBox(width: 14), + Expanded( + child: Text( + (model.prescriptionsOrderListRC[index].itemDescription!.isNotEmpty + ? model.prescriptionsOrderListRC[index].itemDescription + : model.prescriptionsOrderListRC[index].itemDescription ?? '')! + .toLowerCase() + .capitalizeFirstofEach, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), + ), + ) + ], + ), + separatorBuilder: (context, index) => SizedBox(height: 12), + itemCount: model.prescriptionsOrderListRC.length) + ], + ), + ), + ), + ], + ), + ), + Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).cancelOrder, + // prescriptionsOrder.statusId != 1 + // ? null + // : + () { + showCDialog(model, context); + }, + disabledColor: Color(0xff575757), + ), + ), + ], + ), + ); + }, + ); + } + + showCDialog(PrescriptionsViewModel model, context) { + ConfirmDialog( + context: context, + confirmMessage: "Are you sure ?", + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel, + okFunction: () async { + Navigator.of(context).pop(); + await model.updatePressOrder(presOrderID: prescriptionsOrder.iD!); + Navigator.of(context).pop(true); + }, + cancelFunction: () => {}).showAlertDialog(context); + // dialog.showAlertDialog(context); + } +} diff --git a/lib/pages/medical/prescriptions/prescriptions_history_page.dart b/lib/pages/medical/prescriptions/prescriptions_history_page.dart new file mode 100644 index 00000000..eb0a56b5 --- /dev/null +++ b/lib/pages/medical/prescriptions/prescriptions_history_page.dart @@ -0,0 +1,155 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_details_page.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class PrescriptionsHistoryPage extends StatelessWidget { + final VoidCallback? showOrderLog; + final PrescriptionsViewModel? prescriptionsViewModel; + + PrescriptionsHistoryPage({Key? key, this.prescriptionsViewModel, this.showOrderLog}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + return BaseView( + onModelReady: (model) => model.getPrescriptionsOrders(showLoading: true), + builder: (_, model, widget) => AppScaffold( + baseViewModel: prescriptionsViewModel, + body: model.state != ViewState.Busy + ? prescriptionsViewModel!.prescriptionsHistory.length > 0 + ? ListView.separated( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + separatorBuilder: (context, index) { + return SizedBox(height: 12); + }, + itemBuilder: (context, index) { + int status = prescriptionsViewModel!.prescriptionsHistory[index].statusId!; + String _statusDisp = prescriptionsViewModel!.prescriptionsHistory[index].statusText!; + late Color _color; + if (status == 1) { + //pending + _color = Color(0xffCC9B14); + } else if (status == 2) { + //processing + _color = Color(0xff2E303A); + } else if (status == 3) { + //completed + _color = Color(0xff359846); + } else if (status == 4 || status == 6 || status == 7) { + //cancel // Rejected + _color = Color(0xffD02127); + } + + return InkWell( + onTap: () async { + final result = await Navigator.push( + context, + FadePage( + page: PrescriptionsHistoryDetailsPage( + prescriptionsOrder: prescriptionsViewModel!.prescriptionsHistory[index], + ), + ), + ); + if (result != null) { + showOrderLog!(); + } + }, + child: Container( + height: 65, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + width: 6, + decoration: BoxDecoration( + color: _color, + borderRadius: BorderRadius.only( + topLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0), + bottomLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0), + topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0), + bottomRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0), + ), + ), + ), + Expanded( + child: Padding( + padding: EdgeInsets.only(left: projectViewModel.isArabic ? 6 : 12, right: projectViewModel.isArabic ? 12 : 6), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _statusDisp, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _color, letterSpacing: -0.4, height: 16 / 10), + ), + Text( + '${TranslationBase.of(context).orderNo}. ${prescriptionsViewModel!.prescriptionsHistory[index].iD}', + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + ], + ), + ), + Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text( + DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(prescriptionsViewModel!.prescriptionsHistory[index].created!)!), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10), + ), + Text( + DateUtil.formatDateToTimeLang(DateTime.tryParse(prescriptionsViewModel!.prescriptionsHistory[index].created!)!, false), + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + ], + ) + ], + ), + ), + ), + Icon( + Icons.arrow_forward, + size: 16, + ), + mWidth(6), + ], + ), + )); + }, + itemCount: prescriptionsViewModel!.prescriptionsHistory.length, + ) + : getNoDataWidget(context) + : Container(), + )); + } +} diff --git a/lib/pages/medical/prescriptions/prescriptions_home_page.dart b/lib/pages/medical/prescriptions/prescriptions_home_page.dart new file mode 100644 index 00000000..0ac4d04d --- /dev/null +++ b/lib/pages/medical/prescriptions/prescriptions_home_page.dart @@ -0,0 +1,121 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_page.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class HomePrescriptionsPage extends StatefulWidget { + @override + _HomePrescriptionsPageState createState() => _HomePrescriptionsPageState(); +} + +class _HomePrescriptionsPageState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + List imagesInfo =[]; + + late ProjectViewModel projectViewModel; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 3, vsync: this); + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/ar/0.png')); + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-prescriptions/ar/1.png')); + } + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getPrescriptions(), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).prescriptions, + description: TranslationBase.of(context).infoPrescriptions, + infoList: TranslationBase.of(context).infoPrescriptionsPoints, + imagesInfo: imagesInfo, + showNewAppBar: true, + backgroundColor: Color(0xffF8F8F8), + showNewAppBarTitle: true, + body: Column( + children: [ + TabBar( + // isScrollable: true, + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontSize: 15, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontSize: 15, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [ + Text(TranslationBase.of(context).byClinic, style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins')), + Text(TranslationBase.of(context).byHospital, style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins')), + Text(TranslationBase.of(context).orderLog, style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins')), + ], + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + PrescriptionsPage( + FilterType.Clinic, + prescriptionsViewModel: model, + showOrderLog: () async { + _tabController.animateTo(2); + // await model.getPrescriptionsOrders(showLoading: true); + setState(() {}); + }, + ), + PrescriptionsPage( + FilterType.Hospital, + prescriptionsViewModel: model, + showOrderLog: () async { + _tabController.animateTo(2); + // await model.getPrescriptionsOrders(showLoading: true); + setState(() {}); + }, + ), + PrescriptionsHistoryPage( + prescriptionsViewModel: model, + showOrderLog: () async { + await model.getPrescriptionsOrders(showLoading: true); + setState(() {}); + }, + ) + ], + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/medical/prescriptions/prescriptions_page.dart b/lib/pages/medical/prescriptions/prescriptions_page.dart new file mode 100644 index 00000000..e550e1b0 --- /dev/null +++ b/lib/pages/medical/prescriptions/prescriptions_page.dart @@ -0,0 +1,82 @@ +import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; +import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_items_page.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class PrescriptionsPage extends StatelessWidget { + final VoidCallback? showOrderLog; + final FilterType filterType; + final PrescriptionsViewModel? prescriptionsViewModel; + + const PrescriptionsPage(this.filterType, {Key? key, this.prescriptionsViewModel, this.showOrderLog}) : super(key: key); + + @override + Widget build(BuildContext context) { + return AppScaffold( + baseViewModel: prescriptionsViewModel, + body: ListView.separated( + addAutomaticKeepAlives: true, + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(top: 12), + separatorBuilder: (context, index) { + return Container( + height: 12, + margin: EdgeInsets.only(left: 21, right: 21), + // color: Color(0xffD9D9D9), + ); + }, + itemBuilder: (context, index) { + List prescriptionsList = prescriptionsViewModel!.prescriptionsOrderListByValue(filterType)[index].prescriptionsList!; + return AppExpandableNotifier( + title: prescriptionsViewModel!.prescriptionsOrderListByValue(filterType)[index].filterName, + bodyWidget: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), + itemBuilder: (context, _index) { + Prescriptions prescriptions = prescriptionsList[_index]; + + bool _isSortByClinic = filterType == FilterType.Clinic; + return DoctorCard( + onTap: () async { + final _shouldRecallApi = await Navigator.push( + context, + FadePage( + page: PrescriptionItemsPage( + prescriptions: prescriptions, + ), + ), + ); + if (_shouldRecallApi != null) { + showOrderLog!(); + } + }, + name: prescriptions.doctorName, + profileUrl: prescriptions.doctorImageURL, + rating: prescriptions.actualDoctorRate!.toDouble(), + subName: _isSortByClinic ? prescriptions.name : prescriptions.clinicDescription, + isSortByClinic: _isSortByClinic, + isInOutPatient: prescriptions.isInOutPatient, + isLiveCareAppointment: prescriptions.isLiveCareAppointment, + date: DateUtil.convertStringToDate(prescriptions.appointmentDate!) //projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)), + ); + }, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemCount: prescriptionsList.length), + ); + }, + itemCount: prescriptionsViewModel!.prescriptionsOrderListByValue(filterType).length, + )); + } +} diff --git a/lib/pages/medical/radiology/radiology_details_page.dart b/lib/pages/medical/radiology/radiology_details_page.dart new file mode 100644 index 00000000..6582017f --- /dev/null +++ b/lib/pages/medical/radiology/radiology_details_page.dart @@ -0,0 +1,137 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/header_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class RadiologyDetailsPage extends StatelessWidget { + final FinalRadiology? finalRadiology; + bool? isRadiologyVidaPlus; + + RadiologyDetailsPage({Key? key, this.finalRadiology, this.isRadiologyVidaPlus}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getRadImageURL( + projectId: finalRadiology!.projectID!, + invoiceType: finalRadiology!.invoiceType, + lineItem: finalRadiology!.invoiceLineItemNo!, + invoiceNo: Utils.isVidaPlusProject(projectViewModel, finalRadiology!.projectID!) ? finalRadiology!.invoiceNo_VP : finalRadiology!.invoiceNo, + isVidaPlus: Utils.isVidaPlusProject(projectViewModel, finalRadiology!.projectID!)), + builder: (_, model, widget) => AppScaffold( + appBarTitle: TranslationBase.of(context).report, + isShowAppBar: true, + baseViewModel: model, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF8F8F8), + body: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + DoctorHeader( + headerModel: new HeaderModel( + finalRadiology!.doctorName!, + finalRadiology!.doctorID!, + finalRadiology!.doctorImageURL!, + finalRadiology!.speciality ?? [""], + Utils.isVidaPlusProject(projectViewModel, finalRadiology!.projectID!) ? finalRadiology!.invoiceNo_VP.toString() : finalRadiology!.invoiceNo.toString(), + finalRadiology!.projectName!, + finalRadiology!.orderDate, + null, + finalRadiology!.nationalityFlagURL ?? "", + finalRadiology!.doctorRate, + finalRadiology!.actualDoctorRate, + finalRadiology!.noOfPatientsRate, + projectViewModel.user.emailAddress!, + ), + onTap: () async { + GifLoaderDialogUtils.showMyDialog(context); + await model.sendRadReportEmail(mes: TranslationBase.of(AppGlobal.context).sendSuc, finalRadiology: finalRadiology!, userObj: projectViewModel.user, isDownload: true); + GifLoaderDialogUtils.hideDialog(context); + // showConfirmMessage(finalRadiology: finalRadiology!, model: model, userObj: projectViewModel.user!, isDownload: true); + }, + buttonTitle: TranslationBase.of(context).download, + buttonIcon: "assets/images/new/download_1.svg", + showConfirmMessageDialog: false, + isDownload: true, + isNeedToShowButton: projectViewModel.havePrivilege(8), + // showConfirmMessageDialog: false, + ), + Container( + margin: EdgeInsets.all(24), + decoration: cardRadius(12), + child: Container( + width: double.infinity, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + "General Result", + style: TextStyle( + fontSize: 16, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + mHeight(10), + Text( + '${finalRadiology!.reportData}', + style: TextStyle(fontSize: 12, letterSpacing: -0.48), + ), + mHeight(16), + (projectViewModel.havePrivilege(9) || projectViewModel.havePrivilege(8)) + ? (finalRadiology!.dIAPACSURL != "" && projectViewModel.havePrivilege(9)) + ? Container( + child: DefaultButton( + TranslationBase.of(context).openRad, + () => {launch(model.radImageURL)}, + textColor: Colors.white, + ), + ) + : Container() + : Container(), + ], + ), + ), + ), + ), + ], + ), + ), + ), + ); + } + + void showConfirmMessage({FinalRadiology? finalRadiology, RadiologyViewModel? model, AuthenticatedUser? userObj, required bool isDownload}) { + showDialog( + context: AppGlobal.context, + builder: (cxt) => ConfirmSendEmailDialog( + email: model!.user!.emailAddress, + onTapSendEmail: () { + model.sendRadReportEmail(mes: TranslationBase.of(AppGlobal.context).sendSuc, finalRadiology: finalRadiology!, userObj: userObj!, isDownload: isDownload); + }, + ), + ); + } +} diff --git a/lib/pages/medical/radiology/radiology_home_page.dart b/lib/pages/medical/radiology/radiology_home_page.dart new file mode 100644 index 00000000..fb60d5da --- /dev/null +++ b/lib/pages/medical/radiology/radiology_home_page.dart @@ -0,0 +1,142 @@ +import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; +import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class RadiologyHomePage extends StatelessWidget { + List imagesInfo =[]; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + imagesInfo.add( + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/ar/0.png')); + imagesInfo.add( + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/ar/1.png')); + return BaseView( + onModelReady: (model) => model.getPatientRadOrders(), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).radiology, + baseViewModel: model, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF8F8F8), + description: TranslationBase.of(context).infoRadiology, + imagesInfo: imagesInfo, + body: Column( + children: [ + Row( + children: [ + MyTabView(TranslationBase.of(context).byClinic, FilterType.Clinic, model.filterType, () { + model.setFilterType(FilterType.Clinic); + }), + MyTabView(TranslationBase.of(context).byHospital, FilterType.Hospital, model.filterType, () { + model.setFilterType(FilterType.Hospital); + }), + ], + ), + + Expanded( + child: FractionallySizedBox( + widthFactor: 1.0, + child: ListView.separated( + addAutomaticKeepAlives: true, + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(top: 12), + separatorBuilder: (context, index) { + return Container( + height: 12, + margin: EdgeInsets.only(left: 21, right: 21), + // color: Color(0xffD9D9D9), + ); + }, + itemBuilder: (context, index) { + return AppExpandableNotifier( + title: model.finalRadiologyList[index].filterName, + bodyWidget: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), + itemBuilder: (context, _index) { + FinalRadiology radiology = model.finalRadiologyList[index].finalRadiologyList![_index]; + bool _isSortByClinic = model.filterType == FilterType.Clinic; + return DoctorCard( + onTap: () => Navigator.push( + context, + FadePage( + page: RadiologyDetailsPage( + finalRadiology: radiology, + isRadiologyVidaPlus: Utils.isVidaPlusProject(projectViewModel, radiology.projectID!), + ), + ), + ), + isInOutPatient: radiology.isInOutPatient, + name: TranslationBase.of(context).dr + " " + radiology.doctorName!, + billNo: Utils.isVidaPlusProject(projectViewModel, radiology.projectID!) ? radiology.invoiceNo_VP.toString() : radiology.invoiceNo.toString(), + // billNo: radiology.invoiceNo_VP.toString(), + profileUrl: radiology.doctorImageURL, + subName: _isSortByClinic ? radiology.projectName : radiology.clinicDescription, + isLiveCareAppointment: radiology.isLiveCareAppointment, + date: radiology.orderDate, + isSortByClinic: _isSortByClinic, + //projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate) : DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate), + ); + }, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemCount: model.finalRadiologyList[index].finalRadiologyList!.length), + ); + }, + itemCount: model.finalRadiologyList.length), + ), + ), + // ...List.generate( + // model.finalRadiologyList.length, + // (index) => AppExpandableNotifier( + // title: model + // .finalRadiologyList[index].filterName, + // bodyWidget: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: model + // .finalRadiologyList[index].finalRadiologyList + // .map((radiology) { + // return InkWell( + // onTap: () => Navigator.push( + // context, + // FadePage( + // page: RadiologyDetailsPage(finalRadiology: radiology,), + // ), + // ), + // child: DoctorCard( + // isInOutPatient: radiology.isInOutPatient, + // isLiveCareAppointment: radiology.isLiveCareAppointment, + // name: radiology.doctorName, + // profileUrl: radiology.doctorImageURL, + // billNo: '${radiology.invoiceNo}', + // subName: '${radiology.projectName}', + // date: radiology.orderDate//projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(radiology.orderDate):DateUtil.getMonthDayYearDateFormatted(radiology.orderDate), + // ), + // ); + // }).toList(), + // )), + // ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/medical/reports/inpatient_medical_reports_page.dart b/lib/pages/medical/reports/inpatient_medical_reports_page.dart new file mode 100644 index 00000000..af3ee6d9 --- /dev/null +++ b/lib/pages/medical/reports/inpatient_medical_reports_page.dart @@ -0,0 +1,132 @@ +import 'package:diplomaticquarterapp/core/model/reports/admission_for_medical_report.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/reports_view_model.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/reports/report_list_widget.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; + +class InPatientMedicalReports extends StatefulWidget { + final AdmissionMedicalReport admissionMedicalReport; + + InPatientMedicalReports({required this.admissionMedicalReport}); + + @override + State createState() => _InPatientMedicalReportsState(); +} + +class _InPatientMedicalReportsState extends State { + int _currentPage = 0; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) { + model.getInPatientReports(); + }, + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).newMedReport, + title: TranslationBase.of(context).medReport, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF7F7F7), + body: Container( + child: Column( + children: [ + Padding( + padding: EdgeInsets.all(21), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + myRadioButton(TranslationBase.of(context).requested, 0), + myRadioButton(TranslationBase.of(context).ready, 1), + myRadioButton(TranslationBase.of(context).cancelled, 2), + ], + ), + ), + Expanded( + child: IndexedStack( + index: _currentPage, + children: [ + ReportListWidget(reportList: model.reportsInPatientOrderRequestList, emailAddress: model.user!.emailAddress!), + ReportListWidget(reportList: model.reportsInPatientOrderReadyList, emailAddress: model.user!.emailAddress!), + ReportListWidget(reportList: model.reportsInPatientOrderCanceledList, emailAddress: model.user!.emailAddress!), + ], + ), + ), + Padding( + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).requestMedicalReport.toLowerCase().capitalizeFirstofEach, + () { + confirmBox(model); + }, + ), + ), + ], + ), + ), + ), + ); + } + + void confirmBox(ReportsViewModel reportsViewModel) { + showDialog( + context: context, + builder: (cxt) => ConfirmWithMessageDialog( + message: TranslationBase.of(context).confirmMsgReport, + onTap: () => reportsViewModel.insertRequestForInPatientMedicalReport(widget.admissionMedicalReport.clinicID!, widget.admissionMedicalReport.doctorID!, widget.admissionMedicalReport.setupID!, + widget.admissionMedicalReport.admissionNo!, widget.admissionMedicalReport.projectID!, TranslationBase.of(context).successSendReport), + ), + ); + return; + } + + Widget myRadioButton(String _label, int _value) { + return InkWell( + onTap: () { + setState(() { + _currentPage = _value; + }); + }, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + width: 22, + height: 22, + child: Radio( + value: _value, + activeColor: _value == _currentPage ? Color(0xffD02127) : Color(0xffE8E8E8), + groupValue: _currentPage, + onChanged: (index) { + setState(() { + _currentPage = index!; + }); + }, + ), + ), + SizedBox(width: 10), + Text( + _label, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/medical/reports/monthly_reports.dart b/lib/pages/medical/reports/monthly_reports.dart new file mode 100644 index 00000000..4b59d7a0 --- /dev/null +++ b/lib/pages/medical/reports/monthly_reports.dart @@ -0,0 +1,254 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/reports/user_agreement_page.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/input/custom_switch.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class MonthlyReportsPage extends StatefulWidget { + @override + _MonthlyReportsPageState createState() => _MonthlyReportsPageState(); +} + +class _MonthlyReportsPageState extends State { + bool isAgree = false; + bool isSummary = false; + String email = ""; + final formKey = GlobalKey(); + + List imagesInfo = []; + + @override + void initState() { + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/0.png')); + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/1.png')); + super.initState(); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView(builder: (_, model, w) { + if (isSummary == null) { + isSummary = model.receiveHealthSummaryReport; + } + if (isAgree == null) { + isAgree = model.receiveHealthSummaryReport; + } + if (email == null) { + email = model.user.emailAddress ?? ""; + } + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).monthlyReports, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF7F7F7), + imagesInfo: imagesInfo, + description: TranslationBase.of(context).infoMonthReport, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + child: Form( + key: formKey, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: EdgeInsets.only(right: 12, left: 12, top: 14, bottom: 14), + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + TranslationBase.of(context).patientHealthSummaryReport, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 25 / 16), + ), + ), + CustomSwitch( + value: isSummary, + activeColor: Color(0xffD02127), + inactiveColor: Color(0xff28323A).withOpacity(0.3), + onChanged: () async { + setState(() { + isSummary = !isSummary; + }); + if (!isSummary) { + GifLoaderDialogUtils.showMyDialog(context); + print("is Summry: $isSummary"); + await model.updatePatientHealthSummaryReport(message: TranslationBase.of(context).updateSuccessfully, isSummary: isSummary); + model.receiveHealthSummaryReport = isSummary; + isAgree = isSummary; + model.user.emailAddress = ""; + GifLoaderDialogUtils.hideDialog(context); + } + }, + ) + ], + ), + ), + SizedBox( + height: 15, + ), + Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).email, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextFormField( + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.emailAddress, + // controller: _controller, + onChanged: (value) => {email = value}, + initialValue: email, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + validator: (value) { + if (value!.isEmpty) + return TranslationBase.of(context).enterEmail; + else + return null; + }, + decoration: InputDecoration( + isDense: true, + hintText: "email@email.com", + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + ], + ), + ), + SizedBox( + height: 12, + ), + RichText( + text: TextSpan( + text: TranslationBase.of(context).toViewTheTermsAndConditions + " ", + style: TextStyle( + fontSize: 16, fontWeight: FontWeight.w500, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), + children: [ + TextSpan( + text: TranslationBase.of(context).clickHere, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.blue, letterSpacing: -0.64, height: 23 / 16), + recognizer: new TapGestureRecognizer() + ..onTap = () => Navigator.push( + context, + FadePage( + page: UserAgreementContent(), + ), + ), + ) + ]), + ), + Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Checkbox( + value: isAgree, + onChanged: (value) { + setState(() { + isAgree = !isAgree; + }); + }, + activeColor: Color(0xffD02127), + ), + Text( + TranslationBase.of(context).iAgreeToTheTermsAndConditions, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: Color(0xff2B353E), letterSpacing: -0.56, height: 21 / 14), + ), + ], + ), + DefaultButton( + TranslationBase.of(context).save, + () async { + final form = formKey.currentState; + if (form!.validate()) { + GifLoaderDialogUtils.showMyDialog(context); + await model.updatePatientHealthSummaryReport( + message: TranslationBase.of(context).updateSuccessfully, isSummary: isSummary, isUpdateEmail: true, email: email.isNotEmpty ? email : model.user!.emailAddress); + model.receiveHealthSummaryReport = isSummary; + model.user!.emailAddress = email.isNotEmpty ? email : model.user!.emailAddress; + GifLoaderDialogUtils.hideDialog(context); + } + }, + ), + SizedBox(height: 12), + Text( + TranslationBase.of(context).instructionAgree, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), + ), + SizedBox(height: 12), + Center(child: Image.asset('assets/images/report.jpg')) + ], + ), + ), + ), + ); + }); + } +} diff --git a/lib/pages/medical/reports/report_home_page.dart b/lib/pages/medical/reports/report_home_page.dart new file mode 100644 index 00000000..f70f0793 --- /dev/null +++ b/lib/pages/medical/reports/report_home_page.dart @@ -0,0 +1,350 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/model/reports/admission_for_medical_report.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/reports_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/reports/inpatient_medical_reports_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/reports/report_list_widget.dart'; +import 'package:diplomaticquarterapp/pages/medical/reports/reports_page.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class HomeReportPage extends StatefulWidget { + @override + _HomeReportPageState createState() => _HomeReportPageState(); +} + +class _HomeReportPageState extends State with SingleTickerProviderStateMixin { + late TabController _tabController_new; + List imagesInfo =[]; + int _currentPage = 0; + ProjectViewModel? projectViewModel; + + @override + void initState() { + _tabController_new = TabController(length: 2, vsync: this); + super.initState(); + } + + @override + void dispose() { + super.dispose(); + _tabController_new.dispose(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/0.png')); + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/1.png')); + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/2.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/2.png')); + return BaseView( + onModelReady: (model) { + model.getReports(projectViewModel!.isArabic ? 1 : 2); + }, + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).newMedReport, + title: TranslationBase.of(context).medReport, + description: TranslationBase.of(context).infoMonthReport, + baseViewModel: model, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF7F7F7), + imagesInfo: imagesInfo, + body: Container( + child: Column( + children: [ + // TabBar( + // controller: _tabController_new, + // indicatorWeight: 3.0, + // indicatorSize: TabBarIndicatorSize.tab, + // labelColor: Color(0xff2B353E), + // unselectedLabelColor: Color(0xff575757), + // labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + // labelStyle: TextStyle( + // fontSize: 16, + // fontWeight: FontWeight.w600, + // letterSpacing: -0.48, + // ), + // unselectedLabelStyle: TextStyle( + // fontSize: 16, + // fontWeight: FontWeight.w600, + // letterSpacing: -0.48, + // ), + // onTap: (int value) { + // print(value); + // setState(() {}); + // }, + // tabs: [ + // Text( + // TranslationBase.of(context).outpatient, + // style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), + // ), + // Text( + // TranslationBase.of(context).inPatient, + // style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), + // ), + // ], + // ), + + + // TabBar( + // controller: _tabController_new, + // indicatorWeight: 3.0, + // indicatorSize: TabBarIndicatorSize.tab, + // labelColor: Color(0xff2B353E), + // unselectedLabelColor: Color(0xff575757), + // labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + // labelStyle: TextStyle( + // fontSize: 16, + // fontWeight: FontWeight.w600, + // letterSpacing: -0.48, + // ), + // unselectedLabelStyle: TextStyle( + // fontSize: 16, + // fontWeight: FontWeight.w600, + // letterSpacing: -0.48, + // ), + // onTap: (int value) { + // print(value); + // setState(() {}); + // }, + // tabs: [ + // Text( + // TranslationBase.of(context).outpatient, + // style: TextStyle(fontFamily: projectViewModel!.isArabic ? 'Cairo' : 'Poppins'), + // ), + // Text( + // TranslationBase.of(context).inPatient, + // style: TextStyle(fontFamily: projectViewModel!.isArabic ? 'Cairo' : 'Poppins'), + // ), + // ], + // ), + + + if (model.user != null) + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController_new, + children: [ + Container( + child: Column( + children: [ + Padding( + padding: EdgeInsets.all(21), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + myRadioButton(TranslationBase.of(context).requested, 0), + myRadioButton(TranslationBase.of(context).ready, 1), + myRadioButton(TranslationBase.of(context).cancelled, 2), + ], + ), + ), + Expanded( + child: IndexedStack( + index: _currentPage, + children: [ + ReportListWidget(reportList: model.reportsOrderRequestList, emailAddress: model.user.emailAddress), + ReportListWidget(reportList: model.reportsOrderReadyList, emailAddress: model.user.emailAddress), + ReportListWidget(reportList: model.reportsOrderCanceledList, emailAddress: model.user.emailAddress), + ], + ), + ) + ], + ), + ), + // InPatient Medical Reports + Container( + child: model.admissionsMedicalReportList.isNotEmpty + ? Column( + children: [ + Padding( + padding: const EdgeInsets.all(16.0), + child: Text( + TranslationBase.of(context).selectAdmissionText, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + ), + ListView.separated( + physics: BouncingScrollPhysics(), + shrinkWrap: true, + padding: EdgeInsets.only(left: 21, right: 21, top: 12, bottom: 12), + itemBuilder: (context, index) { + AdmissionMedicalReport admissionMedicalReport = model.admissionsMedicalReportList[index]; + return InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: InPatientMedicalReports( + admissionMedicalReport: admissionMedicalReport, + ), + ), + ); + }, + child: Container( + // height: 100.0, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).dr + " " + admissionMedicalReport.doctorNameObj!, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(admissionMedicalReport.admissionDate!)), + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12)), + Text(admissionMedicalReport.projectName!, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12)), + ], + ), + ], + ), + Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + if (admissionMedicalReport.clinicName != null) + MyRichText(TranslationBase.of(context).clinic + ":", admissionMedicalReport.clinicName!, projectViewModel!.isArabic), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + MyRichText( + TranslationBase.of(context).status + ":", + projectViewModel!.isArabic ? admissionMedicalReport.statusDescriptionN! : admissionMedicalReport.statusDescription!, + projectViewModel!.isArabic), + Icon( + Icons.arrow_forward, + color: Theme.of(context).primaryColor, + ) + ], + ), + ], + ), + ), + ], + ) + ], + ), + ), + ), + ); + }, + separatorBuilder: (context, index) => SizedBox( + height: 16.0, + ), + itemCount: model.admissionsMedicalReportList.length), + ], + ) + : getNoDataWidget(context), + ) + ], + ), + ), + if (projectViewModel!.havePrivilege(21) + // && _tabController_new.index == 0 + ) + if (_tabController_new.index == 0) + Padding( + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).requestMedicalReport.toLowerCase().capitalizeFirstofEach, + () => Navigator.push( + context, + FadePage( + page: MedicalReports(), + ), + ).then((value) { + model.getReports(projectViewModel!.isArabic ? 1 : 2); + }), + ), + ) + ], + ), + ), + ), + ); + } + + Widget myRadioButton(String _label, int _value) { + return InkWell( + onTap: () { + setState(() { + _currentPage = _value; + }); + }, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + width: 22, + height: 22, + child: Radio( + value: _value, + activeColor: _value == _currentPage ? Color(0xffD02127) : Color(0xffE8E8E8), + groupValue: _currentPage, + onChanged: (index) { + setState(() { + _currentPage = index!; + }); + }, + ), + ), + SizedBox(width: 10), + Text( + _label, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/medical/reports/report_list_widget.dart b/lib/pages/medical/reports/report_list_widget.dart new file mode 100644 index 00000000..5846b31f --- /dev/null +++ b/lib/pages/medical/reports/report_list_widget.dart @@ -0,0 +1,272 @@ +import 'dart:convert'; +import 'dart:io'; +import 'dart:typed_data'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/reports/Reports.dart'; +import 'package:diplomaticquarterapp/core/service/medical/reports_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/main.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:open_filex/open_filex.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:provider/provider.dart'; +import 'package:share_plus/share_plus.dart'; + +class ReportListWidget extends StatelessWidget { + final List reportList; + final String? emailAddress; + + ReportListWidget({required this.reportList, this.emailAddress}); + + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return reportList.length > 0 + ? ListView.separated( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), + separatorBuilder: (context, index) => SizedBox(height: 14), + itemBuilder: (context, index) { + Reports report = reportList[index]; + return Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Padding( + padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (report.doctorName != null) + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + report.doctorName, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text(DateUtil.getDayMonthYearDateFormatted(report.requestDate!), + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12)), + Text(DateUtil.formatDateToTimeLang(report.requestDate!, projectViewModel.isArabic), + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12)), + ], + ), + ], + ), + if (report.doctorName != null) SizedBox(height: 6), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + LargeAvatar( + name: report.doctorName, + url: report.doctorImageURL, + width: 48, + height: 48, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + if (report.projectName != null) MyRichText(TranslationBase.of(context).hospital + ":", report.projectName!, projectViewModel.isArabic), + if (report.clinicDescription != null) MyRichText(TranslationBase.of(context).clinic + ":", report.clinicDescription!, projectViewModel.isArabic), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + RatingBar( + initialRating: report.actualDoctorRate == null ? 0.0 : report.actualDoctorRate!.toDouble(), + itemSize: 16, + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star_border, + color: CustomColors.accentColor, + ), + ), + onRatingUpdate: (double value) {}, + unratedColor: Colors.grey[500], + updateOnDrag: false, + tapOnlyMode: false, + ), + if (reportList[index].status == 2) + Row( + children: [ + InkWell( + onTap: () { + getMedicalReportPDF(report, false); + }, + child: Padding( + padding: const EdgeInsets.only(right: 11.0, left: 11.0), + child: Text(TranslationBase.of(context).download, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + fontStyle: FontStyle.italic, + color: CustomColors.accentColor, + letterSpacing: -0.48, + height: 18 / 12, + decoration: TextDecoration.underline)), + ), + ), + InkWell( + onTap: () { + getMedicalReportPDF(report, true); + }, + child: Padding( + padding: const EdgeInsets.only(right: 11.0, left: 11.0), + child: Text(TranslationBase.of(context).share, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + fontStyle: FontStyle.italic, + color: CustomColors.accentColor, + letterSpacing: -0.48, + height: 18 / 12, + decoration: TextDecoration.underline)), + ), + ), + // IconButton( + // icon: Icon(Icons.email), + // color: Color(0xff28323A), + // constraints: BoxConstraints(), + // padding: EdgeInsets.zero, + // onPressed: () { + // showConfirmMessage(reportList[index]); + // }) + ], + ), + ], + ), + ], + ), + ), + ], + ), + ], + ), + ), + ); + }, + itemCount: reportList.length, + ) + : getNoDataWidget(context); + } + + void showConfirmMessage(Reports report) { + showDialog( + context: AppGlobal.context, + builder: (cxt) => ConfirmSendEmailDialog( + email: emailAddress, + onTapSendEmail: () { + sendReportEmail(report); + }, + ), + ); + } + + void getMedicalReportPDF(Reports report, bool isShare) { + GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + ReportsService _reportsService = locator(); + _reportsService + .getMedicalReportPDF( + report.projectName!, + report.clinicDescription!, + report.doctorName, + DateUtil.convertDateToString(report.requestDate!), + (Utils.isVidaPlusProject(projectViewModel, report.projectID!) ? report.invoiceNo_VP.toString() : report.invoiceNo.toString()), + report.projectID!, + DateUtil.convertDateToString(report.requestDate!), + report.setupId!) + .then((value) async { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + if (value["MedicalReportBase64"] != "" && value["MedicalReportBase64"] != null) { + String path = await _createFileFromString(value["MedicalReportBase64"], "pdf"); + if (isShare) { + Share.shareXFiles([XFile(path)], text: "Medical Report"); + } else { + try { + OpenFilex.open(path); + } catch (ex) { + AppToast.showErrorToast(message: "Cannot open file."); + } + } + } else { + AppToast.showErrorToast(message: "Cannot open file."); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + print(err); + }); + } + + sendReportEmail(Reports report) { + GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + ReportsService _reportsService = locator(); + _reportsService + .sendEmailForMedicalReport( + report.projectName!, + report.clinicDescription!, + report.doctorName, + DateUtil.convertDateToString(report.requestDate!), + Utils.isVidaPlusProject(projectViewModel, report.projectID!) ? report.invoiceNo_VP.toString() : report.invoiceNo.toString(), + report.projectID!, + DateUtil.convertDateToString(report.requestDate!), + report.setupId!) + .then((value) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + AppToast.showSuccessToast(message: TranslationBase.of(AppGlobal.context).emailSentSuccessfully); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + print(err); + }); + } + + Future _createFileFromString(String encodedStr, String ext) async { + Uint8List bytes = base64.decode(encodedStr); + String dir = (await getApplicationDocumentsDirectory()).path; + File file = File("$dir/" + DateTime.now().millisecondsSinceEpoch.toString() + "." + ext); + await file.writeAsBytes(bytes); + return file.path; + } +} diff --git a/lib/pages/medical/reports/reports_page.dart b/lib/pages/medical/reports/reports_page.dart new file mode 100644 index 00000000..6e1f5081 --- /dev/null +++ b/lib/pages/medical/reports/reports_page.dart @@ -0,0 +1,152 @@ +import 'package:diplomaticquarterapp/core/viewModels/medical/reports_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:provider/provider.dart'; + +class MedicalReports extends StatelessWidget { + @override + Widget build(BuildContext context) { + void confirmBox(AppointmentHistory model, ReportsViewModel reportsViewModel) { + showDialog( + context: context, + builder: (cxt) => ConfirmWithMessageDialog( + message: TranslationBase.of(context).confirmMsgReport, + onTap: () => reportsViewModel.insertRequestForMedicalReport(model, TranslationBase.of(context).successSendReport), + ), + ).then((value) { + Navigator.pop(context); + }); + return; + } + + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getPatentAppointmentHistory(), + builder: (_, model, widget) => AppScaffold( + baseViewModel: model, + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).medReport, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF7F7F7), + body: model.appointHistoryList.isEmpty + ? getNoDataWidget(context) + : ListView.separated( + physics: BouncingScrollPhysics(), + itemCount: model.appointHistoryList.length, + padding: EdgeInsets.all(21), + separatorBuilder: (context, index) => SizedBox(height: 14), + itemBuilder: (context, index) { + AppointmentHistory _appointmenHistory = model.appointHistoryList[index]; + return InkWell( + onTap: () => confirmBox(model.appointHistoryList[index], model), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Padding( + padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + if ((_appointmenHistory.doctorName ?? _appointmenHistory.doctorNameObj) != null) + Text( + _appointmenHistory.doctorTitle.toString() + " " + (_appointmenHistory.doctorName ?? _appointmenHistory.doctorNameObj), + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + Text( + DateUtil.getDayMonthYearDateFormatted(_appointmenHistory.appointmentDate!), + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12), + ), + ], + ), + if ((_appointmenHistory.doctorName ?? _appointmenHistory.doctorNameObj) != null) SizedBox(height: 6), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + LargeAvatar( + name: _appointmenHistory.doctorName, + url: _appointmenHistory.doctorImageURL, + width: 48, + height: 48, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + if (_appointmenHistory.projectName != null) MyRichText(TranslationBase.of(context).clinic + ":", _appointmenHistory.projectName!, projectViewModel.isArabic), + if (_appointmenHistory.clinicName != null) MyRichText(TranslationBase.of(context).hospital + ":", _appointmenHistory.clinicName!, projectViewModel.isArabic), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + RatingBar( + initialRating: _appointmenHistory.actualDoctorRate!.toDouble(), + itemSize: 16, + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star_border, + color: CustomColors.accentColor, + ), + ), + onRatingUpdate: (double value) {}, + unratedColor: Colors.grey[500], + updateOnDrag: false, + tapOnlyMode: false, + ), + Icon(Icons.email, color: Color(0xff2B353E)) + ], + ), + ], + ), + ), + ], + ), + ], + ), + ), + ), + ); + }, + ), + ), + ); + } +} diff --git a/lib/pages/medical/reports/user_agreement_page.dart b/lib/pages/medical/reports/user_agreement_page.dart new file mode 100644 index 00000000..d48ff16d --- /dev/null +++ b/lib/pages/medical/reports/user_agreement_page.dart @@ -0,0 +1,27 @@ +import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter_html/flutter_html.dart'; + +class UserAgreementContent extends StatelessWidget { + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getUserTermsAndConditions(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + baseViewModel: model, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF7F7F7), + appBarTitle: TranslationBase.of(context).userAgreement, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Html(data: model.userAgreementContent), + ), + ), + ); + } +} diff --git a/lib/pages/medical/sickleave_workplace_update_page.dart b/lib/pages/medical/sickleave_workplace_update_page.dart new file mode 100644 index 00000000..ec7991cb --- /dev/null +++ b/lib/pages/medical/sickleave_workplace_update_page.dart @@ -0,0 +1,255 @@ +import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class WorkplaceUpdatePage extends StatefulWidget { + final int requestNumber; + final String setupID; + final int projectID; + + WorkplaceUpdatePage({required this.requestNumber, required this.setupID, required this.projectID}); + + @override + _WorkplaceUpdatePageState createState() => _WorkplaceUpdatePageState(); +} + +class _WorkplaceUpdatePageState extends State { + TextEditingController workplaceName = new TextEditingController(); + + TextEditingController workplaceNameAr = new TextEditingController(); + TextEditingController occupationNameEn = new TextEditingController(); + TextEditingController occupationNameAr = new TextEditingController(); + bool? _isButtonDisabled; + ProjectViewModel? projectViewModel; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).sickLeaves, + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGrey2Color, + body: Container( + child: Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + mHeight(12), + SvgPicture.asset("assets/images/new/workplace-icon.svg", width: 40.0, fit: BoxFit.fill), + mHeight(12), + Text( + TranslationBase.of(context).enterWorkplaceName, + textAlign: TextAlign.start, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + color: Colors.black, + letterSpacing: -0.64, + ), + ), + mHeight(8), + // inputWidget(TranslationBase.of(context).workplaceName, "", workplaceName), + inputWidget(TranslationBase.of(context).workplaceName, "", workplaceName, FilteringTextInputFormatter.allow(RegExp("[a-zA-Z ]"))), + mHeight(8), + inputWidget(TranslationBase.of(context).workplaceNameAr, "", workplaceNameAr, FilteringTextInputFormatter.allow(RegExp("[ء-ي ]"))), + mHeight(8), + inputWidget(TranslationBase.of(context).occupationNameEn, "", occupationNameEn, FilteringTextInputFormatter.allow(RegExp("[a-zA-Z ]"))), + mHeight(8), + inputWidget(TranslationBase.of(context).occupationNameAr, "", occupationNameAr, FilteringTextInputFormatter.allow(RegExp("[ء-ي ]"))), + ], + ), + ), + ), + ), + Card( + margin: EdgeInsets.zero, + elevation: 0, + child: Container( + padding: EdgeInsets.all(12), + child: FractionallySizedBox( + widthFactor: 1, + child: MaterialButton( + height: 50, + elevation: 0, + color: CustomColors.accentColor, + disabledColor: Colors.grey.withOpacity(0.25), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), + child: Text( + TranslationBase.of(context).submit, + style: TextStyle( + fontSize: 16.0, + letterSpacing: -0.64, + color: Colors.white, + ), + ), + onPressed: () { + // if (_isButtonDisabled == false) + if (workplaceNameAr.text.isNotEmpty && occupationNameAr.text.isNotEmpty) + // AppToast.showSuccessToast(message: "API Called"); + updateWorkplaceNameDialog(); + else + AppToast.showErrorToast(message: TranslationBase.of(context).enterDetailBelow); + }, + ), + ), + ), + ), + ], + ), + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, TextInputFormatter inputFormatter, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + // Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.name, + controller: _controller, + inputFormatters: [ + // projectViewModel!.isArabic ? FilteringTextInputFormatter.allow(RegExp("[ء-ي ]")) : FilteringTextInputFormatter.allow(RegExp("[a-zA-Z ]")), + inputFormatter + ], + onChanged: (value) => {_onPassportTextChanged(value)}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + + _onPassportTextChanged(content) { + if (content.length >= 1) { + setState(() { + _isButtonDisabled = false; + }); + } else { + setState(() { + _isButtonDisabled = true; + }); + } + } + + updateWorkplaceNameDialog() { + var messageEn = "The workplace name you entered is: " + workplaceNameAr.text + ". Please confirm!"; + var messageAr = "اسم مكان العمل الذي أدخلته هو: " + workplaceNameAr.text + ". يرجى تأكيد!"; + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: projectViewModel!.isArabic ? messageAr : messageEn, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () { + Navigator.of(context).pop(); + updateWorkplaceName(); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + + void updateWorkplaceName() { + LabsService service = new LabsService(); + GifLoaderDialogUtils.showMyDialog(context); + + service.updateWorkplaceName(workplaceName.text, workplaceNameAr.text, occupationNameEn.text, occupationNameAr.text, widget.requestNumber, widget.setupID, widget.projectID).then((res) { + // service + // .updateWorkplaceName(projectViewModel!.isArabic ? "-" : workplaceName.text, projectViewModel!.isArabic ? workplaceName.text : "-", widget.requestNumber, widget.setupID, widget.projectID) + // .then((res) { + GifLoaderDialogUtils.hideDialog(context); + Navigator.of(context).pop(true); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } +} diff --git a/lib/pages/medical/smart_watch_health_data/distance/distanceTracker.dart b/lib/pages/medical/smart_watch_health_data/distance/distanceTracker.dart new file mode 100644 index 00000000..432707ce --- /dev/null +++ b/lib/pages/medical/smart_watch_health_data/distance/distanceTracker.dart @@ -0,0 +1,577 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/SmartWatch/WeeklyStepsResModel.dart'; +import 'package:diplomaticquarterapp/models/SmartWatch/YearlyStepsResModel.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:diplomaticquarterapp/widgets/charts/show_chart.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class DistanceTracker extends StatefulWidget { + @override + _DistanceTrackerState createState() => _DistanceTrackerState(); +} + +class _DistanceTrackerState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + + late ProjectViewModel projectViewModel; + + num weeklyStatsAvgValue = 0; + num monthlyStatsAvgValue = 0; + num yearlyStatsAvgValue = 0; + + num avgWeeklyStepsValue = 0; + num avgMonthlyStepsValue = 0; + num avgYearlyStepsValue = 0; + + int weeklyDataLength = 0; + int monthlyDataLength = 0; + int yearlyDataLength = 0; + + List weekyStepsList = []; + List monthlyStepsList = []; + List yearlyStepsList = []; + + List weeklyTimeSeriesData = []; + List monthlyTimeSeriesData = []; + List yearlyTimeSeriesData = []; + + bool isWeeklyDataLoaded = false; + bool isMonthlyDataLoaded = false; + bool isYearlyDataLoaded = false; + + @override + void initState() { + _tabController = new TabController(length: 3, vsync: this); + WidgetsBinding.instance.addPostFrameCallback((_) { + getWeeklyDistanceData(); + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).distance, + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + body: Column( + mainAxisSize: MainAxisSize.min, + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 0, bottom: 0, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [ + Tab(text: TranslationBase.of(context).weekly), + Tab(text: TranslationBase.of(context).monthlyTab), + Tab(text: TranslationBase.of(context).yearly), + ], + onTap: (value) { + print(value); + if (value == 0) { + getWeeklyDistanceData(); + } else if (value == 1) { + getMonthlyDistanceData(); + } else { + getYearlyDistanceData(); + } + }, + ), + Expanded( + child: new TabBarView( + physics: NeverScrollableScrollPhysics(), + children: [ + isWeeklyDataLoaded ? getWeeklyDistanceDetails() : Container(), + isMonthlyDataLoaded ? getMonthlyDistanceDetails() : Container(), + isYearlyDataLoaded ? getYearlyDistanceDetails() : Container() + ], + controller: _tabController, + ), + ), + ], + ), + ); + } + + getWeeklyDistanceData() { + avgWeeklyStepsValue = 0; + weeklyDataLength = 0; + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getPatientHealthDataStats(7, 1, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + weekyStepsList.clear(); + res['Med_GetWeekStepsTransactionsStsList'].forEach((element) { + weekyStepsList.add(new WeeklyStepsResModel.fromJson(element)); + if (element['Value'] != null) { + num value = num.tryParse(element['Value']! ?? "0")!; + avgWeeklyStepsValue += value; + weeklyDataLength++; + } + }); + generateWeekData(); + setState(() { + if (avgWeeklyStepsValue != 0) { + weeklyStatsAvgValue = avgWeeklyStepsValue ~/ weeklyDataLength; + weeklyStatsAvgValue = weeklyStatsAvgValue / 1000; + } + isWeeklyDataLoaded = true; + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + getMonthlyDistanceData() { + avgMonthlyStepsValue = 0; + monthlyDataLength = 0; + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getPatientHealthDataStats(7, 2, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + monthlyStepsList.clear(); + res['Med_GetMonthStepsTransactionsStsList'].forEach((element) { + monthlyStepsList.add(new WeeklyStepsResModel.fromJson(element)); + if (element['Value'] != null) { + num value = num.tryParse(element['Value'] ?? "0")!; + avgMonthlyStepsValue += value; + monthlyDataLength++; + } + }); + generateMonthData(); + setState(() { + if (avgMonthlyStepsValue != 0) { + monthlyStatsAvgValue = avgMonthlyStepsValue ~/ monthlyDataLength; + monthlyStatsAvgValue = monthlyStatsAvgValue / 1000; + } + isMonthlyDataLoaded = true; + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + getYearlyDistanceData() { + avgYearlyStepsValue = 0; + yearlyDataLength = 0; + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getPatientHealthDataStats(7, 3, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + yearlyStepsList.clear(); + res['Med_GetYearStepsTransactionsStsList'].forEach((element) { + yearlyStepsList.add(new YearlyStepsResModel.fromJson(element)); + if (element['ValueSum'] != null) { + num value = element['ValueSum']; + avgYearlyStepsValue += value; + yearlyDataLength++; + } + }); + generateYearData(); + setState(() { + if (avgYearlyStepsValue != 0) { + yearlyStatsAvgValue = avgYearlyStepsValue ~/ yearlyDataLength; + yearlyStatsAvgValue = yearlyStatsAvgValue / 1000; + } + isYearlyDataLoaded = true; + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + generateWeekData() { + if (weekyStepsList.length > 0) { + weeklyTimeSeriesData.clear(); + weekyStepsList.forEach( + (element) { + weeklyTimeSeriesData.add( + TimeSeriesSales2( + DateUtil.convertStringToDate(element.machineDate ?? DateUtil.convertDateToString(DateTime.now())), + element.value != null ? (element.value!.toDouble() / 1000) : 0.0, + ), + ); + }, + ); + } + } + + generateMonthData() { + if (monthlyStepsList.length > 0) { + monthlyTimeSeriesData.clear(); + monthlyStepsList.forEach( + (element) { + monthlyTimeSeriesData.add( + TimeSeriesSales2( + DateUtil.convertStringToDate(element.machineDate!), + element.value != null ? element.value!.toDouble() / 1000 : 0.0, + ), + ); + }, + ); + } + } + + generateYearData() { + if (yearlyStepsList.length > 0) { + yearlyTimeSeriesData.clear(); + yearlyStepsList.forEach( + (element) { + yearlyTimeSeriesData.add( + TimeSeriesSales2( + new DateTime(element.year!, element.month!, 1), + element.valueSum != null ? element.valueSum!.toDouble() / 1000 : 0.0, + ), + ); + }, + ); + } + } + + getWeeklyDistanceDetails() { + return SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + child: ShowChart( + title: "", + timeSeries: weeklyTimeSeriesData, + indexes: weeklyTimeSeriesData.length ~/ 5.5, + horizontalInterval: 8, + isWeeklyOrMonthly: true, + ), + ), + Container( + child: Container( + decoration: cardRadius(12), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 5.0), + child: Text(TranslationBase.of(context).avgDistance, style: TextStyle(fontSize: 18.0)), + ), + Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Text(weeklyStatsAvgValue.toString() + " " + TranslationBase.of(context).km_, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + ], + ), + ), + ), + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text(TranslationBase.of(context).details, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + )), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + weekyStepsList.isEmpty + ? Container( + child: Center( + child: Text(TranslationBase.of(context).noDataAvailable), + ), + ) + : Table( + columnWidths: { + 0: FlexColumnWidth(2.5), + }, + children: fullDataWeekly(context), + ), + ], + ), + ) + ], + ), + ), + ], + ), + ); + } + + getMonthlyDistanceDetails() { + return SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + child: ShowChart( + title: "", + timeSeries: monthlyTimeSeriesData, + indexes: monthlyTimeSeriesData.length ~/ 5.5, + horizontalInterval: 8, + isWeeklyOrMonthly: true, + ), + ), + Container( + child: Container( + decoration: cardRadius(12), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 5.0), + child: Text(TranslationBase.of(context).avgDistance, style: TextStyle(fontSize: 18.0)), + ), + Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Text(monthlyStatsAvgValue.toString() + " " + TranslationBase.of(context).km_, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + ], + ), + ), + ), + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text(TranslationBase.of(context).details, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + )), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + monthlyStepsList.isEmpty + ? Container( + child: Center( + child: Text(TranslationBase.of(context).noDataAvailable), + ), + ) + : Table( + columnWidths: { + 0: FlexColumnWidth(2.5), + }, + children: fullDataMonthly(context), + ), + ], + ), + ) + ], + ), + ), + ], + ), + ); + } + + getYearlyDistanceDetails() { + return SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + child: ShowChart( + title: "", + timeSeries: yearlyTimeSeriesData, + indexes: yearlyTimeSeriesData.length ~/ 5.5, + horizontalInterval: 8, + ), + ), + Container( + child: Container( + decoration: cardRadius(12), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 5.0), + child: Text(TranslationBase.of(context).avgDistance, style: TextStyle(fontSize: 18.0)), + ), + Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Text(yearlyStatsAvgValue.toString() + " " + TranslationBase.of(context).km_, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + ], + ), + ), + ), + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text(TranslationBase.of(context).details, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + )), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + yearlyStepsList.isEmpty + ? Container( + child: Center( + child: Text(TranslationBase.of(context).noDataAvailable), + ), + ) + : Table( + columnWidths: { + 0: FlexColumnWidth(2.5), + }, + children: fullData(context), + ), + ], + ), + ) + ], + ), + ), + ], + ), + ); + } + + List fullDataWeekly(BuildContext context) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).distance), + ], + ), + ); + weekyStepsList.forEach( + (step) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue( + '${DateUtil.getDayMonthYearDateFormatted( + DateUtil.convertStringToDate(step.machineDate ?? DateUtil.convertDateToString(DateTime.now())), + )} ', + isCapitable: false, + mProjectViewModel: projectViewModel), + Utils.tableColumnValue((step.value! / 1000).toString() + " " + TranslationBase.of(context).km_, isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + }, + ); + return tableRow; + } + + List fullDataMonthly(BuildContext context) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).distance), + ], + ), + ); + monthlyStepsList.forEach( + (step) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue( + '${DateUtil.getDayMonthYearDateFormatted( + DateUtil.convertStringToDate(step.machineDate!), + )} ', + isCapitable: false, + mProjectViewModel: projectViewModel), + Utils.tableColumnValue((step.value! / 1000).toString() + " " + TranslationBase.of(context).km_, isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + }, + ); + return tableRow; + } + + List fullData(BuildContext context) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).distance), + ], + ), + ); + yearlyStepsList.forEach( + (step) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue( + '${DateUtil.getDayMonthYearDateFormatted( + new DateTime(step.year!, step.month!, 1), + )} ', + isCapitable: false, + mProjectViewModel: projectViewModel), + Utils.tableColumnValue(step.valueSum != null ? (step.valueSum! / 1000).toString() + " " + TranslationBase.of(context).km_ : "0.0 " + TranslationBase.of(context).km_, + isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + }, + ); + return tableRow; + } +} diff --git a/lib/pages/medical/smart_watch_health_data/health_data_list.dart b/lib/pages/medical/smart_watch_health_data/health_data_list.dart new file mode 100644 index 00000000..664178a4 --- /dev/null +++ b/lib/pages/medical/smart_watch_health_data/health_data_list.dart @@ -0,0 +1,127 @@ +import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/Steps/stepsTracker.dart'; +import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/distance/distanceTracker.dart'; +import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/heartrate/heartrateTracker.dart'; +import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/syncHealthData.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; + +// import 'package:fit_kit/fit_kit.dart'; +import 'package:flutter/material.dart'; + +class HealthDataList extends StatefulWidget { + @override + _HealthDataListState createState() => _HealthDataListState(); +} + +class _HealthDataListState extends State { + // List dataTypes =[]; + + @override + void initState() { + // dataTypes.add(DataType.DISTANCE); + // dataTypes.add(DataType.STEP_COUNT); + // dataTypes.add(DataType.HEART_RATE); + // dataTypes.add(DataType.SLEEP); + // dataTypes.add(DataType.ENERGY); + + super.initState(); + } + + @override + Widget build(BuildContext context) { + List myMedicalList = myOptionsList(context); + return AppScaffold( + appBarTitle: TranslationBase.of(context).smartWatches, + isShowAppBar: true, + showNewAppBar: true, + backgroundColor: Color(0xffF7F7F7), + showNewAppBarTitle: true, + body: Column( + children: [ + Expanded( + child: GridView.builder( + physics: BouncingScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + padding: EdgeInsets.all(21), + itemCount: myMedicalList.length, + itemBuilder: (BuildContext context, int index) { + return myMedicalList[index]; + }, + ), + ), + syncHealthDataButton(), + ], + ), + ); + } + + List myOptionsList(BuildContext context) { + List medical = []; + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: HeartRateTracker()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).heart, + imagePath: 'assets/images/SmartWatches/heartrate_icon.png', + subTitle: "", + isPngImage: true, + ), + )); + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: StepsTracker()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).steps, + imagePath: 'assets/images/SmartWatches/steps.png', + subTitle: "", + isPngImage: true, + ), + )); + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: DistanceTracker()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).distance, + imagePath: 'assets/images/SmartWatches/distance.png', + subTitle: "", + isPngImage: true, + ), + )); + + return medical; + } + +// void readLast() async { +// print("ReadLast"); +// final result = await FitKit.readLast(DataType.DISTANCE); +// print(result); +// print(result); +// } +// +// void readAll() async { +// if (await FitKit.requestPermissions(dataTypes)) { +// for (DataType type in dataTypes) { +// final results = await FitKit.read( +// type, +// dateFrom: DateTime.now().subtract(Duration(days: 7)), +// dateTo: DateTime.now(), +// limit: 100, +// ); +// print(results); +// print(results.length); +// } +// readLast(); +// } +// } +} diff --git a/lib/pages/medical/smart_watch_health_data/heartrate/heartrateTracker.dart b/lib/pages/medical/smart_watch_health_data/heartrate/heartrateTracker.dart new file mode 100644 index 00000000..97c61ee0 --- /dev/null +++ b/lib/pages/medical/smart_watch_health_data/heartrate/heartrateTracker.dart @@ -0,0 +1,578 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/SmartWatch/WeeklyHeartRateResModel.dart'; +import 'package:diplomaticquarterapp/models/SmartWatch/YearlyHeartRateResModel.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:diplomaticquarterapp/widgets/charts/show_chart.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class HeartRateTracker extends StatefulWidget { + @override + _HeartRateTrackerState createState() => _HeartRateTrackerState(); +} + +class _HeartRateTrackerState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + + late ProjectViewModel projectViewModel; + + num weeklyStatsAvgValue = 0; + num monthlyStatsAvgValue = 0; + num yearlyStatsAvgValue = 0; + + num avgWeeklyHearRateValue = 0; + num avgMonthlyHearRateValue = 0; + num avgYearlyHearRateValue = 0; + + int weeklyDataLength = 0; + int monthlyDataLength = 0; + int yearlyDataLength = 0; + + List weekyHearRateList = []; + List monthlyHearRateList = []; + List yearlyHearRateList = []; + + List weeklyTimeSeriesData = []; + List monthlyTimeSeriesData = []; + List yearlyTimeSeriesData = []; + + bool isWeeklyDataLoaded = false; + bool isMonthlyDataLoaded = false; + bool isYearlyDataLoaded = false; + + @override + void initState() { + _tabController = new TabController(length: 3, vsync: this); + WidgetsBinding.instance.addPostFrameCallback((_) { + getWeeklyHeartRateData(); + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).heart, + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + body: Column( + mainAxisSize: MainAxisSize.min, + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 0, bottom: 0, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [ + Tab(text: TranslationBase.of(context).weekly), + Tab(text: TranslationBase.of(context).monthlyTab), + Tab(text: TranslationBase.of(context).yearly), + ], + onTap: (value) { + print(value); + if (value == 0) { + getWeeklyHeartRateData(); + } else if (value == 1) { + getMonthlyHeartRateData(); + } else { + getYearlyHeartRateData(); + } + }, + ), + Expanded( + child: new TabBarView( + physics: NeverScrollableScrollPhysics(), + children: [ + isWeeklyDataLoaded + ? avgWeeklyHearRateValue != 0 + ? getWeeklyHeartRateDetails() + : getNoDataWidget(context) + : Container(), + isMonthlyDataLoaded ? getMonthlyHeartRateDetails() : Container(), + isYearlyDataLoaded ? getYearlyHeartRateDetails() : Container() + ], + controller: _tabController, + ), + ), + ], + ), + ); + } + + getWeeklyHeartRateData() { + avgWeeklyHearRateValue = 0; + weeklyDataLength = 0; + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getPatientHealthDataStats(3, 1, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + weekyHearRateList.clear(); + res['Med_GetAvgWeekTransactionsStsList'].forEach((element) { + if (element['ValueAvg'] != null) { + weekyHearRateList.add(new WeeklyHeartRateResModel.fromJson(element)); + num value = element['ValueAvg']; + avgWeeklyHearRateValue += value.toInt(); + weeklyDataLength++; + } + }); + if (weekyHearRateList.isNotEmpty) generateWeekData(); + setState(() { + if (avgWeeklyHearRateValue != 0) { + weeklyStatsAvgValue = avgWeeklyHearRateValue ~/ weeklyDataLength; + } + isWeeklyDataLoaded = true; + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + getMonthlyHeartRateData() { + avgMonthlyHearRateValue = 0; + monthlyDataLength = 0; + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getPatientHealthDataStats(3, 2, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + monthlyHearRateList.clear(); + print(res['Med_GetAvgMonthTransactionsStsList'].length); + res['Med_GetAvgMonthTransactionsStsList'].forEach((element) { + monthlyHearRateList.add(new WeeklyHeartRateResModel.fromJson(element)); + if (element['ValueAvg'] != null) { + num value = element['ValueAvg']; + avgMonthlyHearRateValue += value.toInt(); + monthlyDataLength++; + } + }); + generateMonthData(); + setState(() { + if (avgMonthlyHearRateValue != 0) { + monthlyStatsAvgValue = avgMonthlyHearRateValue ~/ monthlyDataLength; + } + isMonthlyDataLoaded = true; + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + getYearlyHeartRateData() { + avgYearlyHearRateValue = 0; + yearlyDataLength = 0; + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getPatientHealthDataStats(3, 3, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + yearlyHearRateList.clear(); + res['Med_GetYearTransactionsStsList'].forEach((element) { + yearlyHearRateList.add(new YearlyHeartRateResModel.fromJson(element)); + if (element['ValueAvg'] != null) { + num value = element['ValueAvg']; + avgYearlyHearRateValue += value; + yearlyDataLength++; + } + }); + generateYearData(); + setState(() { + if (avgYearlyHearRateValue != 0) { + yearlyStatsAvgValue = avgYearlyHearRateValue ~/ yearlyDataLength; + } + isYearlyDataLoaded = true; + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + generateWeekData() { + if (weekyHearRateList.length > 0) { + weeklyTimeSeriesData.clear(); + weekyHearRateList.forEach( + (element) { + weeklyTimeSeriesData.add( + TimeSeriesSales2( + DateUtil.convertStringToDate(element.machineDate!), + element.valueAvg != null ? element.valueAvg!.toDouble() : 0.0, + ), + ); + }, + ); + } + } + + generateMonthData() { + if (monthlyHearRateList.length > 0) { + monthlyTimeSeriesData.clear(); + monthlyHearRateList.forEach( + (element) { + monthlyTimeSeriesData.add( + TimeSeriesSales2( + DateUtil.convertStringToDate(element.machineDate!), + element.valueAvg != null ? element.valueAvg!.toDouble() : 0.0, + ), + ); + }, + ); + } + } + + generateYearData() { + if (yearlyHearRateList.length > 0) { + yearlyTimeSeriesData.clear(); + yearlyHearRateList.forEach( + (element) { + yearlyTimeSeriesData.add( + TimeSeriesSales2( + new DateTime(element.year!, element.month!, 1), + element.valueAvg != null ? element.valueAvg!.toDouble() : 0.0, + ), + ); + }, + ); + } + } + + getWeeklyHeartRateDetails() { + return SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + child: ShowChart( + title: "", + timeSeries: weeklyTimeSeriesData, + indexes: weeklyTimeSeriesData.length ~/ 5.5, + horizontalInterval: 8, + isWeeklyOrMonthly: true, + ), + ), + Container( + child: Container( + decoration: cardRadius(12), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 5.0), + child: Text(TranslationBase.of(context).avgHeartRate, style: TextStyle(fontSize: 18.0)), + ), + Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Text(weeklyStatsAvgValue.toString() + " " + TranslationBase.of(context).bpm, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + ], + ), + ), + ), + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text(TranslationBase.of(context).details, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + )), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + weekyHearRateList.isEmpty + ? Container( + child: Center( + child: Text(TranslationBase.of(context).noDataAvailable), + ), + ) + : Table( + columnWidths: { + 0: FlexColumnWidth(2.5), + }, + children: fullDataWeekly(context), + ), + ], + ), + ) + ], + ), + ), + ], + ), + ); + } + + getMonthlyHeartRateDetails() { + return SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + child: ShowChart( + title: "", + timeSeries: monthlyTimeSeriesData, + indexes: monthlyTimeSeriesData.length ~/ 5.5, + horizontalInterval: 8, + isWeeklyOrMonthly: true, + ), + ), + Container( + child: Container( + decoration: cardRadius(12), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 5.0), + child: Text(TranslationBase.of(context).avgHeartRate, style: TextStyle(fontSize: 18.0)), + ), + Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Text(monthlyStatsAvgValue.toString() + " " + TranslationBase.of(context).bpm, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + ], + ), + ), + ), + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text(TranslationBase.of(context).details, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + )), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + monthlyHearRateList.isEmpty + ? Container( + child: Center( + child: Text(TranslationBase.of(context).noDataAvailable), + ), + ) + : Table( + columnWidths: { + 0: FlexColumnWidth(2.5), + }, + children: fullDataMonthly(context), + ), + ], + ), + ) + ], + ), + ), + ], + ), + ); + } + + getYearlyHeartRateDetails() { + return SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + child: ShowChart( + title: "", + timeSeries: yearlyTimeSeriesData, + indexes: yearlyTimeSeriesData.length ~/ 5.5, + horizontalInterval: 8, + ), + ), + Container( + child: Container( + decoration: cardRadius(12), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 5.0), + child: Text(TranslationBase.of(context).avgHeartRate, style: TextStyle(fontSize: 18.0)), + ), + Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Text(yearlyStatsAvgValue.toString() + " " + TranslationBase.of(context).bpm, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + ], + ), + ), + ), + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text(TranslationBase.of(context).details, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + )), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + yearlyHearRateList.isEmpty + ? Container( + child: Center( + child: Text(TranslationBase.of(context).noDataAvailable), + ), + ) + : Table( + columnWidths: { + 0: FlexColumnWidth(2.5), + }, + children: fullData(context), + ), + ], + ), + ) + ], + ), + ), + ], + ), + ); + } + + List fullDataWeekly(BuildContext context) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).heart), + ], + ), + ); + weekyHearRateList.forEach( + (step) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue( + '${DateUtil.getDayMonthYearDateFormatted( + DateUtil.convertStringToDate(step.machineDate!), + )} ', + isCapitable: false, + mProjectViewModel: projectViewModel), + Utils.tableColumnValue(step.valueAvg.toString() + " " + TranslationBase.of(context).bpm, isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + }, + ); + return tableRow; + } + + List fullDataMonthly(BuildContext context) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).heart), + ], + ), + ); + monthlyHearRateList.forEach( + (step) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue( + '${DateUtil.getDayMonthYearDateFormatted( + DateUtil.convertStringToDate(step.machineDate!), + )} ', + isCapitable: false, + mProjectViewModel: projectViewModel), + Utils.tableColumnValue(step.valueAvg.toString() + " " + TranslationBase.of(context).bpm, isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + }, + ); + return tableRow; + } + + List fullData(BuildContext context) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).distance), + ], + ), + ); + yearlyHearRateList.forEach( + (step) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue( + '${DateUtil.getDayMonthYearDateFormatted( + new DateTime(step.year!, step.month!, 1), + )} ', + isCapitable: false, + mProjectViewModel: projectViewModel), + Utils.tableColumnValue(step.valueAvg.toString() + " " + TranslationBase.of(context).bpm, isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + }, + ); + return tableRow; + } +} diff --git a/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart b/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart new file mode 100644 index 00000000..8ca443be --- /dev/null +++ b/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart @@ -0,0 +1,649 @@ +import 'dart:io'; + +// import 'package:carousel_slider/carousel_slider.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart'; +import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class SmartWatchInstructions extends StatefulWidget { + @override + _SmartWatchInstructionsState createState() => _SmartWatchInstructionsState(); +} + +class _SmartWatchInstructionsState extends State { + // CarouselController buttonCarouselController = CarouselController(); + + bool hasAlreadySynced = false; + + AuthenticatedUserObject authenticatedUserObject = locator(); + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { + if (authenticatedUserObject.isLogin) getLastPatientRecord(context); + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).smartWatches, + isShowAppBar: true, + isShowDecPage: true, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF7F7F7), + description: TranslationBase.of(context).infoHealthData, + imagesInfo: [ + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/0.png'), + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/1.png') + ], + body: Column( + children: [ + Expanded( + child: Container( + child: Platform.isIOS ? _getAppleWatchInstructions() : _getGoogleWatchInstructions(), + ), + ), + DefaultButton( + TranslationBase.of(context).continues, + () { + _openHealthDataList(); + }, + color: Color(0xff359846), + ).insideContainer + ], + ), + ); + } + + _getAppleWatchInstructions() { + return SingleChildScrollView( + padding: EdgeInsets.all(21), + physics: BouncingScrollPhysics(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).supportedWatches, + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.w600, + letterSpacing: -1.2, + color: Color(0xff2E303A), + ), + ), + Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/apple-watch-1.jpeg", width: 70.0, height: 70.0), + Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Apple Watch Series 1", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ), + ) + ], + ), + ), + ), + Expanded( + child: Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/apple-watch-2.jpg", width: 70.0, height: 70.0), + Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Apple Watch Series 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ), + ) + ], + ), + ), + ), + ], + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(top: 15.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/apple-watch-3.jpg", width: 70.0, height: 70.0), + Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Apple Watch Series 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ), + ) + ], + ), + ), + ), + Expanded( + child: Container( + margin: EdgeInsets.only(top: 15.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/apple-watch-4.jpg", width: 70.0, height: 70.0), + Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Apple Watch Series 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ), + ) + ], + ), + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(top: 15.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/apple-watch-5.jpg", width: 70.0, height: 70.0), + Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Apple Watch Series 5", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ), + ) + ], + ), + ), + ), + Expanded( + child: Container( + margin: EdgeInsets.only(top: 15.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/Apple-Watch-6.png", width: 70.0, height: 70.0), + Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Apple Watch Series 6", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ), + ) + ], + ), + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(top: 15.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/miBand3.jpg", width: 70.0, height: 70.0), + Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Mi Band 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ), + ) + ], + ), + ), + ), + Expanded( + child: Container( + margin: EdgeInsets.only(top: 15.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/miBand4.jpg", width: 70.0, height: 70.0), + Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Mi Band 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ), + ) + ], + ), + ), + ), + ], + ), + ), + SizedBox(height: 12), + Text( + TranslationBase.of(context).syncInstructionsIntro1, + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.56, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + ), + ), + SizedBox(height: 12), + Text( + TranslationBase.of(context).syncInstructionsIntro2, + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.56, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + ), + ), + SizedBox(height: 12), + InkWell( + onTap: () { + showInstructionsDialog(); + }, + child: Text(TranslationBase.of(context).watchInstructions, + style: TextStyle(color: CustomColors.accentColor, fontWeight: FontWeight.w600, letterSpacing: -0.64, decoration: TextDecoration.underline)), + ), + ], + ), + ); + } + + _getGoogleWatchInstructions() { + return SingleChildScrollView( + padding: EdgeInsets.all(21), + physics: BouncingScrollPhysics(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).supportedWatches, + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.w600, + letterSpacing: -1.2, + color: Color(0xff2E303A), + ), + ), + Container( + child: Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/huawei-watch-2.png", width: 70.0, height: 70.0), + Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Huawei Watch 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ) + ], + ), + ), + ), + Expanded( + child: Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/ticwatche2.png", width: 70.0, height: 70.0), + Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Mobovi TicWatch E2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ) + ], + ), + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(top: 15.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/huawei-watch-2-classic.png", width: 70.0, height: 70.0), + Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Huawei Watch", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ) + ], + ), + ), + ), + Expanded( + child: Container( + margin: EdgeInsets.only(top: 15.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/ticwatche2.png", width: 70.0, height: 70.0), + Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Fossil Sport", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ) + ], + ), + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(top: 15.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/misfit-vapor-2.jpg", width: 70.0, height: 70.0), + Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("MisFit Vapor 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ) + ], + ), + ), + ), + Expanded( + child: Container( + margin: EdgeInsets.only(top: 15.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/lg-watch-sport.jpg", width: 70.0, height: 70.0), + Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("LG Watch Sport", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ) + ], + ), + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(top: 15.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/miBand3.jpg", width: 70.0, height: 70.0), + Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Mi Band 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ) + ], + ), + ), + ), + Expanded( + child: Container( + margin: EdgeInsets.only(top: 15.0), + child: Row( + children: [ + Image.asset("assets/images/SmartWatches/miBand4.jpg", width: 70.0, height: 70.0), + Container( + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Mi Band 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), + ) + ], + ), + ), + ), + ], + ), + ), + SizedBox(height: 12), + InkWell( + onTap: () { + launch("https://wearos.google.com/#find-your-watch"); + }, + child: Text( + TranslationBase.of(context).moreSupportedWatches, + style: TextStyle(fontSize: 14.0, color: Colors.blue, fontWeight: FontWeight.w600, decoration: TextDecoration.underline, letterSpacing: -0.56), + ), + ), + SizedBox(height: 12), + Text( + TranslationBase.of(context).syncInstructionsIntro1, + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.56, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + ), + ), + SizedBox(height: 12), + Text( + TranslationBase.of(context).syncInstructionsIntro2, + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.56, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + ), + ), + SizedBox(height: 12), + InkWell( + onTap: () { + showInstructionsDialog(); + }, + child: Text( + TranslationBase.of(context).watchInstructions, + style: TextStyle(color: CustomColors.accentColor, fontWeight: FontWeight.w600, letterSpacing: -0.64, decoration: TextDecoration.underline), + ), + ), + ], + ), + ); + } + + showInstructionsDialog() { + showGeneralDialog( + barrierColor: Colors.black.withOpacity(0.5), + transitionBuilder: (context, a1, a2, widget) { + final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0; + return Transform( + transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), + child: Opacity( + opacity: a1.value, + child: Dialog( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: 350.0, + padding: EdgeInsets.all(21), + color: Colors.white, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + TranslationBase.of(context).smartWatches, + style: TextStyle(fontSize: 18.0, color: Color(0xff2E303A), fontWeight: FontWeight.w600, letterSpacing: -1.2), + ), + IconButton( + icon: Icon( + Icons.close, + color: Color(0xff2E303A), + ), + onPressed: () { + Navigator.pop(context); + }, + ), + ], + ), + Text( + TranslationBase.of(context).syncInstructionsIntro3, + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.56, + color: Color(0xff575757), + ), + ), + SizedBox(height: 12), + Platform.isIOS + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).iosInstructions1, + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.56, + color: Color(0xff575757), + ), + ), + SizedBox(height: 12), + Text( + TranslationBase.of(context).iosInstructions2, + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.56, + color: Color(0xff575757), + ), + ), + SizedBox(height: 12), + Text( + TranslationBase.of(context).iosInstructions3, + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.56, + color: Color(0xff575757), + ), + ), + ], + ) + : Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).androidInstructions1, + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.56, + color: Color(0xff575757), + ), + ), + SizedBox(height: 12), + Text( + TranslationBase.of(context).androidInstructions2, + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.56, + color: Color(0xff575757), + ), + ), + SizedBox(height: 12), + Text( + TranslationBase.of(context).androidInstructions3, + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.56, + color: Color(0xff575757), + ), + ), + SizedBox(height: 12), + Text( + TranslationBase.of(context).androidInstructions4, + style: TextStyle( + fontSize: 14.0, + letterSpacing: -0.56, + color: Color(0xff575757), + ), + ), + ], + ), + ], + ), + ), + ], + ), + ), + ), + ); + }, + transitionDuration: Duration(milliseconds: 500), + barrierDismissible: true, + barrierLabel: '', + context: context, + pageBuilder: (context, animation1, animation2) { + return SizedBox(); + //Chanbged By Aamir + }); + } + + getLastPatientRecord(BuildContext context) { + SmartWatchIntegrationService service = new SmartWatchIntegrationService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getLastPatientRecord(context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + print(res['Med_GetPatientLastRecordList']); + setState(() { + if (res['Med_GetPatientLastRecordList'] != null) + hasAlreadySynced = true; + else + hasAlreadySynced = false; + }); + } else {} + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + _openHealthDataList() { + Navigator.push( + context, + FadePage( + page: HealthDataList(), + ), + ); + } +} diff --git a/lib/pages/medical/smart_watch_health_data/steps/stepsTracker.dart b/lib/pages/medical/smart_watch_health_data/steps/stepsTracker.dart new file mode 100644 index 00000000..a9a19945 --- /dev/null +++ b/lib/pages/medical/smart_watch_health_data/steps/stepsTracker.dart @@ -0,0 +1,572 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/SmartWatch/WeeklyStepsResModel.dart'; +import 'package:diplomaticquarterapp/models/SmartWatch/YearlyStepsResModel.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:diplomaticquarterapp/widgets/charts/show_chart.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class StepsTracker extends StatefulWidget { + @override + _StepsTrackerState createState() => _StepsTrackerState(); +} + +class _StepsTrackerState extends State with SingleTickerProviderStateMixin { + late TabController _tabController; + + late ProjectViewModel projectViewModel; + + int weeklyStatsAvgValue = 0; + int monthlyStatsAvgValue = 0; + int yearlyStatsAvgValue = 0; + + int avgWeeklyStepsValue = 0; + int avgMonthlyStepsValue = 0; + int avgYearlyStepsValue = 0; + + int weeklyDataLength = 0; + int monthlyDataLength = 0; + int yearlyDataLength = 0; + + List weekyStepsList =[]; + List monthlyStepsList =[]; + List yearlyStepsList =[]; + + List weeklyTimeSeriesData = []; + List monthlyTimeSeriesData = []; + List yearlyTimeSeriesData = []; + + bool isWeeklyDataLoaded = false; + bool isMonthlyDataLoaded = false; + bool isYearlyDataLoaded = false; + + @override + void initState() { + _tabController = new TabController(length: 3, vsync: this); + WidgetsBinding.instance.addPostFrameCallback((_) { + getWeeklyStepsData(); + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).steps, + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + body: Column( + mainAxisSize: MainAxisSize.min, + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 0, bottom: 0, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [ + Tab(text: TranslationBase.of(context).weekly), + Tab(text: TranslationBase.of(context).monthlyTab), + Tab(text: TranslationBase.of(context).yearly), + ], + onTap: (value) { + if (value == 0) { + getWeeklyStepsData(); + } else if (value == 1) { + getMonthlyStepsData(); + } else { + getYearlyStepsData(); + } + }, + ), + Expanded( + child: new TabBarView( + physics: NeverScrollableScrollPhysics(), + children: [ + isWeeklyDataLoaded ? getWeeklyStepsDetails() : Container(), + isMonthlyDataLoaded ? getMonthlyStepsDetails() : Container(), + isYearlyDataLoaded ? getYearlyStepsDetails() : Container() + ], + controller: _tabController, + ), + ), + ], + ), + ); + } + + getWeeklyStepsData() { + avgWeeklyStepsValue = 0; + weeklyDataLength = 0; + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getPatientHealthDataStats(6, 1, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + weekyStepsList.clear(); + res['Med_GetWeekStepsTransactionsStsList'].forEach((element) { + weekyStepsList.add(new WeeklyStepsResModel.fromJson(element)); + if (element['Value'] != null) { + num value = num.tryParse(element['Value'] ?? "0")!; + avgWeeklyStepsValue += value.toInt(); + weeklyDataLength++; + } + }); + generateWeekData(); + setState(() { + if (avgWeeklyStepsValue != 0) { + weeklyStatsAvgValue = avgWeeklyStepsValue ~/ weeklyDataLength; + } + isWeeklyDataLoaded = true; + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + getMonthlyStepsData() { + avgMonthlyStepsValue = 0; + monthlyDataLength = 0; + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getPatientHealthDataStats(6, 2, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + monthlyStepsList.clear(); + res['Med_GetMonthStepsTransactionsStsList'].forEach((element) { + monthlyStepsList.add(new WeeklyStepsResModel.fromJson(element)); + if (element['Value'] != null) { + num value = num.tryParse(element['Value'] ?? "0")!; + avgMonthlyStepsValue += value.toInt(); + monthlyDataLength++; + } + }); + generateMonthData(); + setState(() { + if (avgMonthlyStepsValue != 0) { + monthlyStatsAvgValue = avgMonthlyStepsValue ~/ monthlyDataLength; + } + isMonthlyDataLoaded = true; + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + getYearlyStepsData() { + avgYearlyStepsValue = 0; + yearlyDataLength = 0; + DoctorsListService service = new DoctorsListService(); + GifLoaderDialogUtils.showMyDialog(context); + service.getPatientHealthDataStats(6, 3, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + yearlyStepsList.clear(); + res['Med_GetYearStepsTransactionsStsList'].forEach((element) { + yearlyStepsList.add(new YearlyStepsResModel.fromJson(element)); + if (element['ValueSum'] != null) { + num value = element['ValueSum']; + avgYearlyStepsValue += value.toInt(); + yearlyDataLength++; + } + }); + generateYearData(); + setState(() { + if (avgYearlyStepsValue != 0) { + yearlyStatsAvgValue = avgYearlyStepsValue ~/ yearlyDataLength; + } + isYearlyDataLoaded = true; + }); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + generateWeekData() { + if (weekyStepsList.length > 0) { + weeklyTimeSeriesData.clear(); + weekyStepsList.forEach( + (element) { + weeklyTimeSeriesData.add( + TimeSeriesSales2( + DateUtil.convertStringToDate(element.machineDate ?? DateUtil.convertDateToString(DateTime.now())), + element.value != null ? element.value!.toDouble() : 0.0, + ), + ); + }, + ); + } + } + + generateMonthData() { + if (monthlyStepsList.length > 0) { + monthlyTimeSeriesData.clear(); + monthlyStepsList.forEach( + (element) { + monthlyTimeSeriesData.add( + TimeSeriesSales2( + DateUtil.convertStringToDate(element.machineDate!), + element.value != null ? element.value!.toDouble() : 0.0, + ), + ); + }, + ); + } + } + + generateYearData() { + if (yearlyStepsList.length > 0) { + yearlyTimeSeriesData.clear(); + yearlyStepsList.forEach( + (element) { + yearlyTimeSeriesData.add( + TimeSeriesSales2( + DateTime(element.year!, element.month!, 1), + element.valueSum != null ? double.tryParse(element.valueSum.toString())! : 0.0, + ), + ); + }, + ); + } + } + + getWeeklyStepsDetails() { + return SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + child: ShowChart( + title: "", + timeSeries: weeklyTimeSeriesData, + indexes: weeklyTimeSeriesData.length ~/ 5.5, + horizontalInterval: 8, + isWeeklyOrMonthly: true, + ), + ), + Container( + child: Container( + decoration: cardRadius(12), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 5.0), + child: Text(TranslationBase.of(context).avgSteps, style: TextStyle(fontSize: 18.0)), + ), + Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Text(weeklyStatsAvgValue.toString() + " " + TranslationBase.of(context).steps, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + ], + ), + ), + ), + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text(TranslationBase.of(context).details, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + )), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + weekyStepsList.isEmpty + ? Container( + child: Center( + child: Text(TranslationBase.of(context).noDataAvailable), + ), + ) + : Table( + columnWidths: { + 0: FlexColumnWidth(2.5), + }, + children: fullDataWeekly(context), + ), + ], + ), + ) + ], + ), + ), + ], + ), + ); + } + + getMonthlyStepsDetails() { + return SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + child: ShowChart( + title: "", + timeSeries: monthlyTimeSeriesData, + indexes: monthlyTimeSeriesData.length ~/ 5.5, + horizontalInterval: 8, + isWeeklyOrMonthly: true, + ), + ), + Container( + child: Container( + decoration: cardRadius(12), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 5.0), + child: Text(TranslationBase.of(context).avgSteps, style: TextStyle(fontSize: 18.0)), + ), + Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Text(monthlyStatsAvgValue.toString() + " " + TranslationBase.of(context).steps, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + ], + ), + ), + ), + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text(TranslationBase.of(context).details, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + )), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + monthlyStepsList.isEmpty + ? Container( + child: Center( + child: Text(TranslationBase.of(context).noDataAvailable), + ), + ) + : Table( + columnWidths: { + 0: FlexColumnWidth(2.5), + }, + children: fullDataMonthly(context), + ), + ], + ), + ) + ], + ), + ), + ], + ), + ); + } + + getYearlyStepsDetails() { + return SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + child: ShowChart( + title: "", + timeSeries: yearlyTimeSeriesData, + indexes: yearlyTimeSeriesData.length ~/ 5.5, + horizontalInterval: 8, + ), + ), + Container( + child: Container( + decoration: cardRadius(12), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 5.0), + child: Text(TranslationBase.of(context).avgSteps, style: TextStyle(fontSize: 18.0)), + ), + Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Text(yearlyStatsAvgValue.toString() + " " + TranslationBase.of(context).steps, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), + ), + ], + ), + ), + ), + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text(TranslationBase.of(context).details, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + )), + ), + Container( + padding: EdgeInsets.all(10), + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + yearlyStepsList.isEmpty + ? Container( + child: Center( + child: Text(TranslationBase.of(context).noDataAvailable), + ), + ) + : Table( + columnWidths: { + 0: FlexColumnWidth(2.5), + }, + children: fullData(context), + ), + ], + ), + ) + ], + ), + ), + ], + ), + ); + } + + List fullData(BuildContext context) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).steps), + ], + ), + ); + yearlyStepsList.forEach( + (step) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue( + '${DateUtil.getDayMonthYearDateFormatted( + new DateTime(step.year!, step.month!, 1), + )} ', + isCapitable: false, + mProjectViewModel: projectViewModel), + Utils.tableColumnValue(step.valueSum.toString(), isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + }, + ); + return tableRow; + } + + List fullDataWeekly(BuildContext context) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).steps), + ], + ), + ); + weekyStepsList.forEach( + (step) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue( + '${DateUtil.getDayMonthYearDateFormatted( + DateUtil.convertStringToDate(step.machineDate ?? DateUtil.convertDateToString(DateTime.now())), + )} ', + isCapitable: false, + mProjectViewModel: projectViewModel), + Utils.tableColumnValue(step.value.toString(), isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + }, + ); + return tableRow; + } + + List fullDataMonthly(BuildContext context) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(TranslationBase.of(context).date), + Utils.tableColumnTitle(TranslationBase.of(context).steps), + ], + ), + ); + monthlyStepsList.forEach( + (step) { + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue( + '${DateUtil.getDayMonthYearDateFormatted( + DateUtil.convertStringToDate(step.machineDate!), + )} ', + isCapitable: false, + mProjectViewModel: projectViewModel), + Utils.tableColumnValue(step.value.toString(), isCapitable: false, mProjectViewModel: projectViewModel), + ], + ), + ); + }, + ); + return tableRow; + } +} diff --git a/lib/pages/medical/smart_watch_health_data/syncHealthData.dart b/lib/pages/medical/smart_watch_health_data/syncHealthData.dart new file mode 100644 index 00000000..6d6fdf4f --- /dev/null +++ b/lib/pages/medical/smart_watch_health_data/syncHealthData.dart @@ -0,0 +1,210 @@ +import 'dart:io'; + +import 'package:collection/collection.dart'; +import 'package:diplomaticquarterapp/models/SmartWatch/HealthData.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:flutter/material.dart'; +import 'package:health/health.dart'; + +class syncHealthDataButton extends StatefulWidget { + syncHealthDataButton(); + + @override + _syncHealthDataButtonState createState() => _syncHealthDataButtonState(); +} + +class _syncHealthDataButtonState extends State { + List _healthDataList = []; + + List Med_InsertTransactionsInputsList = []; + List Med_InsertTransactionsInputsList2 = []; + + List sleepDataList = []; + + List healthDataList = []; + + int TransactionsListID = 1; + + int MedCategoryID = 0; + + // HealthFactory health = HealthFactory(); + List types = [HealthDataType.STEPS, HealthDataType.HEART_RATE, Platform.isAndroid ? HealthDataType.DISTANCE_DELTA : HealthDataType.DISTANCE_WALKING_RUNNING]; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return DefaultButton(TranslationBase.of(context).syncHealthData, () => checkPermissions()).insideContainer; + } + + checkPermissions() async { + // if (Platform.isAndroid) { + // if (await PermissionService.isHealthDataPermissionEnabled()) { + // await health.requestAuthorization(types).then((value) { + // if (value) { + // readAll(); + // } + // }); + // } else { + // Utils.showPermissionConsentDialog(context, TranslationBase.of(context).physicalActivityPermission, () async { + // await health.requestAuthorization(types).then((value) { + // if (value) { + // readAll(); + // } + // }); + // }); + // } + // } else { + // await health.requestAuthorization(types).then((value) { + // if (value) { + // readAll(); + // } + // }); + // } + } + + void readAll() async { + TransactionsListID = 1; + var MedSubCategoryID = 0; + double value = 0.0; + + GifLoaderDialogUtils.showMyDialog(context); + Med_InsertTransactionsInputsList.clear(); + DateTime startDate = DateTime.now().subtract(new Duration(days: 30)); + + try { + // List healthData = await health.getHealthDataFromTypes(startDate, DateTime.now(), types); + // _healthDataList.addAll(healthData); + } catch (e) { + print("Caught exception in getHealthDataFromTypes: $e"); + } + + // _healthDataList = HealthFactory.removeDuplicates(_healthDataList); + + _healthDataList.forEach((x) { + if (x.type == HealthDataType.STEPS) { + Med_InsertTransactionsInputsList.add(healthData( + MedCategoryID: 6, + MedSubCategoryID: MedSubCategoryID, + MachineDate: DateUtil.convertDateToString(x.dateFrom), + Value: double.tryParse(x.value.toString()), + TransactionsListID: TransactionsListID++)); + } + if (x.type == HealthDataType.HEART_RATE) { + Med_InsertTransactionsInputsList.add(healthData( + MedCategoryID: 3, + MedSubCategoryID: MedSubCategoryID, + MachineDate: DateUtil.convertDateToString(x.dateFrom), + Value: double.tryParse(x.value.toString()), + TransactionsListID: TransactionsListID++)); + } + if (x.type == HealthDataType.DISTANCE_DELTA || x.type == HealthDataType.DISTANCE_WALKING_RUNNING) { + Med_InsertTransactionsInputsList.add(healthData( + MedCategoryID: 7, + MedSubCategoryID: MedSubCategoryID, + MachineDate: DateUtil.convertDateToString(x.dateFrom), + Value: double.tryParse(x.value.toString()), + TransactionsListID: TransactionsListID++)); + } + }); + + getAllHealthDataLists(); + } + + void getAllHealthDataLists() { + var totalSteps = 0.0; + var totalDistance = 0.0; + double totalHeartRate = 0.0; + double avgTotalHeartRate = 0.0; + var counter = 0; + List data = []; + TransactionsListID = 1; + + DateTime date; + sleepDataList.clear(); + + Med_InsertTransactionsInputsList.forEach((result) { + data.add(result.toJson()); + }); + + Med_InsertTransactionsInputsList2.clear(); + + var newMap = groupBy(data, (obj) => DateUtil.convertStringToDate(obj['MachineDate']).toString().substring(0, 10)); + + newMap.forEach((key, value) { + totalSteps = 0.0; + totalDistance = 0.0; + totalHeartRate = 0.0; + avgTotalHeartRate = 0.0; + counter = 0; + + date = DateTime.parse(key); + + value.forEach((element) { + if (element['MedCategoryID'] == 6) { + MedCategoryID = 6; + totalSteps += element['Value']; + } else if (element['MedCategoryID'] == 7) { + MedCategoryID = 7; + totalDistance += (element['Value'] * 0.001); + } else if (element['MedCategoryID'] == 3) { + MedCategoryID = 3; + counter++; + totalHeartRate += element['Value']; + } else if (element['MedCategoryID'] == 4) { + sleepDataList.add(new healthData( + MedCategoryID: 4, MedSubCategoryID: element['MedSubCategoryID'], MachineDate: DateUtil.convertDateToString(date), Value: element['Value'], TransactionsListID: TransactionsListID++)); + + Med_InsertTransactionsInputsList2.add(new healthData( + MedCategoryID: 4, MedSubCategoryID: element['MedSubCategoryID'], MachineDate: DateUtil.convertDateToString(date), Value: element['Value'], TransactionsListID: TransactionsListID++)); + } + }); + + if (counter == 0) { + counter = 1; + } + if (totalHeartRate == 0) { + avgTotalHeartRate = 0; + } else { + avgTotalHeartRate = totalHeartRate / counter; + } + + Med_InsertTransactionsInputsList2.add( + new healthData(MedCategoryID: 6, MedSubCategoryID: 0, MachineDate: DateUtil.convertDateToStringLocation(date), Value: totalSteps, TransactionsListID: TransactionsListID++)); + Med_InsertTransactionsInputsList2.add( + new healthData(MedCategoryID: 7, MedSubCategoryID: 0, MachineDate: DateUtil.convertDateToStringLocation(date), Value: totalDistance, TransactionsListID: TransactionsListID++)); + Med_InsertTransactionsInputsList2.add( + new healthData(MedCategoryID: 3, MedSubCategoryID: 0, MachineDate: DateUtil.convertDateToStringLocation(date), Value: avgTotalHeartRate, TransactionsListID: TransactionsListID++)); + }); + + addInsertTransactionsInputsList(); + + GifLoaderDialogUtils.hideDialog(context); + } + + addInsertTransactionsInputsList() { + if (Med_InsertTransactionsInputsList2.isNotEmpty) { + GifLoaderDialogUtils.showMyDialog(context); + SmartWatchIntegrationService service = new SmartWatchIntegrationService(); + service.insertPatientHealthData(Med_InsertTransactionsInputsList2, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showSuccessToast(message: TranslationBase.of(context).syncSuccess); + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } else { + return; + } + } +} diff --git a/lib/pages/medical/vital_sign/LineChartCurved.dart b/lib/pages/medical/vital_sign/LineChartCurved.dart new file mode 100644 index 00000000..e86f31bf --- /dev/null +++ b/lib/pages/medical/vital_sign/LineChartCurved.dart @@ -0,0 +1,281 @@ +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:fl_chart/fl_chart.dart'; +import 'package:flutter/material.dart'; + +import '../../../Constants.dart'; + +class LineChartCurved extends StatelessWidget { + final String title; + final List timeSeries; + final int? indexes; + final double horizontalInterval; + + LineChartCurved({required this.title, required this.timeSeries, this.indexes, this.horizontalInterval = 20.0}); + + List xAxixs = []; + List yAxixs = []; + + double minY = 0; + double maxY = 0; + double intialY = 0; + double lastY = 0; + + double minX = 0; + double maxX = 0; + double increasingY = 0; + + @override + Widget build(BuildContext context) { + getXaxix(); + getYaxix(); + getInitialY(); + calculateMaxAndMin(); + return AspectRatio( + aspectRatio: 1.0, + child: Container( + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(18)), + // color: Colors.white, + ), + child: Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(16.0), + child: Text( + title!, + style: TextStyle(color: Colors.black, fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600), + textAlign: TextAlign.center, + ), + ), + ], + ), + mHeight(10), + Expanded( + child: Padding( + padding: const EdgeInsets.only(right: 18.0, left: 16.0), + child: LineChart( + sampleData1(context), + duration: const Duration(milliseconds: 250), + ), + ), + ), + const SizedBox( + height: 10, + ), + ], + ), + ], + ), + ), + ); + } + + getXaxix() { + for (int index = 0; index < timeSeries.length; index++) { + int mIndex = indexes! * index; + if (mIndex < timeSeries.length) { + xAxixs.add(mIndex); + } + } + } + + getYaxix() { + for (int index = 0; index < timeSeries.length; index++) { + int mIndex = indexes! * index; + if (mIndex < timeSeries.length) { + yAxixs.add(timeSeries[mIndex].sales); + } + } + } + + LineChartData sampleData1(context) { + return LineChartData( + lineTouchData: LineTouchData( + touchTooltipData: LineTouchTooltipData( + tooltipBgColor: Colors.white, + ), + touchCallback: (touchEvent, LineTouchResponse? touchResponse) {}, + handleBuiltInTouches: true, + ), + gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true, horizontalInterval: 14, verticalInterval: 14), + titlesData: FlTitlesData( + bottomTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: true, + // getTextStyles: (cxt, value) => const TextStyle( + // color: Colors.black, + // fontSize: 10, + // ), + + getTitlesWidget: (value, title) { + TextStyle style = TextStyle( + color: Colors.black, + fontSize: 10, + ); + + if (timeSeries.length < 15) { + if (timeSeries.length > value.toInt()) { + return Text( + '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}', + style: style, + ); + } else + return SizedBox(); + } else { + if (value.toInt() == 0) + return Text( + '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}', + style: style, + ); + if (value.toInt() == timeSeries.length - 1) + return Text( + '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}', + style: style, + ); + if (xAxixs.contains(value.toInt())) { + return Text( + '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}', + style: style, + ); + } + } + return SizedBox(); + }, + // rotateAngle: -65, + // margin: 22, + ), + ), + leftTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: true, + /* getTextStyles: (cxt, value) => const TextStyle( + color: Colors.black, + fontWeight: FontWeight.bold, + fontSize: 10, + ),*/ + interval: 3.0, + // margin: 12, + ), + ), + ), + borderData: FlBorderData( + show: true, + border: const Border( + bottom: BorderSide( + color: Colors.black, + width: 0.5, + ), + left: BorderSide( + color: Colors.black, + ), + right: BorderSide( + color: Colors.black, + ), + top: BorderSide( + color: Colors.transparent, + ), + ), + ), + minX: minX, + maxX: maxX, + maxY: lastY + 1, + minY: intialY - 0.5, + lineBarsData: getData(context), + ); + } + + calculateMaxAndMin() { + getMaxY(); + getMaxX(); + getMin(); + getMinY(); + increasingY = ((maxY - minY) / timeSeries.length - 1) * 15; + maxY += increasingY.abs(); + minY -= increasingY.abs(); + } + + double getMaxY() { + maxY = 0; + timeSeries.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble > maxY) { + lastY = resultValueDouble; + maxY = resultValueDouble; + } + }); + print("maxY " + lastY.toString()); + return maxY.roundToDouble(); + } + + double getInitialY() { + try { + intialY = timeSeries.first.sales; + timeSeries.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble < intialY) intialY = resultValueDouble; + }); + } catch (e) { + intialY = 0; + } + + print("minY " + intialY.toString()); + return intialY.roundToDouble(); + } + + getMaxX() { + maxX = (timeSeries.length - 1).toDouble(); + } + + double getMin() { + minX = 0; + timeSeries.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble < minX) minX = resultValueDouble; + }); + + return minX.roundToDouble(); + } + + double getMinY() { + minY = 0; + timeSeries.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble < minY) minY = resultValueDouble; + }); + int value = minY.toInt(); + + return value.toDouble(); + } + + List getData(context) { + List spots = []; + for (int index = 0; index < timeSeries.length; index++) { + spots.add(FlSpot(index.toDouble(), timeSeries[index].sales)); + } + + final LineChartBarData lineChartBarData1 = LineChartBarData( + spots: spots, + isCurved: true, + color: secondaryColor, + barWidth: 1.5, + isStrokeCapRound: true, + dotData: FlDotData( + show: false, + ), + belowBarData: BarAreaData( + show: false, + ), + ); + + return [ + lineChartBarData1, + ]; + } +} diff --git a/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart b/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart new file mode 100644 index 00000000..7bcf8977 --- /dev/null +++ b/lib/pages/medical/vital_sign/LineChartCurvedBloodPressure.dart @@ -0,0 +1,305 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:fl_chart/fl_chart.dart'; +import 'package:flutter/material.dart'; + +class LineChartCurvedBloodPressure extends StatelessWidget { + final String title; + final List timeSeries1; + final List timeSeries2; + final int indexes; + + LineChartCurvedBloodPressure({required this.title, required this.timeSeries1, required this.indexes, required this.timeSeries2}); + + List xAxixs = []; + List yAxixs = []; + + @override + Widget build(BuildContext context) { + getXaxix(); + return AspectRatio( + aspectRatio: 1.1, + child: Container( + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(18)), + // color: Colors.white, + ), + child: Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + const SizedBox( + height: 12, + ), + Padding( + padding: const EdgeInsets.only( + left: 20, + right: 20, + ), + child: Text( + title, + style: TextStyle( + color: Colors.black, + fontSize: 16, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + textAlign: TextAlign.start, + ), + ), + SizedBox( + height: 10, + ), + Expanded( + child: Padding( + padding: const EdgeInsets.only(right: 18.0, left: 16.0, top: 15), + child: LineChart( + sampleData1(context), + duration: const Duration(milliseconds: 250), + ), + ), + ), + SizedBox( + height: 10, + ), + Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + children: [ + Container( + width: 16, + height: 16, + decoration: containerRadius(Theme.of(context).primaryColor, 100), + ), + SizedBox( + width: 5, + ), + Text( + TranslationBase.of(context).systolicLng, + style: TextStyle( + color: Colors.black, + fontSize: 12, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + SizedBox( + width: 15, + ), + Row( + children: [ + Container( + width: 16, + height: 16, + decoration: containerRadius(CustomColors.accentColor, 100), + ), + SizedBox( + width: 5, + ), + Text( + TranslationBase.of(context).diastolicLng, + style: TextStyle( + color: Colors.black, + fontSize: 12, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ], + ), + const SizedBox( + height: 12, + ), + ], + ), + ], + ), + ), + ); + } + + getXaxix() { + for (int index = 0; index < timeSeries1.length; index++) { + int mIndex = indexes * index; + if (mIndex < timeSeries1.length) { + xAxixs.add(mIndex); + } + } + } + + LineChartData sampleData1(context) { + return LineChartData( + lineTouchData: LineTouchData( + touchTooltipData: LineTouchTooltipData( + tooltipBgColor: Colors.white, + ), + touchCallback: (touchEvent, LineTouchResponse? touchResponse) {}, + handleBuiltInTouches: true, + ), + gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true, horizontalInterval: 14, verticalInterval: 14), + titlesData: FlTitlesData( + bottomTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: true, + getTitlesWidget: (value, title) { + TextStyle style = TextStyle( + color: Colors.black, + fontSize: 10, + ); + + if (timeSeries1.length < 15) { + if (timeSeries1.length > value.toInt()) { + return Text( + '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}', + style: style, + ); + } else + return SizedBox(); + } else { + if (value.toInt() == 0) + return Text( + '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}', + style: style, + ); + if (value.toInt() == timeSeries1.length - 1) + return Text( + '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}', + style: style, + ); + if (xAxixs.contains(value.toInt())) { + return Text( + '${timeSeries1[value.toInt()].time.month}/ ${timeSeries1[value.toInt()].time.year}', + style: style, + ); + } + } + return SizedBox(); + }, + + // rotateAngle: -65, + // margin: 22, + ), + ), + leftTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: true, + // getTextStyles: (cxt, value) => const TextStyle( + // color: Colors.black, + // fontWeight: FontWeight.bold, + // fontSize: 10, + // ), + interval: getMaxY() - getMinY() <= 500 + ? 50 + : getMaxY() - getMinY() <= 1000 + ? 100 + : 200, + // margin: 12, + ), + ), + ), + borderData: FlBorderData( + show: true, + border: const Border( + bottom: BorderSide( + color: Colors.black, + width: 0.5, + ), + left: BorderSide( + color: Colors.black, + ), + right: BorderSide( + color: Colors.black, + ), + top: BorderSide( + color: Colors.transparent, + ), + ), + ), + minX: 0, + maxX: (timeSeries1.length - 1).toDouble(), + maxY: getMaxY() + 15, + minY: getMinY() - 15, + lineBarsData: getData(context), + ); + } + + double getMaxY() { + double max = 0; + timeSeries1.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble > max) max = resultValueDouble; + }); + timeSeries2.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble > max) max = resultValueDouble; + }); + + return max.roundToDouble(); + } + + double getMinY() { + double min = timeSeries1[0].sales; + timeSeries1.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble < min) min = resultValueDouble; + }); + timeSeries2.forEach((element) { + double resultValueDouble = element.sales; + if (resultValueDouble < min) min = resultValueDouble; + }); + + int value = min.toInt(); + + return value.toDouble(); + } + + List getData(context) { + List spots = []; + for (int index = 0; index < timeSeries1.length; index++) { + spots.add(FlSpot(index.toDouble(), timeSeries1[index].sales)); + } + + List spots2 = []; + for (int index = 0; index < timeSeries2.length; index++) { + spots2.add(FlSpot(index.toDouble(), timeSeries2[index].sales)); + } + + final LineChartBarData lineChartBarData1 = LineChartBarData( + spots: spots, + isCurved: true, + color: Colors.red, + barWidth: 1.5, + isStrokeCapRound: true, + dotData: FlDotData( + show: false, + ), + belowBarData: BarAreaData( + show: false, + ), + ); + final LineChartBarData lineChartBarData2 = LineChartBarData( + spots: spots2, + isCurved: true, + color: Theme.of(context).primaryColor, + barWidth: 1.5, + isStrokeCapRound: true, + dotData: FlDotData( + show: false, + ), + belowBarData: BarAreaData( + show: false, + ), + ); + + return [lineChartBarData1, lineChartBarData2]; + } +} diff --git a/lib/pages/medical/vital_sign/vital_sign_details_blood_pressurewideget.dart b/lib/pages/medical/vital_sign/vital_sign_details_blood_pressurewideget.dart new file mode 100644 index 00000000..5f1cb5c5 --- /dev/null +++ b/lib/pages/medical/vital_sign/vital_sign_details_blood_pressurewideget.dart @@ -0,0 +1,138 @@ +import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class VitalSignBloodPressureWidget extends StatefulWidget { + final List vitalList; + final String title1; + final String title2; + final String title3; + final String viewKey1; + final String viewKey2; + + VitalSignBloodPressureWidget({Key? key, required this.vitalList, required this.title1, required this.title2, required this.viewKey1, required this.title3, required this.viewKey2}); + + @override + _VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState(); +} + +class _VitalSignDetailsWidgetState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Container( + decoration: BoxDecoration( + color: Colors.transparent, + borderRadius: BorderRadius.only(topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), + border: Border.all(color: Colors.grey, width: 1), + ), + margin: EdgeInsets.all(20), + child: Container( + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Table( + border: TableBorder.symmetric( + inside: BorderSide(width: 2.0, color: Colors.grey[300]!), + ), + children: fullData(projectViewModel), + ), + ], + ), + ), + ); + } + + List fullData(ProjectViewModel projectViewModel) { + List tableRow = []; + tableRow.add(TableRow(children: [ + Container( + child: Container( + decoration: BoxDecoration( + color: Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0), topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0)), + ), + child: Center( + child: Texts( + TranslationBase.of(context).date, + color: Colors.white, + ), + ), + height: 60, + ), + ), + Container( + child: Container( + decoration: BoxDecoration( + color: Theme.of(context).primaryColor, + ), + child: Center( + child: Texts(widget.title2, color: Colors.white), + ), + height: 60), + ), + Container( + child: Container( + decoration: BoxDecoration( + color: Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topRight: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0), topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0)), + ), + child: Center( + child: Texts(widget.title3, color: Colors.white), + ), + height: 60), + ), + ])); + widget.vitalList.forEach((vital) { + var data = vital.toJson()[widget.viewKey1]; + if (data != 0) + tableRow.add(TableRow(children: [ + Container( + child: Container( + padding: EdgeInsets.all(10), + color: Colors.white, + child: Center( + child: Texts( + '${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(vital.vitalSignDate!.weekday) : DateUtil.getWeekDay(vital.vitalSignDate!.weekday)}, ${vital.vitalSignDate!.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(vital.vitalSignDate!.month) : DateUtil.getMonth(vital.vitalSignDate!.month)}, ${vital.vitalSignDate!.year} ', + textAlign: TextAlign.center, + ), + ), + ), + ), + Container( + child: Container( + padding: EdgeInsets.all(10), + color: Colors.white, + child: Center( + child: Texts( + '${vital.toJson()[widget.viewKey1]}', + textAlign: TextAlign.center, + ), + ), + ), + ), + Container( + child: Container( + padding: EdgeInsets.all(10), + color: Colors.white, + child: Center( + child: Texts( + '${vital.toJson()[widget.viewKey2]}', + textAlign: TextAlign.center, + ), + ), + ), + ), + ])); + }); + return tableRow; + } +} diff --git a/lib/pages/medical/vital_sign/vital_sign_details_screen.dart b/lib/pages/medical/vital_sign/vital_sign_details_screen.dart new file mode 100644 index 00000000..a2f07522 --- /dev/null +++ b/lib/pages/medical/vital_sign/vital_sign_details_screen.dart @@ -0,0 +1,270 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/core/enum/patient_lookup.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/medical/vital_sign_view_model.dart'; +import 'package:diplomaticquarterapp/models/vital_sign.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_item.dart'; +import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_item_details_screen.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.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:flutter_svg/svg.dart'; + +class VitalSignDetailsScreen extends StatelessWidget { + static const String url = "assets/images/"; + + int? appointmentNo; + int? projectID; + bool isNotOneAppointment; + + VitalSignDetailsScreen({this.appointmentNo, this.projectID, this.isNotOneAppointment = true}); + + List imagesInfo =[]; + List vitalSigns = []; + + initList(BuildContext context, VitalSignViewModel mode) { + vitalSigns.clear(); + vitalSigns.add(new VitalSign(TranslationBase.of(context).height, mode.heightCm, TranslationBase.of(context).cm, "assets/images/new/height.svg")); + vitalSigns.add(new VitalSign(TranslationBase.of(context).weight, mode.weightKg, TranslationBase.of(context).kg, "assets/images/new/weight.svg")); + // vitalSigns.add(new VitalSign(TranslationBase.of(context).body, mode.bodyMax, TranslationBase.of(context).mass, "assets/images/new/")); + vitalSigns.add(new VitalSign(TranslationBase.of(context).temperature, mode.temperatureCelcius, TranslationBase.of(context).tempC, "assets/images/new/temperature.svg")); + vitalSigns.add(new VitalSign(TranslationBase.of(context).heart, mode.hartRat, TranslationBase.of(context).bpm, "assets/images/new/heart_rate.svg")); + vitalSigns.add(new VitalSign(TranslationBase.of(context).respirationRate, mode.respirationBeatPerMinute, TranslationBase.of(context).respirationBPM, "assets/images/new/respiration_rate.svg")); + vitalSigns.add(new VitalSign(TranslationBase.of(context).bloodPressure, mode.bloodPressure, TranslationBase.of(context).sysDias, "assets/images/new/blood_pressure.svg")); + } + + @override + Widget build(BuildContext context) { + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vital-signs/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vital-signs/ar/0.png')); + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vital-signs/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vital-signs/ar/1.png')); + return BaseView( + onModelReady: appointmentNo != null && projectID != null ? (model) => model.getPatientVitalSign(appointmentNo: appointmentNo, projectID: projectID!) : (model) => model.getPatientVitalSign(), + builder: (_, mode, widget) { + initList(context, mode); + return AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).vitalSigns, + baseViewModel: mode, + description: TranslationBase.of(context).infoSigns, + imagesInfo: imagesInfo, + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xFFF7F7F7), + body: mode.vitalSignResModelList.length > 0 + ? Container( + width: double.infinity, + child: ListView( + children: [ + Container( + child: Container( + margin: EdgeInsets.only(left: 20, right: 20, top: 20, bottom: 6), + decoration: cardRadius(12), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).bodyMassIndex + mode.bodyMax, + style: TextStyle( + fontSize: 16, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + mHeight(20), + Container( + height: MediaQuery.of(context).size.width / 2.8, + child: Row( + children: [ + showMass(context, TranslationBase.of(context).underWeight, "< 18.5", double.parse(mode.bodyMax) <= 18.5 ? Colors.red : Colors.black, 8), + mWidth(12), + showMass(context, TranslationBase.of(context).healthy, "18.5 - 24.9", (double.parse(mode.bodyMax) > 18.5 && double.parse(mode.bodyMax) < 25) ? Colors.red : Colors.black, 6), + mWidth(12), + showMass(context, TranslationBase.of(context).overWeight, "25 - 29.9", (double.parse(mode.bodyMax) >= 25 && double.parse(mode.bodyMax) < 30) ? Colors.red : Colors.black, 4), + mWidth(12), + showMass(context, TranslationBase.of(context).obese, "30 - 34.9", (double.parse(mode.bodyMax) >= 30 && double.parse(mode.bodyMax) < 35) ? Colors.red : Colors.black, 2), + mWidth(12), + showMass(context, TranslationBase.of(context).extremeObese, "> 35", (double.parse(mode.bodyMax) >= 35) ? Colors.red : Colors.black, 0), + ], + ), + ), + ], + ), + ), + ), + ), + mHeight(2), + Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 16), + child: GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + itemCount: vitalSigns.length, + padding: EdgeInsets.all(4), + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (BuildContext context, int index) { + return InkWell( + onTap: () { + if (index == 0) { + if (isNotOneAppointment) { + Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: VitalSignDetails.Height, + pageTitle: TranslationBase.of(context).height, + vitalList: mode.vitalSignResModelList, + ), + ), + ); + } + } else if (index == 1) { + if (isNotOneAppointment) { + Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: VitalSignDetails.Weight, + pageTitle: TranslationBase.of(context).weight, + vitalList: mode.vitalSignResModelList, + ), + ), + ); + } + } else if (index == 2) { + if (isNotOneAppointment) { + Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: VitalSignDetails.Temperature, + pageTitle: + TranslationBase.of(context).temperature, + vitalList: mode.vitalSignResModelList, + + ), + ), + ); + } + } else if (index == 3) { + if (isNotOneAppointment) { + Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: VitalSignDetails.heart, + pageTitle: TranslationBase.of(context).heart, + vitalList: mode.vitalSignResModelList, + + ), + ), + ); + } + } else if (index == 4) { + if (isNotOneAppointment) { + Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: VitalSignDetails.Respiration, + pageTitle: + TranslationBase.of(context).respirationRate, + vitalList: mode.vitalSignResModelList, + + ), + ), + ); + } + } else if (index == 5) { + if (isNotOneAppointment) { + Navigator.push( + context, + FadePage( + page: VitalSignItemDetailsScreen( + pageKey: VitalSignDetails.BloodPressure, + pageTitle: TranslationBase.of(context).bloodPressure, + vitalList: mode.vitalSignResModelList, + ), + ), + ); + } + } + }, + child: VitalSignItem( + vitalSign: vitalSigns[index], + ), + ); + }, + ), + ), + ], + ), + ) + : Center( + child: Texts('No Data'), + ), + ); + }, + ); + } + + Widget showMass(BuildContext context, String title, String weight, Color color, int f) { + return Expanded( + flex: 1, + child: Container( + height: double.infinity, + width: double.infinity, + child: Column( + children: [ + Flexible( + child: Row( + children: [ + mFlex(f), + Flexible( + flex: 10, + child: SvgPicture.asset( + "assets/images/new/mass/health_BMI.svg", + height: double.infinity, + width: double.infinity, + fit: BoxFit.fill, + color: color, + ), + ), + mFlex(f), + ], + ), + ), + mHeight(20), + AutoSizeText( + title, + maxLines: 1, + minFontSize: 6, + style: TextStyle( + color: color, + fontSize: 10, + letterSpacing: -0.6, + ), + ), + AutoSizeText( + weight, + maxLines: 1, + minFontSize: 6, + style: TextStyle( + color: color, + fontSize: 10, + letterSpacing: -0.6, + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/medical/vital_sign/vital_sign_details_wideget.dart b/lib/pages/medical/vital_sign/vital_sign_details_wideget.dart new file mode 100644 index 00000000..0daaf104 --- /dev/null +++ b/lib/pages/medical/vital_sign/vital_sign_details_wideget.dart @@ -0,0 +1,120 @@ +import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class VitalSignDetailsWidget extends StatefulWidget { + final List? vitalList; + final String? title1; + final String? title2; + final String? viewKey; + + VitalSignDetailsWidget( + {Key? key, this.vitalList, this.title1, this.title2, this.viewKey}); + + @override + _VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState(); +} + +class _VitalSignDetailsWidgetState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Container( + decoration: BoxDecoration( + color: Colors.transparent, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), + border: Border.all(color: Colors.grey, width: 1), + ), + margin: EdgeInsets.all(20), + child: Container( + color: Colors.transparent, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Table( + border: TableBorder.symmetric( + inside: BorderSide(width: 2.0, color: Colors.grey[300]!), + ), + children: fullData(projectViewModel), + ), + ], + ), + ), + ); + } + + List fullData(ProjectViewModel projectViewModel) { + List tableRow = []; + tableRow.add(TableRow(children: [ + Container( + child: Container( + decoration: BoxDecoration( + color: Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topLeft:projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), + topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) + ), + ), + child: Center( + child: Texts( + TranslationBase.of(context).date, + color: Colors.white, + ), + ), + height: 60, + ), + ), + Container( + child: Container( + decoration: BoxDecoration( + color: Theme.of(context).primaryColor, + borderRadius: BorderRadius.only( + topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0), + topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0) + ), + ), + child: Center( + child: Texts(widget.title2, color: Colors.white), + ), + height: 60), + ) + ])); + widget.vitalList!.forEach((vital) { + var data = vital.toJson()[widget.viewKey]; + if (data != 0) + tableRow.add(TableRow(children: [ + Container( + child: Container( + padding: EdgeInsets.all(10), + color: Colors.white, + child: Center( + child: Texts( + '${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(vital.vitalSignDate!.weekday) : DateUtil.getWeekDay(vital.vitalSignDate!.weekday)}, ${vital.vitalSignDate!.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(vital.vitalSignDate!.month) : DateUtil.getMonth(vital.vitalSignDate!.month)}, ${vital.vitalSignDate!.year} ', + textAlign: TextAlign.center, + ), + ), + ), + ), + Container( + child: Container( + padding: EdgeInsets.all(10), + color: Colors.white, + child: Center( + child: Texts( + '${vital.toJson()[widget.viewKey]}', + textAlign: TextAlign.center, + ), + ), + ), + ), + ])); + }); + return tableRow; + } +} diff --git a/lib/pages/medical/vital_sign/vital_sign_item.dart b/lib/pages/medical/vital_sign/vital_sign_item.dart new file mode 100644 index 00000000..9b89d7f7 --- /dev/null +++ b/lib/pages/medical/vital_sign/vital_sign_item.dart @@ -0,0 +1,90 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/models/vital_sign.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class VitalSignItem extends StatelessWidget { + const VitalSignItem({ + Key? key, + required this.vitalSign, + this.height, + this.width, + }) : super(key: key); + + final double? height; + final double? width; + final VitalSign vitalSign; + + @override + Widget build(BuildContext context) { + return RoundedContainer( + margin: 0, + height: double.infinity, + width: double.infinity, + child: Container( + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AutoSizeText( + vitalSign.lastVal ?? 'N/A', + minFontSize: 10, + maxLines: 1, + style: TextStyle( + fontSize: 15, + color: Color(0xff2B353E), + letterSpacing: -0.45, + fontWeight: FontWeight.bold, + ), + ), + Text( + vitalSign.unit ?? "", + style: TextStyle( + fontSize: 9, + letterSpacing: -0.27, + color: CustomColors.accentColor, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + mWidth(4), + Container( + width: MediaQuery.of(context).size.width / 16, + height: MediaQuery.of(context).size.width / 16, + child: SvgPicture.asset( + vitalSign.icon, + color: Color(0xff2E303A), + ), + ), + ], + ), + mFlex(1), + AutoSizeText( + vitalSign.des, + minFontSize: 8, + maxLines: 2, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.33, + height: 1, + fontWeight: FontWeight.w600, + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/medical/vital_sign/vital_sign_item_details_screen.dart b/lib/pages/medical/vital_sign/vital_sign_item_details_screen.dart new file mode 100644 index 00000000..07d3b39f --- /dev/null +++ b/lib/pages/medical/vital_sign/vital_sign_item_details_screen.dart @@ -0,0 +1,195 @@ +import 'package:diplomaticquarterapp/core/enum/patient_lookup.dart'; +import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sing_chart_and_detials.dart'; +import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sing_chart_blood_pressure.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class VitalSignItemDetailsScreen extends StatelessWidget { + final VitalSignDetails? pageKey; + final String pageTitle; + List? VSchart; + + VitalSignItemDetailsScreen({required this.vitalList, this.pageKey, required this.pageTitle}); + + final List vitalList; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + switch (pageKey) { + case VitalSignDetails.BodyMeasurements: + VSchart = [ + { + 'name': 'BMI', + 'nameAr': 'مؤشر الكتلة', + 'title1': 'Date', + 'title2': 'BMI', + 'title2Ar': 'الكتلة', + 'viewKey': 'BodyMassIndex', + }, + ]; + + break; + + case VitalSignDetails.Temperature: + VSchart = [ + { + 'name': 'Temperature In Celsius', + 'nameAr': 'درجة الحرارة بالدرجة المئوية', + 'title1': 'Date', + 'title2': 'C', + 'title2Ar': 'ْس', + 'viewKey': 'TemperatureCelcius', + }, + ]; + + break; + case VitalSignDetails.Pulse: + VSchart = [ + { + 'name': 'Pulse Beat Per Minute', + 'nameAr': 'نبضة نبضة في الدقيقة', + 'title1': 'Date', + 'title2': 'Minute', + 'title2Ar': 'دقيقة', + 'viewKey': 'PulseBeatPerMinute', + }, + ]; + + break; + case VitalSignDetails.Prescriptions: + VSchart = [ + { + 'name': 'Respiration Beat Per Minute', + 'nameAr': 'ضربات التنفس في الدقيقة', + 'title1': 'Date', + 'title2': 'Beat Per Minute', + 'title2Ar': 'نفس في الدقيقة', + 'viewKey': 'RespirationBeatPerMinute', + }, + ]; + + break; + case VitalSignDetails.BloodPressure: + VSchart = [ + { + 'name': 'Blood Pressure Systolic Diastolic', + 'nameAr': 'ضغط الدم الإنقباض الإنبساط', + 'title1': 'Date', + 'title2': 'systolic', + 'title3': 'Diastolic', + 'title2Ar': 'الإنقباض', + 'title3Ar': 'الإنبساط', + 'viewKey': 'BloodPressure', + }, + ]; + + break; + case VitalSignDetails.Respiration: + VSchart = [ + { + 'name': 'Respiration Rate', + 'nameAr': 'معدل التنفس', + 'title1': 'Date', + 'title2': 'bpm', + 'title2Ar': 'نفس', + 'viewKey': 'RespirationBeatPerMinute', + }, + ]; + + break; + case VitalSignDetails.heart: + VSchart = [ + { + 'name': 'Heart rate', + 'nameAr': 'معدل النبض بالدقيقة', + 'title1': 'Date', + 'title2': 'bpm', + 'title2Ar': 'نبضة', + 'viewKey': 'PulseBeatPerMinute', + }, + ]; + + break; + case VitalSignDetails.PainScale: + VSchart = [ + { + 'name': 'PainScore', + 'nameAr': 'نقاط الألم', + 'title1': 'Date', + 'title2': 'Cm', + 'title2Ar': 'سم', + 'viewKey': 'PainScore', + }, + ]; + + break; + case VitalSignDetails.Weight: + VSchart = [ + { + 'name': 'Weight Kg', + 'nameAr': 'الوزن كجم', + 'title1': 'Date', + 'title2': 'Kg', + 'title2Ar': 'كجم', + 'viewKey': 'WeightKg', + }, + ]; + + break; + + case VitalSignDetails.Height: + VSchart = [ + { + 'name': 'Height Cm', + 'nameAr': 'الطول سم', + 'title1': 'Date', + 'title2': 'Cm', + 'title2Ar': 'سم', + 'viewKey': 'HeightCm', + }, + ]; + + break; + default: + } + return AppScaffold( + appBarTitle: pageTitle, + isShowAppBar: true, + showNewAppBarTitle: true, + showNewAppBar: true, + + body: ListView( + children: VSchart!.map((chartInfo) { + var vitalListTemp = vitalList.where( + (element) => element.toJson()[chartInfo['viewKey']] != null, + ); + + if (vitalListTemp.length != 0 && chartInfo['viewKey'] == 'BloodPressure') { + return VitalSingChartBloodPressure( + vitalList: vitalList, + name: projectViewModel.isArabic ? chartInfo['nameAr'] : chartInfo['name'], + title1: chartInfo['title1'], + title2: projectViewModel.isArabic ? chartInfo['title2Ar'] : chartInfo['title2'], + title3: projectViewModel.isArabic ? chartInfo['title3Ar'] : chartInfo['title3'], + viewKey1: 'BloodPressureHigher', + viewKey2: 'BloodPressureLower', + ); + } + + return vitalListTemp.length != 0 + ? VitalSingChartAndDetials( + vitalList: vitalList, + name: projectViewModel.isArabic ? chartInfo['nameAr'] : chartInfo['name'], + title1: chartInfo['title1'], + title2: projectViewModel.isArabic ? chartInfo['title2Ar'] : chartInfo['title2'], + viewKey: chartInfo['viewKey']) + : Container(); + }).toList(), + ), + ); + } +} diff --git a/lib/pages/medical/vital_sign/vital_sing_chart_and_detials.dart b/lib/pages/medical/vital_sign/vital_sing_chart_and_detials.dart new file mode 100644 index 00000000..06df5e90 --- /dev/null +++ b/lib/pages/medical/vital_sign/vital_sing_chart_and_detials.dart @@ -0,0 +1,146 @@ +import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:diplomaticquarterapp/widgets/charts/show_chart.dart'; +import 'package:diplomaticquarterapp/widgets/charts/sync_fu_chart.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'LineChartCurved.dart'; + +class VitalSingChartAndDetials extends StatefulWidget { + VitalSingChartAndDetials({ + Key? key, + required this.vitalList, + required this.name, + required this.viewKey, + required this.title1, + required this.title2, + }) : super(key: key); + + final List vitalList; + final String name; + final String viewKey; + final String title1; + final String title2; + + @override + _VitalSingChartAndDetialsState createState() => _VitalSingChartAndDetialsState(); +} + +class _VitalSingChartAndDetialsState extends State { + List timeSeriesData = []; + bool isExpended = true; + late ProjectViewModel projectViewModel; + + @override + void initState() { + // TODO: implement initState + super.initState(); + generateData(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return SingleChildScrollView( + child: Column( + children: [ + Container( + height: 400, + child: Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: ShowChart( + title: widget.name, + timeSeries: timeSeriesData, + indexes: timeSeriesData.length ~/ 5.5, + horizontalInterval: 8, + ), + // child: SyncFuChart(), + ), + ), + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 8, right: 16, bottom: 16), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).graphDetails, + style: TextStyle( + fontSize: 16, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + Table( + columnWidths: { + 0: FlexColumnWidth(2), + 1: FlexColumnWidth(1), + // 2: FlexColumnWidth(1), + }, + children: fullData(widget.vitalList, context), + ), + ], + ), + ), + ) + ], + ), + ); + } + + List fullData(List labResultList, context) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(widget.title1), + Utils.tableColumnTitle(widget.title2), + // Utils.tableColumnTitle(TranslationBase.of(context).range), + ], + ), + ); + + for (int i = 0; i < labResultList.length; i++) { + var data = labResultList[i].toJson()[widget.viewKey]; + if (data != 0) + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue( + "${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(labResultList[i].vitalSignDate!.weekday) : DateUtil.getWeekDay(labResultList[i].vitalSignDate!.weekday)}, ${labResultList[i].vitalSignDate!.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(labResultList[i].vitalSignDate!.month) : DateUtil.getMonth(labResultList[i].vitalSignDate!.month)}, ${labResultList[i].vitalSignDate!.year}", + isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${labResultList[i].toJson()[widget.viewKey]}', isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel), + ], + ), + ); + } + + return tableRow; + } + + generateData() { + if (widget.vitalList.length > 0) { + widget.vitalList.reversed.toList().forEach( + (element) { + if (element.toJson()[widget.viewKey] != null && element.toJson()[widget.viewKey]?.toInt() != 0) + timeSeriesData.add( + TimeSeriesSales2( + DateTime(element.vitalSignDate!.year, element.vitalSignDate!.month, element.vitalSignDate!.day), + element.toJson()[widget.viewKey].toDouble(), + ), + ); + }, + ); + } + return timeSeriesData.reversed.toList(); + } +} diff --git a/lib/pages/medical/vital_sign/vital_sing_chart_blood_pressure.dart b/lib/pages/medical/vital_sign/vital_sing_chart_blood_pressure.dart new file mode 100644 index 00000000..195afb0c --- /dev/null +++ b/lib/pages/medical/vital_sign/vital_sing_chart_blood_pressure.dart @@ -0,0 +1,149 @@ +import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'LineChartCurvedBloodPressure.dart'; + +class VitalSingChartBloodPressure extends StatelessWidget { + VitalSingChartBloodPressure({ + Key? key, + required this.vitalList, + required this.name, + required this.viewKey1, + required this.viewKey2, + required this.title1, + required this.title2, + required this.title3, + }) : super(key: key); + + final List vitalList; + final String name; + final String viewKey1; + final String viewKey2; + final String title1; + final String title2; + final String title3; + List timeSeriesData1 = []; + List timeSeriesData2 = []; + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + generateData(); + return SingleChildScrollView( + child: Column( + children: [ + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), + child: LineChartCurvedBloodPressure( + title: name, + timeSeries1: timeSeriesData1, + timeSeries2: timeSeriesData2, + indexes: timeSeriesData1.length ~/ 5.5, + ), + ), + + // VitalSignBloodPressureWidget( + // vitalList: vitalList, + // title1: title1, + // title2: title2, + // title3: title3, + // viewKey1: viewKey1, + // viewKey2: viewKey2, + // ), + Container( + decoration: cardRadius(12), + margin: EdgeInsets.only(left: 16, top: 8, right: 16, bottom: 16), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).graphDetails, + style: TextStyle( + fontSize: 16, + letterSpacing: -0.64, + fontWeight: FontWeight.w600, + ), + ), + Table( + columnWidths: { + 0: FlexColumnWidth(2), + 1: FlexColumnWidth(1), + // 2: FlexColumnWidth(1), + }, + children: fullData(vitalList, context), + ), + ], + ), + ), + ) + ], + ), + ); + } + + List fullData(List labResultList, context) { + List tableRow = []; + tableRow.add( + TableRow( + children: [ + Utils.tableColumnTitle(title1), + Utils.tableColumnTitle(title2), + Utils.tableColumnTitle(title3), + // Utils.tableColumnTitle(TranslationBase.of(context).range), + ], + ), + ); + + for (int i = 0; i < labResultList.length; i++) { + var data = labResultList[i].toJson()[viewKey1]; + if (data != 0) + tableRow.add( + TableRow( + children: [ + Utils.tableColumnValue( + "${projectViewModel.isArabic ? DateUtil.getWeekDayArabic(labResultList[i].vitalSignDate!.weekday) : DateUtil.getWeekDay(labResultList[i].vitalSignDate!.weekday)}, ${labResultList[i].vitalSignDate!.day} ${projectViewModel.isArabic ? DateUtil.getMonthArabic(labResultList[i].vitalSignDate!.month) : DateUtil.getMonth(labResultList[i].vitalSignDate!.month)}, ${labResultList[i].vitalSignDate!.year}", + isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${labResultList[i].toJson()[viewKey1]}', isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel), + Utils.tableColumnValue('${labResultList[i].toJson()[viewKey2]}', isLast: i == (labResultList.length - 1), mProjectViewModel: projectViewModel), + ], + ), + ); + } + + return tableRow; + } + + generateData() { + if (vitalList.length > 0) { + vitalList.reversed.toList().forEach( + (element) { + if (element.toJson()[viewKey1]?.toInt() != 0) + timeSeriesData1.add( + TimeSeriesSales2( + new DateTime(element.vitalSignDate!.year, element.vitalSignDate!.month, element.vitalSignDate!.day), + element.toJson()[viewKey1].toDouble(), + ), + ); + if (element.toJson()[viewKey2]?.toInt() != 0) + timeSeriesData2.add( + TimeSeriesSales2( + new DateTime(element.vitalSignDate!.year, element.vitalSignDate!.month, element.vitalSignDate!.day), + element.toJson()[viewKey2].toDouble(), + ), + ); + }, + ); + } + } +} diff --git a/lib/pages/offers_categorise_page.dart b/lib/pages/offers_categorise_page.dart new file mode 100644 index 00000000..572978b9 --- /dev/null +++ b/lib/pages/offers_categorise_page.dart @@ -0,0 +1,609 @@ +import 'package:diplomaticquarterapp/core/viewModels/offers_Categorise_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:provider/provider.dart'; + +import 'base/base_view.dart'; + +class OffersCategorisePage extends StatefulWidget { + @override + _OffersCategorisePageState createState() => _OffersCategorisePageState(); +} + +class _OffersCategorisePageState extends State { + String categoriseName = "Personal Care"; + bool styleOne = true; + bool styleTwo = false; + Icon styleIcon = Icon( + Icons.widgets_sharp, + color: Colors.blue, + size: 29.0, + ); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + ProjectViewModel projectProvider = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getOffersCategorise(), + builder: (BuildContext context, OffersCategoriseViewModel model, Widget? child) => PharmacyAppScaffold( + appBarTitle: TranslationBase.of(context).offers, + isShowAppBar: true, + backgroundColor: Colors.white, + isShowDecPage: false, + baseViewModel: model, + body: model.categorise.length != 0 + ? Container( + //height: MediaQuery.of(context).size.height * 0.57, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.all(10.0), + child: Container( + child: Texts( + 'Categories', + fontWeight: FontWeight.w800, + ), + ), + ), + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + //Expanded widget heree if nassery + Container( + height: MediaQuery.of(context).size.height * 0.20, + child: ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: model.categorise.length, + itemBuilder: (BuildContext context, int index) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Row( + children: [ + InkWell( + child: Column( + children: [ + Container( + height: 60.0, + width: 65.0, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.orange.shade200.withOpacity(0.45), + ), + child: Icon( + Icons.apps_sharp, + size: 32.0, + ), + ), + Container( + width: MediaQuery.of(context).size.width * 0.2, + height: MediaQuery.of(context).size.height * 0.09, + child: Center( + child: Texts( + projectViewModel.isArabic ? model.categorise[index].namen : model.categorise[index].name, +// model.categorise[index].name, + fontWeight: FontWeight.w600, + fontSize: 13.8, + ), + ), + ), + ], + ), + onTap: () { + model.getOffersProducts(i: model.categorise[index].id); + String ids = model.categorise[index].id!; + + categoriseName = projectViewModel.isArabic ? model.categorise[index].namen! : model.categorise[index].name!; + //model.categorise[index].name; + }), + ], + ), + ); + }), + ), + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: EdgeInsets.all(8.0), + child: Texts( + categoriseName, + fontWeight: FontWeight.w800, + ), + ), + Row( + children: [ + Container( + height: 44.0, + child: VerticalDivider( + color: Colors.black45, + thickness: 0.7, + //width: 0.3, + // indent: 0.0, + ), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: InkWell( + child: styleIcon, + onTap: () { + setState(() { + if (styleOne == true) { + styleOne = false; + styleTwo = true; + styleIcon = Icon( + Icons.auto_awesome_mosaic, + color: Colors.blue, + size: 29.0, + ); + } else { + styleOne = true; + styleTwo = false; + styleIcon = Icon( + Icons.widgets_sharp, + color: Colors.blue, + size: 29.0, + ); + } + }); + }, + ), + ), + ], + ), + ], + ), + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + styleOne == true + ? Expanded( + child: Container( + height: MediaQuery.of(context).size.height * 0.50, + child: GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + crossAxisSpacing: 0.5, + mainAxisSpacing: 2.0, + childAspectRatio: 0.85, + ), + itemCount: model.products.length, + itemBuilder: (BuildContext context, int index) { + return NetworkBaseView( + baseViewModel: model, + child: Card( + color: model.products[index].discountName != null ? Color(0xffFFFF00) : Colors.white, + elevation: 0, + shape: Border( + right: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + left: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + bottom: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + top: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + ), + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), + child: Container( + height: 250.0, + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(110.0), + ), + color: Colors.white, + ), + padding: EdgeInsets.symmetric(horizontal: 0), + width: MediaQuery.of(context).size.width / 3, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Stack( + children: [ + if (model.products[index].discountName != null) + RotatedBox( + quarterTurns: 4, + child: Container( + decoration: BoxDecoration(), + child: Padding( + padding: EdgeInsets.only( + right: 5.0, + top: 20.0, + bottom: 5.0, + ), + child: Texts( + TranslationBase.of(context).offers.toUpperCase(), + color: Colors.red, + fontSize: 13.0, + fontWeight: FontWeight.w900, + ), + ), + transform: new Matrix4.rotationZ(5.837200), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 16, 0, 0), + alignment: Alignment.center, + child: Image.network( + model.products[index].images!.isNotEmpty + ? model.products[index].images![0].thumb! + : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', + fit: BoxFit.cover, + height: 80, + ), + ), + Container( + width: model.products[index].rxMessage != null ? MediaQuery.of(context).size.width / 5 : 0, + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xffb23838), + borderRadius: BorderRadius.only(topLeft: Radius.circular(6)), + ), + child: model.products[index].rxMessage != null + ? Texts( + projectProvider.isArabic ? model.products[index].rxMessagen : model.products[index].rxMessage, + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + : Texts("") +// Texts( +// model.products[index].rxMessage != null ? +// model.products[index].rxMessage +// : "", +// color: +// Colors.white, +// regular: true, +// fontSize: 10, +// fontWeight: +// FontWeight +// .w400, +// ), + ), + ], + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (model.products[index].discountName != null) + Container( + width: double.infinity, + height: 22.0, + decoration: BoxDecoration( + color: Color(0xff5AB145), + ), + child: Center( + child: Texts( + model.products[index].discountName, + regular: true, + color: Colors.white, + fontSize: 12.0, + fontWeight: FontWeight.w700, + ), + ), + ), + Texts( + projectViewModel.isArabic ? model.products[index].namen : model.products[index].name, + // model.products[index].name, + regular: true, + fontSize: 12.58, + fontWeight: FontWeight.w600, + ), + Padding( + padding: const EdgeInsets.only(top: 4, bottom: 4), + child: Texts( + "SAR ${model.products[index].price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ +// StarRating( +// totalAverage: model.products[index].approvedRatingSum > +// 0 +// ? (model.products[index].approvedRatingSum.toDouble() / model.products[index].approvedRatingSum.toDouble()) +// .toDouble() +// : 0, +// forceStars: +// true), + + RatingBar( + initialRating: model.products[index].approvedRatingSum!.toDouble(), + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star_border, + color: CustomColors.accentColor, + ), + ), + onRatingUpdate: (double value) {}, + unratedColor: Colors.grey[500], + updateOnDrag: false, + tapOnlyMode: false, + ), + + Texts( + "(${model.products[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + ], + ), + ], + ), + ), + ], + ), + ), + )); + }, + ), + ), + ) + : Expanded( + child: Container( + child: ListView.builder( + itemCount: model.products.length, + itemBuilder: (BuildContext context, int index) { + return Card( + // color: + // model.products[index].discountName != + // null + // ? Color(0xffFFFF00) + // : Colors.white, + child: Row( + children: [ + Stack( + children: [ + Column( + children: [ + if (model.products[index].discountName != null) + Container( + decoration: BoxDecoration(), + child: Padding( + padding: EdgeInsets.only( + left: 9.0, + top: 8.0, + right: 10.0, + ), + child: Container( + color: Colors.yellow, + height: 25.0, + width: 70.0, + child: Center( + child: Texts( + TranslationBase.of(context).offers.toUpperCase(), + color: Colors.red, + fontSize: 13.0, + fontWeight: FontWeight.w900, + ), + ), + ), + ), + transform: new Matrix4.rotationZ(6.15099), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 0, 0, 0), + alignment: Alignment.center, + child: Image.network( + model.products[index].images!.isNotEmpty + ? model.products[index].images![0].thumb! + : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', + fit: BoxFit.cover, + height: 80, + ), + ), + ], + ), + Column( + children: [ + Container( + width: model.products[index].rxMessage != null ? MediaQuery.of(context).size.width / 5 : 0, + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xffb23838), + borderRadius: BorderRadius.only(topLeft: Radius.circular(6)), + ), + child: model.products[index].rxMessage != null + ? Texts( + projectProvider.isArabic ? model.products[index].rxMessagen : model.products[index].rxMessage, + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + : Texts("") +// Texts( +// model.products[index].rxMessage != null +// ? model.products[index].rxMessage +// : "", +// color: +// Colors.white, +// regular: true, +// fontSize: 10, +// fontWeight: +// FontWeight +// .w400, +// ), + ), + ], + ), + ], + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (model.products[index].discountName != null) + Container( + width: 250.0, + height: 22.5, + decoration: BoxDecoration( + color: Color(0xff5AB145), + ), + child: Padding( + padding: EdgeInsets.symmetric( + horizontal: 5.5, + ), + child: Texts( + model.products[index].discountName, + regular: true, + color: Colors.white, + fontSize: 12.0, + fontWeight: FontWeight.w700, + ), + ), + ), + SizedBox( + height: 4.0, + ), + Texts( + projectViewModel.isArabic ? model.products[index].namen : model.products[index].name, + // model.products[index].name, + regular: true, + fontSize: 14.0, + fontWeight: FontWeight.w600, + ), + SizedBox( + height: 8.0, + ), + Padding( + padding: const EdgeInsets.only(top: 4, bottom: 4), + child: Texts( + "SAR ${model.products[index].price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ +// StarRating( +// totalAverage: model +// .products[ +// index] +// .approvedRatingSum > +// 0 +// ? (model.products[index].approvedRatingSum.toDouble() / +// model.products[index].approvedRatingSum +// .toDouble()) +// .toDouble() +// : 0, +// forceStars: +// true), + + RatingBar( + initialRating: model.products[index].approvedRatingSum!.toDouble(), + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star_border, + color: CustomColors.accentColor, + ), + ), + onRatingUpdate: (double value) {}, + unratedColor: Colors.grey[500], + updateOnDrag: false, + tapOnlyMode: false, + ), + + Texts( + "(${model.products[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: FontWeight.w500, + ) + ], + ), + ], + ), + ), + ], + ), + ); + }), + ), + ) + ], + ), + ) + : Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + 'assets/images/new-design/empty_box.png', + width: 100, + height: 100, + fit: BoxFit.cover, + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + TranslationBase.of(context).noOffersAvailable, +// 'There is no data', + style: TextStyle(fontSize: 30), + ), + ) + ], + ), +// child: Texts( +// "SORRY , there's no listed offers now :(", +// color: Colors.green, +// ) + ))); + } +} diff --git a/lib/pages/packages_offers/ClinicOfferAndPackagesPage.dart b/lib/pages/packages_offers/ClinicOfferAndPackagesPage.dart new file mode 100644 index 00000000..247203ad --- /dev/null +++ b/lib/pages/packages_offers/ClinicOfferAndPackagesPage.dart @@ -0,0 +1,94 @@ +import 'package:after_layout/after_layout.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/requests/AddProductToCartRequestModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/packages_offers/PackagesOffersViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/packages_offers/packages_offers_tab_pager.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart' as utils; +import 'package:diplomaticquarterapp/widgets/offers_packages/PackagesOfferCard.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +// import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart' as grid_view; + +import 'CreateCustomerDailogPage.dart'; + +dynamic languageID; + +class ClinicPackagesPage extends StatefulWidget { + List products; + + ClinicPackagesPage({required this.products}); + + @override + _ClinicPackagesPageState createState() => _ClinicPackagesPageState(); +} + +class _ClinicPackagesPageState extends State with AfterLayoutMixin { + AppScaffold? appScaffold; + + List get _products => widget.products; + PackagesViewModel? viewModel; + + onProductCartClick(PackagesResponseModel product) async { + if (viewModel!.service.customer == null) viewModel!.service.customer = await CreateCustomerDialogPage(context: context).show(); + + if (viewModel!.service.customer != null) { + var request = AddProductToCartRequestModel(product_id: product.id, customer_id: viewModel!.service!.customer!.id); + await viewModel!.service.addProductToCart(request, context: context).then((response) {}).catchError((error) { + utils.Utils.showErrorToast(error); + }); + } + } + + @override + void afterFirstLayout(BuildContext context) async { + // appScaffold.appBar.badgeUpdater(viewModel.service.cartItemCount); + } + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + allowAny: true, + onModelReady: (model) { + viewModel = model; + }, + builder: (_, model, wi) => appScaffold = AppScaffold( + appBarTitle: TranslationBase.of(context).offerAndPackages, + isShowAppBar: true, + isPharmacy: false, + showPharmacyCart: false, + showHomeAppBarIcon: false, + isOfferPackages: true, + showOfferPackagesCart: true, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + body: Padding( + padding: const EdgeInsets.all(12), + // child: grid_view.AlignedGridView.count( + // crossAxisCount: 4, + // itemCount: _products.length, + // itemBuilder: (BuildContext context, int index) => new Container( + // color: Colors.transparent, + // child: PackagesItemCard( + // itemContentPadding: 10, + // itemModel: _products[index], + // onCartClick: OFFERS_VIEW_ONLY ? onProductCartClick : (PackagesResponseModel) {}, + // )), + // // staggeredTileBuilder: (int index) => StaggeredTile.fit(2), + // mainAxisSpacing: 20, + // crossAxisSpacing: 10, + // ), + ), + ), + ); + } +} diff --git a/lib/pages/packages_offers/CreateCustomerDailogPage.dart b/lib/pages/packages_offers/CreateCustomerDailogPage.dart new file mode 100644 index 00000000..ce53c66b --- /dev/null +++ b/lib/pages/packages_offers/CreateCustomerDailogPage.dart @@ -0,0 +1,179 @@ +import 'package:after_layout/after_layout.dart'; +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/requests/CreateCustomerRequestModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCustomerResponseModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/packages_offers/PackagesOffersViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/AnimatedTextFields.dart'; +import 'package:diplomaticquarterapp/widgets/LoadingButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; + +dynamic languageID; +var emailRegex = RegExp(r'^[^\s@]+@[^\s@]+\.[^\s@]+$'); + +class CreateCustomerDialogPage extends StatefulWidget { + final BuildContext? context; + CreateCustomerDialogPage({this.context}); + PackagesViewModel? viewModel; + + Future show() async{ + await showDialog(context: context!, builder: (context ){ + return AlertDialog(content: this, shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20) + ), elevation: 5, ); + }); + return viewModel!.service!.customer; + } + + @override + _CreateCustomerDialogPageState createState() => _CreateCustomerDialogPageState(); + +} + +class _CreateCustomerDialogPageState extends State with AfterLayoutMixin, TickerProviderStateMixin{ + AnimationController? _loadingController; + AnimationController? _submitController; + bool _enableInput = true; + + Interval _nameTextFieldLoadingAnimationInterval = const Interval(0, .85); + + final _phoneFocusNode = FocusNode(); + + @override + void initState() { + _submitController = AnimationController(vsync: this, duration: Duration(milliseconds: 1000),); + super.initState(); + } + + @override + void afterFirstLayout(BuildContext context) async{ + } + + // Controllers + TextEditingController _emailTextController = TextEditingController(); + TextEditingController _phoneTextController = TextEditingController(); + TextEditingController _emailPinTextController = TextEditingController(); + TextEditingController _phonePinTextController = TextEditingController(); + + bool verifyPin = false; + + PackagesViewModel viewModel() => widget.viewModel!; + + @override + Widget build(BuildContext context) { + + return BaseView( + allowAny: true, + onModelReady: (model) => widget.viewModel = model, + builder: (_, model, wi) => verifyPin ? verifyPinWidget() : userDetailWidget() + ); + } + + Widget verifyPinWidget(){ +return SizedBox(); + } + + + Widget userDetailWidget(){ + return + Container( + width: SizeConfig.realScreenWidth! * 0.8, + height: 270, + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Align( + alignment: Alignment.center, + child: Texts("Create Guest Customer", textAlign: TextAlign.center, fontSize: 18, fontWeight: FontWeight.bold,) + ), + SizedBox(height: 30,), + AnimatedTextFormField( + enabled: _enableInput, + controller: _emailTextController, + width: 100, + loadingController: _loadingController, + interval: _nameTextFieldLoadingAnimationInterval, + labelText: "Email", + prefixIcon: Icon(Icons.email), + keyboardType: TextInputType.emailAddress, + textInputAction: TextInputAction.next, + onFieldSubmitted: (value) { + FocusScope.of(context).requestFocus(_phoneFocusNode); + }, + validator: (value){ + return (value!.isEmpty || !emailRegex.hasMatch(value)) + ? 'Invalid email!' + : null; + }, + ), + + SizedBox(height: 30,), + AnimatedTextFormField( + enabled: _enableInput, + controller: _phoneTextController, + width: 100, + loadingController: _loadingController, + interval: _nameTextFieldLoadingAnimationInterval, + labelText: "Mobile Number", + prefixIcon: Icon(Icons.phone_android), + keyboardType: TextInputType.phone, + textInputAction: TextInputAction.next, + onFieldSubmitted: (value) { + FocusScope.of(context).requestFocus(_phoneFocusNode); + }, + validator: (value){ + return (value!.isEmpty || !emailRegex.hasMatch(value)) + ? 'Invalid email!' + : null; + }, + ), + Spacer(flex: 1,), + + AnimatedButton( + color: Theme.of(context).primaryColor, + loadingColor: Theme.of(context).primaryColor, + controller: _submitController!, + text: TranslationBase.of(context).done, + onPressed: (){ + createCustomer(); + }, + ) + + , + ], + ), + ); + } + + createCustomer() async{ + setState(() => _enableInput = false); + + // loading(true); + // var request = PackagesCustomerRequestModel(email: _emailTextController.text, phoneNumber: _phoneTextController.text); + // viewModel().service + // .createCustomer(request, context: context, showLoading: false) + // .then((value) => success()) + // .catchError((error) => showError(error)); + + } + + success() async{ + loading(false); + await Future.delayed(Duration(seconds: 2)); + Navigator.of(context).pop(); + } + + showError(String errorMessage) async{ + loading(false); + setState(() => _enableInput = true); + } + + loading(bool can){ + can ? _submitController!.forward() : _submitController!.reverse(); + } + +} diff --git a/lib/pages/packages_offers/OfferAndPackageDetailPage.dart b/lib/pages/packages_offers/OfferAndPackageDetailPage.dart new file mode 100644 index 00000000..14ddf937 --- /dev/null +++ b/lib/pages/packages_offers/OfferAndPackageDetailPage.dart @@ -0,0 +1,279 @@ +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/packages_offers/PackagesOffersViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:expandable/expandable.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:html/parser.dart'; + + +class OfferAndPackagesDetail extends StatefulWidget { + final PackagesResponseModel itemModel; + final Function(PackagesResponseModel product) onCartClick; + bool showAddToCartFooter = true; + + OfferAndPackagesDetail({required this.itemModel, required this.onCartClick, Key? key}) : super(key: key); + + @override + State createState() => OfferAndPackagesDetailState(); +} + +class OfferAndPackagesDetailState extends State { + PackagesViewModel? viewModel; + + bool expandFlag = false; + var controller = new ExpandableController(); + + @override + Widget build(BuildContext context) { + final images = widget.itemModel.images ?? []; + String image = ""; + if(images.isNotEmpty) + image = widget.itemModel.images!.first.src ?? ""; + + return BaseView( + onModelReady: (model) { + viewModel = model; + }, + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).offerAndPackages, + isShowAppBar: true, + isPharmacy: false, + showPharmacyCart: false, + showHomeAppBarIcon: false, + isOfferPackages: true, + showOfferPackagesCart: true, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + body: Column( + children: [ + Expanded( + child: ListView( + physics: BouncingScrollPhysics(), + children: [ + Container( + color: Colors.white, + padding: const EdgeInsets.all(21.0), + child: AspectRatio( + aspectRatio: 333 / 333, + child: ClipRRect( + borderRadius: BorderRadius.circular(15.0), + child: Image.network( + image, + fit: BoxFit.fill, + errorBuilder: (a1,a2,a3) => Container(color: Colors.grey.withOpacity(0.25),), + ), + ), + ), + ), + Padding( + padding: const EdgeInsets.all(21.0), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + widget.itemModel.name!, + maxLines: 1, + style: TextStyle(fontSize: 19.0, fontWeight: FontWeight.bold, color: Color(0xff2E303A), letterSpacing: -1.14), + ), + Text( + widget.itemModel.shortDescription!, + style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -.56), + ), + SizedBox(height: 9), + Row( + children: [ + // RatingBar.readOnly( + // initialRating: 4.5, + // // todo ask haroon about rating value + // size: 18.0, + // filledColor: Color(0XFFD02127), + // emptyColor: Color(0XFFD02127), + // isHalfAllowed: true, + // halfFilledIcon: Icons.star_half, + // filledIcon: Icons.star, + // emptyIcon: Icons.star_border, + // ), + RatingBar( + initialRating: 4.5, + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon(Icons.star, color: CustomColors.accentColor,), + half: Icon(Icons.star_half, color: CustomColors.accentColor,), + empty: Icon(Icons.star, color: CustomColors.accentColor,), + ), + tapOnlyMode: true, + unratedColor: Colors.grey[500], + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + ) + ], + ), + SizedBox(height: 16), + SizedBox( + height: 34, + child: ListView.separated( + scrollDirection: Axis.horizontal, + shrinkWrap: true, + physics: BouncingScrollPhysics(), + itemCount: widget.itemModel.storeNames!.length, + separatorBuilder: (context, index) { + return mWidth(5.0); + }, + itemBuilder: (BuildContext context, int index) { + return contactButton(widget.itemModel.storeNames![index].toString()); + }, + ), + ), + ], + ), + ), + ExpandableNotifier( + initialExpanded: true, + child: Container( + color: Colors.white, + margin: EdgeInsets.only(bottom: 21), + child: Column( + children: [ + ScrollOnExpand( + scrollOnExpand: true, + scrollOnCollapse: false, + child: ExpandablePanel( + + theme: const ExpandableThemeData( + headerAlignment: ExpandablePanelHeaderAlignment.center, + tapBodyToCollapse: true, + ), + header: InkWell( + onTap: () { + setState(() { + expandFlag = !expandFlag; + controller.expanded = expandFlag; + }); + }, + child: Padding( + padding: const EdgeInsets.all(21), + child: Row( + children: [ + Expanded( + child: Text( + TranslationBase.of(context).description, + maxLines: 1, + style: TextStyle(fontSize: 19.0, color: Color(0xff2E303A), fontWeight: FontWeight.bold, letterSpacing: -1.14), + ), + ), + Icon( + expandFlag ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, + color: Color(0xff2E303A), + ), + ], + ), + ), + ), + builder: (_, collapsed, expanded) { + return Expandable( + controller: controller, + collapsed: collapsed, + expanded: Padding( + padding: const EdgeInsets.only(bottom: 21, left: 21, right: 21), + child: Text(parseHtmlString(widget.itemModel.fullDescription!), + style: TextStyle( + fontSize: 14.0, + fontWeight: FontWeight.w600, + letterSpacing: -0.56, + color: Color(0xff575757), + ), + overflow: TextOverflow.clip), + ), + theme: const ExpandableThemeData(crossFadePoint: 0), + ); + }, collapsed: SizedBox(), expanded: SizedBox(), + ), + ), + ], + ), + ), + ), + ], + ), + ), + if(widget.showAddToCartFooter && widget.onCartClick != null) + Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (widget.itemModel.hasDiscountsApplied!) + Text(widget.itemModel.oldPrice.toString() + " " + TranslationBase.of(context).sar, + style: TextStyle(fontSize: 15.0, fontWeight: FontWeight.w600, letterSpacing: -0.6, decoration: TextDecoration.lineThrough, color: CustomColors.grey2)), + Text(widget.itemModel.price.toString().trim() + " " + TranslationBase.of(context).sar, + style: TextStyle(fontSize: 19.0, fontWeight: FontWeight.bold, letterSpacing: -0.76, color: Color(0xff2B353E))), + ], + ), + ), + SizedBox(width: 8), + Expanded( + child: DefaultButton( + TranslationBase.of(context).addToCart, + () { + widget.onCartClick(widget.itemModel); + }, + svgIcon: "assets/images/new/add_to_cart.svg", + isTextExpanded: false, + ), + ), + ], + ).insideContainer + ], + ), + ), + ); + } + + String parseHtmlString(String htmlString) { + var document = parse(htmlString); + String parsedString = parse(document.body!.text!).documentElement!.text!; + return parsedString; + } + + Widget contactButton(String title) { + return Container( + height: 34, + padding: EdgeInsets.only(left: 12, right: 12, top: 8, bottom: 9), + alignment: Alignment.center, + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Color(0xffEAEAEA), width: 1), + borderRadius: BorderRadius.all( + Radius.circular(36.0), + ), + ), + child: Text( + title, + style: TextStyle( + fontSize: 10, + letterSpacing: -0.4, + fontWeight: FontWeight.w600, + color: Color(0xff535353), + ), + maxLines: 1, + ), + ); + } +} diff --git a/lib/pages/packages_offers/OfferAndPackagesCartPage.dart b/lib/pages/packages_offers/OfferAndPackagesCartPage.dart new file mode 100644 index 00000000..9f9d6858 --- /dev/null +++ b/lib/pages/packages_offers/OfferAndPackagesCartPage.dart @@ -0,0 +1,404 @@ +import 'package:after_layout/after_layout.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/ResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/requests/AddProductToCartRequestModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/packages_offers/PackagesOffersViewModel.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/packages_offers/PackageOrderCompletedPage.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart' as utils; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/offers_packages/PackagesCartItemCard.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; + +import '../../core/model/packages_offers/responses/PackagesCartItemsResponseModel.dart'; + +dynamic languageID; +const _columnCount = 1; +bool _agreeTerms = false; +String? _selectedPaymentMethod; +Map? _selectedPaymentParams; + +AnimationController? _animationController; + +class PackagesCartPage extends StatefulWidget { + PackagesCartPage(); + + @override + _PackagesCartPageState createState() => _PackagesCartPageState(); +} + +class _PackagesCartPageState extends State with AfterLayoutMixin, SingleTickerProviderStateMixin { + getLanguageID() async { + languageID = await sharedPref.getString(APP_LANGUAGE); + } + + double? subtotal, tax, total; + int _selectedHospitalIndex = -1; + HospitalsModel? _selectedHospital; + + @override + void initState() { + _agreeTerms = false; + _selectedPaymentMethod = null; + _animationController = AnimationController(vsync: this, duration: Duration(seconds: 500)); + super.initState(); + } + + @override + void dispose() { + _animationController!.dispose(); + viewModel!.cartItemList.clear(); + super.dispose(); + } + + PackagesViewModel? viewModel; + + bool loadWidgets = false; + + onTermsClick(bool isAgree) { + setState(() => _agreeTerms = isAgree); + } + + onTermsInfoClick() { + Navigator.push(context, FadePage(page: PharmacyTermsConditions())); + } + + onPayNowClick() async { + await viewModel!.service.placeOrder(context: context, projectID: _selectedHospital!.iD, paymentParams: _selectedPaymentParams!).then((orderId) { + if (orderId.runtimeType == int) { + var browser = MyInAppBrowser(context: context, onExitCallback: (data, isDone) => paymentClosed(orderId: orderId, withStatus: isDone, data: data)); + browser.openPackagesPaymentBrowser(customer_id: viewModel!.service.customer!.id, order_id: orderId); + } else { + utils.Utils.showErrorToast('Failed to place order, please try again later'); + } + }).catchError((error) { + utils.Utils.showErrorToast(error.toString()); + }); + } + + @override + void afterFirstLayout(BuildContext context) { + fetchData(); + viewModel!.service.getHospitals(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + allowAny: true, + onModelReady: (model) => viewModel = model, + builder: (_, model, wi) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).offerAndPackages, + isShowAppBar: true, + isPharmacy: false, + showPharmacyCart: false, + showHomeAppBarIcon: false, + isOfferPackages: true, + showOfferPackagesCart: false, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + body: viewModel!.cartItemList.length > 0 + ? Column( + children: [ + Expanded( + child: ListView.separated( + padding: EdgeInsets.all(21), + physics: BouncingScrollPhysics(), + itemBuilder: (cxt, index) { + var item = viewModel!.cartItemList[index]; + return PackagesCartItemCard( + itemModel: item, + viewModel: viewModel!, + getCartItems: fetchData, + shouldStepperChangeApply: (apply, total) async { + var request = AddProductToCartRequestModel(product_id: item.productId, quantity: apply); + ResponseModel? response = await viewModel!.service!.addProductToCart!(request, context: context, showLoading: false)!.catchError((error) { + utils.Utils.showErrorToast(error); + }); + if (response!.status!) { + fetchData(); + } + return response.status ?? false; + }, + ); + }, + separatorBuilder: (cxt, index) => SizedBox(height: 12), + itemCount: viewModel!.cartItemList.length), + ), + Container( + height: 1, + color: Color(0xffEFEFEF), + ), + if (viewModel!.cartItemList.length > 0) + Container( + padding: EdgeInsets.only(left: 21, right: 21, top: 15, bottom: 15), + width: double.infinity, + color: Colors.white, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + CommonDropDownView( + TranslationBase.of(context).hospital, + getHospitalName(), + () => confirmSelectHospitalDialog(model.hospitals), + ).withBorderedContainer, + SizedBox(height: 12), + Text( + TranslationBase.of(context).YouCanPayByTheFollowingOptions, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + ), + ), + SizedBox( + width: MediaQuery.of(context).size.width * 0.75, + child: getPaymentMethods(), + ), + Padding( + padding: EdgeInsets.only(top: 12.0, bottom: 12), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 16.0, + width: 16.0, + child: Checkbox( + value: _agreeTerms, + onChanged: (v) { + setState(() => _agreeTerms = v!); + }), + ), + SizedBox(width: 10), + Expanded( + child: Text( + TranslationBase.of(context).iAcceptTermsConditions, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: CustomColors.textColor, letterSpacing: -0.48), + ), + ), + ], + ), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _amountView(TranslationBase.of(context).patientShareToDo, (subtotal ?? 0.0).toStringAsFixed(2) + " " + TranslationBase.of(context).sar, isBold: true), + mDivider(Color(0xffEFEFEF)), + _amountView(TranslationBase.of(context).patientTaxToDo, (tax ?? 0.0).toStringAsFixed(2) + " " + TranslationBase.of(context).sar, isBold: true), + mDivider(Color(0xffEFEFEF)), + _amountView(TranslationBase.of(context).patientShareTotalToDo, (total ?? 0.0).toStringAsFixed(2) + " " + TranslationBase.of(context).sar, isBold: true, isTotal: true), + ], + ), + SizedBox(height: 12), + DefaultButton( + TranslationBase.of(context).payNow, + (_agreeTerms && _selectedHospital != null) + ? () { + Navigator.push(context, FadePage(page: PaymentMethod(onSelectedMethod: (String metohd) { + setState(() {}); + }))).then((value) { + print(value); + if (value != null) { + _selectedPaymentMethod = value; + _selectedPaymentParams = {"payment_method_system_name": "Payments.PayFort", "payment_option": value}; + onPayNowClick(); + } + }); + } + : null, + color: CustomColors.green, + disabledColor: CustomColors.grey2, + ), + ], + ), + ) + ], + ) + : getNoDataWidget(context), + ); + }, + ); + } + + void confirmSelectHospitalDialog(List hospitals) { + List list = [ + for (int i = 0; i < hospitals.length; i++) RadioSelectionDialogModel(hospitals[i].name! + ' ${hospitals[i].distanceInKilometers} ' + TranslationBase.of(context).km, i), + ]; + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: _selectedHospitalIndex, + isScrollable: true, + onValueSelected: (index) { + _selectedHospitalIndex = index; + _selectedHospital = hospitals[index]; + setState(() {}); + }, + ), + ); + } + + String getHospitalName() { + if (_selectedHospital != null) + return _selectedHospital!.name!; + else + return TranslationBase.of(context).selectHospital; + } + + fetchData() async { + final cartResponse = await viewModel!.service.cartItems(context: context).catchError((error) {}); + if(cartResponse != null){ + subtotal = cartResponse['subtotal'] ?? 0.0; + tax = cartResponse['tax'] ?? 0.0; + total = cartResponse['total'] ?? 0.0; + viewModel!.service!.getTamaraOptions(context: context, showLoading: true).then((tamara_options){ + if(tamara_options != null || tamara_options.isNotEmpty) { + viewModel!.setTamaraIllegablity(total!); + setState(() {}); + } + }); + } + } + + paymentClosed({required int orderId, required bool withStatus, dynamic data}) async { + viewModel!.service.getOrderById(orderId, context: context).then((value) { + var heading = withStatus ? "Success" : "Failed"; + var title = withStatus ? "Your order has been placed successfully" : "Failed to place your order"; + var subTitle = "Order# ${value!.data!.customOrderNumber}"; + Navigator.of(context).pushReplacement(MaterialPageRoute(builder: (context) => PackageOrderCompletedPage(heading: heading, title: title, subTitle: subTitle))); + }).catchError((error) { + print(error); + }); + } + +} + +// Widget _payNow(BuildContext context, {double subtotal, double tax, double total, @required VoidCallback onPayNowClick}) { +// bool isPayNowAQctive = (_agreeTerms && (_selectedPaymentMethod != null)); +// +// String _subtotal = (subtotal ?? 0.0).toStringAsFixed(2); +// String _tax = (tax ?? 0.0).toStringAsFixed(2); +// String _total = (total ?? 0).toStringAsFixed(2); +// +// return Padding( +// padding: const EdgeInsets.all(5), +// child: Container( +// child: Row( +// crossAxisAlignment: CrossAxisAlignment.end, +// children: [ +// Padding( +// padding: const EdgeInsets.all(5), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Texts('${TranslationBase.of(context).subtotal}: $_subtotal ${TranslationBase.of(context).sar}', heightFactor: 1.5, fontWeight: FontWeight.bold, color: Colors.grey, fontSize: 8), +// Texts('${TranslationBase.of(context).vat}: $_tax ${TranslationBase.of(context).sar}', heightFactor: 1.5, fontWeight: FontWeight.bold, color: Colors.grey, fontSize: 8), +// Padding( +// padding: const EdgeInsets.all(3), +// child: Container( +// height: 0.25, +// width: 120, +// color: Colors.grey[300], +// ), +// ), +// Texts('${TranslationBase.of(context).total}: $_total ${TranslationBase.of(context).sar}', heightFactor: 1.5, fontWeight: FontWeight.bold, color: Colors.black54, fontSize: 15) +// ], +// ), +// ), +// Expanded(child: Container()), +// RaisedButton( +// elevation: 0, +// child: Texts( +// TranslationBase.of(context).payNow, +// fontSize: 15, +// color: Colors.white, +// fontWeight: FontWeight.bold, +// ), +// padding: EdgeInsets.only(top: 5, bottom: 5, left: 0, right: 0), +// shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5), side: BorderSide(color: Theme.of(context).primaryColor, width: 0.5)), +// color: Theme.of(context).primaryColor, +// onPressed: isPayNowAQctive ? onPayNowClick : null, +// ), +// ], +// )), +// ); +// } +_amountView(String title, String value, {bool isBold = false, bool isTotal = false}) { + return Padding( + padding: const EdgeInsets.only(top: 10, bottom: 10), + child: Row(children: [ + Expanded( + child: _getNormalText(title), + ), + Expanded( + child: _getNormalText(value, isBold: isBold, isTotal: isTotal), + ), + ]), + ); +} + +_getNormalText(text, {bool isBold = false, bool isTotal = false}) { + return Text( + text, + style: TextStyle( + fontSize: isBold + ? isTotal + ? 16 + : 12 + : 11, + letterSpacing: -0.5, + color: isBold ? Color(0xff2E303A) : Color(0xff575757), + fontWeight: isTotal ? FontWeight.bold : FontWeight.w600, + ), + ); +} + +Widget _cartItemDeleteContainer() { + _animationController!.duration = Duration(milliseconds: 500); + _animationController!.repeat(reverse: true); + return FadeTransition( + opacity: _animationController!, + child: Padding( + padding: const EdgeInsets.all(5), + child: Container( + decoration: BoxDecoration( + color: Colors.red, + boxShadow: [ + BoxShadow( + color: Colors.grey[500]!, + blurRadius: 2, + spreadRadius: 1, + ), + ], + borderRadius: BorderRadius.all(Radius.circular(5)), + ), + child: Center( + child: Texts( + "Deleting...", + fontWeight: FontWeight.normal, + fontSize: 15, + color: Colors.white, + )), + ), + ), + ); +} diff --git a/lib/pages/packages_offers/OfferAndPackagesPage.dart b/lib/pages/packages_offers/OfferAndPackagesPage.dart new file mode 100644 index 00000000..bad29b62 --- /dev/null +++ b/lib/pages/packages_offers/OfferAndPackagesPage.dart @@ -0,0 +1,385 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/requests/AddProductToCartRequestModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersProductsRequestModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCategoriesResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/offers_stores_response_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/packages_offers/PackagesOffersViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/packages_offers/ClinicOfferAndPackagesPage.dart'; +import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackagesCartPage.dart'; +import 'package:diplomaticquarterapp/pages/packages_offers/packages_offers_tab_pager.dart'; +import 'package:diplomaticquarterapp/pages/packages_offers/packages_orders_history.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart' as auth; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart' as utils; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/offers_packages/PackagesOfferCard.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:provider/provider.dart'; + +class PackagesHomePage extends StatefulWidget { + final AuthenticatedUser user; + + PackagesHomePage(this.user); + + @override + _PackagesHomePageState createState() => _PackagesHomePageState(); +} + +class _PackagesHomePageState extends State { + ProjectViewModel? projectViewModel; + + @override + void initState() { + super.initState(); + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { + viewModel!.service.patientUser = widget.user; + viewModel!.service.loadOffersPackagesDataForMainPage( + context: context, + completion: () { + setState(() {}); + }); + }); + } + + // Controllers + var _searchTextController = TextEditingController(); + + ListView? _listViewLatestOffers; + ListView? _listViewBestSeller; + + PackagesViewModel? viewModel; + + onCartClick() { + if (viewModel!.service.customer == null) { + utils.Utils.showErrorToast("Cart is empty for your current session"); + return; + } + Navigator.of(context).push(MaterialPageRoute(builder: (BuildContext context) => PackagesCartPage())); + } + + onProductCartClick(PackagesResponseModel product) async { + if (viewModel!.service.customer == null) { + // viewModel.service.customer = await CreateCustomerDialogPage(context: context).show(); + loginCheck(context); + } + + if (viewModel!.service.customer != null) { + var request = AddProductToCartRequestModel(product_id: product.id, customer_id: viewModel!.service.customer!.id); + await viewModel!.service.addProductToCart(request, context: context).then((response) {}).catchError((error) { + utils.Utils.showErrorToast(error.toString()); + }); + } + } + + PackagesCategoriesResponseModel? selectedClinic; + OfferProject? selectedProject; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + allowAny: true, + onModelReady: (model) => viewModel = model, + builder: (_, model, wi) { + return Column( + children: [ + Expanded( + child: ListView( + padding: EdgeInsets.only(top: 21, bottom: 21), + physics: BouncingScrollPhysics(), + children: [ + if(OFFERS_VIEW_ONLY) + inputWidget(TranslationBase.of(context).search, "", _searchTextController, isInputTypeNum: false), + SizedBox(height: 12), + Padding( + padding: const EdgeInsets.only(left: 21, right: 21), + child: CommonDropDownView(TranslationBase.of(context).browseOffersByProject, selectedProject?.name ?? TranslationBase.of(context).selectProject, () => showHospitalSelectionList()) + .withBorderedContainer, + ), + SizedBox(height: 12), + Padding( + padding: const EdgeInsets.only(left: 21, right: 21), + child: CommonDropDownView(TranslationBase.of(context).browseOffers, selectedClinic?.name ?? TranslationBase.of(context).selectClinic, () => showClinicSelectionList()) + .withBorderedContainer, + ), + SizedBox(height: 12), + Container( + width: double.infinity, + height: MediaQuery.of(context).size.width * 0.8, + child: ListView.separated( + scrollDirection: Axis.horizontal, + shrinkWrap: true, + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(left: 21, right: 21), + itemCount: viewModel!.bestSellerList.length, + separatorBuilder: (context, index) { + return mWidth(9.0); + }, + itemBuilder: (BuildContext context, int index) { + return PackagesItemCard( + itemModel: viewModel!.bestSellerList[index], + onCartClick: OFFERS_VIEW_ONLY! ? onProductCartClick : (PackagesResponseModel){}, itemContentPadding: null, + ); + }, + ), + ), + SizedBox(height: 12), + Container( + width: double.infinity, + height: MediaQuery.of(context).size.width * 0.8, + child: ListView.separated( + scrollDirection: Axis.horizontal, + shrinkWrap: true, + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(left: 21, right: 21), + itemCount: viewModel!.latestOffersList.length, + separatorBuilder: (context, index) { + return mWidth(9.0); + }, + itemBuilder: (BuildContext context, int index) { + return PackagesItemCard( + itemModel: viewModel!.latestOffersList[index], + onCartClick: OFFERS_VIEW_ONLY ? onProductCartClick : (PackagesResponseModel){}, itemContentPadding: null, + ); + }, + ), + ), + ], + ), + ), + + if(OFFERS_VIEW_ONLY) + DefaultButton( + TranslationBase.of(context).myCart, + onCartClick, + svgIcon: "assets/images/new/cart.svg", + isTextExpanded: false, + count: viewModel?.service?.customer?.shoppingCartItems?.length ?? 0, + ).insideContainer + ], + ); + }, + ); + } + + int _selectedClinic = -1; + + showClinicSelectionList() async { + var clinics = await viewModel!.service.getAllCategories(OffersCategoriesRequestModel()); + List list = [ + for (int i = 0; i < clinics.length; i++) RadioSelectionDialogModel(clinics![i].name!, i), + ]; + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: _selectedClinic, + isScrollable: true, + onValueSelected: (index) async { + _selectedClinic = index; + selectedClinic = clinics[index]; + var clinicProducts = await viewModel!.service.getAllProducts(request: OffersProductsRequestModel(categoryId: selectedClinic!.id), context: context, showLoading: true); + if (clinicProducts.isNotEmpty) + Navigator.of(context).push(MaterialPageRoute(builder: (BuildContext context) => ClinicPackagesPage(products: clinicProducts))); + else + utils.Utils.showErrorToast("No offers available for this clinic"); + setState(() {}); + }, + ), + ); + } + + int _selectedHospital = -1; + + showHospitalSelectionList() async { + GifLoaderDialogUtils.showMyDialog(context); + var hospitals = await viewModel!.service.getAllStores(); + GifLoaderDialogUtils.hideDialog(context); + + List list = [ + for (int i = 0; i < hospitals.length; i++) RadioSelectionDialogModel(hospitals[i].name!, i), + ]; + showDialog( + context: context, + builder: (cxt) => RadioSelectionDialog( + listData: list, + selectedIndex: _selectedHospital, + isScrollable: true, + onValueSelected: (index) async { + _selectedHospital = index; + selectedProject = hospitals[index]; + var request = OffersProductsRequestModel(storeId: selectedProject!.id); + request.sinceId = 0; + var products = await viewModel!.service.getAllProducts(request: request, context: context, showLoading: true); + if (products.isNotEmpty) + Navigator.of(context).push(MaterialPageRoute(builder: (BuildContext context) => ClinicPackagesPage(products: products))); + else + utils.Utils.showErrorToast("No offers available for this clinic"); + setState(() {}); + }, + ), + ); + } + + //---------------------------------- + // Main Widgets of Page + //---------------------------------- + + Widget latestOfferListView({required double itemWidth, required double itemContentPadding}) { + return _listViewLatestOffers = ListView.separated( + scrollDirection: Axis.horizontal, + shrinkWrap: true, + itemCount: viewModel!.bestSellerList.length, + itemBuilder: (BuildContext context, int index) { + return PackagesItemCard( + itemWidth: itemWidth, + itemContentPadding: itemContentPadding, + itemModel: viewModel!.bestSellerList[index], + onCartClick: onProductCartClick, + ); + }, + separatorBuilder: separator, + ); + } + + Widget bestSellerListView({required double itemWidth, required double itemContentPadding}) { + return _listViewLatestOffers = ListView.separated( + scrollDirection: Axis.horizontal, + itemCount: viewModel!.bestSellerList.length, + itemBuilder: (BuildContext context, int index) { + return PackagesItemCard( + itemWidth: itemWidth, + itemContentPadding: itemContentPadding, + itemModel: viewModel!.bestSellerList[index], + onCartClick: onProductCartClick, + ); + }, + separatorBuilder: separator, + ); + } + + Widget separator(BuildContext context, int index) { + return Container( + width: 1, + decoration: BoxDecoration( + gradient: + LinearGradient(begin: Alignment(-1.0, -2.0), end: Alignment(1.0, 4.0), colors: [Colors.grey, Colors.grey[100]!, Colors.grey[200]!, Colors.grey[300]!, Colors.grey[400]!, Colors.grey[500]!])), + ); + } + + loginCheck(context) async { + var data = await sharedPref.getObject(IMEI_USER_DATA); + sharedPref.remove(REGISTER_DATA_FOR_LOGIIN); + if (data != null) { + Navigator.of(context).pushNamed(CONFIRM_LOGIN); + } else { + GifLoaderDialogUtils.showMyDialog(context); + + auth.AuthProvider().selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES? value) { + GifLoaderDialogUtils.hideDialog(context); + if (value != null) { + sharedPref.setObject(IMEI_USER_DATA, value); + Navigator.of(context).pushNamed(CONFIRM_LOGIN); + } else { + Navigator.of(context).pushNamed( + WELCOME_LOGIN, + ); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + Navigator.of(context).pushNamed( + WELCOME_LOGIN, + ); + }); + } + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, + {VoidCallback? suffixTap, bool isEnable = true, bool hasSelection = false, int? lines, bool isInputTypeNum = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + margin: const EdgeInsets.only(left: 21, right: 21), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: isInputTypeNum ? TextInputType.number : TextInputType.text, + controller: _controller, + maxLines: lines, + onChanged: (value) => {setState(() {})}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + Icon(Icons.search_outlined), + ], + ), + ), + ); + } +} diff --git a/lib/pages/packages_offers/PackageOrderCompletedPage.dart b/lib/pages/packages_offers/PackageOrderCompletedPage.dart new file mode 100644 index 00000000..453de1fc --- /dev/null +++ b/lib/pages/packages_offers/PackageOrderCompletedPage.dart @@ -0,0 +1,126 @@ +import 'package:diplomaticquarterapp/core/viewModels/packages_offers/PackagesOffersViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:flutter_svg/svg.dart'; + +dynamic languageID; + +class PackageOrderCompletedPage extends StatelessWidget { + double? buttonHeight; + double? buttonWidth; + Widget? icon; + String? heading; + String? title; + String? subTitle; + String? actionTitle; + + PackageOrderCompletedPage({this.buttonWidth, this.buttonHeight, this.heading, this.title, this.subTitle, this.actionTitle}); + + @override + Widget build(BuildContext context) { + assert((heading != null || title != null || subTitle != null), "Data missing in properties"); + + buttonWidth = buttonWidth ?? MediaQuery.of(context).size.width / 2; + buttonHeight = buttonHeight ?? 40; + actionTitle = actionTitle ?? TranslationBase.of(context).done; + + return BaseView( + allowAny: true, + onModelReady: (model) {}, + builder: (_, model, wi) { + return Container( + color: Colors.white, + child: Padding( + padding: const EdgeInsets.all(15), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + AspectRatio( + aspectRatio: 1.2 / 1, + child: iconWidget(context), + ), + headingWidget(context), + AspectRatio( + aspectRatio: 1 / 1, + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + titleWidget(context), + SizedBox( + height: 20, + ), + subTitleWidget(context), + SizedBox( + height: 50, + ), + actionWidget(context) + ], + ), + ), + ) + ], + ), + ), + ); + }); + } + + Widget iconWidget(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(50), + child: icon ?? SvgPicture.asset("assets/images/svg/success.svg", semanticsLabel: 'icon'), + ); + } + + Widget headingWidget(BuildContext context) => Texts( + heading, + textAlign: TextAlign.center, + maxLines: 1, + color: Theme.of(context).primaryColor, + fontSize: 35.0, + fontWeight: FontWeight.bold, + ); + + Widget titleWidget(BuildContext context) => Texts( + title, + textAlign: TextAlign.center, + maxLines: 2, + color: Theme.of(context).primaryColor, + fontSize: 25.0, + fontWeight: FontWeight.w200, + ); + + Widget subTitleWidget(BuildContext context) => Texts( + subTitle, + textAlign: TextAlign.center, + maxLines: 2, + color: Theme.of(context).primaryColor, + fontSize: 15.0, + fontWeight: FontWeight.normal, + ); + + Widget actionWidget(BuildContext context) => Container( + height: buttonHeight, + width: buttonWidth, + child: CustomTextButton( + shape: RoundedRectangleBorder( + borderRadius: new BorderRadius.circular(buttonHeight! / 2), + ), + child: Texts( + actionTitle, + color: Colors.white, + fontSize: 18.0, + fontWeight: FontWeight.normal, + ), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ); +} diff --git a/lib/pages/packages_offers/packages_offers_tab_pager.dart b/lib/pages/packages_offers/packages_offers_tab_pager.dart new file mode 100644 index 00000000..401d7852 --- /dev/null +++ b/lib/pages/packages_offers/packages_offers_tab_pager.dart @@ -0,0 +1,90 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackagesPage.dart'; +import 'package:diplomaticquarterapp/pages/packages_offers/packages_orders_history.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +bool OFFERS_VIEW_ONLY = false; +class PackagesOfferTabPage extends StatefulWidget{ + + AuthenticatedUser user; + PackagesOfferTabPage(this.user); + + @override + State createState() => PackagesOfferTabPageState(); +} + +class PackagesOfferTabPageState extends State with SingleTickerProviderStateMixin{ + TabController? _tabController; + ProjectViewModel? _projectViewModel; + + @override + void initState() { + _tabController = TabController(length: 2, vsync: this); + super.initState(); + } + + @override + Widget build(BuildContext context) { + _projectViewModel = Provider.of(context); + return AppScaffold( + description: TranslationBase.of(context).offerAndPackagesDetails, + imagesInfo: [ImagesInfo(imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png')], + appBarTitle: TranslationBase.of(context).offerAndPackages, + isShowAppBar: true, + isPharmacy: false, + backgroundColor: Color(0xfff7f7f7), + showPharmacyCart: false, + isOfferPackages: true, + showOfferPackagesCart: false, + isShowDecPage: false, + showNewAppBar: true, + showNewAppBarTitle: true, + body: Column( + children: [ + SizedBox( + height: OFFERS_VIEW_ONLY ? null : 0, + child: TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontFamily: _projectViewModel!.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontFamily: _projectViewModel!.isArabic ? 'Cairo' : 'Poppins', + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).offerAndPackages), Text(TranslationBase.of(context).orderLog)], + ), + ), + Expanded( + child: TabBarView( + physics: OFFERS_VIEW_ONLY ? BouncingScrollPhysics() : NeverScrollableScrollPhysics(), + controller: _tabController, + children: [ + PackagesHomePage(widget.user), + PackagesOrdersHistory() + ], + ), + ) + ], + ), + ); + } + +} diff --git a/lib/pages/packages_offers/packages_orders_history.dart b/lib/pages/packages_offers/packages_orders_history.dart new file mode 100644 index 00000000..ea9ba403 --- /dev/null +++ b/lib/pages/packages_offers/packages_orders_history.dart @@ -0,0 +1,98 @@ +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesCartItemsResponseModel.dart'; +import 'package:diplomaticquarterapp/core/model/packages_offers/responses/PackagesResponseModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/packages_offers/PackagesOffersViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/Loader/gif_loader_container.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart'; +import 'package:diplomaticquarterapp/widgets/offers_packages/PackagesOrderHistoryItemCard.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'OfferAndPackageDetailPage.dart'; +class PackagesOrdersHistory extends StatefulWidget{ + @override + State createState() => PackagesOrdersHistorySatate(); +} + +class PackagesOrdersHistorySatate extends State{ + ProjectViewModel? projectViewModel; + PackagesViewModel? packagesViewModel; + + List? orders; + + @override + void initState() { + Future.delayed(Duration(milliseconds: 200)).then((value) async{ + final orders_ = await packagesViewModel!.service.orderHistory(context: context); + setState(() => orders = orders_ ?? []); + }); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + allowAny: true, + onModelReady: (model) => packagesViewModel = model, + builder: (_, model, wi) { + return content(context); + } + ); + } + + Widget content(BuildContext context){ + if(orders == null){ + return SizedBox(); + }else if(orders!.isEmpty){ + return getNoDataWidget(context); + }else { + return ListView.separated( + padding: EdgeInsets.all(20), + itemCount: orders!.length, + itemBuilder: (ctx, idx) => item(ctx, order: orders![idx]), + separatorBuilder: (ctx, idx) => SizedBox(height: 10), + ); + } + } + + Widget item(BuildContext context, {required PackagesResponseModel order}){ + return InkWell( + child: PackagesOrderHistoryItemCard(itemModel: order, viewModel: packagesViewModel!), + onTap: (){ + final detailPage = OfferAndPackagesDetail(itemModel: order, onCartClick: (PackagesResponseModel){})..showAddToCartFooter = false; + Navigator.of(context).push(MaterialPageRoute(builder: (BuildContext context) => detailPage)); + }, + ); + } + + void showConfirmMessage(BuildContext context, {required PackagesResponseModel order}){ + showDialog( + context: context, + builder: (cxt) => ConfirmWithMessageDialog( + message: TranslationBase.of(context).cancelOrderMsg, + onTap: () { + }, + ), + ); + return; + } + + Color color(int status){ + if (status == 1) { //pending + return Color(0xffCC9B14); + } else if (status == 2) { //processing + return Color(0xff2E303A); + } else if (status == 3) { //completed + return Color(0xff359846); + } else if (status == 4 || status == 6 || status == 7) { //cancel // Rejected + return Color(0xffD02127); + } + return Colors.transparent; + } +} \ No newline at end of file diff --git a/lib/pages/parent_categorise_page.dart b/lib/pages/parent_categorise_page.dart new file mode 100644 index 00000000..83196fab --- /dev/null +++ b/lib/pages/parent_categorise_page.dart @@ -0,0 +1,1007 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart'; +import 'package:diplomaticquarterapp/pages/sub_categories_modalsheet.dart'; +import 'package:diplomaticquarterapp/pages/sub_categorise_page.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.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/others/entity_checkbox_list.dart'; +import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:provider/provider.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; + +import 'base/base_view.dart'; + +class ParentCategorisePage extends StatefulWidget { + String? id; + String? titleName; + + AuthenticatedUserObject authenticatedUserObject = locator(); + + ParentCategorisePage({this.id, this.titleName}); + + @override + _ParentCategorisePageState createState() => _ParentCategorisePageState(id: id, titleName: titleName); +} + +class _ParentCategorisePageState extends State { + String? id; + String? titleName; + final dynamic productID; + + _ParentCategorisePageState({ + this.id, + this.titleName, + this.productID, + }); + + bool checkedBrands = false; + bool checkedCategorise = false; + String categoriseName = "Personal Care"; + bool styleOne = true; + bool styleTwo = false; + Icon styleIcon = Icon( + Icons.widgets_sharp, + color: Colors.blue, + size: 29.0, + ); + + int pageIndex = 1; + + List entityList = []; + List entityListBrands = []; + + RefreshController controller = RefreshController(); + + @override + Widget build(BuildContext context) { + TextEditingController minField = TextEditingController(); + TextEditingController maxField = TextEditingController(); + ProjectViewModel projectViewModel = Provider.of(context); + ProjectViewModel projectProvider = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getCategoriseParent(i: id, pageIndex: pageIndex, isLoading: false, context: context), + allowAny: true, + builder: (BuildContext context, PharmacyCategoriseViewModel model, Widget? child) => AppScaffold( + isPharmacy: true, + appBarTitle: titleName!, + isBottomBar: true, + isShowAppBar: true, + backgroundColor: Colors.white, + isShowDecPage: false, + showPharmacyCart: false, + showHomeAppBarIcon: false, + baseViewModel: model, + body: SmartRefresher( + enablePullDown: false, + controller: controller, + enablePullUp: true, + onLoading: () async { + setState(() { + ++pageIndex; + }); + await model.getParentProducts(pageIndex: pageIndex, i: id, isLoading: true, context: context); + if (model.state != ViewState.BusyLocal && pageIndex < 5) { + controller.loadComplete(); + } else { + controller.loadFailed(); + } + }, + child: SingleChildScrollView( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: Image.network( + id == '1' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089188_personal-care_2.png' + : id == '2' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089189_skin-care_2.png' + : id == '3' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089190_health-care_2.png' + : id == '4' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089191_sexual-health_2.png' + : id == '5' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089192_beauty_2.png' + : id == '6' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089193_baby-child_2.png' + : id == '7' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089194_vitamins-supplements_2.png' + : id == '8' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089195_diet-nutrition_2.png' + : id == '9' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089196_household_2.png' + : id == '10' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089197_home-care-appliances_2.png' + : '', + fit: BoxFit.fill, + height: 160.0, + width: double.infinity), + ), + if (model.categoriseParent.length > 8) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InkWell( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: EdgeInsets.all(10.0), + child: Container( + child: Texts( + TranslationBase.of(context).viewCategorise, +// 'View All Categories', + fontWeight: FontWeight.w300, + ), + ), + ), + Icon(Icons.arrow_forward) + ], + ), + onTap: () { + Navigator.push( + context, + FadePage( + page: SubCategoriseModalsheet( +// id: model.categorise[0].id, +// titleName: model.categorise[0].name, + )), + ); + }), + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + ], + ), + +//Expanded widget heree if nassery + Padding( + padding: EdgeInsets.only(top: 35.0), + child: Container( + height: MediaQuery.of(context).size.height * 0.2, + child: Center( + child: ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: model.categoriseParent.length > 8 ? 8 : model.categoriseParent.length, + itemBuilder: (BuildContext context, int index) { + return Padding( + padding: EdgeInsets.symmetric(horizontal: 8.0), + child: InkWell( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 13.0), + child: Container( + height: 60.0, + width: 65.0, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.orange.shade200.withOpacity(0.45), + ), + child: Center( + child: Icon( + Icons.apps_sharp, + size: 32.0, + ), + ), + ), + ), + Container( + width: MediaQuery.of(context).size.width * 0.197, + // height: MediaQuery.of(context) + // .size + // .height * + // 0.08, + child: Center( + child: Texts( + projectViewModel.isArabic ? model.categoriseParent[index].namen : model.categoriseParent[index].name, + fontSize: 13.4, + fontWeight: FontWeight.w600, + maxLines: 3, + ), + ), + ), + ], + ), + onTap: () { + Navigator.push( + context, + FadePage( + page: SubCategorisePage( + title: projectViewModel.isArabic ? model.categoriseParent[index].namen : model.categoriseParent[index].name, + id: model.categoriseParent[index].id, + parentId: id, + )), + ); + print(id); + }, + ), + ); + }), + ), + ), + ), + + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + InkWell( + child: Row( + children: [ + Icon( + Icons.wrap_text, + ), + SizedBox( + width: 10.0, + ), + Texts( + TranslationBase.of(context).refine, + fontWeight: FontWeight.w600, + ), + ], + ), + onTap: () { + showModalBottomSheet( + isScrollControlled: true, + context: context, + builder: (BuildContext context) { + return DraggableScrollableSheet( + initialChildSize: 0.95, + maxChildSize: 0.95, + minChildSize: 0.9, + builder: (BuildContext context, ScrollController scrollController) { + return SingleChildScrollView( + controller: scrollController, + child: Container( + color: Colors.white, + height: MediaQuery.of(context).size.height * 1.95, + child: Column( + children: [ + Padding( + padding: EdgeInsets.all(8.0), + child: Row( + children: [ + Icon( + Icons.wrap_text, + ), + SizedBox( + width: 10.0, + ), + Texts( + TranslationBase.of(context).refine, +// 'Refine', + + fontWeight: FontWeight.w600, + ), + SizedBox( + width: 250.0, + ), + InkWell( + child: Texts( +// 'Close', + TranslationBase.of(context).closeIt, + color: Colors.red, + fontWeight: FontWeight.w600, + fontSize: 15.0, + ), + onTap: () { + Navigator.pop(context); + }, + ), + ], + ), + ), + Divider( + thickness: 1.0, + color: Colors.black12, + ), + Column( + children: [ + ExpansionTile( + title: Texts(TranslationBase.of(context).group), + children: [ + ProcedureListWidget( + model: model, + masterList: model.categoriseParent, + removeHistory: (item) { + setState(() { + entityList.remove(item); + }); + }, + addHistory: (history) { + setState(() { + entityList.add(history); + }); + }, + isEntityListSelected: (master) => isEntityListSelected(master), + ) + ], + ), + Divider( + thickness: 1.0, + color: Colors.black12, + ), + ExpansionTile( + title: Texts(TranslationBase.of(context).brands), + children: [ + ProcedureListWidget( + model: model, + masterList: model.brandsList, + removeHistory: (item) { + setState(() { + entityListBrands.remove(item); + }); + }, + addHistory: (history) { + setState(() { + entityListBrands.add(history); + }); + }, + isEntityListSelected: (master) => isEntityListSelectedBrands(master), + ) + ], + ), + Divider( + thickness: 1.0, + color: Colors.black12, + ), + ExpansionTile( + title: Texts(TranslationBase.of(context).price), + children: [ + Container( + color: Color(0xffEEEEEE), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Texts(TranslationBase.of(context).min), + Container( + color: Colors.white, + width: 200, + height: 40, + child: TextFormField( + decoration: InputDecoration( + border: OutlineInputBorder(), + ), + controller: minField, + ), + ), + ], + ), + Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Texts(TranslationBase.of(context).max), + Container( + color: Colors.white, + width: 200, + height: 40, + child: TextFormField( + decoration: InputDecoration( + border: OutlineInputBorder(), + ), + controller: maxField, + ), + ), + ], + ), + ], + ), + ) + ], + ), + Divider( + thickness: 1.0, + color: Colors.black12, + ), + SizedBox( + height: MediaQuery.of(context).size.height * 0.4, + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + width: 150, + child: Button( + label: TranslationBase.of(context).reset, + backgroundColor: Colors.red, + onTap: () { + setState(() { + entityList.clear(); + entityListBrands.clear(); + }); + minField.clear(); + maxField.clear(); + }, + ), + ), + SizedBox( + width: 10, + ), + Container( + width: 150, + child: Button( + onTap: () async { + String categoriesId = ""; + for (CategoriseParentModel category in entityList) { + if (categoriesId == "") { + categoriesId = category.id!; + } else { + categoriesId = "$categoriesId,${category.id}"; + } + } + String brandIds = ""; + for (CategoriseParentModel brand in entityListBrands) { + if (brandIds == "") { + brandIds = brand.id!; + } else { + brandIds = "$brandIds,${brand.id}"; + } + } + + GifLoaderDialogUtils.showMyDialog(context); + + await model.getFilteredProducts( + min: minField.text.isEmpty ? "" : "&price_min=" + minField.text.toString(), + max: maxField.text.isEmpty ? "" : "&price_max=" + maxField.text.toString(), + categoryId: categoriesId, + brandId: brandIds.isEmpty ? "" : "&manufacturerids=" + brandIds); + GifLoaderDialogUtils.hideDialog(context); + + Navigator.pop(context); + }, + label: TranslationBase.of(context).apply, + backgroundColor: Colors.green, + ), + ), + ], + ), + ), + ], + ), + ], + ), + ), + ); + }); + }, + ); + }, + ), + Row( + children: [ + Container( + height: 44.0, + child: VerticalDivider( + color: Colors.black45, + thickness: 1.0, +//width: 0.3, +// indent: 0.0, + ), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: InkWell( + child: styleIcon, + onTap: () { + setState(() { + if (styleOne == true) { + styleOne = false; + styleTwo = true; + styleIcon = Icon( + Icons.auto_awesome_mosaic, + color: CustomColors.green, + size: 29.0, + ); + } else { + styleOne = true; + styleTwo = false; + styleIcon = Icon( + Icons.widgets_sharp, + color: CustomColors.green, + size: 29.0, + ); + } + }); + }, + ), + ), + ], + ), + ], + ), + ), + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + model.parentProducts.isNotEmpty + ? styleOne == true + ? Container( + height: model.parentProducts.length * MediaQuery.of(context).size.height * 0.15, + child: GridView.builder( + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + crossAxisSpacing: 0.5, + mainAxisSpacing: 2.0, + childAspectRatio: 0.9, + ), + itemCount: model.parentProducts.length, + itemBuilder: (BuildContext context, int index) { + return NetworkBaseView( + baseViewModel: model, + child: InkWell( + child: Card( + color: model.parentProducts[index].discountName != null ? Color(0xffFFFF00) : Colors.white, + elevation: 0, + shape: Border( + right: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + left: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + bottom: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + top: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + ), + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(110.0), + ), + color: Colors.white, + ), + padding: EdgeInsets.symmetric(horizontal: 0), + width: MediaQuery.of(context).size.width / 3, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Stack( + children: [ + if (model.parentProducts[index].discountName != null) + RotatedBox( + quarterTurns: 4, + child: Container( + decoration: BoxDecoration(), + child: Padding( + padding: EdgeInsets.only( + right: 5.0, + top: 20.0, + bottom: 5.0, + ), + child: Texts( + TranslationBase.of(context).offers.toUpperCase(), + color: Colors.red, + fontSize: 13.0, + fontWeight: FontWeight.w900, + ), + ), + transform: new Matrix4.rotationZ(5.837200), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 16, 0, 0), + alignment: Alignment.center, + child: Image.network( + model.parentProducts[index].images!.isNotEmpty + ? model.parentProducts[index].images![0].thumb! + : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', + fit: BoxFit.cover, + height: 80, + ), + ), +// Container( +// width: model.parentProducts[index].rxMessage != +// null +// ? MediaQuery.of(context) +// .size +// .width / +// 5 +// : 0, +// padding: +// EdgeInsets +// .all( +// 4), +// decoration: +// BoxDecoration( +// color: Color( +// 0xffb23838), +// borderRadius: +// BorderRadius.only( +// topLeft: +// Radius.circular(6)), +// ), +// child:model.parentProducts[index].rxMessage != null ? +// Texts(projectProvider.isArabic +// ? model.parentProducts[index].rxMessagen +// : model.parentProducts[index].rxMessage, +// color: Colors.white, +// regular: true, +// fontSize: 10, +// fontWeight: FontWeight.w400, +// ) +// : Texts(""), +// // Texts( +// // model.parentProducts[index].rxMessage != +// null +// ? model +// .parentProducts[index] +// .rxMessage +// : "", +// // color: Colors +// .white, +// // regular: +// true, +// // fontSize: +// 10, +// // fontWeight: +// FontWeight +// .w400, +// // ), +// ), + ], + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (model.parentProducts[index].discountName != null) + Container( + width: double.infinity, + height: 13.0, + decoration: BoxDecoration( + color: Color(0xff5AB145), + ), + child: Center( + child: Texts( + model.parentProducts[index].discountName, + regular: true, + color: Colors.white, + fontSize: 10.4, + ), + ), + ), + Texts( + projectViewModel.isArabic ? model.parentProducts[index].namen : model.parentProducts[index].name, + regular: true, + fontSize: 12, + fontWeight: FontWeight.w700, + ), + Padding( + padding: const EdgeInsets.only(top: 4, bottom: 4), + child: Texts( + "SAR ${model.parentProducts[index].price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ +// StarRating( +// totalAverage: model.parentProducts[index].approvedRatingSum > 0 +// ? (model.parentProducts[index].approvedRatingSum.toDouble() / model.parentProducts[index].approvedRatingSum.toDouble()).toDouble() +// : 0, +// forceStars: true), + + RatingBar( + initialRating: model.parentProducts[index].approvedRatingSum!.toDouble(), + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star_border, + color: CustomColors.accentColor, + ), + ), + onRatingUpdate: (double value) {}, + unratedColor: Colors.grey[500], + updateOnDrag: false, + tapOnlyMode: false, + ), + + Texts( + "(${model.parentProducts[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + ], + ), + ], + ), + ), + ], + ), + ), + ), + onTap: () => { + Navigator.push( + context, + FadePage( + page: ProductDetailPage(model.parentProducts[index]), + )), + }, + )); + }, + ), + ) + : Container( + height: model.parentProducts.length * MediaQuery.of(context).size.height * 0.122, + child: ListView.builder( + physics: NeverScrollableScrollPhysics(), + itemCount: model.parentProducts.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + child: Card( + child: Row( + children: [ + Stack( + children: [ + Column( + children: [ + Container( + decoration: BoxDecoration(), + child: Padding( + padding: EdgeInsets.only( + left: 9.0, + top: 8.0, + right: 10.0, + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 0, 0, 0), + alignment: Alignment.center, + child: model.parentProducts[index].images!.isNotEmpty + ? Image.network( + model.parentProducts[index].images![0].thumb!, + fit: BoxFit.contain, + height: 70, + ) + : Text(TranslationBase.of(context).noImage), + ), + ], + ), + Column( + children: [ + Container( + width: model.parentProducts[index].rxMessage != null ? MediaQuery.of(context).size.width / 5.3 : 0, + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xffb23838), + borderRadius: BorderRadius.only(topLeft: Radius.circular(6)), + ), + child: model.parentProducts[index].rxMessage != null + ? Texts( + projectProvider.isArabic ? model.parentProducts[index].rxMessagen : model.parentProducts[index].rxMessage, + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + : Texts(""), +// Texts( +// model.parentProducts[index].rxMessage != null ? model.parentProducts[index].rxMessage : "", +// color: Colors.white, +// regular: true, +// fontSize: 10, +// fontWeight: FontWeight.w400, +// ), + ), + ], + ), + ], + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 0, + vertical: 0, + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 4.0, + ), + Container( + width: MediaQuery.of(context).size.width * 0.635, + child: Texts( + projectViewModel.isArabic ? model.parentProducts[index].namen : model.parentProducts[index].name, + regular: true, + fontSize: 13.2, + fontWeight: FontWeight.w500, + maxLines: 5, + ), + ), + SizedBox( + height: 8.0, + ), + Padding( + padding: const EdgeInsets.only(top: 4, bottom: 4), + child: Texts( + "SAR ${model.parentProducts[index].price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ +// StarRating( +// totalAverage: model.parentProducts[index].approvedRatingSum > 0 +// ? (model.parentProducts[index].approvedRatingSum.toDouble() / model.parentProducts[index].approvedRatingSum.toDouble()).toDouble() +// : 0, +// forceStars: true), + + RatingBar( + initialRating: model.parentProducts[index].approvedRatingSum!.toDouble(), + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, ), + empty: Icon( + Icons.star_border, + color: CustomColors.accentColor, ), + ), + onRatingUpdate: (double value) {}, + unratedColor: Colors.grey[500], + updateOnDrag: false, + tapOnlyMode: false, + ), + + Texts( + "(${model.parentProducts[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + ], + ), + ], + ), + ), + widget.authenticatedUserObject.isLogin + ? Container( + child: IconButton( + icon: Icon( + Icons.shopping_cart, + size: 18, + color: CustomColors.green, + ), + onPressed: () async { + if (model.parentProducts[index].isRx == false) { + GifLoaderDialogUtils.showMyDialog(context); + await addToCartFunction(1, model.parentProducts[index].id); + GifLoaderDialogUtils.hideDialog(context); + Utils.navigateToCartPage(); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription); + } + }), + ) + : Container(), + ], + ), + ), + onTap: () => { + Navigator.push( + context, + FadePage( + page: ProductDetailPage(model.parentProducts[index]), + )), + }, + ); + }), + ) + : Padding( + padding: const EdgeInsets.all(12.0), + child: Container( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + 'assets/images/new-design/empty_box.png', + width: 100, + height: 100, + fit: BoxFit.cover, + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + TranslationBase.of(context).noData, + // 'There is no data', + style: TextStyle(fontSize: 30), + ), + ) + ], + ), + ), + ), + ) + ], + ), + ), + ), + ))); + } + + addToCartFunction(quantity, itemID) async { + ProductDetailViewModel x = new ProductDetailViewModel(); + await x.addToCartData(quantity, itemID, context); + } + + bool isEntityListSelected(CategoriseParentModel masterKey) { + Iterable history = entityList.where((element) => masterKey.id == element.id); + if (history.length > 0) { + return true; + } + return false; + } + + bool isEntityListSelectedBrands(CategoriseParentModel masterKey) { + Iterable history = entityListBrands.where((element) => masterKey.id == element.id); + if (history.length > 0) { + return true; + } + return false; + } +} diff --git a/lib/pages/paymentService/payment_service.dart b/lib/pages/paymentService/payment_service.dart new file mode 100644 index 00000000..29161b50 --- /dev/null +++ b/lib/pages/paymentService/payment_service.dart @@ -0,0 +1,222 @@ +import 'package:badges/badges.dart' as badge_import; +import 'package:diplomaticquarterapp/Constants.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/models/InPatientServices/get_inpatient_advance_requests_response_model.dart'; +import 'package:diplomaticquarterapp/pages/InPatientServices/inpatient_advance_payment.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class PaymentService extends StatelessWidget { + ToDoCountProviderModel? model; + late ProjectViewModel projectViewModel; + + InPatientAdvanceResponseModel inPatientAdvanceResponseModel = InPatientAdvanceResponseModel(); + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + model = Provider.of(context); + List paymentServiceList = getPaymentServiceList(context); + return AppScaffold( + isShowAppBar: true, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).paymentService, + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.all(20.0), + child: Column( + children: [ + Padding( + padding: EdgeInsets.only(left: 12, right: 12), + child: GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + padding: EdgeInsets.zero, + itemCount: paymentServiceList.length, + itemBuilder: (BuildContext context, int index) { + return paymentServiceList[index]; + }, + ), + ), + ], + ), + ), + ), + ); + } + + List getPaymentServiceList(BuildContext context) { + List medical = []; + + medical.add( + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: AdvancePaymentPage())); + projectViewModel!.analytics.advancePayments.payment_services(service_type: 'payment service'); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).onlinePayment, + imagePath: 'assets/images/new-design/online_payment_icon.png', + subTitle: TranslationBase.of(context).onlinePaymentSubtitle, + isPngImage: true, + width: 65.0, + height: 55.0, + ), + ), + ); + + medical.add( + InkWell( + onTap: () { + navigateToToDoPage(context); + projectViewModel!.analytics.advancePayments.payment_services(service_type: 'online check-in appointment'); + }, + child: Stack( + children: [ + MedicalProfileItem( + title: TranslationBase.of(context).pendingOnly, + imagePath: 'pendingPayment.svg', + subTitle: TranslationBase.of(context).paymentOnly, + isPngImage: false, + width: 45.0, + height: 45.0, + ), + projectViewModel!.isArabic + ? Positioned( + left: 8, + top: 4, + child: badge_import.Badge( + badgeStyle: badge_import.BadgeStyle( + shape: badge_import.BadgeShape.circle, + elevation: 0, + badgeColor: secondaryColor!.withOpacity(1.0), + borderRadius: BorderRadius.circular(8), + ), + position: badge_import.BadgePosition.topEnd(), + badgeContent: Container( + padding: EdgeInsets.all(2.0), + child: Text(model!.count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)), + ), + ), + ) + : Positioned( + right: 8, + top: 4, + child: badge_import.Badge( + position: badge_import.BadgePosition.topEnd(), + badgeStyle: badge_import.BadgeStyle( + shape: badge_import.BadgeShape.circle, + elevation: 0, + badgeColor: secondaryColor!.withOpacity(1.0), + borderRadius: BorderRadius.circular(8), + ), + badgeContent: Container( + padding: EdgeInsets.all(2.0), + child: Text(model!.count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)), + ), + ), + ) + ], + ), + ), + ); + + medical.add( + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: MyBalancePage())); + projectViewModel!.analytics.advancePayments.payment_services(service_type: 'alhabib wallet'); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).hmg, + imagePath: 'assets/images/check-in.png', + subTitle: TranslationBase.of(context).wallet, + isPngImage: true, + width: 45.0, + height: 45.0, + ), + ), + ); + + // medical.add( + // InkWell( + // onTap: () { + // if(projectViewModel.isPatientAdmitted) { + // getInPatientAdvancePaymentRequests(context); + // projectViewModel.analytics.advancePayments.payment_services(service_type: 'inpatient advance payment'); + // } else { + // AppToast.showErrorToast(message: TranslationBase.of(context).onlyAdmitted); + // } + // }, + // child: MedicalProfileItem( + // title: "InPatient", + // imagePath: 'assets/images/inpatient_advance.png', + // subTitle: "Advance Payment", + // isPngImage: true, + // width: 45.0, + // height: 45.0, + // ), + // ), + // ); + + return medical; + } + + void getInPatientAdvancePaymentRequests(BuildContext context) { + ClinicListService service = new ClinicListService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .getInPatientAdvancePaymentRequests( + projectViewModel.inPatientProjectID, + projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionNo! : 0, + projectViewModel.isPatientAdmitted ? projectViewModel.getAdmissionInfoResponseModel.admissionRequestNo! : projectViewModel.getAdmissionRequestInfoResponseModel.admissionRequestNo!, + projectViewModel.isArabic ? 1 : 2, + context) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res["MessageStatus"] == 1) { + if (res['responseInpatient'] != null) { + inPatientAdvanceResponseModel = InPatientAdvanceResponseModel.fromJson(res["responseInpatient"]); + Navigator.push(context, + FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).noData); + } + } else { + Navigator.push(context, + FadePage(page: InPatientAdvancePayment(isHasData: inPatientAdvanceResponseModel.responseInpatientAdvanceInfo != null, inPatientAdvanceResponseModel: inPatientAdvanceResponseModel))); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + + navigateToToDoPage(BuildContext context) { + if (projectViewModel!.isLogin) { + // if (model.count != 0) { + Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))); + // } else { + // AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty); + // } + } else { + Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true))); + } + } +} diff --git a/lib/pages/pharmacies/ProductCheckTypeWidget.dart b/lib/pages/pharmacies/ProductCheckTypeWidget.dart new file mode 100644 index 00000000..56c770a3 --- /dev/null +++ b/lib/pages/pharmacies/ProductCheckTypeWidget.dart @@ -0,0 +1,61 @@ +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/wishlist_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/widgets/pharmacy/product_tile.dart'; +import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:provider/provider.dart'; + +class ProductCheckTypeWidget extends StatefulWidget { + final WishListViewModel? model; + + ProductCheckTypeWidget({this.model}); + + @override + _ProductCheckTypeWidgetState createState() => _ProductCheckTypeWidgetState(); +} + +class _ProductCheckTypeWidgetState extends State { + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return ListView.builder( + itemCount: widget.model!.wishListList.length, + itemBuilder: (BuildContext context, int index) { + return Column( + children: [ + Container( + child: productTile( + productName: projectViewModel.isArabic + ? widget.model!.wishListList[index].product.namen + : widget.model!.wishListList[index].product.name, + productPrice: widget.model!.wishListList[index].subtotal, + // productRate: double.parse(widget.model.wishListList[index].subtotalVatRate), + productRate: widget.model!.wishListList[index].product.approvedRatingSum.toDouble(), + approvedTotalReviews:widget.model!.wishListList[index].product.approvedTotalReviews, + productImage: widget.model!.wishListList[index].product.images[0].src, + productID: widget.model!.wishListList[index].product.id, + onDelete: deleteWishListItem, + isRx:widget.model!.wishListList[index].product.isRx, + + ), + ), + Divider(height: 1, color: Colors.grey) + ], + ); + }); + } + + deleteWishListItem(itemID) async { + ProductDetailViewModel x = new ProductDetailViewModel(); + GifLoaderDialogUtils.showMyDialog(context); + await x.deleteWishlistData(itemID, context); + await widget.model!.getWishlistData(isLocalLoader: true); + GifLoaderDialogUtils.hideDialog(context); + } + + + +} + diff --git a/lib/pages/pharmacies/compare-list.dart b/lib/pages/pharmacies/compare-list.dart new file mode 100644 index 00000000..be969678 --- /dev/null +++ b/lib/pages/pharmacies/compare-list.dart @@ -0,0 +1,45 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/material.dart'; + +class CompareList with ChangeNotifier { + List _product = []; + + List get productListItems => _product; + + void addItem(data, context) { + if (_product.length == 0) { + _product.add(data); + AppToast.showSuccessToast(message:TranslationBase.of(context).addToCompareMsg + // 'You have added a product to the Compare list' + ); + } else { + for (int i = 0; i < _product.length; i++) { + if (_product.length < 3 && _product[i].id != data.id) { + _product.add(data); + AppToast.showSuccessToast(message:TranslationBase.of(context).addToCompareMsg + // 'You have added a product to the Compare list' + ); + break; + } else if(_product[i].id == data.id){ + AppToast.showErrorToast(message:TranslationBase.of(context).itInListMsg + // 'the item is already in the list' + ); + } else if(_product.length == 3){ + AppToast.showErrorToast(message: TranslationBase.of(context).compareListFull + // 'your compare list is full' + ); + } + } + } + notifyListeners(); + } + + void deleteItem(data) { + for (int i = 0; i < _product.length; i++) { + if (_product[i].id == data) _product.remove(_product[i]); + } + notifyListeners(); + } +} diff --git a/lib/pages/pharmacies/compare.dart b/lib/pages/pharmacies/compare.dart new file mode 100644 index 00000000..f4f3e98d --- /dev/null +++ b/lib/pages/pharmacies/compare.dart @@ -0,0 +1,481 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/compare-list.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:provider/provider.dart'; + +int counter = 0; +dynamic languageID; + +class ComparePage extends StatefulWidget { + @override + _ComparePageState createState() => _ComparePageState(); +} + +//CompareList compareItems = CompareList(); +class _ComparePageState extends State { + getLanguageID() async { + languageID = await sharedPref.getString(APP_LANGUAGE); + } + + void initState() { + getLanguageID(); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).compare, + isShowAppBar: true, + isPharmacy: true, + showPharmacyCart: false, + showHomeAppBarIcon: false, + isBottomBar: true, + body: SingleChildScrollView( + child: Container( + child: compareList(), + ), + ), + ); + } +} + +class compareList extends StatelessWidget { + @override + Widget build(BuildContext context) { + final productItemData = Provider.of(context); + final productItem = productItemData.productListItems; + return productItem.length == 0 + ? Container( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + 'assets/images/new-design/empty_box.png', + width: 100, + height: 100, + fit: BoxFit.cover, + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + TranslationBase.of(context).noData, + style: TextStyle(fontSize: 30), + ), + ) + ], + ), + ), + ) + : Container( + margin: EdgeInsets.only(top: 12.0), + width: double.infinity, + height: MediaQuery.of(context).size.height, + child: slideDetail(productItem), + ); + } +} + +class slideDetail extends StatefulWidget { + final List data; + + slideDetail(this.data); + + @override + _slideDetailState createState() => _slideDetailState(); +} + +class _slideDetailState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: widget.data.length, + itemBuilder: (BuildContext contx, int index) { + return Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + height: 760, + width: 150, + margin: EdgeInsets.symmetric(horizontal: 10.0), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + border: Border( + top: BorderSide(width: 0.5, color: Colors.grey), + left: BorderSide(width: 0.5, color: Colors.grey), + right: BorderSide(width: 0.5, color: Colors.grey), + bottom: BorderSide(width: 0.5, color: Colors.grey), + ), + color: Colors.white), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Container( + child: Align( + alignment: Alignment.topRight, + child: IconButton( + icon: Icon(FontAwesomeIcons.trashAlt, size: 15), + onPressed: () { + setState(() { + Provider.of(context, listen: false).deleteItem(widget.data[index].id); + }); + }, + ), + ), + ), + SizedBox( + height: 20, + ), + Image.network( + widget.data[index].images![0].src!.trim(), + fit: BoxFit.cover, + width: 100, + height: 60, + ), + Padding( + padding: EdgeInsets.only(top: 8.0), + child: Container( + height: 1.0, + width: 300.0, + color: Colors.grey, + ), + ), + Container( + margin: EdgeInsets.all(5), + child: Align( + alignment: Alignment.topLeft, + child: RichText( + text: projectViewModel.isArabic + ? TextSpan( + text: widget.data[index].namen, + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + ) + : TextSpan( + text: widget.data[index].name, + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + ), + ), + ), + ), + Container( + margin: EdgeInsets.all(5), + child: projectViewModel.isArabic + ? Align( + alignment: Alignment.topRight, + child: RichText( + text: TextSpan( + text: "SAR ${widget.data[index].price.toString()}", + style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold), + ), + ), + ) + : Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: "SAR ${widget.data[index].price.toString()}", + style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold), + ), + ), + ), + ), + Padding( + padding: EdgeInsets.only(top: 8.0), + child: Container( + height: 1.0, + width: 300.0, + color: Colors.grey, + ), + ), + Container( + margin: EdgeInsets.all(5), + child: projectViewModel.isArabic + ? Align( + alignment: Alignment.topRight, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![0].nameN : "", + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + )), + ) + : Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![0].name : "", + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + )), + )), + Container( + margin: EdgeInsets.all(5), + child: projectViewModel.isArabic + ? Align( + alignment: Alignment.topRight, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![0].defaultValuen : "", + style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold), + )), + ) + : Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![0].defaultValue : "", + style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold), + )), + )), + Padding( + padding: EdgeInsets.only(top: 8.0), + child: Container( + height: 1.0, + width: 300.0, + color: Colors.grey, + ), + ), + Container( + margin: EdgeInsets.all(5), + child: projectViewModel.isArabic + ? Align( + alignment: Alignment.topRight, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![1].nameN : "", + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + )), + ) + : Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![1].name : "", + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + )), + )), + Container( + margin: EdgeInsets.all(5), + child: projectViewModel.isArabic + ? Align( + alignment: Alignment.topRight, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![1].defaultValuen : "", + style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold), + )), + ) + : Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![1].defaultValue : "", + style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold), + )), + )), + Padding( + padding: EdgeInsets.only(top: 8.0), + child: Container( + height: 1.0, + width: 300.0, + color: Colors.grey, + ), + ), + Container( + margin: EdgeInsets.all(5), + child: projectViewModel.isArabic + ? Align( + alignment: Alignment.topRight, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![2].nameN : "", + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + )), + ) + : Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![2].name : "", + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + )), + )), + Container( + margin: EdgeInsets.all(5), + child: projectViewModel.isArabic + ? Align( + alignment: Alignment.topRight, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![2].defaultValuen : "", + style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold), + )), + ) + : Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![2].defaultValue : "", + style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold), + )), + )), + Padding( + padding: EdgeInsets.only(top: 8.0), + child: Container( + height: 1.0, + width: 300.0, + color: Colors.grey, + ), + ), + Container( + margin: EdgeInsets.all(5), + child: projectViewModel.isArabic + ? Align( + alignment: Alignment.topRight, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![3].nameN : "", + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + )), + ) + : Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![3].name : "", + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + )), + )), + Container( + margin: EdgeInsets.all(5), + child: projectViewModel.isArabic + ? Align( + alignment: Alignment.topRight, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![3].defaultValuen : "", + style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold), + )), + ) + : Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![3].defaultValue : "", + style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold), + )), + )), + Padding( + padding: EdgeInsets.only(top: 8.0), + child: Container( + height: 1.0, + width: 300.0, + color: Colors.grey, + ), + ), + Container( + margin: EdgeInsets.all(5), + child: projectViewModel.isArabic + ? Align( + alignment: Alignment.topRight, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![4].nameN : "", + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + )), + ) + : Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![4].name : "", + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + )), + )), + Container( + margin: EdgeInsets.all(5), + child: projectViewModel.isArabic + ? Align( + alignment: Alignment.topRight, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![4].defaultValuen : "", + style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold), + )), + ) + : Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![4].defaultValue : "", + style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold), + )), + )), + Padding( + padding: EdgeInsets.only(top: 8.0), + child: Container( + height: 1.0, + width: 300.0, + color: Colors.grey, + ), + ), + Container( + margin: EdgeInsets.all(5), + child: projectViewModel.isArabic + ? Align( + alignment: Alignment.topRight, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![5].nameN : "", + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + )), + ) + : Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![5].name : "", + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + )), + )), + Container( + margin: EdgeInsets.all(5), + child: projectViewModel.isArabic + ? Align( + alignment: Alignment.topRight, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![5].defaultValuen : "", + style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold), + )), + ) + : Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: widget.data[index].specifications != null ? widget.data[index].specifications![5].defaultValue : "", + style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold), + )), + )), + ], + ), + ), + ), + ], + ); + }, + ); + } +} diff --git a/lib/pages/pharmacies/medicine_search_screen.dart b/lib/pages/pharmacies/medicine_search_screen.dart new file mode 100644 index 00000000..e76425a4 --- /dev/null +++ b/lib/pages/pharmacies/medicine_search_screen.dart @@ -0,0 +1,151 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/pharmacies_list_screen.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/pharmacy/drug_item.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import '../Blood/new_text_Field.dart'; +import '../base/base_view.dart'; + +class MedicineSearch extends StatelessWidget { + final textController = TextEditingController(); + final _formKey = GlobalKey(); + @override + Widget build(BuildContext context) { + return BaseView( + allowAny: true, + onModelReady: (model) => model.clearMedicineSearch(), + builder: (BuildContext context, PharmacyViewModel model, Widget? child) => + AppScaffold( + baseViewModel: model, + appBarTitle: TranslationBase.of(context).searchMedicine, + isShowAppBar: true, + isShowDecPage: false, + body: Container( + height: SizeConfig.screenHeight, + child: Column( + children: [ + Padding( + padding: EdgeInsets.only( + bottom: SizeConfig.heightMultiplier! * 1, + right: SizeConfig.heightMultiplier! * 2.5, + top: SizeConfig.heightMultiplier! * 4, + left: SizeConfig.heightMultiplier! * 2.5, + ), + child: Form( + key: _formKey, + child: NewTextFields( + hintText: + TranslationBase.of(context).searchMedicineHere, + inputAction: TextInputAction.search, + onSaved: (value) {}, + onSubmit: (value) { + searchMedicine(model, context); + }, + controller: textController, + validator: (value) { + if (value.isEmpty) { + return TranslationBase.of(context).pleaseEnterMedicineName; + }else if( value.length <4){ + return TranslationBase.of(context).searchItemError; + }else + return null; + }, + ), + ), + ), + Container( + margin: EdgeInsets.only( + bottom: SizeConfig.heightMultiplier! * 0.0, + right: SizeConfig.heightMultiplier! * 5, + top: SizeConfig.heightMultiplier! * 1, + left: SizeConfig.heightMultiplier! * 5, + ), + child: Wrap( + children: [ + Container( + child: Button( + loading: model.state == ViewState.BusyLocal, + label: TranslationBase.of(context).search, + onTap: () { + searchMedicine(model, context); + }), + width: 350.0, + ), + ], + ), + ), + if(model.pharmacy.isNotEmpty) + Container( + margin: EdgeInsets.only( + left: SizeConfig.heightMultiplier! * 2), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).youCanFind+ + '${model.pharmacy == null ? '0' : model.pharmacy.length.toString()}'+ + TranslationBase.of(context).itemInSearch, + ), + ], + ), + ), + if (model.state == ViewState.ErrorLocal) + Container( + child: Texts(model.error), + ), + Expanded( + child: Container( + width: SizeConfig.screenWidth! * 0.85, + //child: _getHospitals(model.pharmacy), + child: ListView.builder( + //physics: NeverScrollableScrollPhysics(), + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: model.pharmacy == null + ? 0 + : model.pharmacy.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + child: MedicineItemWidget( + label: model.pharmacy[index].itemDes!, + url: model.pharmacy[index].productImage), + onTap: () { + Navigator.push( + context, + FadePage( + page: PharmaciesList( + medicineID: + model.pharmacy[index].itemID, + imageURL: model + .pharmacy[index].productImage, + medicineDescription: + model.pharmacy[index].itemDes), + ), + ); + }, + ); + }), + ), + ), + ], + ), + )), + ); + } + + searchMedicine(PharmacyViewModel model, BuildContext context) { + Utils.hideKeyboard(context); + if (_formKey.currentState!.validate()) + model.getMedicine(name: textController.text); + } +} diff --git a/lib/pages/pharmacies/my_reviews.dart b/lib/pages/pharmacies/my_reviews.dart new file mode 100644 index 00000000..dd36141d --- /dev/null +++ b/lib/pages/pharmacies/my_reviews.dart @@ -0,0 +1,294 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/review_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; + +class MyReviewsPage extends StatefulWidget { + @override + _MyReviewsPageState createState() => _MyReviewsPageState(); +} + +var languageID; + +class _MyReviewsPageState extends State { + void initState() { + getLanguageID(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getReviewData(), + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).reviews, + isShowAppBar: true, + isPharmacy: true, + showPharmacyCart: false, + showHomeAppBarIcon: false, + isBottomBar: true, + baseViewModel: model, + body: model.reviewListList.length == 0 + ? Container( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + 'assets/images/new-design/empty_box.png', + width: 100, + height: 100, + fit: BoxFit.cover, + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + TranslationBase.of(context).noData, +// 'There is no data', + style: TextStyle(fontSize: 30), + ), + ) + ], + ), + ), + ) + : Container( + child: ListView.builder( + itemCount: model.reviewListList.length, + itemBuilder: (BuildContext context, int index) { + return Column( + children: [ + Container( + child: reviewDetails( + model.reviewListList[index], + double.parse(model.reviewListList[index].product!.approvedTotalReviews!.toString()), + double.parse(model.reviewListList[index].rating.toString()), + ), + ), + Divider(height: 1, color: Colors.grey) + ], + ); + }), + ), + ), + ); + } +} + +reviewDetails(data, rate, myRate) { + return Container( + child: Padding( + padding: EdgeInsets.only(bottom: 10.0), + child: Container( + height: 200, + width: double.infinity, + color: Colors.white, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Row( + children: [ + Container( + margin: languageID == 'ar' ? EdgeInsets.only(top: 10, right: 10) : EdgeInsets.only(top: 10, left: 10), + child: Image.network( + data.product.images[0].src.trim(), + fit: BoxFit.cover, + width: 80, + height: 80, + ), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.all(5), + child: Align( + alignment: languageID == 'ar' ? Alignment.topRight : Alignment.topLeft, + child: RichText( + text: TextSpan( + text: languageID == 'ar' ? data.product.namen : data.product.name, + style: TextStyle(color: Colors.black54, fontSize: languageID == 'ar' ? 12 : 13, fontWeight: FontWeight.bold), + ), + ), + ), + ), + Column( + children: [ + Container( + margin: EdgeInsets.all(5), + child: Align( + alignment: languageID == 'ar' ? Alignment.topRight : Alignment.topLeft, + child: RichText( + text: TextSpan( + text: data.product.price.toString() + " " + data.product.currency, + style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13), + ), + ), + ), + ), + ], + ), + Container( + margin: EdgeInsets.all(5), + child: Align( + alignment: languageID == 'ar' ? Alignment.topRight : Alignment.topLeft, + child: RatingBar( + initialRating: rate, + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + ), + tapOnlyMode: true, + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + ) + // RatingBar.readOnly( + // initialRating: rate, + // size: 15.0, + // filledColor: Colors.yellow[700], + // emptyColor: Colors.grey[500], + // isHalfAllowed: true, + // halfFilledIcon: Icons.star_half, + // filledIcon: Icons.star, + // emptyIcon: Icons.star, + // ), + + ), + ), + ], + ), + ], + ), + SizedBox( + height: 20, + ), + Container( + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container(padding: languageID == 'ar' ? EdgeInsets.only(right: 10) : EdgeInsets.only(left: 10), child: Text(data.createdOnUtc.toString().substring(0, 11))), + ], + ), + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + padding: languageID == 'ar' ? EdgeInsets.only(right: 60) : EdgeInsets.only(left: 60), + child: RatingBar( + initialRating: myRate, + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + ), + tapOnlyMode: true, + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + ) + // RatingBar.readOnly( + // initialRating: myRate, + // size: 15.0, + // filledColor: Colors.yellow[700], + // emptyColor: Colors.grey[500], + // isHalfAllowed: true, + // halfFilledIcon: Icons.star_half, + // filledIcon: Icons.star, + // emptyIcon: Icons.star, + // ), + ), + ], + ), + ), + ], + ), + ), + SizedBox( + height: 15, + ), + Expanded( + child: Container( + padding: languageID == 'ar' ? EdgeInsets.only(right: 10) : EdgeInsets.only(left: 10), + child: Text(getReview(data) ?? ""), + ), + ), + ], + ), + ), + ), + ); +} + +String getReview(data) { + String reviewTxt = ""; + + if (data.reviewText == null && data.replyText == null) { + reviewTxt = ""; + } + if (data.reviewText == null) + reviewTxt = data.replyText; + else + reviewTxt = data.reviewText; + + return reviewTxt; +} + +fixingString(txt) { + String stringTxt; + String newTxt; + stringTxt = txt.toString(); + newTxt = stringTxt.split('.')[1]; + + return newTxt; +} + +getLanguageID() async { + languageID = await sharedPref.getString(APP_LANGUAGE); +} diff --git a/lib/pages/pharmacies/pharmacies_list_screen.dart b/lib/pages/pharmacies/pharmacies_list_screen.dart new file mode 100644 index 00000000..92f5a277 --- /dev/null +++ b/lib/pages/pharmacies/pharmacies_list_screen.dart @@ -0,0 +1,193 @@ +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.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:diplomaticquarterapp/widgets/others/rounded_container.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:maps_launcher/maps_launcher.dart'; +import 'package:url_launcher/url_launcher.dart'; + +import '../base/base_view.dart'; + +class PharmaciesList extends StatelessWidget { + final int? medicineID; + final String? imageURL; + final String? medicineDescription; + + PharmaciesList({this.medicineID, this.imageURL, this.medicineDescription}); + + @override + Widget build(BuildContext context) { + return BaseView( + allowAny: true, + onModelReady: (model) => model.getPharmacies(id: medicineID), + builder: (BuildContext context, PharmacyViewModel model, Widget? child) => + AppScaffold( + appBarTitle: TranslationBase.of(context).pharmaciesList, + baseViewModel: model, + isShowAppBar: true, + isShowDecPage: false, + body: Container( + height: SizeConfig.screenHeight, + child: ListView( + shrinkWrap: true, + scrollDirection: Axis.vertical, + physics: AlwaysScrollableScrollPhysics(), + children: [ + RoundedContainer( + child: Row( + children: [ + Expanded( + flex: 1, + child: ClipRRect( + borderRadius: BorderRadius.all( + Radius.circular(7), + ), + child: Image.memory( + dataFromBase64String(imageURL!), + height: SizeConfig.imageSizeMultiplier! * 19, + width: SizeConfig.imageSizeMultiplier! * 18, + fit: BoxFit.cover, + ), + ), + ), + Expanded( + flex: 3, + child: Padding( + padding: EdgeInsets.symmetric( + horizontal: 6.8, vertical: 3.5), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Texts( + TranslationBase.of(context).description, + ), + Texts( + medicineDescription, + ), + Texts( + TranslationBase.of(context).price, + marginRight: 10, + marginLeft: 10, + marginBottom: 2.0, + ), + if (model.pharmacyList.length > 0) + Texts( + model.pharmacyList[0].price.toString(), + ), + ], + ), + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.only( + top: SizeConfig.widthMultiplier! * 2.0, + bottom: SizeConfig.widthMultiplier! * 3.0, + right: SizeConfig.widthMultiplier! * 4.0, + left: SizeConfig.widthMultiplier! * 2.5, + ), + child: Align( + alignment: Alignment.center, + child: Texts( + TranslationBase.of(context).youCanFindItIn, + ), + ), + alignment: Alignment.topRight, + ), + Container( + width: SizeConfig.screenWidth! * 1.0, + child: ListView.builder( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemCount: model.pharmacyList == null + ? 0 + : model.pharmacyList.length, + itemBuilder: (BuildContext context, int index) { + return RoundedContainer( + child: Row( + children: [ + Expanded( + child: ClipRRect( + borderRadius: + BorderRadius.all(Radius.circular(7)), + child: Image.network( + model.pharmacyList[index].imageLocation!, + height: SizeConfig.imageSizeMultiplier! * 13.0, + width: SizeConfig.imageSizeMultiplier! * 11.0, + fit: BoxFit.cover, + ), + ), + ), + Expanded( + flex: 4, + child: Padding( + padding: EdgeInsets.all(9.0), + child: Texts( + model.pharmacyList[index].desLocation, + ), + ), + ), + Expanded( + flex: 2, + child: Wrap( + direction: Axis.horizontal, + alignment: WrapAlignment.end, + crossAxisAlignment: WrapCrossAlignment.end, + children: [ + Padding( + padding: EdgeInsets.all(6.0), + child: InkWell( + child: Icon( + Icons.phone, + color: Theme.of(context).primaryColor, + ), + onTap: () => launch("tel://" + + model.pharmacyList[index].phoneNumber!), + ), + ), + Padding( + padding: EdgeInsets.all(6.0), + child: InkWell( + child: Icon( + Icons.local_pharmacy, + color: Theme.of(context).primaryColor, + ), + onTap: () { + MapsLauncher.launchCoordinates( + double.parse( + model.pharmacyList[index].latitude!), + double.parse(model + .pharmacyList[index].longitude!), + ); + }, + ), + ), + ], + ), + ) + ], + ), + ); + }, + ), + ), + ], + ), + ), + ), + ); + } + + Uint8List dataFromBase64String(String base64String) { + return base64Decode(base64String); + } +} diff --git a/lib/pages/pharmacies/product-brands.dart b/lib/pages/pharmacies/product-brands.dart new file mode 100644 index 00000000..198cf4b7 --- /dev/null +++ b/lib/pages/pharmacies/product-brands.dart @@ -0,0 +1,282 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/brand_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/final_products_page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/search_brands_page.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:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; + +class ProductBrandsPage extends StatefulWidget { + @override + _ProductBrandsPageState createState() => _ProductBrandsPageState(); +} + +var languageID; + +class _ProductBrandsPageState extends State { + @override + void initState() { + super.initState(); + getLanguageID(); + } + + @override + Widget build(BuildContext context) { + return BaseView( + allowAny: true, + onModelReady: (model) => model.getBrandsData(), + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).brands, + isShowAppBar: true, + isPharmacy: true, + isShowDecPage: false, + body: SingleChildScrollView( + child: NetworkBaseView( + baseViewModel: model, + isLocalLoader:true, + child: Container( + child: Column( + children: [ + Container( + color: Colors.white, + alignment: languageID == 'ar' + ? Alignment.topRight + : Alignment.topLeft, + padding: languageID == 'ar' + ? EdgeInsets.only(right: 10.0, top: 10.0) + : EdgeInsets.only(left: 10.0, top: 10.0), + child: Text( + TranslationBase.of(context).topBrands, + style: TextStyle( + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + height: 220, + width: double.infinity, + color: Colors.white, + child: topBrand(context), + ), + SizedBox( + height: 10, + ), + Container( + height: MediaQuery.of(context).size.height * 0.076, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5.0), + color: Colors.white, + ), + child: topBrand(context), + ), + SizedBox( + height: 10, + ), + Container( + height: MediaQuery.of(context).size.height * 0.066, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5.0), + color: Colors.white, + ), + child: InkWell( + child: Padding( + padding: EdgeInsets.all(8.0), + child: Row( + //crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Icon(Icons.search, size: 25.0), + SizedBox( + width: 15.0, + ), + Texts( + TranslationBase.of(context).searchProductHere, + fontSize: 13, + ) + ], + ), + ), + onTap: () { + Navigator.push( + context, + FadePage(page: SearchBrandsPage()), + ); + }, + ), + ), + SizedBox( + height: 10, + ), + Container( + height: 250, + width: double.infinity, + color: Colors.white, + child: ListView.builder( + itemCount: model.brandsListList.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + child: Container( + margin: EdgeInsets.only(top: 50, left: 10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + languageID == 'ar' + ? Text(model.brandsListList[index].namen!) + : Text(model.brandsListList[index].name!), + SizedBox( + height: 3, + ), + Divider(height: 1, color: Colors.grey) + ], + ), + ), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => FinalProductsPage( + id: model.brandsListList[index].id + .toString(), + )), + ); + }, + ); + }), + ), + ], + ), + ), + ), + ), + ), + ); + } +} + +topBrand(BuildContext context) { + return BaseView( + allowAny: true, + onModelReady: (model) => model.getTopBrandsData(), + builder: (_, model, wi) => GridView.count( + crossAxisCount: 4, + children: List.generate( + model.topBrandsListList.length, + (index) => Column( + children: [ + InkWell( + child: Container( + margin: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 0.0), + child: Container( + child: Container( + child: Container( +// padding: EdgeInsets.only(left: 5), + child: Container( + padding: EdgeInsets.symmetric( + horizontal: 10.0, vertical: 10.0), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + border: Border( + top: BorderSide(width: 1.0, color: Colors.grey), + left: BorderSide(width: 1.0, color: Colors.grey), + right: BorderSide(width: 1.0, color: Colors.grey), + bottom: + BorderSide(width: 1.0, color: Colors.grey), + ), + color: Colors.white, + ), + child: model.topBrandsListList[index].image != null + ? Image.network( + model.topBrandsListList[index].image!.src!, + fit: BoxFit.cover, + width: 60, + height: 40, + ) + : Text(model.topBrandsListList[index].name!)), + ), + ), + ), + ), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => FinalProductsPage( + id: model.topBrandsListList[index].id.toString(), + )), + ); + }, + ), + ], + ), + ), + ), + ); +} + +brandSearch() { + return Text('ENAD'); +} + +class SearchBar extends SearchDelegate { + @override + List buildActions(BuildContext context) { + return [ + IconButton( + icon: Icon(Icons.clear), + onPressed: () { + query = ""; + }, + ) + ]; + } + + @override + Widget buildLeading(BuildContext context) { + return IconButton( + icon: AnimatedIcon( + icon: AnimatedIcons.menu_arrow, + progress: transitionAnimation, + ), + onPressed: () { + close(context, ""); + }, + ); + } + + @override + Widget buildResults(BuildContext context) { + return Container( + height: 100, + width: 100, + child: Card( + color: Colors.red, + child: Center( + child: Text(query), + ), + ), + ); + } + + @override + Widget buildSuggestions(BuildContext context) { + return ListView.builder( + itemCount: 5, + itemBuilder: (context, index) => ListTile( + leading: Icon(Icons.location_city), + title: Text("Enad"), + onTap: () { + showResults(context); + }, + ), + ); + } +} + +getLanguageID() async { + languageID = await sharedPref.getString(APP_LANGUAGE); +} diff --git a/lib/pages/pharmacies/screens/address-select-page.dart b/lib/pages/pharmacies/screens/address-select-page.dart new file mode 100644 index 00000000..6b0b1140 --- /dev/null +++ b/lib/pages/pharmacies/screens/address-select-page.dart @@ -0,0 +1,36 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; + +class AddressSelectPageTest extends StatelessWidget { + final List addresses; + + AddressSelectPageTest(this.addresses); + + @override + Widget build(BuildContext context) { + return AppScaffold( + title: "test", + isShowAppBar: true, + isShowDecPage: false, + body: Column( + children: [ + Container( + child: CustomTextButton( + onPressed: () => {Navigator.pop(context, addresses[0])}, + child: new Text( + "Set address", + style: new TextStyle(color: Colors.white, fontSize: 14), + ), + elevation: 0, + backgroundColor: Colors.blueAccent, + disabledForegroundColor: Colors.blueAccent.withOpacity(0.38), + disabledBackgroundColor: Colors.blueAccent.withOpacity(0.12), + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/pharmacies/screens/cart-page/cart-order-page.dart b/lib/pages/pharmacies/screens/cart-page/cart-order-page.dart new file mode 100644 index 00000000..98ff43e1 --- /dev/null +++ b/lib/pages/pharmacies/screens/cart-page/cart-order-page.dart @@ -0,0 +1,458 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/ProductOrderItem.dart'; +import 'package:diplomaticquarterapp/pages/pharmacy/order/Order.dart'; +import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/GestureIconButton.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class CartOrderPage extends StatefulWidget { + final void Function(int)? changeTab; + + CartOrderPage({Key? key, this.changeTab}) : super(key: key); + + @override + _CartOrderPageState createState() => _CartOrderPageState(); +} + +class _CartOrderPageState extends State { + bool isLoading = true; + late String customerId; + late String customerGUID; + + @override + void initState() { + super.initState(); + getCustomer(); + getData(); + } + + @override + Widget build(BuildContext context) { + final mediaQuery = MediaQuery.of(context); + OrderPreviewViewModel model = Provider.of(context); + + final height = mediaQuery.size.height - 60 - mediaQuery.padding.top; + return AppScaffold( + appBarTitle: TranslationBase.of(context).shoppingCart, + isShowAppBar: true, + isPharmacy: true, + showHomeAppBarIcon: false, + isShowDecPage: false, + isMainPharmacyPages: true, + showPharmacyCart: false, + baseViewModel: model, + backButtonTab:(){ + widget.changeTab!; + } + , + + backgroundColor: Colors.white, + body: NetworkBaseView( + isLoading: isLoading, + isLocalLoader: true, + child: !(model.cartResponse.shoppingCarts == null || model.cartResponse.shoppingCarts!.length == 0) + ? Container( + height: height * 0.85, + width: double.infinity, + child: SingleChildScrollView( + child: Container( + margin: EdgeInsets.all(10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + GestureIconButton( + TranslationBase.of(context).deleteAllItems, + Icon( + Icons.delete_outline_sharp, + color: Colors.grey.shade700, + ), + onTap: () => {model.deleteShoppingCart()}, + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Container( + child: ListView.builder( + itemCount: model.cartResponse.shoppingCarts!.length, + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + // physics: const AlwaysScrollableScrollPhysics(), + itemBuilder: (context, index) { + return ProductOrderItem( + item: model.cartResponse.shoppingCarts![index], + changeCartItems: () async { + GifLoaderDialogUtils.showMyDialog(context); + await model.changeProductQuantity(model.cartResponse.shoppingCarts![index]); + if (model.state != ViewState.Error) {} + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + } + GifLoaderDialogUtils.hideDialog(context); + }, + deleteCartItems: () async { + GifLoaderDialogUtils.showMyDialog(context); + await model.deleteProduct(model.cartResponse.shoppingCarts![index]).then((value) { + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + } + GifLoaderDialogUtils.hideDialog(context); + }); + }, + model: model, + ); + }), + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 20, + thickness: 2, + indent: 0, + endIndent: 0, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts( + TranslationBase.of(context).subtotal, + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + Texts( + "${TranslationBase.of(context).sar} ${(model.cartResponse.subtotal)!.toStringAsFixed(2)}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + ], + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts( + "${TranslationBase.of(context).vat}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + Texts( + "${TranslationBase.of(context).sar} ${(model.cartResponse.subtotalVatAmount)!.toStringAsFixed(2)}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + ], + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts( + TranslationBase.of(context).total, + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + Texts( + "${TranslationBase.of(context).sar} ${(model.cartResponse.subtotalWithVat)!.toStringAsFixed(2)}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + ], + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Image.asset( + "assets/images/pharmacy_module/payment.png", + width: mediaQuery.size.width - 20, + height: 30.0, + fit: BoxFit.scaleDown, + ), + SizedBox( + height: 120, + ) + ], + ), + ), + ), + ) + : Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + 'assets/images/new-design/empty_box.png', + width: 100, + height: 100, + fit: BoxFit.cover, + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + TranslationBase.of(context).noData, + style: TextStyle(fontSize: 30), + ), + ), + Padding( + padding: const EdgeInsets.fromLTRB(60.0, 8.0, 60.0, 0.0), + child: DefaultButton( + TranslationBase.of(context).ordersDashboard, + () { + Navigator.push(context, FadePage(page: OrderPage(customerID: customerId, customerGUID: customerGUID))); + }, + color: Colors.green, + ), + ), + ], + ), + ), + ), + bottomSheet: Container( + height: !(model.cartResponse.shoppingCarts == null || model.cartResponse.shoppingCarts!.length == 0) ? height * 0.15 : 0, + color: Colors.white, + child: OrderBottomWidget(model.addresses, height, model, isLoading), + ), + ); + } + + getCustomer() async { + String custID; + String custGUID; + custID = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + custGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); + setState(() { + customerId = custID; + customerGUID = custGUID; + }); + print("customer Id is" + customerId); + print("customer GUID is" + customerGUID); + return customerId; + } + + void getData() async { + await Provider.of(context, listen: false).getShoppingCart(); + setState(() { + isLoading = false; + }); + } +} + +class OrderBottomWidget extends StatefulWidget { + final List addresses; + final double height; + final OrderPreviewViewModel model; + final bool isLoading; + + OrderBottomWidget(this.addresses, this.height, this.model, this.isLoading); + + @override + _OrderBottomWidgetState createState() => _OrderBottomWidgetState(); +} + +class _OrderBottomWidgetState extends State { + bool isAgree = false; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + + return !widget.isLoading && !(widget.model.cartResponse.shoppingCarts == null || widget.model.cartResponse.shoppingCarts!.length == 0) + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Divider( + color: Color(0xFFD6D6D6), + height: 1, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Container( + height: widget.height * 0.070, + color: Color(0xffe6ffe0), + padding: EdgeInsets.only(left: 15.0, right: 15.0), + child: Row( + children: [ + InkWell( + onTap: () { + setState(() { + isAgree = !isAgree; + }); + }, + child: Container( + width: 25.0, + height: widget.height * 0.070, + decoration: new BoxDecoration( + color: !isAgree ? Color(0xffeeeeee) : Colors.green, + shape: BoxShape.circle, + ), + child: !isAgree + ? null + : Padding( + padding: const EdgeInsets.all(0.0), + child: Icon( + Icons.check, + color: Colors.white, + size: 25, + ), + ), + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.symmetric(horizontal: 4), + margin: const EdgeInsets.symmetric(vertical: 4), + child: Texts( + TranslationBase.of(context).pharmacyServiceTermsCondition, + fontSize: 13, + color: Colors.grey.shade800, + fontWeight: FontWeight.normal, + ), + ), + ), + InkWell( + onTap: () => {Navigator.push(context, FadePage(page: PharmacyTermsConditions()))}, + child: Container( + child: Icon( + Icons.info, + size: 25, + color: Color(0xFF4CAF50), +// color: Color(0xff005aff), + ), + ), + ), + ], + ), + ), + Container( + height: widget.height * 0.065, + margin: EdgeInsets.only(top: 5.0, bottom: 5.0), + padding: EdgeInsets.only(left: 20.0, right: 20.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + margin: EdgeInsets.symmetric(horizontal: 0, vertical: 0), + child: Row( + children: [ + Texts( + "${TranslationBase.of(context).sar} ${(widget.model.cartResponse.subtotalWithVat)!.toStringAsFixed(2)}", + fontSize: projectProvider.isArabic ? 12 : 14, + fontWeight: FontWeight.bold, + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 4), + child: Texts( + "${TranslationBase.of(context).inclusiveVat}", + fontSize: 8, + color: Colors.grey, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + Texts( + "${widget.model.cartResponse.quantityCount} ${TranslationBase.of(context).items}", + fontSize: 10, + color: Colors.grey, + fontWeight: FontWeight.bold, + ), + ], + ), + ), + CustomTextButton( + backgroundColor: Color(0xFF4CAF50), + disabledForegroundColor: Color(0xFF848484).withOpacity(0.38), + disabledBackgroundColor: Color(0xFF848484).withOpacity(0.12), + onPressed: isAgree + ? () => { + if (widget.model.isCartItemsOutOfStock()) + {AppToast.showErrorToast(message: TranslationBase.of(context).outOfStockMsg)} + else + {_navigateToAddressPage(projectProvider.user!.patientIdentificationNo!)} + } + : null, + child: new Text( + "${TranslationBase.of(context).checkOut}", + style: new TextStyle(color: isAgree ? Colors.white : Colors.grey.shade300, fontSize: 14), + ), + +// disabledColor: Color(0xff005aff), + ) + ], + ), + ), + ], + ) + : Container(); + } + + _navigateToAddressPage(String identificationNo) { + Navigator.push( + context, + FadePage( + page: PharmacyAddressesPage( + orderPreviewViewModel: widget.model, + isShippingAddress: true, + ))).then((result) async { + if (result != null) { + GifLoaderDialogUtils.showMyDialog(context); + var address = result; + widget.model.paymentCheckoutData.address = Addresses.fromJson(address.toJson()); + await widget.model.getInformationsByAddress(identificationNo); + await widget.model.getShoppingCart(); + // widget.changeMainState(); + GifLoaderDialogUtils.hideDialog(context); + } + }); + } +} diff --git a/lib/pages/pharmacies/screens/cart-page/cart-order-preview.dart b/lib/pages/pharmacies/screens/cart-page/cart-order-preview.dart new file mode 100644 index 00000000..782cd05c --- /dev/null +++ b/lib/pages/pharmacies/screens/cart-page/cart-order-preview.dart @@ -0,0 +1,369 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/payment_bottom_widget.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/select_address_widget.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/select_payment_option_widget.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/ProductOrderPreviewItem.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class OrderPreviewPage extends StatefulWidget { + final List? addresses; + final OrderPreviewViewModel? model; + + OrderPreviewPage({this.addresses, this.model}); + + @override + _OrderPreviewPageState createState() => _OrderPreviewPageState(); +} + +class _OrderPreviewPageState extends State { + MyInAppBrowser? browser; + bool isLoading = true; + bool isChecked = false; + + @override + void initState() { + super.initState(); + getData(); + } + + void getData() async { + if (isLoading) await Provider.of(context, listen: false).getShoppingCart(); + setState(() { + isLoading = false; + }); + } + + @override + Widget build(BuildContext context) { + final mediaQuery = MediaQuery.of(context); + final height = mediaQuery.size.height - 60 - mediaQuery.padding.top; + ProjectViewModel projectViewModel = Provider.of(context); + return AppScaffold( + appBarTitle: "${TranslationBase.of(context).checkOut}", + isShowAppBar: true, + isPharmacy: true, + isShowDecPage: false, + isLoading: isLoading, + isLocalLoader: true, + backgroundColor: Colors.white, + // baseViewModel: widget.model, + body: Container( + color: Color(0xFFF1F1F1), + height: height * 0.90, + child: SingleChildScrollView( + child: Container( + color: Color(0xFFF1F1F1), + child: Column( + children: [ + SelectAddressWidget( + widget.model!, + widget.addresses!, + changeMainState, + isUpdating: true, + ), + SizedBox( + height: 10, + ), + SelectPaymentOptionWidget( + widget.model!, + changeMainState, + isUpdating: true, + ), + SizedBox( + height: 10, + ), + widget.model!.paymentCheckoutData.lacumInformation != null + ? Stack( + children: [ + Container( + child: Column( + children: [ + Container( + color: Colors.white, + padding: EdgeInsets.symmetric(vertical: 12, horizontal: 12), + child: Row( + children: [ + Row( + children: [ + SizedBox( + height: 24.0, + width: 24.0, + child: Checkbox( + activeColor: CustomColors.green, + value: isChecked, + onChanged: (bool? value) { + setState(() { + isChecked = value!; + if (value!) { + PaymentBottomWidget.isChecked = true; + } else { + PaymentBottomWidget.isChecked = false; + } + setState(() {}); + }); + }, + ), + ), + Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: Text( + TranslationBase.of(context).useLakumPoints + + " (${widget.model!.paymentCheckoutData.lacumInformation!.lakumInquiryInformationObjVersion!.pointsBalance.toString() + " " + TranslationBase.of(context).points})", + style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.56)), + ), + ], + ), + Expanded( + child: Container( + decoration: BoxDecoration(color: Color(0x99ffffff)), + padding: const EdgeInsets.symmetric(horizontal: 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + decoration: BoxDecoration(color: Color(0x99ffffff)), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + "${TranslationBase.of(context).availableBalance}", + fontSize: 12, + fontWeight: FontWeight.bold, + ), + Text( + "${TranslationBase.of(context).sar + " " + widget.model!.paymentCheckoutData.lacumInformation!.lakumInquiryInformationObjVersion!.pointsBalanceAmount.toString()}", + style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.56)), + ], + ), + ), + ], + ), + ), + ), + ], + ), + ), + SizedBox( + height: 10, + ), + ], + ), + ), + projectViewModel.havePrivilege(83) + ? Container() + : Container( + height: MediaQuery.of(context).size.height * .10, + color: Colors.white.withOpacity(0.6), + ) + ], + ) + : Container(), + Container( + color: Colors.white, + width: double.infinity, + padding: EdgeInsets.all(8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).reviewOrder, + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ...List.generate( + widget.model!.cartResponse.shoppingCarts != null ? widget.model!.cartResponse.shoppingCarts!.length : 0, + (index) => ProductOrderPreviewItem(widget.model!.cartResponse.shoppingCarts![index]), + ), + ], + ), + ), + Container( + width: double.infinity, + padding: EdgeInsets.all(8), + child: widget.model!.cartResponse.subtotal != null + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).orderSummary, + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts( + "${TranslationBase.of(context).subtotal}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + Texts( + "${TranslationBase.of(context).sar} ${(widget.model!.cartResponse.subtotal)!.toStringAsFixed(2)}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + ], + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts( + "${TranslationBase.of(context).shipping}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + Texts( + "${TranslationBase.of(context).sar} ${(widget.model!.totalAdditionalShippingCharge).toStringAsFixed(2)}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + ], + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts( + "${TranslationBase.of(context).vat}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + Texts( + "${TranslationBase.of(context).sar} ${(widget.model!.cartResponse.subtotalVatAmount)!.toStringAsFixed(2)}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w500, + ), + ], + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + isChecked + ? Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts( + "${TranslationBase.of(context).lakum}", + fontSize: 14, + color: Colors.green, + fontWeight: FontWeight.w500, + ), + Texts( + "- ${TranslationBase.of(context).sar} ${(widget.model!.paymentCheckoutData.lacumInformation!.lakumInquiryInformationObjVersion!.pointsBalanceAmount)!.toStringAsFixed(2)}", + fontSize: 14, + color: Colors.green, + fontWeight: FontWeight.w500, + ), + ], + ) + : Container(), + isChecked + ? const Divider( + color: Color(0xFFD6D6D6), + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ) + : Container(), + isChecked + ? Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts( + TranslationBase.of(context).total, + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + Texts( + " ${TranslationBase.of(context).sar}" + "${(widget.model!.cartResponse.totalAmount! - widget.model!.paymentCheckoutData!.lacumInformation!.lakumInquiryInformationObjVersion!.pointsBalanceAmount!)!.toStringAsFixed(2)}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + ], + ) + : Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts( + TranslationBase.of(context).total, + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + Texts( + " ${TranslationBase.of(context).sar} ${(widget.model!.cartResponse.totalAmount)!.toStringAsFixed(2)}", + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.bold, + ), + ], + ), + SizedBox( + height: 10, + ), + ], + ) + : Container(), + ), + SizedBox( + height: widget.model!.cartResponse.shoppingCarts != null ? height * 0.10 : 0, + ) + ], + ), + ), + ), + ), + bottomSheet: Container( + height: widget.model!.cartResponse.shoppingCarts != null ? height * 0.10 : 0, + color: Colors.white, + child: PaymentBottomWidget(widget.model), + ), + ); + } + + changeMainState() { + setState(() {}); + } +} diff --git a/lib/pages/pharmacies/screens/cart-page/lakum_widget.dart b/lib/pages/pharmacies/screens/cart-page/lakum_widget.dart new file mode 100644 index 00000000..a9034553 --- /dev/null +++ b/lib/pages/pharmacies/screens/cart-page/lakum_widget.dart @@ -0,0 +1,189 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/cart-order-preview.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class LakumWidget extends StatefulWidget { + final OrderPreviewViewModel model; + + + LakumWidget(this.model); + + @override + _LakumWidgetState createState() => _LakumWidgetState(); +} + +class _LakumWidgetState extends State { + TextEditingController _pointsController = new TextEditingController(); + bool useLakumWidgets = false; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + _pointsController.text = widget.model.paymentCheckoutData.lacumInformation!.lakumInquiryInformationObjVersion!.pointsBalanceAmount.toString(); + + return Container( + color: Colors.white, + padding: EdgeInsets.symmetric(vertical: 12, horizontal: 12), + child: Row( + children: [ + Row( + children: [ + SizedBox( + height: 24.0, + width: 24.0, + child: Checkbox( + activeColor: CustomColors.green, + value: useLakumWidgets, + onChanged: (bool? value) { + setState(() { + useLakumWidgets = value!; + print(useLakumWidgets); +// if (value){ +// // isChecked; +// OrderPreviewPage.isChecked = true; +// print(value); +// }else{ +// OrderPreviewPage.isChecked = false; +// } + setState(() { + }); + }); + }, + ), + ), + Padding( + padding: const EdgeInsets.only(left: 8.0, right: 8.0), + child: Text( + TranslationBase.of(context).useLakumPoints + + " (${widget.model.paymentCheckoutData.lacumInformation!.lakumInquiryInformationObjVersion!.pointsBalance.toString() + " " + TranslationBase.of(context).points})", + style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.56)), + ), + ], + ), + Expanded( + child: Container( + decoration: BoxDecoration(color: Color(0x99ffffff)), + padding: const EdgeInsets.symmetric(horizontal: 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + decoration: BoxDecoration(color: Color(0x99ffffff)), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + "${TranslationBase.of(context).availableBalance}", + fontSize: 12, + fontWeight: FontWeight.bold, + ), + Text( + "${TranslationBase.of(context).sar + " " + widget.model.paymentCheckoutData.lacumInformation!.lakumInquiryInformationObjVersion!.pointsBalanceAmount.toString()}", + style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.56) + ), + ], + ), + ), + ], + ), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.end, + // children: [ + // Texts( + // "${TranslationBase.of(context).riyal}", + // fontSize: 12, + // fontWeight: FontWeight.bold, + // ), + // Container( + // margin: projectProvider.isArabic ? EdgeInsets.only(right: 4) : EdgeInsets.only(left: 4), + // width: 60, + // height: 50, + // child: TextField( + // decoration: InputDecoration( + // border: OutlineInputBorder( + // borderSide: BorderSide(color: Colors.black, width: 0.2), + // gapPadding: 0, + // borderRadius: projectProvider.isArabic + // ? BorderRadius.only(topRight: Radius.circular(8), bottomRight: Radius.circular(8)) + // : BorderRadius.only(topLeft: Radius.circular(8), bottomLeft: Radius.circular(8)), + // ), + // disabledBorder: OutlineInputBorder( + // borderSide: BorderSide(color: Colors.black, width: 0.4), + // gapPadding: 0, + // borderRadius: BorderRadius.only(topLeft: Radius.circular(8), bottomLeft: Radius.circular(8)), + // ), + // ), + // controller: _pointsController, + // keyboardType: TextInputType.number, + // style: TextStyle( + // fontSize: 14, + // color: widget.model.paymentCheckoutData.lacumInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount > 0 ? Colors.black : Colors.grey, + // ), + // enabled: widget.model.paymentCheckoutData.lacumInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount == 0 ? false : true, + // onChanged: (val) { + // var value = int.tryParse(val); + // if (value != null && value <= widget.model.paymentCheckoutData.lacumInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount) { + // widget.model.paymentCheckoutData.usedLakumPoints = value; + // } else { + // widget.model.paymentCheckoutData.usedLakumPoints = 0; + // } + // _pointsController.text = "${widget.model.paymentCheckoutData.usedLakumPoints}"; + // }, + // ), + // ), + // Container( + // height: 50, + // padding: EdgeInsets.symmetric(horizontal: 8, vertical: 12), + // decoration: new BoxDecoration( + // color: Color(0xff3666E0), + // shape: BoxShape.rectangle, + // borderRadius: projectProvider.isArabic + // ? BorderRadius.only(topLeft: Radius.circular(6), bottomLeft: Radius.circular(6)) + // : BorderRadius.only(topRight: Radius.circular(6), bottomRight: Radius.circular(6)), + // border: Border.fromBorderSide(BorderSide( + // color: Color(0xff3666E0), + // width: 0.8, + // )), + // ), + // child: Texts( + // "${TranslationBase.of(context).use}", + // fontSize: 12, + // color: Colors.white, + // fontWeight: FontWeight.bold, + // ), + // ), + // ], + // ), + ), + ), +// useLakumWidgets ? +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Texts( +// "${TranslationBase.of(context).lakum}", +// fontSize: 14, +// color: Colors.black, +// fontWeight: FontWeight.w500, +// ), +// Texts( +// "${TranslationBase.of(context).sar} ${(widget.model.paymentCheckoutData.lacumInformation.lakumInquiryInformationObjVersion.pointsBalance).toStringAsFixed(2)}", +// fontSize: 14, +// color: Colors.black, +// fontWeight: FontWeight.w500, +// ), +// ], +// ) +// :Container() + ], + ), + ); + } +} diff --git a/lib/pages/pharmacies/screens/cart-page/payment_bottom_widget.dart b/lib/pages/pharmacies/screens/cart-page/payment_bottom_widget.dart new file mode 100644 index 00000000..b6856a26 --- /dev/null +++ b/lib/pages/pharmacies/screens/cart-page/payment_bottom_widget.dart @@ -0,0 +1,183 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class PaymentBottomWidget extends StatelessWidget { + final OrderPreviewViewModel? model; + static bool isChecked = true; + + BuildContext? context; + MyInAppBrowser? browser; + + PaymentBottomWidget(this.model); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + this.context = context; + OrderPreviewViewModel orderPreviewViewModel = Provider.of(context); + return Container( + margin: EdgeInsets.symmetric(horizontal: 10, vertical: 0), + child: orderPreviewViewModel!.paymentCheckoutData!.cartDataVisible! + ? Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + margin: EdgeInsets.symmetric(horizontal: 0, vertical: 4), + child: Row( + children: [ + isChecked + ? Texts( + "${TranslationBase.of(context).sar} ${model!.cartResponse.totalAmount}", + fontSize: 14, + fontWeight: FontWeight.bold, + color: Color(0xff929295), + ) + : Texts( + "${TranslationBase.of(context).sar} ${(model!.cartResponse.totalAmount)!.toStringAsFixed(2)}", + fontSize: 14, + fontWeight: FontWeight.bold, + color: Color(0xff929295), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 4), + child: Texts( + "${TranslationBase.of(context).inclusiveVat}", + fontSize: 8, + color: Color(0xff929295), + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ), + Texts( + "${model!.cartResponse.quantityCount} ${TranslationBase.of(context).items}", + fontSize: 10, + color: Colors.grey, + fontWeight: FontWeight.bold, + ), + ], + ), + Container( + child: CustomTextButton( + elevation: 0, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + side: BorderSide( + color: Color(0xff929295), + width: 1, + ), + ), + disabledForegroundColor: (orderPreviewViewModel.paymentCheckoutData.address != null && orderPreviewViewModel.paymentCheckoutData.paymentOption != null) + ? Colors.green + : Color(0xff929295).withOpacity(0.38), + disabledBackgroundColor: (orderPreviewViewModel.paymentCheckoutData.address != null && orderPreviewViewModel.paymentCheckoutData.paymentOption != null) + ? Colors.green + : Color(0xff929295).withOpacity(0.12), + backgroundColor: + (orderPreviewViewModel.paymentCheckoutData.address != null && orderPreviewViewModel.paymentCheckoutData.paymentOption != null) ? Colors.green : Color(0xff929295), + onPressed: (orderPreviewViewModel.paymentCheckoutData.address != null && orderPreviewViewModel.paymentCheckoutData.paymentOption != null) + ? () async { + GifLoaderDialogUtils.showMyDialog(context); + await model!.makeOrder(projectViewModel.havePrivilege(83)); + if (model!.state == ViewState.Idle) { + AppToast.showSuccessToast(message: TranslationBase.of(context).compeleteOrderMsg); + GifLoaderDialogUtils.hideDialog(context); + openPayment(model!.orderListModel[0], model!.authenticatedUserObject.user!); + } else { + AppToast.showErrorToast(message: model!.error); + } + navigateToCartPage(); + // Navigator.pop(context); + // Navigator.pop(context); + // Navigator.pop(context); + // Navigator.pop(context); + } + : null, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 16), + child: new Text( + "${TranslationBase.of(context).proceedPay}", + style: new TextStyle( + color: + (orderPreviewViewModel.paymentCheckoutData.address != null && orderPreviewViewModel.paymentCheckoutData.paymentOption != null) ? Colors.white : Colors.grey.shade400, + fontWeight: FontWeight.bold, + fontSize: 12), + ), + ), + ), + ), + ], + ), + ) + : Container(), + ); + } + + openPayment( + OrderDetailModel order, + AuthenticatedUser authenticatedUser, + ) { + browser = new MyInAppBrowser(onExitCallback: onBrowserExit, onLoadStartCallback: onBrowserLoadStart); + + browser!.openPharmacyPaymentBrowser!(order, order.orderTotal, 'ePharmacy Order', order.id!, order!.billingAddress!.email!, order.customValuesXml!, + "${authenticatedUser.firstName} ${authenticatedUser.middleName} ${authenticatedUser.lastName}", authenticatedUser.patientID, authenticatedUser, browser!); + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (browser!.isOpened()) browser!.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (browser!.isOpened()) browser!.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + navigateToCartPage() { + Navigator.pushAndRemoveUntil(locator().navigatorKey.currentContext!, MaterialPageRoute(builder: (context) => LandingPagePharmacy(currentTab: 0)), (Route r) => false); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called!!!!"); + AppToast.showSuccessToast(message: "شكراً\nPayment status for your order is Paid"); + // Navigator.pop(context); + // Navigator.pop(context); + // } else { + // AppToast.showErrorToast(message: "Transaction Failed!\Your transaction is field to some reason please try again or contact to the administration"); + // // Navigator.pop(context); + // // Navigator.pop(context); + // } + } +} diff --git a/lib/pages/pharmacies/screens/cart-page/select_address_widget.dart b/lib/pages/pharmacies/screens/cart-page/select_address_widget.dart new file mode 100644 index 00000000..592d0e78 --- /dev/null +++ b/lib/pages/pharmacies/screens/cart-page/select_address_widget.dart @@ -0,0 +1,207 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class SelectAddressWidget extends StatefulWidget { + final OrderPreviewViewModel model; + final List addresses; + final Function changeMainState; + final bool isUpdating; + + SelectAddressWidget(this.model, this.addresses, this.changeMainState, + {this.isUpdating = false}); + + @override + _SelectAddressWidgetState createState() => _SelectAddressWidgetState(); +} + +class _SelectAddressWidgetState extends State { + AddressInfo? address; + + _navigateToAddressPage(String identificationNo) { + Navigator.push(context, FadePage(page: PharmacyAddressesPage(orderPreviewViewModel: widget.model,isUpdate: widget.isUpdating,changeMainState: widget.changeMainState,))).then((result) async { + if (result != null) { + GifLoaderDialogUtils.showMyDialog(context); + address = result; + widget.model.paymentCheckoutData.address = Addresses.fromJson(address!.toJson()); + await widget.model.getInformationsByAddress(identificationNo); + await widget.model.getShoppingCart(); + widget.changeMainState(); + GifLoaderDialogUtils.hideDialog(context); + } + }); + } + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + OrderPreviewViewModel model = Provider.of(context); + if (widget.model.paymentCheckoutData.address != null) { + address = AddressInfo.fromJson(widget.model.paymentCheckoutData.address!.toJson()); + } + return Container( + color: Colors.white, + child: address == null + ? InkWell( + onTap: () => {_navigateToAddressPage(model.user!.patientIdentificationNo!)}, + child: Container( + margin: EdgeInsets.symmetric(vertical: 12, horizontal: 12), + child: Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/ic_shipping_address.png", + width: 30.0, + height: 30.0, + fit: BoxFit.scaleDown, + ), + Expanded( + child: Container( + padding: EdgeInsets.symmetric(vertical: 0, horizontal: 6), + child: Texts( + TranslationBase.of(context).selectAddress, + fontSize: 14, + fontWeight: FontWeight.bold, + color: Color(0xff0000ff), + ), + ), + ), + Icon( + Icons.arrow_forward_ios, + size: 20, + color: Colors.grey.shade400, + ), + ], + ), + ), + ) + : Container( + child: Container( + margin: EdgeInsets.symmetric(vertical: 12, horizontal: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/ic_shipping_mark.png", + width: 30.0, + height: 30.0, + fit: BoxFit.scaleDown, + ), + Expanded( + child: Container( + padding: EdgeInsets.symmetric(vertical: 0, horizontal: 6), + child: Texts( + TranslationBase.of(context).shippingAddress, + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + ), + InkWell( + onTap: () => {_navigateToAddressPage(model.authenticatedUserObject.user!.patientIdentificationNo!)}, + child: Texts( + TranslationBase.of(context).changeAddress, + fontSize: 12, + fontWeight: FontWeight.normal, + color: Color(0xff0000ff), + ), + ), + ], + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 8), + child: Texts( + "${address!.firstName} ${address!.lastName!}", + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 8), + child: Texts( + "${address!.address1} ${address!.address2} ${address!.address2},, ${address!.city}, ${address!.country} ${address!.zipPostalCode}", + fontSize: 12, + fontWeight: FontWeight.normal, + color: Colors.grey.shade500, + ), + ), + Row( + children: [ + Container( + margin: const EdgeInsets.only(right: 8), + child: Icon( + Icons.phone, + size: 20, + color: Colors.black, + ), + ), + Texts( + "${address!.phoneNumber}", + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.grey, + ), + ], + ), + Container( + margin: EdgeInsets.symmetric(vertical: 8), + child: SizedBox( + height: 2, + width: double.infinity, + child: Container( + color: Color(0xffefefef), + ), + ), + ), + Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/ic_shipping_truck.png", + width: 30.0, + height: 30.0, + fit: BoxFit.scaleDown, + ), + Container( + padding: EdgeInsets.symmetric(vertical: 0, horizontal: 6), + child: Texts( + "${TranslationBase.of(context).shipBy}", + fontSize: 12, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + Container( + child: Image.asset( + model.paymentCheckoutData.shippingOption == null + ? "" + : model.paymentCheckoutData.shippingOption!.shippingRateComputationMethodSystemName == "Shipping.FixedOrByWeight" + ? "assets/images/pharmacy_module/payment/LogoParmacyGreen.png" + : "assets/images/pharmacy_module/payment/aramex_shipping_logo.png", + fit: BoxFit.contain, + width: 100, + ), + margin: EdgeInsets.symmetric(horizontal: 8), + ), + ], + ), + ], + ), + ), + ), // ic_shipping_mark.png + ); + } +} diff --git a/lib/pages/pharmacies/screens/cart-page/select_payment_option_widget.dart b/lib/pages/pharmacies/screens/cart-page/select_payment_option_widget.dart new file mode 100644 index 00000000..d6f162d8 --- /dev/null +++ b/lib/pages/pharmacies/screens/cart-page/select_payment_option_widget.dart @@ -0,0 +1,132 @@ +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/payment-method-select-page.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; + +class SelectPaymentOptionWidget extends StatefulWidget { + final OrderPreviewViewModel model; + final VoidCallback? changeMainState; + final bool isUpdating; + + + SelectPaymentOptionWidget(this.model, this.changeMainState, {this.isUpdating = false}); + + @override + _SelectPaymentOptionWidgetState createState() => _SelectPaymentOptionWidgetState(); +} + +class _SelectPaymentOptionWidgetState extends State { + PaymentOption? paymentOption; + + _navigateToPaymentOption() { + Navigator.push(context, FadePage(page: PaymentMethodSelectPage(model: widget.model,changeMainState:widget.changeMainState,isUpdating: widget.isUpdating,))) + .then((result) => { + setState(() { + if (result != null) { + paymentOption = result; + widget.model.paymentCheckoutData.paymentOption = + paymentOption; + } + widget.changeMainState!(); + }) + }); + } + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + if (widget.model.paymentCheckoutData.paymentOption != null) { + paymentOption = widget.model.paymentCheckoutData.paymentOption; + } + return Container( + color: Colors.white, + child: paymentOption == null + ? InkWell( + onTap: () => {_navigateToPaymentOption()}, + child: Container( + margin: EdgeInsets.symmetric(vertical: 12, horizontal: 12), + child: Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/ic_payment_option.png", + width: 30.0, + height: 30.0, + fit: BoxFit.scaleDown, + ), + Expanded( + child: Container( + padding: EdgeInsets.symmetric(vertical: 0, horizontal: 6), + child: Texts( + TranslationBase.of(context).selectPaymentOption, + fontSize: 14, + fontWeight: FontWeight.bold, + color: Color(0xff0000ff), + ), + ), + ), + Icon( + Icons.arrow_forward_ios, + size: 20, + color: Colors.grey.shade400, + ), + ], + ), + ), + ) + : Container( + margin: EdgeInsets.symmetric(vertical: 12, horizontal: 12), + child: Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/ic_payment_option.png", + width: 30.0, + height: 30.0, + fit: BoxFit.scaleDown, + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 8), + padding: EdgeInsets.symmetric(horizontal: 4, vertical: 0), + decoration: new BoxDecoration( + color: Colors.grey.shade100, + shape: BoxShape.rectangle, + ), + child: Image.asset( + widget.model.getPaymentOptionImage(paymentOption!), + width: 30.0, + height: 30.0, + fit: BoxFit.scaleDown, + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.symmetric(vertical: 0, horizontal: 6), + child: Texts( + widget.model.getPaymentOptionName(paymentOption!), + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + ), + InkWell( + onTap: () => {_navigateToPaymentOption()}, + child: Texts( + TranslationBase.of(context).changeMethod, + fontSize: 12, + fontWeight: FontWeight.normal, + color: Color(0xff0000ff), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/pharmacies/screens/lacum-activitaion-vida-page.dart b/lib/pages/pharmacies/screens/lacum-activitaion-vida-page.dart new file mode 100644 index 00000000..e0c6b517 --- /dev/null +++ b/lib/pages/pharmacies/screens/lacum-activitaion-vida-page.dart @@ -0,0 +1,105 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class LakumActivationVidaPage extends StatelessWidget { + ProjectViewModel? projectViewModel; + TextEditingController _identificationNumberController = new TextEditingController(); + + @override + Widget build(BuildContext context) { + final mediaQuery = MediaQuery.of(context); + projectViewModel = Provider.of(context); + + return BaseView( + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).accountActivation, + isShowAppBar: true, + isPharmacy: true, + isShowDecPage: false, + showPharmacyCart: false, + showHomeAppBarIcon: false, + isBottomBar: false, + backgroundColor: Colors.white, + baseViewModel: model, + body: Container( + margin: EdgeInsets.symmetric(vertical: 16, horizontal: 12), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Texts( + TranslationBase.of(context).accountActivationDesc, + fontSize: 14, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: TextField( + controller: _identificationNumberController, + decoration: new InputDecoration(hintText: TranslationBase.of(context).enterIdentificationNumber, focusColor: CustomColors.green), + keyboardType: TextInputType.number, + style: TextStyle( + fontSize: 16, + color: Colors.grey.shade700, + ), + ), + ), + ], + ), + Container( + margin: EdgeInsets.only(top: 4), + child: BorderedButton( + TranslationBase.of(context).accountActivation, + // backgroundColor: _identificationNumberController.text != null && _identificationNumberController.text != "" ? CustomColors.green : Color(0xffb0b4b5), + textColor: Colors.white, + backgroundColor: CustomColors.green, + borderColor: CustomColors.green, + fontSize: 16, + hPadding: 8, + vPadding: 12, + handler: _identificationNumberController.text != null || _identificationNumberController.text != "" + ? () { + model.checkLacumAccountActivation(_identificationNumberController.text).then((_) { + if (model.state == ViewState.Idle) { + if (model.lacumInformation!.status != "Hold") { + AppToast.showErrorToast(message: TranslationBase.of(context).lakumUnhold); + if (model.lacumInformation!.status != "Discontinue") { + AppToast.showErrorToast(message: TranslationBase.of(context).lakumDiscontinue); + } + } else { + if (model.lacumInformation!.status == "Hold") { + model.makeAccountActivate(projectViewModel!.user!.patientIdentificationNo!).then((value) { + AppToast.showSuccessToast(message: TranslationBase.of(context).lakumSuccess); + Navigator.of(context).pop(); + }); + } + } + // Navigator.push(context, FadePage(page: LakumRegistrationPage(_identificationNumberController.text))).then((status) => { + // if (status == 200) {model.makeAccountActivate(projectViewModel.user.patientIdentificationNo)} + // // back to previous page + // }) + } + }); + } + : null, + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/pharmacies/screens/lacum-registration-page.dart b/lib/pages/pharmacies/screens/lacum-registration-page.dart new file mode 100644 index 00000000..4e03d7ef --- /dev/null +++ b/lib/pages/pharmacies/screens/lacum-registration-page.dart @@ -0,0 +1,215 @@ +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart'; +import 'package:diplomaticquarterapp/models/id-name-pair.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.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/dialogs/radio-group-dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; + +import 'lakum-terms-conditions-page.dart'; + +class LakumRegistrationPage extends StatefulWidget { + final String patientIdentificationNo; + + LakumRegistrationPage(this.patientIdentificationNo); + + @override + _LakumRegistrationPageState createState() => _LakumRegistrationPageState(); +} + +class _LakumRegistrationPageState extends State { + final TextEditingController _firstNameController = TextEditingController(); + + final TextEditingController _lastNameController = TextEditingController(); + + final TextEditingController _mobileNumberController = TextEditingController(); + + List languages =[]; + + IdNamePair? selectedLanguage; + + @override + Widget build(BuildContext context) { + final mediaQuery = MediaQuery.of(context); + languages.clear(); + languages.add(IdNamePair(1, TranslationBase.of(context).arabic)); + languages.add(IdNamePair(2, TranslationBase.of(context).english)); + + bool canSubmit = _firstNameController.text != null && + _firstNameController.text != "" && + _lastNameController.text != null && + _lastNameController.text != "" && + _mobileNumberController.text != null && + _mobileNumberController.text != "" && + selectedLanguage != null; + + return BaseView( + builder: (_, model, wi) => AppScaffold( + appBarTitle: "${TranslationBase.of(context).register} ${TranslationBase.of(context).lakum}", + isShowAppBar: true, + isShowDecPage: false, + isPharmacy: true, + showPharmacyCart: false, + backgroundColor: Colors.white, + baseViewModel: model, + body: Container( + width: double.infinity, + child: SingleChildScrollView( + child: SizedBox( + height: mediaQuery.size.height - 60 - mediaQuery.padding.top, + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisSize: MainAxisSize.max, + children: [ + Column( + children: [ + Image.asset( + "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", + fit: BoxFit.fill, + height: 150, + width: mediaQuery.size.width, + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context).firstName, + fontSize: 13, + fontWeight: FontWeight.normal, + color: Color(0xff8a8a8a), + ), + TextField( + controller: _firstNameController, + style: TextStyle( + fontSize: 16, + color: Colors.black, + ), + ), + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context).lastName, + fontSize: 13, + fontWeight: FontWeight.normal, + color: Color(0xff8a8a8a), + ), + TextField( + controller: _lastNameController, + style: TextStyle( + fontSize: 16, + color: Colors.black, + ), + ), + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context).mobileNumber, + fontSize: 13, + fontWeight: FontWeight.normal, + color: Color(0xff8a8a8a), + ), + TextField( + controller: _mobileNumberController, + style: TextStyle( + fontSize: 16, + color: Colors.black, + ), + ), + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context).prefferedLanguage, + fontSize: 13, + fontWeight: FontWeight.normal, + color: Color(0xff8a8a8a), + ), + InkWell( + onTap: () { + RadioGroupDialog dialog = new RadioGroupDialog( + context: context, + title: TranslationBase.of(context).prefferedLanguage, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + list: languages, + okFunction: (selectedValue) { + setState(() { + selectedLanguage = selectedValue; + }); + print("selectedLanguage = ${selectedValue.name}"); + }, + cancelFunction: () => {}); + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return dialog; + }, + ); + }, + child: TextField( + enabled: false, + decoration: InputDecoration( + suffixIcon: Icon(Icons.arrow_drop_down), + hintText: selectedLanguage == null ? "${TranslationBase.of(context).prefferedLanguage}" : "${selectedLanguage!.name!}", + hintStyle: TextStyle( + fontSize: 16, + color: Colors.black, + )), + style: TextStyle( + fontSize: 16, + color: Colors.grey.shade700, + ), + ), + ), + ], + ), + ), + ], + ), + Container( + color: Colors.green, + margin: EdgeInsets.all(40), + child: BorderedButton( + TranslationBase.of(context).register, + backgroundColor: canSubmit ? Color(0xff339933) : Color(0xff99cc99), + textColor: Colors.white, + fontSize: 16, + hPadding: 8, + vPadding: 12, + handler: canSubmit + ? () { + Navigator.push( + context, + FadePage( + page: LakumTermsConditions( + widget.patientIdentificationNo, _firstNameController.text, _lastNameController.text, _mobileNumberController.text, selectedLanguage!.id))) + .then( + (status) => { + if (status == 200) {Navigator.pop(context, "")} + // back to previous page + }, + ); + } + : null, + ), + ), + ], + ), + ), + ), + ), + )); + } +} diff --git a/lib/pages/pharmacies/screens/lacum-setting-page.dart b/lib/pages/pharmacies/screens/lacum-setting-page.dart new file mode 100644 index 00000000..17ebc7e2 --- /dev/null +++ b/lib/pages/pharmacies/screens/lacum-setting-page.dart @@ -0,0 +1,252 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/lacum-banner-widget.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class LakumSettingPage extends StatefulWidget { + final LacumAccountInformation lacumInformation; + final LacumAccountInformation lacumGroupInformation; + + LakumSettingPage(this.lacumInformation, this.lacumGroupInformation); + + @override + _LakumSettingPageState createState() => _LakumSettingPageState(); +} + +class _LakumSettingPageState extends State { + bool _lakumAccountActivated = false; + TextEditingController _nameController = new TextEditingController(); + TextEditingController _phoneController = new TextEditingController(); + + ProjectViewModel? projectViewModel; + + @override + void initState() { + _lakumAccountActivated = widget.lacumGroupInformation + .lakumInquiryInformationObjVersion!.accountStatus == + "Active"; + super.initState(); + _nameController.text = widget.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName!; + _phoneController.text = widget.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber!; + } + + @override + Widget build(BuildContext context) { + final mediaQuery = MediaQuery.of(context); + projectViewModel = Provider.of(context); + + return BaseView( + onModelReady: (model) => model.setLakumData( + widget.lacumInformation, widget.lacumGroupInformation), + builder: (_, model, wi) => AppScaffold( + appBarTitle: "${TranslationBase.of(context).lakum}", + isShowAppBar: true, + isShowDecPage: false, + isPharmacy: true, + backgroundColor: Colors.white, + baseViewModel: model, + body: Container( + width: double.infinity, + child: SingleChildScrollView( + child: SizedBox( + height: mediaQuery.size.height - + 60 - + mediaQuery.padding.top, + child: _buildSettingScreen(mediaQuery, model), + ), + ), + ), + ), + ); + } + + _buildSettingScreen(MediaQueryData mediaQuery, LacumViewModel model) { + bool canUpdate = (_nameController.text != "" && + _phoneController.text != "" && + (_nameController.text != widget.lacumGroupInformation.lakumInquiryInformationObjVersion!.memberName || + _phoneController.text != widget.lacumGroupInformation.lakumInquiryInformationObjVersion!.mobileNumber)); + + return Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisSize: MainAxisSize.max, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Stack( + children: [ + Container( + height: mediaQuery.size.height * 0.15, + color: Colors.green, + ), + Column( + children: [ + SizedBox( + height: mediaQuery.size.height * 0.05, + ), + Container( + width: mediaQuery.size.width * 1, + child: LakumBannerWidget(model, mediaQuery, false)), + ], + ) + ], + ), + SizedBox( + height: 20, + ), + SizedBox( + height: 1, + width: double.infinity, + child: Container( + color: Color(0xffefefef), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(TranslationBase.of(context).ActivateLAKUMAccount, +// "Activate LAKUM Account", + fontSize: 16, + fontWeight: FontWeight.normal, + color: Colors.black, + ), + Switch.adaptive( + activeColor: Color.fromRGBO(51, 153, 51, 1), + inactiveThumbColor: Colors.red, + activeTrackColor: Colors.grey, + inactiveTrackColor: Colors.grey, + value: _lakumAccountActivated, + onChanged: (val) { + if (_lakumAccountActivated) { + model.makeAccountDeactivate(projectViewModel!.user!.patientIdentificationNo!); + } else { + model.makeAccountActivate(projectViewModel!.user!.patientIdentificationNo!); + } + setState(() { + _lakumAccountActivated = val; + }); + }, + ), + ], + ), + ), + SizedBox( + height: 30, + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).name, + fontSize: 13, + fontWeight: _lakumAccountActivated + ? FontWeight.bold + : FontWeight.normal, + color: Colors.grey.shade400, + ), + _lakumAccountActivated + ? TextField( + controller: _nameController, + enabled: _lakumAccountActivated ? true : false, + style: TextStyle( + fontSize: 16, + color: _lakumAccountActivated + ? Colors.black + : Colors.white38, + ), + ) + : Texts( + _nameController.text, + fontSize: 16, + color: Colors.grey.shade600, + ), + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context).mobileNumber, + fontSize: 13, + fontWeight: _lakumAccountActivated + ? FontWeight.bold + : FontWeight.normal, + color: Colors.grey.shade400, + ), + _lakumAccountActivated + ? TextField( + controller: _phoneController, + enabled: _lakumAccountActivated ? true : false, + keyboardType: TextInputType.phone, + style: TextStyle( + fontSize: 16, + color: _lakumAccountActivated + ? Colors.black + : Colors.white38, + ), + ) + : Texts( + _phoneController.text, + fontSize: 16, + color: Colors.grey.shade600, + ), + ], + ), + ), + ], + ), + Container( + child: Column( + children: [ + SizedBox( + height: 2, + width: double.infinity, + child: Container( + color: Color(0xffefefef), + ), + ), + Container( + margin: EdgeInsets.all(8), + child: BorderedButton( + TranslationBase.of(context).save, + backgroundColor: + canUpdate ? Color(0xff60686b) : Color(0xffb0b4b5), + textColor: Colors.white, + fontSize: 16, + hPadding: 8, + vPadding: 12, + handler: canUpdate + ? () async { + GifLoaderDialogUtils.showMyDialog(context); + await model.createLakumAccount(_nameController.text, _phoneController.text); + GifLoaderDialogUtils.hideDialog(context); + if(model.state == ViewState.Idle){ + AppToast.showSuccessToast(message: model.successMsg); + Navigator.pop(context, ""); + } else if(model.state == ViewState.ErrorLocal){ + AppToast.showErrorToast(message: model.error); + } + } + : (){}, + ), + ) + ], + ), + ), + ], + ); + } +} diff --git a/lib/pages/pharmacies/screens/lacum-transfer-page.dart b/lib/pages/pharmacies/screens/lacum-transfer-page.dart new file mode 100644 index 00000000..9123a1c2 --- /dev/null +++ b/lib/pages/pharmacies/screens/lacum-transfer-page.dart @@ -0,0 +1,282 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-trasnfer-viewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.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:flutter/material.dart'; + +class LacumTransferPage extends StatefulWidget { + final LacumAccountInformation lacumInformation; + final LacumAccountInformation lacumGroupInformation; + + LacumTransferPage(this.lacumInformation, this.lacumGroupInformation); + + @override + _LacumTransferPageState createState() => _LacumTransferPageState(); +} + +class _LacumTransferPageState extends State { + TextEditingController _beneficieryAccountController = new TextEditingController(); + TextEditingController _transferPointsController = new TextEditingController(); + + @override + void initState() { + super.initState(); + _beneficieryAccountController.text = ""; + _transferPointsController.text = "0"; + } + + @override + Widget build(BuildContext context) { + final mediaQuery = MediaQuery.of(context); + + return BaseView( + onModelReady: (model) => model.setLakumData(widget.lacumInformation, widget.lacumGroupInformation), + builder: (_, model, wi) => AppScaffold( + appBarTitle: "${TranslationBase.of(context).lakumTransfer}", + isShowAppBar: true, + isPharmacy: true, + isShowDecPage: false, + showHomeAppBarIcon: false, + isBottomBar: true, + showPharmacyCart: false, + backgroundColor: Colors.white, + baseViewModel: model, + body: Container( + width: double.infinity, + child: SingleChildScrollView( + child: SizedBox( + height: mediaQuery.size.height - 58 - mediaQuery.padding.top, + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + children: [ + Row( + children: [ + Container( + height: 100, + width: mediaQuery.size.width / 2 - 26, + padding: EdgeInsets.only(top: 12, left: 8, right: 8, bottom: 4), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.fromBorderSide(BorderSide( + color: Color(0xffe1e1e1), + width: 0.4, + )), + color: Colors.green + //(0xff6294ed), + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Column( + children: [ + Container( + child: Texts( + "${TranslationBase.of(context).point} ${TranslationBase.of(context).balance}", + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + ], + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.symmetric(vertical: 8), + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Texts( + "${model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.pointsBalance}", + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ], + ), + ), + ) + ], + ), + ), + SizedBox( + width: 20, + ), + Container( + height: 100, + width: mediaQuery.size.width / 2 - 26, + padding: EdgeInsets.only(top: 12, left: 8, right: 8, bottom: 4), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.fromBorderSide(BorderSide( + color: Color(0xffe1e1e1), + width: 0.4, + )), + color: Color(0xff339933), + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Column( + children: [ + Container( + child: Texts( + "${TranslationBase.of(context).riyal} ${TranslationBase.of(context).balance}", + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + ], + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.symmetric(vertical: 8), + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Texts( + "${model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.pointsBalanceAmount}", + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ], + ), + ), + ) + ], + ), + ), + ], + ), + Container( + margin: EdgeInsets.only(top: 16), + child: TextField( + controller: _beneficieryAccountController, + decoration: new InputDecoration( + hintText: TranslationBase.of(context).enterBeneficiaryAccountNo, + ), + style: TextStyle( + fontSize: 16, + color: Colors.grey.shade700, + ), + ), + ), + Container( + margin: EdgeInsets.only(top: 4), + child: BorderedButton( + TranslationBase.of(context).checkBeneficiary, + backgroundColor: _beneficieryAccountController.text.isNotEmpty ? Color(0xff60686b) : Color(0xffb0b4b5), + textColor: Colors.white, + fontSize: 16, + hPadding: 8, + vPadding: 12, + handler: _beneficieryAccountController.text.isNotEmpty + ? () { + model.getLacumGroupDataBuAccountId(_beneficieryAccountController.text); + } + : () {}, + ), + ), + (model.lacumReceiverInformation != null && model.lacumReceiverInformation!.lakumInquiryInformationObjVersion != null) + ? Container( + margin: EdgeInsets.only(top: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).beneficiaryName, + color: Colors.black, + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 8), + child: TextField( + enabled: false, + decoration: new InputDecoration( + hintText: "${model.lacumReceiverInformation!.lakumInquiryInformationObjVersion!.memberName}", + hintStyle: TextStyle( + fontSize: 16, + color: Colors.grey.shade600, + )), + style: TextStyle( + fontSize: 16, + color: Colors.grey.shade700, + ), + ), + ), + SizedBox( + height: 10, + width: double.infinity, + ), + Texts( + TranslationBase.of(context).pointsToTransfer, + color: Colors.black, + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 8), + child: TextField( + controller: _transferPointsController, + decoration: new InputDecoration( + focusColor: Colors.green, + hintStyle: TextStyle( + fontSize: 16, + color: Colors.grey.shade600, + )), + style: TextStyle( + fontSize: 16, + color: Colors.grey.shade700, + ), + ), + ), + ], + ), + ) + : Container() + ], + ), + if (model.lacumReceiverInformation != null && model.lacumReceiverInformation!.lakumInquiryInformationObjVersion != null) + Container( + margin: EdgeInsets.all(8), + child: BorderedButton( + TranslationBase.of(context).lakumTransfer, + backgroundColor: Color(0xff339933), + textColor: Colors.white, + fontSize: 18, + hPadding: 8, + radius: 12, + vPadding: 16, + fontWeight: FontWeight.w600, + handler: () { + model.transferYaHalaLoyaltyPoints(_transferPointsController.text).then((status) => { + {Navigator.pop(context)} + }); + }, + ), + ) + ], + ), + ), + ), + ), + ), + )); + } +} diff --git a/lib/pages/pharmacies/screens/lakum-main-page.dart b/lib/pages/pharmacies/screens/lakum-main-page.dart new file mode 100644 index 00000000..3d9cbf87 --- /dev/null +++ b/lib/pages/pharmacies/screens/lakum-main-page.dart @@ -0,0 +1,518 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/PointsAmountPerYear.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-registration-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-setting-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-transfer-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-points-year-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/lacum-banner-widget.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.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:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'lacum-activitaion-vida-page.dart'; + +class LakumMainPage extends StatelessWidget { + ProjectViewModel? projectViewModel; + + @override + Widget build(BuildContext context) { + final mediaQuery = MediaQuery.of(context); + projectViewModel = Provider.of(context); + + return BaseView( + onModelReady: (model) async { + await model.getLacumData(projectViewModel!.user!.patientIdentificationNo!); + if (model.lacumInformation!.yahalaAccountNo == 0 || model.lacumInformation!.yahalaAccountNo == null) { + navigateToLakumRegister(context); + } else { + if (model.lacumInformation!.status == "Hold") { + Navigator.pushReplacement(context, FadePage(page: LakumActivationVidaPage())); + } + } + }, + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).lakum, + isShowAppBar: true, + isPharmacy: true, + showPharmacyCart: false, + isShowDecPage: false, + showHomeAppBarIcon: false, + isBottomBar: true, + backgroundColor: Colors.white, + baseViewModel: model, + appBarIcons: _buildAppBarICons(context, model), + // preferredSize: mediaQuery.size.height * 0.20, + body: Container( + width: double.infinity, + child: SingleChildScrollView( + child: (model.lacumGroupInformation != null && model.lacumGroupInformation!.lakumInquiryInformationObjVersion != null) + ? Column( + children: [ + Stack( + children: [ + Container( + height: mediaQuery.size.height * 0.15, + color: Colors.green, + ), + Column( + children: [ + SizedBox( + height: mediaQuery.size.height * 0.02, + ), + Container(width: mediaQuery.size.width * 1, height: mediaQuery.size.width * .6, child: LakumBannerWidget(model, mediaQuery, true)), + ], + ) + ], + ), + SizedBox( + height: 12, + ), + LakumHomeButtons(mediaQuery, model, projectViewModel!), + SizedBox( + height: 12, + ), + Container( + height: 110, + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 12.0), + child: ListView( + scrollDirection: Axis.horizontal, + children: [ + LacumPointsWidget(mediaQuery, 1, TranslationBase.of(context).balance, model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.pointsBalanceAmount!, + model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.pointsBalance!, []), + SizedBox( + width: 8, + ), + LacumPointsWidget(mediaQuery, 2, TranslationBase.of(context).gained, model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.gainedPointsAmount!, + model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.gainedPoints!, model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.gainedPointsAmountPerYear!), + SizedBox( + width: 8, + ), + LacumPointsWidget( + mediaQuery, + 3, + TranslationBase.of(context).consumed, + model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.consumedPointsAmount! != null + ? num.parse(model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.consumedPointsAmount!) + : 0, + model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.consumedPoints!, + model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.consumedPointsAmountPerYear!), + SizedBox( + width: 8, + ), + LacumPointsWidget(mediaQuery, 4, TranslationBase.of(context).transferred, 0, model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.transferPoints!, + model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.transferPointsAmountPerYear!), + ], + ), + ), + // LacumPointsWidget( + // mediaQuery, + // 3, + // TranslationBase.of(context).consumed, + // model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount != null + // ? int.parse(model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount) + // : 0, + // model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPoints, + // model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmountPerYear), + SizedBox( + width: 8, + ), + SizedBox( + height: 8, + width: double.infinity, + child: Container( + color: Color(0xffefefef), + ), + ), + Container( + margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/lakum/expired_icon.png", + fit: BoxFit.fill, + width: 25, + height: 25, + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 8), + child: Texts( + TranslationBase.of(context).expiryPoints, +// "Expired", + fontSize: 14, + ), + ) + ], + ), + Texts( + "${model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.expiredPoints} ${TranslationBase.of(context).lakumPoint} ", + fontWeight: FontWeight.bold, + fontSize: 14, + ), + ], + ), + ), + // Texts( + // "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.expiredPoints} Points", + // fontWeight: FontWeight.bold, + // fontSize: 14, + // ), + Container( + margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8), + child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ + Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/lakum/waiting_gained_icon.png", + fit: BoxFit.fill, + width: 20, + height: 25, + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 8), + child: Texts( + TranslationBase.of(context).Waitinggained, +// "Waiting gained", + fontSize: 14, + ), + ) + ], + ), + Texts( + "${model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.waitingPoints} ${TranslationBase.of(context).lakumPoint}", + fontWeight: FontWeight.bold, + fontSize: 14, + ), + ])), + // Texts( + // "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} Points", + // fontWeight: FontWeight.bold, + // fontSize: 14, + // ), + Container( + margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/lakum/will_be_expired_icon.png", + fit: BoxFit.fill, + width: 25, + height: 25, + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 8), + child: Texts( + TranslationBase.of(context).WillBeExpired, +// "Will Be Expired", + fontSize: 14, + ), + ) + ], + ), + Texts( + "${model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.pointsWillBeExpired} ${TranslationBase.of(context).lakumPoint}", + fontWeight: FontWeight.bold, + fontSize: 14, + ), + ], + ), + // Texts( + // "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsWillBeExpired} Points", + // fontWeight: FontWeight.bold, + // fontSize: 14, + // ), + ), + + SizedBox( + height: 2, + width: double.infinity, + child: Container( + color: Color(0xffefefef), + ), + ), + ], + ) + : Container(), + ), + ), + ), + ); + } + + navigateToLakumRegister(BuildContext context) { + Navigator.pushReplacement(context, FadePage(page: LakumRegistrationPage(projectViewModel!.user!.patientIdentificationNo!))); + } + + List _buildAppBarICons(BuildContext context, LacumViewModel model) { + return [ + IconButton( + icon: Icon(Icons.settings), + color: Colors.white, + onPressed: () { + Navigator.push(context, FadePage(page: LakumSettingPage(model.lacumInformation!, model.lacumGroupInformation!))).then((result) => {model.getLacumGroupData(projectViewModel!.user!.patientIdentificationNo!)}); + }, + ), + ]; + } +} + +class LakumHomeButtons extends StatelessWidget { + final MediaQueryData mediaQuery; + final LacumViewModel model; + ProjectViewModel projectViewModel; + + LakumHomeButtons(this.mediaQuery, this.model, this.projectViewModel); + + @override + Widget build(BuildContext context) { + return Container( + margin: EdgeInsets.symmetric(horizontal: 16), + child: Row( + children: [ + Expanded( + child: InkWell( +// onTap: () { +// print("Account activate click"); +// Navigator.push( +// context, FadePage(page: LakumActivationVidaPage())) +// .then((result) => {model.getLacumGroupData()}); +// }, + child: Container( + padding: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.fromBorderSide(BorderSide( + color: Color(0xffe1e1e1), + width: 0.4, + )), + color: Color(0xffe1e1e1)), + height: mediaQuery.size.height * 0.08, + child: Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/lakum/Account_activation_icon.png", + fit: BoxFit.fill, + width: 30, + height: 30, + ), + Expanded( + child: Container( + padding: EdgeInsets.symmetric(horizontal: 16), + child: Texts( + TranslationBase.of(context).accountActivation, + fontSize: 14, + fontWeight: FontWeight.bold, + ), + ), + ) + ], + ), + ), + ), + ), + SizedBox( + width: 8, + ), + Expanded( + child: InkWell( + onTap: () { + Navigator.push(context, FadePage(page: LacumTransferPage(model.lacumInformation!, model.lacumGroupInformation!))).then((result) { + model.getLacumGroupData(projectViewModel.user!.patientIdentificationNo!); + }); + }, + child: Container( + padding: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.fromBorderSide(BorderSide( + color: Color(0xffe1e1e1), + width: 0.4, + )), + color: Color(0xffe1e1e1)), + height: mediaQuery.size.height * 0.08, + child: Row( + children: [ + Image.asset( + "assets/images/pharmacy_module/lakum/akum_transfer.png", + // "assets/images/pharmacy_module/lakum/Lakum_transfer_icon.png", + fit: BoxFit.fill, + width: 35, + height: 30, + ), + Expanded( + child: Container( + padding: EdgeInsets.symmetric(horizontal: 16), + child: Texts( + TranslationBase.of(context).lakumTransfer, + fontSize: 14, + fontWeight: FontWeight.bold, + ), + ), + ) + ], + ), + ), + ), + ), + ], + ), + ); + } +} + +class LacumPointsWidget extends StatelessWidget { + final MediaQueryData mediaQuery; + final int pointType; // 1. balance, 2. gained, 3. consume, 4. transfer + final String title; + final num riyal; + final num point; + Color? titleColor; + final List pointsAmountPerYear; + + LacumPointsWidget(this.mediaQuery, this.pointType, this.title, this.riyal, this.point, this.pointsAmountPerYear) { + if (pointType == 1) { + titleColor = Color(0xffefefef); + } else if (pointType == 2) { + // titleColor = Color(0xff004bcc); + titleColor = Color(0xff339933); + } else if (pointType == 3) { + titleColor = Colors.grey; + } else { + titleColor = Color(0xffffa500); + } + } + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: () { + if (pointType != 1) { + if (pointsAmountPerYear != null && pointsAmountPerYear.length > 0) { + Navigator.push(context, FadePage(page: LakumPointsYearPage(pointsAmountPerYear))); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).lakumMsg); + // show snackBar No Details Points are there + } + } + }, + child: Container( + width: mediaQuery.size.width / 2 - 25, + padding: EdgeInsets.only(top: 12, left: 8, right: 8, bottom: 8), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.fromBorderSide(BorderSide( + color: Color(0xffe1e1e1), + width: 0.4, + )), + color: pointType == 1 ? Color(0xff339933) : Color(0xffefefef), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + child: Texts( + title, + fontSize: 14, + fontWeight: FontWeight.bold, + color: titleColor, + ), + ), + if (pointType != 1) + Icon( + Icons.arrow_forward, + color: titleColor, + ) + ], + ), + ], + ), + ), + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + if (pointType != 4) + Expanded( + child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).sar, + fontSize: 13, + fontWeight: FontWeight.bold, + color: pointType == 1 ? Colors.white : Colors.black, + ), + SizedBox( + height: 4, + ), + Texts( + "$riyal", + fontSize: 13, + fontWeight: FontWeight.bold, + color: pointType == 1 ? Colors.white : Colors.black, + ), + ], + ), + ), + if (pointType != 4) + SizedBox( + child: Container( + color: pointType == 1 ? Colors.white : Colors.grey, + ), + width: 1, + ), + Expanded( + child: Container( + margin: EdgeInsets.only(left: 8, right: 8), + child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).points, + fontSize: 12, + fontWeight: FontWeight.bold, + color: pointType == 1 ? Colors.white : Colors.black, + ), + SizedBox( + height: 4, + ), + Texts( + "$point", + fontSize: 12, + fontWeight: FontWeight.bold, + color: pointType == 1 ? Colors.white : Colors.black, + ), + ], + ), + ), + ), + ], + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/pharmacies/screens/lakum-points-month-page.dart b/lib/pages/pharmacies/screens/lakum-points-month-page.dart new file mode 100644 index 00000000..5e6952ec --- /dev/null +++ b/lib/pages/pharmacies/screens/lakum-points-month-page.dart @@ -0,0 +1,254 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/PointsAmountPerMonth.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/lakum-point-table-row-widget.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.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/material.dart'; + +class LakumPointMonthPage extends StatefulWidget { + final PointsAmountPerMonth pointsAmountPerMonth; + final int year; + int expandedItemIndex = -1; + + LakumPointMonthPage(this.pointsAmountPerMonth, this.year); + + @override + _LakumPointsMonthPageState createState() => _LakumPointsMonthPageState(); +} + +class _LakumPointsMonthPageState extends State { + @override + Widget build(BuildContext context) { + final mediaQuery = MediaQuery.of(context); + + return BaseView( + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).LakumPoint, + isShowAppBar: true, + isPharmacy: true, + showPharmacyCart: false, + isShowDecPage: false, + showHomeAppBarIcon: false, + isBottomBar: true, + backgroundColor: Colors.white, + baseViewModel: model, + body: Container( + width: double.infinity, + child: SingleChildScrollView( + child: Column( + children: [ + Container( + height: mediaQuery.size.height * 0.25, + child: Stack( + children: [ + Image.asset( + "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", + fit: BoxFit.fill, + width: mediaQuery.size.width * 1.0, + ), + Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + height: mediaQuery.size.height * 0.06, + margin: EdgeInsets.symmetric(vertical: 16, horizontal: 24), + child: Row( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + TranslationBase.of(context).month, + color: Colors.grey.shade600, + fontSize: 16, + ), + Texts( + "${widget.pointsAmountPerMonth.month}, ${widget.year}", + color: Colors.grey.shade700, + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ], + ), + ), + Expanded( + child: Row( + crossAxisAlignment: CrossAxisAlignment.end, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Texts( + TranslationBase.of(context).point, + color: Colors.grey.shade600, + fontSize: 16, + ), + Texts( + "${widget.pointsAmountPerMonth.pointsPerMonth}", + color: Colors.grey.shade700, + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ], + ), + ), + SizedBox( + child: Container( + color: Colors.grey, + ), + width: 1, + ), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Texts( + TranslationBase.of(context).riyal, + color: Colors.grey.shade600, + fontSize: 16, + ), + Texts( + "${widget.pointsAmountPerMonth.amountPerMonth}", + color: Colors.grey.shade700, + fontWeight: FontWeight.bold, + fontSize: 16, + ), + ], + ), + ), + ], + ), + ), + ], + ), + ), + ], + ), + ], + ), + ), + SizedBox( + height: 10, + ), + LakumPointTableRowWidget(true, "DATE", 0, 0, (){}, 0), + ...List.generate( + widget.pointsAmountPerMonth.pointsAmountPerday!.length, + (index) => LakumPointTableRowWidget( + false, + DateUtil.getWeekDayMonthDayYearDateFormatted(DateUtil.convertStringToDate(widget.pointsAmountPerMonth!.pointsAmountPerday![index].transationDate!), "en"), + widget.pointsAmountPerMonth.pointsAmountPerday![index].pointsPerDay!, + widget.pointsAmountPerMonth.pointsAmountPerday![index].amountPerDay!, + () { + setState(() { + if (widget.expandedItemIndex == index) { + widget.expandedItemIndex = -1; + } else { + widget.expandedItemIndex = index; + } + }); + }, + index, + expandFlag: widget.expandedItemIndex == index, + collapsed: Column( + children: [ + ...List.generate( + widget.pointsAmountPerMonth.pointsAmountPerday![index].pointsDetails!.length, + (index) => DayPointsDetailWidget( + widget.pointsAmountPerMonth!.pointsAmountPerday![index].pointsDetails![index].subTransactionTypeDescription!, + widget.pointsAmountPerMonth.pointsAmountPerday![index].pointsDetails![index].purchasePoints!, + widget.pointsAmountPerMonth.pointsAmountPerday![index]!.pointsDetails![index].amount!), + ), + ], + ), + ), + ), + ], + ), + ), + ), + ), + ); + } +} + +class DayPointsDetailWidget extends StatelessWidget { + final String rowTitle; + final num points; + final num riyal; + + DayPointsDetailWidget(this.rowTitle, this.points, this.riyal); + + @override + Widget build(BuildContext context) { + return Container( + color: Color(0xffe4e4e4), + padding: EdgeInsets.symmetric(vertical: 0, horizontal: 12), + child: Column( + children: [ + Padding( + padding: const EdgeInsets.symmetric(vertical: 8), + child: Row( + children: [ + Expanded( + child: Container( + child: Column( + children: [ + Texts( + "TYPE", + fontSize: 12, + fontWeight: FontWeight.bold, + ), + SizedBox( + height: 4, + ), + Texts( + rowTitle, + fontSize: 14, + fontWeight: FontWeight.normal, + ), + ], + crossAxisAlignment: CrossAxisAlignment.start, + ), + )), + Expanded( + child: Container( + child: Texts( + "$points", + fontSize: 14, + fontWeight: FontWeight.normal, + ), + )), + Expanded( + child: Container( + child: Texts( + "$riyal", + fontSize: 14, + fontWeight: FontWeight.normal, + ), + )), + Expanded(child: Container()), + ], + ), + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 1, + thickness: 1, + indent: 0, + endIndent: 0, + ), + ], + ), + ); + } +} diff --git a/lib/pages/pharmacies/screens/lakum-points-year-page.dart b/lib/pages/pharmacies/screens/lakum-points-year-page.dart new file mode 100644 index 00000000..a5111e5e --- /dev/null +++ b/lib/pages/pharmacies/screens/lakum-points-year-page.dart @@ -0,0 +1,207 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/PointsAmountPerYear.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/lakum-point-table-row-widget.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:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; + +import 'lakum-points-month-page.dart'; + +class LakumPointsYearPage extends StatefulWidget { + final List pointsAmountPerYear; + int selectedIndexYear = 0; + + LakumPointsYearPage(this.pointsAmountPerYear); + + @override + _LakumPointsYearPageState createState() => _LakumPointsYearPageState(); +} + +class _LakumPointsYearPageState extends State { + @override + Widget build(BuildContext context) { + final mediaQuery = MediaQuery.of(context); + + return BaseView( + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).LakumPoint, + isShowAppBar: true, + isPharmacy: true, + showPharmacyCart: false, + isShowDecPage: false, + showHomeAppBarIcon: false, + isBottomBar: true, + backgroundColor: Colors.white, + baseViewModel: model, + body: Container( + width: double.infinity, + child: SingleChildScrollView( + child: Column( + children: [ + Container( + height: 100, + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + child: ListView( + scrollDirection: Axis.horizontal, + children: [ + ...List.generate( + widget.pointsAmountPerYear.length, + (index) => LacumPointsYearWidget( + mediaQuery, + widget.selectedIndexYear == index, + widget.pointsAmountPerYear[index], () { + setState(() { + widget.selectedIndexYear = index; + }); + })), + ], + ), + ), + SizedBox( + height: 0, + ), + LakumPointTableRowWidget(true, "MONTH", 0, 0, (){}, 0), + ...List.generate( + widget.pointsAmountPerYear[widget.selectedIndexYear] + .pointsAmountPerMonth!.length, + (index) => LakumPointTableRowWidget( + false, + widget.pointsAmountPerYear[widget.selectedIndexYear] + .pointsAmountPerMonth![index].month.toString(), + widget.pointsAmountPerYear![widget.selectedIndexYear]! + .pointsAmountPerMonth![index].pointsPerMonth!, + widget.pointsAmountPerYear[widget.selectedIndexYear]! + .pointsAmountPerMonth![index].amountPerMonth!, + (){ + Navigator.push(context, + FadePage(page: LakumPointMonthPage(widget.pointsAmountPerYear[widget.selectedIndexYear] + .pointsAmountPerMonth![index], widget.pointsAmountPerYear![widget.selectedIndexYear!].year!))); + }, + index), + ), + ], + ), + ), + ), + ), + ); + } +} + +class LacumPointsYearWidget extends StatelessWidget { + final MediaQueryData mediaQuery; + final bool isSelected; + final PointsAmountPerYear yearPoints; + final VoidCallback yearOnTap; + + LacumPointsYearWidget( + this.mediaQuery, this.isSelected, this.yearPoints, this.yearOnTap); + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: yearOnTap, + child: Container( + width: mediaQuery.size.width / 2 - 16, + padding: EdgeInsets.only(top: 12, left: 8, right: 8, bottom: 4), + margin: EdgeInsets.only(right: 8.0), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.fromBorderSide(BorderSide( + color: Color(0xffe1e1e1), + width: 0.4, + )), + color: isSelected ? Color(0xff004bcc) : Color(0xffefefef), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + child: Texts( + "YEAR: ${yearPoints.year}", + fontSize: 14, + fontWeight: FontWeight.bold, + color: isSelected ? Colors.white : Colors.black, + ), + ), + ], + ), + ], + ), + ), + Expanded( + child: Row( + children: [ + Expanded( + child: Container( + margin: EdgeInsets.only(left: 4), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(TranslationBase.of(context).point, +// "POINT", + fontSize: 12, + fontWeight: FontWeight.bold, + color: isSelected ? Colors.white : Colors.black, + ), + SizedBox( + height: 4, + ), + Texts( + "${yearPoints.pointsPerYear}", + fontSize: 12, + fontWeight: FontWeight.bold, + color: isSelected ? Colors.white : Colors.black, + ), + ], + ), + ), + ), + SizedBox( + child: Container( + color: isSelected ? Colors.white : Colors.grey, + ), + width: 1, + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Texts(TranslationBase.of(context).sar, +// "RIYAL", + fontSize: 12, + fontWeight: FontWeight.bold, + color: isSelected ? Colors.white : Colors.black, + ), + SizedBox( + height: 4, + ), + Texts( + "${yearPoints.amountPerYear}", + fontSize: 13, + fontWeight: FontWeight.bold, + color: isSelected ? Colors.white : Colors.black, + ), + ], + ), + ), + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/pharmacies/screens/lakum-terms-conditions-page.dart b/lib/pages/pharmacies/screens/lakum-terms-conditions-page.dart new file mode 100644 index 00000000..ab1a902e --- /dev/null +++ b/lib/pages/pharmacies/screens/lakum-terms-conditions-page.dart @@ -0,0 +1,76 @@ +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.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/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_html/flutter_html.dart'; +import 'package:provider/provider.dart'; + +class LakumTermsConditions extends StatelessWidget { + final String firstName, lastName, mobileNo, identificationNo; + final int languageId; + + LakumTermsConditions(this.identificationNo, this.firstName, this.lastName, this.mobileNo, this.languageId); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + + return BaseView( + onModelReady: (model) => model.getUserTermsAndConditionsForEPharmcy(), + builder: (_, model, wi) => AppScaffold( + appBarTitle: "${TranslationBase.of(context).register} ${TranslationBase.of(context).lakum}", + isShowAppBar: true, + isShowDecPage: false, + backgroundColor: Colors.white, + baseViewModel: model, + body: Container( + margin: EdgeInsets.all(8), + width: double.infinity, + child: Stack( + children: [ + SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (model.listUserAgreement != null && model.listUserAgreement.userAgreementLAKUM != null) + Html( + data: projectProvider.isArabic ? model.listUserAgreement.userAgreementLAKUMn : model.listUserAgreement.userAgreementLAKUM, + ), + ], + ), + ), + Align( + alignment: Alignment.bottomCenter, + child: Container( + height: 50, + margin: EdgeInsets.all(8), + child: BorderedButton( + TranslationBase.of(context).acceptLbl, + backgroundColor: Color(0xff60686b), + textColor: Colors.white, + fontSize: 16, + hPadding: 8, + vPadding: 12, + handler: () { + model.createNewLakumAccount("$firstName $lastName", mobileNo, identificationNo, languageId).then((status) => { + if (status == 200) {Navigator.pop(context, "")} else { + Navigator.pop(context, ""), + AppToast.showErrorToast(message: model.error) + } + // back to previous page + }); + }, + ), + ), + ), + ], + ), + ), + )); + } +} diff --git a/lib/pages/pharmacies/screens/payment-method-select-page.dart b/lib/pages/pharmacies/screens/payment-method-select-page.dart new file mode 100644 index 00000000..0aa86c6b --- /dev/null +++ b/lib/pages/pharmacies/screens/payment-method-select-page.dart @@ -0,0 +1,232 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; + +import 'cart-page/cart-order-preview.dart'; + +class PaymentMethodSelectPage extends StatefulWidget { + final OrderPreviewViewModel? model; + final bool isUpdating; + final VoidCallback? changeMainState; + + const PaymentMethodSelectPage({Key? key, this.model, this.isUpdating = false, this.changeMainState}) : super(key: key); + + @override + _PaymentMethodSelectPageState createState() => _PaymentMethodSelectPageState(); +} + +class _PaymentMethodSelectPageState extends State { + PaymentOption? selectedPaymentOption; + + @override + Widget build(BuildContext context) { + Size screenSize = MediaQuery.of(context).size; + double cardWidth = screenSize.width / 2 - 32; + + return AppScaffold( + appBarTitle: TranslationBase.of(context).paymentMethod, + isShowAppBar: true, + isPharmacy: true, + isShowDecPage: false, + body: Container( + width: double.infinity, + margin: EdgeInsets.symmetric(horizontal: 0, vertical: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Center( + child: Text( + TranslationBase.of(context).selectPaymentOption, + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 0, vertical: 16), + child: Column( + children: [ + PaymentMethodCard( + cardWidth, + selectedPaymentOption!, + PaymentOption.meda, + () => { + setState(() { + selectedPaymentOption = PaymentOption.meda; + }) + }), + PaymentMethodCard( + cardWidth, + selectedPaymentOption!, + PaymentOption.visa, + () => { + setState(() { + selectedPaymentOption = PaymentOption.visa; + }) + }), + PaymentMethodCard( + cardWidth, + selectedPaymentOption!, + PaymentOption.mastercard, + () => { + setState(() { + selectedPaymentOption = PaymentOption.mastercard; + }) + }), + widget.model!.cartResponse.totalAmount! > 1000 + ? PaymentMethodCard( + cardWidth, + selectedPaymentOption!, + PaymentOption.installments, + () => { + setState(() { + selectedPaymentOption = PaymentOption.installments; + }) + }) + : Container(), + if (Platform.isIOS) + PaymentMethodCard( + cardWidth, + selectedPaymentOption!, + PaymentOption.applepay, + () => { + setState(() { + selectedPaymentOption = PaymentOption.applepay; + }) + }), + ], + ), + ), + ], + ), + ), + bottomSheet: Container( + color: Theme.of(context).scaffoldBackgroundColor, + padding: EdgeInsets.symmetric(horizontal: 16, vertical: 20), + child: DefaultButton( + TranslationBase.of(context).next, + selectedPaymentOption != null + ? () { + widget.model!.paymentCheckoutData!.paymentOption = selectedPaymentOption; + if (widget.isUpdating) { + widget.changeMainState!(); + Navigator.pop(context); + return; + } else { + Navigator.push( + context, + FadePage( + page: OrderPreviewPage( + model: widget.model!, + ), + ), + ); + } + // Navigator.pop(context, selectedPaymentOption); + } + : null, + color: Color(0xff5AB154), + ), + ), + ); + } +} + +class PaymentMethodCard extends StatelessWidget { + final double cardWidth; + final PaymentOption selectedPaymentOption; + final PaymentOption paymentOption; + final VoidCallback selectMethod; + + PaymentMethodCard(this.cardWidth, this.selectedPaymentOption, this.paymentOption, this.selectMethod); + + @override + Widget build(BuildContext context) { + bool isSelected = false; + if (selectedPaymentOption != null && selectedPaymentOption == paymentOption) { + isSelected = true; + } + + return Container( + width: MediaQuery.of(context).size.width * 0.99, + child: InkWell( + onTap: selectMethod, + child: Card( + elevation: 0.0, + margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + side: isSelected ? BorderSide(color: Colors.green, width: 2.0) : BorderSide(color: Colors.transparent, width: 0.0), + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + children: [ + Container( + width: 24, + height: 24, + decoration: containerColorRadiusBorderWidth(isSelected ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5), + ), + mWidth(12), + Container( + height: 70.0, + width: 70.0, + child: Image.asset(getPaymentOptionImage(paymentOption)), + ), + mFlex(1), + if (isSelected) + Container( + decoration: containerRadius(CustomColors.green, 200), + padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12), + child: Text( + TranslationBase.of(context).paymentSelected, + style: TextStyle( + color: Colors.white, + fontSize: 11, + ), + ), + ), + ], + ), + ), + ), + ), + ); + } + + String getPaymentOptionImage(PaymentOption paymentOption) { + String assetFile = "assets/images/new/payment/"; + switch (paymentOption.index) { + case 0: + return "${assetFile}Mada.png"; + break; + case 1: + return "${assetFile}sadad.png"; + break; + case 2: + return "${assetFile}visa.png"; + break; + case 3: + return "${assetFile}Mastercard.png"; + break; + case 4: + return "${assetFile}installments.png"; + break; + case 5: + return "${assetFile}Apple_Pay.png"; + break; + default: + return ""; + } + } +} diff --git a/lib/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart b/lib/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart new file mode 100644 index 00000000..6c58970c --- /dev/null +++ b/lib/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart @@ -0,0 +1,50 @@ +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/tems-condition-viewmodel.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/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_html/flutter_html.dart'; +import 'package:provider/provider.dart'; + +class PharmacyTermsConditions extends StatelessWidget { + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + + return BaseView( + onModelReady: (model) => model.getUserTermsAndConditionsForEPharmcy(), + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).termOfService, + isShowAppBar: true, + isShowDecPage: false, + isPharmacy: true, + backgroundColor: Colors.white, + baseViewModel: model, + body: Container( + margin: EdgeInsets.all(8), + width: double.infinity, + child: Stack( + children: [ + SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + if (model.listUserAgreement != null && + model.listUserAgreement.userAgreementLAKUM != + null) + Html( + data: projectProvider.isArabic + ? model.listUserAgreement.userAgreementTxtn + : model.listUserAgreement.userAgreementTxt, + ), + ], + ), + ), + ], + ), + ), + )); + } +} diff --git a/lib/pages/pharmacies/screens/pharmacy_module_page.dart b/lib/pages/pharmacies/screens/pharmacy_module_page.dart new file mode 100644 index 00000000..cbf228de --- /dev/null +++ b/lib/pages/pharmacies/screens/pharmacy_module_page.dart @@ -0,0 +1,73 @@ +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/home/BannerPager.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/home/BestSellerWidget.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/home/GridViewButtons.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/home/MostViewedWidget.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/home/PrescriptionsWidget.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/home/RecentlyViewedWidget.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/home/ShopByBrandWidget.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +bool isInWishlist = false; +int price = 0; +var itemID; +var product; +var customerId; +var item; +dynamic languageID; +List? wishlistData; + +class PharmacyPage extends StatefulWidget { + @override + _PharmacyPageState createState() => _PharmacyPageState(); +} + +class _PharmacyPageState extends State { + @override + Widget build(BuildContext context) { + OrderPreviewViewModel orderPreviewViewModel = Provider.of(context); + return WillPopScope( + onWillPop: () async { + return false; + }, + child: BaseView( + onModelReady: (model) async { + await model.getSavedLanguage(); + await model.getBannerList(); + if (model.isLogin) await orderPreviewViewModel.getShoppingCart(); + }, + allowAny: true, + builder: (_, model, wi) => AppScaffold( + title: "", + isShowDecPage: false, + baseViewModel: model, + isMainPharmacyPages: true, + isPharmacy: true, + isShowPharmacyAppbar: true, + backgroundColor: Color(0xffFEFEFE), + body: Container( + width: double.infinity, + child: SingleChildScrollView( + child: Column( + //crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BannerPager(model), + PrescriptionsWidget(), + //ShopByBrandWidget(), + MostViewedWidget(), + RecentlyViewedWidget(), + BestSellerWidget(), + //ShopByBrandWidget(), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/pharmacies/screens/phramacy-product-detail-page.dart b/lib/pages/pharmacies/screens/phramacy-product-detail-page.dart new file mode 100644 index 00000000..afbd2b06 --- /dev/null +++ b/lib/pages/pharmacies/screens/phramacy-product-detail-page.dart @@ -0,0 +1,19 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; + +class ProductDetailScreen extends StatelessWidget { + final PharmacyProduct product; + + ProductDetailScreen(this.product); + + @override + Widget build(BuildContext context) { + return AppScaffold( + body: Center( + child: Texts("id = ${product.id}"), + ), + ); + } +} diff --git a/lib/pages/pharmacies/screens/product-details/availability_info.dart b/lib/pages/pharmacies/screens/product-details/availability_info.dart new file mode 100644 index 00000000..4c635507 --- /dev/null +++ b/lib/pages/pharmacies/screens/product-details/availability_info.dart @@ -0,0 +1,97 @@ +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_inappwebview/flutter_inappwebview.dart'; +import 'package:map_launcher/map_launcher.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class AvailabilityInfo extends StatelessWidget { + final ProductDetailViewModel? previousModel; + + final InAppBrowser browser = new InAppBrowser(); + + AvailabilityInfo({Key? key, this.previousModel}) : super(key: key); + + @override + Widget build(BuildContext context) { + return previousModel!.productLocationService.length == 0 + ? Container( + padding: EdgeInsets.all(15), + alignment: Alignment.center, + child: Text( + TranslationBase.of(context).noLocationAvailable, + ), + ) + : Container( + margin: EdgeInsets.only(bottom: 40), + child: ListView.builder( + physics: ScrollPhysics(), + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: previousModel!.productLocationService.length, + itemBuilder: (BuildContext context, int index) { + return Padding( + padding: EdgeInsets.all(8), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + flex: 1, + child: Image.network(previousModel!.productLocationService![index].projectImageUrl!), + ), + SizedBox( + width: 10, + ), + Expanded( + flex: 4, + child: Text( + previousModel!.productLocationService![index].locationDescription! + "\n" + previousModel!.productLocationService[index].cityName.toString(), + style: TextStyle(fontSize: 12), + ), + ), + Expanded( + flex: 1, + child: IconButton( + icon: Icon(Icons.location_on), + color: Colors.red, + onPressed: () async { + await MapLauncher.showMarker( + mapType: MapType.google, + coords: Coords(double.parse(previousModel!.productLocationService[index].latitude!), double.parse(previousModel!.productLocationService[index]!.longitude!)), + title: previousModel!.productLocationService![index].locationDescription!, + ); + }, + ), + ), + Expanded( + flex: 1, + child: IconButton( + icon: Icon(Icons.phone), + color: Colors.red, + onPressed: () { + launch("tel://" + previousModel!.productLocationService[index]!.phoneNumber!); + }, + ), + ), + ], + ), + Divider(height: 1.2, color: Colors.grey) + ], + ), + ); + }, + ), + ); + } + + convertCityName(txt) { + String stringTxt; + String newTxt; + stringTxt = txt.toString(); + newTxt = stringTxt.split('.')[1]; + + return newTxt; + } +} diff --git a/lib/pages/pharmacies/screens/product-details/details_info.dart b/lib/pages/pharmacies/screens/product-details/details_info.dart new file mode 100644 index 00000000..95c6ca4b --- /dev/null +++ b/lib/pages/pharmacies/screens/product-details/details_info.dart @@ -0,0 +1,57 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class DetailsInfo extends StatelessWidget { + + final PharmacyProduct? product; + + const DetailsInfo({Key? key, this.product}) : super(key: key); + + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ +// Container( +// child: Texts( +// TranslationBase.of(context) +// .description, +// fontSize: 17, +// color: Colors.grey, +// ), +// ), +// SizedBox( +// height: 10, +// ), +// Divider(height: 1, color: Colors.grey), + SizedBox( + height: 10, + ), + Container( + margin: EdgeInsets.only(left: 10, right: 10), + child: Text( + projectViewModel.isArabic + ? product!.fullDescriptionn! + : product! + .fullDescription! ?? + "", + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 14, letterSpacing:-0.56), + ), + ), + SizedBox( + height: 60, + ), + ]), + ); + } +} diff --git a/lib/pages/pharmacies/screens/product-details/discount_description.dart b/lib/pages/pharmacies/screens/product-details/discount_description.dart new file mode 100644 index 00000000..10233b1c --- /dev/null +++ b/lib/pages/pharmacies/screens/product-details/discount_description.dart @@ -0,0 +1,47 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:flutter/material.dart'; + +class DiscountDescription extends StatelessWidget { + final PharmacyProduct? product; + + const DiscountDescription({Key? key, this.product}) : super(key: key); + @override + Widget build(BuildContext context) { + return Container( + width: double.infinity, + height: 50, + color: Colors.yellowAccent, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 1, + child: Container( + alignment: Alignment.centerRight, + child: Text( + product! + .discountDescription!, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 17), + ), + ), + ), + SizedBox( + width: 10, + ), + Expanded( + flex: 0, + child: Container( + child: Image( + image: AssetImage( + 'assets/images/offer.png'), + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/pharmacies/screens/product-details/footor/footer-widget.dart b/lib/pages/pharmacies/screens/product-details/footor/footer-widget.dart new file mode 100644 index 00000000..f4928e49 --- /dev/null +++ b/lib/pages/pharmacies/screens/product-details/footor/footer-widget.dart @@ -0,0 +1,358 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/footor/quantity_box.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:flutter/material.dart'; + +import '../../../../../locator.dart'; +import '../../../../../routes.dart'; + +class FooterWidget extends StatefulWidget { + final bool isAvailable; + final int maxQuantity; + final int minQuantity; + final int quantityLimit; + final PharmacyProduct item; + final Function? addToCartFunction; + final Function? addToShoppingCartFunction; + final ProductDetailViewModel? model; + + int? quantity; + bool? isOverQuantity; + + FooterWidget(this.isAvailable, this.maxQuantity, this.minQuantity, + this.quantityLimit, this.item, + {this.quantity, + this.isOverQuantity = false, + this.addToCartFunction, + this.addToShoppingCartFunction, + this.model}); + + @override + _FooterWidgetState createState() => _FooterWidgetState(); +} + +class _FooterWidgetState extends State { + double quantityUI = 80; + bool showUI = false; + + static final GlobalKey _key = GlobalKey(); + AuthenticatedUserObject authenticatedUserObject = + locator(); + AppSharedPreferences sharedPref = new AppSharedPreferences(); + + @override + void initState() { + super.initState(); + if (!isBuyNowDisable() || !isAddToCartDisable()) { + quantityUI = 160; + showUI = true; + } + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(0.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xFFCCCCCC), + spreadRadius: 0, + blurRadius: 4, + offset: Offset(2, 2), // changes position of shadow + ), + ], + // border: Border.all(color: Color(0xFF707070), width: 0), + ), + width: double.infinity, + height: quantityUI, + child: Column( + children: [ + !showUI + ? Container( + height: 10, + ) + : Container( + width: double.infinity, + height: 100, + color: Colors.white, + child: Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + Row( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + TranslationBase.of(context).productQuantity, + fontSize: 15, + fontWeight: FontWeight.bold, + color: Color(0xFF575757)), + ), + InkWell( + child: Icon(Icons.close, color: Colors.black), + onTap: () { + setState(() { + quantityUI = 80; + showUI = false; + }); + }, + ) + ], + mainAxisAlignment: MainAxisAlignment.spaceBetween, + ), + Container( + height: 35.0, + child: ListView( + scrollDirection: Axis.horizontal, + children: [ + SizedBox( + width: 5, + ), + for (int i = 1; i <= 10; i++) + QuantityBox( + label: i, + onTapFunc: onChangeValue, + isSelected: widget.quantity == i), + Container( + width: 100, + decoration: BoxDecoration( + border: Border.all(color: Colors.grey[300]!), + color: Colors.white, + ), + child: TextField( + key: _key, + keyboardType: TextInputType.number, + textAlign: TextAlign.center, + decoration: + InputDecoration(hintText: ' Quantity # '), + onChanged: (text) { + if (int.tryParse(text) == null) { + text = ''; + } else { + setState(() { + widget.quantity = int.parse(text); + if (widget.quantity! >= + widget.quantityLimit) { + widget.isOverQuantity = true; + } else { + widget.isOverQuantity = false; + } + }); + } + }, + ), + ), + ], + ), + ) + ], + ), + ), + ), + Container( + height: 58, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + height: 60, + child: TextButton( + child: Row( + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).productQuantity, + fontSize: 10, + fontWeight: FontWeight.w600, + ), + Row( + children: [ + AppText( + widget.quantity.toString(), + fontSize: 16, + fontWeight: FontWeight.bold, + ), + SizedBox( + width: 20, + ), + Icon( + Icons.keyboard_arrow_down, + color: Color(0xFF2E303A), + size: 25, + ) + ], + ), + ], + ), + SizedBox( + width: 10, + ), + SizedBox( + height: 40, + width: 1, + child: Container( + color: Color(0xFFEFEFEF), + ), + ), + ], + ), + onPressed: widget.isAvailable && !widget.item.isRx! + ? () { + setState(() { + if (showUI) { + quantityUI = 80; + showUI = false; + } else { + quantityUI = 160; + showUI = true; + } + }); + } + : null, + ), + ), + SizedBox( + width: 10, + ), + Container( + width: MediaQuery.of(context).size.width * 0.35, + margin: EdgeInsets.symmetric(vertical: 4.0), + child: SecondaryButton( + label: TranslationBase.of(context).addToCart, + disabled: isAddToCartDisable(), + fontSize: 15, + onTap: () async { + if (!authenticatedUserObject.isLogin) { + login(); + } else + await widget.addToCartFunction!( + quantity: widget.quantity, + itemID: widget.item.id, + model: widget.model); + }, + fontWeight: FontWeight.w600, + borderRadius: 6, + disableColor: Color(0xFFD6D6D6), + textColor: + isAddToCartDisable() ? Color(0xFFACACAC) : Colors.white, + color: Color(0xFF535353), + ), + ), + SizedBox( + width: 5, + ), + Container( + width: MediaQuery.of(context).size.width * 0.35, + margin: EdgeInsets.symmetric(vertical: 4.0), + child: SecondaryButton( + label: TranslationBase.of(context).buyNow, + fontSize: 15, + disabled: isBuyNowDisable(), + onTap: () async { + if (!authenticatedUserObject.isLogin) { + login(); + } else { + await widget.addToShoppingCartFunction!( + quantity: widget.quantity, + itemID: widget.item.id, + model: widget.model); + } + }, + textColor: + isBuyNowDisable() ? Color(0xFFACACAC) : Colors.white, + fontWeight: FontWeight.w600, + borderRadius: 6, + disableColor: Color(0xFFD6D6D6), + color: Color(0xFF5AB145), + ), + ), + ], + ), + ), + ], + ), + ); + } + + bool isBuyNowDisable() { + return (!widget.isAvailable && widget.quantity! > 0) || + (widget.quantity! > widget.quantityLimit) || + widget.item.isRx!; + } + + bool isAddToCartDisable() { + return (!widget.isAvailable && widget.quantity! > 0) || + widget.quantity! > widget.quantityLimit || + widget.item.isRx!; + } + + void setUserValues(value) async { + if (value != null) sharedPref.setObject(IMEI_USER_DATA, value); + } + + login() async { + final authService = new AuthProvider(); + var data = await sharedPref.getObject(IMEI_USER_DATA); + sharedPref.remove(REGISTER_DATA_FOR_LOGIIN); + if (data != null) { + Navigator.of(context).pushNamed(CONFIRM_LOGIN); + } else { + GifLoaderDialogUtils.showMyDialog(context); + authService + .selectDeviceImei(DEVICE_TOKEN) + .then((SelectDeviceIMEIRES? value) { + GifLoaderDialogUtils.hideDialog(context); + if (value != null) { + setUserValues(value); + Navigator.of(context).pushNamed(CONFIRM_LOGIN); + } else { + Navigator.of(context).pushNamed( + WELCOME_LOGIN, + ); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + Navigator.of(context).pushNamed( + WELCOME_LOGIN, + ); + }); + } + } + + onChangeValue(int i) { + setState(() { + widget.quantity = i; + if (widget.quantity! >= widget.quantityLimit) { + widget.isOverQuantity = true; + } else { + widget.isOverQuantity = false; + //return widget.quantity!; + } + + }); + } +} diff --git a/lib/pages/pharmacies/screens/product-details/footor/quantity_box.dart b/lib/pages/pharmacies/screens/product-details/footor/quantity_box.dart new file mode 100644 index 00000000..3ece6cc5 --- /dev/null +++ b/lib/pages/pharmacies/screens/product-details/footor/quantity_box.dart @@ -0,0 +1,42 @@ +import 'package:flutter/material.dart'; + +class QuantityBox extends StatelessWidget { + final int? label; + final bool? isSelected; + final Function(int)? onTapFunc; + + QuantityBox({ + Key? key, + this.label, + this.onTapFunc, this.isSelected = false, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Row( + children: [ + InkWell( + child: Container( + decoration: BoxDecoration( + border: Border.all(color:isSelected!?Colors.green: Colors.grey[300]!), + color: Colors.white, + ), + alignment: Alignment.center, + width: 50.0, + + child: Text( + '$label', + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20), + ), + ), + onTap:(){ + onTapFunc!(label!)!; + } + ), + SizedBox( + width: 5, + ) + ], + ); + } +} diff --git a/lib/pages/pharmacies/screens/product-details/product-detail.dart b/lib/pages/pharmacies/screens/product-details/product-detail.dart new file mode 100644 index 00000000..fa49cc51 --- /dev/null +++ b/lib/pages/pharmacies/screens/product-details/product-detail.dart @@ -0,0 +1,413 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-name-and-price.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/reviews_info.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/shared/custom-divider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import 'availability_info.dart'; +import 'details_info.dart'; +import 'discount_description.dart'; +import 'footor/footer-widget.dart'; +import 'shared/product_details_app_bar.dart'; + +late String itemID; +late PharmacyProduct specificationData; + +class ProductDetailPage extends StatefulWidget { + final PharmacyProduct product; + + ProductDetailPage(this.product); + + @override + __ProductDetailPageState createState() => __ProductDetailPageState(); +} + +class __ProductDetailPageState extends State { + AppSharedPreferences sharedPref = AppSharedPreferences(); + + bool isTrue = true; + bool isDetails = true; + bool isReviews = false; + bool isAvailability = false; + String? customerId; + bool isSelected = true; + bool isOverQuantity = false; + bool isInWishList = false; + int quantity = 0; + + checkWishlist() async { + GifLoaderDialogUtils.showMyDialog(context); + ProductDetailViewModel model = new ProductDetailViewModel(); + await model.checkWishlistData(); + + for (int i = 0; i < model.wishListItems.length; i++) { + if (itemID == model.wishListItems[i].product.id) { + isInWishList = true; + break; + } else { + isInWishList = false; + } + } + GifLoaderDialogUtils.hideDialog(context); + setState(() {}); + } + + void initState() { + quantity = 1; + specificationData = widget.product; + + userInfo(); + super.initState(); + } + + @override + void dispose() { + super.dispose(); + } + + void userInfo() async { + print(specificationData); + customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + if (customerId != null) { + itemID = widget.product.id; + checkWishlist(); + } + setState(() {}); + } + + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + allowAny: true, + onModelReady: (model) async { + await model.getProductReviewsData(widget.product.id).then((value) {}); + }, + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).productDetails, + isShowAppBar: true, + isPharmacy: true, + isShowDecPage: false, + customAppBar: ProductAppBar( + product: widget.product, + quantity: quantity, + model: model, + addToWishlistFunction: () async { + await addToWishlistFunction(itemID: itemID, model: model); + }, + deleteFromWishlistFunction: () async { + await deleteFromWishlistFunction(itemID: itemID, model: model); + }, + isInWishList: isInWishList, + addToCartFunction: addToCartFunction, + ), + body: SingleChildScrollView( + child: Column( + children: [ + Container( + width: double.infinity, + color: Colors.white, + child: Column( + children: [ + if (widget.product.images!.isNotEmpty) + Stack( + children: [ + Container( + height: MediaQuery.of(context).size.height * .40, + child: Center( + child: Image.network( + widget.product.images![0].src!.trim(), + fit: BoxFit.contain, + ), + ), + ), + if (model.isStockAvailable && !model.isStockAvailable) + Container( + height: MediaQuery.of(context).size.height * .40, + color: Colors.white.withOpacity(0.6), + // child: AppText("Out of Stock"), + ), + if (model.isStockAvailable && !model.isStockAvailable) + Positioned( + // bottom: 10, + top: MediaQuery.of(context).size.height * .088, + left: MediaQuery.of(context).size.width * .32, + child: Center( + child: Container( + height: MediaQuery.of(context).size.height * .40, + // color: Colors.white.withOpacity(0.75), + child: RotationTransition( + turns: new AlwaysStoppedAnimation(310 / 360), + child: AppText( + TranslationBase.of(context).productOutOfStock, + color: Color(0xFF000000).withOpacity(0.19), + fontSize: projectViewModel.isArabic ? 40 : 50, + fontWeight: FontWeight.bold, + )), + ), + ), + ), + ], + ), + if (widget.product.discountDescription != null) DiscountDescription(product: widget.product) + ], + ), + ), + SizedBox( + height: 4, + ), + Container( + color: Colors.white, + child: ProductNameAndPrice( + context, + widget.product, + customerId: customerId, + addToWishlistFunction: (item) { + addToWishlistFunction(itemID: item, model: model); + setState(() {}); + }, + deleteFromWishlistFunction: (item) { + deleteFromWishlistFunction(itemID: item, model: model); + setState(() {}); + }, + notifyMeWhenAvailable: (context, itemId) { + notifyMeWhenAvailable(itemId: itemId, customerId: customerId, model: model); + }, + isInWishList: isInWishList, + isStockAvailable: model.isStockAvailable, + stockAvailability: projectViewModel.isArabic ? model.stockAvailabilityn : model.stockAvailability, + ), + ), + SizedBox( + height: 10, + ), +// Container( +// color: Colors.white, +// child: Column( +// mainAxisAlignment: MainAxisAlignment.start, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Container( +// padding: EdgeInsets.symmetric(vertical: 15, horizontal: 10), +// child: Texts( +// TranslationBase.of(context).specification, +// fontSize: 15, +// fontWeight: FontWeight.bold, +// ), +// width: double.infinity, +// ), +// // Divider(color: Colors.grey), +// ], +// ), +// ), +// SizedBox( +// height: 6, +// ), + Container( + // width: 500, + margin: EdgeInsets.only(bottom: 10), + padding: EdgeInsets.only(bottom: 10), + color: Colors.white, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Column( + children: [ + TextButton( + onPressed: () { + setState(() { + isDetails = true; + isReviews = false; + isAvailability = false; + }); + }, + child: Text( + TranslationBase.of(context).details, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 14, letterSpacing: -0.84), + ), + style: TextButton.styleFrom( + backgroundColor: Colors.white, + ), + ), + CustomDivider( + color: isDetails ? Colors.green : Colors.transparent, + ) + ], + ), + SizedBox( + width: 20, + ), + Column( + children: [ + TextButton( + onPressed: () async { + if (widget.product.approvedTotalReviews > 0) { + GifLoaderDialogUtils.showMyDialog(context); + await model.getProductReviewsData(widget.product.id); + GifLoaderDialogUtils.hideDialog(context); + } else { + model.clearReview(); + } + setState(() { + isDetails = false; + isReviews = true; + isAvailability = false; + }); + }, + child: Text( + TranslationBase.of(context).reviews, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 14, letterSpacing: -0.84), + ), + style: TextButton.styleFrom( + backgroundColor: Colors.white, + ), + ), + CustomDivider( + color: isReviews ? Colors.green : Colors.transparent, + ), + ], + ), + SizedBox( + width: 20, + ), + Column( + children: [ + TextButton( + onPressed: model.isStockAvailable != null && model.isStockAvailable + ? () async { + GifLoaderDialogUtils.showMyDialog(context); + await model.getProductLocationData(widget.product.sku); + GifLoaderDialogUtils.hideDialog(context); +// + setState(() { + isDetails = false; + isReviews = false; + isAvailability = true; + }); + } + : null, + child: Text( + TranslationBase.of(context).availability, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 14, letterSpacing: -0.84), + ), + style: TextButton.styleFrom( + backgroundColor: Colors.white, + ), ), + CustomDivider( + color: isAvailability ? Colors.green : Colors.transparent, + ), + ], + ), + ], + ), + SizedBox( + height: 10, + ), + isDetails + ? DetailsInfo( + product: widget.product, + ) + : isReviews + ? ReviewsInfo( + product: widget.product, + previousModel: model, + ) + : isAvailability + //&& widget.product.stockAvailability != "Out of stock" + ? AvailabilityInfo(previousModel: model) +// : isAvailability && widget.product.stockAvailability == "Out of stock" +// ? Container( +// // padding: EdgeInsets.all(15), +// padding: EdgeInsets.fromLTRB(15, 15, 15, 20), +// margin: EdgeInsets.only(bottom: 20), +// alignment: Alignment.center, +// child: Text( +// TranslationBase.of(context).noLocationAvailable, +// ), +// ) + : Container(), + ], + ), + ), + SizedBox( + height: 10, + ), +// if (projectViewModel.isLogin) +// RecommendedProducts( +// product: widget.product, +// productDetailViewModel: model, +// addToWishlistFunction: (itemID) async { +// await addToWishlistFunction(itemID: itemID, model: model); +// }, +// deleteFromWishlistFunction: (itemID) async { +// await deleteFromWishlistFunction(itemID: itemID, model: model); +// }, +// ) + ], + ), + ), + // : AppCircularProgressIndicator(), + bottomSheet: model.state == ViewState.Idle || model.state == ViewState.ErrorLocal + ? FooterWidget( + model.isStockAvailable, + widget.product.orderMaximumQuantity!, + widget.product.orderMinimumQuantity!, + model.stockQuantity!.toInt(), + widget.product, + quantity: quantity, + isOverQuantity: isOverQuantity, + addToCartFunction: addToCartFunction, + addToShoppingCartFunction: addToShoppingCartFunction, + model: model, + ) + : SizedBox(), + )); + } + + addToShoppingCartFunction({quantity, itemID, ProductDetailViewModel? model}) async { + GifLoaderDialogUtils.showMyDialog(context); + await model?.addToCartData(quantity, itemID, context); + GifLoaderDialogUtils.hideDialog(context); + if (model?.state != ViewState.ErrorLocal) Utils.navigateToCartPage(); + } + + addToWishlistFunction({itemID, ProductDetailViewModel? model}) async { + isInWishList = true; + await model?.addToWishlistData!(itemID, context); + setState(() {}); + } + + deleteFromWishlistFunction({itemID, ProductDetailViewModel? model}) async { + isInWishList = false; + await model?.deleteWishlistData!(itemID, context); + setState(() {}); + } + + addToCartFunction({ + quantity, + itemID, + ProductDetailViewModel? model, + }) async { + GifLoaderDialogUtils.showMyDialog(context); + await model?.addToCartData!(quantity, itemID, context); + GifLoaderDialogUtils.hideDialog(context); + } + + notifyMeWhenAvailable({itemId, customerId, ProductDetailViewModel? model}) async { + await model?.notifyMe!(customerId, itemId); + } +} diff --git a/lib/pages/pharmacies/screens/product-details/product-name-and-price.dart b/lib/pages/pharmacies/screens/product-details/product-name-and-price.dart new file mode 100644 index 00000000..6bea9208 --- /dev/null +++ b/lib/pages/pharmacies/screens/product-details/product-name-and-price.dart @@ -0,0 +1,371 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.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:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:provider/provider.dart'; + +import '../../../../locator.dart'; +import 'shared/icon_with_bg.dart'; + +class ProductNameAndPrice extends StatefulWidget { + BuildContext context; + PharmacyProduct item; + final customerId; + final bool? isInWishList; + final Function? notifyMeWhenAvailable; + final Function? addToWishlistFunction; + final Function? deleteFromWishlistFunction; + final bool isStockAvailable; + final String? stockAvailability; + + AuthenticatedUserObject authenticatedUserObject = + locator(); + + ProductNameAndPrice(this.context, this.item, + {this.customerId, + this.isInWishList, + this.notifyMeWhenAvailable, + this.addToWishlistFunction, + this.deleteFromWishlistFunction, + this.isStockAvailable = true, + this.stockAvailability}); + + @override + _ProductNameAndPriceState createState() => _ProductNameAndPriceState(); +} + +class _ProductNameAndPriceState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + + return Container( + color: Color(0xffF7F7F7), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + widget.item.rxMessage != null + ? Container( + // width: widget.item.rxMessage != null ? MediaQuery.of(context).size.width / 2.8 : 0, + width: double.infinity, + height: 40, + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xffD02127), + // color: Colors.red[700] + // borderRadius: BorderRadius.only(topLeft: Radius.circular(6)), + ), + child: Row( + children: [ + Padding( + padding: const EdgeInsets.only(left: 8, right: 8), + child: Icon( + Icons.warning, + color: Colors.white, + ), + ), + Text( + projectViewModel.isArabic + ? widget.item.rxMessagen.toString() + : widget.item.rxMessage.toString(), + style: TextStyle( + color: Colors.white, + // regular: true, + fontSize: 17, + fontWeight: FontWeight.w600, + letterSpacing:-0.68 + // textAlign: TextAlign.center, + )), + ], + )) + : Container(), + FractionallySizedBox( + widthFactor: 0.93, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ +// Texts(widget.item.price.toString() + " " + TranslationBase.of(context).sar, fontWeight: FontWeight.bold, fontSize: 20), + if (widget.stockAvailability != null) + Container( + margin: EdgeInsets.only(top: 10.0, right: 10.0), + padding: EdgeInsets.only( + left: 11.0, right: 11.0, top: 0, bottom: 0), + decoration: BoxDecoration( + border: Border.all( + color: getStatusBackgroundColor(), + style: BorderStyle.solid, + width: 5.0, + ), + color: getStatusBackgroundColor(), + borderRadius: BorderRadius.circular(30.0)), + // child: Text( + // widget.stockAvailability, + // style: TextStyle( + // fontWeight: FontWeight.w600, + // fontSize: 11, + // color: Color(0xffFFFFFF), + // ), + // color: getStatusBackgroundColor(), + // borderRadius: BorderRadius.circular(30.0)), + child: Text( + widget.stockAvailability!, + style: TextStyle(fontWeight: FontWeight.w600, fontSize: 11, color: Color(0xffFFFFFF),letterSpacing:-0.44)), + //color: widget.isStockAvailable ? Colors.white : Colors.red, + ), + // SizedBox(width: 20), + if ( + widget.authenticatedUserObject.isLogin) + widget.stockAvailability != null && + !widget.isStockAvailable && + widget.customerId != null + ? Container( + child: Row( + children: [ + IconButton( + iconSize: 25, + icon: Icon(Icons.notifications_active), + color: new Color(0xff2E303A), + onPressed: () { + widget!.notifyMeWhenAvailable!( + context, widget.item.id); + }, + ), + IconButton( + icon: Icon(!widget.isInWishList! + ? Icons.favorite_border + : Icons.favorite), + color: !widget.isInWishList! + ? Color(0xff2E303A) + : Color(0xffD02127), + onPressed: () async { + { + if (widget.customerId != null) { + if (!widget.isInWishList!) { + await widget + .addToWishlistFunction!(widget.item.id); + } else { + await widget.deleteFromWishlistFunction!( + widget.item.id); + } + } else { + return; + } + setState(() {}); + } + }, + ) + ], + ), + ) + : IconButton( + icon: Icon(!widget.isInWishList! + ? Icons.favorite_border + : Icons.favorite), + color: !widget.isInWishList! + ? Color(0xff2E303A) + : Color(0xffD02127), + onPressed: () async { + { + if (widget.customerId != null) { + if (!widget.isInWishList!) { + await widget + .addToWishlistFunction!(widget.item.id); + } else { + await widget.deleteFromWishlistFunction!( + widget.item.id); + } + } else { + return; + } + setState(() {}); + } + }, + ) +// BorderedButton( +// TranslationBase.of(context).notifyMe, +// hasBorder: true, +// borderColor: Colors.green, +// textColor: Colors.green, +// fontWeight: FontWeight.bold, +// vPadding: 6, +// hPadding: 14, +// handler: () => widget.notifyMeWhenAvailable(context, widget.item.id), +// ) +// InkWell( +// onTap: () => widget.notifyMeWhenAvailable(context, widget.item.id), +// child: Row(children: [ +// Texts( +// TranslationBase.of(context).notifyMe, +// decoration: TextDecoration.underline, +// color: Colors.blue, +// ), +// SizedBox(width: 4), +// Icon( +// FontAwesomeIcons.bell, +// color: Colors.blue, +// size: 15.0, +// ) +// ]), +// ) +// : IconWithBg( +// icon: !widget.isInWishList ? Icons.favorite_border : Icons.favorite, +// color: !widget.isInWishList ? Colors.white : Colors.red[800], +// onPress: () async { +// { +// if (widget.customerId != null) { +// if (!widget.isInWishList) { +// await widget.addToWishlistFunction(widget.item.id); +// } else { +// await widget.deleteFromWishlistFunction(widget.item.id); +// } +// } else { +// return; +// } +// setState(() {}); +// } +// }, +// ) + ], + ), + ), + Padding( + padding: + const EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 12), + child: Container( + margin: EdgeInsets.only(left: 10, right: 10), + child: Align( + alignment: projectViewModel.isArabic + ? Alignment.topRight + : Alignment.topLeft, + child: Text( + projectViewModel.isArabic + ? widget.item.namen + : widget.item.name, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 16, + letterSpacing: -0.96), + ), + ), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 8, right: 8), + child: Container( + margin: EdgeInsets.only(left: 10, right: 10), + child: Align( + alignment: projectViewModel.isArabic + ? Alignment.topRight + : Alignment.topLeft, + child: Text( + TranslationBase.of(context).sar + + " " + + widget.item.price.toString(), + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 19, + letterSpacing: -0.76), + ), + ), + ), + ), + FractionallySizedBox( + widthFactor: 0.95, + child: Row( + children: [ + Container( + margin: EdgeInsets.only(left: 8, right: 8), + child: Align( + alignment: Alignment.bottomLeft, + child: Row( + children: [ + // RatingBar.readOnly( + // initialRating: double.parse( + // widget.item.approvedRatingSum.toString()), + // size: 18.0, + // filledColor: Color(0XFFD02127), + // emptyColor: Color(0XFFD02127), + // isHalfAllowed: true, + // halfFilledIcon: Icons.star_half, + // filledIcon: Icons.star, + // emptyIcon: Icons.star_border, + // ), + RatingBar( + initialRating: double.parse( + widget.item.approvedRatingSum.toString()), + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon(Icons.star, color: CustomColors.accentColor,), + half: Icon(Icons.star_half, color: CustomColors.accentColor,), + empty: Icon(Icons.star, color: CustomColors.accentColor,), + ), + tapOnlyMode: true, + unratedColor: Colors.grey[500], + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + ), + SizedBox( + width: 5, + ), +// Texts( +// "${widget.item.approvedRatingSum}", +// fontWeight: FontWeight.bold, +// fontSize: 12, +// ), +// SizedBox( +// width: 30, +// ), + Text( + "(${widget.item.approvedTotalReviews}${TranslationBase.of(context).review})", + style: TextStyle( + fontWeight: FontWeight.w600, fontSize: 12), + ), + SizedBox( + width: 70, + ), +// if (widget.item.rxMessage != null) +// Row( +// children: [ +// Text( +// projectViewModel.isArabic ? widget.item.rxMessagen.toString() : widget.item.rxMessage.toString(), +// style: TextStyle(color: Colors.red, fontSize: 10), +// ), +// ], +// ) + ], + ), + ), + ), + ], + ), + ), + SizedBox( + height: 20, + ), + ], + ), + ); + } + + Color getStatusBackgroundColor() { + if (widget.isStockAvailable) + return Color(0xFF5AB145); + else + return Color(0xFFD02127); + } +} diff --git a/lib/pages/pharmacies/screens/product-details/recommended_products.dart b/lib/pages/pharmacies/screens/product-details/recommended_products.dart new file mode 100644 index 00000000..7f646971 --- /dev/null +++ b/lib/pages/pharmacies/screens/product-details/recommended_products.dart @@ -0,0 +1,371 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:provider/provider.dart'; + +class RecommendedProducts extends StatefulWidget { + final PharmacyProduct? product; + final String? customerId; + final ProductDetailViewModel? productDetailViewModel; + final bool isOverQuantity; + final bool isInWishList; + final VoidCallback? addToWishlistFunction; + final VoidCallback? deleteFromWishlistFunction; + + AuthenticatedUserObject authenticatedUserObject = + locator(); + + RecommendedProducts( + {Key? key, + this.product, + this.productDetailViewModel, + this.customerId, + this.isOverQuantity = false, + this.isInWishList = false, + this.addToWishlistFunction, + this.deleteFromWishlistFunction}) + : super(key: key); + + @override + _RecommendedProductsState createState() => _RecommendedProductsState(); +} + +class _RecommendedProductsState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return SingleChildScrollView( + child: Container( + width: 410, + color: Colors.white, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(top: 9), + width: 410, + color: Colors.white, + child: Texts( + TranslationBase.of(context).recommended, + fontWeight: FontWeight.bold, fontSize: 16 + ), + ), + Container( + color: Colors.white, + height: 210, + margin: EdgeInsets.only(bottom: 75), + padding: EdgeInsets.only(bottom: 5), + // margin: EdgeInsets.symmetric(horizontal: 6, vertical: 4), + child: BaseView( + onModelReady: (model) => + model.getRecommendedProducts(widget.product!.id!), + builder: (_, model, wi) => NetworkBaseView( + isLocalLoader: true, + baseViewModel: model, + child: Container( + child: model.state== ViewState.BusyLocal?Container( + height: 80, + child: Center( + child: CircularProgressIndicator( + backgroundColor: Colors.white, + valueColor: AlwaysStoppedAnimation( + Colors.grey[500]!, + ), + ), + ), + ):model.recommendedProductList.length != null + ? ListView.builder( + scrollDirection: Axis.horizontal, + shrinkWrap: true, + physics: ScrollPhysics(), + // physics: NeverScrollableScrollPhysics(), + itemCount: model.recommendedProductList.length, + itemBuilder: (context, index) { + return InkWell( + onTap: () async { + GifLoaderDialogUtils.showMyDialog(context); + RecommendedProductModel data = + model.recommendedProductList[index]; + var json = data.toJson(); + PharmacyProduct product = + new PharmacyProduct.fromJson(json); + await Navigator.pushReplacement( + context, + FadePage( + page: ProductDetailPage(product), + ), + ); + GifLoaderDialogUtils.hideDialog(context); + }, + child: Card( + elevation: 2, + shape: RoundedRectangleBorder( + side: BorderSide( + color: Colors.grey[300]!, width: 2), + borderRadius: BorderRadius.circular(10), + ), + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 0, + ), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(15), + ), + ), + padding: EdgeInsets.symmetric(horizontal: 4), + width: MediaQuery.of(context).size.width / 3, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Stack(children: [ + Container( + child: Align( + alignment: Alignment.topRight, + child: IconButton( + icon: Icon(model.recommendedProductList[index].isinwishlist != true + ? Icons.favorite_border : Icons.favorite), + color: model.recommendedProductList[index].isinwishlist != true + ? Colors.grey : Colors.red, + onPressed: () async { + if (widget.authenticatedUserObject.isLogin + ) { + if (!widget.isInWishList && model.recommendedProductList[index].isinwishlist != true) { + GifLoaderDialogUtils.showMyDialog(context); + widget.addToWishlistFunction!( + ); + GifLoaderDialogUtils.hideDialog(context); + setState(() { + model.recommendedProductList[index].isinwishlist = true;}); + } else { + GifLoaderDialogUtils.showMyDialog(context); + widget.deleteFromWishlistFunction!( + ); + GifLoaderDialogUtils.hideDialog(context); + setState(() { + model.recommendedProductList[index].isinwishlist = false; + }); + } + } else { + return; + } + setState(() { + // checkWishlist(); + }); + }, + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB( + 0, 16, 10, 16), + alignment: Alignment.center, + child: (model + .recommendedProductList[ + index] + .images != + null && + model + .recommendedProductList[ + index] + .images! + .length > + 0) + ? Image.network( + model + .recommendedProductList[ + index] + .images![0] + .src + .toString(), + fit: BoxFit.cover, + height: 60, + ) + : Image.asset( + "assets/images/no_image.png", + fit: BoxFit.cover, + height: 60, + ), + ), + Container( + width: model + .recommendedProductList[ + index] + .rxMessage != + null + ? MediaQuery.of(context) + .size + .width / + 5 + : 0, + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xffb23838), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(6), + ), + ), + child: model + .recommendedProductList[ + index] + .rxMessage != + null + ? Texts( + projectViewModel.isArabic + ? model + .recommendedProductList[ + index] + .rxMessagen + : model + .recommendedProductList[ + index] + .rxMessage, + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + : Texts(""), + ), + ]), + Container( + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + projectViewModel.isArabic + ? model + .recommendedProductList[ + index] + .namen + : model + .recommendedProductList[ + index] + .name, + style: TextStyle( + color: Colors.black, + fontSize: 13.0, +// fontWeight: FontWeight.bold, + ), + ), + Padding( +// padding: const EdgeInsets.only(top: 15, bottom: 10), + padding: const EdgeInsets.only( + top: 10, bottom: 5), + child: Texts( + "SAR ${model.recommendedProductList[index].price}", + bold: true, + fontSize: 14, + ), + ), + ], + ), + ), + Row( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + padding: + EdgeInsets.only(right: 10), + child: Align( + alignment: Alignment.topLeft, + child: RatingBar( + initialRating:model + .recommendedProductList[ + index] + .approvedRatingSum + .toDouble(), + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon(Icons.star, color: CustomColors.accentColor,), + half: Icon(Icons.star_half, color: CustomColors.accentColor,), + empty: Icon(Icons.star, color: CustomColors.accentColor,), + ), + tapOnlyMode: true, + unratedColor: Colors.grey[500], + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + ) + + // RatingBar.readOnly( + // initialRating: model + // .recommendedProductList[ + // index] + // .approvedRatingSum + // .toDouble(), + // size: 13.0, + // filledColor: + // Colors.yellow[700], + // emptyColor: Colors.grey[500], + // isHalfAllowed: true, + // halfFilledIcon: + // Icons.star_half, + // filledIcon: Icons.star, + // emptyIcon: Icons.star, + // ), + ), + ), + Texts( + "(${model.recommendedProductList[index].notApprovedTotalReviews.toString()})", +// bold: true, + fontSize: 12, + ), + ]), + ], + ), + ), + ), + ); + }) + : Container( + // color: Colors.white, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Texts( + TranslationBase.of(context).nonRecommended, + color: Colors.black, + ), + ], + ), + ), + ), + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/pharmacies/screens/product-details/reviews_info.dart b/lib/pages/pharmacies/screens/product-details/reviews_info.dart new file mode 100644 index 00000000..0fdac7a9 --- /dev/null +++ b/lib/pages/pharmacies/screens/product-details/reviews_info.dart @@ -0,0 +1,147 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:provider/provider.dart'; + +class ReviewsInfo extends StatelessWidget { + final PharmacyProduct? product; + final ProductDetailViewModel? previousModel; + + const ReviewsInfo({Key? key, this.product, this.previousModel}) + : super(key: key); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return previousModel?.productDetailService.length != 0 && + previousModel?.productDetailService[0].reviews!.length != 0 + ? ListView.builder( + physics: ScrollPhysics(), + itemCount: previousModel?.productDetailService[0].reviews!.length, + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemBuilder: (BuildContext context, int index) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: Row( + children: [ + Expanded( + child: Container( + child: Text(previousModel!.productDetailService[0].reviews![index].customer!.firstName != null + && previousModel!.productDetailService[0].reviews![index].customer!.firstName != null + ? previousModel!.productDetailService[0].reviews![index].customer!.firstName.toString() + " " + + previousModel!.productDetailService[0].reviews![index].customer!.lastName.toString() + :"", +// previousModel.productDetailService[0] +// .reviews[index].customerId +// .toString(), + style: TextStyle( + fontSize: 14, + color: Colors.black, + fontWeight: FontWeight.w600), + ), + ), + ), + Container( + // margin: EdgeInsets.only(left: 210), + child: projectViewModel.isArabic? + Align( + alignment: Alignment.topLeft, + child: + + // RatingBar.readOnly( + // initialRating: previousModel + // .productDetailService[0].reviews[index].rating + // .toDouble(), + // size: 15.0, + // filledColor: Colors.yellow[700], + // emptyColor: Colors.grey[500], + // isHalfAllowed: true, + // halfFilledIcon: Icons.star_half, + // filledIcon: Icons.star, + // emptyIcon: Icons.star, + // ), + RatingBar( + initialRating: previousModel! + .productDetailService[0].reviews![index].rating!.toDouble(), + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon(Icons.star, color: CustomColors.accentColor,), + half: Icon(Icons.star_half, color: CustomColors.accentColor,), + empty: Icon(Icons.star, color: CustomColors.accentColor,), + ), + tapOnlyMode: true, + unratedColor: Colors.grey[500], + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + ) + + ): RatingBar( + initialRating: previousModel! + .productDetailService[0].reviews![index].rating!.toDouble(), + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon(Icons.star, color: CustomColors.accentColor,), + half: Icon(Icons.star_half, color: CustomColors.accentColor,), + empty: Icon(Icons.star, color: CustomColors.accentColor,), + ), + tapOnlyMode: true, + unratedColor: Colors.grey[500], + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + ))]) + , + ), + + + + Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Text( + previousModel! + .productDetailService[0].reviews![index].replyText, + style: TextStyle(fontSize: 20), + ), + ), + ), + SizedBox( + height: 50, + ), + Divider(height: 1, color: Colors.grey), + + ])); + }, + ) + : Container( + padding: EdgeInsets.fromLTRB(15,15,15,20), + margin: EdgeInsets.only(bottom: 40), + alignment: Alignment.center, + child: Text( + TranslationBase.of(context).noReviewsAvailable, + ), +// Text('No Reviews Available'), + ); + } +} diff --git a/lib/pages/pharmacies/screens/product-details/shared/custom-divider.dart b/lib/pages/pharmacies/screens/product-details/shared/custom-divider.dart new file mode 100644 index 00000000..3bb6a047 --- /dev/null +++ b/lib/pages/pharmacies/screens/product-details/shared/custom-divider.dart @@ -0,0 +1,19 @@ +import 'package:flutter/material.dart'; + +class CustomDivider extends StatelessWidget { + const CustomDivider({ + Key? key, + this.color, + }) : super(key: key); + + final Color? color; + + @override + Widget build(BuildContext context) { + return Container( + width: 120, + height: 2, + color: color, + ); + } +} \ No newline at end of file diff --git a/lib/pages/pharmacies/screens/product-details/shared/icon_with_bg.dart b/lib/pages/pharmacies/screens/product-details/shared/icon_with_bg.dart new file mode 100644 index 00000000..de97f3fb --- /dev/null +++ b/lib/pages/pharmacies/screens/product-details/shared/icon_with_bg.dart @@ -0,0 +1,44 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class IconWithBg extends StatelessWidget { + final IconData? icon; + final Color? color; + final VoidCallback? onPress; + final bool hasPadding; + + IconWithBg( + {Key? key, this.icon, this.color, this.onPress, this.hasPadding = false}) + : super(key: key); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Container( + width: 40, + height: 40, + decoration: BoxDecoration( + color: Colors.grey[200], + borderRadius: BorderRadius.circular(30), + ), + child: Center( + child: Padding( + padding: EdgeInsets.only( + left: !projectViewModel.isArabic ? (hasPadding ? 4 : 0) : 0, + right: projectViewModel.isArabic ? (hasPadding ? 4 : 0) : 0 + ), + child: IconButton( + icon: Icon( + icon, + size: 20, + ), + color: color, + onPressed: () async { + onPress!(); + }, + ), + ), + )); + } +} diff --git a/lib/pages/pharmacies/screens/product-details/shared/product_details_app_bar.dart b/lib/pages/pharmacies/screens/product-details/shared/product_details_app_bar.dart new file mode 100644 index 00000000..afb2cd3a --- /dev/null +++ b/lib/pages/pharmacies/screens/product-details/shared/product_details_app_bar.dart @@ -0,0 +1,210 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:provider/provider.dart'; + +import '../../../../../locator.dart'; +import '../../../compare-list.dart'; +import 'icon_with_bg.dart'; + +class ProductAppBar extends StatelessWidget implements PreferredSizeWidget { + final PharmacyProduct? product; + + final ProductDetailViewModel? model; + final VoidCallback? addToWishlistFunction; + final VoidCallback? deleteFromWishlistFunction; + final int? quantity; + final bool? isInWishList; + final Function? addToCartFunction; + + ProductAppBar( + {Key? key, + this.product, + this.model, + this.addToWishlistFunction, + this.quantity, + this.deleteFromWishlistFunction, + this.isInWishList, + this.addToCartFunction}) + : super(key: key); + + AuthenticatedUserObject authenticatedUserObject = + locator(); + + @override + Widget build(BuildContext context) { + OrderPreviewViewModel orderPreviewViewModel = Provider.of(context); + return Container( + color: Colors.white, + child: FractionallySizedBox( + widthFactor: 0.95, + child: Column( + children: [ + SizedBox( + height: 30, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + IconWithBg( + icon: Icons.arrow_back_ios, + hasPadding: true, + color: Color(0xFF2B353E), + onPress: () { + Navigator.pop(context); + }, + ), + ], + ), + if (authenticatedUserObject.isLogin) + Row( + children: [ + Stack( + children: [ + IconWithBg( + icon: Icons.shopping_cart, + color: Color(0xFF2B353E), + onPress: () { + Navigator.pushAndRemoveUntil( + locator() + .navigatorKey + .currentContext!, + MaterialPageRoute( + builder: (context) => + LandingPagePharmacy(currentTab: 3)), + (Route r) => false); + // Navigator.push( + // context, + // MaterialPageRoute(builder: (context) => CartOrderPage()), + // ); + }), + if (Provider.of(context, + listen: false) + .cartResponse + .quantityCount != + 0) + Positioned( + top: 0, + right: -1.0, + child: Container( + decoration: BoxDecoration( + color: Colors.red[800], + borderRadius: BorderRadius.circular(15), + ), + padding: EdgeInsets.only(left: 5, right: 4.5), + height: 18, + child: Center( + child: Texts( + Provider.of(context, + listen: false) + .cartResponse + .quantityCount + .toString(), + style: "caption", + // medium: true, + color: Colors.white, + )), + ), + ) + ], + ), + SizedBox( + width: 10, + ), + IconWithBg( + icon: FontAwesomeIcons.ellipsisV, + color: Color(0xFF2B353E), + onPress: () { + settingModalBottomSheet(context); + }, + ), + ], + ) + ], + ), + ], + ), + ), + ); + } + + @override + Size get preferredSize => Size(double.maxFinite, 50); + + settingModalBottomSheet(context) { + showModalBottomSheet( + context: context, + builder: (BuildContext bc) { + return Container( + child: new Wrap( + children: [ + if (product!.stockAvailability! != 'Out of stock' && product!.isRx! != true) + new ListTile( + leading: Icon(Icons.shopping_cart), + title: Text( + TranslationBase.of(context).addToCart, + ), + onTap: () async { + if (quantity! > 0) { + { + addToCartFunction!( + quantity: quantity!, + itemID: itemID!, + model: model!); + + Navigator.of(context).pop(); + } + } else { + AppToast.showErrorToast( + message: TranslationBase.of(context).addQuantity + // "you should add quantity" + ); + } + }), + ListTile( + leading: Icon( + !isInWishList! ? Icons.favorite_border : Icons.favorite, + color: !isInWishList! ? Colors.white : Colors.red[800], + ), + title: Text( + isInWishList! + ? TranslationBase.of(context).removeFromWishlist + : TranslationBase.of(context).addToWishlist, + ), + onTap: () async { + if (isInWishList!) + deleteFromWishlistFunction!(); + else + addToWishlistFunction!(); + Navigator.of(context).pop(); + }), + ListTile( + leading: Icon(Icons.compare), + title: Text( + TranslationBase.of(context).compare, + ), + onTap: () { + Provider.of(context, listen: false) + .addItem(specificationData, context); + Navigator.of(context).pop(); + }, + ), + ], + ), + ); + }); + } +} diff --git a/lib/pages/pharmacies/screens/recommended-product-page.dart b/lib/pages/pharmacies/screens/recommended-product-page.dart new file mode 100644 index 00000000..d8b488c2 --- /dev/null +++ b/lib/pages/pharmacies/screens/recommended-product-page.dart @@ -0,0 +1,546 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:flutter/material.dart'; + +dynamic languageID; +bool isInWishlist = false; +int price = 0; +var itemID; +var product; +var customerId; + +class RecommendedProductPage extends StatefulWidget { + String? productId ; + RecommendedProductPage({this.productId}); + + @override + _RecommendedProductPageState createState() => _RecommendedProductPageState(productId: productId!); +} + +class _RecommendedProductPageState extends State + with SingleTickerProviderStateMixin { + List recommendedProductList = []; + late String? productId; + _RecommendedProductPageState({this.productId}); + String id = ""; + bool styleOne = true; + bool styleTwo = false; + Icon styleIcon = Icon( + Icons.widgets_sharp, + color: Colors.blue, + size: 29.0, + ); + + getLanguageID() async { + languageID = await sharedPref.getString(APP_LANGUAGE); + } + + // String productId = "4561"; + // String productId = ""; + + @override + void initState() { + checkWishlist(); + userInfo(id, product); + print("-------------this--------------"); + print(itemID); + } + + @override + Widget build(BuildContext context) { + var size = MediaQuery.of(context).size; + final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.80) / 2; + final double itemWidth = size.width / 2; + return Container(); +// BaseView( +// onModelReady: (model) => model.getRecommendedProducts(productId), +// builder: (_, model, wi) => AppScaffold( +// appBarTitle: TranslationBase.of(context).recommended, +// baseViewModel: model, +// isShowAppBar: true, +// isPharmacy: true, +// backgroundColor: Colors.white, +// body: SingleChildScrollView( +// child: Column(children: [ +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Row( +// mainAxisAlignment: MainAxisAlignment.start, +// children: [ +// Container( +// padding: EdgeInsets.only( +// top: 8, +// bottom: 10, +// left: 10, +// ), +// child: Text( +// model.recommendedProductList.length.toString(), +// style: TextStyle( +// color: Colors.black, +// fontSize: 14.0, +// ), +// ), +// ), +// Container( +// padding: EdgeInsets.only(top: 8, bottom: 10, left: 8), +// child: Text( +// TranslationBase.of(context).result, +// style: TextStyle( +// color: Colors.black, +// fontSize: 14.0, +// ), +// ), +// ), +// ], +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.end, +// children: [ +// Padding( +// padding: const EdgeInsets.symmetric(vertical: 8), +// child: SizedBox( +// child: Container( +// width: 1, +// color: Colors.grey, +// ), +// ), +// ), +// Container( +// child: Image.asset( +// 'assets/images/pharmacy/sort.png', +// width: 20, +// height: 20, +//// color: Colors.red, +// ), +// ), +// Container( +// child: Text( +// TranslationBase.of(context).sort, +// style: TextStyle( +// color: Colors.black, +// fontSize: 14.0, +// ), +// ), +// ), +// Padding( +// padding: const EdgeInsets.symmetric(vertical: 8), +// child: SizedBox( +// child: Container( +// width: 1, +// color: Colors.grey, +// ), +// ), +// ), +// Divider( +// thickness: 1.0, +// color: Colors.black12, +// ), +// Padding( +// padding: EdgeInsets.all(8.0), +// child: InkWell( +// child: styleIcon, +// onTap: () { +// setState(() { +// if (styleOne == true) { +// styleOne = false; +// styleTwo = true; +// styleIcon = Icon( +// Icons.auto_awesome_mosaic, +// color: Colors.blue, +// size: 29.0, +// ); +// } else { +// styleOne = true; +// styleTwo = false; +// styleIcon = Icon( +// Icons.widgets_sharp, +// color: Colors.blue, +// size: 29.0, +// ); +// } +// }); +// }, +// ), +// ), +// ], +// ), +// ]), +// SizedBox( +// height: 2, +// ), +// Divider( +// color: Colors.grey[350], +// height: 10, +// thickness: 6, +// indent: 0, +// endIndent: 0, +// ), +// styleOne == true +// ? Container( +// margin: EdgeInsets.all(5.0), +// child: model.recommendedProductList.length != null +// ? CustomScrollView( +// primary: false, +// shrinkWrap: true, +// physics: NeverScrollableScrollPhysics(), +// slivers: [ +// SliverPadding( +// padding: const EdgeInsets.fromLTRB(0, 0, 0, 0), +// sliver: SliverGrid.count( +// crossAxisCount: 2, +// childAspectRatio: (itemWidth / itemHeight), +// children: model.recommendedProductList +// .map((e) => Card( +// elevation: 2, +// shape: RoundedRectangleBorder( +// side: BorderSide( +// color: Colors.grey[300], +// width: 2), +// borderRadius: +// BorderRadius.circular( +// 10)), +// margin: EdgeInsets.symmetric( +// horizontal: 8, +// vertical: 11, +// ), +// child: Container( +// decoration: BoxDecoration( +// borderRadius: +// BorderRadius.all( +// Radius.circular(15), +// ), +// ), +// padding: EdgeInsets.symmetric( +// horizontal: 4), +// width: MediaQuery.of(context) +// .size.width / 3, +//// +// child: Column( +// crossAxisAlignment: +// CrossAxisAlignment +// .start, +// children: [ +// Stack(children: [ +// Container( +// child: Align( +// alignment: Alignment.topRight, +// child: itemID.contains(e.id) +// // !isInWishlist +// ? IconButton(icon: Icon(Icons.favorite_border), +// color: Colors.grey, iconSize: 30, +// onPressed: +// () { +// setState(() {addToWishlistFunction(itemID); +// }); +// }, +// ) +// : IconButton(icon: Icon(Icons.favorite), +// color: Colors.red, iconSize: 30, +// onPressed: +// () {setState(() { +// deleteFromWishlistFunction(itemID); +// }); +// }, +// ) +//// +// ), +// ), +// Container(margin: EdgeInsets.fromLTRB(0, 16, 10, 16), +// alignment: Alignment.center, +//// padding: EdgeInsets.only(left: 25, bottom: 20), +// child: (e.images != null && e.images.length > 0) +// ? Image.network(e.images[0].src.toString(), +//// item.images[0].src, +// fit: BoxFit.cover, height: 60,) +// : Image.asset("assets/images/no_image.png", fit: BoxFit.cover, height: 60, +// ), +// ), +// Container(width: e.rxMessage != null ? MediaQuery.of(context) +// .size.width / 5 : 0, +// padding: EdgeInsets.all(4), +// decoration: BoxDecoration( +// color: Color(0xffb23838), +// borderRadius: BorderRadius.only(topLeft: Radius.circular(6)), +// ), +// child: Texts(e.rxMessage != null ? e.rxMessage : "", +// color: Colors.white, +// regular: true, +// fontSize: 10, +// fontWeight: FontWeight.w400, +// ), +// ), +// ]), +// Container( +// margin: EdgeInsets +// .symmetric(horizontal: 6, vertical: 0, +// ), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// languageID == "ar" ? e.namen : e.name, +// style: TextStyle( +// color: Colors.black, fontSize: 13.0, +//// fontWeight: FontWeight.bold, +// ), +// ), +// Padding( +//// padding: const EdgeInsets.only(top: 15, bottom: 10), +// padding: const EdgeInsets.only(top: 10, bottom: 5), +// child: Texts("SAR ${e.price}", +// bold: true, fontSize: 14, +// ), +// ), +// ], +// ), +// ), +// Row( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Container( +// padding: EdgeInsets.only(right: 10), +//// margin: EdgeInsets.only(left: 5), +// child: Align(alignment: Alignment.topLeft, +// child: RatingBar.readOnly(initialRating: e.approvedRatingSum.toDouble(), +//// initialRating: productRate, +// size: 13.0, filledColor: Colors.yellow[700], +// emptyColor: Colors.grey[500], +// isHalfAllowed: true, +// halfFilledIcon: Icons.star_half, +// filledIcon: Icons.star, +// emptyIcon: Icons.star, +// ), +// ), +// ), +// Texts("(${e.approvedTotalReviews.toString()})", +//// bold: true, +// fontSize: 12, +// ), +// ]), +// ], +// ), +// ), +// ) +// +// ) +// .toList(), +// +// ), +// ), +// ]) +// : Container(), +// ) +// : Container( +// height: model.recommendedProductList.length > 0 +// ? MediaQuery.of(context).size.height * 0.60 +// : 0, +// child: ListView.builder( +// physics: ScrollPhysics(), +//// physics: NeverScrollableScrollPhysics(), +// itemCount: model.recommendedProductList.length, +// itemBuilder: (context, index) { +// return Card( +// elevation: 2, +// shape: RoundedRectangleBorder( +// side: BorderSide(color: Colors.grey[300], width: 2), +// borderRadius: BorderRadius.circular(10)), +//// +// margin: EdgeInsets.symmetric( +// horizontal: 8, +// vertical: 4, +// ), +// child: Container( +// decoration: BoxDecoration( +// borderRadius: BorderRadius.all( +// Radius.circular(15), +// ), +// ), +// padding: EdgeInsets.symmetric(horizontal: 5), +// width: MediaQuery.of(context).size.width / 3, +//// +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Stack(children: [ +// Container( +// child: Align( +// alignment: Alignment.topRight, +// child: //true +// //wishlistVar[index].id.contains(model.recommendedProductList[index].id) +// !isInWishlist +// ? IconButton( +// icon: Icon(Icons.favorite_border), +// color: Colors.grey, +// iconSize: 30, +// onPressed: () { +// setState(() { +// addToWishlistFunction(itemID); +// }); +// }, +// ) +// : IconButton( +// icon: Icon(Icons.favorite), +// color: Colors.red, +// iconSize: 30, +// onPressed: () { +// setState(() { +// deleteFromWishlistFunction(itemID); +// }); +// }, +// ) +//// +// ), +// ), +// Container( +// margin: EdgeInsets.fromLTRB(0, 16, 10, 16), +// alignment: Alignment.center, +//// padding: EdgeInsets.only(left: 25, bottom: 20), +// child: (model.recommendedProductList[index].images != null && +// model.recommendedProductList[index].images.length > 0) +// ? Image.network(model.recommendedProductList[index].images[0].src.toString(), +//// item.images[0].src, +// fit: BoxFit.cover, +// height: 60, +// ) +// : Image.asset("assets/images/no_image.png", +// fit: BoxFit.cover, +// height: 60, +// ), +// ), +// Container( +// width: model.recommendedProductList[index].rxMessage != null +// ? MediaQuery.of(context).size.width / 5 +// : 0, +// padding: EdgeInsets.all(4), +// decoration: BoxDecoration( +// color: Color(0xffb23838), +// borderRadius: BorderRadius.only( +// topLeft: Radius.circular(6)), +// ), +// child: Texts( +// model.recommendedProductList[index].rxMessage != null +// ? model.recommendedProductList[index].rxMessage +// : "", +// color: Colors.white, +// regular: true, +// fontSize: 10, +// fontWeight: FontWeight.w400, +// ), +// ), +// ]), +// Container( +// margin: EdgeInsets.symmetric( +// horizontal: 6, +// vertical: 2, +// ), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text(model.recommendedProductList[index].name, +// style: TextStyle( +// color: Colors.black, +// fontSize: 13.0, +//// fontWeight: FontWeight.bold, +// ), +// ), +// Padding( +//// padding: const EdgeInsets.only(top: 15, bottom: 10), +// padding: const EdgeInsets.only( +// top: 10, bottom: 5), +// child: Texts( +// "SAR ${model.recommendedProductList[index].price}", +// bold: true, +// fontSize: 14, +// ), +// ), +// ], +// ), +// ), +// Row( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Container( +// padding: EdgeInsets.only( +// right: 10, bottom: 10), +//// margin: EdgeInsets.only(left: 5), +// child: Align( +// alignment: Alignment.topLeft, +// child: RatingBar.readOnly( +// initialRating: model.recommendedProductList[index].approvedRatingSum.toDouble(), +//// initialRating: productRate, +// size: 13.0, +// filledColor: Colors.yellow[700], +// emptyColor: Colors.grey[500], +// isHalfAllowed: true, +// halfFilledIcon: Icons.star_half, +// filledIcon: Icons.star, +// emptyIcon: Icons.star, +// ), +// ), +// ), +// Texts( +// "(${model.recommendedProductList[index].approvedTotalReviews.toString()})", +//// bold: true, +// fontSize: 12, +// ), +// ]), +// ], +// ), +// ), +// ); +// +// }), +// ), +// ]), +// ), +// ), +// ); + } + checkWishlist() async { + ProductDetailViewModel x = new ProductDetailViewModel(); + await x.checkWishlistData(); + for (int i = 0; i < x.wishListItems.length; i++) { + // itemID = x.wishListItems[i].id; + print("-------------wishlist---------------"); + print(itemID); +// print(product.id); + print(x.wishListItems[i].productId); + if (itemID == x.wishListItems[i].productId) { + isInWishlist = true; +// print('in wishlist'); + break; + } else { + isInWishlist = false; +// print('not in wishlist'); + } + } + } + + Future userInfo(id, product) async { + customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + if (customerId != null) { + itemID = id; + product = product; + checkWishlist(); + } + print("customerId:$customerId"); + return customerId; + } + + + addToWishlistFunction(itemID) async { + ProductDetailViewModel x = new ProductDetailViewModel(); + isInWishlist = true; + await x.addToWishlistData(itemID, context); + } + + deleteFromWishlistFunction(itemID) async { + ProductDetailViewModel x = new ProductDetailViewModel(); + isInWishlist = false; + await x.addToWishlistData(itemID, context); + } +} + diff --git a/lib/pages/pharmacies/search_brands_page.dart b/lib/pages/pharmacies/search_brands_page.dart new file mode 100644 index 00000000..44e261d6 --- /dev/null +++ b/lib/pages/pharmacies/search_brands_page.dart @@ -0,0 +1,150 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/brand_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.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/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:provider/provider.dart'; + +import '../Blood/new_text_Field.dart'; + +class SearchBrandsPage extends StatefulWidget { + @override + _SearchBrandsPageState createState() => _SearchBrandsPageState(); +} + +class _SearchBrandsPageState extends State { + final textController = TextEditingController(); + final _formKey = GlobalKey(); + String msg = ''; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + return BaseView( + onModelReady: (model) => model!.searchProducts(productName: ''), + builder: (BuildContext context, model, Widget? child) => + PharmacyAppScaffold( + appBarTitle: TranslationBase.of(context).search, + isBottomBar: false, + isShowAppBar: true, + backgroundColor: Colors.white, + isShowDecPage: false, + //baseViewModel: model, + body: SingleChildScrollView( + child: Container( + height: SizeConfig.screenHeight, + child: Column( + children: [ + Padding( + padding: EdgeInsets.all(8.0), + child: Row( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.79, + child: Form( + key: _formKey, + child: NewTextFields( + autoFocus: true, + hintText: TranslationBase.of(context).search, + fontSize: 19.0, + prefixIcon: Icon(Icons.search), + inputAction: TextInputAction.search, + onSaved: (value) { + //searchMedicine(model, context); + }, + onSubmit: (value) { + searchMedicine(model, context); + msg = TranslationBase.of(context).noSearchResultFound; + }, + controller: textController, +// validator: (value) { +// if (value.isEmpty) { +// return 'please Enter Product Name'; +// } +// return null; +// }, + ), + ), + ), + SizedBox( + width: 10.0, + ), + InkWell( + child: Texts( + TranslationBase.of(context).cancel, + fontSize: 17.0, + fontWeight: FontWeight.w500, + ), + onTap: () { + Navigator.pop(context); + }, + ), + + // child: Container( + // child: Button( + // backgroundColor: Colors.green, + // loading: model.state == ViewState.BusyLocal, + // label: 'Search', + // onTap: () { + // searchMedicine(model, context); + // }), + // width: MediaQuery.of(context).size.width * 0.09, + // ), + ], + ), + ), + model.searchList.length == 0 + ? Container( + child: Text( + TranslationBase.of(context).noData + model.searchList.length.toString()), + ) + : Expanded( + child: Container( + child: ListView.builder( + itemCount: model.searchList.length, + itemBuilder: (BuildContext ctx, index) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Text( projectProvider.isArabic! + ? model.searchList[index].namen! + :model.searchList[index].name!, + style: TextStyle(fontSize: 20), + ), + ), + ), + Divider(height: 1, color: Colors.grey) + ], + ), + ); + }, + ), + ), + ), + ], + ), + ), + ), + ), + ); + } + + searchMedicine(model, BuildContext context) { + Utils.hideKeyboard(context); + if (_formKey.currentState!.validate()) + model.searchProducts(productName: textController.text); + } +} diff --git a/lib/pages/pharmacies/widgets/ProductOrderItem.dart b/lib/pages/pharmacies/widgets/ProductOrderItem.dart new file mode 100644 index 00000000..6a22cc84 --- /dev/null +++ b/lib/pages/pharmacies/widgets/ProductOrderItem.dart @@ -0,0 +1,269 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCart.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:provider/provider.dart'; + +class ProductOrderItem extends StatefulWidget { + final ShoppingCart? item; + final VoidCallback? changeCartItems; + final VoidCallback? deleteCartItems; + final OrderPreviewViewModel? model; + + ProductOrderItem( + {this.item, this.changeCartItems, this.deleteCartItems, this.model}); + + @override + _ProductOrderItemState createState() => _ProductOrderItemState(); +} + +class _ProductOrderItemState extends State { + TextEditingController _quantityController = new TextEditingController(); + String _totalPrice = "0"; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + _quantityController.text = "${widget.item!.quantity!}"; + _totalPrice = + "${(widget.item!.product!.price! * widget.item!.quantity!).toStringAsFixed(2)}"; + ProjectViewModel projectProvider = Provider.of(context); + + return Column( + children: [ + ListTile( + leading: InkWell( + onTap: () => {widget.deleteCartItems!()}, + child: Icon( + FontAwesomeIcons.trashAlt, + size: 15, + color: Colors.grey.shade700, + ), + ), + title: Container( + child: Row( +// widget.item.product.stock_quantity===0 + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + (widget.item!.product!.images! != null && + widget.item!.product!.images!.length > 0) + ? Image.network( + widget!.item!.product!.images![0]!.src!, + fit: BoxFit.cover, + height: 80, + ) + : Image.asset( + "assets/images/no_image.png", + fit: BoxFit.cover, + height: 80, + ), + Expanded( + child: Container( + margin: + const EdgeInsets.symmetric(vertical: 8, horizontal: 8), + child: Container( + child: Column( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: Texts( + projectProvider.isArabic + ? widget.item!.product!.namen! + : "${widget.item!.product!.name!}", + regular: true, + textAlign: TextAlign.justify, + fontSize: 12, + fontWeight: FontWeight.w400, + ), + margin: const EdgeInsets.only(bottom: 4), + ), + Container( + child: Texts( + "${(widget.item!.product!.price!).toStringAsFixed(2)} ${projectProvider.isArabic ? widget.item!.currencyn! : widget.item!.currency}", + fontSize: 14, + fontWeight: FontWeight.bold, + ), + margin: const EdgeInsets.only(bottom: 4), + ), + Container( + margin: EdgeInsets.symmetric(vertical: 4), + child: Row( + children: [ + InkWell( + onTap: () => + {_quantityOnChangeClick(Operation.dec)}, + child: Container( + width: 25, + height: 25, + child: Icon( + Icons.remove, + color: Colors.grey.shade400, + size: 20, + ), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey.shade400, + width: 1.0, + ), + ), + ), + ), + Container( + margin: + const EdgeInsets.symmetric(horizontal: 4), + width: 25, + height: 25, + color: Colors.grey.shade300, + child: Center( + child: TextField( + cursorColor: Colors.black, + keyboardType: TextInputType.number, + controller: _quantityController, + textAlign: TextAlign.center, + onChanged: (text) { + setState(() { + var value = int.tryParse(text); + if (value == null) { + widget!.item!.quantity = 0; + } else { + widget.item!.quantity = + int.parse(text); + } + _totalPrice = + "${(widget.item!.product!.price! * widget.item!.quantity!).toStringAsFixed(2)}"; + }); + }, + )), + ), + InkWell( + onTap: () => + {_quantityOnChangeClick(Operation.inc)}, + child: Container( + width: 25, + height: 25, + child: Icon( + Icons.add, + color: Colors.grey.shade400, + size: 20, + ), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey.shade400, + width: 1.0, + ), + ), + ), + ), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Texts( + TranslationBase.of(context).total, + color: Colors.grey.shade500, + fontWeight: FontWeight.bold, + fontSize: 12, + ), + Texts( + "$_totalPrice ${projectProvider.isArabic ? widget.item!.currencyn! : widget.item!.currency!}", + fontSize: 12, + fontWeight: FontWeight.bold, + ), + widget.item!.product!.stockQuantity == 0 + ? Texts( + projectProvider.isArabic + ? widget.item!.product! + .stockAvailabilityn! + : widget.item!.product! + .stockAvailability, + fontWeight: FontWeight.normal, + fontSize: 13, + color: Colors.red, + ) + : Texts(""), + ], + ), + ), + ], + ), + ) + ], + ), + ), + ), + ) + ], + ), + ), + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 15, + thickness: 1, + indent: 0, + endIndent: 0, + ), + ], + ); + } + + _quantityOnChangeClick(Operation operation) { + int newValue = 0; + setState(() async { + switch (operation) { + case Operation.inc: + { + newValue = widget.item!.quantity! + 1; + } + break; + + case Operation.dec: + { + newValue = widget.item!.quantity! - 1; + } + break; + default: + { + //statements; + } + break; + } + if (newValue > 0) { + widget.item!.quantity = newValue; + widget!.changeCartItems!(); + if (widget.model!.state == ViewState.ErrorLocal) { + if (operation == Operation.dec) { + newValue = widget.item!.quantity! + 1; + } else { + newValue = widget.item!.quantity! - 1; + } + widget.item!.quantity = newValue; + } + _quantityController.text = "${widget.item!.quantity!}"; + _totalPrice = + "${(widget.item!.product!.price! * widget.item!.quantity!).toStringAsFixed(2)}"; + } + }); + } + + @override + void dispose() { + // Clean up the controller when the widget is removed from the + // widget tree. + _quantityController.dispose(); + super.dispose(); + } +} + +enum Operation { inc, dec } diff --git a/lib/pages/pharmacies/widgets/ProductOrderPreviewItem.dart b/lib/pages/pharmacies/widgets/ProductOrderPreviewItem.dart new file mode 100644 index 00000000..6977a1a8 --- /dev/null +++ b/lib/pages/pharmacies/widgets/ProductOrderPreviewItem.dart @@ -0,0 +1,111 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/ShoppingCart.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class ProductOrderPreviewItem extends StatelessWidget { + final ShoppingCart item; + + ProductOrderPreviewItem(this.item); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + + return Container( + margin: EdgeInsets.only(top: 16), + child: Column( + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + (item.product!.images != null && item.product!.images!.length > 0) + ? Image.network( + item.product!.images![0].src!, + fit: BoxFit.cover, + height: 80, + ) + : Image.asset( + "assets/images/no_image.png", + fit: BoxFit.cover, + height: 80, + ), + Expanded( + child: Container( + margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 8), + child: Container( + child: Column( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: Texts( + projectProvider.isArabic + ? item.product!.namen + : item.product!.name, + regular: true, + textAlign: TextAlign.justify, + fontSize: 12, + fontWeight: FontWeight.w400, + ), + margin: const EdgeInsets.only(bottom: 4), + ), + Container( + child: Texts( + "${(item.product!.price)!.toStringAsFixed(2)} ${projectProvider.isArabic ? item.currencyn : item.currency}", + fontSize: 14, + fontWeight: FontWeight.bold, + ), + margin: const EdgeInsets.only(bottom: 4), + ), + Container( + width: double.infinity, + alignment: Alignment.centerRight, + child: Texts( + TranslationBase.of(context).total, + color: Colors.grey.shade700, + fontWeight: FontWeight.bold, + fontSize: 13, + ), + ), + Row( + children: [ + Texts( + "QTY: ${item.quantity}", + color: Colors.grey.shade500, + fontWeight: FontWeight.bold, + fontSize: 12, + ), + Expanded( + child: Container( + alignment: Alignment.centerRight, + child: Texts( + "${(item.product!.price! * item.quantity!).toStringAsFixed(2)} ${projectProvider.isArabic ? item.currencyn : item.currency}", + fontSize: 14, + fontWeight: FontWeight.bold, + ), + ), + ) + ], + ), + ], + ), + ), + )), + ], + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 0, + thickness: 1, + indent: 0, + endIndent: 0, + ), + ], + ), + ); + } +} diff --git a/lib/pages/pharmacies/widgets/ProductTileItem.dart b/lib/pages/pharmacies/widgets/ProductTileItem.dart new file mode 100644 index 00000000..9e303152 --- /dev/null +++ b/lib/pages/pharmacies/widgets/ProductTileItem.dart @@ -0,0 +1,348 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/shared/icon_with_bg.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:provider/provider.dart'; + +import 'dart:math' as math; + +class ProductTileItem extends StatelessWidget { + final AppSharedPreferences sharedPref = AppSharedPreferences(); + final PharmacyProduct item; + final double itemHeight; + + ProductTileItem(this.item, this.itemHeight); + + void productOnClick(BuildContext ctx) { + _saveLastVisitProducts(); + Navigator.push(ctx, FadePage(page: ProductDetailPage(item))); + } + + void _saveLastVisitProducts() async { + String lastVisited = ""; + bool isIdExist = false; + List items = []; + if (await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS) != + null) { + lastVisited = + await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS); + lastVisited.split(",").forEach((id) { + if (id == item.id) { + isIdExist = true; + } + items.add(id); + }); + } + + if (items.length >= 15) { + items.removeAt(0); + // lastVisited = lastVisited.replaceFirst(RegExp('$itemToRemove'), ''); + } + + lastVisited = ""; + for (int i = items.length - 1; i >= 0; i--) { + if (lastVisited == "") { + // it means there is no lastVisited yet + lastVisited = "${items[i]}"; + } else { + // there is lastVisited id's and this product id is not found + lastVisited += ",${items[i]}"; + } + } + + if (!isIdExist) { + if (lastVisited == "") { + // it means there is no lastVisited yet + lastVisited = "${item.id}"; + } else { + // there is lastVisited id's and this product id is not found + lastVisited += ",${item.id}"; + } + } + sharedPref.setString(PHARMACY_LAST_VISITED_PRODUCTS, lastVisited); + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + return InkWell( + onTap: () => productOnClick(context), + child: Container( + margin: EdgeInsets.all(7), + decoration: BoxDecoration( + border: Border.all(color: Colors.grey.shade300, width: 0.2), + borderRadius: BorderRadius.circular(10), + color: Colors.white, + shape: BoxShape.rectangle, + boxShadow: [ + BoxShadow( + color: Color(0xffF1F1F1), + spreadRadius: 4, + blurRadius: 5.5, + offset: Offset(0, 3), // changes position of shadow + ), + ], + ), + padding: EdgeInsets.symmetric(horizontal: 4), + width: MediaQuery.of(context).size.width / 2.8, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Stack( + // children: [ + // Container( + // margin: EdgeInsets.fromLTRB(0, 0, 0, 0), + // alignment: Alignment.center, + // child: (item.images != null && item.images.length > 0) + // ? Image.network( + // item.images[0].src, + // fit: BoxFit.cover, + // height: itemHeight / 2, + // ) + // : Image.asset( + // "assets/images/no_image.png", + // fit: BoxFit.cover, + // height: itemHeight / 2, + // ), + // ), + // ], + // ), + + Container( + width: double.infinity, + height: MediaQuery.of(context).size.width * 0.3, + padding: + EdgeInsets.only(left: 10, right: 10, top: 7, bottom: 3.5), + color: Colors.white, + child: Container( + width: double.infinity, + height: double.infinity, + clipBehavior: Clip.antiAlias, + decoration: containerRadiusWithGradientServices(0.0, + prescriptionRequired: item.rxMessage != null, + isProduct: true, + isEnglish: !projectProvider.isArabic, + lightColor: Colors.transparent, + darkColor: Colors.transparent), + child: Stack( + children: [ + Stack( + children: [ + Container( + decoration: BoxDecoration( + border: Border.all( + color: Color(0xffF0F0F0), width: 1.0), + borderRadius: BorderRadius.only( + topRight: Radius.circular( + item.rxMessage != null && + projectProvider.isArabic + ? 20 + : 8), + bottomLeft: Radius.circular(8), + bottomRight: Radius.circular(8), + topLeft: Radius.circular(item.rxMessage != null && + !projectProvider.isArabic + ? 20 + : 8), + ), + ), + margin: EdgeInsets.fromLTRB(0, 0, 0, 0), + alignment: Alignment.center, + child: (item.images != null && item.images!.length > 0) + ? Padding( + padding: EdgeInsets.all(12.0), + child: Image.network( + item.images![0].src!, + fit: BoxFit.cover, + height: itemHeight / 2, + ), + ) + : Padding( + padding: EdgeInsets.all(8.0), + child: Image.asset( + "assets/images/no_image.png", + fit: BoxFit.cover, + height: itemHeight / 2, + ), + ), + ), + ], + ), + if (item.rxMessage != null) + projectProvider.isArabic + ? Positioned( + right: -16, + top: 2, + child: Transform.rotate( + angle: math.pi / 4, + child: Container( + color: CustomColors.accentColor, + padding: EdgeInsets.only( + left: 18, right: 18, top: 6, bottom: 3), + child: Padding( + padding: EdgeInsets.all(2.0), + child: Text( + "الوصفة\n مطلوبة", + style: TextStyle( + color: Colors.white, + fontSize: 7.0, + height: 0.8, + fontWeight: FontWeight.w600, + letterSpacing: -0.27, + ), + ), + ), + ), + ), + ) + : Positioned( + left: -24, + top: 2, + child: Transform.rotate( + angle: -math.pi / 4, + child: Container( + padding: EdgeInsets.only( + left: 18, right: 18, top: 6, bottom: 3), + color: CustomColors.accentColor, + child: Text( + "\n E-Prescription \n Is required", + style: TextStyle( + color: Colors.white, + fontSize: 7.0, + //letterSpacing: -0.27, + height: 1.2, + fontWeight: FontWeight.w600, + ), + ), + ), + ), + ), + ], + ), + ), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Container( + height: MediaQuery.of(context).size.height * 0.075, + child: Texts( + projectProvider.isArabic ? item.namen : item.name, + //regular: true, + fontSize: 10, + color: Color(0xff2B353E), + fontWeight: FontWeight.w600, + ), + ), + ), + SizedBox( + height: 7.0, + ), + Expanded( + child: Container( + margin: EdgeInsets.symmetric( + horizontal: 4, + vertical: 0, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + //mainAxisAlignment: MainAxisAlignment.end, + children: [ + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 2), + child: Texts( + "SAR ${item.price}", + fontWeight: FontWeight.w700, + fontSize: 11, + color: Color(0xff2B353E), + ), + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 5), + child: Row( + children: [ + // Expanded( + // RatingBar.readOnly( + // initialRating: item.approvedRatingSum.toDouble(), + // size: 13.0, + // filledColor: Color(0XFFD02127), + // emptyColor: Color(0XFFD02127), + // isHalfAllowed: true, + // halfFilledIcon: Icons.star_half, + // filledIcon: Icons.star, + // emptyIcon: Icons.star_border, + // ), + // + // + + RatingBar( + initialRating: item.approvedRatingSum!.toDouble(), + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon(Icons.star, color: CustomColors.accentColor,), + half: Icon(Icons.star_half, color: CustomColors.accentColor,), + empty: Icon(Icons.star, color: CustomColors.accentColor,), + ), + tapOnlyMode: true, + unratedColor: Colors.grey[500], + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + ), + Texts( + "(${item.approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ), + + SizedBox( + width: 9.0, + ), + Icon( + Icons.arrow_forward, + size: 15, + color: Color(0xff2D2F39), + ), + +// StarRating( +// totalAverage: item.approvedTotalReviews > 0 +// ? (item.approvedRatingSum.toDouble() / +// item.approvedTotalReviews.toDouble()) +// .toDouble() +// : 0, +// forceStars: true), + // ), + ], + ), + ), + ], + ), + ), + ), + SizedBox( + height: 1, + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/pharmacies/widgets/home/BannerPager.dart b/lib/pages/pharmacies/widgets/home/BannerPager.dart new file mode 100644 index 00000000..ae9811e0 --- /dev/null +++ b/lib/pages/pharmacies/widgets/home/BannerPager.dart @@ -0,0 +1,123 @@ +import 'package:cached_network_image/cached_network_image.dart'; +// import 'package:carousel_slider/carousel_slider.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/landing/home_page.dart'; +import 'package:diplomaticquarterapp/pages/offers_categorise_page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-activitaion-vida-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-registration-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-main-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/home/GridViewCard.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class BannerPager extends StatefulWidget { + final PharmacyModuleViewModel _model; + + BannerPager(this._model); + + @override + _BannerPagerState createState() => _BannerPagerState(); +} + +class _BannerPagerState extends State { + int _current = 0; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Container( + child: Column( + children: [ + // CarouselSlider( + // options: CarouselOptions( + // aspectRatio: 5 / 2, + // enlargeCenterPage: true, + // enableInfiniteScroll: false, + // viewportFraction: 1.0, + // initialPage: 0, + // autoPlay: true, + // autoPlayInterval: Duration(seconds: 3), + // autoPlayAnimationDuration: Duration(milliseconds: 800), + // autoPlayCurve: Curves.decelerate, + // onPageChanged: (index, reason) { + // setState(() { + // _current = index; + // }); + // }, + // ), + // items: widget._model.getBannerImagesUrl(projectViewModel).mapIndexed( + // (item, index) { + // return InkWell( + // onTap: () { + // bannerNavigator(index); + // }, + // child: Container( + // margin: EdgeInsets.symmetric(horizontal: 1.0), + // child: ClipRRect( + // borderRadius: BorderRadius.all(Radius.circular(5.0)), + // child: Center( + // child: index == 0 || index == 1 + // ? Image.asset( + // item, + // fit: BoxFit.cover, + // ) + // : CachedNetworkImage(imageUrl: item, fit: BoxFit.fitWidth, errorWidget: (context, url, error) => SizedBox()), + // ), + // ), + // ), + // ); + // }, + // ).toList(), + // ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: widget._model + .getBannerImagesUrl(projectViewModel) + .mapIndexed( + (item, index) => Container( + width: 12.0, + height: 4.0, + margin: EdgeInsets.symmetric(vertical: 0.0, horizontal: 2.0), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: _current == index ? Color.fromRGBO(0, 250, 0, 0.9) : Color.fromRGBO(0, 0, 0, 0.4), + ), + ), + ) + .toList(), + ), + ) + ], + )); + } + + bannerNavigator(index){ + switch(index) { + case 1: { + Navigator.push(context, FadePage(page: OffersCategorisePage())); + } + break; + case 2: { + // Navigator.push(context, FadePage(page: LakumActivationVidaPage())); + Navigator.push(context, FadePage(page: LakumMainPage())); + } + break; + case 5: { + Navigator.push(context, FadePage(page: OffersCategorisePage())); + } + break; + + default: { + + } + break; + } + + } +} diff --git a/lib/pages/pharmacies/widgets/home/BestSellerWidget.dart b/lib/pages/pharmacies/widgets/home/BestSellerWidget.dart new file mode 100644 index 00000000..23aa2558 --- /dev/null +++ b/lib/pages/pharmacies/widgets/home/BestSellerWidget.dart @@ -0,0 +1,58 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/BestSellerViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:flutter/material.dart'; + +import '../../../final_products_page.dart'; +import '../ProductTileItem.dart'; +import 'ViewAllHomeWidget.dart'; + +class BestSellerWidget extends StatelessWidget { + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getBestSellerProducts(), + allowAny: true, + builder: (_, model, wi) => NetworkBaseView( + isLocalLoader: true, + baseViewModel: model, + child: Container( + child: Column( + children: [ + ViewAllHomeWidget( + TranslationBase.of(context).bestSellers, + FinalProductsPage( + id: "", + productType: 20, + )), + if (model.state != ViewState.BusyLocal) + Container( + height: MediaQuery.of(context).size.height / 3 + 1, + child: ListView.builder( + itemBuilder: (ctx, i) => ProductTileItem( + model.bestSellerProduct[i], + MediaQuery.of(context).size.height / 4 + 20), + scrollDirection: Axis.horizontal, + itemCount: model.bestSellerProduct.length, + ), + ) + else + Container( + height: 80, + child: Center( + child: CircularProgressIndicator( + backgroundColor: Colors.white, + valueColor: AlwaysStoppedAnimation( + Colors.grey[500]!, + ), + ), + ), + ), + ], + ), + ), + )); + } +} diff --git a/lib/pages/pharmacies/widgets/home/GridViewButtons.dart b/lib/pages/pharmacies/widgets/home/GridViewButtons.dart new file mode 100644 index 00000000..8a549b48 --- /dev/null +++ b/lib/pages/pharmacies/widgets/home/GridViewButtons.dart @@ -0,0 +1,85 @@ +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'package:diplomaticquarterapp/pages/landing/home_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; +import 'package:diplomaticquarterapp/pages/search_products_page.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; + +import '../../../offers_categorise_page.dart'; +import 'GridViewCard.dart'; + +class GridViewButtons extends StatelessWidget { + final PharmacyModuleViewModel model; + + GridViewButtons(this.model); + + @override + Widget build(BuildContext context) { + final gridHeight = (MediaQuery.of(context).size.width * 0.3) * 1.8; + return Container( + child: SizedBox( + height: gridHeight, + child: GridView.count( + childAspectRatio: 2.2, + crossAxisSpacing: 10, + mainAxisSpacing: 10, + controller: new ScrollController(keepScrollOffset: false), + shrinkWrap: true, + padding: const EdgeInsets.all(4.0), + crossAxisCount: 2, + children: [ + DashboardItem( + imageName: 'pharmacy_module/bg_1.png', + hasColorFilter: false, + opacity: 0.8, + child: GridViewCard( + TranslationBase.of(context).offersAndPromotions, + 'assets/images/pharmacy_module/offer_icon.png', () { + Navigator.push(context, FadePage(page: OffersCategorisePage())); + }), + ), + // DashboardItem( + // imageName: 'pharmacy_module/bg_2.png', + // opacity: 0, + // hasColorFilter: false, + // child: GridViewCard(TranslationBase.of(context).medicationRefill, + // 'assets/images/pharmacy_module/medication_icon.png', () { + // Navigator.push( + // context, FadePage(page: HomePrescriptionsPage())); + // + // // model.checkUserIsActivated().then((isActivated) { + // // if (isActivated) { + // // Navigator.push(context, FadePage(page: LakumMainPage())); + // // } else { + // // Navigator.push( + // // context, FadePage(page: LakumActivationVidaPage())); + // // } + // // }); + // }), + // ), + // DashboardItem( + // imageName: 'pharmacy_module/bg_3.png', + // opacity: 0, + // hasColorFilter: false, + // child: GridViewCard(TranslationBase.of(context).myPrescriptions, + // 'assets/images/pharmacy_module/prescription_icon.png', () { + // Navigator.push( + // context, FadePage(page: HomePrescriptionsPage())); + // }), + // ), + // DashboardItem( + // imageName: 'pharmacy_module/bg_4.png', + // opacity: 0, + // hasColorFilter: false, + // child: GridViewCard( + // TranslationBase.of(context).searchAndScanMedication, + // 'assets/images/pharmacy_module/search_scan_icon.png', + // () {Navigator.push(context, FadePage(page: SearchProductsPage()));}), + // ), + ], + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/pages/pharmacies/widgets/home/GridViewCard.dart b/lib/pages/pharmacies/widgets/home/GridViewCard.dart new file mode 100644 index 00000000..b58956af --- /dev/null +++ b/lib/pages/pharmacies/widgets/home/GridViewCard.dart @@ -0,0 +1,84 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.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:flutter/material.dart'; + +class GridViewCard extends StatelessWidget { + final String text; + final String cardImage; + final Function handler; + + GridViewCard(this.text, this.cardImage, this.handler); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(4.0), + child: Container( + child: Row( + children: [ + Expanded( + flex: 2, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 2, + child: Padding( + padding: const EdgeInsets.all(6), + child: Column( + children: [ + Texts( + text, + color: Colors.white, + bold: true, + fontSize: SizeConfig.textMultiplier! * 1.3, + ), + ], + ), + ), + ), + Row( + children: [ + BorderedButton( + TranslationBase.of(context).viewAll, + handler: handler, + tPadding: 0, + textColor: Color(0xFF5ab145), + bPadding: 0, + ), + Expanded(child: Container()), + ], + ), + ], + ), + ), + Expanded( + child: Align( + alignment: Alignment.centerRight, + child: Image.asset( + cardImage, + fit: BoxFit.cover, + ), + ), + ), + ], + ), + ), + ); + } + + String getDate(String date) { + DateTime dateObj = DateUtil.convertStringToDate(date); + return DateUtil.getWeekDay(dateObj.weekday) + + ", " + + dateObj.day.toString() + + " " + + DateUtil.getMonth(dateObj.month) + + " " + + dateObj.year.toString(); + } +} \ No newline at end of file diff --git a/lib/pages/pharmacies/widgets/home/MostViewedWidget.dart b/lib/pages/pharmacies/widgets/home/MostViewedWidget.dart new file mode 100644 index 00000000..7b260ec0 --- /dev/null +++ b/lib/pages/pharmacies/widgets/home/MostViewedWidget.dart @@ -0,0 +1,60 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/MostViewedViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/final_products_page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/ProductTileItem.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/home/ViewAllHomeWidget.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:flutter/material.dart'; + +class MostViewedWidget extends StatelessWidget { + const MostViewedWidget({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getMostViewedProducts(), + allowAny: true, + builder: (_, model, wi) => NetworkBaseView( + isLocalLoader: true, + baseViewModel: model, + child: Container( + child: Column( + children: [ + ViewAllHomeWidget( + TranslationBase.of(context).mostViewed, + FinalProductsPage( + id: "", + productType: 4, + )), + if (model.state != ViewState.BusyLocal) + Container( + height: MediaQuery.of(context).size.height / 3 + 1, + child: ListView.builder( + itemBuilder: (ctx, i) => ProductTileItem( + model.mostViewedProducts[i], + MediaQuery.of(context).size.height / 4 + 20), + scrollDirection: Axis.horizontal, + itemCount: model.mostViewedProducts.length, + ), + ) + else + Container( + height: 80, + child: Center( + child: CircularProgressIndicator( + backgroundColor: Colors.white, + valueColor: AlwaysStoppedAnimation( + Colors.grey[500]!, + ), + ), + ), + ), + ], + ), + ), + )); + } +} diff --git a/lib/pages/pharmacies/widgets/home/PrescriptionsWidget.dart b/lib/pages/pharmacies/widgets/home/PrescriptionsWidget.dart new file mode 100644 index 00000000..3eee39e6 --- /dev/null +++ b/lib/pages/pharmacies/widgets/home/PrescriptionsWidget.dart @@ -0,0 +1,219 @@ +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PrescriptionViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_items_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/home/ViewAllHomeWidget.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:provider/provider.dart'; + + +class PrescriptionsWidget extends StatelessWidget { + AuthenticatedUserObject authenticatedUserObject = locator(); + + @override + Widget build(BuildContext context) { + + ProjectViewModel projectProvider = Provider.of(context); + return BaseView( + onModelReady: (model) async { + if (Provider.of(context, listen: false).isLogin) { + model.getPrescription(); + } + }, + allowAny: true, + builder: (_, model, wi) => model.prescriptionsList.length > 0 && authenticatedUserObject.isLogin + ? NetworkBaseView( + isLocalLoader: true, + baseViewModel: model, + child: Container( + child: Column( + children: [ + ViewAllHomeWidget(TranslationBase.of(context).myPrescription, HomePrescriptionsPage()), + Container( + margin: EdgeInsets.only(right: 10.0, left: 10.0), + height: MediaQuery.of(context).size.height * 0.30, + child: ListView.builder( + scrollDirection: Axis.horizontal, + shrinkWrap: true, + physics: ScrollPhysics(), + itemCount: model.prescriptionsList.length, + itemBuilder: (context, index) { + return InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: PrescriptionItemsPage( + prescriptions: model.prescriptionsList[index], + ), + ), + ); + }, + child: Container( + padding: EdgeInsets.only(left: 8.0, right: 8.0), + margin: EdgeInsets.only(right: 5.0, left: 5.0), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey, + style: BorderStyle.solid, + width: 1.0, + ), + color: Colors.white, + borderRadius: BorderRadius.circular(10.0)), + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Row( + children: [ + Container( + padding: EdgeInsets.only( + top: 10.0, + left: 10.0, + right: 10.0, + bottom: 10.0, + ), + child: CircleAvatar( + radius: 30, + backgroundColor: Colors.transparent, + child: Image.network( + model.prescriptionsList[index].doctorImageURL!, + width: 50, + height: 50, + ), + ), + ), + Column( + children: [ + Container( + padding: EdgeInsets.only(left: 15.0, right: 15.0), + decoration: BoxDecoration( + border: Border.all( + color: Colors.green, + style: BorderStyle.solid, + width: 3.0, + ), + color: Colors.green, + borderRadius: BorderRadius.circular(30.0)), + child: Text( + projectProvider.isArabic + ? model.prescriptionsList[index].isInOutPatientDescriptionN.toString() + : model.prescriptionsList[index].isInOutPatientDescription.toString(), + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + ), + )), + Row(children: [ + Image.asset( + 'assets/images/Icon-awesome-calendar.png', + width: 30, + height: 30, + ), + Text( + DateUtil.convertStringToDate(model.prescriptionsList[index].appointmentDate.toString()).toString().substring(0, 10), + style: TextStyle( + color: Colors.black, + fontSize: 15.0, + ), + ) + ]), + ], + ), + ], + ), + Container( + margin: EdgeInsets.only(left: 5), + child: Row(children: [ + Text( + model.prescriptionsList[index].doctorTitle.toString(), + style: TextStyle( + color: Colors.black, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + Text( + model.prescriptionsList[index].doctorName.toString(), + style: TextStyle( + color: Colors.black, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + ]), + ), + Container( + margin: EdgeInsets.only(left: 5), + child: Text( + model.prescriptionsList[index].clinicDescription.toString(), + style: TextStyle( + color: Colors.green, + fontSize: 15.0, + ), + ), + ), + Row(children: [ + Container( + margin: EdgeInsets.only(left: 5), + child: + RatingBar( + initialRating: model.prescriptionsList[index].actualDoctorRate!.toDouble(), + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon(Icons.star, color: CustomColors.accentColor,), + half: Icon(Icons.star_half, color: CustomColors.accentColor,), + empty: Icon(Icons.star, color: CustomColors.accentColor,), + ), + unratedColor: Colors.grey[500], + tapOnlyMode: true, + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + ) + + /* RatingBar.readOnly( + initialRating: model.prescriptionsList[index].actualDoctorRate.toDouble(), + size: 15.0, + filledColor: Colors.yellow[700], + emptyColor: Colors.grey[500], + isHalfAllowed: true, + halfFilledIcon: Icons.star_half, + filledIcon: Icons.star, + emptyIcon: Icons.star, + ),*/ + ), + SizedBox( + width: 130.0, + ), + Container( + child: Icon( + Icons.arrow_forward, + color: Theme.of(context).primaryColor, + )), + ]), + ]), + ), + ); + }, + ), + ), + ], + ), + ), + ) + : Container(), + ); + } +} diff --git a/lib/pages/pharmacies/widgets/home/RecentlyViewedWidget.dart b/lib/pages/pharmacies/widgets/home/RecentlyViewedWidget.dart new file mode 100644 index 00000000..8b459a76 --- /dev/null +++ b/lib/pages/pharmacies/widgets/home/RecentlyViewedWidget.dart @@ -0,0 +1,63 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/LastVisitedViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:flutter/material.dart'; + +import '../../../final_products_page.dart'; +import '../ProductTileItem.dart'; +import 'ViewAllHomeWidget.dart'; + +class RecentlyViewedWidget extends StatelessWidget { + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getLastVisitedProducts(), + allowAny: true, + builder: (_, model, wi) => NetworkBaseView( + isLocalLoader: true, + baseViewModel: model, + child: model.lastVisitedProducts.isNotEmpty + ? Container( + child: Column( + children: [ + ViewAllHomeWidget( + TranslationBase.of(context).recentlyViewed, + FinalProductsPage( + id: "", + productType: 3, + )), + if (model.state != ViewState.BusyLocal) + Container( + height: model.lastVisitedProducts.length > 0 + ? MediaQuery.of(context).size.height / 3 + 1 + : 0, + child: ListView.builder( + itemBuilder: (ctx, i) => ProductTileItem( + model.lastVisitedProducts[i], + MediaQuery.of(context).size.height / 4 + + 20), + scrollDirection: Axis.horizontal, + itemCount: model.lastVisitedProducts.length, + ), + ) + else + Container( + height: 80, + child: Center( + child: CircularProgressIndicator( + backgroundColor: Colors.white, + valueColor: AlwaysStoppedAnimation( + Colors.grey[500]!, + ), + ), + ), + ), + ], + ), + ) + : Container(), + )); + } +} diff --git a/lib/pages/pharmacies/widgets/home/ShopByBrandWidget.dart b/lib/pages/pharmacies/widgets/home/ShopByBrandWidget.dart new file mode 100644 index 00000000..38250c0a --- /dev/null +++ b/lib/pages/pharmacies/widgets/home/ShopByBrandWidget.dart @@ -0,0 +1,53 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/BrandViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:flutter/material.dart'; + +import '../../product-brands.dart'; +import '../manufacturerItem.dart'; +import 'ViewAllHomeWidget.dart'; + +class ShopByBrandWidget extends StatelessWidget { + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getTopManufacturerList(), + allowAny: true, + builder: (_, model, wi) => NetworkBaseView( + isLocalLoader: true, + baseViewModel: model, + child: Container( + child: Column( + children: [ + ViewAllHomeWidget(TranslationBase.of(context).shopByBrands, + ProductBrandsPage()), + if (model.state != ViewState.BusyLocal) + Container( + height: 150, + child: ListView.builder( + itemBuilder: (ctx, i) => + ManufacturerItem(model.manufacturerList[i]), + scrollDirection: Axis.horizontal, + itemCount: model.manufacturerList.length, + ), + ) + else + Container( + height: 80, + child: Center( + child: CircularProgressIndicator( + backgroundColor: Colors.white, + valueColor: AlwaysStoppedAnimation( + Colors.grey[500]!, + ), + ), + ), + ), + ], + ), + ), + )); + } +} diff --git a/lib/pages/pharmacies/widgets/home/ViewAllHomeWidget.dart b/lib/pages/pharmacies/widgets/home/ViewAllHomeWidget.dart new file mode 100644 index 00000000..2b73a15a --- /dev/null +++ b/lib/pages/pharmacies/widgets/home/ViewAllHomeWidget.dart @@ -0,0 +1,55 @@ +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:flutter/material.dart'; + +class ViewAllHomeWidget extends StatelessWidget { + final String title; + final Widget navigationWidget; + + ViewAllHomeWidget(this.title, this.navigationWidget); + + @override + Widget build(BuildContext context) { + return Container( + margin: EdgeInsets.fromLTRB(16, 10, 16, 10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts( + title, + color: Color(0xff2E303A), + fontWeight: FontWeight.w700, + fontSize: 19, + ), + InkWell( + onTap: () { + Navigator.push(context, + MaterialPageRoute(builder: (context) => navigationWidget)); + }, + child: Texts( + TranslationBase.of(context).viewAll, + color: Color(0xffD02127), + decoration: TextDecoration.underline, + fontWeight: FontWeight.w600, + fontSize: 12.0, + ), + ), + // BorderedButton( + // TranslationBase.of(context).viewAll, + // hasBorder: true, + // borderColor: Colors.green, + // textColor: Colors.green, + // fontWeight: FontWeight.bold, + // vPadding: 6, + // hPadding: 14, + // handler: () { + // Navigator.push(context, + // MaterialPageRoute(builder: (context) => navigationWidget)); + // }, + // ), + ], + ), + ); + } +} diff --git a/lib/pages/pharmacies/widgets/lacum-banner-widget.dart b/lib/pages/pharmacies/widgets/lacum-banner-widget.dart new file mode 100644 index 00000000..42ca3d07 --- /dev/null +++ b/lib/pages/pharmacies/widgets/lacum-banner-widget.dart @@ -0,0 +1,295 @@ +// import 'package:carousel_slider/carousel_slider.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.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:flutter/material.dart'; + +class LakumBannerWidget extends StatefulWidget { + final LacumViewModel model; + final MediaQueryData mediaQuery; + final bool isLacumHomePage; + + LakumBannerWidget(this.model, this.mediaQuery, this.isLacumHomePage); + + @override + _LakumBannerWidgetState createState() => _LakumBannerWidgetState(); +} + +class _LakumBannerWidgetState extends State { + int _current = 0; + + @override + Widget build(BuildContext context) { + return Container( + child: Stack( + children: [ +// CarouselSlider( +// options: CarouselOptions( +// enableInfiniteScroll: false, +// enlargeCenterPage: false, +// viewportFraction: 1.0, +// scrollPhysics: widget.isLacumHomePage +// ? ScrollPhysics() +// : NeverScrollableScrollPhysics(), +// initialPage: 0, +// onPageChanged: (index, reason) { +// setState(() { +// _current = index; +// }); +// }, +// ), +// items: [ +// Container( +// decoration: BoxDecoration( +// shape: BoxShape.rectangle, +// borderRadius: BorderRadius.circular(4), +// border: Border.fromBorderSide(BorderSide( +// color: Colors.grey, +// width: 0.4, +// )), +// ), +// margin: EdgeInsets.symmetric(horizontal: 16), +// child: Stack( +// children: [ +// Image.asset( +// "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", +// fit: BoxFit.fill, +// width: widget.mediaQuery.size.width * 1.0, +// height: widget.mediaQuery.size.width * 1.0, +// ), +// Container( +// margin: EdgeInsets.fromLTRB(12, 75, 12, 0), +// child: Column( +// children: [ +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Texts( +// widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName, +// fontSize: 13, +// fontWeight: FontWeight.bold, +// color: Colors.black, +// ), +// Texts( +// "${widget.model.lacumInformation!.yahalaAccountNo}", +// fontSize: 13, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ], +// ), +// BorderedButton( +// widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active" +// ? TranslationBase.of(context).active +// : TranslationBase.of(context).inactive, +// textColor: widget.model.lacumInformation! +// .accountStatus == +// 1 +// ? Colors.green +// : Colors.red, +// hasBorder: true, +// borderColor: widget.model.lacumInformation! +// .accountStatus == +// 1 +// ? Colors.green +// : Colors.red, +// radius: 16, +// rPadding: 16, +// icon: widget.model.lacumInformation! +// .accountStatus == +// 1 +// ? Icon( +// Icons.check_circle, +// size: 25, +// color: Colors.green, +// ) +// : Image.asset( +// "assets/images/pharmacy_module/lakum/inactive_cross.png", +// fit: BoxFit.fill, +// width: 25, +// height: 25, +// ), +// ), +// ], +// ), +// SizedBox( +// height: 5, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Texts(TranslationBase.of(context).identificationNumber, +// // "IDENTIFICATION #", +// fontSize: 13, +// fontWeight: FontWeight.bold, +// color: Colors.black, +// ), +// Texts( +// widget.model.lacumInformation! +// .identificationNo, +// fontSize: 13, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ], +// ), +// Column( +// crossAxisAlignment: CrossAxisAlignment.end, +// children: [ +// Texts(TranslationBase.of(context).MEMBERSINCE, +// // "MEMBER SINCE", +// fontSize: 13, +// fontWeight: FontWeight.bold, +// color: Colors.black, +// ), +// Texts( +// widget.model.formatCreatedDateToString(), +// fontSize: 13, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ], +// ), +// ], +// ), +// SizedBox( +// height: 5, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Texts(TranslationBase.of(context).lakumMobile, +// // "MOBILE #", +// fontSize: 13, +// fontWeight: FontWeight.bold, +// color: Colors.black, +// ), +// Texts( +// widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber, +// fontSize: 13, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ], +// ), +// Column( +// crossAxisAlignment: CrossAxisAlignment.end, +// children: [ +// Texts( +// TranslationBase.of(context).language, +// fontSize: 13, +// fontWeight: FontWeight.bold, +// color: Colors.black, +// ), +// Texts( +// widget.model.lacumInformation!.prefLang == +// "2" +// ? TranslationBase.of(context).lanEnglish +// : TranslationBase.of(context).lanArabic, +// fontSize: 13, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ], +// ), +// ], +// ), +// ], +// ), +// ), +// ], +// ), +// ), +// widget.isLacumHomePage +// ? Container( +// decoration: BoxDecoration( +// shape: BoxShape.rectangle, +// borderRadius: BorderRadius.circular(4), +// border: Border.fromBorderSide(BorderSide( +// color: Colors.grey, +// width: 0.4, +// )), +// ), +// margin: EdgeInsets.symmetric(horizontal: 16), +// child: Stack( +// children: [ +// Image.asset( +// "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", +// fit: BoxFit.fill, +// width: widget.mediaQuery.size.width * 1.0, +// height: widget.mediaQuery.size.width * 1.0, +// ), +// Center( +// child: Container( +// margin: EdgeInsets.fromLTRB(5, 70, 5, 4), +// child: widget.model.convertBase64ToBarCodeImage() != +// null +// ? Image.memory( +// widget.model.convertBase64ToBarCodeImage(), +// fit: BoxFit.fill, +// height: 100.0, +// width: 180.0 +// ) +// : Container(), +// ), +// ), +// ], +// ), +// ) +// : Container(), +// ], +// ), + widget.isLacumHomePage + ? Positioned( + bottom: 1, + left: 1, + right: 1, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + width: _current == 0 ? 12.0 : 8.0, + height: 4.0, + margin: EdgeInsets.symmetric( + vertical: 0.0, horizontal: 2.0), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: _current == 0 + ? Color(0xff5ab145) + : Color.fromRGBO(0, 0, 0, 0.4), + ), + ), + Container( + width: _current == 1 ? 12.0 : 8.0, + height: 4.0, + margin: EdgeInsets.symmetric( + vertical: 0.0, horizontal: 2.0), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: _current == 1 + ? Color(0xff5ab145) + : Color.fromRGBO(0, 0, 0, 0.4), + ), + ), + ], + ), + ), + ) + : Container(), + ], + ), + ); + } +} \ No newline at end of file diff --git a/lib/pages/pharmacies/widgets/lakum-banner-widget.dart b/lib/pages/pharmacies/widgets/lakum-banner-widget.dart new file mode 100644 index 00000000..3fc5d14b --- /dev/null +++ b/lib/pages/pharmacies/widgets/lakum-banner-widget.dart @@ -0,0 +1,289 @@ +// import 'package:carousel_slider/carousel_slider.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.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:flutter/material.dart'; + +class LakumBannerWidget extends StatefulWidget { + final LacumViewModel model; + final MediaQueryData mediaQuery; + final bool isLacumHomePage; + + LakumBannerWidget(this.model, this.mediaQuery, this.isLacumHomePage); + + @override + _LakumBannerWidgetState createState() => _LakumBannerWidgetState(); +} + +class _LakumBannerWidgetState extends State { + int _current = 0; + + @override + Widget build(BuildContext context) { + return Container( + child: Stack( + children: [ + // CarouselSlider( + // options: CarouselOptions( + // enableInfiniteScroll: false, + // enlargeCenterPage: false, + // viewportFraction: 1.0, + // scrollPhysics: widget.isLacumHomePage + // ? ScrollPhysics() + // : NeverScrollableScrollPhysics(), + // initialPage: 0, + // onPageChanged: (index, reason) { + // setState(() { + // _current = index; + // }); + // }, + // ), + // items: [ + // Container( + // decoration: BoxDecoration( + // shape: BoxShape.rectangle, + // borderRadius: BorderRadius.circular(4), + // border: Border.fromBorderSide(BorderSide( + // color: Colors.grey, + // width: 0.4, + // )), + // ), + // margin: EdgeInsets.symmetric(horizontal: 16), + // child: Stack( + // children: [ + // Image.asset( + // "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", + // fit: BoxFit.fill, + // width: widget.mediaQuery.size.width * 1.0, + // height: widget.mediaQuery.size.width * 1.0, + // ), + // Container( + // margin: EdgeInsets.fromLTRB(12, 70, 12, 4), + // child: Column( + // children: [ + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Texts( + // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName, + // fontSize: 14, + // fontWeight: FontWeight.bold, + // color: Colors.black, + // ), + // Texts( + // "${widget.model.lacumInformation!.yahalaAccountNo}", + // fontSize: 16, + // fontWeight: FontWeight.normal, + // color: Colors.black, + // ), + // ], + // ), + // BorderedButton( + // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active" + // ? TranslationBase.of(context).active + // : TranslationBase.of(context).inactive, + // textColor: widget.model.lacumInformation! + // .accountStatus! == + // 1 + // ? Colors.green + // : Colors.red, + // hasBorder: true, + // borderColor: widget.model.lacumInformation! + // .accountStatus == + // 1 + // ? Colors.green + // : Colors.red, + // radius: 16, + // rPadding: 16, + // icon: widget.model.lacumInformation! + // .accountStatus == + // 1 + // ? Icon( + // Icons.check_circle, + // size: 25, + // color: Colors.green, + // ) + // : Image.asset( + // "assets/images/pharmacy_module/lakum/inactive_cross.png", + // fit: BoxFit.fill, + // width: 25, + // height: 25, + // ), + // ), + // ], + // ), + // SizedBox( + // height: 10, + // ), + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Texts( + // "IDENTIFICATION #", + // fontSize: 14, + // fontWeight: FontWeight.bold, + // color: Colors.black, + // ), + // Texts( + // widget.model.lacumInformation! + // .identificationNo, + // fontSize: 16, + // fontWeight: FontWeight.normal, + // color: Colors.black, + // ), + // ], + // ), + // Column( + // crossAxisAlignment: CrossAxisAlignment.end, + // children: [ + // Texts( + // "MEMBER SINCE", + // fontSize: 14, + // fontWeight: FontWeight.bold, + // color: Colors.black, + // ), + // Texts( + // widget.model.formatCreatedDateToString(), + // fontSize: 16, + // fontWeight: FontWeight.normal, + // color: Colors.black, + // ), + // ], + // ), + // ], + // ), + // SizedBox( + // height: 10, + // ), + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Texts( + // "MOBILE #", + // fontSize: 14, + // fontWeight: FontWeight.bold, + // color: Colors.black, + // ), + // Texts( + // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber, + // fontSize: 16, + // fontWeight: FontWeight.normal, + // color: Colors.black, + // ), + // ], + // ), + // Column( + // crossAxisAlignment: CrossAxisAlignment.end, + // children: [ + // Texts( + // TranslationBase.of(context).language, + // fontSize: 14, + // fontWeight: FontWeight.bold, + // color: Colors.black, + // ), + // Texts( + // widget.model.lacumInformation!.prefLang == + // "1" + // ? TranslationBase.of(context).lanEnglish + // : TranslationBase.of(context).lanArabic, + // fontSize: 16, + // fontWeight: FontWeight.normal, + // color: Colors.black, + // ), + // ], + // ), + // ], + // ), + // ], + // ), + // ), + // ], + // ), + // ), + // widget.isLacumHomePage + // ? Container( + // decoration: BoxDecoration( + // shape: BoxShape.rectangle, + // borderRadius: BorderRadius.circular(4), + // border: Border.fromBorderSide(BorderSide( + // color: Colors.grey, + // width: 0.4, + // )), + // ), + // margin: EdgeInsets.symmetric(horizontal: 16), + // child: Stack( + // children: [ + // Image.asset( + // "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", + // fit: BoxFit.fill, + // width: widget.mediaQuery.size.width * 1.0, + // height: widget.mediaQuery.size.width * 1.0, + // ), + // Container( + // margin: EdgeInsets.fromLTRB(12, 70, 12, 4), + // child: widget.model.convertBase64ToBarCodeImage() != + // null + // ? Image.memory( + // widget.model.convertBase64ToBarCodeImage()) + // : Container(), + // ), + // ], + // ), + // ) + // : Container(), + // ], + // ), + widget.isLacumHomePage + ? Positioned( + bottom: 1, + left: 1, + right: 1, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + width: _current == 0 ? 12.0 : 8.0, + height: 4.0, + margin: EdgeInsets.symmetric( + vertical: 0.0, horizontal: 2.0), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: _current == 0 + ? Color(0xff5ab145) + : Color.fromRGBO(0, 0, 0, 0.4), + ), + ), + Container( + width: _current == 1 ? 12.0 : 8.0, + height: 4.0, + margin: EdgeInsets.symmetric( + vertical: 0.0, horizontal: 2.0), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: _current == 1 + ? Color(0xff5ab145) + : Color.fromRGBO(0, 0, 0, 0.4), + ), + ), + ], + ), + ), + ) + : Container(), + ], + ), + ); + } +} \ No newline at end of file diff --git a/lib/pages/pharmacies/widgets/lakum-point-table-row-widget.dart b/lib/pages/pharmacies/widgets/lakum-point-table-row-widget.dart new file mode 100644 index 00000000..4fb722e3 --- /dev/null +++ b/lib/pages/pharmacies/widgets/lakum-point-table-row-widget.dart @@ -0,0 +1,114 @@ +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/points-expandable-notifier.dart'; +import 'package:flutter/material.dart'; + +class LakumPointTableRowWidget extends StatefulWidget { + final bool isTableTitle; // true : title , false: row + final String rowTitle; + final num points; + final num riyal; + final VoidCallback onTap; + final int rowIndex; + final Widget? collapsed; + final bool expandFlag; + + LakumPointTableRowWidget(this.isTableTitle, this.rowTitle, this.points, + this.riyal, this.onTap, this.rowIndex, + {this.collapsed, this.expandFlag = false}); + + @override + _LakumPointTableRowWidgetState createState() => + _LakumPointTableRowWidgetState(); +} + +class _LakumPointTableRowWidgetState extends State { + @override + Widget build(BuildContext context) { + return InkWell( + onTap: widget.onTap, + child: Column( + children: [ + Column( + children: [ + widget.collapsed != null + ? PointsExpandableNotifier( + headerWidget: buildPointRowBody(), + // bodyWidget: widget.collapsed != null ? widget.collapsed : null, + bodyWidget: widget.collapsed, + isExpand: widget.expandFlag, + ) + : buildPointRowBody(), + ], + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 1, + thickness: 1, + indent: 0, + endIndent: 0, + ), + ], + ), + ); + } + + Widget buildPointRowBody() { + bool isEven = widget.rowIndex % 2 == 0; + return Container( + padding: EdgeInsets.symmetric(vertical: 12, horizontal: 12), + color: widget.expandFlag ? Color(0xffe4e4e4) : isEven && !widget.isTableTitle ? Color(0xffefefef) : Colors.white, + child: Column( + children: [ + Row( + children: [ + Expanded( + child: Container( + child: Texts( + widget.rowTitle, + fontSize: 14, + fontWeight: + widget.isTableTitle ? FontWeight.bold : FontWeight.normal, + ), + )), + Expanded( + child: Container( + child: Texts( + widget.isTableTitle ? "POINTS" : "${widget.points}", + fontSize: 14, + fontWeight: + widget.isTableTitle ? FontWeight.bold : FontWeight.normal, + ), + )), + Expanded( + child: Container( + child: Texts( + widget.isTableTitle ? "RIYAL" : "${widget.riyal}", + fontSize: 14, + fontWeight: + widget.isTableTitle ? FontWeight.bold : FontWeight.normal, + ), + )), + Expanded( + child: widget.isTableTitle + ? Container() + : Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Icon( + widget.collapsed == null + ? Icons.keyboard_arrow_right + : widget.expandFlag + ? Icons.keyboard_arrow_up + : Icons.keyboard_arrow_down, + size: 25, + color: Colors.grey.shade700, + ), + ], + )), + ], + ), + ], + ), + ); + } +} diff --git a/lib/pages/pharmacies/widgets/lakum_point_table_row_widget.dart b/lib/pages/pharmacies/widgets/lakum_point_table_row_widget.dart new file mode 100644 index 00000000..757cf03a --- /dev/null +++ b/lib/pages/pharmacies/widgets/lakum_point_table_row_widget.dart @@ -0,0 +1,114 @@ +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/points-expandable-notifier.dart'; +import 'package:flutter/material.dart'; + +class LakumPointTableRowWidget extends StatefulWidget { + final bool isTableTitle; // true : title , false: row + final String rowTitle; + final double points; + final double riyal; + final VoidCallback? onTap; + final int rowIndex; + final Widget? collapsed; + final bool expandFlag; + + LakumPointTableRowWidget(this.isTableTitle, this.rowTitle, this.points, + this.riyal, this.onTap, this.rowIndex, + {this.collapsed, this.expandFlag = false}); + + @override + _LakumPointTableRowWidgetState createState() => + _LakumPointTableRowWidgetState(); +} + +class _LakumPointTableRowWidgetState extends State { + @override + Widget build(BuildContext context) { + return InkWell( + onTap: widget.onTap!, + child: Column( + children: [ + Column( + children: [ + widget.collapsed != null + ? PointsExpandableNotifier( + headerWidget: buildPointRowBody(), + // bodyWidget: widget.collapsed != null ? widget.collapsed : null, + bodyWidget: widget.collapsed, + isExpand: widget.expandFlag, + ) + : buildPointRowBody(), + ], + ), + const Divider( + color: Color(0xFFD6D6D6), + height: 1, + thickness: 1, + indent: 0, + endIndent: 0, + ), + ], + ), + ); + } + + Widget buildPointRowBody() { + bool isEven = widget.rowIndex % 2 == 0; + return Container( + padding: EdgeInsets.symmetric(vertical: 12, horizontal: 12), + color: widget.expandFlag ? Color(0xffe4e4e4) : isEven && !widget.isTableTitle ? Color(0xffefefef) : Colors.white, + child: Column( + children: [ + Row( + children: [ + Expanded( + child: Container( + child: Texts( + widget.rowTitle, + fontSize: 14, + fontWeight: + widget.isTableTitle ? FontWeight.bold : FontWeight.normal, + ), + )), + Expanded( + child: Container( + child: Texts( + widget.isTableTitle ? "POINTS" : "${widget.points}", + fontSize: 14, + fontWeight: + widget.isTableTitle ? FontWeight.bold : FontWeight.normal, + ), + )), + Expanded( + child: Container( + child: Texts( + widget.isTableTitle ? "RIYAL" : "${widget.riyal}", + fontSize: 14, + fontWeight: + widget.isTableTitle ? FontWeight.bold : FontWeight.normal, + ), + )), + Expanded( + child: widget.isTableTitle + ? Container() + : Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Icon( + widget.collapsed == null + ? Icons.keyboard_arrow_right + : widget.expandFlag + ? Icons.keyboard_arrow_up + : Icons.keyboard_arrow_down, + size: 25, + color: Colors.grey.shade700, + ), + ], + )), + ], + ), + ], + ), + ); + } +} diff --git a/lib/pages/pharmacies/widgets/manufacturerItem.dart b/lib/pages/pharmacies/widgets/manufacturerItem.dart new file mode 100644 index 00000000..739e90bc --- /dev/null +++ b/lib/pages/pharmacies/widgets/manufacturerItem.dart @@ -0,0 +1,57 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart'; +import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; + +import '../../final_products_page.dart'; + +class ManufacturerItem extends StatelessWidget { + final Manufacturer item; + + ManufacturerItem(this.item); + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: FinalProductsPage( + id: item.id, + productType: 2, + ), + ), + ); + }, + child: Container( + width: 100, + margin: EdgeInsets.symmetric( + horizontal: 12, + vertical: 4, + ), + decoration: BoxDecoration( + borderRadius:BorderRadius.circular(12) , + border: Border( + right: BorderSide(color: Colors.grey.shade300, width: 1), + bottom: BorderSide(color: Colors.grey.shade300, width: 1), + left: BorderSide(color: Colors.grey.shade300, width: 1), + top: BorderSide(color: Colors.grey.shade300, width: 1)), + ), + child: item.image == null + ? Container( + padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 10), + alignment: Alignment.topCenter, + child: AppText(item.name!, fontWeight: FontWeight.w500,fontSize: 14,), + ) + : Padding( + padding: EdgeInsets.symmetric(horizontal: 8), + child: Image.network( + item.image!.src!, + fit: BoxFit.cover, + ), + ), + ), + ); + } +} diff --git a/lib/pages/pharmacies/wishlist.dart b/lib/pages/pharmacies/wishlist.dart new file mode 100644 index 00000000..d7a7df05 --- /dev/null +++ b/lib/pages/pharmacies/wishlist.dart @@ -0,0 +1,68 @@ +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/wishlist_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/ProductCheckTypeWidget.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; + +class WishlistPage extends StatelessWidget { + const WishlistPage({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getWishlistData(), + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).wishlist, + isShowAppBar: true, + isShowDecPage: false, + isPharmacy: true, + showPharmacyCart: false, + showHomeAppBarIcon: false, + isBottomBar: true, + baseViewModel: model, + body: model.wishListList.length == 0 + ? Container( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + 'assets/images/new-design/empty_box.png', + width: 100, + height: 100, + fit: BoxFit.cover, + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text(TranslationBase.of(context).noData, + // 'There is no data', + style: TextStyle(fontSize: 30), + ), + ) + ], + ), + ), + ) + : Container( + child: Column( + children: [ + Expanded( + flex: 20, + child: Container( + width: double.infinity, + height: MediaQuery.of(context).size.height * 0.85, //250, + child: ProductCheckTypeWidget(model: model,), + ), + ), + ], + ), + ), + ), + ); + } +} + diff --git a/lib/pages/pharmacy/order/Order.dart b/lib/pages/pharmacy/order/Order.dart new file mode 100644 index 00000000..09e9c8b7 --- /dev/null +++ b/lib/pages/pharmacy/order/Order.dart @@ -0,0 +1,1419 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacy/order/OrderDetails.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +dynamic languageID; + +class OrderPage extends StatefulWidget { +// orderList({this.customerId, this.pageId}); + + String? customerID; + String? customerGUID; + + OrderPage({required this.customerID, this.customerGUID}); + + @override + _OrderPageState createState() => _OrderPageState(); +} + +class _OrderPageState extends State with SingleTickerProviderStateMixin { + String pageID = "1"; + String customerId = ""; + String order = ""; + + List orderList = []; + + List deliveredOrderList = []; + + List processingOrderList = []; + List cancelledOrderList = []; + List pendingOrderList = []; + + TabController? _tabController; + +// AppSharedPreferences sharedPref = AppSharedPreferences(); + getLanguageID() async { + languageID = await sharedPref.getString(APP_LANGUAGE); + } + + @override + void initState() { + getLanguageID(); + super.initState(); + + _tabController = new TabController( + length: 4, + vsync: this, + ); + } + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => + model.getOrder(widget.customerID, widget.customerGUID, pageID), + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).order, + baseViewModel: model, + isShowAppBar: true, + isPharmacy: true, + showPharmacyCart: false, + showHomeAppBarIcon: false, + isBottomBar: true, + body: Container( + child: Column( + children: [ + TabBar( + labelPadding: EdgeInsets.only(left: 3.0, right: 3.0), + labelColor: Colors.black, + indicatorColor: Colors.green, + tabs: [ + Tab(text: TranslationBase.of(context).delivered), + Tab(text: TranslationBase.of(context).processing), + Tab(text: TranslationBase.of(context).pending), + Tab(text: TranslationBase.of(context).cancelled), + ], + controller: _tabController, + ), + Divider( + color: Colors.grey[350], + height: 10, + thickness: 6, + indent: 0, + endIndent: 0, + ), + Expanded( + child: new TabBarView( + physics: NeverScrollableScrollPhysics(), + children: [ + getDeliveredOrder(model), + getProcessingOrder(model), + getPendingOrder(model), + getCancelledOrder(model), + ], + controller: _tabController, + ), + ), + ], + ), + ), + ), + ); + } + + Widget getDeliveredOrder(OrderModelViewModel model) { + ProjectViewModel projectViewModel = Provider.of(context); + deliveredOrderList.clear(); + for (int i = 0; i < model.orders.length; i++) { + if (model.orders[i].orderStatusId == 30 || + model.orders[i].orderStatusId == 997 || + model.orders[i].orderStatusId == 994) { + deliveredOrderList.add(model.orders[i]); + } + } + return Container( + width: MediaQuery.of(context).size.width, + child: deliveredOrderList.length != 0 + ? SingleChildScrollView( + child: Column( + children: [ + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + itemCount: deliveredOrderList.length, + itemBuilder: (context, index) { + return Container( + child: Column( + children: [ + InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: OrderDetailsPage( + orderModel: + deliveredOrderList[index]), + )).then((value) { + model.getOrder(widget.customerID, + widget.customerGUID, pageID); + getDeliveredOrder(model); + }); + }, + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + margin: + EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderNumber, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + child: Text( + deliveredOrderList[index] + .id + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], + ), + SizedBox( + height: 5, + ), + Row( + children: [ + Container( + margin: + EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderDate, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + child: Text( + deliveredOrderList[index] + .createdOnUtc + .toString() + .substring(0, 10), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], + ), + ], + ), + ), + Container( + margin: EdgeInsets.all(8.0), + child: Icon( + Icons.arrow_forward, + size: 18, + color: Colors.grey[500], + ), + ), + ], + ), + ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.only( + left: 8, right: 8, top: 1, bottom: 8), + padding: EdgeInsets.only( + left: 13.0, right: 13.0), + decoration: BoxDecoration( + border: Border.all( + color: Color(0xFF4CAF50), + style: BorderStyle.solid, + width: 5.0, + ), + color: Color(0xFF4CAF50), + borderRadius: BorderRadius.circular( + 30.0)), + child: deliveredOrderList[ + index] + .orderStatusId == + 30 || + deliveredOrderList[index] + .orderStatusId == + 997 || + deliveredOrderList[index] + .orderStatusId == + 994 +// deliveredOrderList[index].orderStatusId == 30 + ? Text( +// deliveredOrderList[0].orderStatus.toString().substring(12), + TranslationBase.of(context) + .deliveredOrder, + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ) + : Text( + languageID == "ar" + ? deliveredOrderList[index] + .orderStatusn + .toString() + : deliveredOrderList[index] + .orderStatus + .toString(), + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + )), + Container( + margin: EdgeInsets.only( + left: 8, right: 8, top: 1, bottom: 8), + child: Column( +// crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Row( + children: [ + Container( + margin: EdgeInsets.only(left: 5), + child: Text( + deliveredOrderList[index] + .orderTotal + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + margin: EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], + ), + SizedBox( + height: 5, + ), + Row( + children: [ + Container( + child: Text( + deliveredOrderList[index] + .productCount + .toString(), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + margin: EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context) + .itemsNo, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], + ), + ], + ), + ), + ], + ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 8, + indent: 0, + endIndent: 0, + ), + ], + ), + ); + }) + ], + ), + ) + : Container( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset('assets/images/pharmacy/empty_box.svg'), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text(TranslationBase.of(context).noOrder, + style: TextStyle( + fontSize: 16.0, + )), + ), + ], + ), + ), + ), + ); + } + + Widget getProcessingOrder(OrderModelViewModel model) { + ProjectViewModel projectViewModel = Provider.of(context); + processingOrderList.clear(); + for (int i = 0; i < model.orders.length; i++) { + if (model.orders[i].orderStatusId == 20 || + model.orders[i].orderStatusId == 995 || + model.orders[i].orderStatusId == 998 || + model.orders[i].orderStatusId == 999) { + processingOrderList.add(model.orders[i]); + } + } + _tabController!.index = 1; + return Container( + width: MediaQuery.of(context).size.width, + child: processingOrderList.length != 0 + ? SingleChildScrollView( + child: Column( + children: [ + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + itemCount: processingOrderList.length, + itemBuilder: (context, index) { + return Container( + child: Column( + children: [ + InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: OrderDetailsPage( + orderModel: + processingOrderList[ + index]))) + .then((value) { + model + .getOrder(widget.customerID, + widget.customerGUID, pageID) + .then((value) { + getProcessingOrder(model); + }); + }); + }, + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + margin: + EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderNumber, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + child: Text( + processingOrderList[index] + .id + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], + ), + SizedBox( + height: 5, + ), + Row( + children: [ + Container( + margin: + EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderDate, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + child: Text( + processingOrderList[index] + .createdOnUtc + .toString() + .substring(0, 10), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], + ), + ], + ), + ), + Container( + margin: EdgeInsets.all(8.0), + child: Icon( + Icons.arrow_forward, + size: 18, + color: Colors.grey[500], + ), + ), + ], + ), + ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.only( + left: 8, right: 8, top: 1, bottom: 8), + padding: EdgeInsets.only( + left: 13.0, right: 13.0), + decoration: BoxDecoration( + border: Border.all( + color: Colors.grey[500]!, + style: BorderStyle.solid, + width: 5.0, + ), + color: Colors.grey[500], + borderRadius: BorderRadius.circular( + 30.0)), + child: processingOrderList[ + index] + .orderStatusId == + 20 || + processingOrderList[index] + .orderStatusId == + 995 || + processingOrderList[index] + .orderStatusId == + 998 || + processingOrderList[index] + .orderStatusId == + 999 +// processingOrderList[index].orderStatusId == 20 + ? Text( +// deliveredOrderList[0].orderStatus.toString().substring(12), + TranslationBase.of(context) + .processingOrder, + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ) + : Text( + languageID == "ar" + ? processingOrderList[index] + .orderStatusn + .toString() + : processingOrderList[index] + .orderStatus + .toString(), + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + )), + Container( + margin: EdgeInsets.only( + left: 8, right: 8, top: 1, bottom: 8), + child: Column( +// crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Row( + children: [ + Container( + margin: EdgeInsets.only(left: 5), + child: Text( + processingOrderList[index] + .orderTotal + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + margin: EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], + ), + SizedBox( + height: 5, + ), + Row( + children: [ + Container( + child: Text( + processingOrderList[index] + .productCount + .toString(), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + margin: EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context) + .itemsNo, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], + ), + ], + ), + ), + ], + ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 8, + indent: 0, + endIndent: 0, + ), + ], + ), + ); + }) + ], + ), + ) + : Container( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset('assets/images/pharmacy/empty_box.svg'), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text(TranslationBase.of(context).noOrder, + style: TextStyle( + fontSize: 16.0, + )), + ), + ], + ), + ), + ), + ); +// return Container( +// child: model.order.length != 0 +// ? SingleChildScrollView( +// child: Column( +// children: [ +// ListView.builder( +// child: Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Container( +// margin: EdgeInsets.all(8), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Row( +// children: [ +// Container( +// margin: EdgeInsets.only(right: 5), +// child: Text(TranslationBase.of(context).orderNumber, +// style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, +// ), +// ), +// ), +// Container( +// child: Text(processingOrderList[0].id.toString(), +// style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, +// ), +// ), +// ), +// ], +// ), +// SizedBox( +// height: 5,), +// Row( +// children: [ +// Container( +// margin: EdgeInsets.only(right: 5), +// child: Text(TranslationBase.of(context).orderDate, +// style: TextStyle(fontSize: 14.0, +// ), +// ), +// ), +// Container( +// child: Text(processingOrderList[0].createdOnUtc.toString().substring(0,11), +// style: TextStyle(fontSize: 14.0, +// ), +// ), +// ), +// ], +// ), +// ], +// ), +// ), +// Container( +// margin: EdgeInsets.all(8), +// child: InkWell( +// onTap: () { +// Navigator.push(context, +// FadePage(page: OrderDetailsPage(orderModel:processingOrderList[0]))); +// }, +// child: SvgPicture.asset( +// 'assets/images/pharmacy/arrow_right.svg', +// height: 20, +// width: 20,), +// ), +// ), +// ], +// ), +// ), +// Divider( +// color: Colors.grey[350], +// height: 20, +// thickness: 1, +// indent: 0, +// endIndent: 0, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Container( +// margin: EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 8), +// padding: EdgeInsets.only(left: 13.0, right: 13.0), +// decoration: BoxDecoration( +// border: Border.all( +// color: Colors.green, +// style: BorderStyle.solid, +// width: 5.0, +// ), +// color: Colors.green, +// borderRadius: BorderRadius.circular(30.0) +// ), +// child: Text( widget.languageID == "ar" +// ? processingOrderList[0].orderStatusn.toString() +// : processingOrderList[0].orderStatus.toString().substring(12), +//// TranslationBase.of(context).processing, +// style: TextStyle( +// color: Colors.white, +// fontSize: 15.0, +// fontWeight: FontWeight.bold, +// ), +// ), +// ), +// Container( +// margin: EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 8), +// child: Column( +//// crossAxisAlignment: CrossAxisAlignment.end, +// children: [ +// Row( +// children: [ +// Container( +// margin: EdgeInsets.only(left: 5), +// child: Text(processingOrderList[0].orderTotal.toString(), +// style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, +// ), +// ), +// ), +// Container( +// margin: EdgeInsets.only(left: 5), +// child: Text(TranslationBase.of(context).sar, +// style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, +// ), +// ), +// ), +// ], +// ), +// SizedBox( +// height: 5,), +// Row( +// children: [ +// Container( +// child: Text(processingOrderList[0].orderItems[0].quantity.toString(), +// style: TextStyle(fontSize: 14.0, +// ), +// ), +// ), +// Container( +// margin: EdgeInsets.only(left: 5), +// child: Text(TranslationBase.of(context).itemsNo, +// style: TextStyle(fontSize: 14.0, +// ), +// ), +// ), +// ], +// ), +// ], +// ), +// ), +// ], +// ), +// Divider( +// color: Colors.grey[350], +// height: 20, +// thickness: 8, +// indent: 0, +// endIndent: 0, +// ), +// ], +// ), +// ) +// : Container( +// child: Center( +// child: Column( +// mainAxisAlignment: MainAxisAlignment.center, +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// SvgPicture.asset( +// 'assets/images/pharmacy/empty_box.svg'), +// Container( +// margin: EdgeInsets.only(top: 10.0), +// child: Text(TranslationBase.of(context).noOrder, +// style: TextStyle( +// fontSize: 16.0, +// )), +// ), +// ], +// ), +// ), +// ), +// ); + } + + Widget getPendingOrder(OrderModelViewModel model) { + ProjectViewModel projectViewModel = Provider.of(context); + pendingOrderList.clear(); + for (int i = 0; i < model.orders.length; i++) { + if (model.orders[i].orderStatusId == 10) { + pendingOrderList.add(model.orders[i]); + } + } + _tabController!.animateTo(2); + return Container( + child: pendingOrderList.length != 0 + ? SingleChildScrollView( + child: Column( + children: [ + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + itemCount: pendingOrderList.length, + itemBuilder: (context, index) { + return Container( + child: SingleChildScrollView( + child: Column( + children: [ + InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: OrderDetailsPage( + orderModel: + pendingOrderList[ + index]))) + .then((value) { + model + .getOrder(widget.customerID, + widget.customerGUID, pageID) + .then((value) { + getPendingOrder(model); + }); + }); + }, + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + margin: + EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderNumber, + style: TextStyle( + fontSize: 16.0, + fontWeight: + FontWeight.bold, + ), + ), + ), + Container( + child: Text( + pendingOrderList[index] + .id + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: + FontWeight.bold, + ), + ), + ), + ], + ), + SizedBox( + height: 5, + ), + Row( + children: [ + Container( + margin: + EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderDate, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + child: Text( + pendingOrderList[index] + .createdOnUtc + .toString() + .substring(0, 10), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], + ), + ], + ), + ), + Container( + margin: EdgeInsets.all(8.0), + child: Icon( + Icons.arrow_forward, + size: 18, + color: Colors.grey[500], + ), + ), + ], + ), + ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.all(8.0), + padding: EdgeInsets.only( + left: 13.0, right: 13.0), + decoration: BoxDecoration( + border: Border.all( + color: Colors.orange[300]!, + style: BorderStyle.solid, + width: 5.0, + ), + color: Colors.orange[300], + borderRadius: + BorderRadius.circular(30.0)), + child: pendingOrderList[index] + .orderStatusId == + 10 + ? Text( +// deliveredOrderList[0].orderStatus.toString().substring(12), + TranslationBase.of(context) + .pendingOrder, + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ) + : Text( + languageID == "ar" + ? pendingOrderList[index] + .orderStatusn + .toString() + : pendingOrderList[index] + .orderStatus + .toString(), + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + )), + Container( + margin: EdgeInsets.all(8.0), + child: Column( +// crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Row( + children: [ + Container( + margin: + EdgeInsets.only(left: 5), + child: Text( + pendingOrderList[index] + .orderTotal + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + margin: + EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context) + .sar, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], + ), + SizedBox( + height: 5, + ), + Row( + children: [ + Container( + child: Text( + pendingOrderList[index] + .productCount + .toString(), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + margin: + EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context) + .itemsNo, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], + ), + ], + ), + ), + ], + ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 8, + indent: 0, + endIndent: 0, + ), + ], + ), + ), + ); + }) + ], + ), + ) + : Container( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset('assets/images/pharmacy/empty_box.svg'), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text(TranslationBase.of(context).noOrder, + style: TextStyle( + fontSize: 16.0, + )), + ), + ], + ), + ), + ), + ); + } + + Widget getCancelledOrder(OrderModelViewModel model) { + ProjectViewModel projectViewModel = Provider.of(context); + cancelledOrderList.clear(); + for (int i = 0; i < model.orders.length; i++) { + if (model.orders[i].orderStatusId == 40 || + model.orders[i].orderStatusId == 996 || + model.orders[i].orderStatusId == 200) { + cancelledOrderList.add(model.orders[i]); + } + } + return Container( + child: cancelledOrderList.length != 0 + ? SingleChildScrollView( + child: Column( + children: [ + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + itemCount: cancelledOrderList.length, + itemBuilder: (context, index) { + return Container( + child: SingleChildScrollView( + child: Column( + children: [ + InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: OrderDetailsPage( + orderModel: + cancelledOrderList[ + index]))) + ; + }, + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + children: [ + Container( + margin: + EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderNumber, + style: TextStyle( + fontSize: 16.0, + fontWeight: + FontWeight.bold, + ), + ), + ), + Container( + child: Text( + cancelledOrderList[index] + .id + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: + FontWeight.bold, + ), + ), + ), + ], + ), + SizedBox( + height: 5, + ), + Row( + children: [ + Container( + margin: + EdgeInsets.only(right: 5), + child: Text( + TranslationBase.of(context) + .orderDate, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + child: Text( + cancelledOrderList[index] + .createdOnUtc + .toString() + .substring(0, 10), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], + ), + ], + ), + ), + Container( + margin: EdgeInsets.all(8.0), + child: Icon( + Icons.arrow_forward, + size: 18, + color: Colors.grey[500], + ), + ), + ], + ), + ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.only( + left: 8, + right: 8, + top: 1, + bottom: 8), + padding: EdgeInsets.only( + left: 10.0, right: 10.0), + decoration: BoxDecoration( + border: Border.all( + color: Colors.red[900]!, + style: BorderStyle.solid, + width: 5.0, + ), + color: Colors.red[900], + borderRadius: + BorderRadius.circular(30.0)), + child: cancelledOrderList[index] + .orderStatusId == + 40 + ? Text( +// deliveredOrderList[0].orderStatus.toString().substring(12), + TranslationBase.of(context) + .cancelledOrder, + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ) + : Text( + languageID == "ar" + ? cancelledOrderList[index] + .orderStatusn + .toString() + : cancelledOrderList[index] + .orderStatus + .toString(), + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + )), + Container( + margin: EdgeInsets.only( + left: 8, right: 8, top: 1, bottom: 8), + child: Column( +// crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Row( + children: [ + Container( + margin: + EdgeInsets.only(left: 5), + child: Text( + cancelledOrderList[index] + .orderTotal + .toString(), + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + margin: + EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context) + .sar, + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], + ), + SizedBox( + height: 5, + ), + Row( + children: [ + Container( + child: Text( + cancelledOrderList[index] + .productCount + .toString(), + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + Container( + margin: + EdgeInsets.only(left: 5), + child: Text( + TranslationBase.of(context) + .itemsNo, + style: TextStyle( + fontSize: 14.0, + ), + ), + ), + ], + ), + ], + ), + ), + ], + ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 8, + indent: 0, + endIndent: 0, + ), + ], + ), + ), + ); + }) + ], + ), + ) + : Container( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SvgPicture.asset('assets/images/pharmacy/empty_box.svg'), + Container( + margin: EdgeInsets.only(top: 10.0), + child: Text(TranslationBase.of(context).noOrder, + style: TextStyle( + fontSize: 16.0, + )), + ), + ], + ), + ), + ), + ); + + int test = Test()["1"]; + } +} + +class Test { + static const values = {"1": 1, "2": 2, "3": 3}; + + int operator [](String key) => values[key]!; +} diff --git a/lib/pages/pharmacy/order/OrderDetails.dart b/lib/pages/pharmacy/order/OrderDetails.dart new file mode 100644 index 00000000..e773f586 --- /dev/null +++ b/lib/pages/pharmacy/order/OrderDetails.dart @@ -0,0 +1,712 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacy/order/Order.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets//pharmacy/product_tile.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.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:flutter/src/widgets/image.dart' as flutterImage; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +dynamic languageID; + +class OrderDetailsPage extends StatefulWidget { + Orders orderModel; + + OrderDetailsPage({required this.orderModel}); + + // Orders orderModel; +// OrderModel orderModelDetails; +// OrderDetailsPage({@required this.orderModel, this.orderModelDetails}); + + @override + _OrderDetailsPageState createState() => _OrderDetailsPageState(); +} + +class _OrderDetailsPageState extends State { + getLanguageID() async { + languageID = await sharedPref.getString(APP_LANGUAGE); + } + +// AppSharedPreferences sharedPref = AppSharedPreferences(); + late String customerId; + List ordersList = []; + + List cancelledOrderList = []; + +// String orderId="3516"; + var model; + var isCancel = false; + var isRefund = false; + var isActiveDelivery = false; + var dataIsCancel; + var dataIsRefund; + late BuildContext context; + + MyInAppBrowser? browser; + + @override + void initState() { + getLanguageID(); + super.initState(); +// print(widget.orderModel.orderItems.length); + getCancelOrder(widget.orderModel.id); + + print("ID is" + widget.orderModel.id!); +// cancelOrderDetail(order) + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + ProjectViewModel projectViewModel = Provider.of(context); + this.context = context; + return BaseView( + onModelReady: (model) { + model.getOrderDetails(widget.orderModel.id, widget.orderModel.orderGuid).then((value) { + setState(() { + isActiveDelivery = (value.orderStatusId == 995 && (value.driverID != null && value.driverID!.isNotEmpty)); + }); + }); + }, + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).orderDetail, + isShowAppBar: true, + isPharmacy: true, + showPharmacyCart: false, + showHomeAppBarIcon: false, + isBottomBar: true, + baseViewModel: model, + body: model.orderListModel.length > 0 + ? Container( + color: Colors.white, + child: SingleChildScrollView( + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.fromLTRB(10.0, 15.0, 1.0, 5.0), + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/pharmacy/shipping_mark_icon.svg', + width: 28, + height: 28, + ), + Text( + TranslationBase.of(context).shippingAddress, + style: TextStyle( + fontSize: 13.0, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.only(top: 15.0, right: 10.0), + padding: EdgeInsets.only(left: 11.0, right: 11.0), + decoration: BoxDecoration( + border: Border.all( + color: getStatusBackgroundColor()!, + style: BorderStyle.solid, + width: 5.0, + ), + color: getStatusBackgroundColor(), + borderRadius: BorderRadius.circular(30.0)), + child: model.orderListModel[0].orderStatusId == 30 || model.orderListModel[0].orderStatusId == 997 || model.orderListModel[0].orderStatusId == 994 +// deliveredOrderList[index].orderStatusId == 30 + ? Text( +// deliveredOrderList[0].orderStatus.toString().substring(12), + TranslationBase.of(context).deliveredOrder, + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ) + : Text( + projectProvider.isArabic ? model.orderListModel[0].orderStatusn.toString() : model.orderListModel[0].orderStatus.toString(), + style: TextStyle( + color: Colors.white, + fontSize: 13.0, + fontWeight: FontWeight.bold, + ), + ) +// Text( +// languageID == "ar" +// ? model.orderListModel[0].orderStatusn +// : model.orderListModel[0].orderStatus, +//// TranslationBase.of(context).delivered, +// style: TextStyle( +// color: Colors.white, +// fontSize: 13.0, +// fontWeight: FontWeight.bold, +// ), +// ), + ), + ], + ), + Container( + margin: EdgeInsets.only(left: 10.0, top: 13.0), + child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + "${model.orderListModel[0].shippingAddress!.firstName} ${model.orderListModel[0].shippingAddress!.lastName}", + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + ]), + ), + Container( + margin: EdgeInsets.fromLTRB(10.0, 5.0, 1.0, 5.0), + child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + model.orderListModel[0].shippingAddress!.address1.toString(), + style: TextStyle( + fontSize: 10.0, + fontWeight: FontWeight.bold, + color: Colors.grey, + ), + ), + ]), + ), + Container( + margin: EdgeInsets.fromLTRB(10.0, 5.0, 1.0, 5.0), + child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + model.orderListModel[0].shippingAddress!.address2.toString() + + ' ' + + model.orderListModel[0].shippingAddress!.country.toString() + + ' ' + + model.orderListModel[0].shippingAddress!.zipPostalCode.toString(), + style: TextStyle( + fontSize: 10.0, + fontWeight: FontWeight.bold, + color: Colors.grey, + ), + ), + ]), + ), + Container( + child: Row( + children: [ + Container( + margin: EdgeInsets.fromLTRB(10.0, 5.0, 8.0, 5.0), + child: SvgPicture.asset( + 'assets/images/pharmacy/mobile_number_icon.svg', + height: 13, + ), + ), + Container( + margin: EdgeInsets.only(top: 5.0, bottom: 5.0), + child: Text( + model.orderListModel[0].shippingAddress!.phoneNumber.toString(), + style: TextStyle( + fontSize: 15.0, + ), + ), + ), + ], + ), + ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Row( + children: [ + Container( + margin: EdgeInsets.fromLTRB(10.0, 10.0, 5.0, 10.0), + child: SvgPicture.asset( + 'assets/images/pharmacy/shipping_truck_icon.svg', + height: 20, + width: 20, + ), + ), + Container( + margin: EdgeInsets.all(10.0), + child: Text( + TranslationBase.of(context).shippedMethod, + style: TextStyle( + fontSize: 13.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + child: flutterImage.Image.asset( + model.orderListModel[0].shippingRateComputationMethodSystemName != "Shipping.Aramex" + ? "assets/images/pharmacy_module/payment/LogoParmacyGreen.png" + : "assets/images/pharmacy_module/payment/aramex_shipping_logo.png", + fit: BoxFit.contain, + width: 100, + ), + ), +// Container( +// child: widget.orderModel +// .shippingRateComputationMethodSystemName == +// "Shipping.FixedOrByWeight" +// ? Container( +// margin: EdgeInsets.only(bottom: 10.0, top: 10.0), +// child: SvgPicture.asset( +// 'assets/images/pharmacy_module/payment/hmg_shipping_logo.png', +// height: 25, +// width: 25, +// ), +// ) +// : Container( +// margin: EdgeInsets.only(bottom: 10.0, top: 10.0), +// child: SvgPicture.asset( +// 'assets/images/pharmacy_module/payment/aramex_shipping_logo.png', +// height: 25, +// width: 25, +// ), +// ), +// ), + ], + ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 8, + indent: 0, + endIndent: 0, + ), + Row( + children: [ + Container( + margin: EdgeInsets.all(10.0), + child: SvgPicture.asset( + 'assets/images/pharmacy/credit_card_icon.svg', + height: 20, + width: 20, + ), + ), + Container( + margin: EdgeInsets.only(bottom: 10.0, top: 10.0), + child: Text( + model.orderListModel[0].paymentName.toString(), + style: TextStyle( + fontSize: 13.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], + ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 8, + indent: 0, + endIndent: 0, + ), + Container( + padding: EdgeInsets.only(bottom: 15.0), + margin: EdgeInsets.only(left: 10.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).orderDetail, + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + itemCount: model.orderListModel[0].orderItems!.length, + itemBuilder: (context, index) { + return Container( + child: productTile( + productName: projectViewModel.isArabic ? + model.orderListModel[0].orderItems![index].product!.namen.toString() + :model.orderListModel[0].orderItems![index].product!.name.toString(), + productPrice: model.orderListModel[0].orderItems![index!].product!.price!.toString(), + productRate: model.orderListModel[0].orderItems![index].product!.approvedRatingSum!.toDouble(), + productReviews: model.orderListModel[0].orderItems![index].product!.approvedTotalReviews, + totalPrice: "${(model.orderListModel[0].orderItems![index].product!.price! * model.orderListModel![0].orderItems![index].quantity!).toStringAsFixed(2)}", + qyt: model.orderListModel[0].orderItems![index].quantity.toString(), + isOrderDetails: true, + imgs: model.orderListModel[0].orderItems![index].product!.images != null && model.orderListModel[0].orderItems![index].product!.images!.length != 0 + ? model.orderListModel[0].orderItems![index].product!.images![0].src.toString() + : null, + status: model.orderListModel[0].orderStatusId, + product: model.orderListModel[0].orderItems![index].product, + ), + ); + }), + + Container( + padding: EdgeInsets.only(bottom: 10.0), + margin: EdgeInsets.only(left: 10.0, top: 5.0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).orderSummary, + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + padding: EdgeInsets.only(bottom: 10.0), + margin: EdgeInsets.only(top: 5.0, left: 10.0), + child: Text( + TranslationBase.of(context).subtotal, + style: TextStyle( + fontSize: 13.0, + ), + ), + ), + Container( + padding: EdgeInsets.only(bottom: 10.0), + margin: EdgeInsets.fromLTRB(10.0, 5.0, 5.0, 5.0), + child: Row( + children: [ + Container( + margin: EdgeInsets.only(right: 5.0), + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 13.0, + ), + ), + ), + Text( + model.orderListModel[0].orderSubtotalExclTax.toString(), + style: TextStyle( + fontSize: 13.0, + ), + ), + ], + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + padding: EdgeInsets.only(bottom: 10.0), + margin: EdgeInsets.only(top: 5.0, left: 10.0), + child: Text( + TranslationBase.of(context).shipping, + style: TextStyle( + fontSize: 13.0, + ), + ), + ), + Container( + padding: EdgeInsets.only(bottom: 10.0), + margin: EdgeInsets.fromLTRB(10.0, 5.0, 5.0, 5.0), + child: Row( + children: [ + Container( + margin: EdgeInsets.only(right: 5.0), + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 13.0, + ), + ), + ), + Text( + model.orderListModel[0].orderShippingExclTax.toString(), + style: TextStyle( + fontSize: 13.0, + ), + ), + ], + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + padding: EdgeInsets.only(bottom: 10.0), + margin: EdgeInsets.only(top: 5.0, left: 10.0), + child: Text( + TranslationBase.of(context).vat, + style: TextStyle( + fontSize: 13.0, + ), + ), + ), + Container( + padding: EdgeInsets.only(bottom: 10.0), + margin: EdgeInsets.fromLTRB(10.0, 5.0, 5.0, 5.0), + child: Row( + children: [ + Container( + margin: EdgeInsets.only(right: 5.0), + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 13.0, + ), + ), + ), + Text( + model.orderListModel[0].orderTax.toString(), + style: TextStyle( + fontSize: 13.0, + ), + ), + ], + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + margin: EdgeInsets.only(top: 5.0, left: 10.0), + child: Text( + TranslationBase.of(context).total, + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(10.0, 5.0, 5.0, 5.0), + child: Row( + children: [ + Container( + margin: EdgeInsets.only(right: 5.0), + child: Text( + TranslationBase.of(context).sar, + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + ), + Text( + model.orderListModel[0].orderTotal.toString(), + style: TextStyle( + fontSize: 15.0, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + ], + ), + model.orderListModel[0].orderStatusId == 10 + ? InkWell( + onTap: () { + openPayment(model.orderListModel[0], model.user!); + }, + child: Container( + padding: EdgeInsets.only(left: 10.0, right: 10.0), + height: 50.0, + color: Colors.transparent, + child: Container( + padding: EdgeInsets.only(left: 130.0, right: 130.0), + decoration: + BoxDecoration(border: Border.all(color: Colors.green, style: BorderStyle.solid, width: 4.0), color: Colors.green, borderRadius: BorderRadius.circular(5.0)), + child: Center( + child: Text( + TranslationBase.of(context).payOnline, + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + ), + ), + ), + ), + ), + ) + : Container(), +// getCancelOrder(canCancel, canRefund), + isCancel + ? InkWell( + onTap: () { + presentConfirmDialog(model, widget.orderModel.id); + }, + child: Container( +// padding: EdgeInsets.only(left: 13.0, right: 13.0, top: 5.0), + height: 50.0, + color: Colors.transparent, + child: Center( + child: Text( + TranslationBase.of(context).cancelOrder, + style: TextStyle(color: Colors.red[900], fontWeight: FontWeight.bold, decoration: TextDecoration.underline), + ), + ), + ), + ) + : Container(), + isActiveDelivery + ? InkWell( + onTap: () { + // Navigator.push( + // context, + // MaterialPageRoute(builder: (context) => TrackDriver(order: widget.orderModel), + // )); + }, + child: Container( + height: 50.0, + color: Colors.transparent, + child: Center( + child: Text( + TranslationBase.of(context).trackDeliveryDriver, + style: TextStyle(color: Colors.green[900], fontWeight: FontWeight.normal, decoration: TextDecoration.none), + ), + ), + ), + ) + : Container(), + ], + ), + ), + ) + : Container(), + ), + ); + } + + Color? getStatusBackgroundColor() { + print(widget.orderModel.orderStatusId); +// if(orderStatus == 'delivered') + if (widget.orderModel.orderStatusId == 30 || widget.orderModel.orderStatusId == 997 || widget.orderModel.orderStatusId == 994) + return Color(0xFF4CAF50); + else if (widget.orderModel.orderStatusId == 20 || widget.orderModel.orderStatusId == 995 || widget.orderModel.orderStatusId == 998 || widget.orderModel.orderStatusId == 999) + return Colors.grey[500]!; + else if (widget.orderModel.orderStatusId == 10) + return Colors.orange[300]!; + else if (widget.orderModel.orderStatusId == 40 || widget.orderModel.orderStatusId == 996 || widget.orderModel.orderStatusId == 200) return Colors.red[900]!; + } + + getCancelOrder(dataIsCancel) { + if (widget.orderModel.canCancel! && widget.orderModel.canRefund!) { + setState(() { + isCancel = true; + isRefund = false; + }); + } else if (widget.orderModel.canCancel!) { + setState(() { + isCancel = true; + isRefund = false; + }); + } else if (widget.orderModel.canRefund!) { + setState(() { + isCancel = false; + isRefund = true; + }); + } else { + setState(() { + isCancel = false; + isRefund = false; + }); + } + } + +// .getCanceledOrder + presentConfirmDialog(cancelFunction, id) { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).confirmCancellation, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () { + Navigator.pop(context); + cancelFunction.getCanceledOrder(id, context).then((value) { + Navigator.pop(context); + }); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + + getCanceledOrder(order) { + Navigator.pop(context); + if (widget.orderModel.canCancel! && widget.orderModel.canRefund == false) { +// getCanceledOrder(order); +// AppToast.showSuccessToast(message: "Request Sent Successfully"); +// Navigator.push(context, +// MaterialPageRoute(builder: (context) => OrderPage())); + + } + } + + openPayment( + OrderDetailModel order, + AuthenticatedUser authenticatedUser, + ) { + browser = new MyInAppBrowser(onExitCallback: onBrowserExit, onLoadStartCallback: onBrowserLoadStart); + + browser?.openPharmacyPaymentBrowser(order, order.orderTotal, 'ePharmacy Order', order.id!, order.billingAddress!.email!, order.customValuesXml!, + "${authenticatedUser.firstName} ${authenticatedUser.middleName} ${authenticatedUser.lastName}", authenticatedUser.patientID, authenticatedUser, browser!); + } + + onBrowserLoadStart(String url) { + print("onBrowserLoadStart"); + print(url); + + MyInAppBrowser.successURLS.forEach((element) { + if (url.contains(element)) { + if (browser!.isOpened()) browser!.close(); + MyInAppBrowser.isPaymentDone = true; + return; + } + }); + + MyInAppBrowser.errorURLS.forEach((element) { + if (url.contains(element)) { + if (browser!.isOpened()) browser!.close(); + MyInAppBrowser.isPaymentDone = false; + return; + } + }); + } + + onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) { + print("onBrowserExit Called!!!!"); + if (isPaymentMade) { + AppToast.showSuccessToast(message: "شكراً\nPayment status for your order is Paid"); + Navigator.pop(context); + Navigator.pop(context); + } else { + AppToast.showErrorToast(message: "Transaction Failed!\Your transaction is field to some reason please try again or contact to the administration\فشلت العملية حاول مره اخرى"); + } + } +} diff --git a/lib/pages/pharmacy/order/ProductReview.dart b/lib/pages/pharmacy/order/ProductReview.dart new file mode 100644 index 00000000..6e086f34 --- /dev/null +++ b/lib/pages/pharmacy/order/ProductReview.dart @@ -0,0 +1,414 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacy/profile/profile.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/src/widgets/image.dart' as flutterImage; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:flutter_svg/svg.dart'; + +class ProductReviewPage extends StatefulWidget { + final PharmacyProduct product; + + ProductReviewPage(this.product); + + @override + _ProductReviewPageState createState() => _ProductReviewPageState(); +} + +class _ProductReviewPageState extends State { + AppSharedPreferences sharedPref = AppSharedPreferences(); + double currentRating = 0; + String reviewText = ""; + TextEditingController _reviewController = new TextEditingController(); + bool finishReview = false; + + @override + Widget build(BuildContext context) { + double ratingValue = double.parse("${widget.product.approvedRatingSum}"); + return BaseView( + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).writeReview, + isShowAppBar: true, + isPharmacy: true, + showPharmacyCart: false, + showHomeAppBarIcon: false, + isBottomBar: true, + body: Container( + color: Colors.white, + child: !finishReview ? SingleChildScrollView( + child: Column( + children: [ + Container( + margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + widget.product.images != null + ? flutterImage.Image.network( + widget.product.images![0]!.src!, + fit: BoxFit.cover, + height: 80, + ) + : flutterImage.Image.asset( + "assets/images/no_image.png", + fit: BoxFit.cover, + height: 80, + ), + Expanded( + child: Container( + child: Column( + children: [ + Container( + margin: EdgeInsets.all(5), + child: Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: widget.product.name, + style: TextStyle( + color: Colors.black, + fontSize: 14, + fontWeight: FontWeight.normal), + ), + ), + ), + ), + Container( + margin: EdgeInsets.all(5), + child: Align( + alignment: Alignment.topLeft, + child: RichText( + text: TextSpan( + text: + '${widget.product.price} ${TranslationBase.of(context).sar}', + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.black, + fontSize: 13), + ), + ), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + child: Align( + alignment: Alignment.topLeft, + child: + + // RatingBar.readOnly( + // initialRating: ratingValue, + // size: 15.0, + // filledColor: Colors.yellow[700], + // emptyColor: Colors.grey[500], + // isHalfAllowed: true, + // halfFilledIcon: Icons.star_half, + // filledIcon: Icons.star, + // emptyIcon: Icons.star, + // ), + // + // + RatingBar( + initialRating: ratingValue, + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon(Icons.star, color: CustomColors.accentColor,), + half: Icon(Icons.star_half, color: CustomColors.accentColor,), + empty: Icon(Icons.star, color: CustomColors.accentColor,), + ), + tapOnlyMode: true, + unratedColor: Colors.grey[500], + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + ) + ), + ), + SizedBox( + width: 20, + ), + Container( + child: Align( + child: RichText( + text: TextSpan( + text: + '(${widget.product.approvedTotalReviews} ${TranslationBase.of(context).reviews})', + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.grey, + fontSize: 13), + ), + ), + ), + ), + ], + ), + ], + ), + ), + ), + ]), + ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 8, + indent: 0, + endIndent: 0, + ), + Container( + margin: EdgeInsets.only(top: 12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisSize: MainAxisSize.max, + children: [ + // RatingBar( + // size: 40.0, + // filledColor: Colors.yellow[700], + // emptyColor: Colors.grey[500], + // isHalfAllowed: true, + // halfFilledIcon: Icons.star_half, + // filledIcon: Icons.star, + // emptyIcon: Icons.star, + // onRatingChanged: (rating) { + // currentRating = rating; + // }, + // ), + + RatingBar( + initialRating: ratingValue, + direction: Axis.horizontal, + allowHalfRating: true, + itemCount: 5, + itemSize: 20, + ignoreGestures: true, + ratingWidget: RatingWidget( + full: Icon(Icons.star, color: CustomColors.accentColor,), + half: Icon(Icons.star_half, color: CustomColors.accentColor,), + empty: Icon(Icons.star, color: CustomColors.accentColor,), + ), + tapOnlyMode: true, + unratedColor: Colors.grey[500], + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + onRatingUpdate: (rating) { + print(rating); + }, + ) + + ], + ), + ), + Container( + padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + child: Column( + children: [ + TextFormField( + controller: _reviewController, + maxLines: 6, + minLines: 4, + decoration: InputDecoration( + border: InputBorder.none, + hintText: 'Tell us more about product!', + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0), + borderSide: + BorderSide(width: 1, color: Colors.grey[400]!), + ), + enabledBorder: OutlineInputBorder( + borderRadius: + BorderRadius.all(Radius.circular(5.0)), + borderSide: + BorderSide(color: Colors.grey[400]!, width: 1), + ), + ), + onChanged: (value) { + setState(() { + reviewText = value; + }); + }, + textAlign: TextAlign.start, + textAlignVertical: TextAlignVertical.top, + ), + ], + ), + ), + InkWell( + onTap: reviewText != null && reviewText != "" + ? () { + model + .makeReview( + widget.product, ratingValue, reviewText) + .then((value) { + setState(() { + finishReview = true; + }); + }); + } + : null, + child: Container( + margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), + height: 50.0, + width: 400.0, + color: Colors.transparent, + child: Container( + decoration: BoxDecoration( + border: Border.all( + color: _reviewController!.value.text! != null && + _reviewController!.value.text! != "" + ? Colors.yellow[700]! + : Color(0xFFf5d69c), + style: BorderStyle.solid, + width: 1.0), + color: _reviewController.value.text != null && + _reviewController.value.text != "" + ? Colors.yellow[700] + : Color(0xFFf5d69c), + borderRadius: BorderRadius.circular(5.0)), + child: Center( + child: Text( + TranslationBase.of(context).shareReview, + style: TextStyle( + color: Colors.white, + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ), + ), + ), + ], + ), + ) : getReviewedProduct(), + ), + ), + ); + } + + //new screen is showing after submitting the review + Widget getReviewedProduct() { + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SvgPicture.asset( + 'assets/images/pharmacy/check_icon.svg', + width: 28, + height: 28, + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 8), + child: Text( + TranslationBase.of(context).reviewSuccessful, + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ], + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 8, vertical: 8), + child: Text( + TranslationBase.of(context).reviewShared, + style: TextStyle( + fontSize: 15.0, + ), + ), + ), + Container( + margin: EdgeInsets.only(bottom: 30.0, top: 30.0), + child: SvgPicture.asset( + 'assets/images/pharmacy/success_review_icon.svg', + width: 100, + height: 100, + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SvgPicture.asset( + 'assets/images/pharmacy/quote_start.svg', + width: 15, + height: 15, + ), + ], + ), + Text( + TranslationBase.of(context).reviewComment, + style: TextStyle( + fontSize: 15.0, + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + SvgPicture.asset( + 'assets/images/pharmacy/quote_end.svg', + width: 15, + height: 15, + ), + ], + ), + ], + ), + ), + // Container( + // margin: EdgeInsets.only(top: 20.0), + // child: InkWell( + // onTap: () { + // Navigator.push( + // context, + // MaterialPageRoute(builder: (context) { + // return PharmacyProfilePage(moveToOrder: true); + // }), + // ); + // }, + // child: Container( + // height: 50.0, + // color: Colors.transparent, + // child: Container( + // decoration: BoxDecoration( + // border: Border.all( + // color: Colors.orange, + // style: BorderStyle.solid, + // width: 1.0), + // color: Colors.transparent, + // borderRadius: BorderRadius.circular(5.0)), + // child: Center( + // child: Text( + // TranslationBase.of(context).backMyAccount, + // style: TextStyle( + // color: Colors.orange, + // fontWeight: FontWeight.bold, + // ), + // ), + // ), + // ), + // ), + // ), + // ), + ], + ); + } + +} diff --git a/lib/pages/pharmacy/order/TrackDriver.dart b/lib/pages/pharmacy/order/TrackDriver.dart new file mode 100644 index 00000000..21b2572f --- /dev/null +++ b/lib/pages/pharmacy/order/TrackDriver.dart @@ -0,0 +1,341 @@ +// import 'dart:async'; +// import 'dart:typed_data'; +// import 'dart:ui' as ui; +// +// import 'package:async/async.dart'; +// import 'package:diplomaticquarterapp/config/config.dart'; +// import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; +// import 'package:diplomaticquarterapp/core/service/parmacyModule/order-preview-service.dart'; +// import 'package:diplomaticquarterapp/locator.dart'; +// import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +// import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +// import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter/services.dart'; +// import 'package:flutter_animarker/lat_lng_interpolation.dart'; +// import 'package:flutter_animarker/models/lat_lng_delta.dart'; +// import 'package:flutter_animarker/models/lat_lng_info.dart'; +// import 'package:flutter_polyline_points/flutter_polyline_points.dart'; +// import 'package:google_maps_flutter/google_maps_flutter.dart'; +// import 'package:location/location.dart'; +// +// class TrackDriver extends StatefulWidget { +// final OrderDetailModel order; +// TrackDriver({this.order}); +// +// @override +// State createState() => _TrackDriverState(); +// } +// +// class _TrackDriverState extends State { +// OrderPreviewService _orderServices = locator(); +// OrderDetailModel _order; +// +// Completer _controller = Completer(); +// +// +// double CAMERA_ZOOM = 14; +// double CAMERA_TILT = 0; +// double CAMERA_BEARING = 30; +// LatLng SOURCE_LOCATION = null; +// LatLng DEST_LOCATION = null; +// +// // for my drawn routes on the map +// Set _polylines = Set(); +// List polylineCoordinates = []; +// PolylinePoints polylinePoints; +// +// Set _markers = Set(); +// +// BitmapDescriptor sourceIcon; // for my custom marker pins +// BitmapDescriptor destinationIcon; // for my custom marker pins +// Location location;// wrapper around the location API +// +// +// int locationUpdateFreq = 2; +// LatLngInterpolationStream _latLngStream; +// StreamGroup subscriptions; +// +// @override +// void initState() { +// super.initState(); +// +// _order = widget.order; +// DEST_LOCATION = _order.shippingAddress.getLocation(); +// location = new Location(); +// polylinePoints = PolylinePoints(); +// setSourceAndDestinationIcons(); +// +// initMarkerUpdateStream(); +// startUpdatingDriverLocation(); +// +// } +// +// @override +// void dispose() { +// super.dispose(); +// subscriptions.close(); +// _latLngStream.cancel(); +// stopUpdatingDriverLocation(); +// } +// +// initMarkerUpdateStream(){ +// _latLngStream = LatLngInterpolationStream(movementDuration: Duration(seconds: locationUpdateFreq+1)); +// subscriptions = StreamGroup(); +// +// subscriptions.add(_latLngStream.getAnimatedPosition('sourcePin')); +// subscriptions.stream.listen((LatLngDelta delta) { +// //Update the marker with animation +// setState(() { +// //Get the marker Id for this animation +// var markerId = MarkerId(delta.markerId); +// Marker sourceMarker = Marker( +// markerId: markerId, +// // rotation: delta.rotation, +// icon: sourceIcon, +// position: LatLng( +// delta.from.latitude, +// delta.from.longitude, +// ), +// onTap: onSourceMarkerTap +// ); +// +// _markers.removeWhere((m) => m.markerId.value == 'sourcePin'); +// _markers.add(sourceMarker); +// }); +// }); +// } +// +// @override +// Widget build(BuildContext context) { +// +// return AppScaffold( +// appBarTitle: TranslationBase.of(context).deliveryDriverTrack, +// isShowAppBar: true, +// isPharmacy: true, +// showPharmacyCart: false, +// showHomeAppBarIcon: false, +// body: GoogleMap( +// myLocationEnabled: true, +// compassEnabled: true, +// markers: _markers, +// polylines: _polylines, +// mapType: MapType.normal, +// initialCameraPosition: CameraPosition(target: DEST_LOCATION, zoom: 4), +// onMapCreated: (GoogleMapController controller) { +// _controller.complete(controller); +// // showPinsOnMap(); +// }, +// ), +// // floatingActionButton: FloatingActionButton.extended( +// // onPressed: _goToDriver, +// // label: Text('To the lake!'), +// // icon: Icon(Icons.directions_boat), +// // ), +// ); +// } +// +// +// void setSourceAndDestinationIcons() async { +// final Uint8List srcMarkerBytes = await getBytesFromAsset('assets/images/map_markers/source_map_marker.png', getMarkerIconSize()); +// final Uint8List destMarkerBytes = await getBytesFromAsset('assets/images/map_markers/destination_map_marker.png', getMarkerIconSize()); +// sourceIcon = await BitmapDescriptor.fromBytes(srcMarkerBytes); +// destinationIcon = await BitmapDescriptor.fromBytes(destMarkerBytes); +// } +// +// CameraPosition _orderDeliveryLocationCamera(){ +// if(DEST_LOCATION != null){ +// final CameraPosition orderDeliveryLocCamera = CameraPosition( +// bearing: CAMERA_BEARING, +// target: DEST_LOCATION, +// tilt: CAMERA_TILT, +// zoom: CAMERA_ZOOM); +// return orderDeliveryLocCamera; +// } +// return null; +// } +// +// CameraPosition _driverLocationCamera(){ +// if(DEST_LOCATION != null) { +// final CameraPosition driverLocCamera = CameraPosition( +// bearing: CAMERA_BEARING, +// target: SOURCE_LOCATION, +// tilt: CAMERA_TILT, +// zoom: CAMERA_ZOOM); +// return driverLocCamera; +// } +// return null; +// } +// +// +// Future _goToOrderDeliveryLocation() async { +// final GoogleMapController controller = await _controller.future; +// final CameraPosition orderDeliveryLocCamera = _orderDeliveryLocationCamera(); +// controller.animateCamera(CameraUpdate.newCameraPosition(orderDeliveryLocCamera)); +// } +// +// Future _goToDriver() async { +// final GoogleMapController controller = await _controller.future; +// final CameraPosition driverLocCamera = _driverLocationCamera(); +// controller.animateCamera(CameraUpdate.newCameraPosition(driverLocCamera)); +// } +// +// +// void showPinsOnMap() { +// // source pin +// if(SOURCE_LOCATION != null){ +// setState(() { +// var pinPosition = SOURCE_LOCATION; +// _markers.removeWhere((m) => m.markerId.value == 'sourcePin'); +// _markers.add(Marker( +// markerId: MarkerId('sourcePin'), +// position: pinPosition, +// icon: sourceIcon, +// infoWindow: InfoWindow(title: TranslationBase.of(context).driver), +// onTap: onSourceMarkerTap +// )); +// }); +// } +// +// // destination pin +// if(DEST_LOCATION != null){ +// setState(() { +// var destPosition = DEST_LOCATION; +// _markers.removeWhere((m) => m.markerId.value == 'destPin'); +// _markers.add(Marker( +// markerId: MarkerId('destPin'), +// position: destPosition, +// icon: destinationIcon, +// infoWindow: InfoWindow(title: TranslationBase.of(context).deliveryLocation), +// onTap: onDestinationMarkerTap +// )); +// }); +// } +// // set the route lines on the map from source to destination +// // for more info follow this tutorial +// // drawRoute(); +// } +// +// void updatePinOnMap() async { +// _latLngStream.addLatLng(LatLngInfo(SOURCE_LOCATION.latitude, SOURCE_LOCATION.longitude, "sourcePin")); +// drawRoute(); +// } +// +// void drawRoute() async { +// return; // Ignore draw Route +// +// List result = await polylinePoints.getRouteBetweenCoordinates( +// GOOGLE_API_KEY, +// SOURCE_LOCATION.latitude, +// SOURCE_LOCATION.longitude, +// DEST_LOCATION.latitude, +// DEST_LOCATION.longitude); +// if(result.isNotEmpty){ +// result.forEach((PointLatLng point){ +// polylineCoordinates.add( +// LatLng(point.latitude,point.longitude) +// ); +// }); +// setState(() { +// _polylines.add(Polyline( +// width: 5, // set the width of the polylines +// polylineId: PolylineId('poly'), +// color: Color.fromARGB(255, 40, 122, 198), +// points: polylineCoordinates +// )); +// }); +// } +// } +// +// bool isLocationUpdating = false; +// startUpdatingDriverLocation({int frequencyInSeconds = 2}) async{ +// isLocationUpdating = true; +// int driverId = int.tryParse(_order.driverID); +// +// Future.doWhile(() async{ +// if(isLocationUpdating){ +// +// await Future.delayed(Duration(seconds: frequencyInSeconds)); +// +// showLoading(); +// LatLng driverLocation = (await _orderServices.getDriverLocation(driverId)); +// hideLoading(); +// +// if(driverLocation != null){ +// if(SOURCE_LOCATION == null || DEST_LOCATION == null){ +// SOURCE_LOCATION = driverLocation; +// DEST_LOCATION = _order.shippingAddress.getLocation(); +// showPinsOnMap(); +// } +// SOURCE_LOCATION = driverLocation; +// updatePinOnMap(); +// updateMapCamera(); +// }else{ +// GifLoaderDialogUtils.hideDialog(context); +// } +// } +// return isLocationUpdating; +// +// }); +// } +// +// showLoading(){ +// if(SOURCE_LOCATION == null){ +// GifLoaderDialogUtils.showMyDialog(context); +// } +// } +// +// hideLoading(){ +// if(SOURCE_LOCATION == null){ +// GifLoaderDialogUtils.hideDialog(context); +// } +// } +// +// stopUpdatingDriverLocation(){ +// isLocationUpdating = false; +// } +// +// Future getBytesFromAsset(String path, int width) async { +// ByteData data = await rootBundle.load(path); +// ui.Codec codec = await ui.instantiateImageCodec(data.buffer.asUint8List(), targetWidth: width); +// ui.FrameInfo fi = await codec.getNextFrame(); +// return (await fi.image.toByteData(format: ui.ImageByteFormat.png)).buffer.asUint8List(); +// } +// +// int getMarkerIconSize(){ +// return 140; +// } +// +// updateMapCamera() async{ +// if(SOURCE_LOCATION != null && DEST_LOCATION != null){ +// +// // 'package:google_maps_flutter_platform_interface/src/types/location.dart': Failed assertion: line 72 pos 16: 'southwest.latitude <= northeast.latitude': is not true. +// LatLngBounds bound; +// if(SOURCE_LOCATION.latitude <= DEST_LOCATION.latitude){ +// bound = LatLngBounds(southwest: SOURCE_LOCATION, northeast: DEST_LOCATION); +// }else{ +// bound = LatLngBounds(southwest: DEST_LOCATION, northeast: SOURCE_LOCATION); +// } +// +// if(bound == null) +// return; +// +// CameraUpdate camera = CameraUpdate.newLatLngBounds(bound, 50); +// final GoogleMapController controller = await _controller.future; +// controller.animateCamera(camera); +// } +// } +// +// bool showSrcMarkerTitle = false; +// onSourceMarkerTap() async{ +// // showSrcMarkerTitle = !showSrcMarkerTitle; +// } +// +// bool showDestMarkerTitle = false; +// onDestinationMarkerTap() async{ +// // showDestMarkerTitle = !showDestMarkerTitle; +// // Marker m = _markers.firstWhere((m) => m.markerId.value == 'destPin'); +// // if(showDestMarkerTitle){ +// // } +// } +// } diff --git a/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart b/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart new file mode 100644 index 00000000..de0b65b2 --- /dev/null +++ b/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart @@ -0,0 +1,205 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/app_map/google_huawei_map.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:geocoding/geocoding.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:provider/provider.dart'; + +class AddAddressPage extends StatefulWidget { + final AddressInfo editedAddress; + final Function(Placemark, String) onPick; + + AddAddressPage(this.editedAddress, this.onPick); + + @override + _AddAddressPageState createState() => _AddAddressPageState(); +} + +class _AddAddressPageState extends State { + double? _latitude; + double? _longitude; + AppMap? appMap; + AppSharedPreferences? sharedPref = AppSharedPreferences(); + LatLng? currentPostion; + Completer mapController = Completer(); + Placemark? selectedPlace; + LocationUtils? locationUtils; + + static CameraPosition _kGooglePlex = CameraPosition( + target: LatLng(37.42796133580664, -122.085749655962), + zoom: 14.4746, + ); + + @override + void initState() { + super.initState(); + + if (widget.editedAddress != null && widget.editedAddress.latLong != null && widget.editedAddress.latLong != "") { + List latLng = widget.editedAddress.latLong!.split(","); + _latitude = double.parse(latLng[0]); + _longitude = double.parse(latLng[1]); + } else { + _getCurrentLocation(); + } + // setState(() {}); + + appMap = AppMap( + _kGooglePlex!.toMap() as Map, + onCameraMove: () { + _updatePosition(_kGooglePlex); + }, + onMapCreated: () { + currentPostion = LatLng(_latitude!, _longitude!); + // latitude = widget.latitude; + // longitude = widget.longitude; + setMap(); + setState(() {}); + }, + onCameraIdle: () async { + List placemarks = await placemarkFromCoordinates(_latitude!, _longitude!); + selectedPlace = placemarks[0]; + print(selectedPlace); + }, + ); + } + + setMap() { + setState(() { + _kGooglePlex = CameraPosition( + target: currentPostion!, + zoom: 14.4746, + ); + appMap!.moveTo(cameraPostion: _kGooglePlex); + }); + } + + void _updatePosition(CameraPosition _position) { + _latitude = _position.target.latitude; + _longitude = _position.target.longitude; + print(_position); + } + + _getCurrentLocation() async { + if (await this.sharedPref!.getDouble(USER_LAT) != null && await this.sharedPref!.getDouble(USER_LONG) != null) { + var lat = await this.sharedPref!.getDouble(USER_LAT); + var long = await this.sharedPref!.getDouble(USER_LONG); + _latitude = lat; + _longitude = long; + currentPostion = LatLng(lat, long); + setMap(); + } else { + locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context); + locationUtils!.getCurrentLocation(callBack: (value) { + print(value); + setMap(); + }); + } + + // await Geolocator.getLastKnownPosition().then((value) { + // _latitude = value.latitude; + // _longitude = value.longitude; + // }).catchError((e) { + // _longitude = 0; + // _latitude = 0; + // }); + } + + @override + Widget build(BuildContext context) { + final mediaQuery = MediaQuery.of(context); + final height = mediaQuery.size.height - 60 - mediaQuery.padding.top; + ProjectViewModel projectViewModel = Provider.of(context); + + return BaseView( + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).changeAddress, + isShowAppBar: true, + isPharmacy: true, + backgroundColor: Colors.white, + showNewAppBarTitle: true, + showNewAppBar: true, + body: Column( + children: [ + Expanded( + child: Stack( + alignment: Alignment.center, + children: [ + if (appMap != null) appMap!, + Container( + margin: EdgeInsets.only(bottom: 50.0), + child: Icon( + Icons.place, + color: CustomColors.accentColor, + size: 50, + ), + ), + ], + ), + ), + Container( + padding: const EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14), + child: DefaultButton(TranslationBase.of(context).addNewAddress, () async { + // AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel( + // customer: Customer(addresses: [ + // Addresses( + // address1: selectedPlace.name, + // address2: selectedPlace.street, + // customerAttributes: "", + // city: selectedPlace.locality, + // createdOnUtc: "", + // id: "0", + // faxNumber: "", + // phoneNumber: projectViewModel.user.mobileNumber, + // province: selectedPlace.locality, + // countryId: 69, + // latLong: "$_latitude,$_longitude", + // country: selectedPlace.country, + // zipPostalCode: selectedPlace.postalCode, + // email: projectViewModel.user.emailAddress) + // ]), + // ); + + widget.onPick(selectedPlace!, "$_latitude,$_longitude"); + Navigator.of(context).pop(); + + // await model.addAddressInfo(addNewAddressRequestModel: addNewAddressRequestModel); + // if (model.state == ViewState.ErrorLocal) { + // Utils.showErrorToast(model.error); + // } else { + // AppToast.showSuccessToast(message: "Address Added Successfully"); + // } + // Navigator.of(context).pop(addNewAddressRequestModel); + }), + ), + ], + ), + + // Container( + // height: height * 1, + // child: PickupLocationFromMap( + // latitude: _latitude ?? 0, + // longitude: _longitude ?? 0, + // isWithAppBar: false, + // buttonColor: Color(0xFF5AB145), + // buttonLabel: TranslationBase.of(context).save, + // onPick: (value) { + // widget.onPick(value); + // }, + // ), + ), + ); + // ); + } +} diff --git a/lib/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart b/lib/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart new file mode 100644 index 00000000..36f5578e --- /dev/null +++ b/lib/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart @@ -0,0 +1,367 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/payment-method-select-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/AddAddress.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +///TODO Elham* split this to tow files +class PharmacyAddressesPage extends StatefulWidget { + final OrderPreviewViewModel? orderPreviewViewModel; + final Function? changeMainState; + + final bool isUpdate; + final bool isShippingAddress; + + const PharmacyAddressesPage({Key? key, this.orderPreviewViewModel, this.isUpdate = false, this.isShippingAddress = false, this.changeMainState}) : super(key: key); + + @override + _PharmacyAddressesState createState() => _PharmacyAddressesState(); +} + +class _PharmacyAddressesState extends State { + void navigateToAddressPage(BuildContext ctx, PharmacyAddressesViewModel model, AddressInfo address) { + Navigator.push( + ctx, + FadePage( + page: AddAddressPage( + address, + (pickResult, latLong) async { + await model.addEditAddress(pickResult, address, latLong: latLong); + }, + ), + ), + ).then((value) async { + // await model.getAddressesList(); + }); + } + + Widget build(BuildContext context) { + final mediaQuery = MediaQuery.of(context); + final height = mediaQuery.size.height - 60 - mediaQuery.padding.top; + ProjectViewModel projectProvider = Provider.of(context); + + return BaseView( + onModelReady: (model) => model.getAddressesList(), + builder: (_, model, wi) => AppScaffold( + appBarTitle: widget.isUpdate ? TranslationBase.of(context).changeAddress : TranslationBase.of(context).addAddress, + isShowAppBar: true, + isPharmacy: true, + baseViewModel: model, + backgroundColor: Colors.white, + body: Container( + height: widget.isShippingAddress ? height * 0.90 : height * 0.99, + child: SingleChildScrollView( + child: Column( + children: [ + ...List.generate( + model.addresses != null ? model.addresses.length : 0, + (index) => AddressItemWidget( + model, + model.addresses[index], + () { + setState(() { + model.setSelectedAddressIndex(index); + }); + }, + model.selectedAddressIndex == index, + (address) { + navigateToAddressPage(context, model, address); + }), + ), + Container( + color: Colors.white, + margin: EdgeInsets.all(8), + child: BorderedButton( + TranslationBase.of(context).addAddress, + hasBorder: true, + borderColor: Color(0xFF0fca6d), + textColor: Color(0xFF0fca6d), + fontWeight: FontWeight.bold, + backgroundColor: Colors.white, + fontSize: 14, + vPadding: 12, + hasShadow: true, + handler: () { + navigateToAddressPage(context, model, AddressInfo()); + }, + ), + ), + SizedBox( + height: height * 0.10, + ) + ], + ), + ), + ), + bottomSheet: widget.isShippingAddress + ? Container( + height: height * 0.10, + color: Colors.white, + child: Column( + children: [ + Divider( + color: Colors.grey.shade300, + height: 1, + thickness: 1, + indent: 0, + endIndent: 0, + ), + Container( + padding: EdgeInsets.symmetric(horizontal: 12, vertical: 8), + child: BorderedButton( + TranslationBase.of(context).confirmAddress, + hasBorder: true, + borderColor: Color(0xFF5AB145), + textColor: Colors.white, + fontWeight: FontWeight.bold, + backgroundColor: Color(0xFF5AB145), + fontSize: 14, + vPadding: 8, + handler: () async { + widget.orderPreviewViewModel!.paymentCheckoutData.address = Addresses.fromJson(model.addresses[model.selectedAddressIndex].toJson()); + GifLoaderDialogUtils.showMyDialog(context); + await widget.orderPreviewViewModel!.getInformationsByAddress(projectProvider.user!.patientIdentificationNo!); + if (widget.orderPreviewViewModel!.error == "") { + await widget.orderPreviewViewModel!.getShoppingCart(); + GifLoaderDialogUtils.hideDialog(context); + model.saveSelectedAddressLocally(model.addresses[model.selectedAddressIndex]); + _navigateToPaymentOption(model); + } else { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: widget.orderPreviewViewModel!.error); + return; + } + }, + ), + ), + ], + ), + ) + : SizedBox(), + ), + ); + } + + _navigateToPaymentOption(model) { + if (widget.isUpdate) { + widget.orderPreviewViewModel!.paymentCheckoutData.address = Addresses.fromJson(model.addresses[model.selectedAddressIndex].toJson()); + widget.changeMainState!(); + Navigator.pop(context); + + return; + } + Navigator.push( + context, + FadePage( + page: PaymentMethodSelectPage( + model: widget.orderPreviewViewModel!, + ))).then((result) => { + setState(() { + if (result != null) { + var paymentOption = result; + widget.orderPreviewViewModel!.paymentCheckoutData!.paymentOption = paymentOption; + } + // widget.changeMainState(); + }) + }); + } +} + +class AddressItemWidget extends StatefulWidget { + final PharmacyAddressesViewModel model; + final AddressInfo address; + final VoidCallback selectAddress; + final bool isSelected; + final Function(AddressInfo) onTabEditAddress; + + AddressItemWidget(this.model, this.address, this.selectAddress, this.isSelected, this.onTabEditAddress); + + @override + _AddressItemWidgetState createState() => _AddressItemWidgetState(); +} + +class _AddressItemWidgetState extends State { + @override + Widget build(BuildContext context) { + return Container( + color: Colors.white, + child: Padding( + padding: EdgeInsets.symmetric(vertical: 8, horizontal: 0), + child: Column( + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InkWell( + onTap: widget!.selectAddress!, + child: Container( + margin: EdgeInsets.only(left: 16, right: 16), + child: Padding( + padding: const EdgeInsets.all(5.0), + child: Container( + decoration: new BoxDecoration( + color: !widget.isSelected ? Colors.white : Colors.green, + shape: BoxShape.circle, + border: Border.all(color: Colors.grey, style: BorderStyle.solid, width: 1.0), + ), + child: Padding( + padding: const EdgeInsets.all(0.0), + child: Icon( + Icons.check, + color: widget.isSelected ? Colors.white : Colors.transparent, + size: 25, + ), + ), + ), + ), + ), + ), + ], + ), + Expanded( + child: Container( + child: Container( + margin: EdgeInsets.symmetric(vertical: 12, horizontal: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.symmetric(vertical: 0), + child: Texts( + "${widget.address.firstName} ${widget.address.lastName}", + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 4), + child: Texts( + "${widget.address.address1} ${widget.address.address2} ${widget.address.address2},, ${widget.address.city}, ${widget.address.country} ${widget.address.zipPostalCode}", + fontSize: 12, + fontWeight: FontWeight.normal, + color: Colors.grey.shade500, + ), + ), + Row( + children: [ + Container( + margin: const EdgeInsets.only(right: 8), + child: Icon( + Icons.phone, + size: 20, + color: Colors.black, + ), + ), + Texts( + "${widget.address.phoneNumber}", + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.grey, + ), + ], + ), + SizedBox( + height: 10, + ), + Container( + height: 25, + child: Row( + children: [ + BorderedButton( + TranslationBase.of(context).edit, + backgroundColor: Colors.transparent, + hasBorder: true, + borderColor: Colors.transparent, + textColor: Color(0x990000FF), + handler: () { + widget.onTabEditAddress(widget.address); + }, + icon: Icon( + Icons.edit, + size: 15, + color: Color(0x990000FF), + ), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 8), + child: SizedBox( + child: Container( + width: 1, + color: Colors.grey.shade400, + ), + ), + ), + BorderedButton( + TranslationBase.of(context).delete, + backgroundColor: Colors.transparent, + hasBorder: true, + borderColor: Colors.transparent, + textColor: Color(0x99FF0000), + handler: () { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + title: TranslationBase.of(context).deleteAddress, + confirmMessage: "${widget.address.address1} ${widget.address.address2}", + okText: TranslationBase.of(context).delete, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () => { + ConfirmDialog.closeAlertDialog(context), + setState(() { + widget.model.deleteAddresses(widget.address).then((_) { + AppToast.showSuccessToast( + message: TranslationBase.of(context).deletedAddress, + ); + // widget.model.getAddressesList(); + }); + }), + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + }, + icon: Icon( + Icons.delete, + size: 15, + color: Color(0x99FF0000), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ), + ], + ), + Divider( + color: Colors.grey.shade200, + height: 10, + thickness: 10, + indent: 0, + endIndent: 0, + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/pharmacy/pharmacyContacts.dart b/lib/pages/pharmacy/pharmacyContacts.dart new file mode 100644 index 00000000..ab9e56d7 --- /dev/null +++ b/lib/pages/pharmacy/pharmacyContacts.dart @@ -0,0 +1,329 @@ +import 'dart:io' show Platform; + +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:maps_launcher/maps_launcher.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; +import 'package:map_launcher/map_launcher.dart'; +import 'dart:io' show Platform; + +class pharmacyContactsPage extends StatefulWidget { + @override + _pharmacyContactsPageState createState() => _pharmacyContactsPageState(); +} + +class _pharmacyContactsPageState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + final latitude = "24.704016"; + final longitude = "46.676691"; + final phone = "+966112833400"; + final whatsApp = "+966558434444"; + final whatappURL_android = "whatsapp://send?phone=" + whatsApp; + final whatappURL_ios = "https://wa.me/$whatsApp"; + final locationDescription = "Main Pharmacy OLAYA"; + + return AppScaffold( + appBarTitle: TranslationBase.of(context).contactUs, + isShowAppBar: true, + isShowDecPage: false, + isPharmacy: true, + showPharmacyCart: false, + showHomeAppBarIcon: false, + isMainPharmacyPages: true, + isBottomBar: true, + body: Column( + children: [ + Card( + elevation: 2, + shape: RoundedRectangleBorder( + side: BorderSide(color: Colors.grey[300]!, width: 2), + borderRadius: BorderRadius.circular(10), + ), + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 8, + ), + child: Container( + margin: EdgeInsets.all(10), + padding: EdgeInsets.fromLTRB(5, 15, 5, 5), + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(15), + ), + ), + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: projectViewModel.isArabic ? + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text("أوقات عمل مركز الخدمات الصيدلانية:", + //TranslationBase.of(context).contactUsTime, + style: TextStyle( + color: Colors.grey[700], + fontSize: 18, + fontWeight: FontWeight.bold, + letterSpacing: -0.68)), + SizedBox(height: 8), + Text(" السبت - الأربعاء : من 8 صباحاً إلى 10 مساءً ", + //TranslationBase.of(context).contactUsTime, + style: TextStyle( + color: Colors.grey[700], + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.68)), + SizedBox(height: 5), + Text("الــــخـــمــــيـــس : من 8 صباحاً إلى 8 مساءً", + //TranslationBase.of(context).contactUsTime, + style: TextStyle( + color: Colors.grey[700], + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.68)), + SizedBox(height: 5), + Text("الـــجــــمـــــعـــــة : من 2 ظـهـراً إلى 8 مساءً", + //TranslationBase.of(context).contactUsTime, + style: TextStyle( + color: Colors.grey[700], + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.68)), + ], + ):Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text("Pharmaceutical Service Center working hours: ", + //TranslationBase.of(context).contactUsTime, + style: TextStyle( + color: Colors.grey[700], + fontSize: 16, + fontWeight: FontWeight.bold, + letterSpacing: -0.68)), + SizedBox(height: 8), + Text("Sat – Wed: from 8 AM to 10 PM", + //TranslationBase.of(context).contactUsTime, + style: TextStyle( + color: Colors.grey[700], + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.68)), + SizedBox(height: 5), + Text("Thursday: from 8 AM to 8 PM", + //TranslationBase.of(context).contactUsTime, + style: TextStyle( + color: Colors.grey[700], + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.68)), + SizedBox(height: 5), + Text("Friday : from 2 PM to 8 PM", + //TranslationBase.of(context).contactUsTime, + style: TextStyle( + color: Colors.grey[700], + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.68)), + ], + ), + + ), + SizedBox( + height: 20, + ), + Row( + children: [ + InkWell( + onTap: () { + launch("tel://" + phone); + }, + child: SvgPicture.asset( + 'assets/images/pharmacy/call.svg', + width: 20, + height: 20, + ), + ), + SizedBox( + width: 20, + ), + Text(TranslationBase.of(context).phone, + style: TextStyle( + color: Colors.grey[700], + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.68)), + SizedBox( + width: 30, + ), + Directionality( + textDirection: TextDirection.ltr, + child: Text("+966" +"-11-2833400", + style: TextStyle( + color: Colors.grey[700], + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.68)), + ), + ], + ), + SizedBox( + height: 30, + ), + Row( + children: [ + InkWell( + onTap: () { + // launch('whatsapp://send?phone='+whatsApp); + openWhatsApp(); + }, + child: SvgPicture.asset( + 'assets/images/pharmacy/whatsapp.svg', + width: 20, + height: 20, + ), + ), + SizedBox( + width: 20, + ), + Text(TranslationBase.of(context).whatsApp, + style: TextStyle( + color: Colors.grey[700], + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.68)), + SizedBox( + width: 30, + ), + Text(projectViewModel.isArabic ? "558434444 " + " 966+" :"+966 " + " 558434444", + style: TextStyle( + color: Colors.grey[700], + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.68)), + ], + ), + SizedBox( + height: 30, + ), + Padding( + padding: const EdgeInsets.all(5.0), + child: Row( + children: [ + InkWell( + onTap: () { + if (Platform.isIOS) { MapLauncher.showMarker( + mapType: MapType.apple, + coords: Coords(double.parse(latitude), + double.parse(longitude)), + title: locationDescription,); + } else { MapLauncher.showMarker( + mapType: MapType.google, + coords: Coords(double.parse(latitude), + double.parse(longitude)), + title: locationDescription, + // description: location.locationName, + ); } + // MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude), previousModel.productLocationService[index].locationDescription); + }, +// MapsLauncher.launchCoordinates( +// double.parse(latitude), +// double.parse(longitude)); +// }, + child: SvgPicture.asset( + 'assets/images/pharmacy/location.svg', + width: 20, + height: 20, + ), + ), + SizedBox( + width: 20, + ), + Expanded( + child: Text( + TranslationBase.of(context).contactUsLocation, + style: TextStyle( + color: Colors.grey[700], + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.68)), + ), + ], + ), + ), + SizedBox( + height: 50, + ), + Center( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + IconButton( + icon: new Image.asset( + 'assets/images/new-design/facebook.png'), + tooltip: 'facebook', + iconSize: 48, + onPressed: () { + setState(() { + launch("https://facebook.com/HMG.pharmacy"); + // launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); + }); + }, + ), + IconButton( + icon: new Image.asset( + 'assets/images/new-design/twitter.png'), + tooltip: 'Twitter', + iconSize: 48, + onPressed: () { + setState(() { + launch("https://twitter.com/HMG_pharmacy"); + }); + }, + ), + IconButton( + icon: new Image.asset( + 'assets/images/pharmacy/instagram.png'), + tooltip: 'Instagram', + iconSize: 48, + onPressed: () { + setState(() { + launch("https://instagram.com/HMG_pharmacy"); + }); + }, + ), + ]), + ) + ], + ), + ), + ), + ], + ), + ); + } + + openWhatsApp() async { + // bool Platform.isIOS = Theme.of(context).platform == TargetPlatform.iOS; + var whatsapp = "+966558434444"; + var whatsappURL_android = "whatsapp://send?phone=" + whatsapp; + var whatappURL_ios = "https://wa.me/$whatsapp"; + if (Platform.isIOS) { + // for iOS phone only + // if (await canLaunch(whatappURL_ios)) { + await launch(whatappURL_ios, forceSafariVC: false); + // } else {} + } else { + // android + // if (await canLaunch(whatsappURL_android)) { + await launch(whatsappURL_android); + // } else {} + } + } +} diff --git a/lib/pages/pharmacy/profile/profile.dart b/lib/pages/pharmacy/profile/profile.dart new file mode 100644 index 00000000..a844e0d2 --- /dev/null +++ b/lib/pages/pharmacy/profile/profile.dart @@ -0,0 +1,609 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/livechat_page.dart'; +import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; +import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/login/welcome.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/compare.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/my_reviews.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-activitaion-vida-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-main-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-terms-conditions-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/wishlist.dart'; +import 'package:diplomaticquarterapp/pages/pharmacy/order/Order.dart'; +import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart'; +import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyContacts.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.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:flutter_svg/flutter_svg.dart'; + +dynamic languageID; + +class PharmacyProfilePage extends StatefulWidget { + final bool moveToOrder; + + final void Function()? changeTab; + + PharmacyProfilePage({required this.moveToOrder, this.changeTab}); + + @override + _ProfilePageState createState() => _ProfilePageState(); +} + +class _ProfilePageState extends State { + AppSharedPreferences sharedPref = AppSharedPreferences(); + String page_id = ""; + + AuthenticatedUser? user; + bool? isLogin = false; + String? firstName; + String? customerId; + String? customerGUID; + String? lastName, mobileNo, identificationNo; + int? languageId; + + getLanguageID() async { + languageID = await sharedPref.getString(APP_LANGUAGE); + } + + getCustomer() async { + String? custID; + String? custGUID; + custID = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + custGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); + setState(() { + customerId = custID; + customerGUID = custGUID; + }); + return customerId; + } + + getUser() async { + var userData = await sharedPref.getObject(USER_PROFILE); + if (userData != null) { + user = AuthenticatedUser.fromJson(userData); + setState(() { + firstName = user!.firstName!.toString(); + }); + } else { + if (userData == null) { + Navigator.push( + context, + FadePage(page: WelcomeLogin()), + ); + } + } + } + + void initState() { + getCustomer(); + getLanguageID(); + super.initState(); + getUser(); + if (widget.moveToOrder) { + Navigator.push(context, FadePage(page: OrderPage(customerID: customerId!, customerGUID: customerGUID!))); + } + } + + @override + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) async { + // var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + // var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); + // GifLoaderDialogUtils.showMyDialog(context); + // model.getOrder(customerId, customerGUID, page_id); + // GifLoaderDialogUtils.hideDialog(context); + }, + builder: (_, model, wi) => AppScaffold( + appBarTitle: TranslationBase.of(context).myAccount, + isShowAppBar: true, + isShowDecPage: false, + isPharmacy: true, + showPharmacyCart: false, + showHomeAppBarIcon: false, + isMainPharmacyPages: true, + backButtonTab: widget.changeTab!, + body: user != null + ? Container( + color: Colors.white, + child: SingleChildScrollView( + child: Column( + children: [ + Container( + child: Row( + children: [ + Container( + child: Row( + children: [ + Container( + padding: EdgeInsets.only( + top: 20.0, + left: 10.0, + right: 10.0, + bottom: 10.0, + ), + child: LargeAvatar( + name: user!.firstName.toString(), + url: '', + ), + ), + Column(children: [ + Row(children: [ + Text( + TranslationBase.of(context).welcome, + style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold, color: Colors.grey), + ), + ]), + SizedBox( + height: 10, + ), + Row(children: [ + Text( + languageID == "ar" ? user!.firstNameN!.toString() + " " + user!.lastNameN!.toString() : user!.firstName!.toString() + " " + user!.lastName!.toString(), + style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold), + ), + ]), + ]), + ], + ), + ) + ], + ), + ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 5, + indent: 0, + endIndent: 0, + ), + SizedBox( + height: 15, + ), + Container( + child: Row( + children: [ + Expanded( + child: InkWell( + onTap: () { + if (customerId == null) { + AppToast.showErrorToast(message: "Customer not found"); + return; + } + Navigator.push(context, FadePage(page: OrderPage(customerID: customerId!, customerGUID: customerGUID!))); + }, + child: Column( + children: [ +// Image(image: AssetImage('assets/images/pharmacy/orders_icon.svg')), + SvgPicture.asset( + 'assets/images/pharmacy/orders_icon.svg', + width: 50, + height: 50, + ), + SizedBox( + height: 5, + ), + Text( + TranslationBase.of(context).orders, + style: TextStyle( + fontSize: 13.0, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + ), + Expanded( + child: InkWell( + onTap: () { + if (customerId == null || customerId == '') + Navigator.push(context, FadePage(page: LakumActivationVidaPage())); + else + Navigator.push(context, FadePage(page: LakumMainPage())); + }, + child: Column( + children: [ + SvgPicture.asset( + 'assets/images/pharmacy/lakum_icon.svg', + width: 50, + height: 50, + ), + SizedBox( + height: 5, + ), + Text( + TranslationBase.of(context).lakum, + style: TextStyle(fontSize: 13.0, fontWeight: FontWeight.bold), + ), + ], + ), + ), + ), + Expanded( + child: InkWell( + onTap: () { + Navigator.push(context, FadePage(page: WishlistPage())); + }, + child: Column( + children: [ + SvgPicture.asset( + 'assets/images/pharmacy/wishlist_icon.svg', + width: 50, + height: 50, + ), + SizedBox( + height: 5, + ), + Text( + TranslationBase.of(context).wishlist, + style: TextStyle( + fontSize: 13.0, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + ), + Expanded( + child: InkWell( + onTap: () { + Navigator.push(context, FadePage(page: MyReviewsPage())); + }, + child: Column( + children: [ + SvgPicture.asset( + 'assets/images/pharmacy/review_icon.svg', + width: 50, + height: 50, + ), + SizedBox( + height: 5, + ), + Text( + TranslationBase.of(context).reviews, + style: TextStyle( + fontSize: 13.0, + fontWeight: FontWeight.bold, + ), + ), + ], + ), + ), + ), + ], + )), + SizedBox( + height: 15, + ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 5, + indent: 0, + endIndent: 0, + ), + SizedBox( + height: 10, + ), + Container( + padding: EdgeInsets.only(left: 10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).myAccount, + style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold), + ), + SizedBox( + height: 10, + ), + Divider( + color: Colors.grey, + height: 20, + ), + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: HomePrescriptionsPage())); + }, + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/pharmacy/my_prescription_icon.svg', + width: 28, + height: 28, + ), + SizedBox( + width: 15, + ), + Text( + TranslationBase.of(context).myPrescription, + style: TextStyle( + fontSize: 13.0, + ), + ), + ], + ), + ), + SizedBox( + height: 5, + ), + Divider( + color: Colors.grey, + height: 20, + ), + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: ComparePage())); + }, + child: Row( + children: [ + Image.asset('assets/images/pharmacy/compare.png', width: 35, height: 35), + SizedBox( + width: 15, + ), + Text( + TranslationBase.of(context).compare, + style: TextStyle( + fontSize: 13.0, + ), + ), + ], + ), + ), + SizedBox( + height: 5, + ), + Divider( + color: Colors.grey, + height: 20, + ), + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: HomePrescriptionsPage())); + }, + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/pharmacy/medication_refill_icon.svg', + width: 30, + height: 30, + ), + SizedBox( + width: 20, + ), + Text( + TranslationBase.of(context).medicationsRefill, + style: TextStyle( + fontSize: 13.0, + ), + ), + ], + ), + ), + SizedBox( + height: 5, + ), + Divider( + color: Colors.grey, + height: 20, + ), + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: MyFamily())); + }, + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/pharmacy/my_family_icon.svg', + width: 20, + height: 20, + ), + SizedBox( + width: 20, + ), + Text( + TranslationBase.of(context).family, + style: TextStyle( + fontSize: 13.0, + ), + ), + ], + ), + ), + SizedBox( + height: 5, + ), + Divider( + color: Colors.grey, + height: 20, + ), + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: PharmacyAddressesPage(isShippingAddress: false))); + }, + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/pharmacy/shipping_addresses_icon.svg', + width: 30, + height: 30, + ), + SizedBox( + width: 20, + ), + Text( + TranslationBase.of(context).shippingAddresses, + style: TextStyle( + fontSize: 13.0, + ), + ), + ], + ), + ), + SizedBox( + height: 5, + ), + Divider( + color: Colors.grey, + height: 20, + ), + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: PharmacyTermsConditions())); + }, + child: Row( + children: [ + Image.asset( + 'assets/images/pharmacy/terms.png', + width: 25, + height: 25, + ), + SizedBox( + width: 10, + ), + Text( TranslationBase.of(context).termOfService, + // TranslationBase.of(context).conditionsHMG, + style: TextStyle( + fontSize: 13.0, + ), + ), + ], + ), + ), + SizedBox( + height: 5, + ), + Divider( + color: Colors.grey, + height: 20, + ), + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: LakumTermsConditions(this.identificationNo!, this.firstName!, this.lastName!, this.mobileNo!, this.languageId!))); + }, + child: Row( + children: [ + Image.asset( + 'assets/images/pharmacy/terms.png', + width: 25, + height: 25, + ), +// IconButton(icon: Icon(Icons.error_outline), iconSize: 30, +// color: Colors.black,), + SizedBox( + width: 10, + ), + Text( + TranslationBase.of(context).conditions, + style: TextStyle( + fontSize: 13.0, + ), + ), + ], + ), + ), + ], + ), + ), + SizedBox( + height: 10, + ), + Divider( + color: Colors.grey[350], + height: 20, + thickness: 5, + indent: 0, + endIndent: 0, + ), + SizedBox( + height: 10, + ), + Container( + padding: EdgeInsets.only(left: 10.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).reachUs, + style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold), + ), + SizedBox( + height: 5, + ), + Divider( + color: Colors.grey, + height: 20, + ), + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: pharmacyContactsPage())); + }, + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/pharmacy/contact_us_icon.svg', + width: 20, + height: 20, + ), + SizedBox( + width: 20, + ), + Text( + TranslationBase.of(context).contactUs, + style: TextStyle(fontSize: 13.0), + ), + ], + ), + ), + SizedBox( + height: 5, + ), + Divider( + color: Colors.grey, + height: 20, + ), + InkWell( + onTap: () { + Navigator.push(context, FadePage(page: FindUsPage())); + }, + child: Row( + children: [ + SvgPicture.asset( + 'assets/images/pharmacy/our_locations_icon.svg', + width: 30, + height: 30, + ), + SizedBox( + width: 20, + ), + Text( + TranslationBase.of(context).ourLocations, + style: TextStyle(fontSize: 13.0), + ), + ], + ), + ) + ], + ), + ) + ], + ), + ), + ) + : Container(), + ), + ); + } +} diff --git a/lib/pages/pharmacy_categorise.dart b/lib/pages/pharmacy_categorise.dart new file mode 100644 index 00000000..a748ed90 --- /dev/null +++ b/lib/pages/pharmacy_categorise.dart @@ -0,0 +1,278 @@ +import 'dart:convert'; + +import 'package:barcode_scan2/barcode_scan2.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart'; +import 'package:diplomaticquarterapp/pages/parent_categorise_page.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/utils.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'; + +import 'base/base_view.dart'; +import 'final_products_page.dart'; + +class PharmacyCategorisePage extends StatefulWidget { + @override + _PharmacyCategorisePageState createState() => _PharmacyCategorisePageState(); +} + +class _PharmacyCategorisePageState extends State { + String? idCategorise; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getCategorise(), + allowAny: true, + builder: (BuildContext context, PharmacyCategoriseViewModel model, Widget? child) => AppScaffold( + isShowDecPage: false, + isShowAppBar: false, + isMainPharmacyPages: true, + isPharmacy: true, + isShowPharmacyAppbar: true, + baseViewModel: model, + body: Column( + children: [ + Expanded( + child: Container( + height: 400, + margin: EdgeInsets.only(bottom: 22), + child: GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + crossAxisSpacing: 0.5, + mainAxisSpacing: 1.0, + childAspectRatio: 3.2, + ), + itemCount: model.categorise.length, + itemBuilder: (BuildContext context, int index) { + return Padding( + padding: EdgeInsets.all(4.0), + child: InkWell( + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5), + color: Colors.grey.withOpacity(0.24), + ), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 10.0), + child: Texts( + projectViewModel.isArabic ? model.categorise[index].namen : model.categorise[index].name, + fontWeight: FontWeight.w600, + ), + ), + ), + onTap: () => { + Navigator.push( + context, + FadePage( + page: model.categorise[index].id != '12' + ? ParentCategorisePage( + id: model.categorise[index].id, + titleName: projectViewModel.isArabic ? model.categorise[index].namen : model.categorise[index].name, + // titleName: model.categorise[index].name, + ) + : FinalProductsPage( + id: model.categorise[index].id, + ), + ), + ), + }, + ), + ); + }, + ), + ), + ), + Container( + height: 140, + child: Column( + children: [ + Divider(height: 2.0, thickness: 1.0, color: Colors.black12.withOpacity(0.14)), + SizedBox( + height: 10.0, + ), + Row( + children: [ + Expanded( + child: Padding( + padding: EdgeInsets.all(4.0), + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: FinalProductsPage( + id: "", + productType: 6, + ), + ), + ); + }, + child: Container( + height: 50.0, + width: 55.0, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5.0), + color: Colors.green.shade300.withOpacity(0.34), + ), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 10.0), + child: Texts( + projectViewModel.isArabic ? 'الاكثر مبيعا' : 'Best Sellers', + fontWeight: FontWeight.w600, + ), + ), + ), + ), + ), + ), + Expanded( + child: Padding( + padding: EdgeInsets.all(4.0), + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: FinalProductsPage( + id: "", + productType: 4, + ), + ), + ); + }, + child: Container( + height: 50.0, + width: 55.0, + decoration: BoxDecoration( + color: Colors.orangeAccent.shade200.withOpacity(0.34), + borderRadius: BorderRadius.circular(5.0), + ), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 10.0), + child: Texts( + projectViewModel.isArabic ? 'الاكثر مشاهدة' : 'Most Viewed', + fontWeight: FontWeight.w600, + ), + ), + ), + ), + ), + ), + ], + ), + Row( + children: [ + Expanded( + child: Padding( + padding: EdgeInsets.all(4.0), + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: FinalProductsPage( + id: "", + productType: 5, + ), + ), + ); + }, + child: Container( + height: 50.0, + width: 55.0, + decoration: BoxDecoration( + color: Colors.blue.shade200.withOpacity(0.34), + borderRadius: BorderRadius.circular(5.0), + ), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 10.0), + child: Texts( + projectViewModel.isArabic ? 'منتجات جديدة' : 'New Products', + fontWeight: FontWeight.w600, + ), + ), + ), + ), + ), + ), + Expanded( + child: Padding( + padding: EdgeInsets.all(4.0), + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: FinalProductsPage( + id: "", + productType: 3, + ), + ), + ); + }, + child: Container( + height: 50.0, + width: 55.0, + decoration: BoxDecoration( + color: Colors.purple.shade200.withOpacity(0.34), + borderRadius: BorderRadius.circular(5.0), + ), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 10.0), + child: Texts( + projectViewModel.isArabic ? 'شوهد مؤخرا' : 'Recently Viewed', + fontWeight: FontWeight.w600, + ), + ), + ), + ), + ), + ), + ], + ), + ], + )), + ], + ), + ), + ); + } + + _scanQrAndGetPatient( + BuildContext context, + PharmacyCategoriseViewModel model, + ) async { + //TODO fix it + /// When give qr we will change this method to get data + /// var result = await BarcodeScanner.scan(); + /// int patientID = get from qr result + String result = await BarcodeScanner.scan().then((value) { + return value.rawContent; + }); + var data = json.decode(result); + if (data != null) { + var qRParkingID = data['QRParkingID']; + await model.scanQr(); + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + } else { + AppToast.showSuccessToast(message: model.scanList[0].id!); + { + Navigator.push( + context, + FadePage(page: LandingPagePharmacy()), + ); + } + } + } + } +} diff --git a/lib/pages/rateAppointment/rate_appointment_clinic.dart b/lib/pages/rateAppointment/rate_appointment_clinic.dart new file mode 100644 index 00000000..4dbc3edd --- /dev/null +++ b/lib/pages/rateAppointment/rate_appointment_clinic.dart @@ -0,0 +1,267 @@ +import 'package:diplomaticquarterapp/core/model/rate/appointment_details.dart'; +import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +class RateAppointmentClinic extends StatefulWidget { + late final AppointmentDetails? appointmentDetails; + late final String? doctorNote; + late final int? doctorRate; + + RateAppointmentClinic({this.appointmentDetails, this.doctorRate, this.doctorNote}); + + @override + _RateAppointmentClinicState createState() => _RateAppointmentClinicState(); +} + +class _RateAppointmentClinicState extends State { + final formKey = GlobalKey(); + String note = ""; + int rating = 0; + late ProjectViewModel projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + baseViewModel: model, + appBarTitle: TranslationBase.of(context).rateAppointment, + body: SingleChildScrollView( + child: Container( + padding: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).lastAppointment, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + SizedBox( + height: 25, + ), + Container( + decoration: cardRadius(10), + child: Padding( + padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(bottom: 10.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + model.appointmentDetails.projectName ?? '', + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + Text( + model.appointmentDetails.startTime != "" ? model.appointmentDetails.startTime.toString().substring(0, 5) : "", + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), + ), + ], + ), + ), + Row( + mainAxisSize: MainAxisSize.min, + children: [ + LargeAvatar( + url: 'https://hmgwebservices.com/Images/Hospitals/' + model.appointmentDetails.projectID.toString() + '.jpg', + width: 48, + height: 48, + ), + SizedBox(width: 11), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + MyRichText(TranslationBase.of(context).clinic + ":", model.appointmentDetails.projectName ?? "", projectViewModel.isArabic), + MyRichText(TranslationBase.of(context).date + ":", DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.appointmentDetails.appointmentDate)), + projectViewModel.isArabic), + ], + ), + ), + ], + ), + ], + ), + ), + ), + SizedBox( + height: 12, + ), + Container( + width: double.infinity, + child: Container( + decoration: cardRadius(10), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).rateClinic, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + SizedBox( + height: 12, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + ...List.generate( + 5, + (index) => AnimatedSwitcher( + duration: Duration(milliseconds: 300), + switchInCurve: Curves.elasticOut, + switchOutCurve: Curves.elasticIn, + transitionBuilder: (Widget child, Animation animation) { + return ScaleTransition(child: child, scale: animation); + }, + child: rating == (index + 1) + ? Container( + margin: EdgeInsets.only(left: 3.0, right: 3.0), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(100), border: Border.all(width: 3, color: CustomColors.green)), + key: ValueKey(rating), + child: IconButton( + onPressed: () { + setState(() { + rating = index + 1; + }); + }, + iconSize: 35, + icon: SvgPicture.asset('assets/images/new/appointment-rating/' + (index + 1).toString() + '.svg'), + ), + ) + : Container( + key: ValueKey(rating), + child: IconButton( + onPressed: () { + setState(() { + rating = index + 1; + }); + }, + iconSize: 35, + icon: SvgPicture.asset('assets/images/new/appointment-rating/' + (index + 1).toString() + '.svg'), + ), + ), + ), + ) + ], + ), + ], + ), + ), + ), + ), + SizedBox(height: 12), + SizedBox( + height: 12, + ), + ], + ), + ), + ), + bottomSheet: Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).later, + () { + Navigator.pushReplacement( + context, + FadePage( + page: LandingPage(), + ), + ); + // if (projectViewModel.isLoginChild) { + // Navigator.pushReplacement( + // context, + // FadePage( + // page: LandingPage(), + // ), + // ); + // } else { + // Navigator.pop( + // context, + // // FadePage( + // // page: LandingPage(), + // // ), + // ); + // } + }, + color: CustomColors.accentColor, + textColor: Colors.white, + ), + ), + SizedBox(width: 10), + Expanded( + child: DefaultButton( + TranslationBase.of(context).submit, + rating <= 0 + ? null + : () { + int languageID = projectViewModel.isArabic ? 1 : 2; + model + .sendAppointmentRate(rating, widget.appointmentDetails!.appointmentNo!, widget.appointmentDetails!.projectID!, widget.appointmentDetails!.doctorID!, + widget.appointmentDetails!.clinicID!, note, languageID) + .then( + (value) => { + model + .sendDoctorRate( + widget.doctorRate!, + widget.appointmentDetails!.appointmentNo!, + widget.appointmentDetails!.projectID!, + widget.appointmentDetails!.doctorID!, + widget.appointmentDetails!.clinicID!, + note, + widget.appointmentDetails!.appointmentDate, + widget.appointmentDetails!.doctorName, + widget.appointmentDetails!.projectName, + widget.appointmentDetails!.clinicName) + .then((value) { + Navigator.pushReplacement( + context, + FadePage( + page: LandingPage(), + ), + ); + }), + }, + ); + }, + color: Color(0xff359846), + disabledColor: Colors.grey, + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/rateAppointment/rate_appointment_doctor.dart b/lib/pages/rateAppointment/rate_appointment_doctor.dart new file mode 100644 index 00000000..fba43fbe --- /dev/null +++ b/lib/pages/rateAppointment/rate_appointment_doctor.dart @@ -0,0 +1,265 @@ +import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_clinic.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class RateAppointmentDoctor extends StatefulWidget { + + bool isFromRegistration; + + RateAppointmentDoctor({Key? key, this.isFromRegistration = false}) : super(key: key); + + @override + _RateAppointmentDoctorState createState() => _RateAppointmentDoctorState(); +} + +class _RateAppointmentDoctorState extends State { + final formKey = GlobalKey(); + String note = ""; + int rating = 0; + ProjectViewModel? projectViewModel; + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + return BaseView( + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + baseViewModel: model, + appBarTitle: TranslationBase.of(context).rateDoctor, + body: SingleChildScrollView( + child: Container( + padding: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).lastVisit, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + height: 23 / 16), + ), + SizedBox( + height: 25, + ), + Container( + child: DoctorView( + doctor: getDoctorObject(model), + isLiveCareAppointment: false, + isShowFlag: false, + ), + ), + SizedBox( + height: 12, + ), + Container( + width: double.infinity, + child: Container( + decoration: cardRadius(10), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).tapTitle, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + height: 23 / 16), + ), + SizedBox( + height: 12, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + ...List.generate( + 5, + (index) => AnimatedSwitcher( + duration: Duration(milliseconds: 1000), + switchInCurve: Curves.elasticOut, + switchOutCurve: Curves.elasticIn, + transitionBuilder: (Widget child, + Animation animation) { + return ScaleTransition( + child: child, scale: animation); + }, + child: Container( + key: ValueKey(rating), + child: IconButton( + iconSize: 45.0, + onPressed: () { + setState(() { + rating = index + 1; + }); + }, + color: rating >= (index + 1) + ? Color.fromRGBO(255, 186, 0, 1.0) + : Colors.grey[400], + icon: Icon(rating >= (index + 1) + ? Icons.star + : Icons.star)), + ), + ), + ) + ], + ), + ], + ), + ), + ), + ), + SizedBox( + height: 12, + ), + Container( + decoration: cardRadius(10), + child: Padding( + padding: EdgeInsets.all(8.0), + child: TextField( + maxLines: 5, + decoration: InputDecoration.collapsed( + hintText: TranslationBase.of(context).notes, + hintStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.64, + height: 23 / 16)), + onChanged: (value) { + setState(() { + note = value; + }); + }, + ))), + ], + ), + ), + ), + bottomSheet: Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).later, + () { + if(widget.isFromRegistration) { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).validInsurance, + okText: TranslationBase.of(context).yes, + cancelText: TranslationBase.of(context).no, + okFunction: () { + ConfirmDialog.closeAlertDialog(context); + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }, + cancelFunction: () { + Navigator.pushAndRemoveUntil( + context, + MaterialPageRoute(builder: (context) => LandingPage()), + (Route route) => false, + ); + }); + dialog.showAlertDialog(context); + } else { + Navigator.pushReplacement( + context, + FadePage( + page: LandingPage(), + ), + ); + // if(projectViewModel.isLoginChild) { + // Navigator.pushReplacement( + // context, + // FadePage( + // page: LandingPage(), + // ), + // ); + // } else { + // Navigator.pop( + // context, + // // FadePage( + // // page: LandingPage(), + // // ), + // ); + // } + } + }, + color: CustomColors.accentColor, + textColor: Colors.white, + ), + ), + SizedBox(width: 10), + Expanded( + child: DefaultButton( + TranslationBase.of(context).next, + rating <= 0 + ? null + : () { + Navigator.push( + context, + FadePage( + page: RateAppointmentClinic( + appointmentDetails: model.appointmentDetails, + doctorNote: note, + doctorRate: rating, + ), + ), + ); + }, + // iconData: Icons.notifications_active, + color: Color(0xff359846), + disabledColor: Colors.grey, + ), + ), + ], + ), + ), + ), + ); + } + + DoctorList getDoctorObject(AppointmentRateViewModel model) { + DoctorList doctor = new DoctorList(); + + doctor.name = model.appointmentDetails.doctorName; + doctor.doctorImageURL = model.appointmentDetails.doctorImageURL; + doctor.clinicName = model.appointmentDetails.clinicName; + doctor.projectName = model.appointmentDetails.projectName; + doctor.date = model.appointmentDetails.appointmentDate; + doctor.actualDoctorRate = 5; + + return doctor; + } +} diff --git a/lib/pages/search_products_page.dart b/lib/pages/search_products_page.dart new file mode 100644 index 00000000..974b5b98 --- /dev/null +++ b/lib/pages/search_products_page.dart @@ -0,0 +1,293 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart'; + +// import 'package:diplomaticquarterapp/pages/pharmacies/product_detail.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; +import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:provider/provider.dart'; + +import 'Blood/new_text_Field.dart'; +import 'base/base_view.dart'; +import 'package:intl/intl.dart' as international; + +class SearchProductsPage extends StatefulWidget { + @override + _SearchProductsPageState createState() => _SearchProductsPageState(); +} + +class _SearchProductsPageState extends State { + final textController = TextEditingController(); + final _formKey = GlobalKey(); + String msg = ''; + String validText = ""; + bool isTextValid = true; + + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + return BaseView( + onModelReady: (model) => model.clearSearchList(), + builder: (BuildContext context, PharmacyCategoriseViewModel model, Widget? child) => PharmacyAppScaffold( + appBarTitle: TranslationBase.of(context).search, + isBottomBar: false, + isShowAppBar: true, + backgroundColor: Colors.white, + isShowDecPage: false, + //baseViewModel: model, + body: SingleChildScrollView( + child: Container( + height: SizeConfig.screenHeight, + child: Column( + children: [ + Padding( + padding: EdgeInsets.all(8.0), + child: Row( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.70, + child: Form( + key: _formKey, + child: NewTextFields( + autoFocus: true, + hintText: TranslationBase.of(context).search, + fontSize: 14.5, + prefixIcon: Icon(Icons.search), + inputAction: TextInputAction.search, + onSaved: (value) { + //searchMedicine(model, context); + }, + onSubmit: (value) { + searchMedicine(model, context); +// msg = 'No Result Found'; + msg = TranslationBase.of(context).noSearchResultFound; + }, + controller: textController, + ), + // SizedBox( + // width: 10.0, + // ), + // if(!isTextValid) + // AppText( TranslationBase.of(context) + // .noArabicLetters, color: Colors.red,), + // ], + // ), + ), + ), + + SizedBox( + width: 10.0, + ), + InkWell( + child: Texts( + TranslationBase.of(context).cancel, + fontSize: 17.0, + fontWeight: FontWeight.w500, + ), + onTap: () { + Navigator.pop(context); + }, + ), + + // child: Container( + // child: Button( + // backgroundColor: Colors.green, + // loading: model.state == ViewState.BusyLocal, + // label: 'Search', + // onTap: () { + // searchMedicine(model, context); + // }), + // width: MediaQuery.of(context).size.width * 0.09, + // ), + ], + ), + ), + Center( + child: NetworkBaseView( + baseViewModel: model, + child: model.searchList.isNotEmpty + ? InkWell( + child: Container( + height: MediaQuery.of(context).size.height * 0.80, + child: GridView.builder( + //physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + crossAxisSpacing: 0.5, + mainAxisSpacing: 2.0, + childAspectRatio: 1.0, + ), + itemCount: model.searchList.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + child: Card( + color: model.searchList[index].discountName != null ? Color(0xffFFFF00) : Colors.white, + elevation: 0, + shape: Border( + right: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + left: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + bottom: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + top: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + ), + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(110.0), + ), + color: Colors.white, + ), + padding: EdgeInsets.symmetric(horizontal: 0), + width: MediaQuery.of(context).size.width / 3, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Stack( + children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 16, 0, 0), + alignment: Alignment.center, + child: Image.network( + model.searchList[index].images!.isNotEmpty + ? model.searchList[index].images![0].thumb! + : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', + fit: BoxFit.cover, + height: 80, + ), + ), + Container( + width: model.searchList[index].rxMessage != null ? MediaQuery.of(context).size.width / 3 : 0, + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xffb23838), + borderRadius: BorderRadius.only(topLeft: Radius.circular(6)), + ), + child: model.searchList[index].rxMessage != null + ? Texts( + projectProvider.isArabic ? model.searchList[index].rxMessagen : model.searchList[index].rxMessage, + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + : Texts(""), +// Texts( +// model.searchList[index] +// .rxMessage != +// null +// ? model +// .searchList[index] +// .rxMessage +// : "", +// color: Colors.white, +// regular: true, +// fontSize: 10, +// fontWeight: FontWeight.w400, +// ), + ), + ], + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + projectProvider.isArabic ? model.searchList[index].namen : model.searchList[index].name, + + // model.searchList[index].name, + regular: true, + fontSize: 12, + fontWeight: FontWeight.w400, + ), + Padding( + padding: const EdgeInsets.only(top: 4, bottom: 4), + child: Texts( + "SAR ${model.searchList[index].price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ + StarRating( + totalAverage: model.searchList[index].approvedRatingSum! > 0 + ? (model.searchList[index].approvedRatingSum!.toDouble() / model.searchList[index].approvedRatingSum!.toDouble()).toDouble() + : 0, + forceStars: true), + Texts( + "(${model.searchList[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + ], + ), + ], + ), + ), + ], + ), + ), + ), + onTap: () => { + Navigator.push( + context, + FadePage( + page: ProductDetailPage(model.searchList[index]), + )), + }, + ); + }, + ), + ), + ) + : Texts(msg), + ), + ) + ], + ), + ), + ), + ), + ); + } + + bool isRTL(String text) { + return international.Bidi.detectRtlDirectionality(text); + } + + searchMedicine(PharmacyCategoriseViewModel model, BuildContext context) { + Utils.hideKeyboard(context); + if (_formKey.currentState!.validate()) model.searchProducts(productName: textController.text); + } +} diff --git a/lib/pages/settings/InfoPage.dart b/lib/pages/settings/InfoPage.dart new file mode 100644 index 00000000..04cc670e --- /dev/null +++ b/lib/pages/settings/InfoPage.dart @@ -0,0 +1,10 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; + +class AboutApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return AppScaffold(isShowAppBar: true, appBarTitle: TranslationBase.of(context).aboutApp, isShowDecPage: false, body: Container()); + } +} diff --git a/lib/pages/settings/general_setting.dart b/lib/pages/settings/general_setting.dart new file mode 100644 index 00000000..9cac9df0 --- /dev/null +++ b/lib/pages/settings/general_setting.dart @@ -0,0 +1,349 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/theme/theme_notifier.dart'; +import 'package:diplomaticquarterapp/theme/theme_value.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:geolocator/geolocator.dart'; +import 'package:provider/provider.dart'; +import 'package:screen_brightness/screen_brightness.dart'; + +class GeneralSettings extends StatefulWidget { + @override + _GeneralSettings createState() => _GeneralSettings(); +} + +class _GeneralSettings extends State with TickerProviderStateMixin { + var themeNotifier; + int blindValue = 0; + bool vibration = false; + bool accsibility = false; + bool camera = false; + bool location = false; + var sharedPref = new AppSharedPreferences(); + var permission = new PermissionService(); + LocationPermission? locationPermission; + var mediaQueryData; + + @override + void initState() { + this.getValues(); + super.initState(); + } + + Widget build(BuildContext context) { + mediaQueryData = MediaQuery.of(context); + themeNotifier = Provider.of(context); + return Container( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(21.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Text( + // TranslationBase.of(context).modes, + // style: TextStyle( + // fontSize: 16, + // fontWeight: FontWeight.w600, + // letterSpacing: -0.64, + // ), + // ), + // Row( + // children: [ + // Checkbox( + // value: vibration, + // onChanged: (value) { + // setState(() { + // vibration = value!; + // }); + // }, + // activeColor: CustomColors.accentColor, + // ), + // Text( + // TranslationBase.of(context).vibration, + // style: TextStyle( + // fontSize: 12, + // letterSpacing: -0.48, + // ), + // ), + // ], + // ), + // Row( + // children: [ + // Checkbox( + // value: accsibility, + // onChanged: (value) { + // setState(() { + // accsibility = value!; + // }); + // }, + // activeColor: CustomColors.accentColor, + // ), + // Text( + // TranslationBase.of(context).accessibility, + // style: TextStyle( + // fontSize: 12, + // letterSpacing: -0.48, + // ), + // ), + // ], + // ), + // mHeight(16), + // mHeight(12), + Text( + TranslationBase.of(context).blindMode, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + Column( + children: [ + Row( + children: [ + new Radio( + value: 0, + groupValue: blindValue, + onChanged: (value) { + setState(() { + blindValue = value!; + setTheme(value); + }); + }, + ), + Text( + TranslationBase.of(context).offTheme, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Radio( + value: 1, + groupValue: blindValue, + onChanged: (value) { + setState(() { + blindValue = value!; + setTheme(value); + }); + }, + ), + Text( + TranslationBase.of(context).invertTheme, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Radio( + value: 2, + groupValue: blindValue, + onChanged: (value) { + setState(() { + blindValue = value!; + setTheme(value); + }); + }, + ), + Text( + TranslationBase.of(context).dimTheme, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Radio( + value: 1, + groupValue: blindValue, + onChanged: (value) { + setState(() { + blindValue = value!; + setTheme(value); + }); + }, + ), + Text( + TranslationBase.of(context).bwTheme, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + ], + ), + mHeight(12), + mHeight(12), + Text( + TranslationBase.of(context).permissions, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + Row( + children: [ + Checkbox( + value: camera, + onChanged: (value) { + setState(() { + camera = value!; + }); + this.permission.openSettings(); + }, + activeColor: CustomColors.accentColor, + ), + Text( + TranslationBase.of(context).cameraPermission, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Checkbox( + value: location, + onChanged: (value) { + if (value == true) { + Navigator.pop(context); + this.setLocationPermission(); + } else { + Geolocator.openLocationSettings(); + } + }, + activeColor: CustomColors.accentColor, + ), + Text( + TranslationBase.of(context).locationPermission, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + mHeight(16), + ], + ), + ), + ), + ); + } + + setLocationPermission() async { + locationPermission = await Geolocator.checkPermission(); + if (locationPermission == LocationPermission.denied) { + locationPermission = await Geolocator.requestPermission(); + if (locationPermission != LocationPermission.denied) { + setState(() { + location = true; + }); + } else { + this.location = false; + } + } else { + Geolocator.openLocationSettings(); + this.location = true; + } + } + + setTheme(value) async { + switch (value) { + case 0: + { + themeNotifier.setTheme(await getTheme(value)); + setBrightness(1.0); + } + break; + case 1: + { + themeNotifier.setTheme(await getTheme(value)); + } + + break; + case 2: + themeNotifier.setTheme(await getTheme(value)); + setBrightness(0.01); + break; + case 3: + { + themeNotifier.setTheme(await getTheme(value)); + setBrightness(1.0); + } + break; + default: + { + themeNotifier.setTheme(await getTheme(value)); + setBrightness(1.0); + } + break; + } + permission.setTheme(value); + } + + setBrightness(double brightness) async { + try { + await ScreenBrightness().setScreenBrightness(brightness); + } catch (e) { + print(e); + throw 'Failed to set brightness'; + } + } + + setVibration(value) { + permission.setVibrationPermission(value); + } + + setAccisibility() { + if (!accsibility) {} + // permission.setVibrationPermission(value); + } + + getValues() async { + if (permission.isThemeEnabled() != null) { + blindValue = permission.isThemeEnabled() == null ? 0 : permission.isThemeEnabled(); + vibration = permission.isVibrationEnabled() == null ? false : permission.isVibrationEnabled(); + // accsibility = mediaQueryData.accessibleNavigation; + //setTheme(blindValue); + } + var camera = await PermissionService.isCameraEnabled(); + var location = await PermissionService.isLocationEnabled(); + setState(() { + this.camera = camera; + this.location = location; + }); + } + + getTheme(value) async { + if (value == 1) { + return invertThemes(fontName: Provider.of(context, listen: false).isArabic ? 'Cairo' : 'Poppins'); + } else if (value == 3) { + return bwThemes(fontName: Provider.of(context, listen: false).isArabic ? 'Cairo' : 'Poppins'); + } else { + return defaultTheme(fontName: Provider.of(context, listen: false).isArabic ? 'Cairo' : 'Poppins'); + } + } +} diff --git a/lib/pages/settings/profile_setting.dart b/lib/pages/settings/profile_setting.dart new file mode 100644 index 00000000..911ab0e3 --- /dev/null +++ b/lib/pages/settings/profile_setting.dart @@ -0,0 +1,411 @@ +import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class ProfileSettings extends StatefulWidget { + @override + _ProfileSettings createState() => _ProfileSettings(); +} + +class _ProfileSettings extends State with TickerProviderStateMixin { + bool smsAlert = true; + bool emailAlert = true; + int language = 1; + final authService = new AuthProvider(); + TextEditingController emergencyContact = new TextEditingController(); + TextEditingController emailController = new TextEditingController(); + TextEditingController emergencyContactName = new TextEditingController(); + ProjectViewModel? projectProvider; + + @override + void initState() { + super.initState(); + } + + Widget build(BuildContext context) { + projectProvider = Provider.of(context); + return BaseView( + onModelReady: (model) => {getSettings()}, + builder: (_, model, wi) => Container( + child: model.user != null + ? Column( + children: [ + Expanded( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.only(left: 21, right: 21, top: 21), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + decoration: cardRadius(8), + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).fileNo + ": ", + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + Text( + model.user!.patientID.toString(), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + ], + ), + ), + ), + mHeight(12), + Text( + TranslationBase.of(context).languageSetting, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + Text( + TranslationBase.of(context).selectLanguage, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ), + Row( + children: [ + Expanded( + child: Row( + children: [ + new Radio( + value: 2, + groupValue: language, + onChanged: (value) { + setState(() { + language = value!; + }); + }, + ), + Text( + TranslationBase.of(context).english, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + ), + Expanded( + child: Row( + children: [ + Radio( + value: 1, + groupValue: language, + onChanged: (value) { + setState(() { + language = value!; + }); + }, + ), + Text( + TranslationBase.of(context).arabic, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + ), + ], + ), + mHeight(12), + Text( + TranslationBase.of(context).alert, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + Text( + TranslationBase.of(context).recAlert, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + ), + Row( + children: [ + Checkbox( + value: emailAlert, + onChanged: (value) { + setState(() { + emailAlert = value!; + }); + }, + activeColor: CustomColors.accentColor, + ), + Text( + TranslationBase.of(context).emailAlert, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + Row( + children: [ + Checkbox( + value: smsAlert, + onChanged: (value) { + setState(() { + smsAlert = value!; + }); + }, + activeColor: CustomColors.accentColor, + ), + Text( + TranslationBase.of(context).smsAlert, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + ), + ), + ], + ), + mHeight(16), + Text( + TranslationBase.of(context).contactInfo, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.64, + ), + ), + mHeight(12), + inputWidget(TranslationBase.of(context).email, "", emailController), + mHeight(8), + inputWidget(TranslationBase.of(context).emergencyName, "", emergencyContactName), + mHeight(8), + inputWidget(TranslationBase.of(context).emergencyContact, "", emergencyContact), + mHeight(10), + // InkWell( + // onTap: () { + // deactivateAccount(); + // }, + // child: Text( + // TranslationBase.of(context).deleteAccount, + // style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.64, color: Color(0xffD02127), decoration: TextDecoration.underline), + // ), + // ), + mHeight(8), + ], + ), + ), + ), + ), + Container( + padding: EdgeInsets.all(12), + color: Colors.white, + child: Flex( + direction: Axis.horizontal, + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).deleteAccount, + () { + deactivateAccount(); + }, + ), + ), + mWidth(12), + Expanded( + child: DefaultButton( + TranslationBase.of(context).save, + () { + saveSettings(); + }, + color: CustomColors.green, + ), + ), + ], + ), + ), + ], + ) + : Center( + child: AppText(TranslationBase.of(context).loginToUseService), + ), + ), + ); + } + + Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String? prefix, bool isEnable = true, bool hasSelection = false}) { + return Container( + padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15), + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15), + color: Colors.white, + border: Border.all( + color: Color(0xffefefef), + width: 1, + ), + ), + child: InkWell( + onTap: hasSelection ? () {} : null, + child: Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _labelText, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + ), + TextField( + enabled: isEnable, + scrollPadding: EdgeInsets.zero, + keyboardType: TextInputType.emailAddress, + controller: _controller, + // onChanged: (value) => {validateForm()}, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff2B353E), + letterSpacing: -0.44, + ), + decoration: InputDecoration( + isDense: true, + hintText: _hintText, + hintStyle: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w400, + color: Color(0xff575757), + letterSpacing: -0.56, + ), + prefixIconConstraints: BoxConstraints(minWidth: 50), + prefixIcon: prefix == null + ? null + : Text( + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + ), + ), + ], + ), + ), + if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined), + ], + ), + ), + ); + } + + deactivateAccount() { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).deactivateAccount, + okText: TranslationBase.of(context).yes, + cancelText: TranslationBase.of(context).no, + okFunction: () { + Navigator.of(context).pop(); + callDeactivateAccountAPI(); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } + + callDeactivateAccountAPI() { + GifLoaderDialogUtils.showMyDialog(context); + Map request = {}; + request["IsActive"] = false; + request["PatientIdentificationID"] = projectProvider!.user!.patientIdentificationNo!; + request["PatientMobileNumber"] = Utils.getPhoneNumberWithoutZero(projectProvider!.user!.mobileNumber!); + authService.deactivateAccount(request, false).then((result) { + AppToast.showSuccessToast(message: TranslationBase.of(context).accountDeactivated); + GifLoaderDialogUtils.hideDialog(context); + }); + } + + getSettings() { + authService.getSettings().then((result) => {setValue(result["PateintInfoForUpdateList"][0])}); + } + + setValue(value) { + setState(() { + this.language = int.parse(value["PreferredLanguage"]); + this.emailAlert = value["IsEmailAlertRequired"]; + this.smsAlert = value["IsSMSAlertRequired"]; + this.emailController.text = value["EmailAddress"]; + this.emergencyContact.text = value["EmergencyContactNo"]; + this.emergencyContactName.text = value["EmergencyContactName"]; + }); + } + + saveSettings() { + GifLoaderDialogUtils.showMyDialog(context); + Map request = {}; + request["EmailAddress"] = this.emailController.text; + request["EmergencyContactName"] = this.emergencyContactName.text; + request["EmergencyContactNo"] = this.emergencyContact.text; + request["IsEmailAlertRequired"] = this.emailAlert; + request["IsSMSAlertRequired"] = this.smsAlert; + request["PreferredLanguage"] = this.language.toString(); + authService.saveSettings(request).then((result) { + AppToast.showSuccessToast(message: TranslationBase.of(context).profileUpdate); + GifLoaderDialogUtils.hideDialog(context); + AuthenticatedUser authUser = projectProvider!.user!; + authUser.emailAddress = this.emailController.text; + projectProvider!.setUser(authUser); + }); + } +} diff --git a/lib/pages/settings/settings.dart b/lib/pages/settings/settings.dart new file mode 100644 index 00000000..9b3dfc3f --- /dev/null +++ b/lib/pages/settings/settings.dart @@ -0,0 +1,77 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/pages/settings/general_setting.dart'; +import 'package:diplomaticquarterapp/pages/settings/profile_setting.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/arrow_back.dart'; +import 'package:flutter/material.dart'; + +class Settings extends StatefulWidget { + final int type; + + Settings({this.type = 0}); + + @override + _Settings createState() => _Settings(); +} + +class _Settings extends State with TickerProviderStateMixin { + TabController? _tabController; + + @override + void initState() { + _tabController = new TabController(length: 2, vsync: this, initialIndex: widget.type); + + if (widget.type == 1) { + _tabController!.animateTo(1); + } + + super.initState(); + } + + @override + Widget build(BuildContext context) { + AppGlobal.context = context; + return AppScaffold( + isShowAppBar: false, + isShowDecPage: false, + showNewAppBarTitle: true, + showNewAppBar: true, + appBarTitle: TranslationBase.of(context).settings, + backgroundColor: Color(0xFFF7F7F7), + body: Column( + children: [ + TabBar( + // isScrollable: true, + + indicatorWeight: 3.0, + //indicatorSize: TabBarIndicatorSize.label, + // indicatorSize: TabBarIndicatorSize.tab, + + indicatorColor: CustomColors.accentColor, + labelColor: Colors.black, + unselectedLabelColor: CustomColors.grey, + // labelColor: Theme.of(context).primaryColor, + tabs: [ + Tab(text: TranslationBase.of(context).general), + Tab( + text: TranslationBase.of(context).profile, + ) + ], + controller: _tabController, + ), + Expanded( + child: TabBarView( + physics: NeverScrollableScrollPhysics(), + children: [ + GeneralSettings(), + ProfileSettings(), + ], + controller: _tabController), + ), + ], + ), + ); + } +} diff --git a/lib/pages/sub_categories_modalsheet.dart b/lib/pages/sub_categories_modalsheet.dart new file mode 100644 index 00000000..64b48fd1 --- /dev/null +++ b/lib/pages/sub_categories_modalsheet.dart @@ -0,0 +1,115 @@ + +import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/pharmacy_categorise.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/sub_categorise_page.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'base/base_view.dart'; +import 'package:provider/provider.dart'; + + + + +class SubCategoriseModalsheet extends StatefulWidget { + String? id; + String? titleName; + + SubCategoriseModalsheet({this.id, this.titleName}); + @override + _SubCategoriseModalsheetState createState() => _SubCategoriseModalsheetState(id: id, titleName: titleName); + +} + +class _SubCategoriseModalsheetState extends State { + String? id; + String? titleName; +// List categoriesList = []; + _SubCategoriseModalsheetState({this.id, this.titleName}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getCategoriseParent(i: id), + builder: (_, model, wi) => AppScaffold( + // appBarTitle: titleName, + appBarTitle: TranslationBase.of(context).categorise, + isBottomBar: true, + isShowAppBar: true, + isPharmacy: true, + backgroundColor: Colors.white, + isShowDecPage: false, + showPharmacyCart: false, + showHomeAppBarIcon: false, + baseViewModel: model, + body: Container( + color: Colors.white, + child: Center( + child: ListView.builder( + scrollDirection: Axis.vertical, + itemCount: model.categoriseParent.length, + itemBuilder: (BuildContext context, int index) { + return Container( + child: Padding( + padding: EdgeInsets.all(4.0), + child: InkWell( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(projectViewModel.isArabic + ? model.categoriseParent[index].namen + : model.categoriseParent[index].name), + SizedBox( + height: 10, + ), + Divider( + thickness: 0.6, + color: Colors.black12, + ) + ], + ), + onTap: () { + Navigator.push( + context, + FadePage( + page: SubCategorisePage( + title: projectViewModel + .isArabic + ? model.categoriseParent[index].namen + : model.categoriseParent[index].name, + // title: model.categoriseParent[index].name, + id: model.categoriseParent[index].id, + parentId: id, + )), + ); + }, + ), + ), + ); + }), + ), + ), + + ), + ); + } +// getCatName() { +// +// if (widget.id == '1' ) +// return Texts("text1"); +// else if (widget.id == '2' ) +// return Texts("text2"); +// else if (widget.id == '3') +// return Texts("text3"); +// else if (widget.id == '4' ) +// return Texts("text4"); +// } + + +} \ No newline at end of file diff --git a/lib/pages/sub_categorise_page.dart b/lib/pages/sub_categorise_page.dart new file mode 100644 index 00000000..7c1f398e --- /dev/null +++ b/lib/pages/sub_categorise_page.dart @@ -0,0 +1,1226 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy/categorise_parent_model.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/others/entity_checkbox_list.dart'; +import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:provider/provider.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart' as utils; + +import 'base/base_view.dart'; +import 'final_products_page.dart'; + +class SubCategorisePage extends StatefulWidget { + String? id; + String? title; + String? parentId; + + AuthenticatedUserObject authenticatedUserObject = locator(); + + SubCategorisePage({this.id, this.parentId, this.title}); + + @override + _SubCategorisePageState createState() => _SubCategorisePageState(id: id, title: title, parentId: parentId); +} + +class _SubCategorisePageState extends State { + bool checkedBrands = false; + bool checkedCategorise = false; + String? id; + String? title; + String? parentId; + + _SubCategorisePageState({this.title, this.parentId, this.id}); + + String categoriseName = "Personal Care"; + bool styleOne = true; + bool styleTwo = false; + Icon styleIcon = Icon( + Icons.widgets_sharp, + color: Colors.blue, + size: 29.0, + ); + + int pageIndex = 1; + + RefreshController controller = RefreshController(); + List entityList = []; + List entityListBrands = []; + + @override + Widget build(BuildContext context) { + TextEditingController minField = TextEditingController(); + TextEditingController maxField = TextEditingController(); + ProjectViewModel projectViewModel = Provider.of(context); + ProjectViewModel projectProvider = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getSubCategorise(i: id, pageIndex: pageIndex, isLoading: false, context: context), + allowAny: true, + builder: (BuildContext context, PharmacyCategoriseViewModel model, Widget? child) => AppScaffold( + isPharmacy: true, + appBarTitle: title!, + isBottomBar: true, + isShowAppBar: true, + backgroundColor: Colors.white, + isShowDecPage: false, + showPharmacyCart: false, + showHomeAppBarIcon: false, + baseViewModel: model, + body: SmartRefresher( + controller: controller, + enablePullDown: false, + enablePullUp: true, + onLoading: () async { + setState(() { + ++pageIndex; + }); + await model.getSubProducts(pageIndex: pageIndex, i: id, isLoading: true, context: context); + if (model.state != ViewState.BusyLocal && pageIndex < 5) { + controller.loadComplete(); + } else { + controller.loadFailed(); + } + }, + child: SingleChildScrollView( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: Image.network( + parentId == '1' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089188_personal-care_2.png' + : parentId == '2' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089189_skin-care_2.png' + : parentId == '3' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089190_health-care_2.png' + : parentId == '4' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089191_sexual-health_2.png' + : parentId == '5' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089192_beauty_2.png' + : parentId == '6' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089193_baby-child_2.png' + : parentId == '7' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089194_vitamins-supplements_2.png' + : parentId == '8' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089195_diet-nutrition_2.png' + : parentId == '9' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089196_household_2.png' + : parentId == '10' + ? 'https://uat.hmgwebservices.com/epharmacy/content/images/thumbs/0089197_home-care-appliances_2.png' + : '', + fit: BoxFit.fill, + height: 160.0, + width: double.infinity), + ), + if (model.subCategorise.length > 8) + Column( + children: [ + InkWell( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: EdgeInsets.all(10.0), + child: Container( + child: Texts(TranslationBase.of(context).viewSubCategorise), + ), + ), + Icon(Icons.arrow_forward) + ], + ), + onTap: () { + showModalBottomSheet( + isScrollControlled: true, + context: context, + builder: (BuildContext context) { + return Container( + height: MediaQuery.of(context).size.height * 0.89, + color: Colors.white, + child: Center( + child: ListView.builder( + scrollDirection: Axis.vertical, + itemCount: model.subCategorise.length, + itemBuilder: (BuildContext context, int index) { + return Container( + child: Padding( + padding: EdgeInsets.all(8.0), + child: InkWell( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + projectViewModel.isArabic ? model.subCategorise[index].namen : model.subCategorise[index].name, +// model.subCategorise[index].name + ), + Divider( + thickness: 0.6, + color: Colors.black12, + ) + ], + ), + onTap: () { + Navigator.push( + context, + FadePage( + page: FinalProductsPage( + id: model.subCategorise[index].id!, + ), + ), + ); + }, + ), + ), + ); + }), + ), + ); + }, + ); + }, + ), + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + ], + ), + +//Expanded widget heree if nassery + Padding( + padding: EdgeInsets.only(top: 35.0), + child: Container( + height: MediaQuery.of(context).size.height * 0.2, + child: Center( + child: ListView.builder( + scrollDirection: Axis.horizontal, + itemCount: model.subCategorise.length, + itemBuilder: (BuildContext context, int index) { + return Padding( + padding: EdgeInsets.symmetric(horizontal: 8.0), + child: InkWell( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 13.0), + child: Container( + height: 60.0, + width: 65.0, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.orange.shade200.withOpacity(0.45), + ), + child: Center( + child: Icon( + Icons.apps_sharp, + size: 32.0, + ), + ), + ), + ), + Container( + width: MediaQuery.of(context).size.width * 0.17, + height: MediaQuery.of(context).size.height * 0.10, + child: Center( + child: Texts( + projectViewModel.isArabic ? model.subCategorise[index].namen : model.subCategorise[index].name, + // model.subCategorise[index].name, + fontSize: 14, + fontWeight: FontWeight.w600, + maxLines: 2, + ), + ), + ), + ], + ), + onTap: () { + Navigator.push( + context, + FadePage( + page: FinalProductsPage( + id: model.subCategorise[index].id!, + ), + ), + ); + }, + ), + ); + }), + ), + ), + ), + + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + InkWell( + child: Row( + children: [ + Icon(Icons.wrap_text), + SizedBox( + width: 10.0, + ), + Texts( + TranslationBase.of(context).refine, +// 'Refine', + fontWeight: FontWeight.w600, + ), + ], + ), + onTap: () { + showModalBottomSheet( + isScrollControlled: true, + context: context, + builder: (BuildContext context) { + return DraggableScrollableSheet( + initialChildSize: 0.95, + maxChildSize: 0.95, + minChildSize: 0.9, + builder: (BuildContext context, ScrollController scrollController) { + return SingleChildScrollView( + controller: scrollController, + child: Container( + color: Colors.white, + height: MediaQuery.of(context).size.height * 1.95, + child: Column( + children: [ + Padding( + padding: EdgeInsets.all(8.0), + child: Row( + children: [ + Icon( + Icons.wrap_text, + ), + SizedBox( + width: 10.0, + ), + Texts( + TranslationBase.of(context).refine, +// 'Refine', + fontWeight: FontWeight.w600, + ), + SizedBox( + width: 250.0, + ), + InkWell( + child: Texts( + TranslationBase.of(context).closeIt, +// 'Close', + color: Colors.red, + fontWeight: FontWeight.w600, + fontSize: 15.0, + ), + onTap: () { + Navigator.pop(context); + }, + ), + ], + ), + ), + Divider( + thickness: 1.0, + color: Colors.black12, + ), + Column( + children: [ + ExpansionTile( + title: Texts(TranslationBase.of(context).subGroup), + children: [ + ProcedureListWidget( + model: model, + masterList: model.subCategorise, + removeHistory: (item) { + setState(() { + entityList.remove(item); + }); + }, + addHistory: (history) { + setState(() { + entityList.add(history); + }); + }, + isEntityListSelected: (master) => isEntityListSelected(master), + ) + ], + ), + Divider( + thickness: 1.0, + color: Colors.black12, + ), + ExpansionTile( + title: Texts(TranslationBase.of(context).brands), + children: [ + ProcedureListWidget( + model: model, + masterList: model.brandsList, + removeHistory: (item) { + setState(() { + entityListBrands.remove(item); + }); + }, + addHistory: (history) { + setState(() { + entityListBrands.add(history); + }); + }, + isEntityListSelected: (master) => isEntityListSelectedBrands(master), + ) + ], + ), + Divider( + thickness: 1.0, + color: Colors.black12, + ), + ExpansionTile( + title: Texts(TranslationBase.of(context).price), + children: [ + Container( + color: Color(0xffEEEEEE), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Texts(TranslationBase.of(context).min), + Container( + color: Colors.white, + width: 200, + height: 40, + child: TextFormField( + decoration: InputDecoration( + border: OutlineInputBorder(), + ), + controller: minField, + ), + ), + ], + ), + Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Texts(TranslationBase.of(context).max), + Container( + color: Colors.white, + width: 200, + height: 40, + child: TextFormField( + decoration: InputDecoration( + border: OutlineInputBorder(), + ), + controller: maxField, + ), + ), + ], + ), + ], + ), + ) + ], + ), + Divider( + thickness: 1.0, + color: Colors.black12, + ), + SizedBox( + height: MediaQuery.of(context).size.height * 0.4, + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Expanded( + child: Container( + width: 100, + child: Button( + label: TranslationBase.of(context).reset, +// 'Reset', + backgroundColor: Colors.red, + ), + ), + ), + SizedBox( + width: 30, + ), + Container( + width: 200, + child: Button( + onTap: () async { + String categoriesId = ""; + for (CategoriseParentModel category in entityList) { + if (categoriesId == "") { + categoriesId = category.id!; + } else { + categoriesId = "$categoriesId,${category.id}"; + } + } + String brandIds = ""; + + for (CategoriseParentModel brand in entityListBrands) { + if (brandIds == "") { + brandIds = brand.id!; + } else { + brandIds = "$brandIds,${brand.id}"; + } + } + GifLoaderDialogUtils.showMyDialog(context); + + await model.getFilteredSubProducts( + min: minField.text.isEmpty ? "" : minField.text.toString(), + max: maxField.text.isEmpty ? "" : maxField.text.toString(), + categoryId: categoriesId, + brandId: brandIds.isEmpty ? "" : "&manufacturerids=" + brandIds); + GifLoaderDialogUtils.hideDialog(context); + Navigator.pop(context); + }, + label: TranslationBase.of(context).apply, +// 'Apply', + backgroundColor: Colors.green, + ), + ), + ], + ), + ), + ], + ), + ], + ), + ), + ); + }); + }, + ); + }, + ), + Row( + children: [ + Container( + height: 44.0, + child: VerticalDivider( + color: Colors.black45, + thickness: 1.0, + //width: 0.3, + // indent: 0.0, + ), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: InkWell( + child: styleIcon, + onTap: () { + setState(() { + if (styleOne == true) { + styleOne = false; + styleTwo = true; + styleIcon = Icon( + Icons.auto_awesome_mosaic, + color: CustomColors.green, + size: 29.0, + ); + } else { + styleOne = true; + styleTwo = false; + styleIcon = Icon( + Icons.widgets_sharp, + color: CustomColors.green, + size: 29.0, + ); + } + }); + }, + ), + ), + ], + ), + ], + ), + ), + Divider( + thickness: 1.0, + color: Colors.grey.shade400, + ), + model.subProducts.isNotEmpty + ? styleOne == true + ? Container( + height: model.subProducts.length * MediaQuery.of(context).size.height * 0.15, + child: GridView.builder( + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + crossAxisSpacing: 0.5, + mainAxisSpacing: 2.0, + childAspectRatio: 0.9, + ), + itemCount: model.subProducts.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + child: Card( + color: model.subProducts[index].discountName != null ? Color(0xffFFFF00) : Colors.white, + elevation: 0, + shape: Border( + right: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + left: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + bottom: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + top: BorderSide( + color: Colors.grey.shade300, + width: 1, + ), + ), + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(110.0), + ), + color: Colors.white, + ), + padding: EdgeInsets.symmetric(horizontal: 0), + width: MediaQuery.of(context).size.width / 3, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Stack( + children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 16, 0, 0), + alignment: Alignment.center, + child: Image.network( + model.subProducts[index].images!.isNotEmpty + ? model.subProducts[index].images![0].thumb! + : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', + fit: BoxFit.cover, + height: 80, + ), + ), + Container( + width: model.subProducts[index].rxMessage != null ? MediaQuery.of(context).size.width / 3 : 0, + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xffb23838), + borderRadius: BorderRadius.only(topLeft: Radius.circular(6)), + ), + child: model.subProducts[index].rxMessage != null + ? Texts( + projectProvider.isArabic ? model.subProducts[index].rxMessagen : model.subProducts[index].rxMessage, + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + : Texts(""), +// Texts( +// model.subProducts[index].rxMessage != null ? model.subProducts[index].rxMessage : "", +// color: Colors.white, +// regular: true, +// fontSize: 10, +// fontWeight: FontWeight.w400, +// ), + ), + ], + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + projectViewModel.isArabic ? model.subProducts[index].namen : model.subProducts[index].name, +// model.subProducts[index].name, + regular: true, + fontSize: 12, + fontWeight: FontWeight.w400, + ), + Padding( + padding: const EdgeInsets.only(top: 4, bottom: 4), + child: Texts( + "SAR ${model.subProducts[index].price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ +// StarRating( +// totalAverage: model.subProducts[index].approvedRatingSum > 0 +// ? (model.subProducts[index].approvedRatingSum.toDouble() / model.subProducts[index].approvedRatingSum.toDouble()).toDouble() +// : 0, +// forceStars: true), + RatingBar( + initialRating: model.subProducts[index].approvedRatingSum!.toDouble(), + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star_border, + color: CustomColors.accentColor, + ), + ), + onRatingUpdate: (double value) {}, + unratedColor: Colors.grey[500], + updateOnDrag: false, + tapOnlyMode: false, + ), + Texts( + "(${model.subProducts[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + ], + ), + ], + ), + ), + ], + ), + ), + ), + onTap: () => { + Navigator.push( + context, + FadePage( + page: ProductDetailPage(model.subProducts[index]), + )), + }, + ); + }, + ), + ) + : Container( + height: model.subProducts.length * MediaQuery.of(context).size.height * 0.122, + child: ListView.builder( + physics: NeverScrollableScrollPhysics(), + itemCount: model.subProducts.length, + itemBuilder: (BuildContext context, int index) { + return InkWell( + child: Card( + child: Row( + children: [ + Stack( + children: [ + Column( + children: [ + Container( + decoration: BoxDecoration(), + child: Padding( + padding: EdgeInsets.only( + left: 9.0, + top: 8.0, + right: 10.0, + ), + ), + ), + Container( + margin: EdgeInsets.fromLTRB(0, 0, 0, 8), + alignment: Alignment.center, + child: (model.subProducts[index].images != null && model.subProducts[index].images!.length > 0) + ? Image.network( + model.subProducts[index].images![0].src!, + fit: BoxFit.cover, + height: 80, + width: 80, + ) + : Image.asset( + "assets/images/no_image.png", + fit: BoxFit.cover, + height: 80, + width: 80, + ), + ), + ], + ), + Column( + children: [ + Container( + width: model.subProducts[index].rxMessage != null ? MediaQuery.of(context).size.width / 3.70 : 0, + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xffb23838), + //borderRadius: BorderRadius.only(topLeft: Radius.circular(5)), + ), + child: model.subProducts[index].rxMessage != null + ? Texts( + projectProvider.isArabic ? model.subProducts[index].rxMessagen : model.subProducts[index].rxMessage, + color: Colors.white, + regular: true, + fontSize: 8, + fontWeight: FontWeight.w600, + ) + : Texts(""), + ), + ], + ), + ], + ), + Container( + height: 100.0, + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 4.0, + ), + Container( + width: MediaQuery.of(context).size.width * 0.55, + child: Texts( + projectViewModel.isArabic ? model.subProducts[index].namen : model.subProducts[index].name, + regular: true, + fontSize: 13.2, + fontWeight: FontWeight.w500, + maxLines: 5, + ), + ), + SizedBox( + height: 8.0, + ), + Padding( + padding: const EdgeInsets.only(top: 4, bottom: 4), + child: Texts( + "SAR ${model.subProducts[index].price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ + RatingBar( + initialRating: model.subProducts[index].approvedRatingSum!.toDouble(), + ratingWidget: RatingWidget( + full: Icon( + Icons.star, + color: CustomColors.accentColor, + ), + half: Icon( + Icons.star_half, + color: CustomColors.accentColor, + ), + empty: Icon( + Icons.star_border, + color: CustomColors.accentColor, + ), + ), + onRatingUpdate: (double value) {}, + unratedColor: Colors.grey[500], + updateOnDrag: false, + tapOnlyMode: false, + ), + Texts( + "(${model.subProducts[index].approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + ], + ), + ], + ), + ), + widget.authenticatedUserObject.isLogin + ? Container( + child: IconButton( + icon: Icon( + Icons.shopping_cart, + size: 18, + color: CustomColors.green, + ), + onPressed: () async { + if (model.subProducts[index].isRx == false) { + GifLoaderDialogUtils.showMyDialog(context); + await addToCartFunction(1, model.subProducts[index].id); + GifLoaderDialogUtils.hideDialog(context); + utils.Utils.navigateToCartPage(); + } else { + AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription); + } +// + }), + ) + : Container(), + ], + ), + ), + onTap: () => { + Navigator.push( + context, + FadePage( + page: ProductDetailPage(model.subProducts[index]), + )), + }, + ); +// return InkWell( +// child: Card( +// child: Row( +// children: [ +// Stack( +// children: [ +// Column( +// children: [ +// Container( +// decoration: +// BoxDecoration(), +// child: Padding( +// padding: +// EdgeInsets +// .only( +// left: 9.0, +// top: 8.0, +// right: 10.0, +// ), +// ), +// ), +// Container( +// margin: EdgeInsets +// .fromLTRB( +// 0, 0, 0, 0), +// alignment: Alignment +// .center, +// child: model +// .subProducts[ +// index] +// .images +// .isNotEmpty +// ? Image.network( +// model +// .subProducts[ +// index] +// .images[ +// 0] +// .thumb, +// fit: BoxFit +// .contain, +// height: 70, +// ) +// : Text(TranslationBase.of( +// context) +// .noImage), +// ), +// ], +// ), +// Column( +// children: [ +// Container( +// width: model +// .subProducts[ +// index] +// .rxMessage != +// null +// ? MediaQuery.of( +// context) +// .size +// .width / +// 3.70 +// : 0, +// padding: +// EdgeInsets.all( +// 4), +// decoration: +// BoxDecoration( +// color: Color( +// 0xffb23838), +// // borderRadius: BorderRadius.only( +// // topLeft: Radius +// // .circular( +// // 6)), +// ), +// child: model +// .subProducts[ +// index] +// .rxMessage != +// null +// ? Texts( +// projectProvider +// .isArabic +// ? model +// .subProducts[ +// index] +// .rxMessagen +// : model +// .subProducts[index] +// .rxMessage, +// color: Colors +// .white, +// regular: +// true, +// fontSize: +// 10, +// fontWeight: +// FontWeight +// .w400, +// ) +// : Texts(""), +// // Texts( +// // model.subProducts[index].rxMessage != null ? model.subProducts[index].rxMessage : "", +// // color: Colors.white, +// // regular: true, +// // fontSize: 10, +// // fontWeight: FontWeight.w400, +// // ), +// ), +// ], +// ), +// ], +// ), +// Container( +// height: 130.0, +// margin: +// EdgeInsets.symmetric( +// horizontal: 0, +// vertical: 0, +// ), +// child: Column( +// mainAxisAlignment: +// MainAxisAlignment +// .spaceAround, +// crossAxisAlignment: +// CrossAxisAlignment +// .start, +// children: [ +// SizedBox( +// height: 4.0, +// ), +// Container( +// width: MediaQuery.of( +// context) +// .size +// .width * +// 0.65, +// child: Texts( +// projectViewModel +// .isArabic +// ? model +// .subProducts[ +// index] +// .namen +// : model +// .subProducts[ +// index] +// .name, +// // model.subProducts[index].name, +// regular: true, +// fontSize: 13.2, +// fontWeight: +// FontWeight.w500, +// maxLines: 5, +// ), +// ), +// SizedBox( +// height: 8.0, +// ), +// Padding( +// padding: +// const EdgeInsets +// .only( +// top: 4, +// bottom: 4), +// child: Texts( +// "SAR ${model.subProducts[index].price}", +// bold: true, +// fontSize: 14, +// ), +// ), +// Row( +// children: [ +// // StarRating( +// // totalAverage: model.subProducts[index].approvedRatingSum > 0 +// // ? (model.subProducts[index].approvedRatingSum.toDouble() / model.subProducts[index].approvedRatingSum.toDouble()).toDouble() +// // : 0, +// // forceStars: true), +// RatingBar.readOnly( +// initialRating: model +// .subProducts[ +// index] +// .approvedRatingSum +// .toDouble(), +// size: 15.0, +// filledColor: +// Colors.yellow[ +// 700], +// emptyColor: Colors +// .grey[500], +// isHalfAllowed: +// true, +// halfFilledIcon: +// Icons +// .star_half, +// filledIcon: +// Icons.star, +// emptyIcon: +// Icons.star, +// ), +// Texts( +// "(${model.subProducts[index].approvedTotalReviews})", +// regular: true, +// fontSize: 10, +// fontWeight: +// FontWeight +// .w400, +// ) +// ], +// ), +// ], +// ), +// ), +// widget.authenticatedUserObject +// .isLogin +// ? Container( +// child: IconButton( +// icon: Icon( +// Icons +// .shopping_cart, +// size: 18, +// color: +// CustomColors +// .green, +// ), +// onPressed: +// () async { +// if (model +// .subProducts[ +// index] +// .isRx == false) { +// GifLoaderDialogUtils +// .showMyDialog( +// context); +// await addToCartFunction( +// 1, +// model +// .subProducts[ +// index] +// .id); +// GifLoaderDialogUtils +// .hideDialog( +// context); +// Utils +// .navigateToCartPage(); +// } else { +// AppToast.showErrorToast( +// message: TranslationBase.of( +// context) +// .needPrescription); +// } +// }), +// ) +// : Container(), +// ], +// ), +// ), +// onTap: () => { +// Navigator.push( +// context, +// FadePage( +// page: ProductDetailPage( +// model.subProducts[ +// index]), +// )), +// }, +// ); + }), + ) + : Padding( + padding: const EdgeInsets.all(12.0), + child: Container( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + 'assets/images/new-design/empty_box.png', + width: 100, + height: 100, + fit: BoxFit.cover, + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + TranslationBase.of(context).noData, + style: TextStyle(fontSize: 30), + ), + ) + ], + ), + ), + ), + ) + ], + ), + ), + ), + ), + )); + } + + bool isEntityListSelected(CategoriseParentModel masterKey) { + Iterable history = entityList.where((element) => masterKey.id == element.id); + if (history.length > 0) { + return true; + } + return false; + } + + bool isEntityListSelectedBrands(CategoriseParentModel masterKey) { + Iterable history = entityListBrands.where((element) => masterKey.id == element.id); + if (history.length > 0) { + return true; + } + return false; + } + + addToCartFunction(quantity, itemID) async { + ProductDetailViewModel x = new ProductDetailViewModel(); + await x.addToCartData(quantity, itemID, context); + } +} diff --git a/lib/pages/symptom-checker/info.dart b/lib/pages/symptom-checker/info.dart new file mode 100644 index 00000000..41724809 --- /dev/null +++ b/lib/pages/symptom-checker/info.dart @@ -0,0 +1,129 @@ +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SymptomInfo extends StatefulWidget { + @override + _SymptomInfo createState() => new _SymptomInfo(); +} + +class _SymptomInfo extends State { + bool checkValue = false; + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).termsService, + isShowAppBar: true, + body: Padding( + padding: EdgeInsets.all(20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).beforeUsing, + fontWeight: FontWeight.bold, + fontSize: 14, + // textAlign: TextAlign.center, + ), + Container( + width: MediaQuery.of(context).size.width, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + ), + padding: EdgeInsets.all(30), + margin: EdgeInsets.all(10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + AppText(TranslationBase.of(context).remeberthat, + fontSize: 16), + SizedBox( + height: 10, + ), + AppText( + '1. ' + TranslationBase.of(context).checkDiagnosis, + fontWeight: FontWeight.bold, + fontSize: 16, + ), + AppText(TranslationBase.of(context).informational, + fontSize: 16), + SizedBox( + height: 10, + ), + AppText( + '2. ' + TranslationBase.of(context).notUseInEmbergency, + fontWeight: FontWeight.bold, + fontSize: 16, + ), + AppText( + TranslationBase.of(context).notUseInEmbergencyDetails, + fontSize: 16), + AppText( + TranslationBase.of(context).notUseInEmbergencyCall, + underline: true, + color: Colors.blue, + fontSize: 16), + SizedBox( + height: 10, + ), + AppText( + '3.' + TranslationBase.of(context).dataSafe, + fontWeight: FontWeight.bold, + fontSize: 16, + ), + AppText(TranslationBase.of(context).dataSafeInfo, + fontSize: 16), + ], + ), + ), + Expanded( + flex: 1, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Padding( + padding: EdgeInsets.all(10), + child: CheckboxListTile( + title: AppText(TranslationBase.of(context).accept), + value: checkValue, + onChanged: (newValue) { + setState(() { + this.checkValue = newValue!; + }); + }, + controlAffinity: ListTileControlAffinity + .leading, // <-- leading Checkbox + ), + ), + Row( + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).next, + () => { + if (checkValue == true) + { + Navigator.of(context).pushNamed( + SELECT_GENDER, + ) + } + }, + color: checkValue == true + ? Colors.black + : Colors.grey, + textColor: Colors.white, + )) + ], + ), + ], + )) + ], + ))); + } +} diff --git a/lib/pages/symptom-checker/select-gender.dart b/lib/pages/symptom-checker/select-gender.dart new file mode 100644 index 00000000..c0ca1712 --- /dev/null +++ b/lib/pages/symptom-checker/select-gender.dart @@ -0,0 +1,122 @@ +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +// import 'package:flutter_xlider/flutter_xlider.dart'; + +class SelectGender extends StatefulWidget { + @override + _SelectGender createState() => new _SelectGender(); +} + +class _SelectGender extends State { + double slider = 22; + + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: TranslationBase.of(context).gender, + isShowAppBar: true, + body: Padding( + padding: EdgeInsets.all(20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + //TranslationBase.of(context).beforeUsing, + TranslationBase.of(context).selectGender, + fontWeight: FontWeight.bold, + fontSize: 20, + // textAlign: TextAlign.center, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + AppText(TranslationBase.of(context).iAma, fontSize: 16), + SizedBox( + height: 10, + ), + Row( + children: [ + Expanded( + child: Container( + height: 200, + width: 150, + child: Card( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(15.0), + ), + shadowColor: Colors.red, + child: Image.asset( + 'assets/images/female_face.png')))), + Expanded( + child: Container( + height: 200, + width: 150, + child: Card( + shadowColor: Colors.red, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(15.0), + ), + child: Image.asset( + 'assets/images/male_face.png')))) + ], + ), + AppText(TranslationBase.of(context).selectAge, + fontSize: 25), + SizedBox( + height: 10, + ), + AppText( + TranslationBase.of(context).iAm + + ' ' + + slider.toString() + + ' ' + + TranslationBase.of(context) + .yearOld, //TranslationBase.of(context).remeberthat, + fontSize: 16), + SizedBox( + height: 30, + ), + // FlutterSlider( + // values: [slider], + // max: 90, + // min: 14, + // onDragCompleted: (handlerIndex, lowerValue, upperValue) { + // print(lowerValue); + // print(upperValue); + // setState(() { + // slider = upperValue; + // }); + // }, + // ), + ], + ), + Expanded( + flex: 1, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Row( + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).next, + () => { + Navigator.of(context).pushNamed( + SYMPTOM_CHECKER, + ) + }, + )) + ], + ), + ], + )) + ], + ))); + } +} diff --git a/lib/pages/symptom-checker/symtom-checker.dart b/lib/pages/symptom-checker/symtom-checker.dart new file mode 100644 index 00000000..c088caab --- /dev/null +++ b/lib/pages/symptom-checker/symtom-checker.dart @@ -0,0 +1,61 @@ +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class SymptomChecker extends StatelessWidget { + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: 'Symptom Checker', + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SvgPicture.string( + ''' + + + + + + + + + + + + + + + + + + + + + + + + + + +'''), + Padding( + padding: EdgeInsets.all(10), + child: Row( + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).next, + () => {}, + )) + ], + )) + ], + ))); + } +} diff --git a/lib/pages/vaccine/my_vaccines_item_screen.dart b/lib/pages/vaccine/my_vaccines_item_screen.dart new file mode 100644 index 00000000..2aa78aee --- /dev/null +++ b/lib/pages/vaccine/my_vaccines_item_screen.dart @@ -0,0 +1,74 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.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:provider/provider.dart'; + +import '../base/base_view.dart'; + +class MyVaccinesItemPage extends StatefulWidget { + @override + _MyVaccinesItemPageState createState() => _MyVaccinesItemPageState(); +} + +class _MyVaccinesItemPageState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getMyVaccinationItem(), + builder: (BuildContext context, VaccineViewModel model, Widget? child) => + AppScaffold( + isShowAppBar: true, + appBarTitle: TranslationBase.of(context).myVaccinesAvailability, + baseViewModel: model, + body: Container( + margin: EdgeInsets.only( + left: SizeConfig.screenWidth! * 0.004, + right: SizeConfig.screenWidth! * 0.004, + top: SizeConfig.screenWidth! * 0.04, + ), + child: ListView.builder( + itemCount: model.vaccinationItemList.length, + itemBuilder: (context, index) => InkWell( + onTap: () async { + await model.getMyVaccinationOnHand( + pItemCode: model.vaccinationItemList[index].iTEMCODE); + if (model.hasError) { + AppToast.showErrorToast(message: model.error); + } else { + //TODO show dialog + + } + }, + child: Container( + margin: EdgeInsets.all(5), + padding: EdgeInsets.all(10), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(7), + color: Colors.white, + ), + child: Row( + children: [ + Expanded( + child: Texts( + model.vaccinationItemList[index].dESCRIPTION)), + Icon(projectViewModel.isArabic + ? Icons.arrow_forward + : Icons.arrow_back_ios) + ], + ), + ), + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/vaccine/my_vaccines_screen.dart b/lib/pages/vaccine/my_vaccines_screen.dart new file mode 100644 index 00000000..44d85cc5 --- /dev/null +++ b/lib/pages/vaccine/my_vaccines_screen.dart @@ -0,0 +1,103 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../base/base_view.dart'; + +//TODO fix by jammal we have a static data +class MyVaccines extends StatefulWidget { + @override + _MyVaccinesState createState() => _MyVaccinesState(); +} + +class _MyVaccinesState extends State { + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) => model.getVaccine(), + builder: (BuildContext context, VaccineViewModel model, Widget? child) => AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + baseViewModel: model, + appBarTitle: TranslationBase.of(context).myVaccines, + description: TranslationBase.of(context).infoVaccines, + imagesInfo: [ + ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/ar/0.png'), + ], + body: SingleChildScrollView( + child: Column( + children: [ + AppExpandableNotifier( + isExpand: true, + title: model.state == ViewState.Idle + ? model.vaccineList.isEmpty + ? "" + : DateUtil.convertStringToDate(model.vaccineList[0].vaccinationDate!).year.toString() + : "", + bodyWidget: Container( + child: ListView.separated( + physics: ScrollPhysics(), + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: model.vaccineList == null ? 0 : model.vaccineList.length, + padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21), + separatorBuilder: (context, index) => SizedBox(height: 14), + itemBuilder: (BuildContext context, int index) { + return DoctorCard( + onTap: null, + isInOutPatient: true, + isShowInOutPatient: false, + name: TranslationBase.of(context).dr.toString() + " " + model.vaccineList[index].doctorName!, + billNo: "", + vaccineName: model.vaccineList[index].vaccineName!, + profileUrl: model.vaccineList[index].doctorImageURL, + subName: model.vaccineList[index].projectName, + isLiveCareAppointment: false, + date: DateUtil.convertStringToDate(model.vaccineList[index].vaccinationDate!), + isSortByClinic: true, + ); + }, + ), + ), + ), + SizedBox( + height: 40.0, + ) + // SpaceBetweenTexts(space: 165.0), + ], + ), + ), + bottomSheet: Container( + color: Colors.white, + padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), + child: DefaultButton( + TranslationBase.of(context).sendEmail, + () { + showDialog( + context: context, + builder: (cxt) => ConfirmSendEmailDialog( + email: projectViewModel.user!.emailAddress!, + onTapSendEmail: () { + model.sendEmail(message: TranslationBase.of(context).emailSentSuccessfully); + }, + ), + ); + }, + )), + ), + ); + } +} diff --git a/lib/pages/videocall-webrtc-rnd/js_wrapper/multistreammixer-wrapper.dart b/lib/pages/videocall-webrtc-rnd/js_wrapper/multistreammixer-wrapper.dart new file mode 100644 index 00000000..b21a345d --- /dev/null +++ b/lib/pages/videocall-webrtc-rnd/js_wrapper/multistreammixer-wrapper.dart @@ -0,0 +1,15 @@ +@JS() +library streammixer.js; +import 'package:js/js.dart'; + + +@JS('multiStreamsMixerFlutter') +external initMultiStreamsMixer(arrayOfMediaStreams); + +@JS("MultiStreamsMixer") +class MultiStreamsMixer { + external MultiStreamsMixer(arrayOfMediaStreams, elementClass); + + external getMixedStream(); + external start(); +} \ No newline at end of file diff --git a/lib/pages/videocall-webrtc-rnd/utils/blob-extension.dart b/lib/pages/videocall-webrtc-rnd/utils/blob-extension.dart new file mode 100644 index 00000000..7f20a6f5 --- /dev/null +++ b/lib/pages/videocall-webrtc-rnd/utils/blob-extension.dart @@ -0,0 +1,45 @@ +// import 'dart:async'; +// import 'dart:html' as html; +// +// import 'dart:typed_data'; +// +// extension xHtmlBlob on html.Blob{ +// +// /* File Reader --- */ +// Future _fileDataUrlReader()async{ +// html.FileReader reader = html.FileReader(); +// reader.readAsDataUrl(this); +// return reader; +// } +// +// Future _fileByteReader()async{ +// html.FileReader reader = html.FileReader(); +// reader.readAsArrayBuffer(this); +// return reader; +// } +// /* --- File Reader */ +// +// Future readDataUrl() async{ +// Completer completer = Completer(); +// _fileDataUrlReader().then((reader){ +// reader.onLoadEnd.listen((e) async { +// dynamic data = reader.result; +// completer.complete(data); +// }); +// }); +// final data = await completer.future; +// return data; +// } +// +// Future readBytes() async{ +// Completer completer = Completer(); +// _fileByteReader().then((reader){ +// reader.onLoadEnd.listen((e) async { +// dynamic data = reader.result; +// completer.complete(data); +// }); +// }); +// final data = await completer.future; +// return data; +// } +// } \ No newline at end of file diff --git a/lib/pages/videocall-webrtc-rnd/utils/device_info.dart b/lib/pages/videocall-webrtc-rnd/utils/device_info.dart new file mode 100644 index 00000000..668f2f12 --- /dev/null +++ b/lib/pages/videocall-webrtc-rnd/utils/device_info.dart @@ -0,0 +1,15 @@ +import 'dart:io'; + +class DeviceInfo { + static String get label { + return 'Flutter ' + + Platform.operatingSystem + + '(' + + Platform.localHostname + + ")"; + } + + static String get userAgent { + return 'flutter-webrtc/' + 'Web' + '-plugin 0.0.1'; + } +} diff --git a/lib/pages/videocall-webrtc-rnd/utils/device_info_web.dart b/lib/pages/videocall-webrtc-rnd/utils/device_info_web.dart new file mode 100644 index 00000000..34fad372 --- /dev/null +++ b/lib/pages/videocall-webrtc-rnd/utils/device_info_web.dart @@ -0,0 +1,11 @@ +// ignore: avoid_web_libraries_in_flutter + +class DeviceInfo { + static String get label { + return 'Flutter Web'; + } + + static String get userAgent { + return 'flutter-webrtc/web-plugin 0.0.1 (Mobile)'; + } +} diff --git a/lib/pages/videocall-webrtc-rnd/utils/turn.dart b/lib/pages/videocall-webrtc-rnd/utils/turn.dart new file mode 100644 index 00000000..f91fef80 --- /dev/null +++ b/lib/pages/videocall-webrtc-rnd/utils/turn.dart @@ -0,0 +1,19 @@ +import 'dart:convert'; +import 'dart:async'; +import 'dart:io'; + +Future getTurnCredential(String host) async { + HttpClient client = HttpClient(context: SecurityContext()); + client.badCertificateCallback = + (X509Certificate cert, String host, int port) { + print('getTurnCredential: Allow self-signed certificate => $host:$port. '); + return true; + }; + var url = '$host/api/turn?service=turn&username=flutter-webrtc'; + var request = await client.getUrl(Uri.parse(url)); + var response = await request.close(); + var responseBody = await response.transform(Utf8Decoder()).join(); + print('getTurnCredential:response => $responseBody.'); + Map data = JsonDecoder().convert(responseBody); + return data; + } diff --git a/lib/pages/videocall-webrtc-rnd/utils/turn_web.dart b/lib/pages/videocall-webrtc-rnd/utils/turn_web.dart new file mode 100644 index 00000000..bf2ea7ad --- /dev/null +++ b/lib/pages/videocall-webrtc-rnd/utils/turn_web.dart @@ -0,0 +1,13 @@ +import 'dart:convert'; +import 'package:http/http.dart' as http; + +Future getTurnCredential(String host, int port) async { + var url = 'https://$host:$port/api/turn?service=turn&username=flutter-webrtc'; + final res = await http.get(Uri.parse(url)); + if (res.statusCode == 200) { + var data = json.decode(res.body); + print('getTurnCredential:response => $data.'); + return data; + } + return {}; +} diff --git a/lib/pages/videocall-webrtc-rnd/utils/upload-recording.dart b/lib/pages/videocall-webrtc-rnd/utils/upload-recording.dart new file mode 100644 index 00000000..53eb2230 --- /dev/null +++ b/lib/pages/videocall-webrtc-rnd/utils/upload-recording.dart @@ -0,0 +1,97 @@ +// import 'dart:convert'; +// import 'dart:html' as html; +// +// import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/utils/blob-extension.dart'; +// import 'package:flutter/cupertino.dart'; +// import 'package:http/http.dart' as http; +// +// // should run on port '65482' add to additional arguments --web-port=65482 +// class UploadRecording{ +// +// final url = "https://vcallapi.hmg.com/api/videocall/trackMeeting"; +// // final url = "https://10.20.200.186/api/videocall/trackMeeting"; +// upload(html.Blob blob, {@required Map params, @required Function completion, @required Function(double) onProgress}) async{ +// +// final bytes = await blob.readBytes(); +// final filename = "${DateTime.now().millisecondsSinceEpoch}.webm"; +// final file = http.MultipartFile.fromBytes('file', bytes ?? [], filename: filename); +// +// var request = http.MultipartRequest('POST', Uri.parse(url)); +// request.files.add(file); +// request.fields.addAll({'fileName':filename,...params}); +// +// print("Uploading video of '${blob.size}' bytes"); +// var response = await request.send().catchError((e){ +// print(e.toString()); +// completion(e.toString()); +// }); +// +// print(response.statusCode); +// if (response.statusCode == 200) { +// final bytes = await response.stream.toBytes(); +// final jsonString = utf8.decode(bytes); +// final json = jsonDecode(jsonString); +// if(json == null) +// completion('200: Invalid response format'); +// else +// completion(json); +// +// }else { +// print(response.reasonPhrase); +// completion(response.reasonPhrase); +// } +// } +// +// _upload(html.Blob blob, {@required Map params, @required Function completion, @required Function(double) onProgress}) async{ +// final blobBytes = await blob.readBytes(); +// +// Map body = {}; +// body.addAll(params); +// body['file'] = blobBytes ?? []; +// body['fileName'] = "${DateTime.now().millisecondsSinceEpoch}.webm"; +// +// final json = jsonEncode(body); +// +// var request = http.StreamedRequest('POST', Uri.parse(url)); +// +// var totalLength = json.length;// Total length (to calculate upload progress) +// var transferredLength = 0;// Length transferred (to calculate upload progress) +// var uploadProgress = 0.0; // Upload progress (from 0.0 to 1.0) +// +// Stream.value(json).transform(utf8.encoder).listen((chunk) { +// +// transferredLength += chunk.length; +// uploadProgress = transferredLength / totalLength; +// // print("Chunk: ${chunk.length}, transferred: $transferredLength, progress: $uploadProgress"); +// request.sink.add(chunk); +// onProgress(uploadProgress*100); +// +// }, onDone: () { +// print("Done. Total: $totalLength, transferred: $transferredLength, progress: $uploadProgress"); +// request.sink.close(); +// onProgress(uploadProgress*100); +// }); +// +// +// print("Uploading video of '${blob.size}' bytes"); +// var response = await request.send(); +// +// print(response.statusCode); +// if (response.statusCode == 200){ +// +// final bytes = await response.stream.toBytes(); +// final jsonString = utf8.decode(bytes); +// final json = jsonDecode(jsonString); +// if(json == null) +// completion('200: Invalid response format'); +// else +// completion(json); +// +// +// }else { +// print("${response.statusCode}: ${response.reasonPhrase}"); +// completion(response.reasonPhrase); +// } +// +// } +// } \ No newline at end of file diff --git a/lib/pages/videocall-webrtc-rnd/utils/websocket.dart b/lib/pages/videocall-webrtc-rnd/utils/websocket.dart new file mode 100644 index 00000000..acb4720d --- /dev/null +++ b/lib/pages/videocall-webrtc-rnd/utils/websocket.dart @@ -0,0 +1,75 @@ +import 'dart:io'; +import 'dart:math'; +import 'dart:convert'; +import 'dart:async'; + +class SimpleWebSocket { + String? _url; + late var _socket; + late Function() onOpen; + late Function(dynamic msg) onMessage; + late Function(int code, String reaso) onClose; + SimpleWebSocket(this._url); + + connect() async { + try { + //_socket = await WebSocket.connect(_url); + print('connecting to $_url'); + _socket = await _connectForSelfSignedCert(_url); + onOpen?.call(); + _socket.listen((data) { + onMessage?.call(data); + }, onDone: () { + onClose?.call(_socket.closeCode, _socket.closeReason); + }); + } catch (e) { + onClose?.call(500, e.toString()); + } + } + + send(data) { + if (_socket != null) { + _socket.add(data); + print('send: $data'); + } + } + + close() { + if (_socket != null) _socket.close(); + } + + Future _connectForSelfSignedCert(url) async { + try { + Random r = new Random(); + String key = base64.encode(List.generate(8, (_) => r.nextInt(255))); + HttpClient client = HttpClient(context: SecurityContext()); + client.badCertificateCallback = + (X509Certificate cert, String host, int port) { + print( + 'SimpleWebSocket: Allow self-signed certificate => $host:$port. '); + return true; + }; + + HttpClientRequest request = + await client.getUrl(Uri.parse(url)); // form the correct url here + request.headers.add('Connection', 'Upgrade'); + request.headers.add('Upgrade', 'websocket'); + request.headers.add( + 'Sec-WebSocket-Version', '13'); // insert the correct version here + request.headers.add('Sec-WebSocket-Key', key.toLowerCase()); + + HttpClientResponse response = await request.close(); + // ignore: close_sinks + Socket socket = await response.detachSocket(); + var webSocket = WebSocket.fromUpgradedSocket( + socket, + protocol: 'signaling', + serverSide: false, + ); + + return webSocket; + } catch (e) { + throw e; + } + } +} diff --git a/lib/pages/videocall-webrtc-rnd/utils/websocket_web.dart b/lib/pages/videocall-webrtc-rnd/utils/websocket_web.dart new file mode 100644 index 00000000..9b72f402 --- /dev/null +++ b/lib/pages/videocall-webrtc-rnd/utils/websocket_web.dart @@ -0,0 +1,48 @@ +// ignore: avoid_web_libraries_in_flutter +import 'dart:html'; + +class SimpleWebSocket { + late String _url; + late var _socket; + late Function() onOpen; + late Function(dynamic msg) onMessage; + late Function(int code, String reason) onClose; + + SimpleWebSocket(this._url) { + _url = _url.replaceAll('https:', 'wss:'); + } + + connect() async { + try { + _socket = WebSocket(_url); + _socket.onOpen.listen((e) { + onOpen?.call(); + }); + + _socket.onMessage.listen((e) { + onMessage?.call(e.data); + }); + + _socket.onClose.listen((e) { + onClose?.call(e.code, e.reason); + }); + } catch (e) { + onClose?.call(500, e.toString()); + } + } + + send(data) { + if (_socket != null && _socket.readyState == WebSocket.OPEN) { + _socket.send(data); + print('send: $data'); + } else { + print('WebSocket not connected, message $data not sent'); + } + } + + close() { + if (_socket != null) { + _socket.close(); + } + } +} diff --git a/lib/pages/videocall-webrtc-rnd/web_recorder.dart b/lib/pages/videocall-webrtc-rnd/web_recorder.dart new file mode 100644 index 00000000..99217d68 --- /dev/null +++ b/lib/pages/videocall-webrtc-rnd/web_recorder.dart @@ -0,0 +1,234 @@ +// +// import 'dart:async'; +// import 'dart:collection'; +// import 'dart:html' as html; +// import 'dart:io'; +// import 'dart:js' as js; +// import 'dart:typed_data'; +// import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/js_wrapper/multistreammixer-wrapper.dart'; +// import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/utils/blob-extension.dart'; +// import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/utils/upload-recording.dart'; +// import 'package:flutter/cupertino.dart'; +// import 'package:flutter_webrtc/flutter_webrtc.dart'; +// +// final _recorder_options = { +// 'mimeType': 'video/webm;codecs=vp9,opus', +// 'bitsPerSecond': 128000, +// 'audioBitsPerSecond': 128000,// only for audio track +// 'videoBitsPerSecond': 128000// only for video track +// }; +// +// class WebRtcStreamRecorder{ +// html.MediaStream remoteStreamWeb; +// html.MediaStream localStreamWeb; +// +// html.MediaRecorder _local_recorder; +// html.MediaRecorder _mixed_recorder; +// html.MediaRecorder _remote_recorder; +// Duration chunkDuration; +// +// WebRtcStreamRecorder({@required MediaStream remoteStream, @required MediaStream localStream}){ +// remoteStreamWeb = (remoteStream as dynamic).jsStream; // MediaStreamWeb.jsStream +// localStreamWeb = (localStream as dynamic).jsStream; // MediaStreamWeb.jsStream +// } +// +// Function(html.Blob blob, bool isLast, html.MediaRecorder recorder) _blobChunkCallback; +// +// onBlobChunk(Duration chunkDuration,{@required Function(html.Blob blob, bool isLast, html.MediaRecorder recorder) onBlobChunk}){ +// _blobChunkCallback = onBlobChunk; +// this.chunkDuration = chunkDuration; +// } +// +// stop(){ +// _mixed_recorder?.stop(); +// _remote_recorder?.stop(); +// _local_recorder?.stop(); +// _sliceTimer?.cancel(); +// } +// +// WebRtcStreamRecorder start({bool withMixedStream = true}){ +// if(withMixedStream){ +// _recordMixedStream(); +// +// }else{ +// Future.wait([_startLocal(), _startRemote()]).then((value) async{ +// final localVideoData = await value[0].readBytes(); +// final remoteVideoData = await value[1].readBytes(); +// +// processAndSendClip(localVideoData, 'local-video'); +// processAndSendClip(remoteVideoData, 'remote-video'); +// print("\n\n\n"); +// print("------------------------------------------------------------------------------------------------------------------------"); +// print("Recordings Completed"); +// print("------------------------------------------------------------------------------------------------------------------------"); +// print(" Local: ${localVideoData == null ? 'not recorded' : 'recorded'}"); +// print("Remote: ${remoteVideoData == null ? 'not recorded' : 'recorded'}"); +// print("------------------------------------------------------------------------------------------------------------------------"); +// print("\n\n\n"); +// +// }); +// } +// return this; +// } +// +// _recordMixedStream(){ +// final mixer = initMultiStreamsMixer([remoteStreamWeb,localStreamWeb]); +// final jsMixedStream = mixer.getMixedStream(); +// _mixed_recorder = html.MediaRecorder(jsMixedStream, _recorder_options); +// _startRecording(_mixed_recorder).then((blob) async { +// final data = await blob?.readBytes(); +// // final url = await blob?.readDataUrl(); +// final params = { +// 'requesterId':'1', +// 'source':'ziktest4', +// 'target':'adeltest4', +// 'callStart':'2022-04-13 09:00', +// 'callEnd':'2022-04-13 10:00', +// 'archive':'1' +// }; +// +// print("Uploading called"); +// UploadRecording().upload(blob, params: params, completion: (response){ +// print("Response: $response"); +// }, onProgress: (progress){ +// print("Upload: ${progress.toInt()}/100"); +// }); +// +// // String file = await FileSaver.instance.saveFile("recorded", data!, "webm", mimeType: MimeType.WEBM).catchError((e){ +// // print(e); +// // }); +// // print(file); +// }); +// } +// +// Future _startRemote() async{ +// _remote_recorder = html.MediaRecorder(remoteStreamWeb, _recorder_options); +// return _startRecording(_remote_recorder); +// } +// +// Future _startLocal() async{ +// _local_recorder = html.MediaRecorder(localStreamWeb, _recorder_options); +// return _startRecording(_local_recorder); +// } +// +// processAndSendClip(Uint8List data, String filename) async{ +// if(data != null){ +// // String file = await FileSaver.instance.saveFile("$filename", data, "webm", mimeType: MimeType.OTHER).catchError((e){ +// // print(e); +// // }); +// // print(file); +// }else{ +// +// } +// } +// } +// +// Timer _sliceTimer; +// extension xWebRtcStreamRecorder on WebRtcStreamRecorder{ +// +// @override +// Future _startRecording(html.MediaRecorder recorder) async{ +// html.Blob _blob; +// bool isLast = false; +// if(recorder != null){ +// final completer = Completer(); +// recorder.addEventListener('dataavailable', (html.Event event) async{ +// _blob = js.JsObject.fromBrowserObject(event)['data']; +// isLast = recorder.state == 'inactive'; +// final data = await _blob?.readBytes(); +// print("dataavailable isLast:$isLast data:${data?.length}"); +// if(_blobChunkCallback != null) +// _blobChunkCallback(_blob, isLast, recorder); +// +// if(isLast) +// completer.complete(); +// }); +// recorder.start(); +// print("_startRecording Start"); +// _enableSliceChunks(recorder); +// +// await completer.future; +// } +// +// print("_startRecording Finish"); +// return _blob; +// } +// +// _enableSliceChunks(html.MediaRecorder recorder){ +// if(chunkDuration != null && recorder != null){ +// _sliceTimer = Timer.periodic(chunkDuration, (timer) { +// if(recorder.stream?.active == true){ +// recorder.requestData(); +// }else{ +// timer.cancel(); +// } +// }); +// } +// } +// } +// +// // class WebRecorder { +// // static bool isNotRecording = true; +// // static html.MediaRecorder? recorder; +// // +// // final Future Function() whenRecorderStart; // Function to call when recording starts +// // final Future Function() whenRecorderStop; // Function to call when recording finishs +// // final Future Function(dynamic) whenReceiveData; +// // +// // WebRecorder({ +// // required this.whenRecorderStart, +// // required this.whenRecorderStop, +// // required this.whenReceiveData +// // }); +// // +// // WebRecorder openRecorder({MediaStream? stream}){ +// // WebRecorder.isNotRecording = !WebRecorder.isNotRecording; +// // if(WebRecorder.isNotRecording) +// // stopRecoring().whenComplete(whenRecorderStop); +// // else +// // if(stream == null){ +// // html.window.navigator +// // .getUserMedia(audio: true) +// // .then((stream) { +// // recorder = html.MediaRecorder(stream); +// // recorder?.addEventListener('dataavailable', hundlerFunctionStream); +// // }) +// // .whenComplete((){ +// // startRecording().whenComplete(whenRecorderStart); +// // }) +// // .catchError((e)=> print); +// // }else{ +// // final htmlStream = html.MediaStream(stream.getTracks()); +// // recorder = html.MediaRecorder(htmlStream); +// // recorder?.addEventListener('dataavailable', hundlerFunctionStream); +// // } +// // +// // return this; +// // } +// // +// // Future startRecording(){ +// // WebRecorder.recorder?.start(); +// // return Future.value(true); +// // } +// // +// // Future stopRecoring() async{ +// // WebRecorder.recorder?.stop(); +// // return Future.value(true); +// // } +// // +// // hundlerFunctionStream(event) async{ +// // html.FileReader reader = html.FileReader(); +// // html.Blob blob = js.JsObject.fromBrowserObject(event)['data']; +// // reader.readAsArrayBuffer(blob); +// // reader.onLoadEnd.listen((e) async { +// // setData(reader.result); +// // }); +// // } +// // +// // setData(data) => whenReceiveData(data); +// // +// // dispose(){ +// // WebRecorder.recorder?.removeEventListener('dataavailable', hundlerFunctionStream); +// // WebRecorder.recorder = null; +// // } +// // } diff --git a/lib/pages/videocall-webrtc-rnd/webrtc/random_string.dart b/lib/pages/videocall-webrtc-rnd/webrtc/random_string.dart new file mode 100644 index 00000000..399fb972 --- /dev/null +++ b/lib/pages/videocall-webrtc-rnd/webrtc/random_string.dart @@ -0,0 +1,77 @@ +// Copyright (c) 2016, Damon Douglas. All rights reserved. Use of this source code +// is governed by a BSD-style license that can be found in the LICENSE file. + +/// Simple library for generating random ascii strings. +/// +/// More dartdocs go here. +/// +/// +/// A simple usage example: +/// +/// import 'package:random_string/random_string.dart' as random; +/// main() { +/// print(randomBetween(10,20)); // some integer between 10 and 20 +/// print(randomNumeric(4)); // sequence of 4 random numbers i.e. 3259 +/// print(randomString(10)); // random sequence of 10 characters i.e. e~f93(4l- +/// print(randomAlpha(5)); // random sequence of 5 alpha characters i.e. aRztC +/// print(randomAlphaNumeric(10)); // random sequence of 10 alpha numeric i.e. aRztC1y32B +/// } + +library random_string; + +import 'dart:math'; + +const ASCII_START = 33; +const ASCII_END = 126; +const NUMERIC_START = 48; +const NUMERIC_END = 57; +const LOWER_ALPHA_START = 97; +const LOWER_ALPHA_END = 122; +const UPPER_ALPHA_START = 65; +const UPPER_ALPHA_END = 90; + +/// Generates a random integer where [from] <= [to]. +int randomBetween(int from, int to) { + if (from > to) throw Exception('$from cannot be > $to'); + var rand = Random(); + return ((to - from) * rand.nextDouble()).toInt() + from; +} + +/// Generates a random string of [length] with characters +/// between ascii [from] to [to]. +/// Defaults to characters of ascii '!' to '~'. +String randomString(int length, {int from= ASCII_START, int to= ASCII_END}) { + return String.fromCharCodes( + List.generate(length, (index) => randomBetween(from, to))); +} + +/// Generates a random string of [length] with only numeric characters. +String randomNumeric(int length) => + randomString(length, from: NUMERIC_START, to: NUMERIC_END); +/* +/// Generates a random string of [length] with only alpha characters. +String randomAlpha(int length) { + var lowerAlphaLength = randomBetween(0, length); + var upperAlphaLength = length - lowerAlphaLength; + var lowerAlpha = randomString(lowerAlphaLength, + from: LOWER_ALPHA_START, to: LOWER_ALPHA_END); + var upperAlpha = randomString(upperAlphaLength, + from: UPPER_ALPHA_START, to: UPPER_ALPHA_END); + return randomMerge(lowerAlpha, upperAlpha); +} + +/// Generates a random string of [length] with alpha-numeric characters. +String randomAlphaNumeric(int length) { + var alphaLength = randomBetween(0, length); + var numericLength = length - alphaLength; + var alpha = randomAlpha(alphaLength); + var numeric = randomNumeric(numericLength); + return randomMerge(alpha, numeric); +} + +/// Merge [a] with [b] and scramble characters. +String randomMerge(String a, String b) { + var mergedCodeUnits = List.from("$a$b".codeUnits); + mergedCodeUnits.shuffle(); + return String.fromCharCodes(mergedCodeUnits); +}*/ diff --git a/lib/pages/videocall-webrtc-rnd/webrtc/settings.dart b/lib/pages/videocall-webrtc-rnd/webrtc/settings.dart new file mode 100644 index 00000000..fe9c9535 --- /dev/null +++ b/lib/pages/videocall-webrtc-rnd/webrtc/settings.dart @@ -0,0 +1,35 @@ +import 'package:flutter/material.dart'; +import 'dart:core'; + +class CallSettings extends StatefulWidget { + static String tag = 'call_settings'; + + @override + _CallSettingsState createState() => _CallSettingsState(); +} + +class _CallSettingsState extends State { + @override + initState() { + super.initState(); + } + + @override + deactivate() { + super.deactivate(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Settings'), + ), + body: OrientationBuilder( + builder: (context, orientation) { + return Center(child: Text("settings")); + }, + ), + ); + } +} diff --git a/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart b/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart new file mode 100644 index 00000000..853183a9 --- /dev/null +++ b/lib/pages/videocall-webrtc-rnd/webrtc/signaling.dart @@ -0,0 +1,509 @@ +// import 'dart:convert'; +// import 'dart:async'; +// import 'package:flutter/cupertino.dart'; +// import 'package:flutter_webrtc/flutter_webrtc.dart'; +// +// import '../utils/websocket.dart' if (dart.library.js) '../utils/websocket_web.dart'; +// import '../utils/turn.dart' if (dart.library.js) '../utils/turn_web.dart'; +// +// +// enum SignalingState { Open, Closed, Error } +// enum CallState { Calling, Ringing, Invite, Connected, Bye } +// +// +// const JsonEncoder _encoder = JsonEncoder(); +// const JsonDecoder _decoder = JsonDecoder(); +// +// class SessionOneToOne { +// late String id; +// late SocketUser local_user; +// late SocketUser remote_user; +// SessionOneToOne({required this.id, required this.local_user, required this.remote_user}); +// +// +// late RTCPeerConnection pc; +// late RTCDataChannel dc; +// List remoteCandidates = []; +// } +// +// class SocketUser{ +// String? id; +// String? name; +// String? userAgent; +// Map? moreInfo; +// +// SocketUser({required this.id, required this.name, required this.userAgent, required this.moreInfo}); +// +// SocketUser.from(dynamic json){ +// id = json['id']; +// name = json['name']; +// userAgent = json['user_agent']; +// moreInfo = json['more_info']; +// } +// +// Map toJson() => { +// "id": id, +// "name": name, +// "user_agent": userAgent, +// "more_info": moreInfo +// }; +// } +// +// class Signaling { +// var _host; +// var _turnCredential; +// +// SimpleWebSocket? _socket; +// SessionOneToOne? session; +// +// Signaling(this._host, {required this.session}); +// +// late MediaStream? localStream; +// late final List remoteStreams = []; +// +// late Function(SignalingState state) onSignalingStateChange; +// late Function(SessionOneToOne session, CallState state) onCallStateChange; +// late Function(MediaStream stream) onLocalStream; +// late Function(SessionOneToOne session, MediaStream stream) onAddRemoteStream; +// late Function(SessionOneToOne session, MediaStream stream) onRemoveRemoteStream; +// late Function(dynamic event) onPeersUpdate; +// late Function(dynamic event) onConnected; +// late Function(dynamic event) onRemoteConnected; +// late Function(SessionOneToOne session, RTCDataChannel dc, RTCDataChannelMessage data) onDataChannelMessage; +// late Function(SessionOneToOne session, RTCDataChannel dc) onDataChannel; +// +// String? get sdpSemantics => WebRTC.platformIsWindows ? 'plan-b' : 'unified-plan'; +// +// Map _iceServers = { +// 'iceServers': [ +// {'url': 'stun:stun.l.google.com:19302'}, +// /* +// * turn server configuration example. +// { +// 'url': 'turn:123.45.67.89:3478', +// 'username': 'change_to_real_user', +// 'credential': 'change_to_real_secret' +// }, +// */ +// ] +// }; +// +// final Map _config = { +// 'mandatory': {}, +// 'optional': [ +// {'DtlsSrtpKeyAgreement': true}, +// ] +// }; +// +// final Map _dcConstraints = { +// 'mandatory': { +// 'OfferToReceiveAudio': false, +// 'OfferToReceiveVideo': false, +// }, +// 'optional': [], +// }; +// +// +// close() async { +// await finishSessions(); +// _socket?.close(); +// } +// +// void switchCamera() { +// if (localStream != null) { +// Helper.switchCamera(localStream! .getVideoTracks()[0]); +// } +// } +// +// void muteMic() { +// if (localStream != null) { +// bool enabled = localStream!.getAudioTracks()[0].enabled; +// localStream!.getAudioTracks()[0].enabled = !enabled; +// } +// } +// +// +// callAccepted(SessionOneToOne session){ +// _send('call_accepted', { +// 'to': session.remote_user?.id, +// 'from': session.local_user.id, +// 'session_id': session.id, +// }); +// } +// +// void offer(String media, bool useScreen) async { +// if(session == null) +// return; +// +// if (media == 'data') { +// _createDataChannel(session!); +// } +// _createOffer(session!, media); +// onCallStateChange?.call(session!, CallState.Calling); +// } +// +// void bye(SessionOneToOne session) { +// _send('bye', { +// 'session_id': session.id, +// 'from': session.local_user.id, +// }); +// _closeSession(session); +// } +// +// void onMessage(message) async { +// Map mapData = message; +// var data = mapData['data']; +// +// switch (mapData['type']) { +// case 'call_accepted': +// { +// onRemoteConnected?.call(data); +// } +// break; +// +// case 'connected': +// { +// if (onConnected != null) { +// onConnected?.call(data); +// } +// } +// break; +// +// case 'offer': +// { +// +// var peerId = data['from']; +// var description = data['description']; +// var media = data['media']; +// +// await _initPeerConnection(session!, media: media, screenSharing: false); +// await session!.pc?.setRemoteDescription(RTCSessionDescription(description['sdp'], description['type'])); +// await _createAnswer(session!, media); +// +// if (session!.remoteCandidates!.isNotEmpty) { +// session!.remoteCandidates!.forEach((candidate) async { +// await session!.pc?.addCandidate(candidate); +// }); +// session!.remoteCandidates.clear(); +// } +// onCallStateChange?.call(session!, CallState.Calling); +// } +// break; +// case 'answer': +// { +// +// var description = data['description']; +// var sessionId = data['session_id']; +// session!.pc?.setRemoteDescription( +// RTCSessionDescription(description['sdp'], description['type'])); +// } +// break; +// case 'candidate': +// { +// +// var peerId = data['from']; +// var candidateMap = data['candidate']; +// var sessionId = data['session_id']; +// RTCIceCandidate candidate = RTCIceCandidate(candidateMap['candidate'], +// candidateMap['sdpMid'], candidateMap['sdpMLineIndex']); +// +// if (session != null) { +// if (session!.pc != null) { +// await session!.pc?.addCandidate(candidate); +// } else { +// session!.remoteCandidates.add(candidate); +// } +// } else { +// // _sessions[sessionId] = SessionOneToOne(pid: peerId, sid: sessionId) +// // ..remoteCandidates.add(candidate); +// } +// } +// break; +// case 'leave': +// { +// var peerId = data as String; +// _closeSessionById(peerId); +// } +// break; +// case 'bye': +// { +// +// var sessionId = data['session_id']; +// print('bye: ' + sessionId); +// if (session != null) { +// onCallStateChange?.call(session!, CallState.Bye); +// _closeSession(session!); +// } +// } +// break; +// case 'keepalive': +// { +// print('keepalive response!'); +// } +// break; +// default: +// break; +// } +// } +// +// Future connect() async { +// _socket = SimpleWebSocket('$_host/ws'); +// +// if (_turnCredential == null) { +// try { +// _turnCredential = await getTurnCredential(_host); +// /* +// { +// "username": "1584195784:mbzrxpgjys", +// "password": "isyl6FF6nqMTB9/ig5MrMRUXqZg", +// "ttl": 86400, +// "uris": ["turn:127.0.0.1:19302?transport=udp"] +// } +// */ +// _iceServers = { +// 'iceServers': [ +// { +// 'urls': _turnCredential['uris'][0], +// 'username': _turnCredential['username'], +// 'credential': _turnCredential['password'] +// }, +// ] +// }; +// } catch (e) {} +// } +// +// _socket?.onOpen = () { +// print('onOpen'); +// onSignalingStateChange?.call(SignalingState.Open); +// _send('connect', session!.local_user!.toJson()); +// }; +// +// _socket?.onMessage = (message) { +// print('Received data: ' + message); +// onMessage(_decoder.convert(message)); +// }; +// +// _socket?.onClose = (int code, String reason) { +// print('Closed by server [$code => $reason]!'); +// onSignalingStateChange?.call(SignalingState.Closed); +// }; +// +// await _socket?.connect(); +// } +// +// Future createStream(String media, bool userScreen) async { +// final Map mediaConstraints = { +// 'audio': userScreen ? false : true, +// 'video': userScreen +// ? true +// : { +// 'mandatory': { +// 'minWidth': '640', // Provide your own width, height and frame rate here +// 'minHeight': '480', +// 'minFrameRate': '30', +// }, +// 'facingMode': 'user', +// 'optional': [], +// } +// }; +// +// MediaStream stream = userScreen +// ? await navigator.mediaDevices.getDisplayMedia(mediaConstraints) +// : await navigator.mediaDevices.getUserMedia(mediaConstraints); +// onLocalStream?.call(stream); +// return stream; +// } +// +// Future _initPeerConnection(SessionOneToOne session, {required String media, required bool screenSharing}) async { +// +// if (media != 'data') +// localStream = await createStream(media, screenSharing); +// print(_iceServers); +// RTCPeerConnection pc = await createPeerConnection({ +// ..._iceServers, +// ...{'sdpSemantics': sdpSemantics} +// }, _config); +// if (media != 'data') { +// switch (sdpSemantics) { +// case 'plan-b': +// pc.onAddStream = (MediaStream stream) { +// onAddRemoteStream?.call(session, stream); +// remoteStreams.add(stream); +// }; +// await pc.addStream(localStream!); +// break; +// case 'unified-plan': +// // Unified-Plan +// pc.onTrack = (event) { +// if (event.track.kind == 'video') { +// onAddRemoteStream?.call(session, event.streams[0]); +// } +// }; +// localStream! .getTracks().forEach((track) { +// pc.addTrack(track, localStream!); +// }); +// break; +// } +// +// // Unified-Plan: Simuclast +// /* +// await pc.addTransceiver( +// track: _localStream.getAudioTracks()[0], +// init: RTCRtpTransceiverInit( +// direction: TransceiverDirection.SendOnly, streams: [_localStream]), +// ); +// +// await pc.addTransceiver( +// track: _localStream.getVideoTracks()[0], +// init: RTCRtpTransceiverInit( +// direction: TransceiverDirection.SendOnly, +// streams: [ +// _localStream +// ], +// sendEncodings: [ +// RTCRtpEncoding(rid: 'f', active: true), +// RTCRtpEncoding( +// rid: 'h', +// active: true, +// scaleResolutionDownBy: 2.0, +// maxBitrate: 150000, +// ), +// RTCRtpEncoding( +// rid: 'q', +// active: true, +// scaleResolutionDownBy: 4.0, +// maxBitrate: 100000, +// ), +// ]), +// );*/ +// /* +// var sender = pc.getSenders().find(s => s.track.kind == "video"); +// var parameters = sender.getParameters(); +// if(!parameters) +// parameters = {}; +// parameters.encodings = [ +// { rid: "h", active: true, maxBitrate: 900000 }, +// { rid: "m", active: true, maxBitrate: 300000, scaleResolutionDownBy: 2 }, +// { rid: "l", active: true, maxBitrate: 100000, scaleResolutionDownBy: 4 } +// ]; +// sender.setParameters(parameters); +// */ +// } +// pc.onIceCandidate = (candidate) async { +// if (candidate == null) { +// print('onIceCandidate: complete!'); +// return; +// } +// // This delay is needed to allow enough time to try an ICE candidate +// // before skipping to the next one. 1 second is just an heuristic value +// // and should be thoroughly tested in your own environment. +// await Future.delayed( +// const Duration(seconds: 1), +// () => _send('candidate', { +// 'to': session.remote_user?.id, +// 'from': session.local_user.id, +// 'candidate': { +// 'sdpMLineIndex': candidate.sdpMLineIndex, // sdpMlineIndex or sdpMLineIndex +// 'sdpMid': candidate.sdpMid, +// 'candidate': candidate.candidate, +// }, +// 'session_id': session.id, +// })); +// }; +// +// pc.onIceConnectionState = (state) {}; +// +// pc.onRemoveStream = (stream) { +// onRemoveRemoteStream?.call(session, stream); +// remoteStreams.removeWhere((it) { +// return (it.id == stream.id); +// }); +// }; +// +// pc.onDataChannel = (channel) { +// _addDataChannel(session, channel); +// }; +// +// session.pc = pc; +// return session; +// } +// +// void _addDataChannel(SessionOneToOne session, RTCDataChannel channel) { +// channel.onDataChannelState = (e) {}; +// channel.onMessage = (RTCDataChannelMessage data) { +// onDataChannelMessage?.call(session, channel, data); +// }; +// session.dc = channel; +// onDataChannel?.call(session, channel); +// } +// +// Future _createDataChannel(SessionOneToOne session, {label= 'fileTransfer'}) async { +// RTCDataChannelInit dataChannelDict = RTCDataChannelInit() +// ..maxRetransmits = 30; +// RTCDataChannel channel = +// await session.pc .createDataChannel(label, dataChannelDict); +// _addDataChannel(session, channel); +// } +// +// Future _createOffer(SessionOneToOne session, String media) async { +// try { +// RTCSessionDescription s = +// await session.pc .createOffer(media == 'data' ? _dcConstraints : {}); +// await session.pc .setLocalDescription(s); +// _send('offer', { +// 'to': session.remote_user?.id, +// 'from': session.local_user.id, +// 'description': {'sdp': s.sdp, 'type': s.type}, +// 'session_id': session.id, +// 'media': media, +// }); +// } catch (e) { +// print(e.toString()); +// } +// } +// +// Future _createAnswer(SessionOneToOne session, String media) async { +// try { +// RTCSessionDescription s = +// await session.pc .createAnswer(media == 'data' ? _dcConstraints : {}); +// await session.pc .setLocalDescription(s); +// _send('answer', { +// 'to': session.remote_user?.id, +// 'from': session.local_user.id, +// 'description': {'sdp': s.sdp, 'type': s.type}, +// 'session_id': session.id, +// }); +// } catch (e) { +// print(e.toString()); +// } +// } +// +// _send(event, data) { +// var request = Map(); +// request["type"] = event; +// request["data"] = data; +// _socket?.send(_encoder.convert(request)); +// } +// +// Future finishSessions() async { +// _closeSessionById(session!.id); +// } +// +// void _closeSessionById(String sessionId) { +// if (session != null && session!.id == sessionId) { +// _closeSession(session!); +// onCallStateChange?.call(session!, CallState.Bye); +// } +// } +// +// Future _closeSession(SessionOneToOne session) async { +// localStream?.getTracks()?.forEach((element) async { +// await element.stop(); +// }); +// await localStream?.dispose(); +// localStream = null; +// +// await session.pc?.close(); +// await session.dc?.close(); +// } +// } diff --git a/lib/pages/videocall-webrtc-rnd/webrtc/start_video_call.dart b/lib/pages/videocall-webrtc-rnd/webrtc/start_video_call.dart new file mode 100644 index 00000000..d17bffe3 --- /dev/null +++ b/lib/pages/videocall-webrtc-rnd/webrtc/start_video_call.dart @@ -0,0 +1,241 @@ +// import 'dart:async'; +// +// import 'package:diplomaticquarterapp/pages/conference/conference_button_bar.dart'; +// import 'package:diplomaticquarterapp/pages/conference/web_rtc/widgets/cam_view_widget.dart'; +// import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/utils/device_info.dart'; +// import 'package:firebase_messaging/firebase_messaging.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter/services.dart'; +// import 'dart:core'; +// import 'signaling.dart'; +// import 'package:flutter_webrtc/flutter_webrtc.dart'; +// +// class StartVideoCall extends StatefulWidget { +// static String tag = 'webrtc'; +// final String host; +// +// String caller; +// String receiver; +// bool iAmCaller; +// StartVideoCall({required this.caller, required this.receiver, this.iAmCaller = false, required this.host}); +// +// @override +// StartVideoCallState createState() => StartVideoCallState(receiverId: receiver, callerId: caller, iAmCaller: iAmCaller); +// } +// +// class StartVideoCallState extends State { +// late Signaling _signaling; +// late SessionOneToOne? _session; +// +// StartVideoCallState({required String callerId, required String receiverId, required bool iAmCaller}){ +// +// final self_role = iAmCaller ? "Caller" : "Receiver"; +// final self_id = iAmCaller ? callerId : receiverId; +// final self_user = SocketUser(id: self_id, name: "$self_role-$self_id", userAgent: DeviceInfo.userAgent, moreInfo: {}); +// +// final remote_role = !iAmCaller ? "Caller" : "Receiver"; +// final remote_id = !iAmCaller ? callerId : receiverId; +// final remote_user = SocketUser(id: remote_id, name: "$remote_role-$remote_id", userAgent: DeviceInfo.userAgent, moreInfo: {}); +// +// final session_id = "$callerId-$receiverId"; +// _session = SessionOneToOne(id: session_id, local_user: self_user, remote_user: remote_user); +// } +// +// bool showNoise = true; +// final StreamController _audioButton = StreamController.broadcast(); +// final StreamController _videoButton = StreamController.broadcast(); +// final StreamController _onButtonBarVisibleStreamController = StreamController.broadcast(); +// final StreamController _onButtonBarHeightStreamController = StreamController.broadcast(); +// +// final RTCVideoRenderer _localRenderer = RTCVideoRenderer(); +// final RTCVideoRenderer _remoteRenderer = RTCVideoRenderer(); +// +// MediaStream get localMediaStream => _signaling.localStream!; +// MediaStream get remoteMediaStream => _signaling.remoteStreams.first; +// +// @override +// initState() { +// super.initState(); +// initRenderers(); +// _connect(); +// } +// +// initRenderers() async { +// await _localRenderer.initialize(); +// await _remoteRenderer.initialize(); +// } +// +// @override +// deactivate() { +// super.deactivate(); +// _signaling?.close(); +// _localRenderer.dispose(); +// _remoteRenderer.dispose(); +// } +// +// @override +// Widget build(BuildContext context) { +// return Scaffold( +// // appBar: AppBar( +// // title: Text('P2P Call Sample' + (_session?.local_user != null ? ' [Your ID (${_session?.local_user?.id})] ' : '')), +// // actions: [ +// // IconButton( +// // icon: const Icon(Icons.settings), +// // onPressed: (){ +// // setState(() { +// // }); +// // }, +// // tooltip: 'setup', +// // ), +// // ], +// // ), +// body: videoCanvasWidgets(), +// ); +// } +// +// LayoutBuilder videoCanvasWidgets() { +// return LayoutBuilder( +// builder: (BuildContext context, BoxConstraints constraints) { +// return Stack( +// children: [ +// CamViewWidget( +// localRenderer: _localRenderer, +// remoteRenderer: _remoteRenderer, +// constraints: constraints, +// onButtonBarVisibleStreamController: _onButtonBarVisibleStreamController, +// onButtonBarHeightStreamController: _onButtonBarHeightStreamController, +// ), +// ConferenceButtonBar( +// audioEnabled: _audioButton.stream, +// videoEnabled: _videoButton.stream, +// onAudioEnabled: _onAudioEnable, +// onVideoEnabled: _onVideoEnabled, +// onSwitchCamera: _onSwitchCamera, +// onHangup: _onHangup, +// onPersonAdd: () {}, +// onPersonRemove: () {}, +// onHeight: _onHeightBar, +// onShow: _onShowBar, +// onHide: _onHideBar, +// ), +// ], +// ); +// }, +// ); +// } +// +// +// void _connect() async { +// if(_session == null) +// return; +// +// _signaling ??= Signaling(widget.host, session: _session!)..connect(); +// +// _signaling?.onSignalingStateChange = (SignalingState state) { +// switch (state) { +// case SignalingState.Closed: +// case SignalingState.Error: +// case SignalingState.Open: +// break; +// } +// }; +// +// _signaling?.onCallStateChange = (SessionOneToOne session, CallState state) { +// switch (state) { +// case CallState.Calling: +// setState(() {}); +// break; +// case CallState.Bye: +// setState(() { +// _localRenderer.srcObject = null; +// _remoteRenderer.srcObject = null; +// _session = null; +// }); +// break; +// case CallState.Invite: +// case CallState.Connected: +// case CallState.Ringing: +// } +// }; +// +// _signaling?.onConnected = ((event) { +// _signaling?.callAccepted(_session!); +// }); +// +// _signaling?.onRemoteConnected = ((event) { +// +// }); +// +// _signaling?.onLocalStream = ((stream) { +// _localRenderer.srcObject = stream; +// setState(() { +// }); +// }); +// +// _signaling?.onAddRemoteStream = ((_, stream) { +// _remoteRenderer.srcObject = stream; +// setState(() {}); +// }); +// +// _signaling?.onRemoveRemoteStream = ((_, stream) { +// setState(() { +// _remoteRenderer.srcObject = null; +// }); +// }); +// } +// +// _hangUp() async{ +// if (_session != null) { +// _signaling?.bye(_session!); +// } +// } +// +// _switchCamera() { +// _signaling?.switchCamera(); +// } +// +// _muteMic() { +// _signaling?.muteMic(); +// } +// +// Function? _onAudioEnable() { +// final audioTrack = localMediaStream.getAudioTracks()[0]; +// final mute = audioTrack.muted; +// Helper.setMicrophoneMute(!mute!, audioTrack); +// _audioButton.add(mute); +// } +// +// Function? _onVideoEnabled() { +// final videoTrack = localMediaStream.getVideoTracks()[0]; +// bool videoEnabled = videoTrack.enabled; +// localMediaStream.getVideoTracks()[0].enabled = !videoEnabled; +// _videoButton.add(!videoEnabled); +// } +// +// Function? _onSwitchCamera() { +// Helper.switchCamera(localMediaStream.getVideoTracks()[0]); +// } +// +// void _onShowBar() { +// setState(() { +// }); +// _onButtonBarVisibleStreamController.add(true); +// } +// +// void _onHeightBar(double height) { +// _onButtonBarHeightStreamController.add(height); +// } +// +// void _onHideBar() { +// setState(() { +// SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.bottom]); +// }); +// _onButtonBarVisibleStreamController.add(false); +// } +// +// Future _onHangup() async { +// _signaling?.finishSessions(); +// print('onHangup'); +// Navigator.of(context).pop(); +// } +// } \ No newline at end of file diff --git a/lib/pages/weather-indicator/health-indicator.dart b/lib/pages/weather-indicator/health-indicator.dart new file mode 100644 index 00000000..e69de29b diff --git a/lib/pages/webRTC/OpenTok/OpenTok.dart b/lib/pages/webRTC/OpenTok/OpenTok.dart new file mode 100644 index 00000000..2e21e8cf --- /dev/null +++ b/lib/pages/webRTC/OpenTok/OpenTok.dart @@ -0,0 +1,249 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/pages/conference/conference_button_bar.dart'; +import 'package:diplomaticquarterapp/pages/conference/draggable_publisher.dart'; +import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; +import 'package:flutter/services.dart'; + +import 'OpenTokPlatformBridge.dart'; + +class OpenTokConnectCallPage extends StatefulWidget { + final String sessionId; + final String token; + final String apiKey; + + OpenTokConnectCallPage({required this.sessionId, required this.token, required this.apiKey}); + + @override + State createState() => OpenTokState(); +} + +class OpenTokState extends State { + OpenTokPlatformBridge? openTokPlatform; + OpenTokSDKState sdkState = OpenTokSDKState.LOGGED_OUT; + + final StreamController _audioButton = StreamController.broadcast(); + final StreamController _videoButton = StreamController.broadcast(); + final StreamController _onButtonBarVisibleStreamController = StreamController.broadcast(); + final StreamController _onButtonBarHeightStreamController = StreamController.broadcast(); + + var audioMute = false; + var videoMute = false; + + initOpenTok() { + openTokPlatform = OpenTokPlatformBridge.init( + apiKey: widget.apiKey, + sessionID: widget.sessionId, + token: widget.token, + onStateChange: (state) { + setState(() => sdkState = state); + }); + } + + @override + void initState() { + initOpenTok(); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + extendBodyBehindAppBar: true, + appBar: AppBar( + backgroundColor: Colors.transparent, + actions: [ + TextButton( + onPressed: () { + initOpenTok(); + }, + child: Icon( + Icons.connect_without_contact_outlined, + color: Colors.green, + )) + ], + ), + body: Stack( + fit: StackFit.expand, + children: [ + if (sdkState == OpenTokSDKState.LOGGED_IN) ...platformVideoViews(), + if (sdkState == OpenTokSDKState.LOGGED_OUT) + Center( + child: Text("Logged Out"), + ), + if (sdkState == OpenTokSDKState.ERROR) + Center( + child: Text("Error opening session"), + ), + if (sdkState == OpenTokSDKState.WAIT) + Center( + child: CircularProgressIndicator(), + ), + if (sdkState == OpenTokSDKState.ON_CALL) Container(), + ConferenceButtonBar( + audioEnabled: _audioButton.stream, + videoEnabled: _videoButton.stream, + onAudioEnabled: _onAudioEnable, + onVideoEnabled: _onVideoEnabled, + onSwitchCamera: _onSwitchCamera, + onHangup: _onHangup, + onPersonAdd: () {}, + onPersonRemove: () {}, + onHeight: _onHeightBar, + onShow: _onShowBar, + onHide: _onHideBar, + ), + ], + ), + ); + } + + bool remoteVideoOnFull = true; + + List platformVideoViews() { + return [ + SizedBox(width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, child: remoteVideoOnFull ? returnFlutterNewRemoteWidget() : returnFlutterNewLocalWidget()), + DraggablePublisher( + onButtonBarHeight:Stream.value(50.0), + onButtonBarVisible: Stream.value(true), + availableScreenSize: MediaQuery.of(context).size, + child: InkWell( + child: (remoteVideoOnFull ? returnFlutterNewLocalWidget() : returnFlutterNewRemoteWidget()), + onTap: () { + print(''); + }, + ), + ) + ]; + } + + // Widget localPlatformVideoView() { + // return PlatformViewLink( + // viewType: 'local-video-container', // custom platform-view-type + // surfaceFactory: (BuildContext context, PlatformViewController controller) { + // return AndroidViewSurface( + // controller: controller, + // gestureRecognizers: const >{}, + // hitTestBehavior: PlatformViewHitTestBehavior.opaque, + // ); + // }, + // + // onCreatePlatformView: (PlatformViewCreationParams params) { + // return PlatformViewsService.initSurfaceAndroidView( + // id: params.id, + // viewType: 'local-video-container', + // // custom platform-view-type, + // layoutDirection: TextDirection.ltr, + // creationParams: {}, + // creationParamsCodec: StandardMessageCodec(), + // ) + // ..addOnPlatformViewCreatedListener(params.onPlatformViewCreated) + // ..create(); + // }, + // ); + // } + + Widget returnFlutterNewRemoteWidget() { + final Map args = {"someInit": "initData"}; + const StandardMessageCodec _decoder = StandardMessageCodec(); + if (defaultTargetPlatform == TargetPlatform.android) { + return AndroidView( + viewType: 'remote-video-container', + creationParams: args, + creationParamsCodec: _decoder); + } + return UiKitView( + viewType: 'remote-video-container', + creationParams: args, + creationParamsCodec: _decoder); + } + + Widget returnFlutterNewLocalWidget() { + final Map args = {"someInit": "initData"}; + const StandardMessageCodec _decoder = StandardMessageCodec(); + if (defaultTargetPlatform == TargetPlatform.android) { + return AndroidView( + viewType: 'local-video-container', + creationParams: args, + creationParamsCodec: _decoder); + } + return UiKitView( + viewType: 'local-video-container', + creationParams: args, + creationParamsCodec: _decoder); + } + + // Widget remotePlatformVideoView() { + // return PlatformViewLink( + // viewType: 'remote-video-container', // custom platform-view-type + // surfaceFactory: (BuildContext context, PlatformViewController controller) { + // return AndroidViewSurface( + // controller: controller, + // gestureRecognizers: const >{}, + // hitTestBehavior: PlatformViewHitTestBehavior.opaque, + // ); + // }, + // onCreatePlatformView: (PlatformViewCreationParams params) { + // return PlatformViewsService.initSurfaceAndroidView( + // id: params.id, + // viewType: 'remote-video-container', + // // custom platform-view-type, + // layoutDirection: TextDirection.ltr, + // creationParams: {}, + // creationParamsCodec: StandardMessageCodec(), + // ) + // ..addOnPlatformViewCreatedListener(params.onPlatformViewCreated) + // ..create(); + // }, + // ); + // } + + _onAudioEnable() async { + await openTokPlatform!.toggleAudio(); + _audioButton.add(!audioMute); + } + + _onVideoEnabled() async { + await openTokPlatform!.toggleVideo(); + _videoButton.add(!videoMute); + } + + _onSwitchCamera() async { + await openTokPlatform!.swapCamera(); + } + + Future _onHangup() async { + print('onHangup'); + await openTokPlatform!.hangupCall(); + endCallAPI(); + Navigator.of(context).pop(); + } + + void endCallAPI() { + LiveCareService service = new LiveCareService(); + service.endCallAPI(widget.sessionId, 2, context).then((res) {}).catchError((err) { + print(err); + }); + } + + void _onShowBar() { + setState(() {}); + _onButtonBarVisibleStreamController.add(true); + } + + void _onHeightBar(double height) { + _onButtonBarHeightStreamController.add(height); + } + + void _onHideBar() { + // setState(() { + // SystemChrome!.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]); + // }); + _onButtonBarVisibleStreamController.add(false); + } +} diff --git a/lib/pages/webRTC/OpenTok/OpenTokPlatformBridge.dart b/lib/pages/webRTC/OpenTok/OpenTokPlatformBridge.dart new file mode 100644 index 00000000..8f7a2457 --- /dev/null +++ b/lib/pages/webRTC/OpenTok/OpenTokPlatformBridge.dart @@ -0,0 +1,86 @@ + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/services.dart'; +import 'package:permission_handler/permission_handler.dart'; + +enum OpenTokSDKState{ LOGGED_OUT, LOGGED_IN, WAIT, ON_CALL, ERROR } +final _platformMethodChannel = const MethodChannel('OpenTok-Platform-Bridge'); + +class OpenTokPlatformBridge{ + + + OpenTokSDKState _sdkState = OpenTokSDKState.LOGGED_OUT; + bool _publishAudio = true; + bool _publishVideo = true; + + final void Function(OpenTokSDKState)? onStateChange; + + OpenTokPlatformBridge.init({required String sessionID, required String token, required String apiKey, this.onStateChange}){ + _initSession({'apiKey':apiKey, 'sessionId':sessionID, 'token':token, }); + _platformMethodChannel.setMethodCallHandler(incomingMethodHadler); + } + + Future incomingMethodHadler(MethodCall methodCall) async { + switch (methodCall.method) { + case 'updateState': + { + var arguments = 'OpenTokSDKState.${methodCall.arguments}'; + _sdkState = OpenTokSDKState.values.firstWhere((v) { + return v.toString() == arguments; + }); + onStateChange!(_sdkState); + } + break; + default: + throw MissingPluginException('notImplemented'); + } + } + + + Future _initSession(Map openTokCredentials) async { + await requestPermissions(); + try { + await _platformMethodChannel.invokeMethod('initSession', openTokCredentials); + } on PlatformException catch (e) { + print(e); + } + } + + Future makeCall() async { + try { + await requestPermissions(); + + await _platformMethodChannel.invokeMethod('makeCall'); + } on PlatformException catch (e) { + print(e); + } + } + + Future requestPermissions() async { + await [Permission.microphone, Permission.camera].request(); + } + + Future swapCamera() async { + try { + await _platformMethodChannel.invokeMethod('swapCamera'); + } on PlatformException catch (e) {} + } + + Future toggleAudio() async { + try { + await _platformMethodChannel.invokeMethod('toggleAudio'); + } on PlatformException catch (e) {} + } + + Future toggleVideo() async { + try { + await _platformMethodChannel.invokeMethod('toggleVideo'); + } on PlatformException catch (e) {} + } + + Future hangupCall() async { + try { + await _platformMethodChannel.invokeMethod('hangupCall'); + } on PlatformException catch (e) {} + } +} diff --git a/lib/pages/webRTC/call_page.dart b/lib/pages/webRTC/call_page.dart new file mode 100644 index 00000000..b9f444d1 --- /dev/null +++ b/lib/pages/webRTC/call_page.dart @@ -0,0 +1,164 @@ +// import 'dart:io'; +// +// import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart'; +// import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart'; +// import 'package:diplomaticquarterapp/pages/webRTC/signaling.dart'; +// import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +// import 'package:firebase_messaging/firebase_messaging.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter_webrtc/flutter_webrtc.dart'; +// +// class CallPage extends StatefulWidget { +// @override +// _CallPageState createState() => _CallPageState(); +// } +// +// class _CallPageState extends State { +// Signaling signaling = Signaling(); +// RTCVideoRenderer _localRenderer = RTCVideoRenderer(); +// RTCVideoRenderer _remoteRenderer = RTCVideoRenderer(); +// String roomId; +// TextEditingController textEditingController = TextEditingController(text: ''); +// +// @override +// void initState() { +// _localRenderer.initialize(); +// _remoteRenderer.initialize(); +// +// // signaling.onRemoteStream = ((stream) { +// // _remoteRenderer.srcObject = stream; +// // setState(() {}); +// // }); +// +// fcmConfigure(); +// +// super.initState(); +// } +// +// @override +// void dispose() { +// _localRenderer.dispose(); +// _remoteRenderer.dispose(); +// super.dispose(); +// } +// +// @override +// Widget build(BuildContext context) { +// FirebaseMessaging.instance.getToken().then((value) { +// print('FCM_TOKEN: $value'); +// }); +// +// return AppScaffold( +// isShowAppBar: true, +// showNewAppBar: true, +// showNewAppBarTitle: true, +// isShowDecPage: false, +// appBarTitle: "WebRTC Calling", +// body: Column( +// children: [ +// SizedBox(height: 8), +// Wrap( +// children: [ +// SizedBox( +// width: 8, +// ), +// ElevatedButton( +// onPressed: () { +// dummyCall(); +// }, +// child: Text("Call"), +// ), +// SizedBox( +// width: 8, +// ), +// ElevatedButton( +// onPressed: () { +// signaling.hangUp(_localRenderer); +// }, +// child: Text("Hangup"), +// ) +// ], +// ), +// SizedBox(height: 8), +// Expanded( +// child: Padding( +// padding: const EdgeInsets.all(0.0), +// child: Stack( +// children: [ +// Positioned(top: 0.0, right: 0.0, left: 0.0, bottom: 0.0, child: RTCVideoView(_remoteRenderer)), +// Positioned( +// top: 20.0, +// right: 100.0, +// left: 20.0, +// bottom: 300.0, +// child: RTCVideoView(_localRenderer, mirror: true), +// ), +// ], +// ), +// ), +// ), +// Padding( +// padding: const EdgeInsets.all(8.0), +// child: Row( +// mainAxisAlignment: MainAxisAlignment.center, +// children: [ +// Text("Join the following Room: "), +// Flexible( +// child: TextFormField( +// controller: textEditingController, +// ), +// ) +// ], +// ), +// ), +// SizedBox(height: 8) +// ], +// ), +// ); +// } +// +// dummyCall() async { +// final json = { +// "callerID": "9920", +// "receiverID": "2001273", +// "msgID": "123", +// "notfID": "123", +// "notification_foreground": "true", +// "count": "1", +// "message": "Doctor is calling ", +// "AppointmentNo": "123", +// "title": "Rayyan Hospital", +// "ProjectID": "123", +// "NotificationType": "10", +// "background": "1", +// "doctorname": "Dr Sulaiman Al Habib", +// "clinicname": "ENT Clinic", +// "speciality": "Speciality", +// "appointmentdate": "Sun, 15th Dec, 2019", +// "appointmenttime": "09:00", +// "type": "video", +// "session_id": +// "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0LTE1OTg3NzQ1MDYiLCJpc3MiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0Iiwic3ViIjoiQUNhYWQ1YTNmOGM2NGZhNjczNTY3NTYxNTc0N2YyNmMyYiIsImV4cCI6MTU5ODc3ODEwNiwiZ3JhbnRzIjp7ImlkZW50aXR5IjoiSGFyb29uMSIsInZpZGVvIjp7InJvb20iOiJTbWFsbERhaWx5U3RhbmR1cCJ9fX0.7XUS5uMQQJfkrBZu9EjQ6STL6R7iXkso6BtO1HmrQKk", +// "identity": "Haroon1", +// "name": "SmallDailyStandup", +// "videoUrl": "video", +// "picture": "video", +// "is_call": "true" +// }; +// +// IncomingCallData incomingCallData = IncomingCallData.fromJson(json); +// final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: incomingCallData))); +// } +// +// fcmConfigure() { +// FirebaseMessaging.onMessage.listen((RemoteMessage message) async { +// print(message.toString()); +// +// IncomingCallData incomingCallData; +// if (Platform.isAndroid) +// incomingCallData = IncomingCallData.fromJson(message.data['data']); +// else if (Platform.isIOS) incomingCallData = IncomingCallData.fromJson(message.data); +// if (incomingCallData != null) final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: incomingCallData))); +// }); +// } +// } diff --git a/lib/pages/webRTC/call_page_bkp.dart b/lib/pages/webRTC/call_page_bkp.dart new file mode 100644 index 00000000..4a31feae --- /dev/null +++ b/lib/pages/webRTC/call_page_bkp.dart @@ -0,0 +1,147 @@ +// import 'package:diplomaticquarterapp/pages/webRTC/signaling_bkp.dart'; +// import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter_webrtc/flutter_webrtc.dart'; +// +// class CallPage extends StatefulWidget { +// @override +// _CallPageState createState() => _CallPageState(); +// } +// +// class _CallPageState extends State { +// Signaling signaling = Signaling(); +// RTCVideoRenderer _localRenderer = RTCVideoRenderer(); +// RTCVideoRenderer _remoteRenderer = RTCVideoRenderer(); +// String roomId; +// TextEditingController textEditingController = TextEditingController(text: ''); +// +// @override +// void initState() { +// _localRenderer.initialize(); +// _remoteRenderer.initialize(); +// +// signaling.onAddRemoteStream = ((stream) { +// _remoteRenderer.srcObject = stream; +// setState(() {}); +// }); +// +// super.initState(); +// } +// +// @override +// void dispose() { +// _localRenderer.dispose(); +// _remoteRenderer.dispose(); +// super.dispose(); +// } +// +// void _getUserMedia() async { +// final Map constraints = { +// 'audio': 'false', +// 'video': {'facingMode': 'user'}, +// }; +// +// MediaStream stream = await navigator.mediaDevices.getUserMedia(constraints); +// setState(() { +// _localRenderer.srcObject = stream; +// }); +// } +// +// void initializeRenderers() async { +// _localRenderer.initialize(); +// } +// +// @override +// Widget build(BuildContext context) { +// return AppScaffold( +// isShowAppBar: true, +// showNewAppBar: true, +// showNewAppBarTitle: true, +// isShowDecPage: false, +// appBarTitle: "WebRTC Calling", +// body: Column( +// children: [ +// SizedBox(height: 8), +// Wrap( +// children: [ +// ElevatedButton( +// onPressed: () { +// setState(() { +// signaling.openUserMedia(_localRenderer, _remoteRenderer); +// }); +// }, +// child: Text("Open camera & microphone"), +// ), +// SizedBox( +// width: 8, +// ), +// ElevatedButton( +// onPressed: () async { +// roomId = await signaling.createRoom(_remoteRenderer); +// textEditingController.text = roomId; +// setState(() {}); +// }, +// child: Text("Create room"), +// ), +// SizedBox( +// width: 8, +// ), +// ElevatedButton( +// onPressed: () { +// // Add roomId +// signaling.joinRoom( +// textEditingController.text, +// _remoteRenderer, +// ); +// }, +// child: Text("Join room"), +// ), +// SizedBox( +// width: 8, +// ), +// ElevatedButton( +// onPressed: () { +// signaling.hangUp(_localRenderer); +// }, +// child: Text("Hangup"), +// ) +// ], +// ), +// SizedBox(height: 8), +// Expanded( +// child: Padding( +// padding: const EdgeInsets.all(0.0), +// child: Stack( +// children: [ +// Positioned(top: 0.0, right: 0.0, left: 0.0, bottom: 0.0, child: RTCVideoView(_remoteRenderer)), +// Positioned( +// top: 20.0, +// right: 100.0, +// left: 20.0, +// bottom: 300.0, +// child: RTCVideoView(_localRenderer, mirror: true), +// ), +// ], +// ), +// ), +// ), +// Padding( +// padding: const EdgeInsets.all(8.0), +// child: Row( +// mainAxisAlignment: MainAxisAlignment.center, +// children: [ +// Text("Join the following Room: "), +// Flexible( +// child: TextFormField( +// controller: textEditingController, +// ), +// ) +// ], +// ), +// ), +// SizedBox(height: 8) +// ], +// ), +// ); +// } +// } diff --git a/lib/pages/webRTC/fcm/FCMSendNotification.dart b/lib/pages/webRTC/fcm/FCMSendNotification.dart new file mode 100644 index 00000000..08c4cca9 --- /dev/null +++ b/lib/pages/webRTC/fcm/FCMSendNotification.dart @@ -0,0 +1,86 @@ + +import 'dart:convert'; + +import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; +import 'package:http/http.dart' as http; + +const _serverFCMToken = 'ya29.a0ARrdaM9U7fZtxF64ntg2Y1Nve-cd4rPazyGcWN69cQmOsddUqxAL1X8GUQ8V6sW2gWxM8ln1BIbmh0OrzQtCiTGrsmcL3jZlGXoQhZN51nX3O7F3g1AXCW_Zt_pjiworCJEGSRkl7QirxE7RFzlwBONsOuft'; +const doctorID = '12345'; + +class FCM{ + static Future sendCallNotifcationTo(String token, String patientID, String patientMobile) async{ + var headers = { + 'Authorization': 'Bearer $_serverFCMToken', + 'Content-Type': 'application/json' + }; + + final body = { + "message": { + "token": token, + "notification": { + "title": "Dr Sulaiman Al Habib", + "body": "Doctor is calling" + }, + "apns": { + "payload": { + "aps": { + "sound": "ring_30Sec.mp3", + "token": "466e0f16fecf1e32c51f812cccc84fcbc807f958b15eb55675a5fa971a775829", + "badge": 1 + } + }, + "headers": { + "apns-priority": "10", + "apns-expiration": "0", + "apns-collapse-id": "2561368006" + } + }, + "data": { + "callerID" : doctorID, + "receiverID" : patientID, + "receiverMobile" : patientMobile, + "msgID": "123", + "notfID": "123", + "notification_foreground": "true", + "count": "1", + "message": "Doctor is calling ", + "AppointmentNo": "123", + "title": "Rayyan Hospital", + "ProjectID": "123", + "NotificationType": "10", + "background": "1", + "doctorname": "Dr Sulaiman Al Habib", + "clinicname": "ENT Clinic", + "speciality": "Speciality", + "appointmentdate": "Sun, 15th Dec, 2019", + "appointmenttime": "09:00", + "type": "video", + "session_id": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0LTE1OTg3NzQ1MDYiLCJpc3MiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0Iiwic3ViIjoiQUNhYWQ1YTNmOGM2NGZhNjczNTY3NTYxNTc0N2YyNmMyYiIsImV4cCI6MTU5ODc3ODEwNiwiZ3JhbnRzIjp7ImlkZW50aXR5IjoiSGFyb29uMSIsInZpZGVvIjp7InJvb20iOiJTbWFsbERhaWx5U3RhbmR1cCJ9fX0.7XUS5uMQQJfkrBZu9EjQ6STL6R7iXkso6BtO1HmrQKk", + "identity": "Haroon1", + "name": "SmallDailyStandup", + "videoUrl": "video", + "picture": "video", + "is_call": "true" + } + } + }; + + bool success = false; + await BaseAppClient().simplePost('https://fcm.googleapis.com/v1/projects/api-project-815750722565/messages:send', body: body, headers: headers, onSuccess: (data, statusCode){ + success = true; + }, onFailure: (error, statusCode){ + success = false; + }); + + return success; + // final response = await http.post('https://fcm.googleapis.com/v1/projects/api-project-815750722565/messages:send', headers:he aders, body: body); + + + } +} + +String toB64(String data){ + var bytes = utf8.encode(data); + var base64Str = base64.encode(bytes); + return base64Str; +} \ No newline at end of file diff --git a/lib/pages/webRTC/signaling.dart b/lib/pages/webRTC/signaling.dart new file mode 100644 index 00000000..028de903 --- /dev/null +++ b/lib/pages/webRTC/signaling.dart @@ -0,0 +1,277 @@ +// import 'dart:convert'; +// +// import 'package:diplomaticquarterapp/uitl/SignalRUtil.dart'; +// import 'package:flutter/cupertino.dart'; +// import 'package:flutter_webrtc/flutter_webrtc.dart'; +// +// typedef void StreamStateCallback(MediaStream stream); +// typedef void RTCIceGatheringStateCallback(RTCIceGatheringState state); +// typedef void RTCPeerConnectionStateCallback(RTCPeerConnectionState state); +// typedef void RTCSignalingStateCallback(RTCSignalingState state); +// +// final Map constraints = { +// 'mandatory': {}, +// 'optional': [ +// {'DtlsSrtpKeyAgreement': true}, +// ] +// }; +// +// Map snapsis_ice_config = { +// 'iceServers': [ +// { "urls": 'stun:15.185.116.59:3478' }, +// { "urls": "turn:15.185.116.59:3479", "username": "admin", "credential": "admin" }, +// ], +// // 'sdpSemantics': 'unified-plan' +// }; +// Map twilio_ice_config = { +// "ice_servers": [ +// { +// "url": "stun:global.stun.twilio.com:3478?transport=udp", +// "urls": "stun:global.stun.twilio.com:3478?transport=udp" +// }, +// { +// "url": "turn:global.turn.twilio.com:3478?transport=udp", +// "username": "ce8042842b62c21bd20b176f80d6067fd3db81b1e9766312418ef5421d9ca2a2", +// "urls": "turn:global.turn.twilio.com:3478?transport=udp", +// "credential": "UzGOsiLwPZJ32cjafAebfDDpVrqeQjgpFHZEdau/8r4=" +// }, +// { +// "url": "turn:global.turn.twilio.com:3478?transport=tcp", +// "username": "ce8042842b62c21bd20b176f80d6067fd3db81b1e9766312418ef5421d9ca2a2", +// "urls": "turn:global.turn.twilio.com:3478?transport=tcp", +// "credential": "UzGOsiLwPZJ32cjafAebfDDpVrqeQjgpFHZEdau/8r4=" +// }, +// { +// "url": "turn:global.turn.twilio.com:443?transport=tcp", +// "username": "ce8042842b62c21bd20b176f80d6067fd3db81b1e9766312418ef5421d9ca2a2", +// "urls": "turn:global.turn.twilio.com:443?transport=tcp", +// "credential": "UzGOsiLwPZJ32cjafAebfDDpVrqeQjgpFHZEdau/8r4=" +// } +// ], +// // 'sdpSemantics': 'unified-plan' +// }; +// Map google_ice_config = { +// 'iceServers': [ +// { +// 'urls': [ +// 'stun:stun.l.google.com:19302', +// 'stun:stun1.l.google.com:19302', +// 'stun:stun2.l.google.com:19302', +// 'stun:stun3.l.google.com:19302' +// ] +// }, +// ], +// // 'sdpSemantics': 'unified-plan' +// }; +// Map aws_ice_config = { +// 'iceServers': [ +// {'url': "stun:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3478"}, +// {'url': "turn:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3479", 'credential': "admin", 'username': "admin"} +// ], +// // 'sdpSemantics': 'unified-plan' +// }; +// +// class Signaling { +// dispose() { +// if (peerConnection != null) { +// peerConnection.dispose(); +// peerConnection.getLocalStreams().forEach((e) => e.dispose()); +// peerConnection.getRemoteStreams().forEach((e) => e.dispose()); +// } +// signalR.closeConnection(); +// } +// +// init() async{ +// // Create Peer Connection +// peerConnection = await createPeerConnection(google_ice_config, constraints); +// registerPeerConnectionListeners(); +// } +// +// initializeSignalR(String userName) async { +// if (signalR != null) await signalR.closeConnection(); +// // https://vcallapi.hmg.com/webRTCHub?source=web&username=zohaib +// // signalR = SignalRUtil(hubName: "https://vcallapi.hmg.com/webRTCHub?source=mobile&username=$userName"); +// signalR = SignalRUtil(hubName: "http://35.193.237.29/webRTCHub?source=mobile&username=$userName"); +// final connected = await signalR.openConnection(); +// if (!connected) throw 'Failed to connect SignalR'; +// } +// +// Map configuration = { +// // 'iceServers': [ +// // { +// // 'urls': ['stun:stun1.l.google.com:19302', 'stun:stun2.l.google.com:19302'] +// // } +// // ] +// +// 'iceServers': [ +// // {'url': "stun:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3478"}, +// // {'url': "turn:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3479", 'credential': "admin", 'username': "admin"} +// // {'url': "stun:15.185.116.59:3478"}, +// // { +// // "url":"turn:15.185.116.59:3479", +// // "username": "admin", +// // "credential":"admin" +// // } +// { +// "url": "stun:global.stun.twilio.com:3478?transport=udp", +// "urls": "stun:global.stun.twilio.com:3478?transport=udp" +// }, +// { +// "url": "turn:global.turn.twilio.com:3478?transport=udp", +// "username": "f18fc347ba4aeeaa1b00f5199b1e900834b464962d434a4a89b4cdba02510047", +// "urls": "turn:global.turn.twilio.com:3478?transport=udp", +// "credential": "WX16BB+9nKm0f+Whf5EwpM8S/Yv+T2tlvQWLfdV7oqo=" +// } +// ] +// }; +// +// SignalRUtil signalR; +// +// RTCPeerConnection peerConnection; +// MediaStream localStream; +// MediaStream remoteStream; +// RTCDataChannel dataChannel; +// +// // Future call(String patientId, String mobile, {@required RTCVideoRenderer localVideo, @required RTCVideoRenderer remoteVideo}) async { +// // await initializeSignalR(patientId); +// // +// // // final isCallPlaced = await FCM.sendCallNotifcationTo(DOCTOR_TOKEN, patientId, mobile); +// // if(!isCallPlaced) +// // throw 'Failed to notify target for call'; +// // +// // return isCallPlaced; +// // } +// +// Future acceptCall(String caller, String receiver, {@required MediaStream localMediaStream, @required Function(MediaStream) onRemoteMediaStream, @required Function(RTCTrackEvent) onRemoteTrack}) async { +// await initializeSignalR(receiver); +// signalR.setContributors(caller: caller, receiver: receiver); +// await signalR.acceptCall(receiver, caller).catchError((e) => throw 'Failed to inform signalR that i accepted a call'); +// +// peerConnection.addStream(localMediaStream); +// +// // peerConnection?.onTrack = (track){ +// // onRemoteTrack(track); +// // }; +// peerConnection?.onAddStream = (MediaStream stream) { +// remoteStream = stream; +// onRemoteMediaStream?.call(stream); +// }; +// return true; +// } +// +// +// Future declineCall(String caller, String receiver) async { +// await initializeSignalR(receiver); +// signalR.setContributors(caller: caller, receiver: receiver); +// await signalR.declineCall(receiver, caller).catchError((e) => throw 'Failed to inform signalR that i accepted a call'); +// +// // peerConnection.addStream(localMediaStream); +// // +// // peerConnection?.onAddStream = (MediaStream stream) { +// // remoteStream = stream; +// // onRemoteMediaStream?.call(stream); +// // }; +// return true; +// } +// +// Future hangupCall(String caller, String receiver) async { +// await signalR.hangupCall(caller, receiver); +// dispose(); +// } +// +// answerOffer(String sdp) async { +// final offer = jsonDecode(sdp); +// final caller = offer['caller']; +// final receiver = offer['target']; +// final offerSdp = offer['sdp']; +// peerConnection.setRemoteDescription(rtcSessionDescriptionFrom(offerSdp)).then((value) { +// return peerConnection.createAnswer().catchError((e){ +// print(e); +// }); +// }).then((anwser) { +// return peerConnection.setLocalDescription(anwser).catchError((e){ +// print(e); +// }); +// }).then((value) { +// return peerConnection.getLocalDescription().catchError((e){ +// print(e); +// }); +// }).then((answer) { +// return signalR.answerOffer(answer, caller, receiver).catchError((e){ +// print(e); +// }); +// }).catchError((e) { +// print(e); +// }); +// } +// +// Future hangUp(RTCVideoRenderer localVideo) async {} +// +// Future createSdpAnswer(String toOfferSdp) async { +// final offerSdp = rtcSessionDescriptionFrom(jsonDecode(toOfferSdp)); +// peerConnection.setRemoteDescription(offerSdp).catchError((e){ +// print(e); +// }); +// +// final answer = await peerConnection.createAnswer().catchError((e){ +// print(e); +// }); +// var answerSdp = json.encode(answer); // Send SDP via Push or any channel +// return answerSdp; +// } +// +// Future createSdpOffer() async { +// final offer = await peerConnection.createOffer(); +// await peerConnection.setLocalDescription(offer).catchError((e){ +// print(e); +// }); +// final map = offer.toMap(); +// var offerSdp = json.encode(map); // Send SDP via Push or any channel +// return offerSdp; +// } +// +// addCandidate(String candidateJson) { +// peerConnection.addCandidate(rtcIceCandidateFrom(candidateJson)).catchError((e){ +// print(e); +// }); +// } +// +// void registerPeerConnectionListeners() { +// peerConnection.onRenegotiationNeeded = (){ +// print('Renegotiation Needed...'); +// }; +// +// peerConnection.onIceCandidate = (RTCIceCandidate candidate) { +// // print(json.encode(candidate.toMap())); +// signalR.addIceCandidate(json.encode(candidate.toMap())).catchError((e){ +// print(e); +// }); +// }; +// +// peerConnection?.onIceGatheringState = (RTCIceGatheringState state) { +// print('ICE gathering state changed: $state'); +// }; +// +// peerConnection?.onConnectionState = (RTCPeerConnectionState state) { +// print('Connection state change: $state'); +// }; +// +// peerConnection?.onSignalingState = (RTCSignalingState state) { +// print('Signaling state change: $state'); +// }; +// +// +// } +// } +// +// rtcSessionDescriptionFrom(Map sdp) { +// return RTCSessionDescription( +// sdp['sdp'], +// sdp['type'], +// ); +// } +// +// rtcIceCandidateFrom(String json) { +// final map = jsonDecode(json)['candidate']; +// return RTCIceCandidate(map['candidate'], map['sdpMid'], map['sdpMLineIndex']); +// } diff --git a/lib/pages/webRTC/signaling_bkp.dart b/lib/pages/webRTC/signaling_bkp.dart new file mode 100644 index 00000000..3b716ab6 --- /dev/null +++ b/lib/pages/webRTC/signaling_bkp.dart @@ -0,0 +1,242 @@ +// import 'dart:convert'; +// +// // import 'package:cloud_firestore/cloud_firestore.dart'; +// import 'package:flutter_webrtc/flutter_webrtc.dart'; +// +// typedef void StreamStateCallback(MediaStream stream); +// +// class Signaling { +// Map configuration = { +// 'iceServers': [ +// { +// 'urls': ['stun:stun1.l.google.com:19302', 'stun:stun2.l.google.com:19302'] +// } +// ] +// }; +// +// late RTCPeerConnection peerConnection; +// late MediaStream localStream; +// late MediaStream remoteStream; +// late String roomId; +// late String currentRoomText; +// late StreamStateCallback onAddRemoteStream; +// +// Future createRoom(RTCVideoRenderer remoteRenderer) async { +// // FirebaseFirestore db = FirebaseFirestore.instance; +// // DocumentReference roomRef = db.collection('rooms').doc(); +// +// print('Create PeerConnection with configuration: $configuration'); +// +// peerConnection = await createPeerConnection(configuration); +// +// registerPeerConnectionListeners(); +// +// localStream.getTracks().forEach((track) { +// peerConnection?.addTrack(track, localStream); +// }); +// +// // Code for collecting ICE candidates below +// // var callerCandidatesCollection = roomRef.collection('callerCandidates'); +// +// peerConnection?.onIceCandidate = (RTCIceCandidate candidate) { +// print('Got candidate: ${candidate.toMap()}'); +// // callerCandidatesCollection.add(candidate.toMap()); +// }; +// // Finish Code for collecting ICE candidate +// +// // Add code for creating a room +// RTCSessionDescription offer = await peerConnection.createOffer(); +// await peerConnection.setLocalDescription(offer); +// print('Created offer: $offer'); +// +// Map roomWithOffer = {'offer': offer.toMap()}; +// +// // await roomRef.set(roomWithOffer); +// // var roomId = roomRef.id; +// print('New room created with SDK offer. Room ID: $roomId'); +// currentRoomText = 'Current room is $roomId - You are the caller!'; +// // Created a Room +// +// peerConnection?.onTrack = (RTCTrackEvent event) { +// print('Got remote track: ${event.streams[0]}'); +// +// event.streams[0].getTracks().forEach((track) { +// print('Add a track to the remoteStream $track'); +// remoteStream?.addTrack(track); +// }); +// }; +// +// // Listening for remote session description below +// // roomRef.snapshots().listen((snapshot) async { +// // print('Got updated room: ${snapshot.data()}'); +// // +// // Map data = snapshot.data() as Map; +// // if (peerConnection?.getRemoteDescription() != null && data['answer'] != null) { +// // var answer = RTCSessionDescription( +// // data['answer']['sdp'], +// // data['answer']['type'], +// // ); +// // +// // print("Someone tried to connect"); +// // await peerConnection?.setRemoteDescription(answer); +// // } +// // }); +// // // Listening for remote session description above +// // +// // // Listen for remote Ice candidates below +// // roomRef.collection('calleeCandidates').snapshots().listen((snapshot) { +// // snapshot.docChanges.forEach((change) { +// // if (change.type == DocumentChangeType.added) { +// // Map data = change.doc.data() as Map; +// // print('Got new remote ICE candidate: ${jsonEncode(data)}'); +// // peerConnection.addCandidate( +// // RTCIceCandidate( +// // data['candidate'], +// // data['sdpMid'], +// // data['sdpMLineIndex'], +// // ), +// // ); +// // } +// // }); +// // }); +// // Listen for remote ICE candidates above +// +// return roomId; +// } +// +// Future joinRoom(String roomId, RTCVideoRenderer remoteVideo) async { +// // FirebaseFirestore db = FirebaseFirestore.instance; +// // DocumentReference roomRef = db.collection('rooms').doc('$roomId'); +// // var roomSnapshot = await roomRef.get(); +// // print('Got room ${roomSnapshot.exists}'); +// +// // if (roomSnapshot.exists) { +// // print('Create PeerConnection with configuration: $configuration'); +// // peerConnection = await createPeerConnection(configuration); +// // +// // registerPeerConnectionListeners(); +// // +// // localStream.getTracks().forEach((track) { +// // peerConnection?.addTrack(track, localStream); +// // }); +// // +// // // Code for collecting ICE candidates below +// // // var calleeCandidatesCollection = roomRef.collection('calleeCandidates'); +// // peerConnection.onIceCandidate = (RTCIceCandidate candidate) { +// // if (candidate == null) { +// // print('onIceCandidate: complete!'); +// // return; +// // } +// // print('onIceCandidate: ${candidate.toMap()}'); +// // // calleeCandidatesCollection.add(candidate.toMap()); +// // }; +// // // Code for collecting ICE candidate above +// // +// // peerConnection?.onTrack = (RTCTrackEvent event) { +// // print('Got remote track: ${event.streams[0]}'); +// // event.streams[0].getTracks().forEach((track) { +// // print('Add a track to the remoteStream: $track'); +// // remoteStream?.addTrack(track); +// // }); +// // }; +// // +// // // Code for creating SDP answer below +// // var data = roomSnapshot.data() as Map; +// // print('Got offer $data'); +// // var offer = data['offer']; +// // await peerConnection?.setRemoteDescription( +// // RTCSessionDescription(offer['sdp'], offer['type']), +// // ); +// // var answer = await peerConnection.createAnswer(); +// // print('Created Answer $answer'); +// // +// // await peerConnection.setLocalDescription(answer); +// // +// // Map roomWithAnswer = { +// // 'answer': {'type': answer.type, 'sdp': answer.sdp} +// // }; +// // +// // await roomRef.update(roomWithAnswer); +// // // Finished creating SDP answer +// // +// // // Listening for remote ICE candidates below +// // // roomRef.collection('callerCandidates').snapshots().listen((snapshot) { +// // // snapshot.docChanges.forEach((document) { +// // // var data = document.doc.data() as Map; +// // // print(data); +// // // print('Got new remote ICE candidate: $data'); +// // // peerConnection.addCandidate( +// // // RTCIceCandidate( +// // // data['candidate'], +// // // data['sdpMid'], +// // // data['sdpMLineIndex'], +// // // ), +// // // ); +// // // }); +// // // }); +// // } +// } +// +// Future openUserMedia( +// RTCVideoRenderer localVideo, +// RTCVideoRenderer remoteVideo, +// ) async { +// var stream = await navigator.mediaDevices.getUserMedia({'video': true, 'audio': false}); +// +// localVideo.srcObject = stream; +// localStream = stream; +// +// remoteVideo.srcObject = await createLocalMediaStream('key'); +// } +// +// Future hangUp(RTCVideoRenderer localVideo) async { +// List tracks = localVideo.srcObject!.getTracks(); +// tracks.forEach((track) { +// track.stop(); +// }); +// +// if (remoteStream != null) { +// remoteStream.getTracks().forEach((track) => track.stop()); +// } +// if (peerConnection != null) peerConnection.close(); +// +// if (roomId != null) { +// // var db = FirebaseFirestore.instance; +// // var roomRef = db.collection('rooms').doc(roomId); +// // var calleeCandidates = await roomRef.collection('calleeCandidates').get(); +// // calleeCandidates.docs.forEach((document) => document.reference.delete()); +// +// // var callerCandidates = await roomRef.collection('callerCandidates').get(); +// // callerCandidates.docs.forEach((document) => document.reference.delete()); +// +// // await roomRef.delete(); +// } +// +// localStream.dispose(); +// remoteStream?.dispose(); +// } +// +// void registerPeerConnectionListeners() { +// peerConnection?.onIceGatheringState = (RTCIceGatheringState state) { +// print('ICE gathering state changed: $state'); +// }; +// +// peerConnection?.onConnectionState = (RTCPeerConnectionState state) { +// print('Connection state change: $state'); +// }; +// +// peerConnection?.onSignalingState = (RTCSignalingState state) { +// print('Signaling state change: $state'); +// }; +// +// peerConnection?.onIceGatheringState = (RTCIceGatheringState state) { +// print('ICE connection state change: $state'); +// }; +// +// peerConnection?.onAddStream = (MediaStream stream) { +// print("Add remote stream"); +// onAddRemoteStream?.call(stream); +// remoteStream = stream; +// }; +// } +// } diff --git a/lib/routes.dart b/lib/routes.dart new file mode 100644 index 00000000..c2ee5f51 --- /dev/null +++ b/lib/routes.dart @@ -0,0 +1,102 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart'; +import 'package:diplomaticquarterapp/pages/DrawerPages/family/add-family-member.dart'; +import 'package:diplomaticquarterapp/pages/DrawerPages/family/add-family_type.dart'; +import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; +import 'package:diplomaticquarterapp/pages/TestPage.dart'; +import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart'; +import 'package:diplomaticquarterapp/pages/conference/zoom/call_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart'; +import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; +import 'package:diplomaticquarterapp/pages/login/confirm-login.dart'; +import 'package:diplomaticquarterapp/pages/login/forgot-password.dart'; +import 'package:diplomaticquarterapp/pages/login/login-type.dart'; +import 'package:diplomaticquarterapp/pages/login/login.dart'; +import 'package:diplomaticquarterapp/pages/login/register-info.dart'; +import 'package:diplomaticquarterapp/pages/login/register.dart'; +import 'package:diplomaticquarterapp/pages/login/welcome.dart'; +import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackagesCartPage.dart'; +import 'package:diplomaticquarterapp/pages/packages_offers/PackageOrderCompletedPage.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/cart-order-page.dart'; +import 'package:diplomaticquarterapp/pages/settings/settings.dart'; +import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart'; +import 'package:diplomaticquarterapp/pages/symptom-checker/select-gender.dart'; +import 'package:diplomaticquarterapp/pages/symptom-checker/symtom-checker.dart'; +import 'package:diplomaticquarterapp/pages/webRTC/OpenTok/OpenTok.dart'; +import 'package:diplomaticquarterapp/pages/webRTC/call_page.dart'; +import 'package:diplomaticquarterapp/pages/webRTC/call_page_bkp.dart'; +import 'package:diplomaticquarterapp/splashPage.dart'; + +import 'models/Appointments/DoctorListResponse.dart'; +import 'pages/BookAppointment/SearchResultsByRegion.dart'; + +const String INIT_ROUTE = '/'; +const String HOME = 'home'; +const String SPLASH = '/'; +const String LOGIN = 'login'; +const String WELCOME_LOGIN = 'welcome-login'; +const String LOGIN_TYPE = 'login-type'; +const String LOGIN_PAGE = 'login-page'; +const String FORGOT_PASSWORD = 'forgot-password'; +const String REGISTER = 'register'; +const String CONFIRM_LOGIN = 'confrim-login'; +const String REGISTER_INFO = 'register-info'; +const String MY_FAMILIY = 'my-family'; +const String ADD_FAMILY_MEMBER_TYPE = 'add-family-member-type'; +const String ADD_FAMILY_MEMBER = 'add-family-member'; +const String LIVE_CARE = 'live-care'; +const String SYMPTOM_CHECKER = 'symptom-checker'; +const String SYMPTOM_CHECKER_INFO = 'symptom-checker-info'; +const String SELECT_GENDER = 'select-gender'; +const String SETTINGS = 'settings'; +const String PACKAGES_OFFERS = 'packages-offers'; +const String PACKAGES_OFFERS_CART = 'packages-offers-cart'; +const String PACKAGES_ORDER_COMPLETED = 'packages-offers-cart'; +const String TEST_PAGE = 'test-page'; +const String OPENTOK_CALL_PAGE = 'OPENTOK_CALL_PAGE'; +const String CART_ORDER_PAGE = 'cart-order-page'; +const String CALL_PAGE = 'CALL_PAGE'; +const String INCOMING_CALL_PAGE = 'INCOMING_CALL_PAGE'; + +const String HEALTH_WEATHER = 'health-weather'; +const APP_UPDATE = 'app-update'; + +const ZOOM_CALL_PAGE = 'zoom_call_page'; + +var routes = { + SPLASH: (_) => SplashScreen(), + HOME: (_) => LandingPage(), + WELCOME_LOGIN: (_) => WelcomeLogin(), + LOGIN_TYPE: (_) => LoginType(), + LOGIN_PAGE: (_) => Login(), + FORGOT_PASSWORD: (_) => ForgotPassword(), + REGISTER: (_) => Register(), + CONFIRM_LOGIN: (_) => ConfirmLogin(), + REGISTER_INFO: (_) => RegisterInfo(), + MY_FAMILIY: (_) => MyFamily(), + ADD_FAMILY_MEMBER_TYPE: (_) => AddFamilyMemberType(), + ADD_FAMILY_MEMBER: (_) => AddMember(), + LIVE_CARE: (_) => LiveCareHome(), + SYMPTOM_CHECKER: (_) => SymptomChecker(), + SYMPTOM_CHECKER_INFO: (_) => SymptomInfo(), + SELECT_GENDER: (_) => SelectGender(), + SETTINGS: (_) => Settings(), + PACKAGES_OFFERS_CART: (_) => PackagesCartPage(), + PACKAGES_ORDER_COMPLETED: (_) => PackageOrderCompletedPage(), + TEST_PAGE: (_) => TestPage(), + HEALTH_WEATHER: (_) => HealthWeatherIndicator(), + APP_UPDATE: (_) => AppUpdatePage(appUpdateText: '',), + SETTINGS: (_) => Settings(), + CART_ORDER_PAGE: (_) => CartOrderPage(), + // CALL_PAGE: (_) => CallPage(), + INCOMING_CALL_PAGE: (_) => IncomingCall(), + + ZOOM_CALL_PAGE: (_) => CallScreen(), + + OPENTOK_CALL_PAGE: (_) => OpenTokConnectCallPage( + apiKey: OPENTOK_API_KEY, + sessionId: '1_MX40NjIwOTk2Mn5-MTY0NzE3MzcwNjA0MH55RUJoZnd0ZGh2U3BPc01ENVZBelQvT1Z-fg', + token: 'T1==cGFydG5lcl9pZD00NjIwOTk2MiZzaWc9M2I4ODYxYTIzMGQ0ZDA3OTYyNDhkODIxNzI5ZjIzODM1NjY2YzExMzpzZXNzaW9uX2lkPTFfTVg0ME5qSXdPVGsyTW41LU1UWTBOekUzTXpjd05qQTBNSDU1UlVKb1puZDBaR2gyVTNCUGMwMUVOVlpCZWxRdlQxWi1mZyZjcmVhdGVfdGltZT0xNjQ3MTczNzA2Jm5vbmNlPTAuMjA3NDI0MzA1NzcwMzY4MiZyb2xlPW1vZGVyYXRvciZleHBpcmVfdGltZT0xNjQ3MjYwMTA2JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9' + ), +}; diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart new file mode 100644 index 00000000..7664f4ac --- /dev/null +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -0,0 +1,2001 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; +import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; +import 'package:diplomaticquarterapp/models/Appointments/doctor_pre_post_image.dart'; +import 'package:diplomaticquarterapp/models/Appointments/laser_body_parts.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/Request.dart'; +import 'package:diplomaticquarterapp/models/apple_pay_request.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; +import 'package:flutter/cupertino.dart'; + +import 'mock_doctor_response.dart'; + +class DoctorsListService extends BaseService { + AppSharedPreferences sharedPref = AppSharedPreferences(); + AppGlobal appGlobal = new AppGlobal(); + + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + + double? lat; + double? long; + String? deviceToken; + String? tokenID; + List selectedBodyPartList = []; + + Future getDoctorsList(int clinicID, int projectID, bool isNearest, int languageID, BuildContext? context, {doctorId, doctorName, isContinueDentalPlan = false}) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { + lat = await this.sharedPref.getDouble(USER_LAT); + long = await this.sharedPref.getDouble(USER_LONG); + } + + // Request req = appGlobal.getPublicRequest(); + request = { + // + // "IPAdress": "10.20.10.20", + // "VersionID": req.VersionID, + // "Channel": req.Channel, + // "generalid": 'Cs2020@2016\$2958', + "PatientOutSA": authProvider.isLogin ? authUser.outSA : 0, + "TokenID": "", + // "DeviceTypeID": req.DeviceTypeID, + "SessionID": "YckwoXhUmWBsnHKEKig", + "ClinicID": clinicID, + "ProjectID": projectID, + "DoctorName": doctorName, //!= null ? doctorId : 0, + "ContinueDentalPlan": isContinueDentalPlan, + "IsSearchAppointmnetByClinicID": isContinueDentalPlan ? false : true, + "PatientID": authUser.patientID != null ? authUser.patientID : 0, + "gender": authUser.gender != null ? authUser.gender : 0, + "age": authUser.age != null ? authUser.age : 0, + "DateofBirth": authUser.dateofBirth != null ? authUser.dateofBirth : null, + "IsGetNearAppointment": false, + "SearchForVoiceCommand": doctorId != null && doctorId.length > 0 ? true : false, + "DoctorIDsList": doctorId, + "Latitude": lat != null ? lat.toString() : 0, + "Longitude": long != null ? long.toString() : 0, + "isDentalAllowedBackend": clinicID == 17 ? true : isContinueDentalPlan, + "IsGetNearAppointment": isNearest, + "LanguageID": languageID, + if (isNearest) "SelectedDate": DateUtil.convertDateToString(DateTime.now()), + "License": true + }; + + dynamic localRes; + + await baseAppClient.post(GET_DOCTORS_LIST_URL, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getDoctorsListByName(String docName, int languageID, BuildContext context) async { + Map request; + + late double lat = 0.0; + late double long = 0.0; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { + lat = await this.sharedPref.getDouble(USER_LAT); + long = await this.sharedPref.getDouble(USER_LONG); + } + + Request req = appGlobal.getPublicRequest(); + request = { + "IPAdress": "10.20.10.20", + "VersionID": req.VersionID, + "Channel": req.Channel, + "generalid": 'Cs2020@2016\$2958', + "PatientOutSA": authProvider.isLogin ? authUser.outSA : false, + "TokenID": "", + "DeviceTypeID": req.DeviceTypeID, + "SessionID": null, + "ClinicID": 0, + "ProjectID": 0, + "ContinueDentalPlan": false, + "IsSearchAppointmnetByClinicID": false, + "DoctorName": docName, + "DateofBirth": authUser.dateofBirth != null ? authUser.dateofBirth : null, + "PatientID": authUser.patientID != null ? authUser.patientID : 0, + "gender": authUser.gender != null ? authUser.gender : 0, + "age": authUser.age != null ? authUser.age : 0, + "IsGetNearAppointment": false, + "Latitude": lat == null ? 0.0 : lat, + "Longitude": long == null ? 0.0 : long, + "LanguageID": languageID, + "License": true + }; + + dynamic localRes = response; + + await baseAppClient.post(GET_DOCTORS_LIST_URL, + onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getDoctorsProfile(int docID, int clinicID, int projectID, int languageID, context) async { + Map request; + + Request req = appGlobal.getPublicRequest(); + request = { + "IPAdress": "10.20.10.20", + "VersionID": req.VersionID, + "Channel": req.Channel, + "generalid": 'Cs2020@2016\$2958', + "PatientOutSA": authUser.outSA ?? false, + "TokenID": "", + "DeviceTypeID": req.DeviceTypeID, + "SessionID": null, + "doctorID": docID, + "ClinicID": clinicID, + "PatientID": 0, + "License": true, + "IsRegistered": true, + "ProjectID": projectID, + "isDentalAllowedBackend": false, + "LanguageID": languageID, + }; + + dynamic localRes; + + await baseAppClient.post(GET_DOCTOR_PROFILE, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getDoctorsRating(int docID, int languageID, context) async { + Map request; + + Request req = appGlobal.getPublicRequest(); + request = { + "IPAdress": "10.20.10.20", + "VersionID": req.VersionID, + "Channel": req.Channel, + "generalid": 'Cs2020@2016\$2958', + "PatientOutSA": authUser.outSA, + "TokenID": "", + "DeviceTypeID": req.DeviceTypeID, + "SessionID": null, + "doctorID": docID, + "PatientID": 0, + "License": true, + "IsRegistered": true, + "LanguageID": languageID, + "isDentalAllowedBackend": false + }; + + dynamic localRes; + + await baseAppClient.post(GET_DOCTOR_RATING_NOTES, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getDoctorPrePostImages(DoctorProfileList doctorProfile, context) async { + Map request; + request = {"PatientOutSA": authUser.outSA ?? 0, "isDentalAllowedBackend": false, "DoctorID": doctorProfile.doctorID, "ClinicID": doctorProfile.clinicID, "ProjectID": doctorProfile.projectID}; + + var images = DoctorPrePostImages(); + await baseAppClient.post(GET_DOCTOR_PRE_POST_IMAGES, onSuccess: (response, statusCode) async { + var list = response['DoctorPrePostImagesList']; + if (list is List && list.length > 0) { + list.forEach((j) { + var image = DoctorPrePostImageModel.fromJson(j); + if (image.imageType == 1) images.pre = image; + if (image.imageType == 2) images.post = image; + }); + } + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(images); + } + + Future getDoctorsRatingDetails(int docID, int languageID, context) async { + Map request; + + Request req = appGlobal.getPublicRequest(); + request = { + "IPAdress": "10.20.10.20", + "VersionID": req.VersionID, + "Channel": req.Channel, + "generalid": 'Cs2020@2016\$2958', + "PatientOutSA": authUser.outSA, + "TokenID": "", + "DeviceTypeID": req.DeviceTypeID, + "SessionID": null, + "DoctorID": docID, + "PatientID": 0, + "License": true, + "IsRegistered": true, + "LanguageID": languageID, + "isDentalAllowedBackend": false + }; + + dynamic localRes; + + await baseAppClient.post(GET_DOCTOR_RATING_DETAILS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getDoctorFreeSlots(int docID, int clinicID, int projectID, bool isContinueDentalPlan, BuildContext context, [ProjectViewModel? projectViewModel]) async { + Map request; + + Request req = appGlobal.getPublicRequest(); + request = { + "DoctorID": docID, + "IsBookingForLiveCare": 0, + "ClinicID": clinicID, + "ProjectID": projectID, + "OriginalClinicID": clinicID, + "days": 0, + "isReschadual": false, + "VersionID": req.VersionID, + "Channel": 3, + "IPAdress": "10.20.10.20", + "generalid": "Cs2020@2016\$2958", + "PatientOutSA": authProvider.isLogin ? authUser.outSA : 0, + "SessionID": null, + "isDentalAllowedBackend": false, + "LanguageID": 1, + "DeviceTypeID": 1, + "ContinueDentalPlan": isContinueDentalPlan, + }; + + if (clinicID == 253) { + List procedureID = projectViewModel!.selectedBodyPartList.map((element) => element.id.toString()).toList(); + request["GeneralProcedureList"] = procedureID; + if (procedureID.length == 1 && procedureID[0] == "1") { + request["ProcedureSlotDuration"] = 90; + } else { + request["ProcedureSlotDuration"] = projectViewModel.laserSelectionDuration; + } + } + + dynamic localRes; + + await baseAppClient.post(GET_DOCTOR_FREE_SLOTS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getDoctorScheduledFreeSlots(int docID, int clinicID, int projectID, int serviceID, BuildContext context) async { + Map request; + + Request req = appGlobal.getPublicRequest(); + request = { + "DoctorID": docID, + "IsBookingForLiveCare": 1, + "ClinicID": clinicID, + "ProjectID": projectID, + "OriginalClinicID": clinicID, + "ServiceID": serviceID, + "days": 50, + "isReschadual": false, + "VersionID": req.VersionID, + "Channel": 3, + "IPAdress": "10.20.10.20", + "generalid": "Cs2020@2016\$2958", + "PatientOutSA": authUser.outSA, + "SessionID": null, + "isDentalAllowedBackend": false, + "LanguageID": 1, + "DeviceTypeID": 1 + }; + + dynamic localRes; + + await baseAppClient.post(GET_LIVECARE_SCHEDULE_DOCTOR_TIME_SLOTS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future insertWalkInAppointment(int docID, int clinicID, int projectID, String selectedTime, String selectedDate, int initialSlotDuration, int languageID, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + request = { + "IsForLiveCare": false, + "ProjectID": projectID, + "ClinicID": clinicID, + "DoctorID": docID, + "StartTime": selectedTime, + "SelectedTime": selectedTime, + "EndTime": selectedTime, + "InitialSlotDuration": initialSlotDuration, + "StrAppointmentDate": selectedDate, + "IsVirtual": false, + "DeviceType": Platform.isIOS ? 'iOS' : 'Android', + "BookedBy": 102, + "VisitType": 1, + "VisitFor": 1, + "GenderID": authUser.gender, + "Age": authUser.age != null ? authUser.age : 0, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "PatientType": authUser.patientType + }; + + dynamic localRes; + try { + await baseAppClient.post(INSERT_WALKIN_APPOINTMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } catch (e) { + return Future.error(e); + } + } + + Future insertAppointment(int docID, int clinicID, int projectID, String selectedTime, String selectedDate, int initialSlotDuration, int languageID, BuildContext context, + [String? procedureID, num? testTypeEnum, num? testProcedureEnum, ProjectViewModel? projectViewModel, int? invoiceNumber, int? lineItemNo, String? invoiceNoVP]) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + request = { + "IsForLiveCare": false, + "ProjectID": projectID, + "ClinicID": clinicID, + "DoctorID": docID, + "StartTime": selectedTime, + "SelectedTime": selectedTime, + "EndTime": selectedTime, + "ProcedureID": procedureID, + "TestTypeEnum": testTypeEnum, + "TestProcedureEnum": testProcedureEnum, + "InitialSlotDuration": initialSlotDuration, + "StrAppointmentDate": selectedDate, + "IsVirtual": false, + "DeviceType": Platform.isIOS ? 'iOS' : 'Android', + "BookedBy": 102, + "VisitType": 1, + "VisitFor": 1, + "GenderID": authUser.gender, + "Age": authUser.age != null ? authUser.age : 0, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "PatientType": authUser.patientType, + "InvoiceNo": invoiceNumber, + "InvoiceNo_VP": invoiceNoVP, + "LineItemNo": lineItemNo, + // "TokenID":"@dm!n" + }; + + if (clinicID == 253) { + List procedureID = projectViewModel!.selectedBodyPartList.map((element) => element.id.toString()).toList(); + request["GeneralProcedureList"] = procedureID; + if (procedureID.length == 1 && procedureID[0] == "1") { + request["InitialSlotDuration"] = 90; + } else { + request["InitialSlotDuration"] = projectViewModel.laserSelectionDuration; + } + } + + dynamic localRes; + try { + await baseAppClient.post(INSERT_SPECIFIC_APPOINTMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } catch (e) { + return Future.error(e); + } + } + + Future insertLiveCareScheduleAppointment(int docID, int clinicID, int projectID, int serviceID, String selectedTime, String selectedDate, int languageID, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + request = { + "IsForLiveCare": true, + "ProjectID": projectID, + "ClinicID": clinicID, + "DoctorID": docID, + "ServiceID": serviceID, + "StartTime": selectedTime, + "SelectedTime": selectedTime, + "EndTime": selectedTime, + "InitialSlotDuration": 0, + "StrAppointmentDate": selectedDate, + "IsVirtual": false, + "DeviceType": Platform.isIOS ? 'iOS' : 'Android', + "DeviceToken": await sharedPref.getString(PUSH_TOKEN), + "BookedBy": 102, + "VisitType": 1, + "VisitFor": 1, + "Age": authUser.age != null ? authUser.age : 0, + "GenderID": authUser.gender, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "PatientType": authUser.patientType + }; + + dynamic localRes; + + await baseAppClient.post(INSERT_LIVECARE_SCHEDULE_APPOINTMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getPatientShare(String appoID, int clinicID, int projectID, int languageID, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + + request = { + "ProjectID": projectID, + "ClinicID": clinicID, + "AppointmentNo": appoID, + "IsActiveAppointment": true, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "LanguageID": languageID, + "PatientType": authUser.patientType + }; + + dynamic localRes; + + await baseAppClient.post(GET_PATIENT_SHARE, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future setOnlineCheckInForAppointment(String appoID, int projectID, int languageID, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + request = {"ProjectID": projectID, "AppointmentNo": appoID, "LanguageID": languageID}; + + dynamic localRes; + + await baseAppClient.post(SET_ONLINE_CHECKIN_FOR_APPOINTMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future checkPatientHasDermaPackage(int patientID, int clinicID, int projectID, int doctorID, int languageID, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + request = {"PatientID": patientID, "ClinicID": clinicID, "ProjectID": projectID, "LanguageID": languageID}; + //request = { "PatientID":4768732, "ClinicID":1, "ProjectID": 15, "LanguageID": languageID, "TokenID":"@dm!n" }; + + dynamic localRes; + + await baseAppClient.post(CHECK_PATIENT_DERMA_PACKAGE, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getLiveCareAppointmentPatientShare(String appoID, int clinicID, int projectID, int languageID, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + + request = { + "ProjectID": projectID, + "ClinicID": clinicID, + "AppointmentNo": appoID, + "IsActiveAppointment": true, + "IsForLiveCare": true, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "LanguageID": languageID, + "PatientType": authUser.patientType + }; + + dynamic localRes; + + await baseAppClient.post(GET_PATIENT_SHARE_LIVECARE, onSuccess: (response, statusCode) async { + localRes = response['OnlineCheckInAppointments'][0]; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getOBGyneOrdersList(BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + + request = {"ProjectID": 15, "DeviceTypeID": req.DeviceTypeID, "PatientID": authUser.patientID, "PatientTypeID": authUser.patientType, "PatientType": authUser.patientType}; + + dynamic localRes; + + await baseAppClient.post(GET_OBGYNE_ORDERS_LIST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getOBGyneDoctorsList(int projectID, String setupID, int languageID, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + + request = { + "ProjectID": projectID, + "SetupID": setupID, + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "LanguageID": languageID, + "PatientType": authUser.patientType + }; + + dynamic localRes; + + await baseAppClient.post(GET_OBGYNE_DOCTORS_LIST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getPatientAppointmentHistoryWithAppoNo(int appoNo, int languageID) async { + Map request; + request = {"IsActiveAppointment": true, "AppointmentNo": appoNo, "IsComingFromCOC": false, "LanguageID": languageID}; + dynamic localRes; + await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + + Future getPatientShareForWalkInAppointment(int clinicID, int projectID, int doctorID) async { + Map request; + request = {"ProjectID": projectID, "ClinicID": clinicID, "DoctorID": doctorID}; + dynamic localRes; + await baseAppClient.post(GET_PATIENT_SHARE_FOR_WALKIN_APPOINTMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + + Future canPayForWalkInAppointment(int clinicID, int projectID, int doctorID) async { + Map request; + request = {"ProjectID": projectID, "ClinicID": clinicID, "DoctorID": doctorID, "StartTime": "12:00", "EndTime": "12:00"}; + dynamic localRes; + await baseAppClient.post(CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + + Future getPatientAppointmentHistory(bool isActiveAppointment, int languageID, BuildContext context, {bool isForCOC = false, isForUpcomming = false, IsForArrived = false}) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + + request = { + "IsActiveAppointment": isActiveAppointment, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "IsComingFromCOC": isForCOC, + "PatientType": authUser.patientType, + "LanguageID": languageID, + "isForUpcomming": isForUpcomming, + "IsForArrived": IsForArrived + }; + + dynamic localRes; + + await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getPatientAppointmentCurfewHistory(bool isActiveAppointment) async { + Map request; + + Request req = appGlobal.getPublicRequest(); + + request = { + "IsActiveAppointment": isActiveAppointment, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": 1231755, + "PatientTypeID": 1, + "PatientType": 1 + }; + + dynamic localRes; + + await baseAppClient.post(GET_PATIENT_APPOINTMENT_CURFEW_HISTORY, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future confirmAppointment(int appoNo, int clinicID, int projectID, bool isLiveCare, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + + request = { + "AppointmentNumber": appoNo, + "IsLiveCareAppointment": isLiveCare, + "ClinicID": clinicID, + "ProjectID": projectID, + "ConfirmationBy": 102, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "PatientType": authUser.patientType + }; + + dynamic localRes; + + await baseAppClient.post(CONFIRM_APPOINTMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future insertVIDARequest(int appoNo, int clinicID, int projectID, int serviceID, int docID, String appoDate, String clientRequestID, int languageID, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + deviceToken = await sharedPref.getString(PUSH_TOKEN); + + if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { + lat = await this.sharedPref.getDouble(USER_LAT); + long = await this.sharedPref.getDouble(USER_LONG); + } + + Request req = appGlobal.getPublicRequest(); + + request = { + "AppointmentNo": appoNo, + "AppointmentDate": appoDate, + "ClientRequestID": clientRequestID, + "ClinicID": clinicID, + "ProjectID": projectID, + "ServiceID": serviceID, + "AcceptedBy": docID, + "IsFlutter": true, + "DeviceToken": deviceToken, + "Latitude": lat, + "Longitude": long, + "DeviceType": req.DeviceType, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "PatientType": authUser.patientType, + "VoipToken": await sharedPref.getString(ONESIGNAL_APNS_TOKEN), + "LanguageID": languageID, + "IsVoip": Platform.isIOS ? true : false + }; + + dynamic localRes; + + await baseAppClient.post(INSERT_VIDA_REQUEST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future cancelAppointment(AppoitmentAllHistoryResultList appo, BuildContext context, {bool isReschedule = false}) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + + request = { + "AppointmentID": appo.appointmentNo, + "ClinicID": appo.clinicID, + "ProjectID": appo.projectID, + "CancelToReschadual": isReschedule, + "EndTime": appo.endTime, + "StartTime": appo.startTime, + "DoctorID": appo.doctorID, + "IsForLiveCare": appo.isLiveCareAppointment, + "OriginalClinicID": appo.originalClinicID, + "OriginalProjectID": appo.originalProjectID, + "StrAppointmentDate": DateUtil.getDateFormatted(appo.appointmentDate!), + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + // "LanguageID": 1, + "PatientType": authUser.patientType + }; + + dynamic localRes; + + await baseAppClient.post(CANCEL_APPOINTMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future generateAppointmentQR(PatientShareResponse patientShareResponse, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + + request = { + "AppointmentNo": patientShareResponse.appointmentNo, + "ClinicID": patientShareResponse.clinicID, + "ProjectID": patientShareResponse.projectID, + "IsFollowup": patientShareResponse.isFollowup, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "LanguageID": 1, + "PatientType": authUser.patientType + }; + + dynamic localRes; + + await baseAppClient.post(GENERATE_QR_APPOINTMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future sendAppointmentQREmail(String to, String appoDate, String appoNo, String docName, String projName, String QR, String speciality, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + + request = { + "AppointmentNo": appoNo, + "AppointmentDate": appoDate, + "DoctorName": docName, + "ProjectName": projName, + "QR": QR, + "Speciality": speciality, + "To": to, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "PatientType": authUser.patientType + }; + + dynamic localRes; + + await baseAppClient.post(EMAIL_QR_APPOINTMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future checkPaymentStatus(String transactionID, bool isPharma, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + request = { + "ClientRequestID": transactionID, + "IsPharmacy": isPharma, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "LanguageID": 1, + "PatientType": authUser.patientType + }; + dynamic localRes; + await baseAppClient.post(CHECK_PAYMENT_STATUS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getTamaraPaymentStatus(String orderID) async { + hasError = false; + dynamic localRes; + await baseAppClient.get(GET_TAMARA_PAYMENT_STATUS + "$orderID", isRCService: false, isExternal: true, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + return Future.value(localRes); + } + + Future addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + request = { + "AdvanceNumber": advanceNumber, + "AdvanceNumber_VP": advanceNumber, + "PaymentReferenceNumber": paymentReference, + "AppointmentID": appointmentID, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "LanguageID": 1, + "PatientType": authUser.patientType + }; + dynamic localRes; + await baseAppClient.post(ADD_ADVANCE_NUMBER_REQUEST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future addVIDARequest(String advanceNumber, String paymentReference, dynamic apptData, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + request = { + "AdvanceNumber": advanceNumber, + "PaymentReferenceNumber": paymentReference, + "AppointmentNo": apptData.AppointmentNo, + "AcceptedBy": apptData.DoctorID, + "ServiceID": apptData.ServiceID, + "ProjectID": apptData.ProjectID, + "ClinicID": apptData.ClinicID, + "ClientRequestID": Utils.getAppointmentTransID(apptData.ProjectID, apptData.ClinicID, apptData.AppointmentNo), + "AppointmentDate": apptData.AppointmentDate, + "DeviceType": Platform.isIOS ? "iOS" : "Android", + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "PatientType": authUser.patientType, + "DeviceToken": await sharedPref.getString(PUSH_TOKEN), + "VoipToken": await sharedPref.getString(ONESIGNAL_APNS_TOKEN), + "LanguageID": 1, + "IsVoip": Platform.isIOS ? true : false + }; + + // request.DeviceToken = this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false); + // request.Latitude = this.cs.szharedService.getSharedData('userLat', false); + // request.Longitude = this.cs.sharedService.getSharedData('userLong', false); + // request.ServiceID = apptData.ServiceID; + // request.ProjectID = apptData.ProjectID; + // request.ClinicID = apptData.ClinicID; + // request.ClientRequestID = AppointmentModel.getAppointmentTransID(apptData); + // request.AppointmentDate = apptData.AppointmentDate; + // request.DeviceType = this.getDeviceType(); + // request.VoipToken = this.platform.is('ios') ? this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false) : ""; + dynamic localRes; + await baseAppClient.post(ADD_VIDA_REQUEST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future autoGenerateAncillaryOrdersInvoice(dynamic orderNo, int projectID, dynamic appointmentID, List selectedProcListAPI, int languageID, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + List procedureOrderIDs = []; + + selectedProcListAPI.forEach((element) { + procedureOrderIDs.add(element["ProcedureID"]); + }); + + request = { + "LanguageID": languageID, + "RequestAncillaryOrderInvoice": [ + {"MemberID": 102, "ProjectID": projectID, "AppointmentNo": appointmentID, "OrderNo": orderNo, "AncillaryOrderInvoiceProcList": selectedProcListAPI} + ], + "ProcedureOrderIds": procedureOrderIDs + }; + dynamic localRes; + await baseAppClient.post(GENERATE_ANCILLARY_ORDERS_INVOICE, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future isAllowedToAskDoctor(int docID, int languageID, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + request = { + "IsForAskYourDoctor": true, + "DoctorID": docID, + "Top": 25, + "beforeDays": 15, + "exludType": 4, + "LanguageID": languageID, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "PatientType": authUser.patientType + }; + + dynamic localRes; + await baseAppClient.post(IS_ALLOW_ASK_DOCTOR, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getCallRequestType(int languageID, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + request = { + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "LanguageID": languageID, + "PatientType": authUser.patientType + }; + + dynamic localRes; + await baseAppClient.post(GET_CALL_REQUEST_TYPE, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future sendAskDocCallRequest(AppoitmentAllHistoryResultList appo, String requestType, int languageID, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + + request = { + "ProjectID": appo.projectID, + "SetupID": appo.setupID, + "DoctorID": appo.doctorID, + "ClinicID": appo.clinicID, + "RequestType": requestType, + "RequestTypeID": requestType, + "PatientMobileNumber": authUser.mobileNumber, + "IsMessageSent": false, + "RequestDate": DateUtil.getYearMonthDayHourMinSecDateFormatted(DateTime.now()).split(" ")[0], + "RequestTime": DateUtil.getYearMonthDayHourMinSecDateFormatted(DateTime.now()).split(" ")[1], + "Remarks": "", + "Status": 1, + "CreatedBy": 102, + "CreatedOn": DateUtil.getYearMonthDayHourMinSecDateFormatted(DateTime.now()).split(" ")[0], + "EditedBy": 102, + "EditedOn": DateUtil.getYearMonthDayHourMinSecDateFormatted(DateTime.now()).split(" ")[0], + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "LanguageID": languageID, + "PatientType": authUser.patientType + }; + + dynamic localRes; + await baseAppClient.post(SEND_CALL_REQUEST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getPatientRadOrders(String appoNo, int projectID, int languageID, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + request = { + "AppointmentNo": appoNo, + "ProjectID": projectID, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "LanguageID": languageID, + "PatientType": authUser.patientType + }; + + dynamic localRes; + await baseAppClient.post(GET_PATIENT_ORDERS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getPatientLabOrdersByAppoNo(dynamic appoNo, dynamic projID, dynamic clinicID, int languageID, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + request = { + "AppointmentNo": appoNo, + "ProjectID": projID, + "ClinicID": clinicID, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "LanguageID": languageID, + "PatientType": authUser.patientType + }; + + dynamic localRes; + await baseAppClient.post(GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getPatientPrescriptionReports(AppoitmentAllHistoryResultList appo, int languageID, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + request = { + "AppointmentNo": appo.appointmentNo, + "ClinicID": appo.clinicID, + "ProjectID": appo.projectID, + "EpisodeID": appo.episodeID, + "VersionID": req.VersionID, + "SetupID": appo.setupID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "LanguageID": languageID, + "PatientType": authUser.patientType + }; + + dynamic localRes; + await baseAppClient.post(GET_PRESCRIPTION_REPORT_ENH, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future sendPrescriptionEmail(String appoDate, String setupId, int languageID, dynamic prescriptionReportEnhList, bool isDownload, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + request = { + "AppointmentDate": appoDate, + "DateofBirth": authUser.dateofBirth, + "ListPrescriptions": prescriptionReportEnhList, + "PatientIditificationNum": authUser.patientIdentificationNo, + "PatientMobileNumber": authUser.mobileNumber, + "PatientName": authUser.firstName! + " " + authUser.lastName!, + "To": authUser.emailAddress, + "SetupID": setupId, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "LanguageID": authUser.patientType, + "PatientType": authUser.patientType, + "IsDownload": isDownload, + + }; + + dynamic localRes; + await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future createAdvancePayment(AppoitmentAllHistoryResultList appo, String projectID, double payedAmount, String paymentReference, String paymentMethodName, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + request = { + "ProjectID": projectID, + "OnlineCheckInAppointment": { + "AppointmentNo": appo != null ? appo.appointmentNo.toString() : "0", + "PaymentMethodName": paymentMethodName, + "PaymentAmount": payedAmount == 0 ? "0" : payedAmount.toString(), + "PaymentDate": payedAmount == 0 ? "" : "/Date(" + DateTime.now().millisecondsSinceEpoch.toString() + ")/", + "PaymentReferenceNumber": payedAmount == 0 ? "" : paymentReference, + "ProjectID": appo != null ? appo.projectID.toString() : projectID, + "PatientID": authUser.patientID, + "ClinicID": appo != null ? appo.clinicID : "0", + "UserID": authUser.patientID, + "Status": authUser.patientType + }, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "LanguageID": 1, + "PatientType": authUser.patientType + }; + dynamic localRes; + await baseAppClient.post(CREATE_ADVANCE_PAYMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future HIS_createAdvancePayment(AppoitmentAllHistoryResultList appo, String projectID, double payedAmount, String paymentReference, String paymentMethodName, dynamic patientType, + String patientName, dynamic patientID, BuildContext context, + {bool isAncillaryOrder = false, int clinicID = 0}) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + + request = { + "CustName": patientName, + "CustID": patientID, + "SetupID": "010266", + "ProjectID": projectID, + "PatientID": patientID, + "AccountID": patientID, + "PaymentAmount": payedAmount, + "NationalityID": null, + "DepositorName": authUser.firstName! + " " + authUser.lastName!, + "CreatedBy": 3, + "PaymentMethodName": paymentMethodName, + "PaymentReference": paymentReference, + "PaymentMethod": paymentMethodName, + "VersionID": req.VersionID, + "Channel": req.Channel, + "LanguageID": 1, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "PatientTypeID": patientType, + "IsAncillaryOrder": isAncillaryOrder, + // "AncillaryProcedureList": ancillaryOrdersProcedureList, + "PatientType": patientType + }; + dynamic localRes; + await baseAppClient.post(HIS_CREATE_ADVANCE_PAYMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future ER_createAdvancePayment(AppoitmentAllHistoryResultList appo, String projectID, double payedAmount, String paymentReference, String paymentMethodName, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + + request = { + // "VersionID": req.VersionID, + // "Channel": req.Channel, + // "IPAdress": req.IPAdress, + // "generalid": req.generalid, + // "PatientOutSA": authUser.outSA, + // "PatientTypeID": authUser.patientType, + "LanguageID": 1, + "ERAdvanceAmount": { + "ProjectId": projectID, + "PatientId": authUser.patientID, + "ClinicId": 10, + "DepositorName": authUser.firstName! + " " + authUser.lastName!, + "MemberId": authUser.patientID, + "NationalityID": authUser.nationalityID, + "PaymentAmount": payedAmount, + "PaymentDate": DateUtil.convertDateToString(DateTime.now()), + "PaymentMethodName": paymentMethodName, + "PaymentReferenceNumber": paymentReference, + "SourceType": 2 + } + }; + dynamic localRes; + await baseAppClient.post(ER_CREATE_ADVANCE_PAYMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future ER_InsertEROnlinePaymentDetails( + AppoitmentAllHistoryResultList appo, String projectID, double payedAmount, String paymentReference, String paymentMethodName, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + + request = { + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "PatientTypeID": authUser.patientType, + "LanguageID": 1, + "EROnlineCheckinPaymentDetails": { + "CheckinDate": DateUtil.convertDateToString(DateTime.now()), + "ExpectedArrivalTime": DateUtil.convertDateToString(DateTime.now()), + "ProjectId": projectID, + "PatientId": authUser.patientID, + "ClinicId": 10, + "FormId": 15, + "DepositorName": authUser.firstName! + " " + authUser.lastName!, + "MemberId": authUser.patientID, + "NationalityID": authUser.nationalityID, + "PaymentAmount": payedAmount, + "PaymentDate": DateUtil.convertDateToString(DateTime.now()), + "PaymentMethodName": paymentMethodName, + "PaymentReferenceNumber": paymentReference, + "TriageScore": await sharedPref.getInt(ER_CHECKIN_RISK_SCORE) + } + }; + dynamic localRes; + await baseAppClient.post(ER_INSERT_ADVANCE_PAYMENT, onSuccess: (response, statusCode) async { + localRes = response; + sharedPref.remove(ER_CHECKIN_RISK_SCORE); + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getPatientHealthDataStats(int medCategoryId, int medCategoryStsId, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + request = { + "MedCategoryID": medCategoryId, + "MedGetStsID": medCategoryStsId, + "VersionID": req.VersionID, + "Channel": req.Channel, + "IPAdress": req.IPAdress, + "generalid": req.generalid, + "PatientOutSA": authUser.outSA, + "SessionID": "YckwoXhUmWBsnHKEKig", + "isDentalAllowedBackend": false, + "DeviceTypeID": req.DeviceTypeID, + "PatientID": authUser.patientID, + "PatientTypeID": authUser.patientType, + "PatientType": authUser.patientType + }; + dynamic localRes; + await baseAppClient.post(GET_PATIENT_HEALTH_STATS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future sendCheckinNfcRequest(int appointmentNo, String nfcCode, int projectId, int checkInBy, int clinicID, BuildContext context) async { + Map request; + + request = {"AppointmentNo": appointmentNo, "NFC_Code": nfcCode, "ProjectID": projectId, "ClinicID": clinicID, "CheckinBy": checkInBy}; + dynamic localRes; + await baseAppClient.post(SEND_CHECK_IN_NFC_REQUEST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future checkScannedNFCAndQRCode(String nfcCode, int projectId) async { + Map request; + + request = {"NFC_Code": nfcCode, "ProjectID": projectId}; + dynamic localRes; + await baseAppClient.post(CHECK_SCANNED_NFC_QR_CODE, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future checkIfHasDentalPlan(int projectID, BuildContext context) async { + Map request; + + request = { + "ProjectID": projectID, + "LanguageID": 1, + }; + dynamic localRes; + await baseAppClient.post(HAS_DENTAL_PLAN, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getTamaraPaymentDetails(BuildContext context) async { + dynamic localRes; + await baseAppClient.get(GET_TAMARA_PLAN, isExternal: true, onSuccess: (response, statusCode) async { + localRes = response[0]; + }, onFailure: (String error, int statusCode) { + throw error; + }); + return localRes; + } + + Future callPayfortApplePayAPI(ApplePayRequest applePayRequest, BuildContext context) async { + Map request; + + request = { + "currency": applePayRequest.currency, + "language": applePayRequest.language, + "customername": applePayRequest.customername, + "customer_email": applePayRequest.customerEmail, + "orderdescription": applePayRequest.orderdescription, + "live_serviceid": applePayRequest.liveServiceid, + "longitude": applePayRequest.longitude, + "latitude": applePayRequest.latitude, + "devicetoken": applePayRequest.devicetoken, + "clientrequestid": applePayRequest.clientrequestid, + "projectid": applePayRequest.projectid, + "serviceid": applePayRequest.serviceid, + "patientid": applePayRequest.patientid, + "Amount": applePayRequest.amount, + "apple_data": applePayRequest.appleData, + "apple_signature": applePayRequest.appleSignature, + "apple_header": { + "apple_applicationData": "76a9a9cb2d9811e8de56d8e7713601bfa6acda3d488b1cf03b9b115bc3ff12b4", + "apple_ephemeralPublicKey": applePayRequest.appleHeader!.appleEphemeralPublicKey!, + "apple_publicKeyHash": applePayRequest.appleHeader!.applePublicKeyHash!, + "apple_transactionId": applePayRequest.appleHeader!.appleTransactionId + }, + "apple_paymentMethod": { + "apple_displayName": applePayRequest.applePaymentMethod!.appleDisplayName, + "apple_network": applePayRequest.applePaymentMethod!.appleNetwork, + "apple_type": applePayRequest.applePaymentMethod!.appleType + } + }; + dynamic localRes; + await baseAppClient.post(MyInAppBrowser.APPLE_PAY_PAYFORT_URL, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isExternal: true); + return Future.value(localRes); + } + + Future getLaserBodyPartsList(int laserCategoryID, int projectID, int languageID) async { + Map request; + + request = { + "LaserCategoryID": laserCategoryID, + "ProjectID": projectID, + "LanguageID": languageID, + }; + dynamic localRes; + await baseAppClient.post(LASER_BODY_PARTS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future insertCovidQuestionnaire(List qa, int projectID, int testTypeEnum, int languageID, int testProcedureEnum) async { + Map request; + + request = { + "ProjectID": projectID, + "LanguageID": languageID, + "IsForTravel": qa[0]['ans'].toString(), + "IsComingOutSA": qa[1]['ans'].toString(), + "IsFeverCurrently": qa[2]['ans'].toString(), + "IsFeverLast2Week": qa[3]['ans'].toString(), + "IsSorethroat": qa[4]['ans'].toString(), + "IsRunnyNose": qa[5]['ans'].toString(), + "IsCough": qa[6]['ans'].toString(), + "IsShortnessBreath": qa[7]['ans'].toString(), + "IsNausea": qa[8]['ans'].toString(), + "IsVomiting": qa[9]['ans'].toString(), + "IsHeadache": qa[10]['ans'].toString(), + "IsMusclePain": qa[11]['ans'].toString(), + "IsJoinPain": qa[12]['ans'].toString(), + "IsDiarrhea": qa[13]['ans'].toString(), + "TestTypeEnum": testTypeEnum, + "TestProcedureEnum": testProcedureEnum + }; + + dynamic localRes; + await baseAppClient.post(INSERT_COVID_QUESTIONNAIRE, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future updateCovidQuestionnaire(String appoNo, int projectID, int testTypeEnum, int testProcedureEnum) async { + Map request; + + request = {"AppointmentNo": appoNo, "ProjectID": projectID, "TestTypeEnum": testTypeEnum, "TestProcedureEnum": testProcedureEnum}; + + dynamic localRes; + await baseAppClient.post(UPDATE_COVID_QUESTIONNAIRE, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + + Future updateObGyneAppointment(int episodeID, int appointmentNo, int orderNo, String procedureId, int lineItemNo, int uniqueRowID, int languageID) async { + Map request; + + request = { + "EpisodeID": episodeID, + "LanguageID": languageID, + "AppointmentNo": appointmentNo, + "OrderNo": orderNo, + "ProcedureId": procedureId, + "ProcedureAppointmentNo": appointmentNo, + "LineItemNo": lineItemNo, + "UniqueRowID": uniqueRowID + }; + + dynamic localRes; + await baseAppClient.post(OBGYNE_PROCEDURE_UPDATE, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + + Future getRRTProcedures(int projectID, int languageID) async { + Map request; + + request = {"ProjectID": projectID, "LanguageID": languageID}; + + dynamic localRes; + await baseAppClient.post(GET_RRT_PROCEDURE_LIST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + + Future updateTamaraRequestStatus(String responseMessage, String status, String clientRequestID, String tamaraOrderID, num selectedInstallments) async { + Map request = { + "Response_Message": responseMessage, + "ClientRequestID": clientRequestID, + "Status": status, + "FortID": tamaraOrderID, // Tamara order ID + "LanguageID": 1, + "Installments_Number": selectedInstallments + }; + + dynamic localRes; + await baseAppClient.post(UPDATE_TAMARA_STATUS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + + return Future.value(localRes); + } + + Future markAppointmentForTamara(int projectID, String appoNo) async { + Map request; + request = {"ProjectID": projectID, "AppointmentNo": appoNo, "LanguageID": 1}; + dynamic localRes; + await baseAppClient.post(MARK_APPOINTMENT_TAMARA_STATUS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + + Future autoGenerateInvoiceTamara(int projectID, String appoNo, String mobileNo) async { + Map request; + request = {"ProjectID": projectID, "AppointmentNo": appoNo, "MobileNo": mobileNo, "UserID": 102, "LanguageID": 1}; + dynamic localRes; + await baseAppClient.post(AUTO_GENERATE_INVOICE_TAMARA, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + + Future autoGenerateInvoiceERClinic(int? projectID, int? paymentMethod, String? paymentReferenceNo, num? amount, String? cardType, String? cardNumber, String? orderID, String? rrn, bool isAdvanceAvailable) async { + Map request; + request = { + "ProjectID": projectID, + "ClinicID": "10", + // "PaymentMethod": paymentMethod, + "PaymentMethod": "VISA", + "PaymentReferenceNo": paymentReferenceNo, + "PaymentAmount": amount, + "CardType": cardType, + "CardNumber": cardNumber, + "OrderId": orderID, + "MemberID": 102, + "RRN": rrn, + "IsAdvanceAvailable": isAdvanceAvailable + }; + dynamic localRes; + await baseAppClient.post(AUTO_GENERATE_INVOICE_ER, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + + Future checkPatientNphiesEligibility(int projectID) async { + Map request; + request = {"ProjectID": projectID, "LanguageID": 1}; + dynamic localRes; + await baseAppClient.post(CHECK_PATIENT_NPHIES_ELIGIBILITY, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + + Future convertPatientToCash(int projectID) async { + Map request; + request = {"ProjectID": projectID, "LanguageID": 1}; + dynamic localRes; + await baseAppClient.post(CONVERT_PATIENT_TO_CASH, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } + + Future getAncillaryOrders() async { + Map body = Map(); + + hasError = false; + dynamic localRes; + await baseAppClient.post(GET_ANCILLARY_ORDERS, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + + return Future.value(localRes); + } + + Future getPayfortSDKTokenForPayment(String deviceID, String signatureValue, {bool isTest = true}) async { + Map request; + request = {"service_command": "SDK_TOKEN", "access_code": "BsM6He4FMBaZ86W64kjZ", "merchant_identifier": "ipxnRXXq", "language": "en", "device_id": deviceID, "signature": signatureValue}; + dynamic localRes; + await baseAppClient.post(isTest ? PAYFORT_TEST_URL : PAYFORT_PROD_URL, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isExternal: true, isAllowAny: true); + + return Future.value(localRes); + } + + Future logDoctorFreeSlots(int docID, int clinicID, int projectID, List selectedfreeSlots, dynamic appoNumber, BuildContext context, [ProjectViewModel? projectViewModel]) async { + Map requestFreeSlots; + Map request; + + Request req = appGlobal.getPublicRequest(); + requestFreeSlots = { + "DoctorID": docID, + "IsBookingForLiveCare": 0, + "ClinicID": clinicID, + "ProjectID": projectID, + "OriginalClinicID": clinicID, + "days": 0, + "isReschadual": false, + "VersionID": req.VersionID, + "Channel": 3, + "IPAdress": "10.20.10.20", + "generalid": "Cs2020@2016\$2958", + "PatientOutSA": authProvider.isLogin ? authUser.outSA : 0, + "SessionID": null, + "isDentalAllowedBackend": false, + "LanguageID": 1, + "DeviceTypeID": 1 + }; + + request = {"ClinicID": clinicID, "ProjectID": projectID, "AppointmentNo": appoNumber, "DoctorFreeSlotRequest": requestFreeSlots, "DoctorFreeSlotResponse": selectedfreeSlots, "Value1": docID}; + dynamic localRes; + await baseAppClient.post(INSERT_FREE_SLOTS_LOGS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(localRes); + } +} diff --git a/lib/services/appointment_services/doctor_response_mapper.dart b/lib/services/appointment_services/doctor_response_mapper.dart new file mode 100644 index 00000000..6062fd5b --- /dev/null +++ b/lib/services/appointment_services/doctor_response_mapper.dart @@ -0,0 +1,211 @@ +import 'dart:math'; + +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; + +class DoctorMapper{ + static Future getMappedDoctor(List doctorList, + {bool isArabic = false}) async { + RegionList regionList = RegionList(); + AppSharedPreferences sharedPref = AppSharedPreferences(); + + for (var element in doctorList) { + String? region = element.getRegionName(isArabic); + if (region == null) continue; + + var regionDoctorList = regionList.registeredDoctorMap?.putIfAbsent(region, () => PatientDoctorAppointmentListByRegion()); + + List? targetList = element.isHMC == true + ? regionDoctorList?.hmcDoctorList + : regionDoctorList?.hmgDoctorList; + + var doctorByHospital = targetList + ?.where((clinic) => + clinic.filterName == + element.getProjectCompleteNameWithLocale(isArabic: isArabic)) + .toList() ?? + []; + + if (doctorByHospital.isNotEmpty) { + doctorByHospital.first.patientDoctorAppointmentList?.add(element); + } else { + var newAppointment = PatientDoctorAppointmentList( + filterName: + element.getProjectCompleteNameWithLocale(isArabic: isArabic), + distanceInKMs: element.projectDistanceInKiloMeters.toString(), + projectTopName: element.projectTopName, + projectBottomName: element.projectBottomName, + patientDoctorAppointment: element, + ); + if(element.projectDistanceInKiloMeters!= null ){ + if(regionDoctorList!.distance>element.projectDistanceInKiloMeters){ + regionDoctorList!.distance = element.projectDistanceInKiloMeters; + } + if (element.isHMC == true && + element.projectDistanceInKiloMeters < + regionDoctorList.hmcDistance) + regionDoctorList.hmcDistance = element.projectDistanceInKiloMeters; + else if (element.projectDistanceInKiloMeters < + regionDoctorList.hmgDistance) + regionDoctorList.hmgDistance = element.projectDistanceInKiloMeters; + }else + if (await sharedPref.getDouble(USER_LAT) != null && await sharedPref.getDouble(USER_LONG) != null && element.latitude != null && element.longitude != null) { + var lat = await sharedPref.getDouble(USER_LAT); + var long = await sharedPref.getDouble(USER_LONG); + + double distance = calculateDistance(lat, long, double.parse(element.latitude!), double.parse(element.longitude!)); + if(distance<0){ + distance *= -1; + } + if(regionDoctorList!.distance>distance){ + regionDoctorList!.distance = distance; + } + if (element.isHMC == true && + element.projectDistanceInKiloMeters < + regionDoctorList.hmcDistance) + regionDoctorList.hmcDistance = element.projectDistanceInKiloMeters; + else if (element.projectDistanceInKiloMeters < + regionDoctorList.hmgDistance) + regionDoctorList.hmgDistance = element.projectDistanceInKiloMeters; + print("the distance is $distance"); + } + targetList?.add(newAppointment); + } + + + + + regionDoctorList?.hmcSize = regionDoctorList.hmcDoctorList?.length ?? 0; + regionDoctorList?.hmgSize = regionDoctorList.hmgDoctorList?.length ?? 0; + + regionList.registeredDoctorMap?[region] = regionDoctorList; + } + + return regionList; + } + static double calculateDistance(double lat1, double lon1, double lat2, double lon2) { + var pi = 3.142; + const double R = 6371; + double dLat = (lat2 - lat1) * pi / 180; + double dLon = (lon2 - lon1) * pi / 180; + double a = sin(dLat / 2) * sin(dLat / 2) + + cos(lat1 * pi / 180) * cos(lat2 * pi / 180) * sin(dLon / 2) * sin(dLon / 2); + double c = 2 * atan2(sqrt(a), sqrt(1 - a)); + return R * c; + } + + static Future sortList(bool isGPSEnabled, RegionList unsorted, ) async { + if(isGPSEnabled){ + if(unsorted.registeredDoctorMap == null) return unsorted; + var sortedMap = Map.fromEntries( + unsorted.registeredDoctorMap!.entries.toList() + ..sort((a, b) => a.value!.distance.compareTo(b.value!.distance)), + ); + + unsorted.registeredDoctorMap = sortedMap; + return unsorted; + + } + + List? keys = unsorted.registeredDoctorMap?.keys.toList(); + keys?.sort(); + + if (keys == null) return unsorted; + Map sortedMap = {}; + for (var key in keys) { + sortedMap[key] = unsorted.registeredDoctorMap![key]!; + } + unsorted.registeredDoctorMap = sortedMap; + return unsorted; + } + + static Future getMappedHospitals( + List hospitalList, { + bool isArabic = false, + }) async { + final regionList = RegionList(); + final sharedPref = AppSharedPreferences(); + + for (final hospital in hospitalList) { + final region = hospital.getRegionName(isArabic); + if (region == null) continue; + + final regionData = regionList.registeredDoctorMap?.putIfAbsent( + region, + () => PatientDoctorAppointmentListByRegion(), + ); + + List? targetList = hospital.isHMC == true + ? regionData?.hmcDoctorList + : regionData?.hmgDoctorList; + + List existingEntry = targetList + ?.where( + (entry) => entry.filterName == hospital.getName(isArabic), + ) + .toList() ?? + []; + + if (existingEntry.isNotEmpty) { + existingEntry.first.hospitalList.add(hospital); + } else { + final newEntry = PatientDoctorAppointmentList( + filterName: hospital.name, + distanceInKMs: hospital.distanceInKilometers?.toString(), + projectTopName: hospital.name, + projectBottomName: hospital.name, + model: hospital); + + final distance = hospital.distanceInKilometers; + + if (distance != null) { + if (regionData!.distance > distance) { + regionData.distance = distance; + } + + if (hospital.isHMC == true && distance < regionData.hmcDistance) { + regionData.hmcDistance = distance; + } else if (distance < regionData.hmgDistance) { + regionData.hmgDistance = distance; + } + } else if (await sharedPref.getDouble(USER_LAT) != null && + await sharedPref.getDouble(USER_LONG) != null && + hospital.latitude != null && + hospital.longitude != null) { + final lat = await sharedPref.getDouble(USER_LAT); + final long = await sharedPref.getDouble(USER_LONG); + + double calculatedDistance = calculateDistance( + lat, + long, + double.parse(hospital.latitude!), + double.parse(hospital.longitude!), + ).abs(); + + if (regionData!.distance > calculatedDistance) { + regionData.distance = calculatedDistance; + } + + if (hospital.isHMC == true && + calculatedDistance < regionData.hmcDistance) { + regionData.hmcDistance = calculatedDistance; + } else if (calculatedDistance < regionData.hmgDistance) { + regionData.hmgDistance = calculatedDistance; + } + + print("Calculated distance: $calculatedDistance"); + } + + targetList?.add(newEntry); + } + + regionData?.hmcSize = regionData.hmcDoctorList?.length ?? 0; + regionData?.hmgSize = regionData.hmgDoctorList?.length ?? 0; + regionList.registeredDoctorMap?[region] = regionData; + } + + return regionList; + } +} \ No newline at end of file diff --git a/lib/services/appointment_services/mock_doctor_response.dart b/lib/services/appointment_services/mock_doctor_response.dart new file mode 100644 index 00000000..3f30ee30 --- /dev/null +++ b/lib/services/appointment_services/mock_doctor_response.dart @@ -0,0 +1,8029 @@ +var response = { + "Date": null, + "LanguageID": 0, + "ServiceName": 0, + "Time": null, + "AndroidLink": null, + "AuthenticationTokenID": null, + "Data": null, + "Dataw": false, + "DietType": 0, + "DietTypeID": 0, + "ErrorCode": null, + "ErrorEndUserMessage": null, + "ErrorEndUserMessageN": null, + "ErrorMessage": null, + "ErrorStatusCode": 0, + "ErrorType": 0, + "FoodCategory": 0, + "IOSLink": null, + "IsAuthenticated": true, + "MealOrderStatus": 0, + "MealType": 0, + "MessageStatus": 1, + "NumberOfResultRecords": 0, + "PatientBlodType": null, + "SuccessMsg": null, + "SuccessMsgN": null, + "VidaUpdatedResponse": null, + "AgeError": false, + "AllowedBooking": false, + "AncillaryOrderInvoiceList": null, + "AncillaryOrderList": null, + "AncillaryOrderListCount": 0, + "AncillaryOrderProcList": null, + "AppoimentAllHistoryResultList": null, + "AppoimentAllResultList": null, + "AppointmentActiveNumber": 0, + "AppointmentNo": null, + "AppointmentQR": null, + "AppointmentStats": null, + "AvgDoctorRatingList": null, + "BloodBank_Appointment_GetList": null, + "COVID19_AppointmentResponse": null, + "COVID19_FreeTimeSlots": null, + "COVID19_InvoiceResponse": null, + "COVID19_PatientShare": null, + "COVID19_TestProceduresList": null, + "ClinicCategoryList": null, + "ClinicInsertedID": 0, + "ClinicsHaveScheduleList": null, + "ContinueBookAppointment": false, + "DAPP_TemplateGetList": null, + "DecimalDoctorRate": 0, + "DentalProcedure": "", + "DentalProcedureName": "", + "DiseasesByClinicList": null, + "DoctorBasicScheduleList": null, + "DoctorByClinicIDList": null, + "DoctorByDiseaseList": null, + "DoctorCalenderList": null, + "DoctorImage_GenerateImageURLList": null, + "DoctorImage_ProjectFolderConfig_List": null, + "DoctorInformationAsHTML": null, + "DoctorInformationRAW": null, + "DoctorList": [ + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 5018, + "Name": "RUBEENA QUADRI", + "ProjectID": 12, + "ProjectName": "Olaya Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.86, + "DoctorAvailability": null, + "DoctorID": 5018, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/OALAY/5018.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.70441742217276", + "Longitude": "46.67674567554396", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/USA.png", + "NationalityID": "USA", + "NationalityName": "American", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 11444, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Olaya", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioClhnO0jjnJHFAHQUV5//AMLT/wCpC8c/+Cf/AOzrY8OePdH8R6dJeYn0vZqB03ydTCQSNcAA+WF3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+jR3ng7Tks/Dmm/bPtWLfUZoIDJqzRsAJbmxZMZtDtUxSNxvPNAHH6n4ovNd8ZazFqd94r/wCPueXRbCGU+Zb3nmHyFaNidm3JUhPmB4FegaZ40vNC8ZaNrmueGfFf/IvwaGzzWB8y4vPMDnaXYb92DjncT2rm/EWseFY9Z0DxJYaH4ntp9I1O3t9QnvLSJFnaJjJIZGBy10xwTuIzg5xWxrHxA03WbfR7jS7HxdfQL4tg1BpL2FZVDYJ+ywFWIzgjbH7nmgDs4/C//CU+IdP8aeHLHVfDF9DqEcWo2t9F9i+2W4fzZWKICZGcsoyzYbaQema9Yryew0DWPEeo23iPSNX8ZaXs1tZbzTNfuXgja3BDusUSg5XkKoJxgMD0r1igAooooAK8/wDixHef2d4avLPTb7UPsHiC1vJobGAyyeWgcsQo/Ac4GSOa9AooA+eP7I8N/wDCZf8ACUf8Ih8Tvt39of2h5f8AZsfl+Z5nmYxjO3PbOcd6kn8Nal4n8Ky29xoms2kGqePTdSRyWrRzxWsqYMhBBCgBvvcqCO9fQdFAHJ+H/CEPhjWYE0vTNGh0uLTFt2u1twt/LMGHLuqhWQqoJ7lua4vw94N/5HrV9Xh1z/kK6hJZ2US/RkurZGX/AI+OoSQH2FewUUAfOnifw/4q1PwrYeFHt/EGoz6hrEepWt9fJLMtpayIY0iuZMZjlQnc6gFRkkGt+9ufFXhLRtN0S48MSX2qLbxWEmr6BYSytFpm0oVSY4YXAZd4GNgypxXtlFAHzZPouvahby6X4f8ADustpdlcHxFcN4rsnM97dINrQjYNsgdSvykBmO75q6/w1ouvazrOka3YeHdN0bS7dIY9Q0jU7J7dRdKweS6toQCu/aQiSMd3BB6V7JRQB4/4q1XWNU+Iei/2RYeObP7LqsFrefuXj02a3WVt8nyk7s5HzHgoOa9goooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "91877 ", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية " + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 14315, + "Name": "ALAA FARIZ ISMAIL ", + "ProjectID": 12, + "ProjectName": "Olaya Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.83, + "DoctorAvailability": null, + "DoctorID": 14315, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/OALAY/14315.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.70441742217276", + "Longitude": "46.67674567554396", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/JOR.png", + "NationalityID": "JOR", + "NationalityName": "Jordanian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 8962, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Olaya", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAA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HiC1vJobGAyyeWgcsQo/Ac4GSOa9AooA+eP7I8N/8Jl/wlH/AAiHxO+3f2h/aHl/2bH5fmeZ5mMYztz2znHetjT9b8YeHPBuu6vofha+e+1LxXcTrZX2nzGRbeSMMHKIQRyAM5IzkV7fRQB4Z4Y0nxVHcX/ia10+7XS71JH17QdYhlDTzORJcG0twNrBl+SMuSTyrUT/AAi1LxPrMviAQab4dgFkX0e30xGtJ4pt2+A3K7CFcBsOUOQVGOle50UAeIaz8PPHn/CrHs7zW/7Q1uw1U6rDMt3PLJ5aQEKkTFd3mb8lQMDJ65rDHgrUpPFWiJrM/jy5g1fQoIry7gdnaCaV/nhldlwsCjJZDkjOTmvouigDy+T4aWel6dqFneW39uaJHpUiwzXMYudWhkAwsVuxUKsYQEoo5DsexryDwjZeJPB3jK6vLPwRrl5ol1vs5ob7SpJJGs2kUsCowpkKKBz8uSeMV9X0UAeJ/D/xb4q0/wAVXml3/hTxAvh29vXOntJp0oayV3VY0OTsjgRAeFB29uK9soooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "91877 ", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية " + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 12565, + "Name": "SAMER YOUSEF ABUALRUB", + "ProjectID": 12, + "ProjectName": "Olaya Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.86, + "DoctorAvailability": null, + "DoctorID": 12565, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.70441742217276", + "Longitude": "46.67674567554396", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/JOR.png", + "NationalityID": "JOR", + "NationalityName": "Jordanian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 4655, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Olaya", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERU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h+C9C1yz0S18qxuUurSSOyvpFkKPNOIhtkjdNm5yMsoPGMV9H0UAeN3Ok/EHRrjw7bpp/h+x0ttdtnuo/C8NxExXOHMowF8raPmJ9FzXslFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "91877 ", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية " + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 281722, + "Name": "MUSHIRA ENANI", + "ProjectID": 12, + "ProjectName": "Olaya Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.95, + "DoctorAvailability": null, + "DoctorID": 281722, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.70441742217276", + "Longitude": "46.67674567554396", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1639, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 0.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Olaya", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQg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jtj3glckDdjjNbnxMOg+GLfwLf2+v3d3BpdxYGPTo7xJFltYg5FwIxgM5C7fM4U5xxWPe+NdB8a3Gm6XYQeIL6BfEcWs6g2roksFra5KyLwxCQKGHDDaATk0Adn8J9CvLHxD4l1GLStKt9En1C6+w3K25S5kjZ0aPymxtNsUGV28E9OK9Yrh/A+q+JNU1HUfPsNKs/C1rLLa6X9nhkjkmjUr5UiZJRoTGeGXgkccV3FABRRRQAV5/8AFiO8/s7w1eWem32ofYPEFreTQ2MBlk8tA5YhR+A5wMkc16BRQB88f2R4b/4TL/hKP+EQ+J327+0P7Q8v+zY/L8zzPMxjGdue2c471qWw8VSeBfEVvpegXcE/ibxRcwtHqVnKrQWtzFjzWC8qFOMt8yjnrXudFAHgg8Ha9oHirRPD9xrPjybS5dMgSS40i6doLa6L7CNxUKkCqM4xuAxWvrXhCbwxo2vao+mXeo6pqFlcaJaro9uZmlhkUslzd/KGacsv7yQEg5GBXslFAHhj+BfFUfwjtLjS7PTdF8RW6JM0mlRS293ParBnyZCq72nZ8ZX7pYDuKxx4K1KTxVoiazP48uYNX0KCK8u4HZ2gmlf54ZXZcLAoyWQ5Izk5r6LooA8vk+GlnpenahZ3lt/bmiR6VIsM1zGLnVoZAMLFbsVCrGEBKKOQ7Hsa8g8I2XiTwd4yuryz8Ea5eaJdb7OaG+0qSSRrNpFLAqMKZCigc/LknjFfV9FAHifw/wDFvirT/FV5pd/4U8QL4dvb1zp7SadKGsld1WNDk7I4EQHhQdvbivbKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "91877 ", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية " + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 360282, + "Name": "MAHA IBRAHIM ALDESSOUGI", + "ProjectID": 12, + "ProjectName": "Olaya Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.86, + "DoctorAvailability": null, + "DoctorID": 360282, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.70441742217276", + "Longitude": "46.67674567554396", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SCT.png", + "NationalityID": "SCT", + "NationalityName": "Scottish", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1102, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 0.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Olaya", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNk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igDzPwoNN1/xULi40DxdDPFoX9lySa/ZqsFzCHUneTkvKxPPYjdxWxqXhTUpPFS39kNNbS7LR/J03TrrcYIL9HJimEYG1Qq4XcuGAyBXaUUAeX+MtK+I+qfDyb/T7Gz1u1uzdf8AEkmuI/Ot1ib92vBZpC54XocL3rhB4K1KTxVoiazP48uYNX0KCK8u4HZ2gmlf54ZXZcLAoyWQ5Izk5r6LooA8vk+GlnpenahZ3lt/bmiR6VIsM1zGLnVoZAMLFbsVCrGEBKKOQ7Hsa8g8I2XiTwd4yuryz8Ea5eaJdb7OaG+0qSSRrNpFLAqMKZCigc/LknjFfV9FAHifw/8AFvirT/FV5pd/4U8QL4dvb1zp7SadKGsld1WNDk7I4EQHhQdvbivbKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "91877 ", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية " + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 12108, + "Name": "RITA NADER", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.86, + "DoctorAvailability": null, + "DoctorID": 12108, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/TAKHSUSI/12108.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/LBN.png", + "NationalityID": "LBN", + "NationalityName": "Lebanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 27060, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+ii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Hjj2yFl+1sRkSAkmTHQV7BRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 170987, + "Name": "SAADIA PARVEEN MALIK", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.74, + "DoctorAvailability": null, + "DoctorID": 170987, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/GBR.png", + "NationalityID": "GBR", + "NationalityName": "British", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 18514, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2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ySiqT8gwQCDzQB19hoHnajbWer6vqqaJputrLZza/c4vbrUYyAixMw2vbMmSoGHLbscV6xXiE2n3k3xk0jQ/F/iHZY6baQ3mkIl6R9qkjuNkJmEgw9ww3btgBPY9a9voAKKKKACvP/ixHef2d4avLPTb7UPsHiC1vJobGAyyeWgcsQo/Ac4GSOa9AooA+eP7I8N/8Jl/wlH/AAiHxO+3f2h/aHl/2bH5fmeZ5mMYztz2znHetvQ4tSk0a5e48GyXMGr+OGlktNX0xnaC1lUZm2HhSo438qMkc17ZRQB5HL4amkt/FdxZaJI0Flb3iabJqFqTfwXSDMQsiBhbVRjyguGDZxWBpPws1KPwLY6prNhaX2qLrEet3iyQtLdz2vlBntjuTc0rNn92TtLHk173RQB4vf8Ahmz/AOEyudX07wLB9h/4Q9rq3srjSB5f2zzCyxuijHnYwCoO7HFQWvjbWL7wbPp3iP4W31xfQbv7OtofD7vZR7Y9sW5XbIwSwO3ovSvb6KAPmzxF4a+INrb6B4mt9E02GCK4t7qPQdEtbhVSYAyCSa3AwHA+Rmzn7q10l0154x8Gwa5408J65Z63a6qsVs/h7TjHerGse9GzLlhGHZ+QcbgvfNe30UAeP6voWj33jLwXqN5pXjm4voLSx8m5Fujxx7ZCy/a2IyJASTJjoK9goooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Consultant Internal Medicine", + "Rheumatology Consultant" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "استشاري علاج أمراض الروماتيزم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 122495, + "Name": "FADI MOURAD ", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.82, + "DoctorAvailability": null, + "DoctorID": 122495, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/TAKHSUSI/122495.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/ESP.png", + "NationalityID": "ESP", + "NationalityName": "Spanish", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 17013, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6er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UyruMxcBlZ+CeTzXEXWhaxY+MoNR8OaVfW9jPt8M6jczW7peybpN0uoKyDByApE7dW6rXt9FAHmfjHSdNurjSfDNxp/i6aeW3htZNe0yFWZ4SWjMdzcEZKE/O64x0avPNf0zxJb+MtL0PwXoWuWeiWvlWNyl1aSR2V9IshR5pxENskbps3ORllB4xivo+igDxu50n4g6NceHbdNP8P2Oltrts91H4XhuImK5w5lGAvlbR8xPoua9koooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Consultant Internal Medicine", + "Consultant Family Medicine", + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "استشاري طب الأسرة\r\n", + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 103068, + "Name": "HADI AHMED YOUNIS", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.71, + "DoctorAvailability": null, + "DoctorID": 103068, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/TAKHSUSI/103068.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/LBN.png", + "NationalityID": "LBN", + "NationalityName": "Lebanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 16284, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioClhnO0jjnJHFAHQUV5//AMLT/wCpC8c/+Cf/AOzrY8OePdH8R6d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ln4c037Z9qxb6jNBAZNWaNgBLc2LJjNodqmKRuN55oA4/U/FF5rvjLWYtTvvFf/H3PLothDKfMt7zzD5CtGxOzbkqQnzA8CvQNM8aXmheMtG1zXPDPiv/AJF+DQ2eawPmXF55gc7S7Dfuwcc7ie1c34i1jwrHrOgeJLDQ/E9tPpGp29vqE95aRIs7RMZJDIwOWumOCdxGcHOK2NY+IGm6zb6PcaXY+Lr6BfFsGoNJewrKobBP2WAqxGcEbY/c80AdnH4X/wCEp8Q6f408OWOq+GL6HUI4tRtb6L7F9stw/mysUQEyM5ZRlmw20g9M16xXk9hoGseI9RtvEekav4y0vZray3mma/cvBG1uCHdYolByvIVQTjAYHpXrFABRRRQAV5/8WI7z+zvDV5Z6bfah9g8QWt5NDYwGWTy0DliFH4DnAyRzXoFFAHzx/ZHhv/hMv+Eo/wCEQ+J327+0P7Q8v+zY/L8zzPMxjGdue2c471X13TPEl98PNTvNO0LXLe+n8ay6lbw/ZJEuY42iJWTaoyMEgbhwD3r6PooA8/8AC7WeqeDbPXNc8J30ut6NaJEz6jpwa9mkhjVy0JfLNlydpyCWz0NchpXg3/iob3V9Xh8V/wDH3J4qs7K0X/RvvhkhkRl/4++oKA9MANXt9FAHgnjXT9e1m3hsNL8KyaZqmt3qzNqOn6e8KiwmDDyr2RQW83cQ0q8rwDzV+9ufFXhLRtN0S48MSX2qLbxWEmr6BYSytFpm0oVSY4YXAZd4GNgypxXtlFAHzZPouvahby6X4f8ADustpdlcHxFcN4rsnM97dINrQjYNsgdSvykBmO75q6/w1ouvazrOka3YeHdN0bS7dIY9Q0jU7J7dRdKweS6toQCu/aQiSMd3BB6V7JRQB4/4q1XWNU+Iei/2RYeObP7LqsFrefuXj02a3WVt8nyk7s5HzHgoOa9goooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Rheumatology Consultant" + ], + "SpecialityN": [ + "استشاري علاج أمراض الروماتيزم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 17024, + "Name": "LOAY ABDALRAZZAQ AL DHAHIR", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.8, + "DoctorAvailability": null, + "DoctorID": 17024, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/TAKHSUSI/17024.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/GBR.png", + "NationalityID": "GBR", + "NationalityName": "British", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 15551, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECA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vP/ixHef2d4avLPTb7UPsHiC1vJobGAyyeWgcsQo/Ac4GSOa9AooA+eP7I8N/8Jl/wlH/AAiHxO+3f2h/aHl/2bH5fmeZ5mMYztz2znHetSyl1K18K6lf3Hga71GDUPGct1Jp1/pLTTpayICZFjPAcD5Q3K5JFe50UAfPF+/iT+zrnV9O+E/hz7D/AGg1rb2Vx4dk+2+XgssjovG3GAWBxu4rr/CNteQ+HrrTvGnhqfVN8T67bWy2JntrWMoqpZxLL9yZfnCxDgA9eTXrFFAHiEOkax/wkOrzz+ELH+xP+Efm1DS9KTTX+zfaN+YhNCRt+17PlYLzjgHFFr421i+8Gz6d4j+Ft9cX0G7+zraHw+72Ue2PbFuV2yMEsDt6L0r2+igD5s8ReGviDa2+geJrfRNNhgiuLe6j0HRLW4VUmAMgkmtwMBwPkZs5+6tdJdNeeMfBsGueNPCeuWet2uqrFbP4e04x3qxrHvRsy5YRh2fkHG4L3zXt9FAHj+r6Fo994y8F6jeaV45uL6C0sfJuRbo8ce2Qsv2tiMiQEkyY6CvYKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 13909, + "Name": "ABDEL HAMEED ABU MALLUH", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.72, + "DoctorAvailability": null, + "DoctorID": 13909, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/TAKHSUSI/13909.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/JOR.png", + "NationalityID": "JOR", + "NationalityName": "Jordanian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 14504, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8R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4mt9E02GCK4t7qPQdEtbhVSYAyCSa3AwHA+Rmzn7q10l0154x8Gwa5408J65Z63a6qsVs/h7TjHerGse9GzLlhGHZ+QcbgvfNe30UAeP6voWj33jLwXqN5pXjm4voLSx8m5Fujxx7ZCy/a2IyJASTJjoK9goooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 187622, + "Name": "MUNEERAH SALEH ALHUTHAYFI", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.79, + "DoctorAvailability": null, + "DoctorID": 187622, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/YEM.png", + "NationalityID": "YEM", + "NationalityName": "Yemeni                                     ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 10017, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR":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StfvIfiHe3nj/SNcfwtqV3JFYQ63bE21rJJKDGzLMdibY94JXJA3Y4zW58TDoPhi38C39vr93dwaXcWBj06O8SRZbWIORcCMYDOQu3zOFOccVj3vjXQfGtxpul2EHiC+gXxHFrOoNq6JLBa2uSsi8MQkChhww2gE5NAHZ/CfQryx8Q+JdRi0rSrfRJ9QuvsNytuUuZI2dGj8psbTbFBldvBPTivWK4fwPqviTVNR1Hz7DSrPwtayy2ul/Z4ZI5Jo1K+VImSUaExnhl4JHHFdxQAUUUUAFef/FiO8/s7w1eWem32ofYPEFreTQ2MBlk8tA5YhR+A5wMkc16BRQB88f2R4b/AOEy/wCEo/4RD4nfbv7Q/tDy/wCzY/L8zzPMxjGdue2c471safrfjDw54N13V9D8LXz32peK7idbK+0+YyLbyRhg5RCCOQBnJGcivb6KAPDPBWi+Ntf8VTeK73w74f0mC6RtN1KxurKaBrmFnWSWURkEO7AldzHBwQRxRP8ADfQbXWZfEGjaT4nh1SLXTDZ28lsi2iTBt6TFVXcLMNgbgc7ele50UAeT+MvDnjzVPBs2o+ZpVn4ptZS/2nRGnjkms1jZvIVsF2YyHIT7pIXvXGDwVqUnirRE1mfx5cwavoUEV5dwOztBNK/zwyuy4WBRkshyRnJzX0XRQB5fJ8NLPS9O1CzvLb+3NEj0qRYZrmMXOrQyAYWK3YqFWMICUUch2PY15B4RsvEng7xldXln4I1y80S632c0N9pUkkjWbSKWBUYUyFFA5+XJPGK+r6KAPE/h/wCLfFWn+KrzS7/wp4gXw7e3rnT2k06UNZK7qsaHJ2RwIgPCg7e3Fe2UUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Resident Internal Medicine" + ], + "SpecialityN": [ + "طبيب أمراض باطنية مقيم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 258923, + "Name": "MOHAMMED AL SHEEF", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.8, + "DoctorAvailability": null, + "DoctorID": 258923, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/TAKHSUSI/258923.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 6020, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGR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/wCzY/L8zzPMxjGdue2c471cOn69qfgXW7e38KyGfXvFs5jj1fT33WkM8WBcYAzGUJ/1nIHPWve6KAPH9Q+GniTVPBuhWd5beFZdb0a7t1hmaORo5rOGMhYpWKlmy5JZRhSPQ0eNG8SXGo+HvBcvhOxvNEurS2ivrq106SSOxkYtFI0D/dj2JypZcqCCeOK9gooA8Qh+H3/CHeIdX07TtOvtc0SPw/NqFvbanB9ptm1EPtUBVUKZCigYHz4Y84NFr421i+8Gz6d4j+Ft9cX0G7+zraHw+72Ue2PbFuV2yMEsDt6L0r2+igD5s8ReGviDa2+geJrfRNNhgiuLe6j0HRLW4VUmAMgkmtwMBwPkZs5+6tdJdNeeMfBsGueNPCeuWet2uqrFbP4e04x3qxrHvRsy5YRh2fkHG4L3zXt9FAHj+r6Fo994y8F6jeaV45uL6C0sfJuRbo8ce2Qsv2tiMiQEkyY6CvYKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 160486, + "Name": "EBTISAM BAKHSH ", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.84, + "DoctorAvailability": null, + "DoctorID": 160486, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 4904, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqO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bgYDgfIzZz91a6S6a88Y+DYNc8aeE9cs9btdVWK2fw9pxjvVjWPejZlywjDs/IONwXvmvb6KAPH9X0LR77xl4L1G80rxzcX0FpY+Tci3R449shZftbEZEgJJkx0FewUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 288442, + "Name": "SIRINE AHMED", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.86, + "DoctorAvailability": null, + "DoctorID": 288442, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/LBN.png", + "NationalityID": "LBN", + "NationalityName": "Lebanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 4629, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wB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9tPpGp29vqE95aRIs7RMZJDIwOWumOCdxGcHOK2NY+IGm6zb6PcaXY+Lr6BfFsGoNJewrKobBP2WAqxGcEbY/c80AdnH4X/AOEp8Q6f408OWOq+GL6HUI4tRtb6L7F9stw/mysUQEyM5ZRlmw20g9M16xXk9hoGseI9RtvEekav4y0vZray3mma/cvBG1uCHdYolByvIVQTjAYHpXrFABRRRQAV5/8AFiO8/s7w1eWem32ofYPEFreTQ2MBlk8tA5YhR+A5wMkc16BRQB88f2R4b/4TL/hKP+EQ+J327+0P7Q8v+zY/L8zzPMxjGdue2c470X+maxfeDbm8/sLxHb+f46bUvJt7R0vY7doyfMRccMM4DdA3evoeigDwyDw/r0dvElxb6zfTrcDV5Lu8R5Z59IxzpkjkZadjybf/AFZJJzXL6x4U8bXvjrR7dx4gXw7e3sF7ax2vnBdKheUhEIxsgliQ9BkJxg4r6booA+fPiB4M1K6t7Pwzb+Go5tUl1NHj160sGZXtSGjBvLgLuM5b55Djb0ate9ufFXhLRtN0S48MSX2qLbxWEmr6BYSytFpm0oVSY4YXAZd4GNgypxXtlFAHzZPouvahby6X4f8ADustpdlcHxFcN4rsnM97dINrQjYNsgdSvykBmO75q6/w1ouvazrOka3YeHdN0bS7dIY9Q0jU7J7dRdKweS6toQCu/aQiSMd3BB6V7JRQB4/4q1XWNU+Iei/2RYeObP7LqsFrefuXj02a3WVt8nyk7s5HzHgoOa9goooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 270663, + "Name": "NOOR FARIS ALHASSAN", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.88, + "DoctorAvailability": null, + "DoctorID": 270663, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 3046, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrK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PSuQvPBXiq68darpfgOfxB4d0sPNcStevLaWjzebtIg8pdpQrs25Gdqn0FfRdFAHDx+Dbyx8PafBpkOlW+tzxR2utasqlLmSNkxPJFMq7jMXAZWfgnk81xF1oWsWPjKDUfDmlX1vYz7fDOo3M1u6Xsm6TdLqCsgwcgKRO3Vuq17fRQB5n4x0nTbq40nwzcaf4umnlt4bWTXtMhVmeElozHc3BGShPzuuMdGrzzX9M8SW/jLS9D8F6Frlnolr5VjcpdWkkdlfSLIUeacRDbJG6bNzkZZQeMYr6PooA8budJ+IOjXHh23TT/D9jpba7bPdR+F4biJiucOZRgL5W0fMT6LmvZKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Rheumatology Consultant" + ], + "SpecialityN": [ + "استشاري علاج أمراض الروماتيزم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 243527, + "Name": "MOHAMMED ABBAS AL SAEED", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.85, + "DoctorAvailability": null, + "DoctorID": 243527, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 2765, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioClhnO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lbR8xPoua9koooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Consultant Infectious Disease " + ], + "SpecialityN": [ + "\r\n\r\n\r\n\r\n\r\n\r\n\r\nاستشاري الأمراض المعدية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 397230, + "Name": "AHMED KAMAL ADAM", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.91, + "DoctorAvailability": null, + "DoctorID": 397230, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/TAKHSUSI/397230.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SDN.png", + "NationalityID": "SDN", + "NationalityName": "Sudanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1966, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgy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wpzjise98a6D41uNN0uwg8QX0C+I4tZ1BtXRJYLW1yVkXhiEgUMOGG0AnJoA7P4T6FeWPiHxLqMWlaVb6JPqF19huVtylzJGzo0flNjabYoMrt4J6cV6xXD+B9V8SapqOo+fYaVZ+FrWWW10v7PDJHJNGpXypEySjQmM8MvBI44ruKACiiigArz/4sR3n9neGryz02+1D7B4gtbyaGxgMsnloHLEKPwHOBkjmvQKKAPnj+yPDf/CZf8JR/wAIh8Tvt39of2h5f9mx+X5nmeZjGM7c9s5x3q5Lc+KrX4aeK30vwxqRn17xHeBrS6sJfPS1nh++EXkEHAzyucjmve6KAPnzw14E8bazb6Q9h4h8T6LpdukNvqFpqd7NbzhlA8w2yBSvlbSAm7uCD0rU1Xwvea14hsrPwvY65YX2h3cdy82txGLTdQkhcg3DNGCZbiQlSX4LIG6V7fRQB4/4o+HGsWPg281Hw5c/Z/FM92+p6jc2rukkm6Nmlt4GRd5jMgUqjdTjJzXKDwVqUnirRE1mfx5cwavoUEV5dwOztBNK/wA8MrsuFgUZLIckZyc19F0UAeXyfDSz0vTtQs7y2/tzRI9KkWGa5jFzq0MgGFit2KhVjCAlFHIdj2NeQeEbLxJ4O8ZXV5Z+CNcvNEut9nNDfaVJJI1m0ilgVGFMhRQOflyTxivq+igDxP4f+LfFWn+KrzS7/wAKeIF8O3t6509pNOlDWSu6rGhydkcCIDwoO3txXtlFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 252136, + "Name": "WALID AHMED ALKERIDY", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.8, + "DoctorAvailability": null, + "DoctorID": 252136, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1488, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5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2Q8NYsOEH3jkiuE8fWWsX2neF9Dg8ET2+iTxWmq6omiaU6SR3DBklRQPlDBDwGGQduTivoeigDwDSvB95Y+Ib28n8G2NxYweFJJdLhl0sv5kiuDEtypXBuyBhwvJ7VoWvjbWL7wbPp3iP4W31xfQbv7OtofD7vZR7Y9sW5XbIwSwO3ovSvb6KAPmzxF4a+INrb6B4mt9E02GCK4t7qPQdEtbhVSYAyCSa3AwHA+Rmzn7q10l0154x8Gwa5408J65Z63a6qsVs/h7TjHerGse9GzLlhGHZ+QcbgvfNe30UAeP6voWj33jLwXqN5pXjm4voLSx8m5Fujxx7ZCy/a2IyJASTJjoK9goooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 397869, + "Name": "ABDULRAHMAN ALI AL OTAIBI ", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.79, + "DoctorAvailability": null, + "DoctorID": 397869, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1411, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsY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ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 418918, + "Name": "MOHAMMED GHANNAM THALLAB ALHARBI", + "ProjectID": 16, + "ProjectName": "Takhassusi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.77, + "DoctorAvailability": null, + "DoctorID": 418918, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/TAKHSUSI/418918.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.719364", + "Longitude": "46.657567", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 119, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 1.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Takhassusi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy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0PS75Lu0uNXfTAIN0YQPNbExgk8lf3bnHAz0FeoUAFFFFABXn/xYjvP7O8NXlnpt9qH2DxBa3k0NjAZZPLQOWIUfgOcDJHNegUUAfPH9keG/wDhMv8AhKP+EQ+J327+0P7Q8v8As2Py/M8zzMYxnbntnOO9WLlvEkPw88QXmneE7577UvFdzc28N3p0hubWOSLK3EarykinADjIBzXv9FAHgHw0sPGHgjxlb/25aa5f2OuWizt9mjmljt7iaRMvcb8BZFCneeSAR1rp/FGjeMP+Fh3ln4LSDT7G/wBEdrmaYTRW32h5WDyq0Qx9pxsIY5OB9K9YooA8v8I+HNYsfBt1pGmSX1vfT6q6a1e6ozpJJujVZ57N1GTkgGN3HJyTWBdaFrFj4yg1Hw5pV9b2M+3wzqNzNbul7Juk3S6grIMHICkTt1bqte30UAeZ+MdJ026uNJ8M3Gn+Lpp5beG1k17TIVZnhJaMx3NwRkoT87rjHRq881/TPElv4y0vQ/Beha5Z6Ja+VY3KXVpJHZX0iyFHmnEQ2yRumzc5GWUHjGK+j6KAPG7nSfiDo1x4dt00/wAP2Oltrts91H4XhuImK5w5lGAvlbR8xPoua9koooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "102000", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 190045, + "Name": "MAISA KANGER", + "ProjectID": 140, + "ProjectName": "Women-Health Hospital", + "ActualDoctorRate": 3, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 3, + "DoctorAvailability": null, + "DoctorID": 190045, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 3, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.722985232854427", + "Longitude": "46.65414917392709", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SYR.png", + "NationalityID": "SYR", + "NationalityName": "Syrian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 748, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Women Health", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhc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RrcQE+SV5YzbzjZ0yBzkVxg8FalJ4q0RNZn8eXMGr6FBFeXcDs7QTSv88MrsuFgUZLIckZyc19F0UAeXyfDSz0vTtQs7y2/tzRI9KkWGa5jFzq0MgGFit2KhVjCAlFHIdj2NeQeEbLxJ4O8ZXV5Z+CNcvNEut9nNDfaVJJI1m0ilgVGFMhRQOflyTxivq+igDxP4f+LfFWn+KrzS7/wp4gXw7e3rnT2k06UNZK7qsaHJ2RwIgPCg7e3Fe2UUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "012344", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 350852, + "Name": "Ahmad Ramadan", + "ProjectID": 80, + "ProjectName": "AlNakheel Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.88, + "DoctorAvailability": null, + "DoctorID": 350852, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DC/350852.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.7403156", + "Longitude": "46.6352264", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/LBN.png", + "NationalityID": "LBN", + "NationalityName": "Lebanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 4609, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 4.7, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "AlNakheel Digital City", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioClhnO0jjnJHFAHQUV5//AMLT/wCpC8c/+Cf/AOzrQ0r4j6Pqnh691f7NfWf2W7ksfsV3GkdzNcKgbyY03Hd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VoyhA8knJxg8Vn3Wr+G9L8GwS+NPAljF/bNosttf+HtIjWOGOaP5F8yUjbcDDtgZAG0880Aa9r4o1jwd58XjS+0rxHY6/K0ttYaTK95ct5/3FSOUgG2IV1AGeWA5yazND1TTbXxVc3F/4R8QeGZ9YdtC0+Sw01bKBIZnBjkYk5FwDnLLkYUYBxWW114b/wCEN8Ma5odvrmofYPFdrbK+opHLe+Wke8W8JT/ln02pkDcTVjxV4ks9d1HRfC/l+MtPvr/xLBqHmauoikt43LR4tzklFUn5BggEHmgDr7DQPO1G2s9X1fVU0TTdbWWzm1+5xe3WoxkBFiZhte2ZMlQMOW3Y4r1ivEJtPvJvjJpGh+L/ABDssdNtIbzSES9I+1SR3GyEzCQYe4Ybt2wAnsete30AFFFFABXn/wAWI7z+zvDV5Z6bfah9g8QWt5NDYwGWTy0DliFH4DnAyRzXoFFAHzx/ZHhv/hMv+Eo/4RD4nfbv7Q/tDy/7Nj8vzPM8zGMZ257ZzjvWpZRa9J4V1J7fwbHcz6v4zlljtNf0x3WCGVBiZ0HKhTwX5Ayw5r3OigD54kb4j6X4e1CK88J6VrljHrckUNhc6dcXPk4T5Wt4zgLbAAqhHTcR3rY1/wABeJNd8G6XFKf+JJ+61i+sCZPttvJ5Z8y1tI9pVI1Q7Y425DcE4r2+igDwjSvBH/COajexado2q6poj+GpNVt7DW7Xz411EkbUaNVCibYApA+fBYZwasWvjbWL7wbPp3iP4W31xfQbv7OtofD7vZR7Y9sW5XbIwSwO3ovSvb6KAPmzxF4a+INrb6B4mt9E02GCK4t7qPQdEtbhVSYAyCSa3AwHA+Rmzn7q10l0154x8Gwa5408J65Z63a6qsVs/h7TjHerGse9GzLlhGHZ+QcbgvfNe30UAeP6voWj33jLwXqN5pXjm4voLSx8m5Fujxx7ZCy/a2IyJASTJjoK9goooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "012576", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 413076, + "Name": "AYAT HAITHAM", + "ProjectID": 80, + "ProjectName": "AlNakheel Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.84, + "DoctorAvailability": null, + "DoctorID": 413076, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DC/413076.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.7403156", + "Longitude": "46.6352264", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/JOR.png", + "NationalityID": "JOR", + "NationalityName": "Jordanian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 413, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 4.7, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "AlNakheel Digital City", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQ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Ddu2AE9j1r2+gAooooAK8/8AixHef2d4avLPTb7UPsHiC1vJobGAyyeWgcsQo/Ac4GSOa9AooA+eP7I8N/8ACZf8JR/wiHxO+3f2h/aHl/2bH5fmeZ5mMYztz2znHetjSm8SQ+Hr2807wnvvtS8ayXNvDrenSH7LHIgK3DKvKbTgFxkD5q9vooA8n8XaZ4wuPD1rLeaF4cvPFN1qCWMN/Y2k0n2G3ZG2zCQjfGySZbeOFyDjNdQ3gKz1TTvDEuuHzdb0b7LK1/CQ0k0kI5VpHUs0ZcliOCTzwa7CigDwyLwhr2jeOvGT3+mR6zpdxZXus6faSW73Fobppf3alCoXz9oIwvzbTgHmpLXxtrF94Nn07xH8Lb64voN39nW0Ph93so9se2LcrtkYJYHb0XpXt9FAHzZ4i8NfEG1t9A8TW+iabDBFcW91HoOiWtwqpMAZBJNbgYDgfIzZz91a6S6a88Y+DYNc8aeE9cs9btdVWK2fw9pxjvVjWPejZlywjDs/IONwXvmvb6KAPH9X0LR77xl4L1G80rxzcX0FpY+Tci3R449shZftbEZEgJJkx0FewUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "012576", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 417022, + "Name": "MOHAMMED ALAHMARI", + "ProjectID": 80, + "ProjectName": "AlNakheel Medical-Center", + "ActualDoctorRate": 4, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.41, + "DoctorAvailability": null, + "DoctorID": 417022, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 4.5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.7403156", + "Longitude": "46.6352264", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 41, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 4.7, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "AlNakheel Digital City", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHB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BZ+Gvs99P4gbQptWhsXS9k05hhrxphyZCQGMp+QtzivYKKAPE/GPh/UtGuNJ0Tw/b+INa1S4vYZLjV9URriA2rFka1nmQBvI3BXaMjbgk96zLq88YWPjKDTvDngv7PYz2i6ZqNtNpcyaTJcNJtluFVODGQFAduSnUV7/RQB5Xr3hTUtGuPCF/ogu7GdtTsodV07Qt0VgVyTNM0agHGQFLN/CFBr1SiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "012576", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Ms", + "ID": 1482, + "Name": "FOUZIA DRIDI BOUHEDJA", + "ProjectID": 70, + "ProjectName": "Diplomatic-Quarter Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.87, + "DoctorAvailability": null, + "DoctorID": 1482, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DQ/1482.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.674988", + "Longitude": "46.629421", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/DZA.png", + "NationalityID": "DZA", + "NationalityName": "Algerian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 15290, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 5.3, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "Diplomatic Quarter", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioClhnO0jjnJHFAHQUV5//AMLT/wCpC8c/+Cf/AOzrY8OePdH8R6dJeYn0vZqB03ydTCQSNcAA+WF3HLc429cg8cUAdRRXN+IPGum6Bo0+qJBd6tBa3DW90ul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acfqfii813xlrMWp33iv/j7nl0WwhlPmW955h8hWjYnZtyVIT5geBXoGmeNLzQvGWja5rnhnxX/yL8Ghs81gfMuLzzA52l2G/dg453E9q5vxFrHhWPWdA8SWGh+J7afSNTt7fUJ7y0iRZ2iYySGRgctdMcE7iM4OcVsax8QNN1m30e40ux8XX0C+LYNQaS9hWVQ2CfssBViM4I2x+55oA7OPwv8A8JT4h0/xp4csdV8MX0OoRxaja30X2L7Zbh/NlYogJkZyyjLNhtpB6Zr1ivJ7DQNY8R6jbeI9I1fxlpezW1lvNM1+5eCNrcEO6xRKDleQqgnGAwPSvWKACiiigArz/wCLEd5/Z3hq8s9NvtQ+weILW8mhsYDLJ5aByxCj8BzgZI5r0CigD54/sjw3/wAJl/wlH/CIfE77d/aH9oeX/Zsfl+Z5nmYxjO3PbOcd60LDTNYvtOtrz+wtVt/P+Iq6l5NxaOkkduwB8x1xwozgt0B717vRQB4Rc2HiTVNR8QQfZPEdnfWut3N5/asUckck2lKcfZLabksxJ3JF9wkZzVfxpbaxD4y8PajZ+Gtc1Sxfw/bWs1zNYvPe2uZGZpFYcJdqMEMejH3r3+igD508Y+AYZNG0nRPD+g+ILnVNXvYdSuNX1SzDtAsqsjRTzIu5SrbXZSDjJOTW/e3Pirwlo2m6JceGJL7VFt4rCTV9AsJZWi0zaUKpMcMLgMu8DGwZU4r2yigD5sn0XXtQt5dL8P8Ah3WW0uyuD4iuG8V2Tme9ukG1oRsG2QOpX5SAzHd81df4a0XXtZ1nSNbsPDum6NpdukMeoaRqdk9uoulYPJdW0IBXftIRJGO7gg9K9kooA8f8VarrGqfEPRf7IsPHNn9l1WC1vP3Lx6bNbrK2+T5Sd2cj5jwUHNewUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "011564", + "Speciality": [ + "Consultant Gastroentrologist", + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري الجهاز الهضمي", + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 337922, + "Name": "ABDULRAHMAN KHOJAH", + "ProjectID": 70, + "ProjectName": "Diplomatic-Quarter Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.6, + "DoctorAvailability": null, + "DoctorID": 337922, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DQ/337922.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.674988", + "Longitude": "46.629421", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 6279, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 5.3, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "Diplomatic Quarter", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEA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LPTb7UPsHiC1vJobGAyyeWgcsQo/Ac4GSOa9AooA+eP7I8N/8Jl/wlH/CIfE77d/aH9oeX/Zsfl+Z5nmYxjO3PbOcd6kn8Nal4n8Ky29xoms2kGqePTdSRyWrRzxWsqYMhBBCgBvvcqCO9fQdFAHgj6T42jt7Tw/penyaN4dt/Eaae1xpUM1vfzwqNn2qRlGxkZMEyYwWA4wKr+ILOZvFU+lpo/xDh8OxWTWl02lWxVtRug5V7iT+CUSJ1cjc3GRivoOigD5w1Xwv4kh8PWXhzTrHXHvtSu4zb6nLFIfsulSIUWzuZVGU2nDPEAUHWujvbnxV4S0bTdEuPDEl9qi28VhJq+gWEsrRaZtKFUmOGFwGXeBjYMqcV7ZRQB82T6Lr2oW8ul+H/DustpdlcHxFcN4rsnM97dINrQjYNsgdSvykBmO75q6/w1ouvazrOka3YeHdN0bS7dIY9Q0jU7J7dRdKweS6toQCu/aQiSMd3BB6V7JRQB4/4q1XWNU+Iei/2RYeObP7LqsFrefuXj02a3WVt8nyk7s5HzHgoOa9goooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "011564", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 39819, + "Name": "MONA METAWEE MONA METAWEE", + "ProjectID": 154, + "ProjectName": "AlGhadeer Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.78, + "DoctorAvailability": null, + "DoctorID": 39819, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.7763844", + "Longitude": "46.6621208", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/EGY.png", + "NationalityID": "EGY", + "NationalityName": "EGYPT, ARAB REPUBLIC OF                              ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1109, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 7.5, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "AlGhadeer", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMz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penahZ3lt/bmiR6VIsM1zGLnVoZAMLFbsVCrGEBKKOQ7Hsa8g8I2XiTwd4yuryz8Ea5eaJdb7OaG+0qSSRrNpFLAqMKZCigc/LknjFfV9FAHifw/wDFvirT/FV5pd/4U8QL4dvb1zp7SadKGsld1WNDk7I4EQHhQdvbivbKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 38271, + "Name": "ZAIN KHALILAH ZAIN KHALILAH", + "ProjectID": 154, + "ProjectName": "AlGhadeer Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.76, + "DoctorAvailability": null, + "DoctorID": 38271, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/AlGhadeer/38271.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.7763844", + "Longitude": "46.6621208", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/JOR.png", + "NationalityID": "JOR", + "NationalityName": "JORDAN, HASHEMITE KINGDOM OF                         ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 796, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 7.5, + "ProjectNameBottom": "Med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QE+WpjAaK+RlXC8lcn2rU8VfEnxJY+HtFs9R8FfaLGC0giuJvE+lSP5l4qMGZWZsHIBIJ+Y/NXJzv4q0b4lyvrNlqTQWWsHXby0s4pTAVSb57iNGwNmAQHOOMAmuo8V+MYfE/hU3Hh/RvE+rQWuu/wBr3Emr2ontIlVGLQZRiFiAZfkPRSeeaAMv4U2v/CR+MlvNIuJ9L1tNQ+3XkNu/kWTacJELwoq5YtvIAQ/JtHJyK+p68v0jRrPxH4e8La54QTQ9Lvku7S41d9MAg3RhA81sTGCTyV/duccDPQV6hQAUUUUAFef/ABYjvP7O8NXlnpt9qH2DxBa3k0NjAZZPLQOWIUfgOcDJHNegUUAfPH9keG/+Ey/4Sj/hEPid9u/tD+0PL/s2Py/M8zzMYxnbntnOO9aEN54k0vwbq+r6d4LnvL668YTX1vZanpckkkMbR7lmCLgqwIA3A4BJGa93ooA8X0KP4j33xT0zXNR03Srfz9EiW4fyLhI47dpw7RZbpcjJ+UnAFYHxW0rx5pfjJv8AhF7/AMZXljdRfan+zzTyRwyNI+Y08sAKoAXC9QDX0PRQB5/pnhe8/wCEN0aXTLGx0/W7+0gi1q/miMV75bxjz2WRRu+0b8MC+RuGTzXIXWhaxY+MoNR8OaVfW9jPt8M6jczW7peybpN0uoKyDByApE7dW6rXt9FAHmfjHSdNurjSfDNxp/i6aeW3htZNe0yFWZ4SWjMdzcEZKE/O64x0avPNf0zxJb+MtL0PwXoWuWeiWvlWNyl1aSR2V9IshR5pxENskbps3ORllB4xivo+igDxu50n4g6NceHbdNP8P2Oltrts91H4XhuImK5w5lGAvlbR8xPoua9koooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 34030, + "Name": "ABDULLAH SAEED ALGHAMDI ABDULLAH SAEED ALGHAMDI", + "ProjectID": 154, + "ProjectName": "AlGhadeer Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.8, + "DoctorAvailability": null, + "DoctorID": 34030, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.7763844", + "Longitude": "46.6621208", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "SAUDI ARABIA, KINGDOM OF                             ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 237, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 7.5, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "AlGhadeer", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDA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YhR+A5wMkc16BRQB88f2R4b/4TL/hKP+EQ+J327+0P7Q8v+zY/L8zzPMxjGdue2c471oQtrEPg3V7z/hE9Vf8AtLxhNc+S+nOb21t5I8/aIV/gmXor8gNXu9FAHzRrN54k8R74NT8F+I0/s2I/2Lqttpcg1JpI8iD7RM2cryWfZg78EVJr3hDXtTuPCGiXumazqMGoJZXepavdW7zXdo0hKS24mK4jiQEvsYHDEkmvpOigDxeTQvElj4h1DTtT0qDWdE0nw1J/Yts1vJcW0kkT7YPNVhtNyUBDbMEg8YBqC18baxfeDZ9O8R/C2+uL6Dd/Z1tD4fd7KPbHti3K7ZGCWB29F6V7fRQB82eIvDXxBtbfQPE1vommwwRXFvdR6DolrcKqTAGQSTW4GA4HyM2c/dWukumvPGPg2DXPGnhPXLPW7XVVitn8PacY71Y1j3o2ZcsIw7PyDjcF75r2+igDx/V9C0e+8ZeC9RvNK8c3F9BaWPk3It0eOPbIWX7WxGRICSZMdBXsFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية " + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 50932, + "Name": "ZIYAD ALFARAJ ZIYAD ALFARAJ", + "ProjectID": 154, + "ProjectName": "AlGhadeer Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.8, + "DoctorAvailability": null, + "DoctorID": 50932, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.7763844", + "Longitude": "46.6621208", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "SAUDI ARABIA, KINGDOM OF                             ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 230, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 7.5, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "AlGhadeer", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU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BSJ26t1Wvb6KAPM/GOk6bdXGk+GbjT/F008tvDaya9pkKszwktGY7m4IyUJ+d1xjo1eea/pniS38ZaXofgvQtcs9EtfKsblLq0kjsr6RZCjzTiIbZI3TZucjLKDxjFfR9FAHjdzpPxB0a48O26af4fsdLbXbZ7qPwvDcRMVzhzKMBfK2j5ifRc17JRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Consultant Nephrologist" + ], + "SpecialityN": [ + "استشاري أمراض الكلى " + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 13180, + "Name": "SADIG MOHEMMED YAHYA MONAWAR", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.9, + "DoctorAvailability": null, + "DoctorID": 13180, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/RAYAN/13180.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/USA.png", + "NationalityID": "USA", + "NationalityName": "American", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 17796, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital",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JY+HtFs9R8FfaLGC0giuJvE+lSP5l4qMGZWZsHIBIJ+Y/NXJzv4q0b4lyvrNlqTQWWsHXby0s4pTAVSb57iNGwNmAQHOOMAmuo8V+MYfE/hU3Hh/RvE+rQWuu/2vcSavaie0iVUYtBlGIWIBl+Q9FJ55oAy/hTa/8JH4yW80i4n0vW01D7deQ27+RZNpwkQvCirli28gBD8m0cnIr6nry/SNGs/Efh7wtrnhBND0u+S7tLjV30wCDdGEDzWxMYJPJX925xwM9BXqFABRRRQAV5/8WI7z+zvDV5Z6bfah9g8QWt5NDYwGWTy0DliFH4DnAyRzXoFFAHzx/ZHhv/hMv+Eo/wCEQ+J327+0P7Q8v+zY/L8zzPMxjGdue2c471cMWpSeBdbe48G6lcwav4tnlktJ9MZ7uC1li5miQ8LKo4V+VDHHNe90UAfNEfhfWNC/s/U/Dlj4y/4Rb+0I4tR0O+if7TcfxSsYEAR4WjCpljycg8V0njXwhNa3EPivw3pms6TBdaOtvBY+H7cwXaXTFpFNxGi4EQG1Xwd24KO1e50UAeb+F9G8Yf8ACvLOzlTStPvr+VGvpoRNFc/Z3iUSSs2M/bc8lmyMjmuYutC1ix8ZQaj4c0q+t7Gfb4Z1G5mt3S9k3SbpdQVkGDkBSJ26t1Wvb6KAPM/GOk6bdXGk+GbjT/F008tvDaya9pkKszwktGY7m4IyUJ+d1xjo1eea/pniS38ZaXofgvQtcs9EtfKsblLq0kjsr6RZCjzTiIbZI3TZucjLKDxjFfR9FAHjdzpPxB0a48O26af4fsdLbXbZ7qPwvDcRMVzhzKMBfK2j5ifRc17JRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 13325, + "Name": "ALI KHALED AL QAMMAZ", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.84, + "DoctorAvailability": null, + "DoctorID": 13325, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/RAYAN/13325.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/JOR.png", + "NationalityID": "JOR", + "NationalityName": "Jordanian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 16086, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Arryan", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFh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V5rGl+Hr3V/wDhC768+1eNZL77Fd6W8lzDbsgbzo042yDGA2cAkjNe30UAeEXU3iSx+IcGr3mi+I7fRJ4l1CGy8L2sieZI0u5ReoflMxQESgHJ+UZxVjxR4XvP7OvPGkVjrmn63f74rG18LxGKTy3DSxtepjd5m/iUqxGQoHPNe30UAef6Fa+PL74eaZZ6jcWNvfT+VFcTb50uY7NogGbc3IuwSTk/KDXIXWhaxY+MoNR8OaVfW9jPt8M6jczW7peybpN0uoKyDByApE7dW6rXt9FAHmfjHSdNurjSfDNxp/i6aeW3htZNe0yFWZ4SWjMdzcEZKE/O64x0avPNf0zxJb+MtL0PwXoWuWeiWvlWNyl1aSR2V9IshR5pxENskbps3ORllB4xivo+igDxu50n4g6NceHbdNP8P2Oltrts91H4XhuImK5w5lGAvlbR8xPoua9koooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 14679, + "Name": "ABDEL RAHIM TAHA MOHAMMED", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.82, + "DoctorAvailability": null, + "DoctorID": 14679, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/RAYAN/14679.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SDN.png", + "NationalityID": "SDN", + "NationalityName": "Sudanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 13224, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Arryan", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK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dJdNeeMfBsGueNPCeuWet2uqrFbP4e04x3qxrHvRsy5YRh2fkHG4L3zXt9FAHj+r6Fo994y8F6jeaV45uL6C0sfJuRbo8ce2Qsv2tiMiQEkyY6CvYKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 13342, + "Name": "HAITHAM MAMOUN ELFADIL MOHAMED", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.9, + "DoctorAvailability": null, + "DoctorID": 13342, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/RAYAN/13342.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SDN.png", + "NationalityID": "SDN", + "NationalityName": "Sudanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 11384, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Arryan", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDA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xsyzHYm2PeCVyQN2OM1ufEw6D4Yt/At/b6/d3cGl3FgY9OjvEkWW1iDkXAjGAzkLt8zhTnHFY97410HxrcabpdhB4gvoF8RxazqDauiSwWtrkrIvDEJAoYcMNoBOTQB2fwn0K8sfEPiXUYtK0q30SfULr7DcrblLmSNnRo/KbG02xQZXbwT04r1iuH8D6r4k1TUdR8+w0qz8LWsstrpf2eGSOSaNSvlSJklGhMZ4ZeCRxxXcUAFFFFABXn/xYjvP7O8NXlnpt9qH2DxBa3k0NjAZZPLQOWIUfgOcDJHNegUUAfPH9keG/wDhMv8AhKP+EQ+J327+0P7Q8v8As2Py/M8zzMYxnbntnOO9dP4R1DxJpenXV5Z+Hr6L+2fGrtNDfWUiyQ2cwUtKVBG3GANxyoOetewUUAeN23grXrrxV4ifRJ7u08O6pcXNpqtprDvGztK/764tEVdhBTAjds9CCCKyPGvh/Utft4dL8N2/i6yn8LW6iBr1GjtLlbYMqvBsBL3DErtIC5UHpXvdFAHiF18ONYsfhZBqPhy5vrfxTPt1PUbmZ3S9k3QbpbdWRd5zIFIRurdTmsMeCtSk8VaImsz+PLmDV9CgivLuB2doJpX+eGV2XCwKMlkOSM5Oa+i6KAPL5PhpZ6Xp2oWd5bf25okelSLDNcxi51aGQDCxW7FQqxhASijkOx7GvIPCNl4k8HeMrq8s/BGuXmiXW+zmhvtKkkkazaRSwKjCmQooHPy5J4xX1fRQB4n8P/FvirT/ABVeaXf+FPEC+Hb29c6e0mnShrJXdVjQ5OyOBEB4UHb24r2yiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 109549, + "Name": "NOURA HAMDAN ", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.83, + "DoctorAvailability": null, + "DoctorID": 109549, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/LBN.png", + "NationalityID": "LBN", + "NationalityName": "Lebanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 4742, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Arryan", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZW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L8zzPMxjGdue2c471oQtrEPg3V7z/hE9Vf+0vGE1z5L6c5vbW3kjz9ohX+CZeivyA1e70UAfNkHgGb4g6zElxoOs6LPb3AEl3eWZt1u7BW5eRyrF75i+SfunBPau7k0K88KeIdQ07Q9KnuNEg8HybbZrcvbXl4r7R5qoAskzooDfxMPavWKKAPI/D/gXXr3wrBcapZ6MuqXt6syySxOJ9KsHQHyrUsu6CWJidi8qhrMutC1ix8ZQaj4c0q+t7Gfb4Z1G5mt3S9k3SbpdQVkGDkBSJ26t1Wvb6KAPM/GOk6bdXGk+GbjT/F008tvDaya9pkKszwktGY7m4IyUJ+d1xjo1eea/pniS38ZaXofgvQtcs9EtfKsblLq0kjsr6RZCjzTiIbZI3TZucjLKDxjFfR9FAHjdzpPxB0a48O26af4fsdLbXbZ7qPwvDcRMVzhzKMBfK2j5ifRc17JRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 109498, + "Name": "IBRAHIM MOTABI", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.52, + "DoctorAvailability": null, + "DoctorID": 109498, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/RAYAN/109498.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 4316, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Arryan", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO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D2nGO9WNY96NmXLCMOz8g43Be+a9vooA8f1fQtHvvGXgvUbzSvHNxfQWlj5NyLdHjj2yFl+1sRkSAkmTHQV7BRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine", + "Consultant Hematologist " + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "استشاري امراض الدم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 122546, + "Name": "NASHAAT AHMED SAKR ", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.8, + "DoctorAvailability": null, + "DoctorID": 122546, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/EGY.png", + "NationalityID": "EGY", + "NationalityName": "Egyptians", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 3305, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Arryan", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAA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4Fv7fX7u7g0u4sDHp0d4kiy2sQci4EYwGchdvmcKc44rHvfGug+NbjTdLsIPEF9AviOLWdQbV0SWC1tclZF4YhIFDDhhtAJyaAOz+E+hXlj4h8S6jFpWlW+iT6hdfYblbcpcyRs6NH5TY2m2KDK7eCenFesVw/gfVfEmqajqPn2GlWfha1lltdL+zwyRyTRqV8qRMko0JjPDLwSOOK7igAooooAK8/+LEd5/Z3hq8s9NvtQ+weILW8mhsYDLJ5aByxCj8BzgZI5r0CigD54/sjw3/wmX/CUf8ACIfE77d/aH9oeX/Zsfl+Z5nmYxjO3PbOcd639A1Dxhpfh7VLzQ/D08V9rPjCVlh1aymXybeZARK6oQVUEAFuQOete0UUAeZ6lZw2usrpd7o/iAz69pn2TUm0K2H9lpNOxWW4bPIlBzl2BOzbnNcx4n+FWpafcWFvZa74nvtLVI4dNjW7aVrK/wAkRTOAm2O3RQMsvzLnivc6KAPF9Z8BeMLf4ePLZnSrPxTaymWa/wBGM0dzfW6xHcryBd8kzyYYg8MQD1rnB4K1KTxVoiazP48uYNX0KCK8u4HZ2gmlf54ZXZcLAoyWQ5Izk5r6LooA8vk+GlnpenahZ3lt/bmiR6VIsM1zGLnVoZAMLFbsVCrGEBKKOQ7Hsa8g8I2XiTwd4yuryz8Ea5eaJdb7OaG+0qSSRrNpFLAqMKZCigc/LknjFfV9FAHifw/8W+KtP8VXml3/AIU8QL4dvb1zp7SadKGsld1WNDk7I4EQHhQdvbivbKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Specialist Internal Medicine " + ], + "SpecialityN": [ + "أخصائي أمراض باطنة" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 235959, + "Name": "MOHAMMAD SALEH ALSHABEBI", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.75, + "DoctorAvailability": null, + "DoctorID": 235959, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/YEM.png", + "NationalityID": "YEM", + "NationalityName": "Yemeni                                     ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 2823, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Arryan", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqD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CRrKaSEARQRM+WaMuWKouCV6EGrem6pD4h0ZvD/AIk8I+NbmfV7jfPcXumh4LCaVQjGBnJMUUZLFSQSoJ617JRQB5PrOhXlj4hfTotKn1nRNJ8Hn7DbX1ubi2kvInKx5XG0zFBj5cMQTjANZFr421i+8Gz6d4j+Ft9cX0G7+zraHw+72Ue2PbFuV2yMEsDt6L0r2+igD5s8ReGviDa2+geJrfRNNhgiuLe6j0HRLW4VUmAMgkmtwMBwPkZs5+6tdJdNeeMfBsGueNPCeuWet2uqrFbP4e04x3qxrHvRsy5YRh2fkHG4L3zXt9FAHj+r6Fo994y8F6jeaV45uL6C0sfJuRbo8ce2Qsv2tiMiQEkyY6CvYKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 70907, + "Name": "MOQBIL ABDULLAH AL HODAITHY", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.79, + "DoctorAvailability": null, + "DoctorID": 70907, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/RAYAN/70907.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 2479, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Arryan", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwd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zXslFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 136339, + "Name": "AZZAM ALOTAIBI", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.7, + "DoctorAvailability": null, + "DoctorID": 136339, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/RAYAN/136339.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1245, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Arryan", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRw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sGoeZq6iKS3jctHi3OSUVSfkGCAQeaAOvsNA87Ubaz1fV9VTRNN1tZbObX7nF7dajGQEWJmG17ZkyVAw5bdjivWK8Qm0+8m+MmkaH4v8Q7LHTbSG80hEvSPtUkdxshMwkGHuGG7dsAJ7HrXt9ABRRRQAV5/wDFiO8/s7w1eWem32ofYPEFreTQ2MBlk8tA5YhR+A5wMkc16BRQB88f2R4b/wCEy/4Sj/hEPid9u/tD+0PL/s2Py/M8zzMYxnbntnOO9XDFqUngXW3uPBupXMGr+LZ5ZLSfTGe7gtZYuZokPCyqOFflQxxzXvdFAHkfhTwd42tdGFuNZkh0uJ/7Q0eO5uplu0YKogtbobdogC/6yNP4uhrmPEA+IOn3E/h/xJoEfiXS9TuGvZ7ixs7i8ayWQlGS2Z/ljdFDFAQdu4c819B0UAfPGgeCNY0vxDql5qejT65Yx+GpbjRYdWtXufJw4MFs6soCzAAgxp03HHWti18baxfeDZ9O8R/C2+uL6Dd/Z1tD4fd7KPbHti3K7ZGCWB29F6V7fRQB82eIvDXxBtbfQPE1vommwwRXFvdR6DolrcKqTAGQSTW4GA4HyM2c/dWukumvPGPg2DXPGnhPXLPW7XVVitn8PacY71Y1j3o2ZcsIw7PyDjcF75r2+igDx/V9C0e+8ZeC9RvNK8c3F9BaWPk3It0eOPbIWX7WxGRICSZMdBXsFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 208675, + "Name": "ABDULLAH BUKHARI", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.88, + "DoctorAvailability": null, + "DoctorID": 208675, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/RAYAN/208675.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1185, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Arryan", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2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NwB3r2+igD508a6fN41t4bDS/Cvi5dUvdYWZtR13TyFtYXDDylkUFkgVmDBeQPmNb97c+KvCWjabolx4YkvtUW3isJNX0CwllaLTNpQqkxwwuAy7wMbBlTivbKKAPmyfRde1C3l0vw/4d1ltLsrg+IrhvFdk5nvbpBtaEbBtkDqV+UgMx3fNXX+GtF17WdZ0jW7Dw7pujaXbpDHqGkanZPbqLpWDyXVtCAV37SESRju4IPSvZKKAPH/ABVqusap8Q9F/siw8c2f2XVYLW8/cvHps1usrb5PlJ3ZyPmPBQc17BRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 15774, + "Name": "RAYAN SALAHELDIN HUSSEIN", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.79, + "DoctorAvailability": null, + "DoctorID": 15774, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/RAYAN/15774.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SDN.png", + "NationalityID": "SDN", + "NationalityName": "Sudanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 778, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Arryan", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioClhnO0jjnJHFAHQUV5//AMLT/wCpC8c/+Cf/AOzrQ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ooAKKKKACiiigAooooAKKKKAP/Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Specialist Internal Medicine " + ], + "SpecialityN": [ + "أخصائي أمراض باطنة" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 406994, + "Name": "ASHRAF AHMED", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.75, + "DoctorAvailability": null, + "DoctorID": 406994, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/GBR.png", + "NationalityID": "GBR", + "NationalityName": "British", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 759, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Arryan", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj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ikt43LR4tzklFUn5BggEHmgDr7DQPO1G2s9X1fVU0TTdbWWzm1+5xe3WoxkBFiZhte2ZMlQMOW3Y4r1ivEJtPvJvjJpGh+L/EOyx020hvNIRL0j7VJHcbITMJBh7hhu3bACex617fQAUUUUAFef8AxYjvP7O8NXlnpt9qH2DxBa3k0NjAZZPLQOWIUfgOcDJHNegUUAfPH9keG/8AhMv+Eo/4RD4nfbv7Q/tDy/7Nj8vzPM8zGMZ257ZzjvWhDeeJNL8G6vq+neC57y+uvGE19b2Wp6XJJJDG0e5Zgi4KsCANwOASRmvd6KAPK9Hl1Lxb4F1jxB4r8Daa3iKySdLK3utJYtKqRB4wFky5BdmGFIzzjmpGbxJceDfDEWueE9DvPtWq2sTWEOnSSR2Nm0fLNG/+rkTlSfuqDivUKKAPH9T0zxJ/wmWsxanoVjqGiWHh+eXRbCG0klsvMSQ+QrRsNv2jZlSEwdpwOKoWvjbWL7wbPp3iP4W31xfQbv7OtofD7vZR7Y9sW5XbIwSwO3ovSvb6KAPmzxF4a+INrb6B4mt9E02GCK4t7qPQdEtbhVSYAyCSa3AwHA+Rmzn7q10l0154x8Gwa5408J65Z63a6qsVs/h7TjHerGse9GzLlhGHZ+QcbgvfNe30UAeP6voWj33jLwXqN5pXjm4voLSx8m5Fujxx7ZCy/a2IyJASTJjoK9goooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 325966, + "Name": "ABDULLAH SULAIMAN ALSALEH", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.77, + "DoctorAvailability": null, + "DoctorID": 325966, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/RAYAN/325966.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 676, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Arryan", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl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A3eZHz1HvXQeJ/h/4q0+4sL+yvru+nXxRG+m6cs0sthZWuSYi8YXMYQgKSvyqpwK9zooA8Q1P4ceMLHwbrOo2dzY2/imfVZ9TmudJeZJJLdoyzW6MF3nMgBCHgnHOawx4K1KTxVoiazP48uYNX0KCK8u4HZ2gmlf54ZXZcLAoyWQ5Izk5r6LooA8vk+GlnpenahZ3lt/bmiR6VIsM1zGLnVoZAMLFbsVCrGEBKKOQ7Hsa8g8I2XiTwd4yuryz8Ea5eaJdb7OaG+0qSSRrNpFLAqMKZCigc/LknjFfV9FAHifw/8AFvirT/FV5pd/4U8QL4dvb1zp7SadKGsld1WNDk7I4EQHhQdvbivbKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Hematologist " + ], + "SpecialityN": [ + "استشاري امراض الدم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 288462, + "Name": "ABDULRAHMAN ABDULLAH AL RAIZAH", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 4, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.47, + "DoctorAvailability": null, + "DoctorID": 288462, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/RAYAN/288462.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 4.5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 2746, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Arryan", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2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FFFABRRRQB//9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Hematologist " + ], + "SpecialityN": [ + "استشاري امراض الدم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 70343, + "Name": "ZAKI ALSHAMMASI", + "ProjectID": 15, + "ProjectName": "Arryan Hospital", + "ActualDoctorRate": 4, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.04, + "DoctorAvailability": null, + "DoctorID": 70343, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/RAYAN/70343.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 4.5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.722136", + "Longitude": "46.774303", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 2481, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 11.1, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Arryan", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy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PNAHX2GgedqNtZ6vq+qpomm62stnNr9zi9utRjICLEzDa9syZKgYctuxxXrFeITafeTfGTSND8X+IdljptpDeaQiXpH2qSO42QmYSDD3DDdu2AE9j1r2+gAooooAK8/+LEd5/Z3hq8s9NvtQ+weILW8mhsYDLJ5aByxCj8BzgZI5r0CigD54/sjw3/wmX/CUf8ACIfE77d/aH9oeX/Zsfl+Z5nmYxjO3PbOcd6uGXXrXwLrd/b+BpNRn1DxbPdR6dq+kvMyQyRZEnljkEH5d3I5Ir3uigDyN/FGveEre0t9L8AyLBe6El60elaO4WLU3GNkgUgBAFGRy445rmPhza6ldaz4juPGHw7jmglS51cyT6KzTvMWQ+REZOCCN21Oue/WvoOigDwDRNI/4qHxJPp3hDXP7E/sq61C30rX9N/0b+0d4KiKFRt+5hVA+fG4ZxWha+NtYvvBs+neI/hbfXF9Bu/s62h8Pu9lHtj2xbldsjBLA7ei9K9vooA+bPEXhr4g2tvoHia30TTYYIri3uo9B0S1uFVJgDIJJrcDAcD5GbOfurXSXTXnjHwbBrnjTwnrlnrdrqqxWz+HtOMd6sax70bMuWEYdn5BxuC9817fRQB4/q+haPfeMvBeo3mleObi+gtLHybkW6PHHtkLL9rYjIkBJMmOgr2CiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine", + "Miscellaneous" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "متنوع\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 304264, + "Name": "TALAL MOHAMMED ALI OREIBI", + "ProjectID": 130, + "ProjectName": "Sahafa Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.72, + "DoctorAvailability": null, + "DoctorID": 304264, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/Sahafa/304264.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.8113774", + "Longitude": "46.6239813", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 10732, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 12.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Sahafa", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAw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4d8P8Ah3VBqcmm3V3Y2T2jPYbRvltnxuLluUY/L8oJHFYl1oWsWPjKDUfDmlX1vYz7fDOo3M1u6Xsm6TdLqCsgwcgKRO3Vuq17fRQB5n4x0nTbq40nwzcaf4umnlt4bWTXtMhVmeElozHc3BGShPzuuMdGrzzX9M8SW/jLS9D8F6Frlnolr5VjcpdWkkdlfSLIUeacRDbJG6bNzkZZQeMYr6PooA8budJ+IOjXHh23TT/D9jpba7bPdR+F4biJiucOZRgL5W0fMT6LmvZKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "013311", + "Speciality": [ + "Consultant Internal Medicine", + "Consultant Infectious Disease " + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "\r\n\r\n\r\n\r\n\r\n\r\n\r\nاستشاري الأمراض المعدية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 367887, + "Name": "KHOLOUD HAMEED MOHAMMED ALMAABDI", + "ProjectID": 130, + "ProjectName": "Sahafa Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.87, + "DoctorAvailability": null, + "DoctorID": 367887, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.8113774", + "Longitude": "46.6239813", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 2038, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 12.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Sahafa", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioCl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UJf7KuPIiSxvrnS8Pc3mqqjNJDeNx5ls+3Mit87HGRVe61fw3pfg2CXxp4EsYv7ZtFltr/AMPaRGscMc0fyL5kpG24GHbAyANp55oA17XxRrHg7z4vGl9pXiOx1+Vpbaw0mV7y5bz/ALipHKQDbEK6gDPLAc5NZmh6pptr4qubi/8ACPiDwzPrDtoWnyWGmrZQJDM4McjEnIuAc5ZcjCjAOKy2uvDf/CG+GNc0O31zUPsHiu1tlfUUjlvfLSPeLeEp/wAs+m1MgbiaseKvElnruo6L4X8vxlp99f8AiWDUPM1dRFJbxuWjxbnJKKpPyDBAIPNAHX2GgedqNtZ6vq+qpomm62stnNr9zi9utRjICLEzDa9syZKgYctuxxXrFeITafeTfGTSND8X+IdljptpDeaQiXpH2qSO42QmYSDD3DDdu2AE9j1r2+gAooooAK8/+LEd5/Z3hq8s9NvtQ+weILW8mhsYDLJ5aByxCj8BzgZI5r0CigD54/sjw3/wmX/CUf8ACIfE77d/aH9oeX/Zsfl+Z5nmYxjO3PbOcd62NKvNY0vw9e6v/wAIXfXn2rxrJffYrvS3kuYbdkDedGnG2QYwGzgEkZr2+igDwSW58Van4V8VvrfhjUtR0vUL28GlWl1YSzX9pNIn7lwjfLHAikjK5IYkCuvtdPm0DwL4Et7DwraTTy3unnUI5NPLNbMYsSXBAAKSqQP3jdO9emUUAeN6h4Qm0bx14le30y71nS7jR7rWY7S/tzcWh1NpThVQKF37RgD7+0kZ5qpa+NtYvvBs+neI/hbfXF9Bu/s62h8Pu9lHtj2xbldsjBLA7ei9K9vooA+bPEXhr4g2tvoHia30TTYYIri3uo9B0S1uFVJgDIJJrcDAcD5GbOfurXSXTXnjHwbBrnjTwnrlnrdrqqxWz+HtOMd6sax70bMuWEYdn5BxuC9817fRQB4/q+haPfeMvBeo3mleObi+gtLHybkW6PHHtkLL9rYjIkBJMmOgr2CiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "013311", + "Speciality": [ + "Rheumatology Consultant" + ], + "SpecialityN": [ + "استشاري علاج أمراض الروماتيزم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 397434, + "Name": "MOHAMAD IMAD HOURY", + "ProjectID": 130, + "ProjectName": "Sahafa Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.68, + "DoctorAvailability": null, + "DoctorID": 397434, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/Sahafa/397434.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.8113774", + "Longitude": "46.6239813", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/LBN.png", + "NationalityID": "LBN", + "NationalityName": "Lebanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1238, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 12.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Sahafa", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQD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f4h2WOm2kN5pCJekfapI7jZCZhIMPcMN27YAT2PWvb6ACiiigArz/wCLEd5/Z3hq8s9NvtQ+weILW8mhsYDLJ5aByxCj8BzgZI5r0CigD54/sjw3/wAJl/wlH/CIfE77d/aH9oeX/Zsfl+Z5nmYxjO3PbOcd60IbbxJceDdX/s7w1PFfaz4wmkt/7TsZFksY5o/luht5jZDj94MhTnrXu9FAHi+oaZrGqf2FLeaFPLfaNLb2MN+1o7XM2ow52zSyEEtpxJLM4w5POBWZZeFtS0/xVqWieMPCVpqsHiF5bg6vpGmtO1lNcOEx50gxGiAM/Qlcg85Ne90UAeAaJ8PtY8HeIfEmnT6d/bmiR6VdahpdtcQPc2zXAcLEHUqFNwUXBC84bg4NaFr421i+8Gz6d4j+Ft9cX0G7+zraHw+72Ue2PbFuV2yMEsDt6L0r2+igD5s8ReGviDa2+geJrfRNNhgiuLe6j0HRLW4VUmAMgkmtwMBwPkZs5+6tdJdNeeMfBsGueNPCeuWet2uqrFbP4e04x3qxrHvRsy5YRh2fkHG4L3zXt9FAHj+r6Fo994y8F6jeaV45uL6C0sfJuRbo8ce2Qsv2tiMiQEkyY6CvYKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "013311", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 396083, + "Name": "MOHAMED ABDALGAWAD", + "ProjectID": 130, + "ProjectName": "Sahafa Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.82, + "DoctorAvailability": null, + "DoctorID": 396083, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.8113774", + "Longitude": "46.6239813", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SWE.png", + "NationalityID": "SWE", + "NationalityName": "Swedish", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1143, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 12.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Sahafa", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECA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ACAAOa07258VeEtG03RLjwxJfaotvFYSavoFhLK0WmbShVJjhhcBl3gY2DKnFe2UUAfNk+i69qFvLpfh/wAO6y2l2VwfEVw3iuycz3t0g2tCNg2yB1K/KQGY7vmrr/DWi69rOs6Rrdh4d03RtLt0hj1DSNTsnt1F0rB5Lq2hAK79pCJIx3cEHpXslFAHj/irVdY1T4h6L/ZFh45s/suqwWt5+5ePTZrdZW3yfKTuzkfMeCg5r2CiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "013311", + "Speciality": [ + "Consultant Internal Medicine", + "Consultant Nephrologist" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "استشاري أمراض الكلى\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 397826, + "Name": "NOUR ABDULLAH LAFY AL SHAMAILEH", + "ProjectID": 130, + "ProjectName": "Sahafa Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.66, + "DoctorAvailability": null, + "DoctorID": 397826, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.8113774", + "Longitude": "46.6239813", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/JOR.png", + "NationalityID": "JOR", + "NationalityName": "Jordanian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1114, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 12.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Sahafa", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioClhnO0jjnJHFAHQUV5//AMLT/wCpC8c/+Cf/AOzrQ0r4j6Pqnh691f7NfWf2W7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f8Ah7SI1jhjmj+RfMlI23Aw7YGQBtPPNAGva+KNY8HefF40vtK8R2OvytLbWGkyveXLef8AcVI5SAbYhXUAZ5YDnJrM0PVNNtfFVzcX/hHxB4Zn1h20LT5LDTVsoEhmcGORiTkXAOcsuRhRgHFZbXXhv/hDfDGuaHb65qH2DxXa2yvqKRy3vlpHvFvCU/5Z9NqZA3E1Y8VeJLPXdR0Xwv5fjLT76/8AEsGoeZq6iKS3jctHi3OSUVSfkGCAQeaAOvsNA87Ubaz1fV9VTRNN1tZbObX7nF7dajGQEWJmG17ZkyVAw5bdjivWK8Qm0+8m+MmkaH4v8Q7LHTbSG80hEvSPtUkdxshMwkGHuGG7dsAJ7HrXt9ABRRRQAV5/8WI7z+zvDV5Z6bfah9g8QWt5NDYwGWTy0DliFH4DnAyRzXoFFAHzx/ZHhv8A4TL/AISj/hEPid9u/tD+0PL/ALNj8vzPM8zGMZ257ZzjvW/4cbWIdOkvP+ETnf8AtLx0bnydT05zJa28gB+0Bf4GXpv5AOa9oooA8z8X2fxBurfUXfR/BWraXavJcWtpdW1xPO6qG2AJ90yleOO5IHWuM0rwfeeN/D17eeKPBtjoFjZeZKkOiaWbXUriREBCqsikNGwZgBwS6r6V7/RQB4vpWoaxNqN7Fp3h7xGmiab4Pks7ew1uycR3VxGRtDRqdrsyYU4wSNwxioLXxtrF94Nn07xH8Lb64voN39nW0Ph93so9se2LcrtkYJYHb0XpXt9FAHzZ4i8NfEG1t9A8TW+iabDBFcW91HoOiWtwqpMAZBJNbgYDgfIzZz91a6S6a88Y+DYNc8aeE9cs9btdVWK2fw9pxjvVjWPejZlywjDs/IONwXvmvb6KAPH9X0LR77xl4L1G80rxzcX0FpY+Tci3R449shZftbEZEgJJkx0FewUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "013311", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 405270, + "Name": "SHAHAD ABDULRAHMAN H ALSHEHRI", + "ProjectID": 130, + "ProjectName": "Sahafa Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.91, + "DoctorAvailability": null, + "DoctorID": 405270, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.8113774", + "Longitude": "46.6239813", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 669, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 12.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Sahafa", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAA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ITMJBh7hhu3bACex617fQAUUUUAFef8AxYjvP7O8NXlnpt9qH2DxBa3k0NjAZZPLQOWIUfgOcDJHNegUUAfPH9keG/8AhMv+Eo/4RD4nfbv7Q/tDy/7Nj8vzPM8zGMZ257ZzjvWpZafqWp+FdSt7jwrdmDXvGcpkjv8AT28+0tZ0ANwoIxG6A8ScqDnrXudFAHgHir4deJLH+xbPTvDnhW4sYNVgit5oLGR7mSNdwVr1lXBjIAMhHBNa9r8NNY/f3njS20rULGwlbUbaHSY3lufk5SyRZVx9mxvAhGOSOete0UUAeAaf4T1iHxlrur6n4f8A7UsX8P3F5otlfWTzx2uZA0FoUYYSRRkeUh4BIB5rQtfG2sX3g2fTvEfwtvri+g3f2dbQ+H3eyj2x7Ytyu2RglgdvRele30UAfNniLw18QbW30DxNb6JpsMEVxb3Ueg6Ja3CqkwBkEk1uBgOB8jNnP3VrpLprzxj4Ng1zxp4T1yz1u11VYrZ/D2nGO9WNY96NmXLCMOz8g43Be+a9vooA8f1fQtHvvGXgvUbzSvHNxfQWlj5NyLdHjj2yFl+1sRkSAkmTHQV7BRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "013311", + "Speciality": [ + "Consultant Internal Medicine", + "Consultant Infectious Disease " + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "\r\n\r\n\r\n\r\n\r\n\r\n\r\nاستشاري الأمراض المعدية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 142614, + "Name": "LUTFI ABDULLATIF MESFER ALSYALI", + "ProjectID": 130, + "ProjectName": "Sahafa Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.77, + "DoctorAvailability": null, + "DoctorID": 142614, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.8113774", + "Longitude": "46.6239813", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 604, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 12.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Sahafa", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAA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l7JbtBua3Zgu8yGQAlDwW75qmPBWpSeKtETWZ/HlzBq+hQRXl3A7O0E0r/PDK7LhYFGSyHJGcnNfRdFAHl8nw0s9L07ULO8tv7c0SPSpFhmuYxc6tDIBhYrdioVYwgJRRyHY9jXkHhGy8SeDvGV1eWfgjXLzRLrfZzQ32lSSSNZtIpYFRhTIUUDn5ck8Yr6vooA8T+H/AIt8Vaf4qvNLv/CniBfDt7eudPaTTpQ1kruqxocnZHAiA8KDt7cV7ZRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "013311", + "Speciality": [ + "Rheumatology Consultant" + ], + "SpecialityN": [ + "استشاري علاج أمراض الروماتيزم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 394223, + "Name": "FAISAL WALEED GHALIB SHAHWAN", + "ProjectID": 130, + "ProjectName": "Sahafa Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.67, + "DoctorAvailability": null, + "DoctorID": 394223, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/Sahafa/394223.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.8113774", + "Longitude": "46.6239813", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 502, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 12.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Sahafa", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioClhnO0jjnJHFAHQUV5//AMLT/wCpC8c/+Cf/AOzrQ0r4j6Pqnh691f7NfWf2W7ksfsV3Gkd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BLGL+2bRZba/8PaRGscMc0fyL5kpG24GHbAyANp55oA17XxRrHg7z4vGl9pXiOx1+Vpbaw0mV7y5bz/uKkcpANsQrqAM8sBzk1maHqmm2viq5uL/wj4g8Mz6w7aFp8lhpq2UCQzODHIxJyLgHOWXIwowDistrrw3/AMIb4Y1zQ7fXNQ+weK7W2V9RSOW98tI94t4Sn/LPptTIG4mrHirxJZ67qOi+F/L8ZaffX/iWDUPM1dRFJbxuWjxbnJKKpPyDBAIPNAHX2GgedqNtZ6vq+qpomm62stnNr9zi9utRjICLEzDa9syZKgYctuxxXrFeITafeTfGTSND8X+IdljptpDeaQiXpH2qSO42QmYSDD3DDdu2AE9j1r2+gAooooAK8/8AixHef2d4avLPTb7UPsHiC1vJobGAyyeWgcsQo/Ac4GSOa9AooA+eP7I8N/8ACZf8JR/wiHxO+3f2h/aHl/2bH5fmeZ5mMYztz2znHetSyi16TwrqT2/g2O5n1fxnLLHaa/pjusEMqDEzoOVCngvyBlhzXudFAHi9mt5qng3xb4X1fwDBZ31rFeT2cmn6OY7KaRY/LR4i2S0xJO0gZKgYrMiudSuvCvhTwponhjxd4dnF7ZjVb61sGtFddnlzOZF5JJw2WH8IJ6V73RQB4npmh+NvDHirxRb391qXiLSzoV3Np8d5JNdwStvAjikBAVpSqnKr1DHHWmWvjbWL7wbPp3iP4W31xfQbv7OtofD7vZR7Y9sW5XbIwSwO3ovSvb6KAPmzxF4a+INrb6B4mt9E02GCK4t7qPQdEtbhVSYAyCSa3AwHA+Rmzn7q10l0154x8Gwa5408J65Z63a6qsVs/h7TjHerGse9GzLlhGHZ+QcbgvfNe30UAeP6voWj33jLwXqN5pXjm4voLSx8m5Fujxx7ZCy/a2IyJASTJjoK9goooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "013311", + "Speciality": [ + "Consultant Nephrologist" + ], + "SpecialityN": [ + "استشاري أمراض الكلى\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 405264, + "Name": "ABDULELLAH AL MOHAYA", + "ProjectID": 130, + "ProjectName": "Sahafa Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.8, + "DoctorAvailability": null, + "DoctorID": 405264, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/Sahafa/405264.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.8113774", + "Longitude": "46.6239813", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 360, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 12.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Sahafa", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwU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CvUKACiiigArz/4sR3n9neGryz02+1D7B4gtbyaGxgMsnloHLEKPwHOBkjmvQKKAPnj+yPDf/CZf8JR/wiHxO+3f2h/aHl/2bH5fmeZ5mMYztz2znHet/wAONrEOnSXn/CJzv/aXjo3Pk6npzmS1t5AD9oC/wMvTfyAc17RRQB4/f/DSzh+IdzLpFtfPfaluvLy/v4wba1jklO82sirlLtThkzkAZJNXPDumzR6zr+l27eNb6dbK4t428Vky6XO24KCMDLBj7coWr1SigDg9Ns9SuvCraXomj2nh2cXv2TVWS2a0V12BZriz28kk48t2H8PI4rjLrQtYsfGUGo+HNKvrexn2+GdRuZrd0vZN0m6XUFZBg5AUidurdVr2+igDzPxjpOm3VxpPhm40/wAXTTy28NrJr2mQqzPCS0ZjubgjJQn53XGOjV55r+meJLfxlpeh+C9C1yz0S18qxuUurSSOyvpFkKPNOIhtkjdNm5yMsoPGMV9H0UAeN3Ok/EHRrjw7bpp/h+x0ttdtnuo/C8NxExXOHMowF8raPmJ9FzXslFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "013311", + "Speciality": [ + "Consultant Infectious Disease " + ], + "SpecialityN": [ + "\r\n\r\n\r\n\r\n\r\n\r\n\r\nاستشاري الأمراض المعدية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 408789, + "Name": "LINA ABDULRAHMAN A ALANSARI", + "ProjectID": 130, + "ProjectName": "Sahafa Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.82, + "DoctorAvailability": null, + "DoctorID": 408789, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.8113774", + "Longitude": "46.6239813", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 175, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 12.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Sahafa", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUv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3NwRkoT87rjHRq881/TPElv4y0vQ/Beha5Z6Ja+VY3KXVpJHZX0iyFHmnEQ2yRumzc5GWUHjGK+j6KAPG7nSfiDo1x4dt00/wAP2Oltrts91H4XhuImK5w5lGAvlbR8xPoua9koooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "013311", + "Speciality": [ + "Consultant Infectious Disease " + ], + "SpecialityN": [ + "\r\n\r\n\r\n\r\n\r\n\r\n\r\nاستشاري الأمراض المعدية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 406923, + "Name": "AREEJ GHAZI A MATAR", + "ProjectID": 130, + "ProjectName": "Sahafa Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.84, + "DoctorAvailability": null, + "DoctorID": 406923, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.8113774", + "Longitude": "46.6239813", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 75, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 12.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Sahafa", + "QR": "data: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sx2Jtj3glckDdjjNbnxMOg+GLfwLf2+v3d3BpdxYGPTo7xJFltYg5FwIxgM5C7fM4U5xxWPe+NdB8a3Gm6XYQeIL6BfEcWs6g2roksFra5KyLwxCQKGHDDaATk0Adn8J9CvLHxD4l1GLStKt9En1C6+w3K25S5kjZ0aPymxtNsUGV28E9OK9Yrh/A+q+JNU1HUfPsNKs/C1rLLa6X9nhkjkmjUr5UiZJRoTGeGXgkccV3FABRRRQAV5/8AFiO8/s7w1eWem32ofYPEFreTQ2MBlk8tA5YhR+A5wMkc16BRQB88f2R4b/4TL/hKP+EQ+J327+0P7Q8v+zY/L8zzPMxjGdue2c471safqHiTS/Buu3ln4e1yL+2fFdw00K2Ui3sNnNGC0sSgjbIMAKxyob1r2+igD5803wVr3hi4bW9Un8T6j4d1C4+0LpGnu813K0hD4vYWUIwKKUl5OWIHSjWIvGy/EvR9UsvBumzQS2UFvpqzaZM0GnQmYtEZscRTxjG7acKOlfQdFAHk/jLwP4k/4Q2bUdI1Sf8A4SnzTeXlzFcSeZ5flsz2lsyrv8nzMFIjxnqc1xg8FalJ4q0RNZn8eXMGr6FBFeXcDs7QTSv88MrsuFgUZLIckZyc19F0UAeXyfDSz0vTtQs7y2/tzRI9KkWGa5jFzq0MgGFit2KhVjCAlFHIdj2NeQeEbLxJ4O8ZXV5Z+CNcvNEut9nNDfaVJJI1m0ilgVGFMhRQOflyTxivq+igDxP4f+LfFWn+KrzS7/wp4gXw7e3rnT2k06UNZK7qsaHJ2RwIgPCg7e3Fe2UUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "013311", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 418305, + "Name": "YAZEED ALHINDI ", + "ProjectID": 130, + "ProjectName": "Sahafa Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.85, + "DoctorAvailability": null, + "DoctorID": 418305, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.8113774", + "Longitude": "46.6239813", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/DEU.png", + "NationalityID": "DEU", + "NationalityName": "German", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 75, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 12.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Sahafa", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1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IsZ4DgfKG5XJIr3OigDww6x428W2+t6WND1nw1pemWU93o7WFpNZzytGNsFu3JUgq3KIBkqMHiuns7nUrX4aaU/jzwxJ4inLwiK0srBrudF8nh50l5EoO8MR3YDua9MooA8fv9I/4qG5n07wh/xJP+EUbULfSrjTf9G/tHeSoeFRt+0bMKQPnxxnFULXxtrF94Nn07xH8Lb64voN39nW0Ph93so9se2LcrtkYJYHb0XpXt9FAHzZ4i8NfEG1t9A8TW+iabDBFcW91HoOiWtwqpMAZBJNbgYDgfIzZz91a6S6a88Y+DYNc8aeE9cs9btdVWK2fw9pxjvVjWPejZlywjDs/IONwXvmvb6KAPH9X0LR77xl4L1G80rxzcX0FpY+Tci3R449shZftbEZEgJJkx0FewUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "013311", + "Speciality": [ + "Consultant Nephrologist" + ], + "SpecialityN": [ + "استشاري أمراض الكلى\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 418866, + "Name": "RASHED ALRASHED", + "ProjectID": 130, + "ProjectName": "Sahafa Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.92, + "DoctorAvailability": null, + "DoctorID": 418866, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/Sahafa/418866.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.8113774", + "Longitude": "46.6239813", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 61, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 12.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Sahafa", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEA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KACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "013311", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 408805, + "Name": "FATIMAH SAAD ABDULLAH ALSHAHRANI", + "ProjectID": 130, + "ProjectName": "Sahafa Hospital", + "ActualDoctorRate": 4, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.42, + "DoctorAvailability": null, + "DoctorID": 408805, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 4.5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.8113774", + "Longitude": "46.6239813", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 71, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 12.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Sahafa", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDR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wlP+WfTamQNxNWPFXiSz13UdF8L+X4y0++v/ABLBqHmauoikt43LR4tzklFUn5BggEHmgDr7DQPO1G2s9X1fVU0TTdbWWzm1+5xe3WoxkBFiZhte2ZMlQMOW3Y4r1ivEJtPvJvjJpGh+L/EOyx020hvNIRL0j7VJHcbITMJBh7hhu3bACex617fQAUUUUAFef/FiO8/s7w1eWem32ofYPEFreTQ2MBlk8tA5YhR+A5wMkc16BRQB88f2R4b/AOEy/wCEo/4RD4nfbv7Q/tDy/wCzY/L8zzPMxjGdue2c471cMWpSeBdbe48G6lcwav4tnlktJ9MZ7uC1li5miQ8LKo4V+VDHHNe90UAeT6NoV543+HiadqelT2H9h6gP7FttStzF9ojhiCwfalYHcrbiH2YBwcYqTQ/DHjbRre5fxBqMbaXZXDarb2mgTzGcsgG2zRHAX7PtDARDHO0Zr1SigDxO8lm8W+OtV8QP4G1JoLLwvMlrb67pJKy3SS70CryCSGwACGPzYplr421i+8Gz6d4j+Ft9cX0G7+zraHw+72Ue2PbFuV2yMEsDt6L0r2+igD5s8ReGviDa2+geJrfRNNhgiuLe6j0HRLW4VUmAMgkmtwMBwPkZs5+6tdJdNeeMfBsGueNPCeuWet2uqrFbP4e04x3qxrHvRsy5YRh2fkHG4L3zXt9FAHj+r6Fo994y8F6jeaV45uL6C0sfJuRbo8ce2Qsv2tiMiQEkyY6CvYKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "013311", + "Speciality": [ + "Consultant Internal Medicine", + "Consultant Infectious Disease " + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "\r\n\r\n\r\n\r\n\r\n\r\n\r\nاستشاري الأمراض المعدية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 149425, + "Name": "EMAD ALI", + "ProjectID": 17, + "ProjectName": "Suwaidi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.85, + "DoctorAvailability": null, + "DoctorID": 149425, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/SUWAIDI/149425.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.567525", + "Longitude": " 46.641019", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/JOR.png", + "NationalityID": "JOR", + "NationalityName": "Jordanian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 11103, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 15.9, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Suwaidi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqD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51KytGR1YsIP3cSJIGbytzsAq/QGuj8G/CXw3D8PIbPUdL332pWgluJru3jNzaySRKGWNmTKbTkgHJBzXqFFAHj8Nh4w0LxDq+nT2n9oaJYeFJoNLtkjmltrjY+2JJlOFe4ZBhguMg8cVQtfG2sX3g2fTvEfwtvri+g3f2dbQ+H3eyj2x7Ytyu2RglgdvRele30UAfNniLw18QbW30DxNb6JpsMEVxb3Ueg6Ja3CqkwBkEk1uBgOB8jNnP3VrpLprzxj4Ng1zxp4T1yz1u11VYrZ/D2nGO9WNY96NmXLCMOz8g43Be+a9vooA8f1fQtHvvGXgvUbzSvHNxfQWlj5NyLdHjj2yFl+1sRkSAkmTHQV7BRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Nephrologist" + ], + "SpecialityN": [ + "استشاري أمراض الكلى" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 143723, + "Name": "MOHAMMED GAFFAR", + "ProjectID": 17, + "ProjectName": "Suwaidi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.87, + "DoctorAvailability": null, + "DoctorID": 143723, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/SUWAIDI/143723.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.567525", + "Longitude": " 46.641019", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/IRL.png", + "NationalityID": "IRL", + "NationalityName": "Irish", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 9643, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 15.9, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Suwaidi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPw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P/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 6760, + "Name": "AHMAD TAHA AL IRANI", + "ProjectID": 17, + "ProjectName": "Suwaidi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.65, + "DoctorAvailability": null, + "DoctorID": 6760, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/SUWAIDI/6760.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.567525", + "Longitude": " 46.641019", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/JOR.png", + "NationalityID": "JOR", + "NationalityName": "Jordanian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 8158, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 15.9, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Suwaidi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyM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K8Qm0+8m+MmkaH4v8Q7LHTbSG80hEvSPtUkdxshMwkGHuGG7dsAJ7HrXt9ABRRRQAV5/8WI7z+zvDV5Z6bfah9g8QWt5NDYwGWTy0DliFH4DnAyRzXoFFAHzx/ZHhv8A4TL/AISj/hEPid9u/tD+0PL/ALNj8vzPM8zGMZ257ZzjvWxpVtrFx4evf+Kavov7Z8aySf6XYutzY28yD/So/wDnnInaTkKc9a9vooA4/WfDmsX2nPpEUljcWMGlFLG9vmd72PUVBWOcvjAwDneo3hskVwc/hbQfCWjS6JrPhLxB4l1TU7c3F5q9npqXjRTSLscRzMAwIZS4yCRuBPWvbKKAPCNK8Ef8I5qN7Fp2jarqmiP4ak1W3sNbtfPjXUSRtRo1UKJtgCkD58FhnBqxa+NtYvvBs+neI/hbfXF9Bu/s62h8Pu9lHtj2xbldsjBLA7ei9K9vooA+bPEXhr4g2tvoHia30TTYYIri3uo9B0S1uFVJgDIJJrcDAcD5GbOfurXSXTXnjHwbBrnjTwnrlnrdrqqxWz+HtOMd6sax70bMuWEYdn5BxuC9817fRQB4/q+haPfeMvBeo3mleObi+gtLHybkW6PHHtkLL9rYjIkBJMmOgr2CiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 147460, + "Name": "SHADI NIZAR AL RAWWASH", + "ProjectID": 17, + "ProjectName": "Suwaidi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.62, + "DoctorAvailability": null, + "DoctorID": 147460, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/SUWAIDI/147460.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.567525", + "Longitude": " 46.641019", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/JOR.png", + "NationalityID": "JOR", + "NationalityName": "Jordanian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 6492, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 15.9, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Suwaidi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBA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abavazwWEiAuFONy3Ct0ByoKjPSucutC1ix8ZQaj4c0q+t7Gfb4Z1G5mt3S9k3SbpdQVkGDkBSJ26t1Wvb6KAPM/GOk6bdXGk+GbjT/F008tvDaya9pkKszwktGY7m4IyUJ+d1xjo1eea/pniS38ZaXofgvQtcs9EtfKsblLq0kjsr6RZCjzTiIbZI3TZucjLKDxjFfR9FAHjdzpPxB0a48O26af4fsdLbXbZ7qPwvDcRMVzhzKMBfK2j5ifRc17JRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 155561, + "Name": "NAGWA MUKHTAR", + "ProjectID": 17, + "ProjectName": "Suwaidi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.64, + "DoctorAvailability": null, + "DoctorID": 155561, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.567525", + "Longitude": " 46.641019", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SDN.png", + "NationalityID": "SDN", + "NationalityName": "Sudanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 6149, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 15.9, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Suwaidi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioClhnO0jjnJHFAHQUV5//AMLT/wCpC8c/+Cf/AOzqOf4x6Da+FZfEFxpmswwRamdLkt5IEWdJgm85Uvg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RpcZb7pYDuKuaNo1nqmnJeeLU1zQ9bkxp13DpYFtJNZkAve3iyAs0ZcsJJj8pKjIyDQAXXhe8+HPjKDxpFY6Hq+iarqqxWNraxG4kSOWTzY2gTCqJAiYUqxGSAMg5o0rX7yH4h3t54/0jXH8LaldyRWEOt2xNtaySSgxsyzHYm2PeCVyQN2OM1ufEw6D4Yt/At/b6/d3cGl3FgY9OjvEkWW1iDkXAjGAzkLt8zhTnHFY97410HxrcabpdhB4gvoF8RxazqDauiSwWtrkrIvDEJAoYcMNoBOTQB2fwn0K8sfEPiXUYtK0q30SfULr7DcrblLmSNnRo/KbG02xQZXbwT04r1iuH8D6r4k1TUdR8+w0qz8LWsstrpf2eGSOSaNSvlSJklGhMZ4ZeCRxxXcUAFFFFABXn/xYjvP7O8NXlnpt9qH2DxBa3k0NjAZZPLQOWIUfgOcDJHNegUUAfPH9keG/wDhMv8AhKP+EQ+J327+0P7Q8v8As2Py/M8zzMYxnbntnOO9alsPFUngXxFb6XoF3BP4m8UXMLR6lZyq0FrcxY81gvKhTjLfMo5617nRQB4BH8Pv+EI1HT9I0zTtcv77XLSPT9avVg82yt7eY7ZzE6qCsilQVLggKckGtuf4RQ+BLeXxB4Pgj1bVLVC4t9bQTqFUb8wrGit5+5FCnPdvUV7JRQB4hf8AhHx5ffDy51z7Z9n8Uz3bajvt5Z0uY7Noi/2JDt3jEh4hztB75rDHgrUpPFWiJrM/jy5g1fQoIry7gdnaCaV/nhldlwsCjJZDkjOTmvouigDy+T4aWel6dqFneW39uaJHpUiwzXMYudWhkAwsVuxUKsYQEoo5DsexryDwjZeJPB3jK6vLPwRrl5ol1vs5ob7SpJJGs2kUsCowpkKKBz8uSeMV9X0UAeJ/D/xb4q0/xVeaXf8AhTxAvh29vXOntJp0oayV3VY0OTsjgRAeFB29uK9soooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 118631, + "Name": "MOHAMMED SAAD AL SULAIMAN", + "ProjectID": 17, + "ProjectName": "Suwaidi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.74, + "DoctorAvailability": null, + "DoctorID": 118631, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/SUWAIDI/118631.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.567525", + "Longitude": " 46.641019", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 2326, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 15.9, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Suwaidi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAx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LWsstrpf2eGSOSaNSvlSJklGhMZ4ZeCRxxXcUAFFFFABXn/xYjvP7O8NXlnpt9qH2DxBa3k0NjAZZPLQOWIUfgOcDJHNegUUAfPH9keG/+Ey/4Sj/AIRD4nfbv7Q/tDy/7Nj8vzPM8zGMZ257ZzjvW3o+qa9o3hXWL9PCOpXMGr+LZ3utOutNd5zYSoC5EeQM4G3JyuSQc17ZRQB88WvwU8SX3iGfV7O9g0bRNWlZ5rKGWS3uY7OV9zQMgj2hghAKElQRjkCrmpeGpvCVuviDw3oniDXtU069/siC38QWpulihjBdZ7dUAYIGVQjggDc3HNe90UAeL3918R/G/wALLm8+zz6BrdlqDS+TbpcWslxbpATtReWZmdsAcAlfUVzg8FalJ4q0RNZn8eXMGr6FBFeXcDs7QTSv88MrsuFgUZLIckZyc19F0UAeXyfDSz0vTtQs7y2/tzRI9KkWGa5jFzq0MgGFit2KhVjCAlFHIdj2NeQeEbLxJ4O8ZXV5Z+CNcvNEut9nNDfaVJJI1m0ilgVGFMhRQOflyTxivq+igDxP4f8Ai3xVp/iq80u/8KeIF8O3t6509pNOlDWSu6rGhydkcCIDwoO3txXtlFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Infectious Disease" + ], + "SpecialityN": [ + "استشاري الأمراض المعدية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 334762, + "Name": "ABDULRAHMAN ABDULAZIZ ALMASOUD", + "ProjectID": 17, + "ProjectName": "Suwaidi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.56, + "DoctorAvailability": null, + "DoctorID": 334762, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/SUWAIDI/334762.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.567525", + "Longitude": " 46.641019", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1429, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 15.9, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Suwaidi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECB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+9tOM4qha+NtYvvBs+neI/hbfXF9Bu/s62h8Pu9lHtj2xbldsjBLA7ei9K9vooA+bPEXhr4g2tvoHia30TTYYIri3uo9B0S1uFVJgDIJJrcDAcD5GbOfurXSXTXnjHwbBrnjTwnrlnrdrqqxWz+HtOMd6sax70bMuWEYdn5BxuC9817fRQB4/q+haPfeMvBeo3mleObi+gtLHybkW6PHHtkLL9rYjIkBJMmOgr2CiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine and Hematology" + ], + "SpecialityN": [ + "استشاري الباطنية وأمراض الدم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 325423, + "Name": "TARIQ SALEH AL KHUWAITIR", + "ProjectID": 17, + "ProjectName": "Suwaidi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.66, + "DoctorAvailability": null, + "DoctorID": 325423, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.567525", + "Longitude": " 46.641019", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 933, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 15.9, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Suwaidi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioClhnO0jjnJHFAHQUV5//AMLT/wCpC8c/+Cf/AOzqOf4x6Da+FZfEFxpmswwRamdLkt5IEWdJgm85UvgADjrnPagD0SiuTf4gabJ4VtPEGl2Op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J5sbQJhVEgRMKVYjJAGQc0aVr95D8Q7288f6Rrj+FtSu5IrCHW7Ym2tZJJQY2ZZjsTbHvBK5IG7HGa3PiYdB8MW/gW/t9fu7uDS7iwMenR3iSLLaxByLgRjAZyF2+Zwpzjise98a6D41uNN0uwg8QX0C+I4tZ1BtXRJYLW1yVkXhiEgUMOGG0AnJoA7P4T6FeWPiHxLqMWlaVb6JPqF19huVtylzJGzo0flNjabYoMrt4J6cV6xXD+B9V8SapqOo+fYaVZ+FrWWW10v7PDJHJNGpXypEySjQmM8MvBI44ruKACiiigArz/4sR3n9neGryz02+1D7B4gtbyaGxgMsnloHLEKPwHOBkjmvQKKAPnj+yPDf/CZf8JR/wAIh8Tvt39of2h5f9mx+X5nmeZjGM7c9s5x3rUtrnXrXwL4idPDGsmDXvFFyLq0awf7WlhPF87onQOBwCcru4Oa9zooA8z0nTfFWjaNY63btI0Flbx28ekSGUsdMRQ4JhAA/tDA2dQnasvWZvGEOov4v1PRf7UsXtCmi6NbWs08lrcEmSCe4gbhJFGUd0OQSAOua9gooA8Qv9G8SeI/h5c65pCa5pfilLtri8e/EkFy0YiLvbWpUFzb+YRsjJxkHPIrDHgrUpPFWiJrM/jy5g1fQoIry7gdnaCaV/nhldlwsCjJZDkjOTmvouigDy+T4aWel6dqFneW39uaJHpUiwzXMYudWhkAwsVuxUKsYQEoo5DsexryDwjZeJPB3jK6vLPwRrl5ol1vs5ob7SpJJGs2kUsCowpkKKBz8uSeMV9X0UAeJ/D/AMW+KtP8VXml3/hTxAvh29vXOntJp0oayV3VY0OTsjgRAeFB29uK9soooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 419326, + "Name": "THAHABA SAAD ALMALKI", + "ProjectID": 17, + "ProjectName": "Suwaidi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.87, + "DoctorAvailability": null, + "DoctorID": 419326, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.567525", + "Longitude": " 46.641019", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 312, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 15.9, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Suwaidi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKF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f8JR/wiHxO+3f2h/aHl/2bH5fmeZ5mMYztz2znHetSy0/UtT8K6lb3HhW7MGveM5TJHf6e3n2lrOgBuFBGI3QHiTlQc9a9zooA8Q8ceE/+Qd4A07w/ff2J9kint9QsLL/AJiPzQq91Io2+XswzkLv6HpxU83wvs/C3g3SNIg0ODV77VdQhtdUvXtBcSWccse2WSFwgMaoVyrMCFJyc5r2iigDyfWdCvLHxC+nRaVPrOiaT4PP2G2vrc3FtJeROVjyuNpmKDHy4YgnGAayLXxtrF94Nn07xH8Lb64voN39nW0Ph93so9se2LcrtkYJYHb0XpXt9FAHzZ4i8NfEG1t9A8TW+iabDBFcW91HoOiWtwqpMAZBJNbgYDgfIzZz91a6S6a88Y+DYNc8aeE9cs9btdVWK2fw9pxjvVjWPejZlywjDs/IONwXvmvb6KAPH9X0LR77xl4L1G80rxzcX0FpY+Tci3R449shZftbEZEgJJkx0FewUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine / Allergy and Immunology" + ], + "SpecialityN": [ + "استشاري الطب الباطني / أمراض الحساسية والمناعة" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 191285, + "Name": "ABDULRAHMAN ALI KHORMI", + "ProjectID": 17, + "ProjectName": "Suwaidi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.59, + "DoctorAvailability": null, + "DoctorID": 191285, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.567525", + "Longitude": " 46.641019", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 293, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 15.9, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Suwaidi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZG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gYDgfIzZz91a6S6a88Y+DYNc8aeE9cs9btdVWK2fw9pxjvVjWPejZlywjDs/IONwXvmvb6KAPH9X0LR77xl4L1G80rxzcX0FpY+Tci3R449shZftbEZEgJJkx0FewUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Rheumatologist", + "Specialist Internal Medicine " + ], + "SpecialityN": [ + "استشاري أمراض الروماتيزم", + "أخصائي أمراض باطنة" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 412659, + "Name": "BASHAYR MARZOUQ ALOTAIBI", + "ProjectID": 17, + "ProjectName": "Suwaidi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.86, + "DoctorAvailability": null, + "DoctorID": 412659, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/SUWAIDI/412659.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.567525", + "Longitude": " 46.641019", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 137, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 15.9, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Suwaidi", +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7eeP9I1x/C2pXckVhDrdsTbWskkoMbMsx2Jtj3glckDdjjNbnxMOg+GLfwLf2+v3d3BpdxYGPTo7xJFltYg5FwIxgM5C7fM4U5xxWPe+NdB8a3Gm6XYQeIL6BfEcWs6g2roksFra5KyLwxCQKGHDDaATk0Adn8J9CvLHxD4l1GLStKt9En1C6+w3K25S5kjZ0aPymxtNsUGV28E9OK9Yrh/A+q+JNU1HUfPsNKs/C1rLLa6X9nhkjkmjUr5UiZJRoTGeGXgkccV3FABRRRQAV5/8WI7z+zvDV5Z6bfah9g8QWt5NDYwGWTy0DliFH4DnAyRzXoFFAHzx/ZHhv/hMv+Eo/wCEQ+J327+0P7Q8v+zY/L8zzPMxjGdue2c4710fhi51610a/dPDF2YNe8ZyC6tNSsH3JYTqN7snQADgk5XqDmvZKKAPnjU/h9Z339s6v4j07xlceRrc+n6dZaTAH8uzXLRFEdeIRlgCp2jgAVTg+E2vSW8Wl6Nd6zYztcDWbNryR4rSCHG1Fk2plb5TjIAwFBwa+k6KAPH9Z8I+PLf4WPZ2d5Y2et2t2byabRpZ45L6NYCGLsF3SXDvgnPDEDnNcoPBWpSeKtETWZ/HlzBq+hQRXl3A7O0E0r/PDK7LhYFGSyHJGcnNfRdFAHl8nw0s9L07ULO8tv7c0SPSpFhmuYxc6tDIBhYrdioVYwgJRRyHY9jXkHhGy8SeDvGV1eWfgjXLzRLrfZzQ32lSSSNZtIpYFRhTIUUDn5ck8Yr6vooA8T+H/i3xVp/iq80u/wDCniBfDt7eudPaTTpQ1kruqxocnZHAiA8KDt7cV7ZRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Internal Medicine", + "Consultant Pulmonology" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "استشاري علاج الأمراض الصدرية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 408368, + "Name": "BASEN ABDRABALAMEER ALALI", + "ProjectID": 17, + "ProjectName": "Suwaidi Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.71, + "DoctorAvailability": null, + "DoctorID": 408368, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/SUWAIDI/408368.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.567525", + "Longitude": " 46.641019", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 94, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 15.9, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Suwaidi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRI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/+LEd5/Z3hq8s9NvtQ+weILW8mhsYDLJ5aByxCj8BzgZI5r0CigD54/sjw3/wmX/CUf8Ih8Tvt39of2h5f9mx+X5nmeZjGM7c9s5x3rUtrnXrXwL4idPDGsmDXvFFyLq0awf7WlhPF87onQOBwCcru4Oa9zooA+eLD4S/2Lp1tef2XPf8A9uagtj5Nxb+bJp+nTAHznXYPKuY8YL8opPQ1cPgrxV4SuNbTRp9SvtUXTJ4rO7neWWCLTM/JDE6qGF4GUFUHyAHIr3uigDx/Vf8AhMPFPwbsv7I/tzSNb0ry/tn2vzre5vPKtzv8vblpN7sMZxuIOcEVyg8FalJ4q0RNZn8eXMGr6FBFeXcDs7QTSv8APDK7LhYFGSyHJGcnNfRdFAHl8nw0s9L07ULO8tv7c0SPSpFhmuYxc6tDIBhYrdioVYwgJRRyHY9jXkHhGy8SeDvGV1eWfgjXLzRLrfZzQ32lSSSNZtIpYFRhTIUUDn5ck8Yr6vooA8T+H/i3xVp/iq80u/8ACniBfDt7eudPaTTpQ1kruqxocnZHAiA8KDt7cV7ZRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Consultant Nephrologist" + ], + "SpecialityN": [ + "استشاري أمراض الكلى" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 134050, + "Name": "SANAA TAHIR ", + "ProjectID": 17, + "ProjectName": "Suwaidi Hospital", + "ActualDoctorRate": 4, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.33, + "DoctorAvailability": null, + "DoctorID": 134050, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 4.5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "24.567525", + "Longitude": " 46.641019", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/GBR.png", + "NationalityID": "GBR", + "NationalityName": "British", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 10094, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 15.9, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Suwaidi", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVY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8eXMGr6FBFeXcDs7QTSv88MrsuFgUZLIckZyc19F0UAeXyfDSz0vTtQs7y2/tzRI9KkWGa5jFzq0MgGFit2KhVjCAlFHIdj2NeQeEbLxJ4O8ZXV5Z+CNcvNEut9nNDfaVJJI1m0ilgVGFMhRQOflyTxivq+igDxP4f+LfFWn+KrzS7/AMKeIF8O3t6509pNOlDWSu6rGhydkcCIDwoO3txXtlFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "010266", + "Speciality": [ + "Nephrologist Consultant" + ], + "SpecialityN": [ + "استشاري أمراض الكلى" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 33249, + "Name": "SARA FAKHREDINE", + "ProjectID": 152, + "ProjectName": "AlNarjis Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.9, + "DoctorAvailability": null, + "DoctorID": 33249, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.869826060310395", + "Longitude": "46.64015390240179", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/LBN.png", + "NationalityID": "LBN", + "NationalityName": "LEBANON, LEBANESE REPUBLIC                           ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1073, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 18.1, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "AlNarjis", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioClhnO0jjnJHFAHQUV5//AMLT/wCpC8c/+Cf/AOzrQ0r4j6Pqnh691f7NfWf2W7ksfsV3GkdzNcKgbyY03HdIc4C5ySCMUAdhRXDx/FLR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GL+2bRZba/wDD2kRrHDHNH8i+ZKRtuBh2wMgDaeeaANe18Uax4O8+LxpfaV4jsdflaW2sNJle8uW8/wC4qRykA2xCuoAzywHOTWZoeqaba+Krm4v/AAj4g8Mz6w7aFp8lhpq2UCQzODHIxJyLgHOWXIwowDistrrw3/whvhjXNDt9c1D7B4rtbZX1FI5b3y0j3i3hKf8ALPptTIG4mrHirxJZ67qOi+F/L8ZaffX/AIlg1DzNXURSW8blo8W5ySiqT8gwQCDzQB19hoHnajbWer6vqqaJputrLZza/c4vbrUYyAixMw2vbMmSoGHLbscV6xXiE2n3k3xk0jQ/F/iHZY6baQ3mkIl6R9qkjuNkJmEgw9ww3btgBPY9a9voAKKKKACvP/ixHef2d4avLPTb7UPsHiC1vJobGAyyeWgcsQo/Ac4GSOa9AooA+eP7I8N/8Jl/wlH/AAiHxO+3f2h/aHl/2bH5fmeZ5mMYztz2znHerh0/XtT8C63b2/hWQz694tnMcer6e+60hniwLjAGYyhP+s5A56173RQB4npo174Q27eH9L0DUtZguNM+2tcWtm9wq6mwCbCy7QIAIwcY38jnmsjQ/BmpXWs3Nx4w8NRzQSo3ioyWFgzTvMWB+wMZFwQRuzD1zj5utfQdFAHhGn6F4kh8Q67PqelT6poj6JcanoulX1vJPbWshcGC3MLDakypldicgEgHBqxa+NtYvvBs+neI/hbfXF9Bu/s62h8Pu9lHtj2xbldsjBLA7ei9K9vooA+bPEXhr4g2tvoHia30TTYYIri3uo9B0S1uFVJgDIJJrcDAcD5GbOfurXSXTXnjHwbBrnjTwnrlnrdrqqxWz+HtOMd6sax70bMuWEYdn5BxuC9817fRQB4/q+haPfeMvBeo3mleObi+gtLHybkW6PHHtkLL9rYjIkBJMmOgr2CiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 41011, + "Name": "AMJAD ABU MUHANNA", + "ProjectID": 152, + "ProjectName": "AlNarjis Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.66, + "DoctorAvailability": null, + "DoctorID": 41011, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.869826060310395", + "Longitude": "46.64015390240179", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/JOR.png", + "NationalityID": "JOR", + "NationalityName": "JORDAN, HASHEMITE KINGDOM OF                         ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 790, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 18.1, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "AlNarjis", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/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TQ2MBlk8tA5YhR+A5wMkc16BRQB88f2R4b/4TL/hKP8AhEPid9u/tD+0PL/s2Py/M8zzMYxnbntnOO9dP4R1DxJpenXV5Z+Hr6L+2fGrtNDfWUiyQ2cwUtKVBG3GANxyoOetewUUAeJ6D4Qhuvi54vRNM8QWml6ppl7b3V3e24jV5pZxvMD7dpQryucngk5rE8caF4kt9R07V/C+larLY6NFF4eeyuLeRpL6OEsxZ0jGJLZxtBOQGPG0V9D0UAeCJovirX/hpd6ppfh208JeIrS9csum2UthPc2qQ7ti7QXcs5GBnaSg7is8eCtSk8VaImsz+PLmDV9CgivLuB2doJpX+eGV2XCwKMlkOSM5Oa+i6KAPL5PhpZ6Xp2oWd5bf25okelSLDNcxi51aGQDCxW7FQqxhASijkOx7GvIPCNl4k8HeMrq8s/BGuXmiXW+zmhvtKkkkazaRSwKjCmQooHPy5J4xX1fRQB4n8P8Axb4q0/xVeaXf+FPEC+Hb29c6e0mnShrJXdVjQ5OyOBEB4UHb24r2yiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية " + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 39693, + "Name": "AHMED ALGHAMDI", + "ProjectID": 152, + "ProjectName": "AlNarjis Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.66, + "DoctorAvailability": null, + "DoctorID": 39693, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.869826060310395", + "Longitude": "46.64015390240179", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "SAUDI ARABIA, KINGDOM OF                             ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 781, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 18.1, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "AlNarjis", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2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AZju+auv8NaLr2s6zpGt2Hh3TdG0u3SGPUNI1Oye3UXSsHkuraEArv2kIkjHdwQeleyUUAeP+KtV1jVPiHov9kWHjmz+y6rBa3n7l49Nmt1lbfJ8pO7OR8x4KDmvYKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Senior Specialist Pulmonology" + ], + "SpecialityN": [ + "أخصائي أول أمراض الرئة" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 48479, + "Name": "EBTEHAL ELHASSAN", + "ProjectID": 152, + "ProjectName": "AlNarjis Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.9, + "DoctorAvailability": null, + "DoctorID": 48479, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.869826060310395", + "Longitude": "46.64015390240179", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SDN.png", + "NationalityID": "SDN", + "NationalityName": "SUDAN, DEMOCRATIC REPUBLIC OF THE                    ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 494, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 18.1, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "AlNarjis", + "QR": "data:image/png;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AbYhXUAZ5YDnJrM0PVNNtfFVzcX/hHxB4Zn1h20LT5LDTVsoEhmcGORiTkXAOcsuRhRgHFZbXXhv/AIQ3wxrmh2+uah9g8V2tsr6ikct75aR7xbwlP+WfTamQNxNWPFXiSz13UdF8L+X4y0++v/EsGoeZq6iKS3jctHi3OSUVSfkGCAQeaAOvsNA87Ubaz1fV9VTRNN1tZbObX7nF7dajGQEWJmG17ZkyVAw5bdjivWK8Qm0+8m+MmkaH4v8AEOyx020hvNIRL0j7VJHcbITMJBh7hhu3bACex617fQAUUUUAFef/ABYjvP7O8NXlnpt9qH2DxBa3k0NjAZZPLQOWIUfgOcDJHNegUUAfPH9keG/+Ey/4Sj/hEPid9u/tD+0PL/s2Py/M8zzMYxnbntnOO9allLqVr4V1K/uPA13qMGoeM5bqTTr/AElpp0tZEBMixngOB8oblckivc6KAPI4PJ0+4iQfDS0XVL1xcaPd2mhAQWSuf3AvH+9HKjDMmzO0YIroNW0PXtf8C31v4wupIZ4nkmMfhSR1a5hERHkkSAlyxLfL0Py+9d5RQB88eFbLWJtR1qKfwROmiabok7aXYahpTiO6uIyvlSyxn5XuWT5WZcEjIHFbFr421i+8Gz6d4j+Ft9cX0G7+zraHw+72Ue2PbFuV2yMEsDt6L0r2+igD5s8ReGviDa2+geJrfRNNhgiuLe6j0HRLW4VUmAMgkmtwMBwPkZs5+6tdJdNeeMfBsGueNPCeuWet2uqrFbP4e04x3qxrHvRsy5YRh2fkHG4L3zXt9FAHj+r6Fo994y8F6jeaV45uL6C0sfJuRbo8ce2Qsv2tiMiQEkyY6CvYKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 48851, + "Name": "FARIS ALSALEH", + "ProjectID": 152, + "ProjectName": "AlNarjis Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.67, + "DoctorAvailability": null, + "DoctorID": 48851, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.869826060310395", + "Longitude": "46.64015390240179", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "SAUDI ARABIA, KINGDOM OF                             ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 82, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 18.1, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "AlNarjis", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2Jygg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o7qzdZ4LC5QB5QOilR/Edyg5zmvbKKAPF/Cvge8t9O1qfV9U8ZS2OjahPBZ6V9oLR31nCFKJ5LLiRXGVwMKw4GK5R/h3421P4l2mqWUccMESJqumrqSzLBaQibdFZthcRugIzEpwBnBr6TooA8n8UeHPHk3w8vPscmlaXraag+oTf8I808H2qMRNuHA3PMz44PBwvORXGDwVqUnirRE1mfx5cwavoUEV5dwOztBNK/zwyuy4WBRkshyRnJzX0XRQB5fJ8NLPS9O1CzvLb+3NEj0qRYZrmMXOrQyAYWK3YqFWMICUUch2PY15B4RsvEng7xldXln4I1y80S632c0N9pUkkjWbSKWBUYUyFFA5+XJPGK+r6KAPE/h/4t8Vaf4qvNLv8Awp4gXw7e3rnT2k06UNZK7qsaHJ2RwIgPCg7e3Fe2UUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 51271, + "Name": "DHAFER ALSHEHRI", + "ProjectID": 152, + "ProjectName": "AlNarjis Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 5, + "DoctorAvailability": null, + "DoctorID": 51271, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.869826060310395", + "Longitude": "46.64015390240179", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "SAUDI ARABIA, KINGDOM OF                             ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 60, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 18.1, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "AlNarjis", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMn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4a0XXtZ1nSNbsPDum6NpdukMeoaRqdk9uoulYPJdW0IBXftIRJGO7gg9K9kooA8f8VarrGqfEPRf7IsPHNn9l1WC1vP3Lx6bNbrK2+T5Sd2cj5jwUHNewUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 42971, + "Name": "SAIF ALSAIF", + "ProjectID": 152, + "ProjectName": "AlNarjis Medical-Center", + "ActualDoctorRate": 4, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.47, + "DoctorAvailability": null, + "DoctorID": 42971, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 4.5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "24.869826060310395", + "Longitude": "46.64015390240179", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "SAUDI ARABIA, KINGDOM OF                             ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 279, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 18.1, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "AlNarjis", + "QR": "data:image/png;base64,/9j/4AAQSkZ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Wz1HwV9osYLSCK4m8T6VI/mXiowZlZmwcgEgn5j81cnO/irRviXK+s2WpNBZawddvLSzilMBVJvnuI0bA2YBAc44wCa6jxX4xh8T+FTceH9G8T6tBa67/AGvcSavaie0iVUYtBlGIWIBl+Q9FJ55oAy/hTa/8JH4yW80i4n0vW01D7deQ27+RZNpwkQvCirli28gBD8m0cnIr6nry/SNGs/Efh7wtrnhBND0u+S7tLjV30wCDdGEDzWxMYJPJX925xwM9BXqFABRRRQAV5/8AFiO8/s7w1eWem32ofYPEFreTQ2MBlk8tA5YhR+A5wMkc16BRQB88f2R4b/4TL/hKP+EQ+J327+0P7Q8v+zY/L8zzPMxjGdue2c471cMWpSeBdbe48G6lcwav4tnlktJ9MZ7uC1li5miQ8LKo4V+VDHHNe90UAeGeCvBXjbwJcTa3pc8c3h2VGuG0i6eZrsQkq+BCqqn2rYgTrjdkdKn8V6Hr11cG/wDD914umnlt/wC2bjTtXkdrB4SWLWPloMmUnavknjbkZr2yigDyvwV4U8Vaf4Fmt0Gm6ZPrepte3UcPmwtZWs0Sh0hGMxzoR8oOVXHJNYl1oWsWPjKDUfDmlX1vYz7fDOo3M1u6Xsm6TdLqCsgwcgKRO3Vuq17fRQB5n4x0nTbq40nwzcaf4umnlt4bWTXtMhVmeElozHc3BGShPzuuMdGrzzX9M8SW/jLS9D8F6Frlnolr5VjcpdWkkdlfSLIUeacRDbJG6bNzkZZQeMYr6PooA8budJ+IOjXHh23TT/D9jpba7bPdR+F4biJiucOZRgL5W0fMT6LmvZKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية " + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 13769, + "Name": "MUATH ABDULAZIZ ALSHAIKH", + "ProjectID": 21, + "ProjectName": "Qassim Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.84, + "DoctorAvailability": null, + "DoctorID": 13769, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/QASSIM/13769.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "26.360724", + "Longitude": "43.945774", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/YEM.png", + "NationalityID": "YEM", + "NationalityName": "Yemeni                                     ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 8303, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 329.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Qassim", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1h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TXPkvpzm9tbeSPP2iFf4Jl6K/IDV7vRQB4RH4C1jxj8Q9Pl8RnVbOxtdEjl06/ti8dyu2X90txI6kC5AZmcL3AIq3bfDGbwlb+Irh5NS1XVPEL3OkWskRM6xQ3Ayk90dgYEMvzuMgZ4BzXtlFAHnfh/wAKeKtG8CweH0Hh+xna4WG6uNN82Jja+UEeZWwD9qyMhiNvAzXKXWhaxY+MoNR8OaVfW9jPt8M6jczW7peybpN0uoKyDByApE7dW6rXt9FAHmfjHSdNurjSfDNxp/i6aeW3htZNe0yFWZ4SWjMdzcEZKE/O64x0avPNf0zxJb+MtL0PwXoWuWeiWvlWNyl1aSR2V9IshR5pxENskbps3ORllB4xivo+igDxu50n4g6NceHbdNP8P2Oltrts91H4XhuImK5w5lGAvlbR8xPoua9koooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "051431", + "Speciality": [ + "Resident Internal Medicine" + ], + "SpecialityN": [ + "طبيب أمراض باطنية مقيم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 7716, + "Name": "GAAFAR ABU EL-HASSAN", + "ProjectID": 21, + "ProjectName": "Qassim Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.82, + "DoctorAvailability": null, + "DoctorID": 7716, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/QASSIM/7716.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "26.360724", + "Longitude": "43.945774", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SDN.png", + "NationalityID": "SDN", + "NationalityName": "Sudanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 4561, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 329.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Qassim", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6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0FpY+Tci3R449shZftbEZEgJJkx0FewUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "051431", + "Speciality": [ + "Consultant Pulmonology" + ], + "SpecialityN": [ + "استشاري علاج الأمراض الصدرية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 4778, + "Name": "MOHAMMAD OBEIDAT", + "ProjectID": 21, + "ProjectName": "Qassim Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.81, + "DoctorAvailability": null, + "DoctorID": 4778, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/QASSIM/4778.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.360724", + "Longitude": "43.945774", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/JOR.png", + "NationalityID": "JOR", + "NationalityName": "Jordanian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 4156, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 329.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Qassim", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4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HZx+F/+Ep8Q6f408OWOq+GL6HUI4tRtb6L7F9stw/mysUQEyM5ZRlmw20g9M16xXk9hoGseI9RtvEekav4y0vZray3mma/cvBG1uCHdYolByvIVQTjAYHpXrFABRRRQAV5/8WI7z+zvDV5Z6bfah9g8QWt5NDYwGWTy0DliFH4DnAyRzXoFFAHzx/ZHhv8A4TL/AISj/hEPid9u/tD+0PL/ALNj8vzPM8zGMZ257ZzjvVj+wtY13w9/yCtc0/7f8QPt3/Hu8Vzb27p/ruh2bc/e5AI617/RQB4nqz+KtQ0a+0vxBZeIG8O2V7Jptu2iRSnVL1UUqss2/wCSSB0LbmAG59vGKktprPVNR8P6d/YvxOs7G1ittP8As0tqI7KaNTtzcryGUg4c9Co6V7RRQB4v8UfDv/Hj4c8F+F59Pvr+WNbnU9O0/wAq2+zvvR4ppYhnbnYzKQRgA+lR3tz4q8JaNpuiXHhiS+1RbeKwk1fQLCWVotM2lCqTHDC4DLvAxsGVOK9sooA+bJ9F17ULeXS/D/h3WW0uyuD4iuG8V2Tme9ukG1oRsG2QOpX5SAzHd81df4a0XXtZ1nSNbsPDum6NpdukMeoaRqdk9uoulYPJdW0IBXftIRJGO7gg9K9kooA8f8VarrGqfEPRf7IsPHNn9l1WC1vP3Lx6bNbrK2+T5Sd2cj5jwUHNewUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "051431", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 299710, + "Name": "HUDA MOHAMED MAHMOD SALIH", + "ProjectID": 21, + "ProjectName": "Qassim Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.9, + "DoctorAvailability": null, + "DoctorID": 299710, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": true, + "Latitude": "26.360724", + "Longitude": "43.945774", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SDN.png", + "NationalityID": "SDN", + "NationalityName": "Sudanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 4061, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 329.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Qassim", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo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6N4VuUuPCV3rPiK41NrSS71fTVuFN0yDNxvID/AGPeM7/vck4ya7Dw/wCFNS0+4gt9UGm32lqi3qxy7pWsr/IGy1DDbHbooOwfeXPWu0ooA8Ml8Ia9a/EvxXqmt6ZH4igOj3l3pS3Vu93AjeduhtxuXAcDPyKejHB5qS18baxfeDZ9O8R/C2+uL6Dd/Z1tD4fd7KPbHti3K7ZGCWB29F6V7fRQB82eIvDXxBtbfQPE1vommwwRXFvdR6DolrcKqTAGQSTW4GA4HyM2c/dWukumvPGPg2DXPGnhPXLPW7XVVitn8PacY71Y1j3o2ZcsIw7PyDjcF75r2+igDx/V9C0e+8ZeC9RvNK8c3F9BaWPk3It0eOPbIWX7WxGRICSZMdBXsFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "051431", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 364042, + "Name": "HUSSEIN TALEB", + "ProjectID": 21, + "ProjectName": "Qassim Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.66, + "DoctorAvailability": null, + "DoctorID": 364042, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.360724", + "Longitude": "43.945774", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/LBN.png", + "NationalityID": "LBN", + "NationalityName": "Lebanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 631, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 329.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Qassim", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8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KKKKACiiigAooooAKKKKACiiigD/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "051431", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 35257, + "Name": "SALMA GAFAR SALMA GAFAR", + "ProjectID": 156, + "ProjectName": "Buraydah Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.75, + "DoctorAvailability": null, + "DoctorID": 35257, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.4119376", + "Longitude": "43.9164603", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SDN.png", + "NationalityID": "SDN", + "NationalityName": "SUDAN, DEMOCRATIC REPUBLIC OF THE                    ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 733, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 334.8, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "Buraydah", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIR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r/xLBqHmauoikt43LR4tzklFUn5BggEHmgDr7DQPO1G2s9X1fVU0TTdbWWzm1+5xe3WoxkBFiZhte2ZMlQMOW3Y4r1ivEJtPvJvjJpGh+L/EOyx020hvNIRL0j7VJHcbITMJBh7hhu3bACex617fQAUUUUAFef8AxYjvP7O8NXlnpt9qH2DxBa3k0NjAZZPLQOWIUfgOcDJHNegUUAfPH9keG/8AhMv+Eo/4RD4nfbv7Q/tDy/7Nj8vzPM8zGMZ257ZzjvVwxalJ4F1t7jwbqVzBq/i2eWS0n0xnu4LWWLmaJDwsqjhX5UMcc173RQB5XB4Ymk8KxeFNG1HxrYztZDVbO+vJzEsDbPLSzkkUZUKcMYgOMEg1wlh4T8YeFvENtoOo+H7HV/7Vu1nuPEVvZTXFzZ+a4RnS5YDy5E2mQEg7Sd3Oa+j6KAPG7zSfFUfirVbfW9Pj17S9O8OTPpUc0Mt1BPNG+ITMGG1rplzuK4JDcdaqWvjbWL7wbPp3iP4W31xfQbv7OtofD7vZR7Y9sW5XbIwSwO3ovSvb6KAPmzxF4a+INrb6B4mt9E02GCK4t7qPQdEtbhVSYAyCSa3AwHA+Rmzn7q10l0154x8Gwa5408J65Z63a6qsVs/h7TjHerGse9GzLlhGHZ+QcbgvfNe30UAeP6voWj33jLwXqN5pXjm4voLSx8m5Fujxx7ZCy/a2IyJASTJjoK9goooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 51912, + "Name": "MUATH ALHARBI MUATH ALHARBI", + "ProjectID": 156, + "ProjectName": "Buraydah Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.96, + "DoctorAvailability": null, + "DoctorID": 51912, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.4119376", + "Longitude": "43.9164603", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "SAUDI ARABIA, KINGDOM OF                             ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 56, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 334.8, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "Buraydah", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i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nk/wCEo8KeHNQvrCI7P7M04SyXEaRjGfMUF5mIb0BJFekUUAeEQ6dZ6p4y1fV9O+G09nY2vhqb7PZanoQjjmvFk3LhFBDMQQODuIBFWLXxtrF94Nn07xH8Lb64voN39nW0Ph93so9se2LcrtkYJYHb0XpXt9FAHzZ4i8NfEG1t9A8TW+iabDBFcW91HoOiWtwqpMAZBJNbgYDgfIzZz91a6S6a88Y+DYNc8aeE9cs9btdVWK2fw9pxjvVjWPejZlywjDs/IONwXvmvb6KAPH9X0LR77xl4L1G80rxzcX0FpY+Tci3R449shZftbEZEgJJkx0FewUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Consultant Internal Medicine,Rheumatology Consultant" + ], + "SpecialityN": [ + "استشاري طب الباطنية ,استشاري علاج أمراض الروماتيزم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 47992, + "Name": "SAMI ALOMARI SAMI ALOMARI", + "ProjectID": 156, + "ProjectName": "Buraydah Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.75, + "DoctorAvailability": null, + "DoctorID": 47992, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.4119376", + "Longitude": "43.9164603", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "SAUDI ARABIA, KINGDOM OF                             ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 20, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 334.8, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "Buraydah", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrP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AooooAKKKKAP/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Rheumatology Consultant" + ], + "SpecialityN": [ + "استشاري علاج أمراض الروماتيزم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 59275, + "Name": "OMAR AHMED OMAR AHMED ABDULRAHMAN ALSAQAB", + "ProjectID": 156, + "ProjectName": "Buraydah Medical-Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.75, + "DoctorAvailability": null, + "DoctorID": 59275, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.4119376", + "Longitude": "43.9164603", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "SAUDI ARABIA, KINGDOM OF                             ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 4, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 334.8, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "Buraydah", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgy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V9RSOW98tI94t4Sn/LPptTIG4mrHirxJZ67qOi+F/L8ZaffX/iWDUPM1dRFJbxuWjxbnJKKpPyDBAIPNAHX2GgedqNtZ6vq+qpomm62stnNr9zi9utRjICLEzDa9syZKgYctuxxXrFeITafeTfGTSND8X+IdljptpDeaQiXpH2qSO42QmYSDD3DDdu2AE9j1r2+gAooooAK8/wDixHef2d4avLPTb7UPsHiC1vJobGAyyeWgcsQo/Ac4GSOa9AooA+eP7I8N/wDCZf8ACUf8Ih8Tvt39of2h5f8AZsfl+Z5nmYxjO3PbOcd6sXLeJIfh54gvNO8J3z32peK7m5t4bvTpDc2sckWVuI1XlJFOAHGQDmvf6KAPnyy0P4g3XhXUvD/iC61maCXR5dZt7iCS4ad5igRbGVnGCCNxaEDOe9dvpPg6a1+Edjb3Gs+LoZ4rePUJI7O6K3aMIADaxgrkID0j/vY5r0yigD588EP42j1nxY9/ZeJ77S10e8On2mvxTSrO25fLR0Pys7LkEL1ywFalr421i+8Gz6d4j+Ft9cX0G7+zraHw+72Ue2PbFuV2yMEsDt6L0r2+igD5s8ReGviDa2+geJrfRNNhgiuLe6j0HRLW4VUmAMgkmtwMBwPkZs5+6tdJdNeeMfBsGueNPCeuWet2uqrFbP4e04x3qxrHvRsy5YRh2fkHG4L3zXt9FAHj+r6Fo994y8F6jeaV45uL6C0sfJuRbo8ce2Qsv2tiMiQEkyY6CvYKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "", + "ID": 31066, + "Name": "AHMAD MIHDAWI AHMAD MIHDAWI", + "ProjectID": 156, + "ProjectName": "Buraydah Medical-Center", + "ActualDoctorRate": 4, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.49, + "DoctorAvailability": null, + "DoctorID": 31066, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 4.5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.4119376", + "Longitude": "43.9164603", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/JOR.png", + "NationalityID": "JOR", + "NationalityName": "JORDAN, HASHEMITE KINGDOM OF                         ", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1107, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 334.8, + "ProjectNameBottom": "Medical Center", + "ProjectNameTop": "Buraydah", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJW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dCFvJpF4RK067d5MkJGGuGHyHnnJFeAfEDwt4qk8VWeqaN4SksYGt0uLNdE02WJoF3syCbaMLcKMbsHjC4r6rooA8XuvDnjyb4NwfY5INL1tJV1Cb+zmngubqMW/zCbA3Pcs+NwPBIHORXODwVqUnirRE1mfx5cwavoUEV5dwOztBNK/zwyuy4WBRkshyRnJzX0XRQB5fJ8NLPS9O1CzvLb+3NEj0qRYZrmMXOrQyAYWK3YqFWMICUUch2PY15B4RsvEng7xldXln4I1y80S632c0N9pUkkjWbSKWBUYUyFFA5+XJPGK+r6KAPE/h/4t8Vaf4qvNLv/CniBfDt7eudPaTTpQ1kruqxocnZHAiA8KDt7cV7ZRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "107", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 312542, + "Name": "DONIA NASSERDDINE", + "ProjectID": 60, + "ProjectName": "Khobar Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.83, + "DoctorAvailability": null, + "DoctorID": 312542, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.3107804", + "Longitude": "50.2108347", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/LBN.png", + "NationalityID": "LBN", + "NationalityName": "Lebanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 7053, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 398.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Khobar", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXln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UUAFFFFAH/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "034423", + "Speciality": [ + "Consultant Internal Medicine", + "Consultant Infectious Disease " + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "\r\n\r\n\r\n\r\n\r\n\r\n\r\nاستشاري الأمراض المعدية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 310666, + "Name": "HASSAN ALMARZOOQ", + "ProjectID": 60, + "ProjectName": "Khobar Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.81, + "DoctorAvailability": null, + "DoctorID": 310666, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.3107804", + "Longitude": "50.2108347", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 4784, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 398.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Khobar", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2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v/AAkfjJbzSLifS9bTUPt15Dbv5Fk2nCRC8KKuWLbyAEPybRycivqevL9I0az8R+HvC2ueEE0PS75Lu0uNXfTAIN0YQPNbExgk8lf3bnHAz0FeoUAFFFFABXn/AMWI7z+zvDV5Z6bfah9g8QWt5NDYwGWTy0DliFH4DnAyRzXoFFAHzx/ZHhv/AITL/hKP+EQ+J327+0P7Q8v+zY/L8zzPMxjGdue2c471qWUWvSeFdSe38Gx3M+r+M5ZY7TX9Md1ghlQYmdByoU8F+QMsOa9zooA8XtfDuj3niGe8l8L+I9IvtK09lvodJ09LfTdU8p8yRIuMzLKeArY3oBnGKj1LwLN4at18QeA7PUoNU8TP9ilt7qIqumQ3ILlwsShoTGyoMksF54PFe2UUAef2HgfWNL8PW0EGqfbNbutsGqatf3DyXMNuyASpazBQy4cbkDcAkk81yF1oWsWPjKDUfDmlX1vYz7fDOo3M1u6Xsm6TdLqCsgwcgKRO3Vuq17fRQB5n4x0nTbq40nwzcaf4umnlt4bWTXtMhVmeElozHc3BGShPzuuMdGrzzX9M8SW/jLS9D8F6Frlnolr5VjcpdWkkdlfSLIUeacRDbJG6bNzkZZQeMYr6PooA8budJ+IOjXHh23TT/D9jpba7bPdR+F4biJiucOZRgL5W0fMT6LmvZKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "034423", + "Speciality": [ + "Consultant Internal Medicine", + "Rheumatology Consultant" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "استشاري علاج أمراض الروماتيزم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 304263, + "Name": "ABDULRAHMAN ALBDULQADER", + "ProjectID": 60, + "ProjectName": "Khobar Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.82, + "DoctorAvailability": null, + "DoctorID": 304263, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/KHOBAR/304263.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.3107804", + "Longitude": "50.2108347", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 3928, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 398.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Khobar", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6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BfDHjbT/hpa6XcajGs97cIZGnnmE9lYPCqlIsjMc6EfKMFVNYl1oWsWPjKDUfDmlX1vYz7fDOo3M1u6Xsm6TdLqCsgwcgKRO3Vuq17fRQB5n4x0nTbq40nwzcaf4umnlt4bWTXtMhVmeElozHc3BGShPzuuMdGrzzX9M8SW/jLS9D8F6Frlnolr5VjcpdWkkdlfSLIUeacRDbJG6bNzkZZQeMYr6PooA8budJ+IOjXHh23TT/AA/Y6W2u2z3UfheG4iYrnDmUYC+VtHzE+i5r2SiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "034423", + "Speciality": [ + "Consultant Gastroentrologist", + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري الجهاز الهضمي", + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 270523, + "Name": "DOAA HELMI ", + "ProjectID": 60, + "ProjectName": "Khobar Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.7, + "DoctorAvailability": null, + "DoctorID": 270523, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/KHOBAR/270523.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.3107804", + "Longitude": "50.2108347", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/EGY.png", + "NationalityID": "EGY", + "NationalityName": "Egyptians", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 3921, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 398.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Khobar", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioClhnO0jjnJHFAHQUV5//AMLT/wCpC8c/+Cf/AOzqOf4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EVxGDlI+q5znmo9G0az1TTkvPFqa5oetyY067h0sC2kmsyAXvbxZAWaMuWEkx+UlRkZBoALrwvefDnxlB40isdD1fRNV1VYrG1tYjcSJHLJ5sbQJhVEgRMKVYjJAGQc0aVr95D8Q7288f6Rrj+FtSu5IrCHW7Ym2tZJJQY2ZZjsTbHvBK5IG7HGa3PiYdB8MW/gW/t9fu7uDS7iwMenR3iSLLaxByLgRjAZyF2+Zwpzjise98a6D41uNN0uwg8QX0C+I4tZ1BtXRJYLW1yVkXhiEgUMOGG0AnJoA7P4T6FeWPiHxLqMWlaVb6JPqF19huVtylzJGzo0flNjabYoMrt4J6cV6xXD+B9V8SapqOo+fYaVZ+FrWWW10v7PDJHJNGpXypEySjQmM8MvBI44ruKACiiigArz/4sR3n9neGryz02+1D7B4gtbyaGxgMsnloHLEKPwHOBkjmvQKKAPnj+yPDf/CZf8JR/wiHxO+3f2h/aHl/2bH5fmeZ5mMYztz2znHetvR7nxVa+FdYfS/DEhn17xbOGtNasJdqWs6D55UXkIDgMeV6jmvbKKAPnzXNA0G61m2uLjwV4107VNPRYZJPC+lJDaPNGxJlhJG4gt91uDtC1YsvhZqWjaNqXiu3sLTWdUuHluI7HX4WuGNqyiQB4wgb7ZuG087eWHeve6KAPG9S8Fa9a/CNX8KT3ek6pdXH9t3tpC7wMjNAfMtoUjXcAG2hY29ME8VzA8FalJ4q0RNZn8eXMGr6FBFeXcDs7QTSv88MrsuFgUZLIckZyc19F0UAeXyfDSz0vTtQs7y2/tzRI9KkWGa5jFzq0MgGFit2KhVjCAlFHIdj2NeQeEbLxJ4O8ZXV5Z+CNcvNEut9nNDfaVJJI1m0ilgVGFMhRQOflyTxivq+igDxP4f8Ai3xVp/iq80u/8KeIF8O3t6509pNOlDWSu6rGhydkcCIDwoO3txXtlFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "034423", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 302950, + "Name": "TURKI ABDULLAH AL SALAMH", + "ProjectID": 60, + "ProjectName": "Khobar Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.74, + "DoctorAvailability": null, + "DoctorID": 302950, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.3107804", + "Longitude": "50.2108347", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 2305, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 398.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Khobar", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAA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Rq/jLS9mtrLeaZr9y8EbW4Id1iiUHK8hVBOMBgelesUAFFFFABXn/xYjvP7O8NXlnpt9qH2DxBa3k0NjAZZPLQOWIUfgOcDJHNegUUAfPH9keG/+Ey/4Sj/AIRD4nfbv7Q/tDy/7Nj8vzPM8zGMZ257ZzjvUeraLqWs+Bb57jw74gWC98cSX8lpHZMLsWrxHLBCCM4OM8ru4zX0XRQBx/hzULOb4eSRf8I9riWOm2hs/sGp2QFzdRxxDgR5w+4fL2BORivLPiN4W02TWfDmqeH/AAl4nsZ2S2uLhdI01Ylgh3OzD5BlbpTt6nAwK+g6KAPmSez8Vazo0uiW+j+Ll1S91gxR6vqltKGGmOuwQzzDLbNx3smCnU1197c+KvCWjabolx4YkvtUW3isJNX0CwllaLTNpQqkxwwuAy7wMbBlTivbKKAPmyfRde1C3l0vw/4d1ltLsrg+IrhvFdk5nvbpBtaEbBtkDqV+UgMx3fNXX+GtF17WdZ0jW7Dw7pujaXbpDHqGkanZPbqLpWDyXVtCAV37SESRju4IPSvZKKAPH/FWq6xqnxD0X+yLDxzZ/ZdVgtbz9y8emzW6ytvk+UndnI+Y8FBzXsFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "034423", + "Speciality": [ + "Consultant Gastroentrologist", + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري الجهاز الهضمي", + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 349962, + "Name": "AISHA ALOSAIL", + "ProjectID": 60, + "ProjectName": "Khobar Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.84, + "DoctorAvailability": null, + "DoctorID": 349962, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.3107804", + "Longitude": "50.2108347", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 2169, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 398.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Khobar", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQ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nh/w741We911b+4vtfsiFDOhjZnkQE4yVYkg/xHNdPe3Pirwlo2m6JceGJL7VFt4rCTV9AsJZWi0zaUKpMcMLgMu8DGwZU4r2yigD5sn0XXtQt5dL8P+HdZbS7K4PiK4bxXZOZ726QbWhGwbZA6lflIDMd3zV1/hrRde1nWdI1uw8O6bo2l26Qx6hpGp2T26i6Vg8l1bQgFd+0hEkY7uCD0r2SigDx/xVqusap8Q9F/siw8c2f2XVYLW8/cvHps1usrb5PlJ3ZyPmPBQc17BRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "034423", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 296487, + "Name": "KHALED ALDERAAN", + "ProjectID": 60, + "ProjectName": "Khobar Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.77, + "DoctorAvailability": null, + "DoctorID": 296487, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.3107804", + "Longitude": "50.2108347", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1740, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 398.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Khobar", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioClhnO0jjnJHFAHQUV5//AMLT/wCpC8c/+Cf/AOzq5pvxK03U9GbVE0nWYYItT/s26Wa2VWtG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": null, + "SetupID": "034423", + "Speciality": [ + "Rheumatology Consultant" + ], + "SpecialityN": [ + "استشاري علاج أمراض الروماتيزم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 340682, + "Name": "IBRAHIM ALZAHRANI", + "ProjectID": 60, + "ProjectName": "Khobar Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.7, + "DoctorAvailability": null, + "DoctorID": 340682, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/KHOBAR/340682.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.3107804", + "Longitude": "50.2108347", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1385, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 398.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Khobar", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAB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JyK+p68v0jRrPxH4e8La54QTQ9Lvku7S41d9MAg3RhA81sTGCTyV/duccDPQV6hQAUUUUAFef/ABYjvP7O8NXlnpt9qH2DxBa3k0NjAZZPLQOWIUfgOcDJHNegUUAfPH9keG/+Ey/4Sj/hEPid9u/tD+0PL/s2Py/M8zzMYxnbntnOO9allFr0nhXUnt/BsdzPq/jOWWO01/THdYIZUGJnQcqFPBfkDLDmvc6KAPCPEdt4k/tGPV4PDU/2H+zx4V1SysrGTzPLyWlms0HHk44jdjjOAVqPw/4a8baN46guPDeiaNYwNoSpBJfWs0SmHzQVFyUAH2zAXeBxwa97ooA8/wBKtfEl94evbOC4vre+n1WSLVJtSeRPLjZAJW05hyIwTmEtwOc1yF1oWsWPjKDUfDmlX1vYz7fDOo3M1u6Xsm6TdLqCsgwcgKRO3Vuq17fRQB5n4x0nTbq40nwzcaf4umnlt4bWTXtMhVmeElozHc3BGShPzuuMdGrzzX9M8SW/jLS9D8F6Frlnolr5VjcpdWkkdlfSLIUeacRDbJG6bNzkZZQeMYr6PooA8budJ+IOjXHh23TT/D9jpba7bPdR+F4biJiucOZRgL5W0fMT6LmvZKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "034423", + "Speciality": [ + "Consultant Gastroentrologist", + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري الجهاز الهضمي", + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 291086, + "Name": "METEB ALBUGAMI", + "ProjectID": 60, + "ProjectName": "Khobar Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.54, + "DoctorAvailability": null, + "DoctorID": 291086, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/KHOBAR/291086.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.3107804", + "Longitude": "50.2108347", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 907, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 398.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Khobar", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECB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+zraHw+72Ue2PbFuV2yMEsDt6L0r2+igD5s8ReGviDa2+geJrfRNNhgiuLe6j0HRLW4VUmAMgkmtwMBwPkZs5+6tdJdNeeMfBsGueNPCeuWet2uqrFbP4e04x3qxrHvRsy5YRh2fkHG4L3zXt9FAHj+r6Fo994y8F6jeaV45uL6C0sfJuRbo8ce2Qsv2tiMiQEkyY6CvYKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "034423", + "Speciality": [ + "Consultant Nephrologist" + ], + "SpecialityN": [ + "استشاري أمراض الكلى\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 401986, + "Name": "ALI AL SAEED", + "ProjectID": 60, + "ProjectName": "Khobar Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.85, + "DoctorAvailability": null, + "DoctorID": 401986, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/KHOBAR/401986.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.3107804", + "Longitude": "50.2108347", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 577, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 398.2, + "ProjectNameBottom": "H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LICzRlywkmPykqMjINABdeF7z4c+MoPGkVjoer6JquqrFY2trEbiRI5ZPNjaBMKokCJhSrEZIAyDmjStfvIfiHe3nj/AEjXH8LaldyRWEOt2xNtaySSgxsyzHYm2PeCVyQN2OM1ufEw6D4Yt/At/b6/d3cGl3FgY9OjvEkWW1iDkXAjGAzkLt8zhTnHFY97410HxrcabpdhB4gvoF8RxazqDauiSwWtrkrIvDEJAoYcMNoBOTQB2fwn0K8sfEPiXUYtK0q30SfULr7DcrblLmSNnRo/KbG02xQZXbwT04r1iuH8D6r4k1TUdR8+w0qz8LWsstrpf2eGSOSaNSvlSJklGhMZ4ZeCRxxXcUAFFFFABXn/AMWI7z+zvDV5Z6bfah9g8QWt5NDYwGWTy0DliFH4DnAyRzXoFFAHzx/ZHhv/AITL/hKP+EQ+J327+0P7Q8v+zY/L8zzPMxjGdue2c4710fhi51610a/dPDF2YNe8ZyC6tNSsH3JYTqN7snQADgk5XqDmvZKKAPE59N8VeGvFUul27eILmDV7028bWZlew0zTJX2gx4AENxGF44KKpHWszXfhdeeHPD2p3k+oeK9Uvn1WW50uHSJjPtkKExXFwpQESZGHdeeRjrXv9FAHi+q+HPHmqfCyy1HzILPxTaxRv9ptGnjvZrNYC3kSNgu0xkOSn3SwHeucHgrUpPFWiJrM/jy5g1fQoIry7gdnaCaV/nhldlwsCjJZDkjOTmvouigDy+T4aWel6dqFneW39uaJHpUiwzXMYudWhkAwsVuxUKsYQEoo5DsexryDwjZeJPB3jK6vLPwRrl5ol1vs5ob7SpJJGs2kUsCowpkKKBz8uSeMV9X0UAeJ/D/xb4q0/wAVXml3/hTxAvh29vXOntJp0oayV3VY0OTsjgRAeFB29uK9soooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "034423", + "Speciality": [ + "Consultant Internal Medicine", + "Consultant Infectious Disease " + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "\r\n\r\n\r\n\r\n\r\n\r\n\r\nاستشاري الأمراض المعدية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 388826, + "Name": "SALEEM SALAH SALEEM KASHAN", + "ProjectID": 60, + "ProjectName": "Khobar Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.86, + "DoctorAvailability": null, + "DoctorID": 388826, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.3107804", + "Longitude": "50.2108347", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 424, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 398.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Khobar", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQ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dxshMwkGHuGG7dsAJ7HrXt9ABRRRQAV5/wDFiO8/s7w1eWem32ofYPEFreTQ2MBlk8tA5YhR+A5wMkc16BRQB88f2R4b/wCEy/4Sj/hEPid9u/tD+0PL/s2Py/M8zzMYxnbntnOO9bGlW2sXHh69/wCKavov7Z8aySf6XYutzY28yD/So/8AnnInaTkKc9a9vooA8EttP17RrfxFca34Vk8VQQXtzZaVJqWnvfX5YDMLsWAH2XAOSv8AExwOa3/FtnqWp+FfDL6po+pQ6XFb2twtp4atmW/tL8I3ARvljgRSR/eDbRXrlFAHz5o/hDXrXxVrGqa3pl34igPhye70pdat3u2Rt4aG3l3LgTgZ3Ip/iODzWpa+NtYvvBs+neI/hbfXF9Bu/s62h8Pu9lHtj2xbldsjBLA7ei9K9vooA+bPEXhr4g2tvoHia30TTYYIri3uo9B0S1uFVJgDIJJrcDAcD5GbOfurXSXTXnjHwbBrnjTwnrlnrdrqqxWz+HtOMd6sax70bMuWEYdn5BxuC9817fRQB4/q+haPfeMvBeo3mleObi+gtLHybkW6PHHtkLL9rYjIkBJMmOgr2CiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "034423", + "Speciality": [ + "Consultant Internal Medicine", + "Rheumatology Consultant" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "استشاري علاج أمراض الروماتيزم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 408163, + "Name": "SALMA ALBAHRANI", + "ProjectID": 60, + "ProjectName": "Khobar Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.84, + "DoctorAvailability": null, + "DoctorID": 408163, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/KHOBAR/408163.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.3107804", + "Longitude": "50.2108347", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 83, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 398.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Khobar", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExB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WPjKDUfDmlX1vYz7fDOo3M1u6Xsm6TdLqCsgwcgKRO3Vuq17fRQB5n4x0nTbq40nwzcaf4umnlt4bWTXtMhVmeElozHc3BGShPzuuMdGrzzX9M8SW/jLS9D8F6Frlnolr5VjcpdWkkdlfSLIUeacRDbJG6bNzkZZQeMYr6PooA8budJ+IOjXHh23TT/D9jpba7bPdR+F4biJiucOZRgL5W0fMT6LmvZKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "034423", + "Speciality": [ + "Consultant Infectious Disease " + ], + "SpecialityN": [ + "\r\n\r\n\r\n\r\n\r\n\r\n\r\nاستشاري الأمراض المعدية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 419308, + "Name": "YASMEEN ABU ALSAUD", + "ProjectID": 60, + "ProjectName": "Khobar Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.79, + "DoctorAvailability": null, + "DoctorID": 419308, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/KHOBAR/419308.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "26.3107804", + "Longitude": "50.2108347", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 14, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 398.2, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Khobar", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioClhnO0jjnJHFAHQUV5//AMLT/wCpC8c/+Cf/AOzqOf4x6Da+FZfEFxpmswwRamdLkt5IEWdJgm85UvgADjrnPagD0SiuXj8e6PceHtP1yzE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WI3EiRyyebG0CYVRIETClWIyQBkHNGla/eQ/EO9vPH+ka4/hbUruSKwh1u2JtrWSSUGNmWY7E2x7wSuSBuxxmtz4mHQfDFv4Fv7fX7u7g0u4sDHp0d4kiy2sQci4EYwGchdvmcKc44rHvfGug+NbjTdLsIPEF9AviOLWdQbV0SWC1tclZF4YhIFDDhhtAJyaAOz+E+hXlj4h8S6jFpWlW+iT6hdfYblbcpcyRs6NH5TY2m2KDK7eCenFesVw/gfVfEmqajqPn2GlWfha1lltdL+zwyRyTRqV8qRMko0JjPDLwSOOK7igAooooAK8/+LEd5/Z3hq8s9NvtQ+weILW8mhsYDLJ5aByxCj8BzgZI5r0CigD54/sjw3/wmX/CUf8Ih8Tvt39of2h5f9mx+X5nmeZjGM7c9s5x3rf0DUPGGl+HtUvND8PTxX2s+MJWWHVrKZfJt5kBErqhBVQQAW5A5617RRQB5ne6Hr2v/ABL0231m61KHS4tCimvI7CR1sLm6ExDwsGBV0ZScqfmK4zXP/F/w/wCKrXWfD+t+G7aS70vS3thBpFqkrqk0TSOrmFBtCBdqZBB5A4r2yigDx/WdG8eap8LHvLNLHQ9bkuzqs0OjCe2kmjMBLI6gFmuC5AIPBKjnIrlB4K1KTxVoiazP48uYNX0KCK8u4HZ2gmlf54ZXZcLAoyWQ5Izk5r6LooA8vk+GlnpenahZ3lt/bmiR6VIsM1zGLnVoZAMLFbsVCrGEBKKOQ7Hsa8g8I2XiTwd4yuryz8Ea5eaJdb7OaG+0qSSRrNpFLAqMKZCigc/LknjFfV9FAHifw/8AFvirT/FV5pd/4U8QL4dvb1zp7SadKGsld1WNDk7I4EQHhQdvbivbKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "034423", + "Speciality": [ + "Consultant Internal Medicine", + "Consultant Medical Oncologist " + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "استشاري طب الاورام" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 392828, + "Name": "ABRAR FAIZ KHOJAH ", + "ProjectID": 120, + "ProjectName": "Jeddah-Fayha Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.73, + "DoctorAvailability": null, + "DoctorID": 392828, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/AlFayha/392828.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "21.50907430916284", + "Longitude": "39.21568919999999", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1430, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 841.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Jeddah Fayha", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAw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Pid9u/tD+0PL/s2Py/M8zzMYxnbntnOO9bGlW2sXHh69/wCKavov7Z8aySf6XYutzY28yD/So/8AnnInaTkKc9a9vooA8/8ADnhGz8OfEOSX7Z4r1S+fSiv2/U5RPbLGZR+6Em0ESZG7b0wSe9ch8UfC/iT+0bHxpFY/2hrdhqscVja6dFJLH9jQvLG0yY3eZv4YqwXBAHPNe30UAcPYaV4kuPBtt5F/PFfazKt1qn2+aRZLGOaMebHa4GY2Q/cVshTnOa4i60LWLHxlBqPhzSr63sZ9vhnUbma3dL2TdJul1BWQYOQFInbq3Va9vooA8z8Y6Tpt1caT4ZuNP8XTTy28NrJr2mQqzPCS0ZjubgjJQn53XGOjV55r+meJLfxlpeh+C9C1yz0S18qxuUurSSOyvpFkKPNOIhtkjdNm5yMsoPGMV9H0UAeN3Ok/EHRrjw7bpp/h+x0ttdtnuo/C8NxExXOHMowF8raPmJ9FzXslFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "023623", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 398094, + "Name": "MOHAMED ANWAR HASAN", + "ProjectID": 120, + "ProjectName": "Jeddah-Fayha Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.9, + "DoctorAvailability": null, + "DoctorID": 398094, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "21.50907430916284", + "Longitude": "39.21568919999999", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1110, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 841.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Jeddah Fayha", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dX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S6a88Y+DYNc8aeE9cs9btdVWK2fw9pxjvVjWPejZlywjDs/IONwXvmvb6KAPH9X0LR77xl4L1G80rxzcX0FpY+Tci3R449shZftbEZEgJJkx0FewUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "023623", + "Speciality": [ + "Consultant Nephrologist" + ], + "SpecialityN": [ + "استشاري أمراض الكلى\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 400158, + "Name": "MANAL HAMDAN", + "ProjectID": 120, + "ProjectName": "Jeddah-Fayha Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.74, + "DoctorAvailability": null, + "DoctorID": 400158, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/AlFayha/400158.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "21.50907430916284", + "Longitude": "39.21568919999999", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/LBN.png", + "NationalityID": "LBN", + "NationalityName": "Lebanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 816, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 841.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Jeddah Fayha", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAg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E/Mfmrk538VaN8S5X1my1JoLLWDrt5aWcUpgKpN89xGjYGzAIDnHGATXUeK/GMPifwqbjw/o3ifVoLXXf7XuJNXtRPaRKqMWgyjELEAy/Ieik880AZfwptf+Ej8ZLeaRcT6Xraah9uvIbd/Ism04SIXhRVyxbeQAh+TaOTkV9T15fpGjWfiPw94W1zwgmh6XfJd2lxq76YBBujCB5rYmMEnkr+7c44Gegr1CgAooooAK8/+LEd5/Z3hq8s9NvtQ+weILW8mhsYDLJ5aByxCj8BzgZI5r0CigD54/sjw3/wmX/CUf8Ih8Tvt39of2h5f9mx+X5nmeZjGM7c9s5x3q4ZdetfAut39v4Gk1GfUPFs91Hp2r6S8zJDJFkSeWOQQfl3cjkive6KAPALbV/El98Q/D95B4Evrexn0q20PVIbvSJEto42lzL5ag4EYBwN3AGciur1LwpqWjXC39kLuxnbU/J03TvDe6KwK5Jimv4wAcZAWVl/hCgV6pRQB5vpXhHxhDp17LqN5pT63qWoSLcX8UsxktdOkA3RW0jLuRlfLIpygPPWuYutC1ix8ZQaj4c0q+t7Gfb4Z1G5mt3S9k3SbpdQVkGDkBSJ26t1Wvb6KAPM/GOk6bdXGk+GbjT/F008tvDaya9pkKszwktGY7m4IyUJ+d1xjo1eea/pniS38ZaXofgvQtcs9EtfKsblLq0kjsr6RZCjzTiIbZI3TZucjLKDxjFfR9FAHjdzpPxB0a48O26af4fsdLbXbZ7qPwvDcRMVzhzKMBfK2j5ifRc17JRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "023623", + "Speciality": [ + "Consultant Internal Medicine", + "Consultant Infectious Disease " + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "\r\n\r\n\r\n\r\n\r\n\r\n\r\nاستشاري الأمراض المعدية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 399412, + "Name": "OLA TARABZUNI", + "ProjectID": 120, + "ProjectName": "Jeddah-Fayha Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.56, + "DoctorAvailability": null, + "DoctorID": 399412, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/AlFayha/399412.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "21.50907430916284", + "Longitude": "39.21568919999999", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 344, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 841.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Jeddah Fayha", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKF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qSfT9SuvCst/ceFdZmgl8enVJNOk09mne1KZOYyMEEfL/dzxmvoOigDxDRvhp4k/tFLyzttD0/RL/VRqM0LRyRXv2NyC1lKoXb5ezAaE5XcOuK6PxB4U03xbbz37jxdpUHh52htdOsdsCytbglJbaPBBJDbUYYzgAYxXplFAHgnju51Lx34V0PwppfhjxdDPFe24a+1qwZVKhGj3yyLuOcuGY49TV+9ufFXhLRtN0S48MSX2qLbxWEmr6BYSytFpm0oVSY4YXAZd4GNgypxXtlFAHzZPouvahby6X4f8O6y2l2VwfEVw3iuycz3t0g2tCNg2yB1K/KQGY7vmrr/DWi69rOs6Rrdh4d03RtLt0hj1DSNTsnt1F0rB5Lq2hAK79pCJIx3cEHpXslFAHj/irVdY1T4h6L/ZFh45s/suqwWt5+5ePTZrdZW3yfKTuzkfMeCg5r2CiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "023623", + "Speciality": [ + "Consultant Nephrologist" + ], + "SpecialityN": [ + "استشاري أمراض الكلى\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 419317, + "Name": "SHIMA AZIZ", + "ProjectID": 120, + "ProjectName": "Jeddah-Fayha Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.88, + "DoctorAvailability": null, + "DoctorID": 419317, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "21.50907430916284", + "Longitude": "39.21568919999999", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 300, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 841.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Jeddah Fayha", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsP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Iei/2RYeObP7LqsFrefuXj02a3WVt8nyk7s5HzHgoOa9goooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "023623", + "Speciality": [ + "Consultant Endocrinologist" + ], + "SpecialityN": [ + "استشاري علاج أمراض الغدد\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 399426, + "Name": "EMAN MANSORY", + "ProjectID": 120, + "ProjectName": "Jeddah-Fayha Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.97, + "DoctorAvailability": null, + "DoctorID": 399426, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "21.50907430916284", + "Longitude": "39.21568919999999", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 213, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 841.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Jeddah Fayha", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLD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MvyHopPPNAGX8KbX/hI/GS3mkXE+l62mofbryG3fyLJtOEiF4UVcsW3kAIfk2jk5FfU9eX6Ro1n4j8PeFtc8IJoel3yXdpcau+mAQbowgea2JjBJ5K/u3OOBnoK9QoAKKKKACvP/ixHef2d4avLPTb7UPsHiC1vJobGAyyeWgcsQo/Ac4GSOa9AooA+eP7I8N/8Jl/wlH/CIfE77d/aH9oeX/Zsfl+Z5nmYxjO3PbOcd63/AA42sQ6dJef8InO/9peOjc+TqenOZLW3kAP2gL/Ay9N/IBzXtFFAHl/gH+2P+Fh+KP7X/wCEr/4+7v7H9r3/ANm/Z/NXZ5e7/lp1xjjZnFZ/ihrzS/GV5rmp+E77XNbjtHi0V9O043NlDGJGeBpi2GW4Dg7ihwFYY5NewUUAcPYaV4kuPBtt5F/PFfazKt1qn2+aRZLGOaMebHa4GY2Q/cVshTnOa4i60LWLHxlBqPhzSr63sZ9vhnUbma3dL2TdJul1BWQYOQFInbq3Va9vooA8z8Y6Tpt1caT4ZuNP8XTTy28NrJr2mQqzPCS0ZjubgjJQn53XGOjV55r+meJLfxlpeh+C9C1yz0S18qxuUurSSOyvpFkKPNOIhtkjdNm5yMsoPGMV9H0UAeN3Ok/EHRrjw7bpp/h+x0ttdtnuo/C8NxExXOHMowF8raPmJ9FzXslFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "023623", + "Speciality": [ + "Cons.Hematopathologist / Transfusion Medicine" + ], + "SpecialityN": [ + "استشاري أمراض الدم / نقل الدم\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 404463, + "Name": "FAYEZ ALHARTHY", + "ProjectID": 120, + "ProjectName": "Jeddah-Fayha Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.85, + "DoctorAvailability": null, + "DoctorID": 404463, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "21.50907430916284", + "Longitude": "39.21568919999999", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 184, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 841.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Jeddah Fayha", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT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CRXSan4Xs/wDhMtZl0OxvtP1u/wDD88S38MQisvMeQ4ZpEG77RvwxPJ2jPWvQKKAPN4/hxeQ+HtPgluYNU1t5Y/t2rao5nubWMpiT7HNt3Iyv80e7gEknk1zF1oWsWPjKDUfDmlX1vYz7fDOo3M1u6Xsm6TdLqCsgwcgKRO3Vuq17fRQB5n4x0nTbq40nwzcaf4umnlt4bWTXtMhVmeElozHc3BGShPzuuMdGrzzX9M8SW/jLS9D8F6Frlnolr5VjcpdWkkdlfSLIUeacRDbJG6bNzkZZQeMYr6PooA8budJ+IOjXHh23TT/D9jpba7bPdR+F4biJiucOZRgL5W0fMT6LmvZKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "023623", + "Speciality": [ + "Rheumatology Consultant" + ], + "SpecialityN": [ + "استشاري علاج أمراض الروماتيزم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 402223, + "Name": "SULTAN ALTOURI", + "ProjectID": 120, + "ProjectName": "Jeddah-Fayha Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.84, + "DoctorAvailability": null, + "DoctorID": 402223, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "21.50907430916284", + "Longitude": "39.21568919999999", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 135, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 841.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Jeddah Fayha", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7Szhh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QAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "023623", + "Speciality": [ + "Cons.Hematopathologist / Transfusion Medicine" + ], + "SpecialityN": [ + "استشاري أمراض الدم / نقل الدم\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 415760, + "Name": "SAUD ABAALKHAIL", + "ProjectID": 120, + "ProjectName": "Jeddah-Fayha Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.86, + "DoctorAvailability": null, + "DoctorID": 415760, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "21.50907430916284", + "Longitude": "39.21568919999999", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 70, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 841.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Jeddah Fayha", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2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VRi0GUYhYgGX5D0UnnmgDL+FNr/wkfjJbzSLifS9bTUPt15Dbv5Fk2nCRC8KKuWLbyAEPybRycivqevL9I0az8R+HvC2ueEE0PS75Lu0uNXfTAIN0YQPNbExgk8lf3bnHAz0FeoUAFFFFABXn/xYjvP7O8NXlnpt9qH2DxBa3k0NjAZZPLQOWIUfgOcDJHNegUUAfPH9keG/+Ey/4Sj/AIRD4nfbv7Q/tDy/7Nj8vzPM8zGMZ257ZzjvWpZS6la+FdSv7jwNd6jBqHjOW6k06/0lpp0tZEBMixngOB8oblckivc6KAPO9D0OFdZube3uvGtpBqmjtNHHPIEtNOWVgBFEAMRTxj7q87VHeub1/RtYt/7LvPBaeI7O+tdbi065hug8dtfbcl72dYhmRXOwNMfvAHjpXtFFAHm+leEfGEOnXsuo3mlPrepahItxfxSzGS106QDdFbSMu5GV8sinKA89a5i60LWLHxlBqPhzSr63sZ9vhnUbma3dL2TdJul1BWQYOQFInbq3Va9vooA8z8Y6Tpt1caT4ZuNP8XTTy28NrJr2mQqzPCS0ZjubgjJQn53XGOjV55r+meJLfxlpeh+C9C1yz0S18qxuUurSSOyvpFkKPNOIhtkjdNm5yMsoPGMV9H0UAeN3Ok/EHRrjw7bpp/h+x0ttdtnuo/C8NxExXOHMowF8raPmJ9FzXslFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "023623", + "Speciality": [ + "Consultant Internal Medicine", + "Rheumatology Consultant" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "استشاري علاج أمراض الروماتيزم" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية", + "DoctorTitle": "Dr.", + "ID": 420966, + "Name": "TURKI ALSHUAIBI", + "ProjectID": 120, + "ProjectName": "Jeddah-Fayha Hospital", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.75, + "DoctorAvailability": null, + "DoctorID": 420966, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/AlFayha/420966.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "21.50907430916284", + "Longitude": "39.21568919999999", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SAU.png", + "NationalityID": "SAU", + "NationalityName": "Saudi", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 16, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 841.4, + "ProjectNameBottom": "Hospital", + "ProjectNameTop": "Jeddah Fayha", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5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vpb2/ie71TS7KHxLatdIXgS6ii2pZDjcAG/5ZABsE4YVxEGn+NrrRor/WfCsk2ly+LRql5p0enzNduxXL4jYbTAVyvP8XBNfTdFAHiEPhP+y/EOrz6d4fvrzRLrw/NrVvpWp2XmW0Oos+ViEKgKsgQBdo+cAkZxRa+NtYvvBs+neI/hbfXF9Bu/s62h8Pu9lHtj2xbldsjBLA7ei9K9vooA+bPEXhr4g2tvoHia30TTYYIri3uo9B0S1uFVJgDIJJrcDAcD5GbOfurXSXTXnjHwbBrnjTwnrlnrdrqqxWz+HtOMd6sax70bMuWEYdn5BxuC9817fRQB4/q+haPfeMvBeo3mleObi+gtLHybkW6PHHtkLL9rYjIkBJMmOgr2CiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "023623", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 197867, + "Name": "ALINE ABI KHALIL ELIAS LATTOUF", + "ProjectID": 3, + "ProjectName": "Dubai Sheikh Zayed Road Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.94, + "DoctorAvailability": null, + "DoctorID": 197867, + "DoctorImageURL": "https://hmgwebservices.com/Images/SZR/197867.gif", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.154501", + "Longitude": "55.226000", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/LBN.png", + "NationalityID": "LBN", + "NationalityName": "Lebanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 6272, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 865.2, + "ProjectNameBottom": "Sheikh Zayed Road Center", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBA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c3F9BaWPk3It0eOPbIWX7WxGRICSZMdBXsFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "Consultant Family Medicine" + ], + "SpecialityN": [ + "استشاري طب الأسرة\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 226098, + "Name": "SALINA MULHAM IBRAHIM NAJJAR", + "ProjectID": 3, + "ProjectName": "Dubai Sheikh Zayed Road Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.97, + "DoctorAvailability": null, + "DoctorID": 226098, + "DoctorImageURL": "https://hmgwebservices.com/Images/SZR/226098.gif", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.154501", + "Longitude": "55.226000", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/JOR.png", + "NationalityID": "JOR", + "NationalityName": "Jordanian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 5500, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 865.2, + "ProjectNameBottom": "Sheikh Zayed Road Center", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDc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rHirxJZ67qOi+F/L8ZaffX/AIlg1DzNXURSW8blo8W5ySiqT8gwQCDzQB19hoHnajbWer6vqqaJputrLZza/c4vbrUYyAixMw2vbMmSoGHLbscV6xXiE2n3k3xk0jQ/F/iHZY6baQ3mkIl6R9qkjuNkJmEgw9ww3btgBPY9a9voAKKKKACvP/ixHef2d4avLPTb7UPsHiC1vJobGAyyeWgcsQo/Ac4GSOa9AooA+eP7I8N/8Jl/wlH/AAiHxO+3f2h/aHl/2bH5fmeZ5mMYztz2znHepNQi16T4aeJXt/Bt3cz6v4oupY7S/wBMd54IZYTiZUHKup4D8gEkc19B0UAeL+EdM1j/AIV5dRXmhT6hY2GnvLDYeJLR5bn+0UiXasEZGPs2MqoGHyWFUNCstY8R6dpkXijwRBpeiJrcTJYaRpTwSNcADEtxHJlTbbCyu3XIA6Cvd6KAPL9T0y80LxlrMWh6F/xJP+EUnlWwhtD9iuLzzDhWjQBXkZAFI+8V46VgWvjbWL7wbPp3iP4W31xfQbv7OtofD7vZR7Y9sW5XbIwSwO3ovSvb6KAPmzxF4a+INrb6B4mt9E02GCK4t7qPQdEtbhVSYAyCSa3AwHA+Rmzn7q10l0154x8Gwa5408J65Z63a6qsVs/h7TjHerGse9GzLlhGHZ+QcbgvfNe30UAeP6voWj33jLwXqN5pXjm4voLSx8m5Fujxx7ZCy/a2IyJASTJjoK9goooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 290602, + "Name": "FATEMEH AGHANASIRI", + "ProjectID": 3, + "ProjectName": "Dubai Sheikh Zayed Road Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.94, + "DoctorAvailability": null, + "DoctorID": 290602, + "DoctorImageURL": "https://hmgwebservices.com/Images/SZR/290602.gif", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.154501", + "Longitude": "55.226000", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/CAN.png", + "NationalityID": "CAN", + "NationalityName": "Canadian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1252, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 865.2, + "ProjectNameBottom": "Sheikh Zayed Road Center", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMX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bQLGv+6PK6ZzzWZ4Fi8bR+FbV7jwb4fttL0i4SWS0n0yZL+dokXM0SH5WnZeFfjLDHFe50UAeN3mk6lJ4q1W/fT9Z1rS7jw5Nq9rp2uwtcQQX7PlIFjxtV1X5Qg+YAsAeaqWvjbWL7wbPp3iP4W31xfQbv7OtofD7vZR7Y9sW5XbIwSwO3ovSvb6KAPmzxF4a+INrb6B4mt9E02GCK4t7qPQdEtbhVSYAyCSa3AwHA+Rmzn7q10l0154x8Gwa5408J65Z63a6qsVs/h7TjHerGse9GzLlhGHZ+QcbgvfNe30UAeP6voWj33jLwXqN5pXjm4voLSx8m5Fujxx7ZCy/a2IyJASTJjoK9goooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "General Practitioner" + ], + "SpecialityN": [ + "طبيب عام" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 294042, + "Name": "TAMAMA ALMUTAIR", + "ProjectID": 3, + "ProjectName": "Dubai Sheikh Zayed Road Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.89, + "DoctorAvailability": null, + "DoctorID": 294042, + "DoctorImageURL": "https://hmgwebservices.com/Images/SZR/294042.gif", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.154501", + "Longitude": "55.226000", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/NLD.png", + "NationalityID": "NLD", + "NationalityName": "Dutch (Netherlands)", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1101, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 865.2, + "ProjectNameBottom": "Sheikh Zayed Road Center", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q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": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "Consultant Family Medicine" + ], + "SpecialityN": [ + "استشاري طب الأسرة\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 392403, + "Name": "OMAR IBRAHIM", + "ProjectID": 3, + "ProjectName": "Dubai Sheikh Zayed Road Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.94, + "DoctorAvailability": null, + "DoctorID": 392403, + "DoctorImageURL": "https://hmgwebservices.com/Images/SZR/392403.gif", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.154501", + "Longitude": "55.226000", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/LBN.png", + "NationalityID": "LBN", + "NationalityName": "Lebanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 866, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 865.2, + "ProjectNameBottom": "Sheikh Zayed Road Center", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjI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ssdNtIbzSES9I+1SR3GyEzCQYe4Ybt2wAnsete30AFFFFABXn/AMWI7z+zvDV5Z6bfah9g8QWt5NDYwGWTy0DliFH4DnAyRzXoFFAHzx/ZHhv/AITL/hKP+EQ+J327+0P7Q8v+zY/L8zzPMxjGdue2c471cMuvWvgXW7+38DSajPqHi2e6j07V9JeZkhkiyJPLHIIPy7uRyRXvdFAHlcHwxh1P4aRW9vJd6Tql1cDXY44yIFtL9ocCMAJujiRj937wx14rA00eKvCVw3h/x5oF3410uRPtsVxa2cupNFMSECFpcKAFVzgDI3jnk17nRQB4/f6R/wAVDcz6d4Q/4kn/AAijahb6Vcab/o39o7yVDwqNv2jZhSB8+OM4qha+NtYvvBs+neI/hbfXF9Bu/s62h8Pu9lHtj2xbldsjBLA7ei9K9vooA+bPEXhr4g2tvoHia30TTYYIri3uo9B0S1uFVJgDIJJrcDAcD5GbOfurXSXTXnjHwbBrnjTwnrlnrdrqqxWz+HtOMd6sax70bMuWEYdn5BxuC9817fRQB4/q+haPfeMvBeo3mleObi+gtLHybkW6PHHtkLL9rYjIkBJMmOgr2CiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "General Practitioner" + ], + "SpecialityN": [ + "طبيب عام" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 398856, + "Name": "MOHAMMED NORAIN", + "ProjectID": 3, + "ProjectName": "Dubai Sheikh Zayed Road Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.84, + "DoctorAvailability": null, + "DoctorID": 398856, + "DoctorImageURL": "https://hmgwebservices.com/Images/SZR/398856.gif", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.154501", + "Longitude": "55.226000", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SDN.png", + "NationalityID": "SDN", + "NationalityName": "Sudanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 40, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 865.2, + "ProjectNameBottom": "Sheikh Zayed Road Center", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUv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J9F17ULeXS/D/h3WW0uyuD4iuG8V2Tme9ukG1oRsG2QOpX5SAzHd81df4a0XXtZ1nSNbsPDum6NpdukMeoaRqdk9uoulYPJdW0IBXftIRJGO7gg9K9kooA8f8VarrGqfEPRf7IsPHNn9l1WC1vP3Lx6bNbrK2+T5Sd2cj5jwUHNewUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "Specialist Family Medicine" + ], + "SpecialityN": [ + "اخصائي طب الاسرة " + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 417558, + "Name": "DIALA AREF MEHANNA", + "ProjectID": 3, + "ProjectName": "Dubai Sheikh Zayed Road Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.85, + "DoctorAvailability": null, + "DoctorID": 417558, + "DoctorImageURL": "https://hmgwebservices.com/Images/SZR/417558.gif", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.154501", + "Longitude": "55.226000", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/LBN.png", + "NationalityID": "LBN", + "NationalityName": "Lebanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 39, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 865.2, + "ProjectNameBottom": "Sheikh Zayed Road Center", + "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sbQJhVEgRMKVYjJAGQc0aVr95D8Q7288f6Rrj+FtSu5IrCHW7Ym2tZJJQY2ZZjsTbHvBK5IG7HGa3PiYdB8MW/gW/t9fu7uDS7iwMenR3iSLLaxByLgRjAZyF2+Zwpzjise98a6D41uNN0uwg8QX0C+I4tZ1BtXRJYLW1yVkXhiEgUMOGG0AnJoA7P4T6FeWPiHxLqMWlaVb6JPqF19huVtylzJGzo0flNjabYoMrt4J6cV6xXD+B9V8SapqOo+fYaVZ+FrWWW10v7PDJHJNGpXypEySjQmM8MvBI44ruKACiiigArz/4sR3n9neGryz02+1D7B4gtbyaGxgMsnloHLEKPwHOBkjmvQKKAPnj+yPDf/CZf8JR/wiHxO+3f2h/aHl/2bH5fmeZ5mMYztz2znHetjT9Q8SaX4N128s/D2uRf2z4ruGmhWykW9hs5owWliUEbZBgBWOVDete30UAfOk+k69oFxLcXGn+Ltdn1q3NrJJJC901tpExyYySAUvFI+7zGN3fNdPrHhCZbjR9UstMu5oJfDkGiaas1uWu9OuiS0VzNhcRCMY3SKdyt0FeyUUAeIX/w88eWPw8uZf7b+0eKYLtrj7fb3c73MlmsR/0ZJNu85kG4R/dJ561hjwVqUnirRE1mfx5cwavoUEV5dwOztBNK/wA8MrsuFgUZLIckZyc19F0UAeXyfDSz0vTtQs7y2/tzRI9KkWGa5jFzq0MgGFit2KhVjCAlFHIdj2NeQeEbLxJ4O8ZXV5Z+CNcvNEut9nNDfaVJJI1m0ilgVGFMhRQOflyTxivq+igDxP4f+LfFWn+KrzS7/wAKeIF8O3t6509pNOlDWSu6rGhydkcCIDwoO3txXtlFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "Specialist Family Medicine", + "Specialist Internal Medicine", + "Specialist Internal Medicine" + ], + "SpecialityN": [ + "اخصائي طب الاسرة ", + "أخصائي أمراض باطنية", + "أخصائي أمراض باطنية" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 400703, + "Name": "SHAHAD ALNAQBI", + "ProjectID": 3, + "ProjectName": "Dubai Sheikh Zayed Road Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 5, + "DoctorAvailability": null, + "DoctorID": 400703, + "DoctorImageURL": "https://hmgwebservices.com/Images/SZR/400703.gif", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.154501", + "Longitude": "55.226000", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/ARE.png", + "NationalityID": "ARE", + "NationalityName": "Emirati", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 5, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 865.2, + "ProjectNameBottom": "Sheikh Zayed Road Center", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAA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v/hMv+Eo/wCEQ+J327+0P7Q8v+zY/L8zzPMxjGdue2c470X+heJNd8G3P9naVqun31/46a+t/tFvJFJbxvGdsz7QSiqSMsMgEda+h6KAPH5vA+saX/ZEGo6prl59q8mC41bTLh5NShuG4ZDMyjbYDBbB5DkGsD/hDf7C8Q/2v5PjnUNEsNV8z7Ft825uNRR932rZtCvbsgx5mQ5Jx0r3+igDwT4geGptT0az8P8Ah/RPEBn17WE124uLy1PkWjTqyNHIyDMZQlSVIOBnk1fvbnxV4S0bTdEuPDEl9qi28VhJq+gWEsrRaZtKFUmOGFwGXeBjYMqcV7ZRQB82T6Lr2oW8ul+H/DustpdlcHxFcN4rsnM97dINrQjYNsgdSvykBmO75q6/w1ouvazrOka3YeHdN0bS7dIY9Q0jU7J7dRdKweS6toQCu/aQiSMd3BB6V7JRQB4/4q1XWNU+Iei/2RYeObP7LqsFrefuXj02a3WVt8nyk7s5HzHgoOa9goooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "Consultant Family Medicine" + ], + "SpecialityN": [ + "استشاري طب الأسرة\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 417926, + "Name": "RAVI TEJA TANGIRALA", + "ProjectID": 3, + "ProjectName": "Dubai Sheikh Zayed Road Center", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 5, + "DoctorAvailability": null, + "DoctorID": 417926, + "DoctorImageURL": "https://hmgwebservices.com/Images/SZR/417926.gif", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.154501", + "Longitude": "55.226000", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/IND.png", + "NationalityID": "IND", + "NationalityName": "Indian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 3, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 865.2, + "ProjectNameBottom": "Sheikh Zayed Road Center", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6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r6RZCjzTiIbZI3TZucjLKDxjFfR9FAHjdzpPxB0a48O26af4fsdLbXbZ7qPwvDcRMVzhzKMBfK2j5ifRc17JRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH//Z", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "General Practitioner" + ], + "SpecialityN": [ + "طبيب عام" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 172036, + "Name": "ABEER ELMOHANDES", + "ProjectID": 2, + "ProjectName": "Dubai Hospital Medical City", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.77, + "DoctorAvailability": null, + "DoctorID": 172036, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/172036.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.231273", + "Longitude": "55.320942", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/USA.png", + "NationalityID": "USA", + "NationalityName": "American", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 7351, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 875, + "ProjectNameBottom": "Hospital Medical City", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwg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SJFnaJjJIZGBy10xwTuIzg5xWxrHxA03WbfR7jS7HxdfQL4tg1BpL2FZVDYJ+ywFWIzgjbH7nmgDs4/C/8AwlPiHT/Gnhyx1XwxfQ6hHFqNrfRfYvtluH82ViiAmRnLKMs2G2kHpmvWK8nsNA1jxHqNt4j0jV/GWl7NbWW80zX7l4I2twQ7rFEoOV5CqCcYDA9K9YoAKKKKACvP/ixHef2d4avLPTb7UPsHiC1vJobGAyyeWgcsQo/Ac4GSOa9AooA+eP7I8N/8Jl/wlH/CIfE77d/aH9oeX/Zsfl+Z5nmYxjO3PbOcd6L+28Sf8Ibc6vp3hrVft3/CdNq9vZXFjJ5nl+WWVnReducAkHGeM19D0UAeN3vwih8T+FdNuDBHaapqmpxavrEk6COeJZUJngiOwsoDN8qPnBHJNcg/hqHRviXaXD6J8Q9T0vRERLWRrUTMZoZsoEOAv2faOAMHnjFfSdFAHhnxV0CHxPb6LYeH/BV3aapqlxBe3GonShGsSyhwyXEiAsrhmVnBzjGcmp7258VeEtG03RLjwxJfaotvFYSavoFhLK0WmbShVJjhhcBl3gY2DKnFe2UUAfNk+i69qFvLpfh/w7rLaXZXB8RXDeK7JzPe3SDa0I2DbIHUr8pAZju+auv8NaLr2s6zpGt2Hh3TdG0u3SGPUNI1Oye3UXSsHkuraEArv2kIkjHdwQeleyUUAeP+KtV1jVPiHov9kWHjmz+y6rBa3n7l49Nmt1lbfJ8pO7OR8x4KDmvYKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "Consultant Family Medicine" + ], + "SpecialityN": [ + "استشاري طب الأسرة\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 120423, + "Name": "FIRAS ALI AL RUBAIY", + "ProjectID": 2, + "ProjectName": "Dubai Hospital Medical City", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.81, + "DoctorAvailability": null, + "DoctorID": 120423, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/120423.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.231273", + "Longitude": "55.320942", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/SWE.png", + "NationalityID": "SWE", + "NationalityName": "Swedish", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 6409, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 875, + "ProjectNameBottom": "Hospital Medical City", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJ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K3t9Zkmnl1gahHHrl1MzPYGLAtbkBckk/fj+797mrl/4T1j/hXlzp2o+H/Cv/AB9tPcW2j2T/APHv5RVnt1Yf8ffUITx0r1CigDwDwXpl5oWo+IYtD0LxX/Yn/CP3Mq2HiG0Pl3F5lcL5aAK+5AFx94jcOlaFr421i+8Gz6d4j+Ft9cX0G7+zraHw+72Ue2PbFuV2yMEsDt6L0r2+igD5s8ReGviDa2+geJrfRNNhgiuLe6j0HRLW4VUmAMgkmtwMBwPkZs5+6tdJdNeeMfBsGueNPCeuWet2uqrFbP4e04x3qxrHvRsy5YRh2fkHG4L3zXt9FAHj+r6Fo994y8F6jeaV45uL6C0sfJuRbo8ce2Qsv2tiMiQEkyY6CvYKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "Consultant Family Medicine" + ], + "SpecialityN": [ + "استشاري طب الأسرة\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 10008, + "Name": "FIRAS BASSAM AMAWI", + "ProjectID": 2, + "ProjectName": "Dubai Hospital Medical City", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.66, + "DoctorAvailability": null, + "DoctorID": 10008, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/10008.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.231273", + "Longitude": "55.320942", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/USA.png", + "NationalityID": "USA", + "NationalityName": "American", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 5429, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 875, + "ProjectNameBottom": "Hospital Medical City", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+ii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6e0mnShrJXdVjQ5OyOBEB4UHb24r2yiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAP/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "Consultant Family Medicine" + ], + "SpecialityN": [ + "استشاري طب الأسرة\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 205158, + "Name": "MAZEN NABA", + "ProjectID": 2, + "ProjectName": "Dubai Hospital Medical City", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.91, + "DoctorAvailability": null, + "DoctorID": 205158, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/205158.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.231273", + "Longitude": "55.320942", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/LBN.png", + "NationalityID": "LBN", + "NationalityName": "Lebanese", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 4644, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 875, + "ProjectNameBottom": "Hospital Medical City", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wB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+E+hXlj4h8S6jFpWlW+iT6hdfYblbcpcyRs6NH5TY2m2KDK7eCenFesVw/gfVfEmqajqPn2GlWfha1lltdL+zwyRyTRqV8qRMko0JjPDLwSOOK7igAooooAK8/8AixHef2d4avLPTb7UPsHiC1vJobGAyyeWgcsQo/Ac4GSOa9AooA+eP7I8N/8ACZf8JR/wiHxO+3f2h/aHl/2bH5fmeZ5mMYztz2znHeun8I6h4k0vTrq8s/D19F/bPjV2mhvrKRZIbOYKWlKgjbjAG45UHPWvYKKAPE/EGiw+M/i5PqmqeHfEA0vQdMYqrWQ2380E5bYm4FZUdWOBkFvarnijwFeeMfBt5qepm+s/sto8ui6HpxMcaxrGzQLNAynFwNxRghxgACvYKKAPG9Y8C6lH8I9HuPClnHoviK3soJr2S1ia3u51WAmSEmNd7Oz7flbqwGeRXMDwVqUnirRE1mfx5cwavoUEV5dwOztBNK/zwyuy4WBRkshyRnJzX0XRQB5fJ8NLPS9O1CzvLb+3NEj0qRYZrmMXOrQyAYWK3YqFWMICUUch2PY15B4RsvEng7xldXln4I1y80S632c0N9pUkkjWbSKWBUYUyFFA5+XJPGK+r6KAPE/h/wCLfFWn+KrzS7/wp4gXw7e3rnT2k06UNZK7qsaHJ2RwIgPCg7e3Fe2UUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Mr.", + "ID": 311562, + "Name": "REEM ABDULLAH ALI MUSTAFA", + "ProjectID": 2, + "ProjectName": "Dubai Hospital Medical City", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.86, + "DoctorAvailability": null, + "DoctorID": 311562, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/311562.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.231273", + "Longitude": "55.320942", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/JOR.png", + "NationalityID": "JOR", + "NationalityName": "Jordanian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 2069, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 875, + "ProjectNameBottom": "Hospital Medical City", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/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bqh4q0DxJ4c8Q6LZ+F9X8c6pfPdwSvNqFzJPpqxl2BWVowCOQpYdNhPrXt9FAHD/ANjeML7TvN1FPDlvrc8v2O4v9PEySR6cw+YRSMNwmDksufkBwcZriLrQtYsfGUGo+HNKvrexn2+GdRuZrd0vZN0m6XUFZBg5AUidurdVr2+igDzPxjpOm3VxpPhm40/xdNPLbw2smvaZCrM8JLRmO5uCMlCfndcY6NXnmv6Z4kt/GWl6H4L0LXLPRLXyrG5S6tJI7K+kWQo804iG2SN02bnIyyg8YxX0fRQB43c6T8QdGuPDtumn+H7HS2122e6j8Lw3ETFc4cyjAXyto+Yn0XNeyUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "Consultant Internal Medicine" + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 157312, + "Name": "KARIM CHADDA", + "ProjectID": 2, + "ProjectName": "Dubai Hospital Medical City", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 5, + "DoctorAvailability": null, + "DoctorID": 157312, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/157312.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.231273", + "Longitude": "55.320942", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/FRA.png", + "NationalityID": "FRA", + "NationalityName": "French", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 1728, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 875, + "ProjectNameBottom": "Hospital Medical City", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiuf8XeLrPwdp1reXlnfXn2q7SzhhsYhJI0jBioClh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FFAH/2Q==", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "Consultant Internal Medicine", + "Miscellaneous " + ], + "SpecialityN": [ + "استشاري طب الباطنية\r\n", + "متنوع\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 339102, + "Name": "WASAN SULAIMAN", + "ProjectID": 2, + "ProjectName": "Dubai Hospital Medical City", + "ActualDoctorRate": 5, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.85, + "DoctorAvailability": null, + "DoctorID": 339102, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/339102.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 5, + "Gender": 2, + "GenderDescription": "Female", + "IsActive": true, + "IsAllowWaitList": true, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.231273", + "Longitude": "55.320942", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/CAN.png", + "NationalityID": "CAN", + "NationalityName": "Canadian", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 904, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 875, + "ProjectNameBottom": "Hospital Medical City", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIy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Y+IfEuoxaVpVvok+oXX2G5W3KXMkbOjR+U2Nptigyu3gnpxXrFcP4H1XxJqmo6j59hpVn4WtZZbXS/s8Mkck0alfKkTJKNCYzwy8Ejjiu4oAKKKKACvP8A4sR3n9neGryz02+1D7B4gtbyaGxgMsnloHLEKPwHOBkjmvQKKAPnj+yPDf8AwmX/AAlH/CIfE77d/aH9oeX/AGbH5fmeZ5mMYztz2znHetS2udetfAviJ08MayYNe8UXIurRrB/taWE8XzuidA4HAJyu7g5r3OigD58HgHTfDWs6Inh/QfE9zPq6QC4u7+zV10yGVvmdXRQYbqMqpBOQuSeak8R/Cn/hDvEMfijTl1zXPLxPbxoPtNy2ohzIrzBUGbc7RuIO/Le9e/0UAeT+I9A8YX3wsjvNI1fVbfW55RrF5C9zMkke6Al7WFVG4KHICxnoepzXGDwVqUnirRE1mfx5cwavoUEV5dwOztBNK/zwyuy4WBRkshyRnJzX0XRQB5fJ8NLPS9O1CzvLb+3NEj0qRYZrmMXOrQyAYWK3YqFWMICUUch2PY15B4RsvEng7xldXln4I1y80S632c0N9pUkkjWbSKWBUYUyFFA5+XJPGK+r6KAPE/h/4t8Vaf4qvNLv/CniBfDt7eudPaTTpQ1kruqxocnZHAiA8KDt7cV7ZRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "Consultant Family Medicine" + ], + "SpecialityN": [ + "استشاري طب الأسرة\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + }, + { + "ClinicID": 1, + "ClinicName": "INTERNAL MEDICINE CLINIC", + "ClinicNameN": "الباطنية\r\n", + "DoctorTitle": "Dr.", + "ID": 395684, + "Name": "MESHAEL ALRUM", + "ProjectID": 2, + "ProjectName": "Dubai Hospital Medical City", + "ActualDoctorRate": 4, + "ClinicRoomNo": 0, + "Date": null, + "DayName": null, + "DecimalDoctorRate": 4.12, + "DoctorAvailability": null, + "DoctorID": 395684, + "DoctorImageURL": "https://hmgwebservices.com/Images/MobileImages/DUBAI/395684.png", + "DoctorMobileNumber": "", + "DoctorProfile": null, + "DoctorProfileInfo": null, + "DoctorRate": 0, + "DoctorStarsRate": 4.5, + "Gender": 1, + "GenderDescription": "Male", + "IsActive": true, + "IsAllowWaitList": false, + "IsAppointmentAllowed": true, + "IsDoctorAllowVedioCall": false, + "IsDoctorDummy": false, + "IsDoctorHasPrePostImages": false, + "IsLiveCare": false, + "Latitude": "25.231273", + "Longitude": "55.320942", + "NationalityFlagURL": "https://hmgwebservices.com/Images/flag/ARE.png", + "NationalityID": "ARE", + "NationalityName": "Emirati", + "NearestFreeSlot": null, + "NoOfFreeSlotsAvailable": 0, + "NoOfPatientsRate": 28, + "OriginalClinicID": null, + "PersonRate": 0, + "ProjectDistanceInKiloMeters": 875, + "ProjectNameBottom": "Hospital Medical City", + "ProjectNameTop": "Dubai", + "QR": "data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBA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c6KAPM/D/gWbT/CsFxolnaaZqmtus2qySxGGeyhmQGaK1KrujKMBsVshSOc1zl1oWsWPjKDUfDmlX1vYz7fDOo3M1u6Xsm6TdLqCsgwcgKRO3Vuq17fRQB5n4x0nTbq40nwzcaf4umnlt4bWTXtMhVmeElozHc3BGShPzuuMdGrzzX9M8SW/jLS9D8F6Frlnolr5VjcpdWkkdlfSLIUeacRDbJG6bNzkZZQeMYr6PooA8budJ+IOjXHh23TT/D9jpba7bPdR+F4biJiucOZRgL5W0fMT6LmvZKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA/9k=", + "QRString": null, + "RateNumber": 0, + "ServiceID": null, + "SetupID": "505005", + "Speciality": [ + "Consultant Family Medicine" + ], + "SpecialityN": [ + "استشاري طب الأسرة\r\n" + ], + "TransactionType": 0, + "WorkingHours": null, + "vida3Id": null + } + ], + "DoctorPrePostImagesList": null, + "DoctorProfileList": null, + "DoctorRate": 0, + "DoctorRatingDetailsList": null, + "DoctorScheduleAvailabilty": null, + "DoctorScheduleMapping_Insert": 0, + "DoctorSchedulesByClinicList": null, + "Doctorscheduleslot_Insert": 0, + "Doctorscheduleslot_SelectList": null, + "DrIncludeExclude": 0, + "ERAppointmentFeesObject": null, + "ER_AdvancePaymentResponse": null, + "ER_OnlinePaymentDetailsResponse": null, + "ER_PatientShare": null, + "ER_TriageQuestionsList": null, + "ErrCode": null, + "ErrorSearchMsg": null, + "FormID": 0, + "FreeSlots_NearestWithDoctorsNameList": null, + "FreeTimeSlots": null, + "GenderError": false, + "GetDoctorFreeSlots_Nearest_OnSlotSelecionList": null, + "GetDoctorMobileNo": null, + "GetPatientInfoByPatientIDList": null, + "GetPatientMedicalStatus": null, + "GetQuestionsRating_PAList": null, + "HIS_GetAllAppoimentHistoryList": null, + "HIS_GetDoctorOffDaysList": null, + "HIS_ObgyneUltrasoundDoctorsList": null, + "HIS_ProcedureTemplateDetailsList": null, + "HIS_ProcedureTemplateList": null, + "HIS_Waiting_CheckDoctorAvailableForWaitingAppointment_List": null, + "His_ObGyneProcedureGet_Response": null, + "His_PRM_GetApprovalRemarkList": null, + "HoursDiff": 0, + "ISDentalplan": false, + "ISMobileAppDentalAllow": false, + "InitialSlotDuration": 0, + "IsAllowToBookWaitingAppointment": false, + "IsAllowVClinic": false, + "IsAllowWaitList": false, + "IsAppointmentAllowed": false, + "IsCash": false, + "IsClinicEnabledForICDCodes": false, + "IsDoctorExist": false, + "IsDrBlocked": false, + "IsEligible": false, + "IsInsertOrUpdate": 0, + "IsInsured": false, + "IsLastAppoitmentRatedList": null, + "IsShowInsuranceUpdateModule": false, + "IsSlotAvailable": 0, + "LC_GetClinicScheduleList": null, + "ListHoursDiff": null, + "ListReqTypes": null, + "List_AllClinicRate": null, + "List_AllDoctorRate": null, + "List_AllProjectRate": null, + "List_COVID19_DoctorsByClinicAndProject": null, + "List_COVID19_ProjectDriveThroughTestingCenter": null, + "List_CalculationTable": null, + "List_DDAdmin_Members": null, + "List_DentalChiefComplain": [], + "List_DentalDDDetails": null, + "List_DentalDoctorChiefComplaintMapping": null, + "List_DentalPediatricDoctor": null, + "List_DoctorAll": null, + "List_DoctorByIPAddressCheckIn": null, + "List_DoctorByProjectClinicAr": null, + "List_DoctorByProjectClinicEn": null, + "List_DoctorCases": null, + "List_DoctorClinics": null, + "List_DoctorDetailsList": null, + "List_DoctorDetailsListAr": null, + "List_DoctorLanguages": null, + "List_DoctorMappinsgs": null, + "List_DoctorPatientVitalSign": null, + "List_DoctorProcedureMapping": null, + "List_DoctorProfileImage": null, + "List_DoctorProject": null, + "List_DoctorQualifications": null, + "List_DoctorSlotFirstVisit": null, + "List_DoctorSpeciality": null, + "List_DoctorSpecializations": null, + "List_DoctorWorkingHoursTable": null, + "List_DoctorblacklistModel": null, + "List_Doctorinfo": null, + "List_English": null, + "List_GetAllCancelAppointmentReasons": null, + "List_GetAllClinicsRoomNo": null, + "List_GetAllDoctorsOnProject": null, + "List_GetAllDoctorsbyProject": null, + "List_GetAppForCancel": null, + "List_GetClinicsInfobyProject": null, + "List_GetClinicsbyProject": null, + "List_GetDoctorsbyProject": null, + "List_GetIPAddressForDD": null, + "List_GetIPAddressForDentalDD": null, + "List_GetInfoForDentalClinicsDD": null, + "List_GetLoginDetails": null, + "List_GetPatientCancelAppointment": null, + "List_HISDoctorProject": null, + "List_HIS_GetContactLensPerscription": null, + "List_HIS_GetGlassPerscription": null, + "List_HmgPartTimeDoctor": null, + "List_InvoiceDetails": null, + "List_IsPatientHasOnGoingEstimation": [], + "List_LaserDoctors": null, + "List_LaserProcedures": null, + "List_MedicalReportByAppointment": null, + "List_NonAdminProjectMapping": null, + "List_PatientER_AdminServiceModel": null, + "List_PatientER_DoctorBlackListModel": null, + "List_PhysioDoctors": null, + "List_ProjectERPMapping": null, + "List_RecordByIPAddress": null, + "List_RecordByIPAddressNew": null, + "List_RecordByIPAddressNewCheckIn": null, + "List_RecordByIPAddressNewForDubai": null, + "List_RescahdualOnlineModel": null, + "Message": null, + "NotesDoctorRatingForCOC_List": null, + "NotesDoctorRatingList": null, + "OnlineCheckInAppointments": null, + "OnlineCheckInAppointmentsWalkInModel": null, + "OnlineCheckinBeforeHour": 0, + "PRM_AdmissionInfoList": null, + "PRM_DentalEstimationDetailList": null, + "PRM_DentalEstimationList": null, + "PRM_DoctorsForRadiologyList": null, + "PRM_GET_ERToOPDRequestStatusList": null, + "PRM_GetDoctorRatingList": null, + "PRM_GetProceureAndPackagesList": null, + "PRM_HIS_AppointmentqueuegetList": null, + "PRM_HIS_CheckDoctorIsFullyBookedList": null, + "PRM_HIS_GetDentalEstimationPlan_List": null, + "PRM_HIS_GetDischargeInfo_List": null, + "PRM_HIS_GetUpcomingConfirmedAppoimentList": null, + "PRM_HIS_QueueERToOP_List": null, + "PRM_HIS_QueueERToOP_WithOutER_List": null, + "PRM_QueueERreferralHistory_getList": null, + "PRM_QueueOPDreferralHistory_getList": null, + "PRM_SpecialClinicalCareMapping_List": null, + "PatientDoctorAppointmentResultExit": false, + "PatientDoctorAppointmentResultList": null, + "PatientER_DoctorFreeSlots": null, + "PatientER_GetAllClinics_List": null, + "PatientER_GetDoctorClincByServiceID_List": null, + "PatientER_GetServiceList": null, + "PatientER_Logininsert": 0, + "PatientER_PrescriptionLogin": null, + "PatientER_SelectAdmin": null, + "PatientER_SelectRole2": null, + "PatientER_UpdateLiveCareStatus": 0, + "PatientER_insert": 0, + "PatientInformationList": null, + "PatientNumber": 0, + "PaymentModes": null, + "Physio_IsPatientHasApproval": false, + "PhysiotherapyError": 0, + "ProcedureNeedeTime": 0, + "ReturnValue": null, + "RiskScore": 0, + "RowCount": 0, + "SameClinicApptList": null, + "SearchDoctorsByTime_IsVoiceCommandList": null, + "SlotDuration": 0, + "StatusCode": 0, + "Tamara_IntegrationLogsInsert_Response": 0, + "Tamara_IntegrationLogsUpdate_Response": 0, + "TransactionNo": null, + "UserDentalPlanMessage": null, + "WaitingAppointmentNoPerDay": 0, + "age": 0, + "erpDoctorDetails": null, + "isNphiesMatchedWithVida": false, + "isWithinFollowUpPeriod": false, + "returnValue": 0 +}; + + + + +var region = ['UAE Region','Eastern Region','Central Region','Western Region',]; \ No newline at end of file diff --git a/lib/services/authentication/auth_provider.dart b/lib/services/authentication/auth_provider.dart new file mode 100644 index 00000000..4a8a896c --- /dev/null +++ b/lib/services/authentication/auth_provider.dart @@ -0,0 +1,1940 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/main.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_request.dart'; +import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_request_register.dart'; +import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; +import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; +import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart'; +import 'package:diplomaticquarterapp/models/Authentication/checkpatient_for_registration.dart'; +import 'package:diplomaticquarterapp/models/Authentication/insert_device_imei_request.dart'; +import 'package:diplomaticquarterapp/models/Authentication/register_user_requet.dart'; +import 'package:diplomaticquarterapp/models/Authentication/registered_authenticated_user_req.dart'; +import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; +import 'package:diplomaticquarterapp/models/Request.dart'; +import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:intl/intl.dart'; +import 'package:provider/provider.dart'; + +import '../../locator.dart'; + +// SharedPreferences sharedPref = new SharedPreferences(); +enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED } + +AppSharedPreferences sharedPref = AppSharedPreferences(); +AppGlobal appGlobal = AppGlobal(); + +const String INSERT_DEVICE_IMEI = 'Services/Patients.svc/REST/Patient_INSERTDeviceIMEI'; +const String SELECT_DEVICE_IMEI = 'Services/Patients.svc/REST/Patient_SELECTDeviceIMEIbyIMEI'; +const String CHECK_PATIENT_AUTH = 'Services/Authentication.svc/REST/CheckPatientAuthentication'; +const GET_MOBILE_INFO = 'Services/Authentication.svc/REST/GetMobileLoginInfo'; +const SEND_ACTIVATION_CODE = 'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationType'; + +const SEND_ACTIVATION_CODE_REGISTER = 'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration'; +const CHECK_ACTIVATION_CODE = 'Services/Authentication.svc/REST/CheckActivationCode'; +const CHECK_ACTIVATION_CODE_REGISTER = 'Services/Authentication.svc/REST/CheckActivationCodeForRegistration'; + +const FORGOT_PASSWORD = 'Services/Authentication.svc/REST/CheckActivationCodeForSendFileNo'; +const CHECK_PATIENT_FOR_REGISTRATION = "Services/Authentication.svc/REST/CheckPatientForRegisteration"; + +const CHECK_USER_STATUS = "Services/NHIC.svc/REST/GetPatientInfo"; +const REGISTER_USER = 'Services/Authentication.svc/REST/PatientRegistration'; +const LOGGED_IN_USER_URL = 'Services/MobileNotifications.svc/REST/Insert_PatientMobileDeviceInfo'; + +const FORGOT_PATIENT_ID = 'Services/Authentication.svc/REST/SendPatientIDSMSByMobileNumber'; +const DASHBOARD = 'Services/Patients.svc/REST/PatientDashboard'; +const PROFILE_SETTING = 'Services/Patients.svc/REST/GetPateintInfoForUpdate'; +const SAVE_SETTING = 'Services/Patients.svc/REST/UpdatePateintInfo'; + +const DEACTIVATE_ACCOUNT = 'Services/Patients.svc/REST/PatientAppleActivation_InsertUpdate'; + +class AuthProvider with ChangeNotifier { + bool isLogin = false; + bool isLoading = true; + dynamic authenticatedUser; + AuthenticatedUserObject authenticatedUserObject = locator(); + var languageID; + + AuthProvider() { + getUserAuthentication(); + } + + void getUserAuthentication() async { + Map profile = await sharedPref.getObject(USER_PROFILE) ?? Map(); + languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + if (profile != null) { + isLoading = false; + isLogin = true; + } else { + isLoading = false; + isLogin = false; + } + notifyListeners(); + } + + APP_STATUS get stutas { + if (isLoading) { + return APP_STATUS.LOADING; + } else { + if (this.isLogin) { + return APP_STATUS.AUTHENTICATED; + } else { + return APP_STATUS.UNAUTHENTICATED; + } + } + } + + // Future login(UserModel userInfo) async { + // try { + // dynamic localRes; + + // await BaseAppClient.post(LOGIN_URL, + // onSuccess: (dynamic response, int statusCode) { + // localRes = response; + // }, onFailure: (String error, int statusCode) { + // throw error; + // }, body: userInfo.toJson()); + + // return Future.value(localRes); + // } catch (error) { + // print(error); + // throw error; + // } + // } + + Future insertDeviceImei(lstLogin) async { + try { + dynamic localRes; + var lastLogin = lstLogin; //await sharedPref.getInt( + // LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN); //this.cs.sharedService.getSharedData(AuthenticationService.LAST_LOGIN, false); + + var request = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); + var newRequest = INSERTDeviceIMEIRequest(); + + var imei = await sharedPref.getString(PUSH_TOKEN); + // if (!request.) { + newRequest.iMEI = imei; //imei!=null ? imei : ''; + newRequest.firstName = request.firstName ?? "" + " " + request.lastName! ?? ""; + newRequest.firstNameN = request.firstNameN ?? "" + " " + request.lastNameN! ?? ""; + newRequest.lastNameN = request.lastNameN ?? ""; + newRequest.outSA = request.outSA == 1 ? true : false; + newRequest.biometricEnabled = false; + newRequest.preferredLanguage = int.parse(request.preferredLanguage!) ?? 1; + newRequest.logInTypeID = lastLogin ?? 1; + newRequest.patientID = request.patientID; + newRequest.mobileNo = request.mobileNumber; + newRequest.identificationNo = request.patientIdentificationNo; + newRequest.patientIdentificationNo = request.patientIdentificationNo; + newRequest.patientType = request.patientType; + newRequest.setupID = request.setupID; + newRequest.tokenID = await sharedPref.getString(TOKEN); + // } + + await new BaseAppClient().post(INSERT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: newRequest.toJson()); + return Future.value(localRes); + } catch (error) { + print(error); + throw error; + } + } + + Future selectDeviceImei(imei, {int languageID = 1}) async { + SelectDeviceIMEIRES? selectDeviceIMEIRES; + try { + // SelectDeviceIMEIRES? localRes; + print(imei); + Map request = {}; + request['IMEI'] = imei; + request['LanguageID'] = languageID; + + await BaseAppClient().post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) async { + // localRes = Map(); + print("Here response: ${response['Patient_SELECTDeviceIMEIbyIMEIList'][0]}"); + if (response['Patient_SELECTDeviceIMEIbyIMEIList'][0] != null) { + selectDeviceIMEIRES = SelectDeviceIMEIRES.fromJson(response['Patient_SELECTDeviceIMEIbyIMEIList'][0]); + sharedPref.setObject(IMEI_USER_DATA, selectDeviceIMEIRES); + } else { + print("ELSE TRIGERRED!!!!!!!!!"); + selectDeviceIMEIRES = null; + } + // await new BaseAppClient().post(SELECT_DEVICE_IMEI, + // onSuccess: (dynamic response, int statusCode) { + // localRes = SelectDeviceIMEIRES.fromJson( + // response['Patient_SELECTDeviceIMEIbyIMEIList'][0]); + // }, onFailure: (String error, int statusCode) { + // throw error; + // }, body: request); + }, onFailure: (String error, int statusCode) { + print("in the failure with : $error and $statusCode"); + }, body: request); + } catch (error) { + print("in the error"); + // return Future.error(error); + } + return Future.value(selectDeviceIMEIRES); + } + + Future checkPatientAuthentication(CheckPatientAuthenticationReq request) async { + request.versionID = VERSION_ID; + request.channel = CHANNEL; + request.iPAdress = IP_ADDRESS; + request.generalid = GENERAL_ID; + request.languageID = (languageID == 'ar' ? 1 : 2); + request.patientOutSA = (request.zipCode == '966' || request.zipCode == '+966') ? 0 : 1; + try { + dynamic localRes; + await new BaseAppClient().post(CHECK_PATIENT_AUTH, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request.toJson()); + return Future.value(localRes); + } catch (error) { + throw error; + //throw error; + } + } + + Future getLoginInfo(request) async { + request.versionID = VERSION_ID; + request.channel = CHANNEL; + request.iPAdress = IP_ADDRESS; + request.generalid = GENERAL_ID; + request.languageID = (languageID == 'ar' ? 1 : 2); + request.deviceTypeID = Platform.isIOS ? 1 : 2; + request.patientOutSA = request.zipCode == '966' ? 0 : 1; + request.isDentalAllowedBackend = false; + // request.patientTypeID = request.patientType; + // request.patientType = request.patientType; + dynamic localRes; + await new BaseAppClient().post(GET_MOBILE_INFO, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request.toJson()); + return Future.value(localRes); + } + + Future sendActivationCode(request) async { + request.versionID = VERSION_ID; + request.channel = CHANNEL; + request.iPAdress = IP_ADDRESS; + request.generalid = GENERAL_ID; + // request.languageID = (languageID == 'ar' ? 1 : 2); + request.languageID = 2; + request.deviceTypeID = Platform.isIOS ? 1 : 2; + request.patientOutSA = request.zipCode == '966' ? 0 : 1; + request.isDentalAllowedBackend = false; + + dynamic localRes; + await new BaseAppClient().post(SEND_ACTIVATION_CODE, onSuccess: (dynamic response, int statusCode) { + localRes = response; + authenticatedUser = CheckActivationCode.fromJson(localRes); + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request.toJson()); + return Future.value(localRes); + } + + Future sendActivationCodeRegister(request) async { + request.versionID = VERSION_ID; + request.channel = CHANNEL; + request.iPAdress = IP_ADDRESS; + request.generalid = GENERAL_ID; + request.languageID = (languageID == 'ar' ? 1 : 2); + request.deviceTypeID = Platform.isIOS ? 1 : 2; + request.patientOutSA = request.zipCode == '966' ? 0 : 1; + request.isDentalAllowedBackend = false; + + dynamic localRes; + await new BaseAppClient().post(SEND_ACTIVATION_CODE_REGISTER, onSuccess: (dynamic response, int statusCode) { + localRes = response; + authenticatedUser = CheckActivationCode.fromJson(localRes); + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request.toJson()); + return Future.value(localRes); + } + + Future checkActivationCode(request, [value]) async { + var neRequest = CheckActivationCodeReq.fromJson(request); + + neRequest.activationCode = value ?? "0000"; + neRequest.isSilentLogin = value != null ? false : true; + neRequest.versionID = VERSION_ID; + neRequest.channel = CHANNEL; + neRequest.iPAdress = IP_ADDRESS; + neRequest.generalid = GENERAL_ID; + neRequest.deviceTypeID = Platform.isIOS ? 1 : 2; + neRequest.patientOutSA = neRequest.zipCode == '966' ? 0 : 1; + neRequest.projectOutSA = neRequest.zipCode == '966' ? false : true; + neRequest.isDentalAllowedBackend = false; + // neRequest.deviceToken = null; + neRequest.forRegisteration = neRequest.isRegister != null ? neRequest.isRegister : false; + neRequest.isRegister = false; + dynamic localRes; + try { + await new BaseAppClient().post(CHECK_ACTIVATION_CODE, onSuccess: (dynamic response, int statusCode) { + localRes = response; //CheckActivationCode.fromJson(); + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + // throw error; + }, body: neRequest.toJson()); + return Future.value(localRes); + } catch (error) { + throw localRes; + } + } + + Future checkActivationCodeRegister(request, [value]) async { + var neRequest = CheckActivationCodeRegisterReq.fromJson(request); + + neRequest.activationCode = value ?? "0000"; + neRequest.isSilentLogin = value != null ? false : true; + neRequest.versionID = VERSION_ID; + neRequest.channel = CHANNEL; + neRequest.iPAdress = IP_ADDRESS; + neRequest.generalid = GENERAL_ID; + // request.languageID = (languageID == 'ar' ? 1 : 2); + neRequest.deviceTypeID = Platform.isIOS ? 1 : 2; + neRequest.patientOutSA = neRequest.zipCode == '966' ? 0 : 1; + neRequest.projectOutSA = neRequest.zipCode == '966' ? false : true; + neRequest.isDentalAllowedBackend = false; + // neRequest.deviceToken = null; + neRequest.forRegisteration = neRequest.isRegister != null ? neRequest.isRegister : false; + neRequest.isRegister = false; + dynamic localRes; + try { + await new BaseAppClient().post(CHECK_ACTIVATION_CODE_REGISTER, onSuccess: (dynamic response, int statusCode) { + localRes = response; //CheckActivationCode.fromJson(); + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + // throw error; + }, body: neRequest.toJson()); + // sharedPref.setString(BLOOD_TYPE, localRes['PatientBloodType']); + return Future.value(localRes); + } catch (error) { + throw localRes; + //return Future.value(error); + } + } + + AuthenticatedUser getAuthenticatedUser() { + this.isLogin = true; + return authenticatedUser; + } + + Future checkPatientForRegisteration(CheckPatientForRegistration request, int languageID) async { + request.versionID = VERSION_ID; + request.channel = CHANNEL; + request.iPAdress = IP_ADDRESS; + request.generalid = GENERAL_ID; + request.languageID = languageID; + request.deviceTypeID = Platform.isIOS ? 1 : 2; + request.isRegister = false; + // request.tokenID = ''; + dynamic localRes; + try { + await new BaseAppClient().post(CHECK_PATIENT_FOR_REGISTRATION, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: request.toJson()); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + Future checkUserStatus(CheckUserStatusRequest request) async { + request.versionID = VERSION_ID; + request.channel = CHANNEL; + request.iPAdress = IP_ADDRESS; + request.generalid = GENERAL_ID; + request.languageID = (languageID == 'ar' ? 1 : 2); + request.deviceTypeID = Platform.isIOS ? 1 : 2; + + // request.tokenID = ''; + dynamic localRes; + try { + await new BaseAppClient().post(CHECK_USER_STATUS, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: request.toJson()); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + Future registerUser(request) async { + request['VersionID'] = VERSION_ID; + request['Channel'] = CHANNEL; + request['IPAdress'] = IP_ADDRESS; + request['Generalid'] = GENERAL_ID; + request['DeviceTypeID'] = Platform.isIOS ? 1 : 2; + request['LanguageID'] = (languageID == 'ar' ? 1 : 2); + request['LogInTokenID'] = await sharedPref.getString(LOGIN_TOKEN_ID); + var nhic = await sharedPref.getObject(NHIC_DATA); + var requestN = RegisterUserRequest.fromJson(request); + requestN.patientOutSA = requestN.patientobject!.patientOutSA!; + final DateFormat dateFormat = DateFormat('MM/dd/yyyy'); + final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy'); + if (nhic != null) { + requestN.dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(dateFormat.parse(nhic['DateOfBirth'])); + requestN.isHijri = nhic['IsHijri'] ? 1 : 0; + requestN.healthId = requestN.patientobject!.eHealthIDField!; + } + + requestN.zipCode = requestN.patientOutSA == 1 ? '971' : '966'; + + await sharedPref.remove(USER_PROFILE); + + dynamic localRes; + try { + // localRes = { + // "Date": null, + // "LanguageID": 0, + // "ServiceName": 0, + // "Time": null, + // "AndroidLink": null, + // "AuthenticationTokenID": "d+TXwG6BFkSjRuFPvTdSwA==", + // "Data": null, + // "Dataw": false, + // "DietType": 0, + // "DietTypeID": 0, + // "ErrorCode": null, + // "ErrorEndUserMessage": "Patient verified Successfully", + // "ErrorEndUserMessageN": null, + // "ErrorMessage": null, + // "ErrorStatusCode": 0, + // "ErrorType": 0, + // "FoodCategory": 0, + // "IOSLink": null, + // "IsAuthenticated": true, + // "MealOrderStatus": 0, + // "MealType": 0, + // "MessageStatus": 1, + // "NumberOfResultRecords": 0, + // "PatientBlodType": null, + // "SuccessMsg": null, + // "SuccessMsgN": null, + // "VidaUpdatedResponse": null, + // "DoctorInformation_List": null, + // "GetAllPendingRecordsList": null, + // "GetAllSharedRecordsByStatusList": null, + // "GetResponseFileList": null, + // "IsHMGPatient": false, + // "IsLoginSuccessfully": false, + // "IsNeedUpdateIdintificationNo": false, + // "IsPatientAuthorized": false, + // "IsVidaPlus": false, + // "KioskSendSMS": false, + // "List": [ + // { + // "SetupID": "010266", + // "PatientType": 1, + // "PatientID": 5318335, + // "FirstName": "SYED TAHA", + // "MiddleName": "ALAM", + // "LastName": "ALAM", + // "FirstNameN": "سيد طه", + // "MiddleNameN": "علام", + // "LastNameN": "علام", + // "RelationshipID": 0, + // "Gender": 1, + // "DateofBirth": "/Date(839106000000+0300)/", + // "DateofBirthN": null, + // "NationalityID": "PAK", + // "PhoneResi": " ", + // "PhoneOffice": " ", + // "MobileNumber": "0560960398", + // "FaxNumber": " ", + // "EmailAddress": "testtaha@gmail.com", + // "BloodGroup": null, + // "RHFactor": null, + // "IsEmailAlertRequired": false, + // "IsSMSAlertRequired": true, + // "PreferredLanguage": "1", + // "IsPrivilegedMember": false, + // "MemberID": null, + // "ExpiryDate": null, + // "IsHmgEmployee": null, + // "EmployeeID": null, + // "EmergencyContactName": "", + // "EmergencyContactNo": "", + // "PatientPayType": 0, + // "DHCCPatientRefID": null, + // "IsPatientDummy": false, + // "Status": 2, + // "IsStatusCleared": null, + // "PatientIdentificationType": 2, + // "PatientIdentificationNo": "2579628724", + // "ProjectID": 15, + // "InfoSourceID": 0, + // "Address": "", + // "Age": 28, + // "AgeDesc": "28 Yr", + // "AreaID": 0, + // "CRSVerificationStatus": 2, + // "CRSVerificationStatusDesc": "verified", + // "CRSVerificationStatusDescN": "تم التوثيق", + // "CreatedBy": 0, + // "GenderDescription": "Male", + // "HealthIDFromNHICViaVida": "2bcc1b1a-96b7-4f33-86e2-fa955d0e3764", + // "IR": null, + // "ISOCityID": null, + // "ISOCountryID": null, + // "IsVerfiedFromNHIC": true, + // "ListPrivilege": [ + // { + // "ID": 1, + // "ServiceName": "Notifications", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 2, + // "ServiceName": "Family Files", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 3, + // "ServiceName": "Settings", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 4, + // "ServiceName": "My Profile", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 5, + // "ServiceName": "My Appointment", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 6, + // "ServiceName": "My Doctors", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 7, + // "ServiceName": "Radiology", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 8, + // "ServiceName": "Radiology Email", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 9, + // "ServiceName": "Radiology View Image", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 10, + // "ServiceName": "Lab Results", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 11, + // "ServiceName": "Lab Results Email", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 12, + // "ServiceName": "Precriptions", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 13, + // "ServiceName": "Precriptions Email", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 14, + // "ServiceName": "Eye Measurments", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 15, + // "ServiceName": "Eye Measurments Email", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 16, + // "ServiceName": "Sick Leaves", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 17, + // "ServiceName": "Sick Leaves Email", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 18, + // "ServiceName": "Approvals", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 19, + // "ServiceName": "Monthly Reports", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 20, + // "ServiceName": "Request Medical Report", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 21, + // "ServiceName": "Request Medical Report Email", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 22, + // "ServiceName": "Insurance Cards", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 23, + // "ServiceName": "Allergies", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 24, + // "ServiceName": "My Trackers", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 25, + // "ServiceName": "Vital Signs", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 26, + // "ServiceName": "My Vaccines", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 27, + // "ServiceName": "My Vaccines Email", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 28, + // "ServiceName": "Ask Doctors", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 29, + // "ServiceName": "Live Chat", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 30, + // "ServiceName": "Health Data", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 31, + // "ServiceName": "Online Check-in", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 32, + // "ServiceName": "Connect to internet", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 33, + // "ServiceName": "Advance Payment", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 34, + // "ServiceName": "Book Appointment", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 35, + // "ServiceName": "Child Vaccines", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 36, + // "ServiceName": "Blood Donation", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 38, + // "ServiceName": "H2O", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 40, + // "ServiceName": "ChatBot", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 41, + // "ServiceName": "Parking", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 42, + // "ServiceName": "SymptomChecker", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 47, + // "ServiceName": "AdvanceBalance", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 48, + // "ServiceName": "ActiveMedications", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 49, + // "ServiceName": "VaccineAvailability", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 51, + // "ServiceName": "UpcomingAppointment", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 52, + // "ServiceName": "PushNotificationCount", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 53, + // "ServiceName": "ActiveMedicationCount", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 54, + // "ServiceName": "LabOrderUnreadCount", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 55, + // "ServiceName": "RadOrderUnreadCount", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 56, + // "ServiceName": "MedicalReportUnreadCount", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 57, + // "ServiceName": "ERWaittingTimeShowing", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 58, + // "ServiceName": "OnlinePayment", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 59, + // "ServiceName": "RadiologyDisplayImage", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 60, + // "ServiceName": "EmergencyConsultation", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 61, + // "ServiceName": "PatientQueueCall", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 62, + // "ServiceName": "OnlinePrescriptionOrder", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 63, + // "ServiceName": "Transportations", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 64, + // "ServiceName": "HomeHealthCareService", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 65, + // "ServiceName": "Al-HabibPharmacyOnline", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 66, + // "ServiceName": "Al-HabibOffers", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 67, + // "ServiceName": "ComprehensiveMedicalCheckup", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 68, + // "ServiceName": "RRT", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 72, + // "ServiceName": "CancelLiveCareRequest", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 74, + // "ServiceName": "Exacart", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 76, + // "ServiceName": "Covid19-CarThrow", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 77, + // "ServiceName": "VoiceBot", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 78, + // "ServiceName": "LiveCareBookOnDoctorSchedule", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 79, + // "ServiceName": "CheckIn_QR", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 80, + // "ServiceName": "CheckIn_NFC", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 81, + // "ServiceName": "ED", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 82, + // "ServiceName": "Packages_&_Offers", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 83, + // "ServiceName": "Lakum_Points", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 84, + // "ServiceName": "QR_Reader", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 85, + // "ServiceName": "AncillaryOrders", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 86, + // "ServiceName": "Payment-MADA", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 87, + // "ServiceName": "Payment-VISA", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 88, + // "ServiceName": "Payment-MasterCard", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 89, + // "ServiceName": "Payment-ApplePay", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 90, + // "ServiceName": "Payment-Tamara", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 91, + // "ServiceName": "Payment-Installment", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 92, + // "ServiceName": "ED-Checkin", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 93, + // "ServiceName": "NetworkDebug", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 94, + // "ServiceName": "TamaraAncillary", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 95, + // "ServiceName": "Verif-Face", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 96, + // "ServiceName": "Verif-Finger", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 97, + // "ServiceName": "Verif-SMS", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 98, + // "ServiceName": "Verif-WhatsApp", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 99, + // "ServiceName": "PharmacyLivecare", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 100, + // "ServiceName": "ePharmacy", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 102, + // "ServiceName": "CheckIn_Geofence", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 103, + // "ServiceName": "Payment-ApplePay-Web", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 104, + // "ServiceName": "Livecare_Zoom", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 105, + // "ServiceName": "Dental Virtual Tour", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 106, + // "ServiceName": "Dental Medical Instructions", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 107, + // "ServiceName": "Navigation Service", + // "Previlege": false, + // "Region": null + // } + // ], + // "Marital": null, + // "OutSA": 0, + // "POBox": "", + // "ReceiveHealthSummaryReport": false, + // "SourceType": 0, + // "StrDateofBirth": null, + // "TempAddress": "", + // "ZipCode": "", + // "eHealthIDField": null, + // "patientPayType": null, + // "patientType": null, + // "status": null + // } + // ], + // "List_AskHabibMobileLoginInfo": null, + // "List_AskHabibPatientFile": null, + // "List_FamilyRelationships": null, + // "List_MergeFiles": null, + // "List_MobileLoginInfo": null, + // "List_PatientCount": null, + // "LogInTokenID": null, + // "MohemmPrivilege_List": null, + // "PateintID": 5318335, + // "PatientBloodType": "", + // "PatientER_AdminDriverFileList": null, + // "PatientER_AdminFile": null, + // "PatientER_DriverFile": null, + // "PatientER_DriverFileList": null, + // "PatientHasFile": false, + // "PatientMergedIDs": null, + // "PatientOutSA": false, + // "PatientShareRequestID": 0, + // "PatientType": 0, + // "ProjectIDOut": 0, + // "ReturnMessage": null, + // "SMSLoginRequired": false, + // "ServicePrivilege_List": [ + // { + // "ID": 1, + // "ServiceName": "Notifications", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 2, + // "ServiceName": "Family Files", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 3, + // "ServiceName": "Settings", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 4, + // "ServiceName": "My Profile", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 5, + // "ServiceName": "My Appointment", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 6, + // "ServiceName": "My Doctors", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 7, + // "ServiceName": "Radiology", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 8, + // "ServiceName": "Radiology Email", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 9, + // "ServiceName": "Radiology View Image", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 10, + // "ServiceName": "Lab Results", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 11, + // "ServiceName": "Lab Results Email", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 12, + // "ServiceName": "Precriptions", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 13, + // "ServiceName": "Precriptions Email", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 14, + // "ServiceName": "Eye Measurments", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 15, + // "ServiceName": "Eye Measurments Email", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 16, + // "ServiceName": "Sick Leaves", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 17, + // "ServiceName": "Sick Leaves Email", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 18, + // "ServiceName": "Approvals", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 19, + // "ServiceName": "Monthly Reports", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 20, + // "ServiceName": "Request Medical Report", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 21, + // "ServiceName": "Request Medical Report Email", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 22, + // "ServiceName": "Insurance Cards", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 23, + // "ServiceName": "Allergies", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 24, + // "ServiceName": "My Trackers", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 25, + // "ServiceName": "Vital Signs", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 26, + // "ServiceName": "My Vaccines", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 27, + // "ServiceName": "My Vaccines Email", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 28, + // "ServiceName": "Ask Doctors", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 29, + // "ServiceName": "Live Chat", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 30, + // "ServiceName": "Health Data", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 31, + // "ServiceName": "Online Check-in", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 32, + // "ServiceName": "Connect to internet", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 33, + // "ServiceName": "Advance Payment", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 34, + // "ServiceName": "Book Appointment", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 35, + // "ServiceName": "Child Vaccines", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 36, + // "ServiceName": "Blood Donation", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 38, + // "ServiceName": "H2O", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 40, + // "ServiceName": "ChatBot", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 41, + // "ServiceName": "Parking", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 42, + // "ServiceName": "SymptomChecker", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 47, + // "ServiceName": "AdvanceBalance", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 48, + // "ServiceName": "ActiveMedications", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 49, + // "ServiceName": "VaccineAvailability", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 51, + // "ServiceName": "UpcomingAppointment", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 52, + // "ServiceName": "PushNotificationCount", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 53, + // "ServiceName": "ActiveMedicationCount", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 54, + // "ServiceName": "LabOrderUnreadCount", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 55, + // "ServiceName": "RadOrderUnreadCount", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 56, + // "ServiceName": "MedicalReportUnreadCount", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 57, + // "ServiceName": "ERWaittingTimeShowing", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 58, + // "ServiceName": "OnlinePayment", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 59, + // "ServiceName": "RadiologyDisplayImage", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 60, + // "ServiceName": "EmergencyConsultation", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 61, + // "ServiceName": "PatientQueueCall", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 62, + // "ServiceName": "OnlinePrescriptionOrder", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 63, + // "ServiceName": "Transportations", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 64, + // "ServiceName": "HomeHealthCareService", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 65, + // "ServiceName": "Al-HabibPharmacyOnline", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 66, + // "ServiceName": "Al-HabibOffers", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 67, + // "ServiceName": "ComprehensiveMedicalCheckup", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 68, + // "ServiceName": "RRT", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 72, + // "ServiceName": "CancelLiveCareRequest", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 74, + // "ServiceName": "Exacart", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 76, + // "ServiceName": "Covid19-CarThrow", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 77, + // "ServiceName": "VoiceBot", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 78, + // "ServiceName": "LiveCareBookOnDoctorSchedule", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 79, + // "ServiceName": "CheckIn_QR", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 80, + // "ServiceName": "CheckIn_NFC", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 81, + // "ServiceName": "ED", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 82, + // "ServiceName": "Packages_&_Offers", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 83, + // "ServiceName": "Lakum_Points", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 84, + // "ServiceName": "QR_Reader", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 85, + // "ServiceName": "AncillaryOrders", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 86, + // "ServiceName": "Payment-MADA", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 87, + // "ServiceName": "Payment-VISA", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 88, + // "ServiceName": "Payment-MasterCard", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 89, + // "ServiceName": "Payment-ApplePay", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 90, + // "ServiceName": "Payment-Tamara", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 91, + // "ServiceName": "Payment-Installment", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 92, + // "ServiceName": "ED-Checkin", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 93, + // "ServiceName": "NetworkDebug", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 94, + // "ServiceName": "TamaraAncillary", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 95, + // "ServiceName": "Verif-Face", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 96, + // "ServiceName": "Verif-Finger", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 97, + // "ServiceName": "Verif-SMS", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 98, + // "ServiceName": "Verif-WhatsApp", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 99, + // "ServiceName": "PharmacyLivecare", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 100, + // "ServiceName": "ePharmacy", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 102, + // "ServiceName": "CheckIn_Geofence", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 103, + // "ServiceName": "Payment-ApplePay-Web", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 104, + // "ServiceName": "Livecare_Zoom", + // "Previlege": false, + // "Region": null + // }, + // { + // "ID": 105, + // "ServiceName": "Dental Virtual Tour", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 106, + // "ServiceName": "Dental Medical Instructions", + // "Previlege": true, + // "Region": null + // }, + // { + // "ID": 107, + // "ServiceName": "Navigation Service", + // "Previlege": false, + // "Region": null + // } + // ], + // "SharePatientName": null, + // "UserAccountIsActivated": false, + // "VerificationCode": null, + // "email": null, + // "errorList": null, + // "hasFile": false, + // "isActiveCode": false, + // "isMerged": false, + // "isNeedUserAgreement": false, + // "isSMSSent": false, + // "memberList": null, + // "message": "Patient Registered Successfully", + // "statusCode": 1 + // }; + await new BaseAppClient().post(REGISTER_USER, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: requestN.toJson()); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + Future registeredAuthenticatedUser(AuthenticatedUser user, deviceToken, lat, long) async { + var request = new RegisteredAuthenticatedUserRequest(); + request.deviceToken = deviceToken; + request.voipToken = ""; //this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false); + request.deviceType = Platform.isIOS ? "1" : "2"; + request.patientMobileNumber = user.mobileNumber![0] == '0' ? user.mobileNumber : '0' + user.mobileNumber!; + request.nationalID = user.patientIdentificationNo; + request.gender = user.gender; + request.patientID = user.patientID; + request.patientOutSA = user.outSA; + request.loginType = await sharedPref.getInt(LAST_LOGIN) != null ? await sharedPref.getInt(LAST_LOGIN) : 1; + request.mACAddress = '00:00:00:00:00:00'; + request.latitude = lat; + request.longitude = long; + request.languageID = int.parse(user.preferredLanguage!); + request.patientTypeID = user.patientType; + request.patientType = user.patientType; + dynamic localRes; + try { + await new BaseAppClient().post(LOGGED_IN_USER_URL, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: request.toJson()); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + Future sendPatientIDSMS(mobileNo, zipCode, context) async { + Map request; + + Request req = appGlobal.getPublicRequest(); + request = { + "PatientOutSA": zipCode == '966' ? 0 : 1, + "PatientMobileNumber": mobileNo, + "SearchType": 2, + "ZipCode": zipCode, + "DeviceTypeID": req.DeviceTypeID, + }; + + dynamic localRes; + + await new BaseAppClient().post(FORGOT_PATIENT_ID, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future forgotPasswordActivation(request, [value]) async { + request['VersionID'] = VERSION_ID; + request['Channel'] = CHANNEL; + request['IPAdress'] = IP_ADDRESS; + request['generalid'] = GENERAL_ID; + request['DeviceTypeID'] = Platform.isIOS ? 1 : 2; + request['LanguageID'] = (languageID == 'ar' ? 1 : 2); + + dynamic localRes; + try { + await new BaseAppClient().post(FORGOT_PASSWORD, onSuccess: (dynamic response, int statusCode) { + localRes = response; //CheckActivationCode.fromJson(); + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + // throw error; + }, body: request); + return Future.value(localRes); + } catch (error) { + throw error; + //return Future.value(error); + } + } + + Future checkIfUserAgreed() async { + Map request; + request = {"Region": 1, "SessionID": SESSION_ID}; + dynamic localRes; + try { + await new BaseAppClient().post(CHECK_USAGE_AGREEMENT, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + // throw error; + }, body: request); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + Future getUserAgreementContent() async { + Map request; + request = {"Region": 1}; + dynamic localRes; + try { + await new BaseAppClient().post(GET_USAGE_AGREEMENT, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + // throw error; + }, body: request); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + Future addUserAgreementContent() async { + Map request; + request = {"Region": 1}; + dynamic localRes; + try { + await new BaseAppClient().post(ADD_USAGE_AGREEMENT, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + // throw error; + }, body: request); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + Future getDashboard() async { + Map request = {}; + + dynamic localRes; + try { + await new BaseAppClient().post(DASHBOARD, onSuccess: (dynamic response, int statusCode) { + localRes = response; //CheckActivationCode.fromJson(); + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + // throw error; + }, body: request); + return Future.value(localRes); + } catch (error) { + throw error; + //return Future.value(error); + } + } + + getSettings() async { + dynamic localRes; + try { + await new BaseAppClient().post(PROFILE_SETTING, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: {}); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + Future saveSettings(request) async { + dynamic localRes; + try { + await new BaseAppClient().post(SAVE_SETTING, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: request); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + Future deactivateAccount(request, bool isLogin) async { + dynamic localRes; + try { + await new BaseAppClient().post(DEACTIVATE_ACCOUNT, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: request); + if (!isLogin) logout(); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + Future activateAccount(request) async { + dynamic localRes; + try { + await new BaseAppClient().post(DEACTIVATE_ACCOUNT, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: request); + logout(); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + Future getPatientOccupationList() async { + Map request = {"ProjectOutSA": false}; + + dynamic localRes; + try { + await new BaseAppClient().post(GET_PATIENT_OCCUPATION_LIST, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + localRes = error; + return Future.value(error); + }, body: request); + // logout(); + return Future.value(localRes); + } catch (error) { + throw error; + } + } + + logout() async { + await sharedPref.remove(LOGIN_TOKEN_ID); + await sharedPref.remove(PHARMACY_CUSTOMER_ID); + await authenticatedUserObject.getUser(); + Provider.of(AppGlobal.context, listen: false).isLogin = false; + var model = Provider.of(AppGlobal.context, listen: false); + model.setState(0, 0, false, null); + Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); + } +} diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart new file mode 100644 index 00000000..4737756c --- /dev/null +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -0,0 +1,563 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/Request.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:flutter/material.dart'; + +import '../../models/InPatientServices/get_admission_info_response_model.dart'; +import '../../uitl/date_uitl.dart'; + +class ClinicListService extends BaseService { + AppSharedPreferences sharedPref = AppSharedPreferences(); + AppGlobal appGlobal = new AppGlobal(); + + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + + double? lat; + double? long; + + Future getClinicsList(context) async { + Map request = {}; + + dynamic localRes; + + await baseAppClient.post(GET_CLINICS_LIST_URL, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + sharedPref.setObject(CLINICS_LIST, localRes); + return Future.value(localRes); + } + + Future getClinicByHospital({required String projectID}) async { + Map request = {"ProjectID": projectID}; + + dynamic localRes; + + await baseAppClient.post(GET_CLINICS_LIST_WRT_HOSPITAL_URL, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getActiveAppointmentNo(context) async { + Map request = {}; + + request = {"IsActiveAppointment": true, "LanguageID": 1}; + + dynamic localRes; + + await baseAppClient.post(GET_ACTIVE_APPOINTMENTS_LIST_URL, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getProjectsList(int languageID, context) async { + Map request = {}; + + // request = {"LanguageID": languageID}; + + dynamic localRes; + + await baseAppClient.post(GET_PROJECTS_LIST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getChiefComplaintsList(int patientID, int clinicID, int projectID, int languageID, bool isContinueDentalPlan, BuildContext context, {doctorId}) async { + //Utils.showProgressDialog(context); + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + Request req = appGlobal.getPublicRequest(); + request = { + "ClinicID": clinicID, + "ProjectID": projectID, + "SelectedDate": "", + "SelectedTime": "", + "License": true, + // "VersionID": 5.6, + // "Channel": 3, + "LanguageID": languageID, + "IPAdress": "10.20.10.20", + "generalid": "Cs2020@2016\$2958", + "SessionID": null, + "isDentalAllowedBackend": true, + "DeviceTypeID": 1, + "PatientID": patientID, + "ContinueDentalPlan": isContinueDentalPlan, + "IsSearchAppointmnetByClinicID": false, + "DateofBirth": authUser.dateofBirth + }; + + dynamic localRes; + + await baseAppClient.post(GET_DOCTORS_LIST_URL, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getChiefComplaintDoctorList(int chiefComplaintID, int projectID, int languageID, BuildContext context, {doctorId}) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) { + lat = await this.sharedPref.getDouble(USER_LAT); + long = await this.sharedPref.getDouble(USER_LONG); + } + + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + Request req = appGlobal.getPublicRequest(); + request = { + "ChiefComplaintID": chiefComplaintID, + "ProjectID": projectID, + // "VersionID": 5.6, + // "Channel": 3, + "LanguageID": languageID, + // "IPAdress": req.IPAdress, + // "generalid": req.generalid, + "SessionID": null, + "isDentalAllowedBackend": true, + "Latitude": lat != null ? lat.toString() : "0.0", + "Longitude": long != null ? long.toString() : "0.0", + "DeviceTypeID": req.DeviceTypeID, + "IsPublicRequest": true + }; + + dynamic localRes; + + await baseAppClient.post(GET_DENTAL_DOCTORS_LIST_URL, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getCountries() async { + Map request = {}; + dynamic localRes; + await baseAppClient.post(GET_NATIONALITY, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getInPatientAdvancePaymentHistory(int projectID, int admissionNo, int admissionReqNo, context) async { + Map request; + request = {"ProjectID": projectID, "AdmissionNo": admissionNo, "AdmissionReqNo": admissionReqNo}; + + dynamic localRes; + + await baseAppClient.post(GET_INPATIENT_PAID_ADVANCE_PAYMENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future getInPatientPaymentLink(int paymentRequestID, int projectID, int admissionNo, int orderID, String name, String email, num amount, String nationalID, int clinicID, context) async { + Map request; + // request = {"ProjectID": projectID, "AdmissionReqNo": admissionReqNo, "AdmissionNo": admissionNo}; + + request = { + "ProjectID": projectID, + "PaymentRequestId": paymentRequestID, + "ClientOrderID": orderID, + "OrderDescription": "InPatient Advance Payment", + "CustomerName": name, + "CustomerEmail": email, + "Amount": amount, + "IsPaid": 0, + "AppointmentID": admissionNo.toString(), + "PaymentOption": "0", + "PaymentReferenceNumber": admissionNo, + "SourceType": "1", + "NationalID": nationalID, + "ClinicID": clinicID, + "createdBy": 102 + }; + + dynamic localRes; + + await baseAppClient.post(GET_INPATIENT_ADVANCE_PAYMENT_LINK, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future submitBirthNotification(num motherMRN, int projectID, String fatherNameAR, String fatherNameEN, String babyNameAR, String babyNameEN, String contactNum, String idImage, context) async { + Map request; + request = { + "ProjectID": projectID, + "mothermrn": motherMRN, + "fatherName": fatherNameEN, + "fatherNameAr": fatherNameAR, + "babyName": babyNameEN, + "babyNameAr": babyNameEN, + "contactNumber": contactNum, + "iDImage": idImage, + }; + + dynamic localRes; + + await baseAppClient.post(SAVE_BIRTH_NOTIFICATION, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future insertInPatientOrder( + GetAdmissionInfoResponseModel getAdmissionInfoResponseModel, int typeID, String patientName, String patientNameAR, String patientMobileNo, String comments, context) async { + Map request; + request = { + "ProjectID": getAdmissionInfoResponseModel.projectID, + "TypeID": typeID, + "RoomNo": getAdmissionInfoResponseModel.roomID, + "GenderId": 2, + "AdmissionNo": getAdmissionInfoResponseModel.admissionNo, + "prescriptionNo": 250420, + "patientName": patientName, + "patientNameN": patientNameAR, + "PatientMobileNumber": patientMobileNo, + "comments": comments + }; + + dynamic localRes; + + await baseAppClient.post(INSERT_INPATIENT_ORDER, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future getGeneralInstructions(int projectID, int languageID, context) async { + Map request; + request = {"ProjectID": projectID, "LanguageID": languageID}; + + dynamic localRes; + + await baseAppClient.post(GET_GENERAL_INSTRUCTIONS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future getMedicalInstructions(int projectID, int languageID, context) async { + Map request; + request = {"ProjectID": projectID, "LanguageID": languageID}; + + dynamic localRes; + + await baseAppClient.post(GET_MEDICAL_INSTRUCTIONS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future getInPatientAdvancePaymentRequests(int projectID, int admissionNo, int admissionReqNo, int languageID, context) async { + Map request; + request = {"ProjectID": projectID, "AdmissionReqNo": admissionReqNo, "AdmissionNo": admissionNo, "LanguageID": languageID}; + + dynamic localRes; + + await baseAppClient.post(GET_INPATIENT_ADVANCE_PAYMENT_REQUESTS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future getBirthNotification(num motherMRN, int projectID, int languageID, context) async { + Map request; + request = {"mothermrn": motherMRN, "LanguageID": languageID, "ProjectID": projectID}; + + dynamic localRes; + + await baseAppClient.post(GET_BIRTH_NOTIFICATION, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future getAdmittedPatientDetails(int patientID, int projectID, int admissionNo, int buildingID, int floorID, int nursingStationID, context) async { + Map request; + request = {"ProjectID": projectID, "PatientID": patientID, "AdmissionNo": admissionNo, "BuildingID": buildingID, "FloorID": floorID, "NursingStationID": nursingStationID}; + + dynamic localRes; + + await baseAppClient.post(GET_ADMITTED_PATIENTS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future getCurrentWeekIDAndDay(BuildContext context) async { + dynamic localRes; + await baseAppClient.get(GET_CURRENT_WEEKID_WEEKDAY, isExternal: false, isRCService: false, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }); + return localRes; + } + + Future getMealsOfScheduleID(int projectID, int admissionNo, int dietType, int weekID, int weekDay, context) async { + Map request; + request = { + "ProjectID": projectID, + "AdmissionNo": admissionNo, + "BuildingID": 0, + "FloorID": 0, + "NursingStationID": 0, + "DietType": dietType, + "WeekID": weekID, + "WeekDay": weekDay, + }; + + dynamic localRes; + + await baseAppClient.post(GET_MEALS_OF_SCHEDULE_ID, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future getDefaultItemsOfScheduleID(int projectID, int scheduleID, context) async { + Map request; + request = { + "ProjectID": projectID, + "MealScheduleID": scheduleID, + }; + + dynamic localRes; + + await baseAppClient.post(GET_MEAL_ITEMS_OF_SCHEDULE_ID, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future placeMealPlanOrder(int projectID, int scheduleID, String itemIDList, int patientID, int admissionNo, bool isCompanion, bool isFasting, context) async { + Map request; + request = { + "ProjectID": projectID, + "ItemIDList": itemIDList, + "IsActive": true, + "OrderDate": DateUtil.getISODateFormat(DateTime.now()).replaceAll("T", " "), + "PatientID": patientID, + "AdmissionNo": admissionNo, + "IsCompanion": isCompanion, + "IsFasting": isFasting, + "CreatedBy": patientID, + "EditedBy": patientID, + "MealScheduleID": scheduleID, + "MealStatus": 1, + "ItemStatus": 0, + "ConfirmedBy": patientID, + "Remarks": "", + "IsVIP": false, + "IsFixedRemarks": false + }; + + dynamic localRes; + + await baseAppClient.post(PLACE_MEAL_PLAN_ORDER, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future checkIfInPatientAPI(context) async { + Map request; + request = { + "IsActiveAppointment": false, + }; + + dynamic localRes; + + await baseAppClient.post(CHECK_IF_PATIENT_ADMITTED, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future getWeCareURL(int projectID) async { + Map request = {"ProjectID": projectID}; + dynamic localRes; + await baseAppClient.post(GET_WE_CARE_TOUR_URL, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getDentalInstructions() async { + Map request = {}; + dynamic localRes; + await baseAppClient.post(GET_DENTAL_INSTRUCTIONS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getEROnlineCheckInPaymentDetails(int projectID, int clinicID) async { + Map request = {"ProjectID": projectID, "ClinicID": clinicID}; + dynamic localRes; + await baseAppClient.post(GET_ER_ONLINE_PAYMENT_DETAILS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future checkIfPatientHasArrived(int projectID, int clinicID) async { + Map request = {"ProjectID": projectID, "ClinicID": clinicID}; + dynamic localRes; + await baseAppClient.post(CHECK_IF_PATIENT_ARRIVED_ER_ONLINE_CHECKIN, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future checkPatientERAdvanceBalance(int clinicID) async { + Map request = {"ClinicID": clinicID}; + dynamic localRes; + await baseAppClient.post(CHECK_PATIENT_ER_ADVANCE_BALANCE, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future getProjectIDFromNFC(String nfcID) async { + Map request = {"nFC_Code": nfcID}; + dynamic localRes; + await baseAppClient.post(GET_PROJECT_FROM_NFC, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future getDischargeMedicationOrder(GetAdmissionInfoResponseModel getAdmissionInfoResponseModel) async { + Map request; + request = { + "ProjectID": getAdmissionInfoResponseModel.projectID, + "ClinicID": getAdmissionInfoResponseModel.clinicID, + "DoctorID": getAdmissionInfoResponseModel.doctorID, + "AdmissionNo": getAdmissionInfoResponseModel.admissionNo + }; + + // request = { + // "ProjectID": 12, + // "VersionID": 10.8, + // "Channel": 3, + // "LanguageID": 2, + // "IPAdress": "10.20.10.20", + // "generalid": "Cs2020@2016\$2958", + // "DeviceTypeID": 2, + // "PatientType": 1, + // "PatientTypeID": 1, + // "TokenID": "@dm!n", + // "PatientID": 869588, + // "PatientOutSA": 0, + // "SessionID": "rVuK3nzN4UKN0SW95un0jQ==", + // "ClinicID": 2, + // "DoctorID": "7600", + // "AdmissionNo": 2011001258 + // }; + + dynamic localRes; + + await baseAppClient.post(INPATIENT_DISCHARGE_MEDICATIONS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } + + Future insertForGeneralAdmissionConsent(int patientID, int admissionReqNo, int clinicID, int projectID, int status, context) async { + Map request; + request = { + "AdmissionRequestNo": admissionReqNo, + "ClinicID": clinicID, + "CreatedBy": 102, + "PatientID": patientID, + "ProjectID": projectID, + "status": status, + "searchKey": "", + "pageIndex": 0, + "pageSize": 0, + }; + + dynamic localRes; + + await baseAppClient.post(INSERT_GENERAL_ADMISSION_CONSENT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isAllowAny: true); + return Future.value(localRes); + } +} diff --git a/lib/services/covid-drivethru/covid-drivethru.dart b/lib/services/covid-drivethru/covid-drivethru.dart new file mode 100644 index 00000000..b4241bcc --- /dev/null +++ b/lib/services/covid-drivethru/covid-drivethru.dart @@ -0,0 +1,108 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/Request.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:flutter/material.dart'; + +class CovidDriveThruService extends BaseService { + AppSharedPreferences sharedPref = AppSharedPreferences(); + AppGlobal appGlobal = new AppGlobal(); + + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + + Future getCovidProjectsList(BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + request = {}; + + dynamic localRes; + + await baseAppClient.post(GET_COVID_DRIVETHRU_PROJECT_LIST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getCovidTestProceduresList(BuildContext context, num testTypeEnum, num testProcedureEnum, int projectID) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + request = { + "ProjectID": projectID, + "TestTypeEnum": testTypeEnum, + "TestProcedureEnum": testProcedureEnum + }; + + dynamic localRes; + + await baseAppClient.post(GET_COVID_DRIVETHRU_PROCEDURES_LIST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getCovidPaymentInformation(BuildContext context, int projectID, String procedureID, num testTypeEnum, num testProcedureEnum) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + request = { + "ProjectID": projectID, + "ProcedureId": procedureID, + "TestTypeEnum": testTypeEnum, + "TestProcedureEnum": testProcedureEnum + }; + + dynamic localRes; + + await baseAppClient.post(GET_COVID_DRIVETHRU_PAYMENT_INFO, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getCovidFreeSlots(BuildContext context, int projectID, num testTypeEnum, num testProcedureEnum) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + request = { + "ProjectID": projectID, + "TestTypeEnum": testTypeEnum, + "TestProcedureEnum": testProcedureEnum + }; + + dynamic localRes; + + await baseAppClient.post(GET_COVID_DRIVETHRU_FREE_SLOTS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } +} diff --git a/lib/services/family_files/family_files_provider.dart b/lib/services/family_files/family_files_provider.dart new file mode 100644 index 00000000..123cc4d1 --- /dev/null +++ b/lib/services/family_files/family_files_provider.dart @@ -0,0 +1,340 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/family-file/add_family_file_request.dart'; +import 'package:diplomaticquarterapp/core/model/family-file/insert_share_file_request.dart'; +import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:provider/provider.dart'; + +// SharedPreferences sharedPref = new SharedPreferences(); +enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED } + +AppSharedPreferences sharedPref = new AppSharedPreferences(); + +const String GET_SHARED_RECORD_BY_STATUS = 'Services/Authentication.svc/REST/GetAllSharedRecordsByStatus'; +const String ADD_FAMILY_FILES = 'Services/Patients.svc/REST/ShareFamilyFileService'; +const String SEND_FAMILY_FILE_ACTIVATION = 'Services/Authentication.svc/REST/SendActivationCodeForFamilyFile'; +const String INSERT_PATIENT_FILE = 'Services/Authentication.svc/REST/Insert_SharePatientFile'; +const String CHECK_ACTIVATION_CODE = 'Services/Authentication.svc/REST/CheckActivationCodeForFamilyFile'; + +const String UPDATE_FILE_STATUS = 'Services/Authentication.svc/REST/Update_FileStatus'; +const String REMOVE_FILE_STATUS = 'Services/Authentication.svc/REST/ActiveDeactive_PatientFile'; + +const String ACTIVATION_CODE_URL = "Services/Authentication.svc/REST/CheckActivationCode"; +const String SENT_REQUEST_URL = 'Services/Authentication.svc/REST/GetAllSharedRecordsByStatus'; +const String RECEVIED_REQUEST_URL = 'Services/Authentication.svc/REST/GetAllPendingRecordsByResponseId'; +const ACCEPT_REJECT_FAMILY = 'Services/Authentication.svc/REST/Update_FileStatus'; +const DEACTIVATE_FAMILY = 'Services/Authentication.svc/REST/DeactivateRequestByRensponse'; + +class FamilyFilesProvider with ChangeNotifier { + bool isLogin = false; + bool isLoading = true; + dynamic authenticatedUser; + GetAllSharedRecordsByStatusResponse allSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse(); + + Future getSharedRecordByStatus(int languageID) async { + dynamic localRes; + try { + var request = GetAllSharedRecordsByStatusReq(); + // var request = {"LanguageID": languageID}; + // var result = await sharedPref.getObject(MAIN_USER); + // request.status = 0; + // request.patientID = result["PatientID"]; + await new 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); + return Future.value(GetAllSharedRecordsByStatusResponse.fromJson(localRes)); + } catch (error) { + print("-------" + error.toString()); + throw error; + } + } + + Future getUserViewRequest(responseID, int languageID) async { + try { + dynamic localRes; + Map request = {}; + request['ResponseID'] = responseID; + await new BaseAppClient().post(RECEVIED_REQUEST_URL, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + return Future.error(error); + }, body: request); + if (localRes != null) { + // sharedPref.setObject(FAMILY_FILE, localRes); + allSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse.fromJson(localRes); + return Future.value(allSharedRecordsByStatusResponse); + } else + return Future.error("No Data"); + } catch (error) { + print("errorerror:$error"); + return Future.error(error); + } + } + + Future getUserSentRequest() async { + try { + dynamic localRes; + Map request = {}; + request['Status'] = 0; + await new BaseAppClient().post(SENT_REQUEST_URL, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + return Future.value(error); + //AppToast.showErrorToast(message: error); + //throw error; + }, body: request); + //sharedPref.setObject(FAMILY_FILE, localRes); + return Future.value(GetAllSharedRecordsByStatusResponse.fromJson(localRes)); + } catch (error) { + print(error); + throw error; + } + } + + Future addFamilyFile(AddFamilyFileReq request) async { + try { + dynamic localRes; + // var request = GetAllSharedRecordsByStatusReq(); + //request.status = 0; + await new BaseAppClient().post(ADD_FAMILY_FILES, 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); + return Future.value(localRes); + } catch (error) { + print(error); + + return Future.value(error); + } + } + + Future insertNewMember(InsertSharePatientFileReq request) async { + try { + dynamic localRes; + // var request = GetAllSharedRecordsByStatusReq(); + //request.status = 0; + await new BaseAppClient().post(INSERT_PATIENT_FILE, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request.toJson()); + + return Future.value(localRes); + } catch (error) { + print(error); + throw error; + } + } + + Future sendActivationCode(cellNumber, zipCode, patientIdentificationID, responseID, bool isExcluded) async { + try { + dynamic localRes; + var request = SendActivationRequest(); + request.zipCode = zipCode; + request.patientMobileNumber = int.parse(cellNumber); + request.patientIdentificationID = patientIdentificationID; + request.projectOutSA = zipCode == '966' ? false : true; + request.loginType = request.searchType = 1; + request.oTPSendType = 1; + request.isRegister = false; + request.responseID = responseID; + request.status = 2; + request.familyRegionID = zipCode == '966' ? 1 : 2; + request.isPatientExcluded = isExcluded; + await new BaseAppClient().post(SEND_FAMILY_FILE_ACTIVATION, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + AppToast.showErrorToast(message: error); + throw error; + }, body: request.toJson()); + + return Future.value(localRes); + } catch (error) { + print(error); + throw error; + } + } + + //TODO + Future checkActivationCode(loginTokenID, activationCode, indentification, mobileNo, requestID, responseID) async { + try { + dynamic localRes; + Map request = {}; + // request['ZipCode'] = user.ZipCode; + request['PatientMobileNumber'] = mobileNo; + request['PatientIdentificationID'] = indentification; + request['LogInTokenID'] = loginTokenID; + request['activationCode'] = activationCode; + request['PatientShareRequestID'] = requestID; + request['ResponseID'] = responseID; + request['Status'] = 3; + + // this.authService.authenticateRequest(request); + await new BaseAppClient().post(CHECK_ACTIVATION_CODE, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + AppToast.showErrorToast(message: error); + throw error; + }, body: request); + + return Future.value(localRes); + } catch (error) { + print(error); + throw error; + } + } + + Future acceptAndRejectRecievedRequests(id, stauts) async { + try { + dynamic localRes; + Map request = {}; + request['ID'] = id; + request['Status'] = stauts; + await new BaseAppClient().post(UPDATE_FILE_STATUS, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + AppToast.showErrorToast(message: error); + throw error; + }, body: request); + + return Future.value(localRes); + } catch (error) { + print(error); + throw error; + } + } + + Future deativateActivateMemberFile(request) async { + try { + dynamic localRes; + + await new BaseAppClient().post(REMOVE_FILE_STATUS, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + AppToast.showErrorToast(message: error); + throw error; + }, body: request); + + return Future.value(localRes); + } catch (error) { + print(error); + throw error; + } + } + + Future silentLoggin(GetAllSharedRecordsByStatusList? switchUser, int languageID, {onSuccess, mainUser}) async { + Map request = {}; + if (mainUser == true) { + var currentUser = AuthenticatedUser.fromJson(await sharedPref.getObject(MAIN_USER) ?? ""); + + request['PatientOutSA'] = currentUser.outSA; //currentUser.outSA; //? 1 : 0; + request['LoginType'] = await sharedPref.getInt(LAST_LOGIN) ?? 1; + request['MobileNo'] = currentUser.mobileNumber![0].toString() == "0" ? currentUser.mobileNumber.toString() : '0' + currentUser.mobileNumber.toString(); + request['PatientMobileNumber'] = currentUser.mobileNumber; //['MobileNumber']; + request['SearchType'] = 2; + // request['SuperUser'] = currentUser.patientID; //currentUser.PatientID; + request['PatientIdentificationID'] = ''; + request['IsSilentLogin'] = true; + request['DeviceToken'] = await sharedPref.getString(PUSH_TOKEN ?? ""); + request['PatientID'] = currentUser.patientID; //['PatientID']; + request['ZipCode'] = currentUser.outSA == 1 ? "971" : "966"; + request['activationCode'] = '0000'; + request['isRegister'] = false; + request['LanguageID'] = languageID; + } else { + var currentUser = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); + //const request = new SwitchUserRequest(); + + // request['LogInTokenID'] = ''; + // request['PatientOutSA'] = currentUser.outSA; //? 1 : 0; + request['PatientOutSA'] = switchUser!.familyRegionID != null + ? switchUser!.familyRegionID == 1 + ? 0 + : 1 + : currentUser.outSA; //currentUser.outSA; //? 1 : 0; + request['PatientMobileNumber'] = switchUser!.mobileNumber; //['MobileNumber']; + request['SearchType'] = 2; + request['SuperUser'] = switchUser!.patientID; //currentUser.PatientID; + request['PatientIdentificationID'] = ''; + request['IsSilentLogin'] = true; + request['PatientID'] = switchUser!.responseID; //['PatientID']; + request['ZipCode'] = switchUser.familyRegionID != null + ? switchUser.familyRegionID == 1 + ? "966" + : "971" + : "966"; + // request['ZipCode'] = currentUser.outSA == 1 ? "971" : "966"; + request['activationCode'] = '0000'; + request['isRegister'] = false; + request['LanguageID'] = languageID; + } + try { + dynamic localRes; + + await BaseAppClient().post(ACTIVATION_CODE_URL, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + AppToast.showErrorToast(message: error); + throw error; + }, body: request); + sharedPref.setString(BLOOD_TYPE, localRes['PatientBloodType'] ?? ""); + return Future.value(localRes); + } + catch (error) { + print(error); + throw error; + } + } + + Future acceptRejectFamily(request) async { + try { + dynamic localRes; + + await new BaseAppClient().post(ACCEPT_REJECT_FAMILY, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + AppToast.showErrorToast(message: error); + throw error; + }, body: request); + + return Future.value(localRes); + } catch (error) { + print(error); + throw error; + } + } + + Future deactivateFamily(request) async { + try { + dynamic localRes; + + await new BaseAppClient().post(DEACTIVATE_FAMILY, onSuccess: (dynamic response, int statusCode) { + localRes = response; + }, onFailure: (String error, int statusCode) { + AppToast.showErrorToast(message: error); + throw error; + }, body: request); + + return Future.value(localRes); + } catch (error) { + print(error); + throw error; + } + } +} diff --git a/lib/services/livecare_services/livecare_provider.dart b/lib/services/livecare_services/livecare_provider.dart new file mode 100644 index 00000000..43547056 --- /dev/null +++ b/lib/services/livecare_services/livecare_provider.dart @@ -0,0 +1,368 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/ApplePayInsertRequest.dart'; +import 'package:diplomaticquarterapp/models/tamara_request_model.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:flutter/material.dart'; + +class LiveCareService extends BaseService { + AppSharedPreferences sharedPref = AppSharedPreferences(); + AppGlobal appGlobal = new AppGlobal(); + + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + + Future getLivecareClinics(int languageID, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + request = { + "Age": authUser.age != null ? authUser.age : 0, + "PatientID": authUser.patientID != null ? authUser.patientID : 0, + "Gender": authUser.gender != null ? authUser.gender : 0, + "LanguageID": languageID + }; + + dynamic localRes; + + await baseAppClient.post(GET_LIVECARE_CLINICS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getLiveCareScheduledClinics(BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + request = {"Age": authUser.age != null ? authUser.age : 0, "PatientID": authUser.patientID != null ? authUser.patientID : 0, "Gender": authUser.gender != null ? authUser.gender : 0}; + + dynamic localRes; + + await baseAppClient.post(GET_LIVECARE_SCHEDULE_CLINICS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getLiveCareScheduledDoctorList(BuildContext context, int serviceID, int languageID) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + request = { + "ServiceID": serviceID, + "Age": authUser.age != null ? authUser.age : 0, + "PatientID": authUser.patientID != null ? authUser.patientID : 0, + "Gender": authUser.gender != null ? authUser.gender : 0, + "LanguageID": languageID + }; + + dynamic localRes; + + await baseAppClient.post(GET_LIVECARE_SCHEDULE_CLINIC_DOCTOR_LIST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getLivecareHistory(BuildContext context) async { + Map request; + request = {}; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + dynamic localRes; + + await baseAppClient.post(GET_LIVECARE_HISTORY, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getPatientInfoByQR(String clientID, BuildContext context) async { + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + Map request; + request = {"clientid": clientID, "patientid": authUser.patientID, "isOutKsa": authUser.outSA == 1 ? true : false, "appLang": languageID == 'ar' ? "1" : "2"}; + + dynamic localRes; + + await baseAppClient.post("https://vcallapi.hmg.com/api/PharmaLiveCare/getPatientInfoByQR", onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request, isExternal: true); + return Future.value(localRes); + } + + Future getLivecareClinicTiming(int serviceID, int languageID, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + request = { + "ServiceID": serviceID, + "LanguageID": languageID, + "Age": authUser.age != null ? authUser.age : 0, + "PatientID": authUser.patientID != null ? authUser.patientID : 0, + "Gender": authUser.gender != null ? authUser.gender : 0 + }; + + dynamic localRes; + + await baseAppClient.post(GET_LIVECARE_CLINIC_TIMING, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getERAppointmentFees(int serviceID, bool isPharmaLiveCare, int languageID, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + request = { + "IsPharmacy": isPharmaLiveCare, + "ServiceID": serviceID, + "ProjectID": 12, + "PatientID": authUser.patientID != null ? authUser.patientID : 0, + "Age": authUser.age != null ? authUser.age : 0, + "Gender": authUser.gender != null ? authUser.gender : 0, + "LanguageID": languageID + }; + + dynamic localRes; + + await baseAppClient.post(GET_ER_APPOINTMENT_FEES, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getERAppointmentTime(int serviceID, bool isPharmaLiveCare, int languageID, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + request = { + "IsPharmacy": isPharmaLiveCare, + "ServiceID": serviceID, + "ProjectID": 12, + "Age": authUser.age != null ? authUser.age : 0, + "PatientID": authUser.patientID != null ? authUser.patientID : 0, + "Gender": authUser.gender != null ? authUser.gender : 0, + "LanguageID": languageID + }; + + dynamic localRes; + + await baseAppClient.post(GET_ER_APPOINTMENT_TIME, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future addNewCallForPatientER(int serviceID, String clientRequestID, int callTypeID, int languageID, bool isPharma, BuildContext context) async { + Map request; + + String? deviceToken; + + // String voipToken = Platform.isIOS ? (await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN)) : ""; + String voipToken = Platform.isIOS ? (await AppSharedPreferences().getString(APNS_TOKEN)) : ""; + getDeviceToken().then((value) { + print(value); + deviceToken = value; + }); + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + request = { + "IsPharmacy": isPharma, + "ErServiceID": serviceID, + "ClientRequestID": clientRequestID, + "DeviceToken": deviceToken!, + "VoipToken": voipToken, + "IsFlutter": true, + "Latitude": await this.sharedPref.getDouble(USER_LAT), + "Longitude": await this.sharedPref.getDouble(USER_LONG), + "DeviceType": Platform.isIOS ? 'iOS' : 'Android', + "Age": authUser.age != null ? authUser.age : 0, + "PatientID": authUser.patientID != null ? authUser.patientID : 0, + "Gender": authUser.gender != null ? authUser.gender : 0, + "LanguageID": languageID, + "IsVoip": Platform.isIOS ? true : false, + "CallTypeID": callTypeID + }; + + dynamic localRes; + + await baseAppClient.post(ADD_NEW_CALL_FOR_PATIENT_ER, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getDeviceToken() async { + String deviceToken = await sharedPref.getString(PUSH_TOKEN); + return deviceToken; + } + + Future cancelLiveCareRequest(int vc_id, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + request = {"VCID": vc_id}; + + dynamic localRes; + + await baseAppClient.post(CANCEL_LIVECARE_REQUEST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future applePayInsertRequest(ApplePayInsertRequest applePayInsertRequest, BuildContext context) async { + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + dynamic localRes; + await baseAppClient.post(APPLE_PAY_INSERT_REQUEST, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: applePayInsertRequest.toJson()); + return Future.value(localRes); + } + + Future sendLiveCareInvoiceEmail(String appoNo, int projectID, String emailAddress, int languageID, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + request = {"To": emailAddress, "ProjectID": projectID, "AppointmentNo": appoNo, "LanguageID": languageID}; + dynamic localRes; + await baseAppClient.post(SEND_LIVECARE_INVOICE_EMAIL, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future endCallAPI(String sessionID, int sessionStatus, BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + request = {"Open_SessionID": sessionID, "SessionStatus": sessionStatus, "SessionEndedBy": "Patient"}; + + dynamic localRes; + + await baseAppClient.post(CHANGE_PATIENT_ER_SESSION, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future tamaraInsertRequest(TamaraRequestModel tamaraInsertRequest, BuildContext context) async { + dynamic localRes; + await baseAppClient.post(TAMARA_REQUEST_INSERT, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: tamaraInsertRequest.toJson()); + return Future.value(localRes); + } + + Future getOneSignalVOIPToken(String voipToken, BuildContext context) async { + Map request; + // request = {"app_id": "b87a754b-9a2a-437c-960b-39a079c57586", "identifier": voipToken, "device_type": 0}; + request = {"app_id": "b87a754b-9a2a-437c-960b-39a079c57586", "identifier": voipToken, "device_type": 0, "test_type": 1}; + + dynamic localRes; + + await baseAppClient.post(GET_ONESIGNAL_VOIP_TOKEN, isExternal: true, isAllowAny: true, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future cancelPharmaLiveCareRequest(String pharmaClientRequestID, BuildContext context) async { + Map request; + request = {"clientid": pharmaClientRequestID, "status": "Cancel"}; + + dynamic localRes; + + await baseAppClient.post(CANCEL_PHARMA_LIVECARE_REQUEST, isExternal: true, isAllowAny: true, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } +} diff --git a/lib/services/my_invoice_service/my_invoice_services.dart b/lib/services/my_invoice_service/my_invoice_services.dart new file mode 100644 index 00000000..2245eeef --- /dev/null +++ b/lib/services/my_invoice_service/my_invoice_services.dart @@ -0,0 +1,112 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/Request.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; + +class MyInvoicesService extends BaseService { + AppSharedPreferences sharedPref = AppSharedPreferences(); + AppGlobal appGlobal = new AppGlobal(); + + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + + Future getAllDentalAppointments(int projectID, context) async { + Map request; + + Request req = appGlobal.getPublicRequest(); + request = { + "IPAdress": "10.20.10.20", + "VersionID": req.VersionID, + "Channel": req.Channel, + "generalid": 'Cs2020@2016\$2958', + "PatientOutSA": authUser.outSA, + "DeviceTypeID": req.DeviceTypeID, + "SessionID": null, + "PatientID": authUser.patientID, + "License": true, + "IsRegistered": true, + "ProjectID": projectID, + "PatientTypeID": authUser.patientIdentificationType, + "PatientType": authUser.patientType, + "isDentalAllowedBackend": false + }; + + dynamic localRes; + + await baseAppClient.post(GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getDentalAppointmentInvoice(int projectID, int appoNo, int invoiceNo, context) async { + Map request; + + Request req = appGlobal.getPublicRequest(); + request = { + "IPAdress": "10.20.10.20", + "VersionID": req.VersionID, + "Channel": req.Channel, + "generalid": 'Cs2020@2016\$2958', + "PatientOutSA": authUser.outSA, + "DeviceTypeID": req.DeviceTypeID, + "SessionID": null, + "PatientID": authUser.patientID, + "License": true, + "AppointmentNo": appoNo, + "InvoiceNo": invoiceNo, + "IsRegistered": true, + "ProjectID": projectID, + "PatientTypeID": authUser.patientIdentificationType, + "PatientType": authUser.patientType, + "isDentalAllowedBackend": false + }; + + dynamic localRes; + + await baseAppClient.post(GET_DENTAL_APPOINTMENT_INVOICE, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future sendDentalAppointmentInvoiceEmail(int projectID, int appoNo, context) async { + Map request; + + Request req = appGlobal.getPublicRequest(); + request = { + "IPAdress": "10.20.10.20", + "VersionID": req.VersionID, + "Channel": req.Channel, + "generalid": 'Cs2020@2016\$2958', + "PatientOutSA": authUser.outSA, + "DeviceTypeID": req.DeviceTypeID, + "SessionID": null, + "PatientID": authUser.patientID, + "License": true, + "AppointmentNo": appoNo, + "To": authProvider.authenticatedUserObject.user!.emailAddress, + "IsRegistered": true, + "ProjectID": projectID, + "PatientTypeID": authUser.patientIdentificationType, + "PatientType": authUser.patientType, + "isDentalAllowedBackend": false + }; + + dynamic localRes; + + await baseAppClient.post(SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } +} diff --git a/lib/services/payfort_services/payfort_project_details_resp_model.dart b/lib/services/payfort_services/payfort_project_details_resp_model.dart new file mode 100644 index 00000000..b4d9eae2 --- /dev/null +++ b/lib/services/payfort_services/payfort_project_details_resp_model.dart @@ -0,0 +1,37 @@ +class PayfortProjectDetailsRespModel { + String? accessCode; + int? integrationId; + String? merchantIdentifier; + int? projectID; + String? projectName; + int? servID; + String? shaRequest; + String? shaResponse; + String? signature; + + PayfortProjectDetailsRespModel({this.accessCode, this.integrationId, this.merchantIdentifier, this.projectID, this.projectName, this.servID, this.shaRequest, this.shaResponse, this.signature}); + + PayfortProjectDetailsRespModel.fromJson(Map json) { + accessCode = json['AccessCode']; + integrationId = json['Integration_Id']; + merchantIdentifier = json['MerchantIdentifier']; + projectID = json['ProjectID']; + projectName = json['ProjectName']; + servID = json['ServID']; + shaRequest = json['Sha_Request']; + shaResponse = json['Sha_Response']; + } + + Map toJson() { + final Map data = new Map(); + data['AccessCode'] = this.accessCode; + data['Integration_Id'] = this.integrationId; + data['MerchantIdentifier'] = this.merchantIdentifier; + data['ProjectID'] = this.projectID; + data['ProjectName'] = this.projectName; + data['ServID'] = this.servID; + data['Sha_Request'] = this.shaRequest; + data['Sha_Response'] = this.shaResponse; + return data; + } +} diff --git a/lib/services/payfort_services/payfort_service.dart b/lib/services/payfort_services/payfort_service.dart new file mode 100644 index 00000000..9b2c4597 --- /dev/null +++ b/lib/services/payfort_services/payfort_service.dart @@ -0,0 +1,196 @@ +import 'dart:convert'; + +import 'package:amazon_payfort/amazon_payfort.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_project_details_resp_model.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/sdk_token_response_model.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:http/http.dart'; +import 'package:network_info_plus/network_info_plus.dart'; + +class PayfortService extends BaseService { + final AmazonPayfort _payfort = AmazonPayfort.instance; + + final NetworkInfo _info = NetworkInfo(); + + Future initPayfortSDK() async { + await AmazonPayfort.initialize( + PayFortOptions(environment: payFortEnvironment), + ); + } + + Future getPayfortConfigurations({int? serviceId, int? projectId, int integrationId = 2, int? languageID}) async { + Map body = {"Integration_Id": integrationId, "ServID": serviceId, "ProjectID": projectId, "LanguageID": languageID}; + + PayfortProjectDetailsRespModel payfortProjectDetailsRespModel = PayfortProjectDetailsRespModel(); + await baseAppClient.post( + getPayFortProjectDetails, + onSuccess: (response, statusCode) async { + payfortProjectDetailsRespModel = PayfortProjectDetailsRespModel.fromJson(response.isNotEmpty ? response.first : response); + }, + onFailure: (String error, int statusCode) { + Utils.showErrorToast(error); + return null; + }, + body: body, + isAllowAny: true, + ); + return payfortProjectDetailsRespModel; + } + + Future addPayfortApplePayResponse(num patientID, {PayFortResult? result}) async { + Map body = { + "Fort_id": result!.fortId, + "CommandType": result!.command, + "Amount": (num.parse(result.amount!) / 100), + "Payment_Option": result.paymentOption, + "Customer_IP": result.customerIp, + "ECI": result.eci, + "Response_Message": result.responseMessage, + "Card_Number": result.cardNumber, + "Status": result.status, + "Merchant_Ref": result.merchantReference, + "Pat_Token": result.tokenName, + "IsRefund": false, + "RemmeberMe": false, + // "Reconciliation_Reference": result.reconciliationReference, + "LanguageID": 1, + "PatientID": patientID + }; + + await baseAppClient.post( + addPayFortApplePayResponse, + onSuccess: (response, statusCode) async { + // payfortProjectDetailsRespModel = PayfortProjectDetailsRespModel.fromJson(response.isNotEmpty ? response.first : response); + }, + onFailure: (String error, int statusCode) { + Utils.showErrorToast(error); + return null; + }, + body: body, + isAllowAny: true, + ); + } + + Future? generateSdkSignatureFromAPI(SdkTokenRequest request) async { + var response = await post( + Uri.parse(payFortEnvironment.paymentApi), + headers: {'Content-Type': 'application/json'}, + body: jsonEncode(request.asRequest()), + ); + if (response.statusCode == 200) { + var decodedResponse = jsonDecode(response.body); + return SdkTokenResponse.fromMap(decodedResponse); + } + return null; + } + + Future _generateSdkResponse({ + String? applePayAccessCode, + String? merchantIdentifier, + String? applePayShaType, + String? applePayShaRequestPhrase, + }) async { + try { + String? deviceId = await _payfort.getDeviceId(); + + /// Step 2: Generate the Signature + SdkTokenRequest tokenRequest = SdkTokenRequest( + accessCode: applePayAccessCode!, + deviceId: deviceId ?? '', + merchantIdentifier: merchantIdentifier!, + ); + + String? signature = await _payfort.generateSignature( + shaType: applePayShaType!, + concatenatedString: tokenRequest.toConcatenatedString(applePayShaRequestPhrase!), + ); + + tokenRequest = tokenRequest.copyWith(signature: signature); + + /// Step 3: Generate the SDK Token + return await generateSdkSignatureFromAPI(tokenRequest); + } catch (e) { + print("Error here: ${e.toString()}"); + } + return null; + } + + Future getPayfortSignature( + String applePayAccessCode, + String merchantIdentifier, + String applePayShaRequestPhrase, + ) async { + String? deviceId = await _payfort.getDeviceId(); + SdkTokenRequest tokenRequest = SdkTokenRequest( + accessCode: applePayAccessCode, + deviceId: deviceId ?? '', + merchantIdentifier: merchantIdentifier, + ); + + String? signature = await _payfort.generateSignature( + shaType: "SHA-256", + concatenatedString: tokenRequest.toConcatenatedString(applePayShaRequestPhrase), + ); + + return signature!; + } + + Future paymentWithApplePay({ + SucceededCallback? onSucceeded, + FailedCallback? onFailed, + String? customerName, + String? customerEmail, + String? orderDescription, + num? orderAmount, + String? merchantIdentifier, + String? applePayAccessCode, + String? applePayShaRequestPhrase, + String? merchantReference, + String currency = "SAR", + String applePayShaType = "SHA-256", + String countryIsoCode = "SA", + }) async { + try { + SdkTokenResponse? sdkTokenResponse = await _generateSdkResponse( + applePayAccessCode: applePayAccessCode, + merchantIdentifier: merchantIdentifier, + applePayShaType: applePayShaType, + applePayShaRequestPhrase: applePayShaRequestPhrase, + ); + + if (sdkTokenResponse != null && sdkTokenResponse.sdkToken == null) { + onFailed!((sdkTokenResponse.responseMessage ?? '') as PayFortFailureResult); + return; + } + + /// Step 4: Processing Payment [Don't multiply with 100] + /// Amount value send always round ex. [100] not [100.00, 100.21] + FortRequest request = FortRequest( + command: FortCommand.purchase, + amount: orderAmount!, + customerName: customerName!, + customerEmail: customerEmail!, + // orderDescription: orderDescription!, + orderDescription: "Dr. Sulaiman Al Habib Hospital", + sdkToken: sdkTokenResponse?.sdkToken ?? '', + merchantReference: merchantReference!, + currency: currency, + customerIp: (await _info.getWifiIP() ?? ''), + language: 'en'); + + _payfort.callPayFortForApplePay( + request: request, + countryIsoCode: countryIsoCode, + applePayMerchantId: applePayMerchantId, + callback: ApplePayResultCallback( + onSucceeded: onSucceeded!, + onFailed: onFailed!, + ), + ); + } catch (e) { + onFailed!(e.toString() as PayFortFailureResult); + } + } +} diff --git a/lib/services/payfort_services/payfort_view_model.dart b/lib/services/payfort_services/payfort_view_model.dart new file mode 100644 index 00000000..2ba62fc2 --- /dev/null +++ b/lib/services/payfort_services/payfort_view_model.dart @@ -0,0 +1,87 @@ +import 'package:amazon_payfort/amazon_payfort.dart'; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/enum/PayfortEnums.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_project_details_resp_model.dart'; +import 'package:diplomaticquarterapp/services/payfort_services/payfort_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:flutter/cupertino.dart'; + +class PayfortViewModel extends ChangeNotifier { + PayfortService _payfortService = locator(); + + Future initPayfort() async { + await _payfortService.initPayfortSDK(); + } + + Future getProjectDetailsForPayfort({int? serviceId, int? projectId, int? languageID}) async { + PayfortProjectDetailsRespModel payfortProjectDetailsRespModel = PayfortProjectDetailsRespModel(); + try { + payfortProjectDetailsRespModel = await _payfortService.getPayfortConfigurations(serviceId: serviceId, projectId: projectId, languageID: languageID); + + String signature = + await _payfortService.getPayfortSignature(payfortProjectDetailsRespModel.accessCode!, payfortProjectDetailsRespModel.merchantIdentifier!, payfortProjectDetailsRespModel.shaRequest!); + payfortProjectDetailsRespModel.signature = signature; + + return payfortProjectDetailsRespModel; + } on Exception catch (e, s) { + print(s); + return null; + } + } + + Future addPayfortApplePayResponse(num patientID, {PayFortResult? result}) async { + try { + await _payfortService.addPayfortApplePayResponse(patientID, result: result); + } on Exception catch (e, s) { + print(s); + return null; + } + } + + Future initiateApplePayWithPayfort({ + String? customerName, + String? customerEmail, + String? orderDescription, + String? merchantReference, + num? orderAmount, + PayfortProjectDetailsRespModel? payfortProjectDetailsRespModel, + SucceededCallback? onSuccess, + FailedCallback? onFailed, + ServiceTypeEnum? serviceTypeEnum, + int? projectId, + String? currency, + }) async { + // GifLoaderDialogUtils.showMyDialog(AppGlobal.context); + // PayfortProjectDetailsRespModel payfortProjectDetailsRespModel = await getProjectDetailsForPayfort(projectId: projectId, serviceId: serviceTypeEnum.getIdFromServiceEnum()); + // + // if (payfortProjectDetailsRespModel == null) { + // GifLoaderDialogUtils.hideDialog(AppGlobal.context); + // return; + // } + + try { + await _payfortService.paymentWithApplePay( + onSucceeded: onSuccess, + onFailed: onFailed, + customerName: customerName, + customerEmail: customerEmail, + orderDescription: orderDescription, + orderAmount: orderAmount, + merchantReference: merchantReference, + merchantIdentifier: payfortProjectDetailsRespModel!.merchantIdentifier ?? "", + applePayAccessCode: payfortProjectDetailsRespModel!.accessCode ?? "", + applePayShaRequestPhrase: payfortProjectDetailsRespModel.shaRequest ?? "", + currency: currency!, + ); + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + } catch (e) { + // Utils.showErrorToast(e.toString()); + AppToast.showErrorToast(message: e.toString(), localContext: AppGlobal.context); + GifLoaderDialogUtils.hideDialog(AppGlobal.context); + throw e; + } + } +} diff --git a/lib/services/payfort_services/sdk_token_response_model.dart b/lib/services/payfort_services/sdk_token_response_model.dart new file mode 100644 index 00000000..a0f48a4f --- /dev/null +++ b/lib/services/payfort_services/sdk_token_response_model.dart @@ -0,0 +1,55 @@ +class SdkTokenResponse { + SdkTokenResponse({ + this.responseCode, + this.deviceId, + this.responseMessage, + this.serviceCommand, + this.sdkToken, + this.signature, + this.merchantIdentifier, + this.accessCode, + this.language, + this.status, + }); + + String? responseCode; + String? deviceId; + String? responseMessage; + String? serviceCommand; + String? sdkToken; + String? signature; + String? merchantIdentifier; + String? accessCode; + String? language; + String? status; + + factory SdkTokenResponse.fromMap(Map data) { + return SdkTokenResponse( + responseCode: data['response_code'], + deviceId: data['device_id'], + responseMessage: data['response_message'], + serviceCommand: data['service_command'], + sdkToken: data['sdk_token'], + signature: data['signature'], + merchantIdentifier: data['merchant_identifier'], + accessCode: data['access_code'], + language: data['language'], + status: data['status'], + ); + } + + Map toMap() { + return { + 'response_code': responseCode, + 'device_id': deviceId, + 'response_message': responseMessage, + 'service_command': serviceCommand, + 'sdk_token': sdkToken, + 'signature': signature, + 'merchant_identifier': merchantIdentifier, + 'access_code': accessCode, + 'language': language, + 'status': status, + }; + } +} diff --git a/lib/services/permission/permission_service.dart b/lib/services/permission/permission_service.dart new file mode 100644 index 00000000..cc73c303 --- /dev/null +++ b/lib/services/permission/permission_service.dart @@ -0,0 +1,92 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:flutter/material.dart'; +import 'package:localstorage/localstorage.dart'; +import 'package:permission_handler/permission_handler.dart'; +// import 'package:vibration/vibration.dart'; +import 'package:geolocator/geolocator.dart' as geo; + +class PermissionService extends BaseService { + final LocalStorage storage = new LocalStorage("permission"); + geo.LocationPermission? locationPermission; + AppGlobal appGlobal = new AppGlobal(); + + setVibrationPermission(flag) async { + storage.setItem('isVibration', flag); + } + + isVibrationEnabled() { + return (storage.getItem('isVibration') == null) || + (storage.getItem('isVibration')) == false + ? false + : true; + } + + vibrate(callback, context) async { + if (callback == null) return null; + if (isVibrationEnabled() == true) { + // if (await Vibration.hasVibrator() !=null) { + // Vibration.vibrate(duration: 100); + // callback(); + // } + } else { + callback(); + } + } + + setTheme(flag) async { + storage.setItem('isTheme', flag); + } + + isThemeEnabled() { + return storage.getItem('isTheme'); + } + + cameraPermission() async { + Map statuses = await [ + Permission.camera, + ].request(); + } + + static isCameraEnabled() async { + return await Permission.camera.isGranted; + } + + static isExternalStorageEnabled() async { + return await Permission.storage.isGranted; + } + + static isHealthDataPermissionEnabled() async { + return await Permission.sensors.isGranted; + } + + static isMicrophonePermissionEnabled() async { + return await Permission.microphone.isGranted; + } + + static isCalendarPermissionEnabled() async { + return await Permission.calendarFullAccess.isGranted; + } + + setCameraLocationPermission(context) async { + Navigator.pop(context); + openAppSettings(); + } + + static isLocationEnabled() async { + var permission = await geo.Geolocator.checkPermission(); + if (permission == geo.LocationPermission.denied) { + return false; + } else { + return true; + } + } + + openSettings() async { + openAppSettings(); + } + + openAccessbility() { + // OpenSettings.openAppSetting(); + } +} diff --git a/lib/services/pharmacy_services/brands_service.dart b/lib/services/pharmacy_services/brands_service.dart new file mode 100644 index 00000000..cf348a46 --- /dev/null +++ b/lib/services/pharmacy_services/brands_service.dart @@ -0,0 +1,73 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/brandModel.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/topBrandsModel.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; + +class BrandsService extends BaseService { + AppSharedPreferences sharedPref = AppSharedPreferences(); + bool isLogin = false; + + List _brandsList =[]; + List get brandsList => _brandsList; + + List _topBrandsList =[]; + List get topBrandsList => _topBrandsList; + + List _searchList =[]; + List get searchList => _searchList; + + clearSearchList() { + _searchList.clear(); + } + + Future getBrands() async { + hasError = false; + await baseAppClient.getPharmacy(GET_BRANDS, + onSuccess: (dynamic response, int statusCode) { + _brandsList.clear(); + response['manufacturer'].forEach((item) { + _brandsList.add(Brand.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } + + Future getTopBrands() async { + hasError = false; + await baseAppClient.getPharmacy(GET_TOP_BRANDS, + onSuccess: (dynamic response, int statusCode) { + _topBrandsList.clear(); + response['manufacturer'].forEach((item) { + _topBrandsList.add(TopBrand.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } + + Future searchProducts({String? productName}) async { + RegExp exp = new RegExp(productName!.toUpperCase()); + hasError = false; + _searchList.clear(); + await baseAppClient.getPharmacy( + GET_BRANDS, + onSuccess: (dynamic response, int statusCode) { + response['manufacturer'].forEach((item) { + if(exp.hasMatch(item['name'])){ + _searchList.add(Brand.fromJson(item)); + }else{ + } + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + ); + } + +} diff --git a/lib/services/pharmacy_services/cancelOrder_service.dart b/lib/services/pharmacy_services/cancelOrder_service.dart new file mode 100644 index 00000000..0500a45b --- /dev/null +++ b/lib/services/pharmacy_services/cancelOrder_service.dart @@ -0,0 +1,43 @@ + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:flutter/material.dart'; + + +class CancelOrderService extends BaseService{ + AppSharedPreferences sharedPref = AppSharedPreferences(); + AppGlobal appGlobal = new AppGlobal(); + + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + + List _cancelOrderList =[]; + List get cancelOrderList => _cancelOrderList; + String url =""; + + + Future getCanceledOrder(order) async { + print("step 1"); + hasError = false; + + dynamic res; + + await baseAppClient.getPharmacy(GET_Cancel_ORDER+order, + onSuccess: (dynamic response, int statusCode) { + res = response; + print(res); +// _cancelOrderList.clear(); +// response['success'].forEach((item) { +// _cancelOrderList.add(OrderModel.fromJson(item)); +// }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + return res; + } +} \ No newline at end of file diff --git a/lib/services/pharmacy_services/orderDetails_service.dart b/lib/services/pharmacy_services/orderDetails_service.dart new file mode 100644 index 00000000..f1f99e5b --- /dev/null +++ b/lib/services/pharmacy_services/orderDetails_service.dart @@ -0,0 +1,74 @@ + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; + + +class OrderDetailsService extends BaseService{ + + AppSharedPreferences sharedPref = AppSharedPreferences(); + AppGlobal appGlobal = new AppGlobal(); + + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + List _orderList =[]; + List get orderList => _orderList; + + + Future getOrderDetails(OrderId, orderGUID) async { + var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); + hasError = false; + await baseAppClient.getPharmacy(GET_ORDER_DETAILS+OrderId + "/$orderGUID", + onSuccess: (dynamic response, int statusCode) { + _orderList.clear(); + response['orders'].forEach((item) { + _orderList.add(OrderDetailModel.fromJson(item)); + print(response); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } + + Future makeReview(PharmacyProduct product, double rating, String reviewText) async { + hasError = false; + super.error = ""; + + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + + + Map body = Map(); + Map reviewBody = Map(); + reviewBody["created_on_utc"] = DateTime.now().toString(); + reviewBody["customer_id"] = customerId; + reviewBody["helpful_no_total"] = 0; + reviewBody["helpful_yes_total"] = 0; + reviewBody["id"] = 0; + reviewBody["is_approved"] = false; + reviewBody["position"] = 0; + reviewBody["product_id"] = product.id; + reviewBody["rating"] = rating; + reviewBody["reply_text"] = reviewText; + reviewBody["store_id"] = 2; + reviewBody["title"] = ""; + body['review'] = reviewBody; + await baseAppClient.postPharmacy("$PHARMACY_MAKE_REVIEW", + onSuccess: (response, statusCode) async { + /* + "success": { + "SuccessEndUserMsg": "Your request has been completed successfuly.", + "SuccessEndUserMsgN": "تمت العملية بنجاح" + } + */ + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } +} \ No newline at end of file diff --git a/lib/services/pharmacy_services/order_service.dart b/lib/services/pharmacy_services/order_service.dart new file mode 100644 index 00000000..9a2a15c7 --- /dev/null +++ b/lib/services/pharmacy_services/order_service.dart @@ -0,0 +1,80 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; + +class OrderService extends BaseService { + AppSharedPreferences sharedPref = AppSharedPreferences(); + AppGlobal appGlobal = new AppGlobal(); + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + + List _orderList =[]; + + List get orderList => _orderList; + String url = ""; + + Future getOrder(customerId, customerGUID, pageId) async { + hasError = false; + // url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=1&limit=200&customer_id=1367368"; + // url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=$pageId&limit=200&customer_id=$customerId"; + url = GET_ORDER + "customer=1&fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc,product_count,can_cancel,can_refund,order_guid&page=$pageId&limit=200&customer_id=$customerId&CustomerguId=$customerGUID"; + print(url); + + await baseAppClient.getPharmacy(url, onSuccess: (dynamic response, int statusCode) { + _orderList.clear(); + + response['orders'].forEach((item) { + _orderList.add(Orders.fromJson(item)); + }); + print(_orderList.length); + print(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } + +// Future getProductReview(orderId) async { +// print("step 1"); +// hasError = false; +// url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=1&limit=200&customer_id=1367368"; +//// url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=$page_id&limit=200&customer_id=$custmerId"; +// print(url); +// await baseAppClient.getPharmacy(url, +// onSuccess: (dynamic response, int statusCode) { +// _orderList.clear(); +// response['orders'].forEach((item) { +// _orderList.add(OrderModel.fromJson(item)); +// }); +// print(_orderList.length); +// print(response); +// }, onFailure: (String error, int statusCode) { +// hasError = true; +// super.error = error; +// }); +// } + +// Future getOrder(BuildContext context ) async { +// +// if (await this.sharedPref.getObject(USER_PROFILE) != null) { +// var data = AuthenticatedUser.fromJson( +// await this.sharedPref.getObject(USER_PROFILE)); +// authUser = data; +// } +// +// dynamic localRes; +// String URL; +// URL = GET_ORDER; +// +// await baseAppClient.get(URL, +// onSuccess: (response, statusCode) async { +// localRes = response; +// }, onFailure: (String error, int statusCode) { +// throw error; +// }); +// return Future.value(localRes); +// } +} diff --git a/lib/services/pharmacy_services/pharmacyAddress_service.dart b/lib/services/pharmacy_services/pharmacyAddress_service.dart new file mode 100644 index 00000000..562468c9 --- /dev/null +++ b/lib/services/pharmacy_services/pharmacyAddress_service.dart @@ -0,0 +1,113 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Country.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; + +class PharmacyAddressService extends BaseService { + List addresses =[]; + CountryData? country; + int selectedAddressIndex = 0; + + Future> getAddresses() async { + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); + Map queryParams = {'fields': 'addresses'}; + hasError = false; + Addresses? selectedAddress; + try { + var completer = Completer(); + + await baseAppClient.getPharmacy("$GET_CUSTOMERS_ADDRESSES$customerId/$customerGUID", onSuccess: (dynamic response, int statusCode) async { + addresses.clear(); + var savedAddress = await sharedPref.getObject(PHARMACY_SELECTED_ADDRESS); + if (savedAddress != null) { + selectedAddress = Addresses.fromJson(savedAddress); + } + int index = 0; + response['customers'][0]['addresses'].forEach((item) { + AddressInfo address = AddressInfo.fromJson(item); + if (selectedAddress! != null && selectedAddress!.id == item["id"]) { + selectedAddressIndex = index; + } + addresses.add(address); + index++; + }); + completer.complete(); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + + await completer.future; + } catch (error) { + throw error; + } + + return addresses; + } + + Future getCountries(String countryName) async { + hasError = false; + try { + await baseAppClient.getPharmacy("$PHARMACY_GET_COUNTRY", onSuccess: (dynamic response, int statusCode) { + // countries.clear(); + response['countries'].forEach((item) { + if (CountryData.fromJson(item).name == countryName || CountryData.fromJson(item).namen == countryName) { + country = CountryData.fromJson(item); + } + // countries.add(CountryData.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } catch (error) { + throw error; + } + } + + Future addCustomerAddress(AddressInfo address) async { + await makeCustomerAddress(address, ADD_CUSTOMER_ADDRESS); + // if(!hasError) { + // selectedAddressIndex = addresses.length + 1; + // } + } + + Future editCustomerAddress(AddressInfo address) async { + makeCustomerAddress(address, EDIT_CUSTOMER_ADDRESS); + } + + Future deleteCustomerAddress(AddressInfo address) async { + makeCustomerAddress(address, DELETE_CUSTOMER_ADDRESS); + } + + Future makeCustomerAddress(AddressInfo address, String url) async { + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + hasError = false; + super.error = ""; + + Map customerObject = Map(); + customerObject["addresses"] = [address]; + customerObject["id"] = customerId; + customerObject["email"] = address.email; + customerObject["role_ids"] = [3]; + Map body = Map(); + body["customer"] = customerObject; + + await baseAppClient.postPharmacy("$url", onSuccess: (response, statusCode) async { + // addresses.clear(); + // response['customers'][0]['addresses'].forEach((item) { + // addresses.add(AddressInfo.fromJson(item)); + // }); + // getAddresses(); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + },isAllowAny: true, body: body); + } +} diff --git a/lib/services/pharmacy_services/product_detail_service.dart b/lib/services/pharmacy_services/product_detail_service.dart new file mode 100644 index 00000000..3d01d018 --- /dev/null +++ b/lib/services/pharmacy_services/product_detail_service.dart @@ -0,0 +1,250 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/Wishlist.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/locationModel.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/productDetailModel.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/specification.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; + +class ProductDetailService extends BaseService { + bool isLogin = false; + + num? _stockQuantity; + + num? get stockQuantity => _stockQuantity; + + String? _stockAvailability; + String? _stockAvailabilityn; + + String? get stockAvailability => _stockAvailability; + String? get stockAvailabilityn => _stockAvailabilityn; + + bool? _isStockAvailable; + + bool? get isStockAvailable => _isStockAvailable; + + List _productDetailList =[]; + + List get productDetailList => _productDetailList; + + List _productLocationList =[]; + + List get productLocationList => _productLocationList; + + List _addToCartModel =[]; + + List get addToCartModel => _addToCartModel; + + List _wishListProducts =[]; + + List get wishListProducts => _wishListProducts; + + List _productSpecification =[]; + + List get productSpecification => _productSpecification; + + Future getProductReviews(productID) async { + hasError = false; + await baseAppClient.getPharmacy( + GET_PRODUCT_DETAIL + + productID + + "?fields=reviews,stock_quantity,stock_availability,stock_availabilityn,IsStockAvailable", + onSuccess: (dynamic response, int statusCode) { + _productDetailList.clear(); + response['products'].forEach((item) { + _productDetailList.add(ProductDetail.fromJson(item)); + print(response); + }); + _stockQuantity = response['products'][0]['stock_quantity']; + _stockAvailability = response['products'][0]['stock_availability']; + _stockAvailabilityn = response['products'][0]['stock_availabilityn']; + + _isStockAvailable = response['products'][0]['IsStockAvailable']; + // _isStockAvailable = _stockAvailability == "In stock" ? true : false; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } + + Future getProductAvailabiltyDetail(String productSKU) async { + hasError = false; + Map request; + + request = { + // "Channel": 3, + // "DeviceTypeID": 2, + // "IPAdress": "10.20.10.20", + // "LanguageID": 2, + // "PatientOutSA": 0, + "SKU": productSKU, + // "SessionID": null, + // "VersionID": 5.6, + // "generalid": "Cs2020@2016\$2958", + // "isDentalAllowedBackend": false + }; + await baseAppClient.post(GET_LOCATION, + onSuccess: (dynamic response, int statusCode) { + _productLocationList.clear(); + response['PharmList'].forEach((item) { + _productLocationList.add(LocationModel.fromJson(item)); + print(_productLocationList); + print(response); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: request); + } + + Future addToCart(quantity, itemID, context) async { + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + hasError = false; + Map request; + + request = { + "shopping_cart_item": { + "quantity": quantity, + "shopping_cart_type": "1", + "product_id": itemID, + "customer_id": customerId, + "language_id": 1 + } + }; + dynamic localRes; + + await baseAppClient.pharmacyPost(GET_SHOPPING_CART, isExternal: false, + onSuccess: (dynamic response, int statusCode) { + _addToCartModel.clear(); + response['shopping_carts'].forEach((item) { + _addToCartModel.add(Wishlist.fromJson(item)); + }); + AppToast.showSuccessToast( + message: TranslationBase.of(context).addToCartMsg + // 'You have added a product to the cart' + ); + localRes = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + AppToast.showErrorToast( + message: error ?? Utils.generateContactAdminMessage()); + }, body: request); + + return Future.value(localRes); + } + + Future notifyMe(customerId, itemID) async { + hasError = false; + await baseAppClient.getPharmacy( + SUBSCRIBE_PRODUCT + "SinceId=$customerId&ProductId=$itemID", + onSuccess: (dynamic response, int statusCode) { + AppToast.showSuccessToast( + message: TranslationBase.of(AppGlobal.context).notifyMeMsg + // TranslationBase.of(context).notifyMeMsg + //'You will be notified when product available' + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + AppToast.showErrorToast( + message: error ?? Utils.generateContactAdminMessage()); + }); + } + + Future addToWishlist(itemID, context) async { + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + hasError = false; + Map request; + + request = { + "shopping_cart_item": { + "quantity": 1, + "shopping_cart_type": "Wishlist", + "product_id": itemID, + "customer_id": customerId, + "language_id": 1 + } + }; + await baseAppClient.pharmacyPost(GET_SHOPPING_CART, + onSuccess: (dynamic response, int statusCode) { + _wishListProducts.clear(); + response['shopping_carts'].forEach((item) { + _wishListProducts.add(Wishlist.fromJson(item)); + }); + AppToast.showSuccessToast( + message: TranslationBase.of(context).addToWishlistMsg + // 'You have added a product to the Wishlist' + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + AppToast.showErrorToast( + message: error ?? Utils.generateContactAdminMessage()); + }, body: request); + } + + Future getWishlistItems() async { + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + var custGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); + hasError = false; + await baseAppClient.getPharmacy( + GET_WISHLIST + customerId + "/$custGUID" + "?shopping_cart_type=2", + onSuccess: (dynamic response, int statusCode) { + _wishListProducts.clear(); + response['shopping_carts'].forEach((item) { + _wishListProducts.add(Wishlist.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } + + Future deleteItemFromWishlist(itemID, context) async { + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + var custGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); + hasError = false; + await baseAppClient.getPharmacy( + DELETE_WISHLIST + + customerId + + "/$custGUID" + + "+&product_id=" + + itemID + + "&cart_type=Wishlist", + onSuccess: (dynamic response, int statusCode) { + _wishListProducts.clear(); + response['shopping_carts'].forEach((item) { + _wishListProducts.add(Wishlist.fromJson(item)); + }); + AppToast.showSuccessToast( + message: TranslationBase.of(context).removeFromWishlistMsg + // 'You have removed a product from the Wishlist' + ); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + AppToast.showErrorToast( + message: error ?? Utils.generateContactAdminMessage()); + }); + } + + Future productSpecificationData(itemID) async { + hasError = false; + + await baseAppClient.getPharmacy(GET_SPECIFICATION + itemID, + onSuccess: (dynamic response, int statusCode) { + _productSpecification.clear(); + response['specification'].forEach((item) { + _productSpecification.add(SpecificationModel.fromJson(item)); + print(_productSpecification); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } +} diff --git a/lib/services/pharmacy_services/recommendedProduct_service.dart b/lib/services/pharmacy_services/recommendedProduct_service.dart new file mode 100644 index 00000000..4b45b6d8 --- /dev/null +++ b/lib/services/pharmacy_services/recommendedProduct_service.dart @@ -0,0 +1,42 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/recommendedProduct_model.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; + + + + +class RecommendedProductService extends BaseService{ + AppSharedPreferences sharedPref = AppSharedPreferences(); + AppGlobal appGlobal = new AppGlobal(); + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + +// List> _recommendedProductList =[]; +// List> get recommendedList => _recommendedProductList; + + List _recommendedProductList =[]; + List get recommendedList => _recommendedProductList; + + Future getRecommendedProducts(productId) async { + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + hasError = false; + + await baseAppClient.getPharmacy(GET_RECOMMENDED_PRODUCT+"$productId/$customerId", + onSuccess: (dynamic response, int statusCode) { + _recommendedProductList.clear(); + response['products'].forEach((item) { +// _recommendedProductList.add(item); + _recommendedProductList.add(RecommendedProductModel.fromJson(item)); + + }); + //print(item['name']); + print(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + }} \ No newline at end of file diff --git a/lib/services/pharmacy_services/review_service.dart b/lib/services/pharmacy_services/review_service.dart new file mode 100644 index 00000000..43d5b8d5 --- /dev/null +++ b/lib/services/pharmacy_services/review_service.dart @@ -0,0 +1,38 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/reviewModel.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; + + +class ReviewService extends BaseService { + AppSharedPreferences sharedPref = AppSharedPreferences(); + + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + + bool isLogin = false; + List _reviewList =[]; + List get reviewList => _reviewList; + + + Future getReview() async { + + var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + + hasError = false; + await baseAppClient.getPharmacy(GET_REVIEW+customerId, + onSuccess: (dynamic response, int statusCode) { + _reviewList.clear(); + response['reviews'].forEach((item) { + _reviewList.add(Review.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } + +} diff --git a/lib/services/pharmacy_services/wishList_service.dart b/lib/services/pharmacy_services/wishList_service.dart new file mode 100644 index 00000000..64db972b --- /dev/null +++ b/lib/services/pharmacy_services/wishList_service.dart @@ -0,0 +1,68 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/pharmacy/Wishlist.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; + +class WishListService extends BaseService { + AppSharedPreferences sharedPref = AppSharedPreferences(); + bool isLogin = false; + List _wishListProducts =[]; + + List get wishListProducts => _wishListProducts; + +// Future getWishlist() async { +// var isLogin = await sharedPref.getString(LOGIN_TOKEN_ID); +// this.isLogin = isLogin != null; +//// if (!isLogin) { +//// // if not login +//// } else { +//// try { +//// await baseAppClient.get( +//// GET_WISHLIST +'/productsbyids/5308,3608,2316,963,5045,2714,1480,',//+ "272843" + "?shopping_cart_type=2", +//// onSuccess: (dynamic response, int statusCode) { +//// wishListProducts.clear(); +//// response['shopping_carts'].forEach((item) { +//// wishListProducts.add(Product.fromJson(item)); +//// }); +//// }, onFailure: (String error, int statusCode) { +//// hasError = true; +//// super.error = error; +//// }); +//// } catch (error) { +//// throw error; +//// } +//// } +// hasError = false; +// try { +// await baseAppClient.getPharmacy(GET_WISHLIST+"1367368?shopping_cart_type=2", +// onSuccess: (dynamic response, int statusCode) { +// wishListProducts.clear(); +// response.forEach((item) { +// wishListProducts.add(Wishlist.fromJson(response)); +// }); +// }, onFailure: (String error, int statusCode) { +// hasError = true; +// super.error = error; +// }); +// } catch (error) { +// throw error; +// } +// } + + Future getWishlist() async { + //TODO we need to check why the customer id comes null + String customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID) ?? "0"; + var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); + hasError = false; + await baseAppClient.getPharmacy(GET_WISHLIST + customerId + "/$customerGUID/" + "?shopping_cart_type=2", onSuccess: (dynamic response, int statusCode) { + _wishListProducts.clear(); + response['shopping_carts'].forEach((item) { + _wishListProducts.add(Wishlist.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } +} diff --git a/lib/services/pharmacy_services/writeReview_service.dart b/lib/services/pharmacy_services/writeReview_service.dart new file mode 100644 index 00000000..97495e99 --- /dev/null +++ b/lib/services/pharmacy_services/writeReview_service.dart @@ -0,0 +1,38 @@ + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/order_model.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; + + +class writeReviewService extends BaseService{ + + + + AppSharedPreferences sharedPref = AppSharedPreferences(); + AppGlobal appGlobal = new AppGlobal(); + + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + + List get writeReview => writeReview; + List _writeReviewList =[]; + List get orderList => _writeReviewList; + + + Future getProductReview() async { + hasError = false; + await baseAppClient.getPharmacy(WRITE_REVIEW, + onSuccess: (dynamic response, int statusCode) { + _writeReviewList.clear(); + response[''].forEach((item) { + _writeReviewList.add(OrderModel.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } +} \ No newline at end of file diff --git a/lib/services/robo_search/event_provider.dart b/lib/services/robo_search/event_provider.dart new file mode 100644 index 00000000..dda20978 --- /dev/null +++ b/lib/services/robo_search/event_provider.dart @@ -0,0 +1,30 @@ +import 'dart:async'; + +import 'package:flutter_tts/flutter_tts.dart'; + +class RobotProvider { + static final RobotProvider _singleton = RobotProvider._internal(); + var value; + StreamController controller = StreamController.broadcast(); + FlutterTts flutterTts = FlutterTts(); + getData() { + // return data; + } + intStream() { + controller.add({}); + } + + setValue(Map data) { + value = data; + controller.add(value); + } + + factory RobotProvider() { + return _singleton; + } + + RobotProvider._internal(); + speak(data) async { + await flutterTts.speak(data); + } +} diff --git a/lib/services/robo_search/search_provider.dart b/lib/services/robo_search/search_provider.dart new file mode 100644 index 00000000..82c32f91 --- /dev/null +++ b/lib/services/robo_search/search_provider.dart @@ -0,0 +1,47 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'dart:async'; + +import 'package:flutter/material.dart'; + +class SearchProvider with ChangeNotifier { + bool isLogin = false; + bool isLoading = true; + dynamic pageData = {}; + static bool isNewSession = false; + static var sessionID = new DateTime.now().millisecondsSinceEpoch; + Future getBotPages(request) async { + try { + request['SessionID'] = '123'; + await BaseAppClient().post(SEARCH_BOT, + onSuccess: (dynamic response, int statusCode) { + pageData = response; + + // notifyListeners(); + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + + return Future.value(pageData); + } catch (error) { + print(error); + throw error; + } + } + + setLisener(data) { + //SearchProvider.pageData = data; + //projectProvider.setSearchValue(pageData); + notifyListeners(); + } + + getSessionID() { + if (isNewSession == true) { + return new DateTime.now().millisecondsSinceEpoch; + } else { + return sessionID; + } + } +} diff --git a/lib/services/smartwatch_integration/SmartWatchIntegrationService.dart b/lib/services/smartwatch_integration/SmartWatchIntegrationService.dart new file mode 100644 index 00000000..6c316f7f --- /dev/null +++ b/lib/services/smartwatch_integration/SmartWatchIntegrationService.dart @@ -0,0 +1,68 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/Request.dart'; +import 'package:diplomaticquarterapp/models/SmartWatch/HealthData.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:flutter/material.dart'; + +class SmartWatchIntegrationService extends BaseService { + AppSharedPreferences sharedPref = AppSharedPreferences(); + AppGlobal appGlobal = new AppGlobal(); + + AuthenticatedUser authUser = new AuthenticatedUser(); + AuthProvider authProvider = new AuthProvider(); + + Future getLastPatientRecord(BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + Request req = appGlobal.getPublicRequest(); + + request = { + "IPAdress": "10.20.10.20", + "VersionID": req.VersionID, + "Channel": req.Channel, + "generalid": 'Cs2020@2016\$2958', + "PatientOutSA": authUser.outSA, + "TokenID": "", + "DeviceTypeID": req.DeviceTypeID, + "SessionID": "YckwoXhUmWBsnHKEKig", + "PatientID": authUser.patientID != null ? authUser.patientID : 0, + "License": true + }; + + dynamic localRes; + + await baseAppClient.post(GET_PATIENT_LAST_RECORD, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future insertPatientHealthData(List healthData, BuildContext context) async { + Map request; + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + request = { + "Med_InsertTransactionsInputsList": healthData, + }; + dynamic localRes; + await baseAppClient.post(INSERT_PATIENT_HEALTH_DATA, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } +} diff --git a/lib/splashPage.dart b/lib/splashPage.dart new file mode 100644 index 00000000..3d9b2927 --- /dev/null +++ b/lib/splashPage.dart @@ -0,0 +1,148 @@ +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResultsByRegion.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/theme/theme_notifier.dart'; +import 'package:diplomaticquarterapp/theme/theme_value.dart'; +import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/push-notification-handler.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:firebase_crashlytics/firebase_crashlytics.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:flutter_zoom_videosdk/native/zoom_videosdk.dart'; +import 'package:provider/provider.dart'; + +import 'core/service/AuthenticatedUserObject.dart'; +import 'core/service/privilege_service.dart'; +import 'core/viewModels/project_view_model.dart'; +import 'locator.dart'; + +AppSharedPreferences sharedPref = new AppSharedPreferences(); +AuthenticatedUserObject authenticatedUserObject = locator(); + +class SplashScreen extends StatefulWidget { + @override + _SplashScreenState createState() => _SplashScreenState(); +} + +class _SplashScreenState extends State { + PrivilegeService _privilegeService = locator(); + + @override + void initState() { + AppGlobal.context = context; + super.initState(); + print("Splash init called............."); + Timer( + Duration(seconds: 1, milliseconds: 500), + () async { + await loadPrivilege().then((value) { + LocalNotification.init(onNotificationClick: (payload) {}); + // LocalNotification.getInstance().showNow(title: "Payload", subtitle: "Subtitle", payload: "Payload"); + if (!_privilegeService.hasError) { + Navigator.of(context).pushReplacement( + MaterialPageRoute( + builder: (BuildContext context) => LandingPage(), + ), + ); + } else {} + }); + }, + ); + + var zoom = ZoomVideoSdk(); + InitConfig initConfig = InitConfig( + domain: "zoom.us", + enableLog: true, + ); + zoom.initSdk(initConfig); + + // AppSharedPreferences().getAll().then((value) { + // debugPrint("ALL SHARED PREFERENCES!!!!!"); + // debugPrint(jsonEncode(value)); + // }); + } + + /// load the Privilege from service + Future loadPrivilege() async { + await _privilegeService.getPrivilege(); + ProjectViewModel projectProvider = Provider.of(context, listen: false); + projectProvider.setPrivilegeModelList(privilege: _privilegeService.privilegeModelList); + projectProvider.setVidaPlusProjectList(_privilegeService.vidaPlusProjectListModel); + projectProvider.setHMCProjectList(_privilegeService.hMCProjectListModel); + projectProvider.setProjectsDetailList(_privilegeService.projectDetailListModel); + double lat = await AppSharedPreferences().getDouble(USER_LAT) ?? 0.0; + double long = await AppSharedPreferences().getDouble(USER_LONG) ?? 0.0; + AppSharedPreferences().clear(); // Clearing Shared Preferences On App Launch + await AppSharedPreferences().setDouble(USER_LAT, lat); + await AppSharedPreferences().setDouble(USER_LONG, long); + AppSharedPreferences().setString(APP_LANGUAGE, projectProvider.isArabic ? "ar" : "en"); + var themeNotifier = Provider.of(context, listen: false); + themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins')); + PushNotificationHandler().init(context); // Asyncronously + AppSharedPreferences().getAll().then((value) { + // debugPrint("ALL SHARED PREFERENCES!!!!!"); + // debugPrint(jsonEncode(value)); + }); + // if (!kDebugMode) await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true); + // PushNotificationHandler(context).init(); // Asyncronously + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Color(0xffF8F8F8), + body: Stack( + alignment: Alignment.center, + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 53), + child: Image.asset( + 'assets/images/new/hmg_logo.png', + fit: BoxFit.fitWidth, + width: MediaQuery.of(context).size.width, + ), + ), + Align( + alignment: Alignment.bottomCenter, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + TranslationBase.of(context).poweredBy, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: Color(0xff333C45), letterSpacing: -0.56, height: 16 / 14), + ), + SizedBox( + height: 5, + ), + SvgPicture.asset( + 'assets/images/new/cloud_logo.svg', + width: 40, + height: 40, + ), + SizedBox( + height: 7, + ), + // Text( + // "Version 1.1.0", + // style: TextStyle(fontSize: 10, fontWeight: FontWeight.w400, color: Color(0xff3989898), letterSpacing: 0, height: 12 / 10), + // ), + SizedBox( + height: 18, + ) + ], + ), + ) + ], + ), + ); + } +} diff --git a/lib/theme/colors.dart b/lib/theme/colors.dart new file mode 100644 index 00000000..a9d4e437 --- /dev/null +++ b/lib/theme/colors.dart @@ -0,0 +1,28 @@ +import 'package:flutter/material.dart'; + +class CustomColors { + static const Color lightPurple = Color(0xFFBB86FA); + static const Color purple = Color(0xFF6002EE); + static const Color deepPurple = Color(0xFF3900B1); + static const Color grey = Color(0xFF848484); + static const Color textColor = Color(0xFF575757); + static const Color grey2 = Color(0xFFA5A5A5); + static const Color darkGrey = Color(0xFF222222); + static const Color black = Color(0xFF141414); + static const Color white = Color(0xFFFFFFFF); + static const Color accentColor = Color(0xFFD02127); + static const Color lightGreyColor = Color(0xFFE2E2E2); + static const Color devider = Color(0xFFE5E5E5); + static const Color darkGreyColor = Color(0xFFC9C9C9); + static const Color textDarkColor = Color(0xFF2E303A); + static const Color pharmacyGreyColor = Color(0xFFDBDBDB); + static const Color backgroudGreyColor = Color(0xFFEFEFEF); + static const Color appBackgroudGreyColor = Color(0xFFF7F7F7); + static const Color appBackgroudGrey2Color = Color(0xFFF8F8F8); + static const Color green = Color(0xFF359846); + static const Color orange = Color(0xFFCC9B14); + static const Color darkOrange = Color(0xFFE16F17); + + static const Color femaleColor = Color(0xFF359846); + static const Color maleColor = Color(0xFFCC9B14); +} diff --git a/lib/theme/config.dart b/lib/theme/config.dart new file mode 100644 index 00000000..4c321fb8 --- /dev/null +++ b/lib/theme/config.dart @@ -0,0 +1,3 @@ +// import 'package:diplomaticquarterapp/theme/custom_theme.dart'; + +// CustomTheme currentTheme = CustomTheme(); diff --git a/lib/theme/custom_theme.dart b/lib/theme/custom_theme.dart new file mode 100644 index 00000000..8361ec4e --- /dev/null +++ b/lib/theme/custom_theme.dart @@ -0,0 +1,89 @@ +// import 'package:diplomaticquarterapp/Constants.dart'; +// import 'package:flutter/material.dart'; +// import 'package:hexcolor/hexcolor.dart'; + +// import 'colors.dart'; + +// class CustomTheme with ChangeNotifier { +// static bool _isDarkTheme = true; +// ThemeMode get currentTheme => +// _isDarkTheme ? ThemeMode.dark : ThemeMode.system; + +// void toggleTheme() { +// _isDarkTheme = !_isDarkTheme; +// notifyListeners(); +// } + +// static ThemeData get lightTheme { +// //1 +// return ThemeData( +// //2 +// primaryColor: CustomColors.purple, +// scaffoldBackgroundColor: Colors.white, +// fontFamily: 'Montserrat', //3 +// buttonTheme: ButtonThemeData( +// // 4 +// shape: +// RoundedRectangleBorder(borderRadius: BorderRadius.circular(18.0)), +// buttonColor: CustomColors.lightPurple, +// )); +// } + +// static ThemeData get darkTheme { +// return ThemeData( +// primaryColor: CustomColors.darkGrey, +// scaffoldBackgroundColor: Colors.black, +// fontFamily: 'Montserrat', +// textTheme: ThemeData.dark().textTheme, +// buttonTheme: ButtonThemeData( +// shape: +// RoundedRectangleBorder(borderRadius: BorderRadius.circular(18.0)), +// buttonColor: CustomColors.lightPurple, +// )); +// } + +// static ThemeData get defaultTheme { +// return ThemeData( +// // fontFamily: projectProvider.isArabic ? 'Cairo' : 'WorkSans', +// primarySwatch: Colors.blue, +// visualDensity: VisualDensity.adaptivePlatformDensity, +// brightness: Brightness.light, +// pageTransitionsTheme: const PageTransitionsTheme( +// builders: { +// TargetPlatform.android: ZoomPageTransitionsBuilder(), +// TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), +// }, +// ), +// hintColor: Colors.grey[400], +// textTheme: TextTheme( +// headline1: TextStyle( +// color: Color(0xffB8382C), +// ), +// ), +// disabledColor: Colors.grey[300], +// errorColor: Color.fromRGBO(235, 80, 60, 1.0), +// scaffoldBackgroundColor: Color(0xffE9E9E9), // Colors.grey[100], +// textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), +// textSelectionHandleColor: Colors.grey, +// canvasColor: Colors.white, +// backgroundColor: Color.fromRGBO(255, 255, 255, 1), +// highlightColor: Colors.grey[100].withOpacity(0.4), +// splashColor: Colors.transparent, +// primaryColor: Color(0xff515A5D), +// toggleableActiveColor: secondaryColor, +// indicatorColor: secondaryColor, +// bottomSheetTheme: +// BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')), +// cursorColor: Colors.grey, +// iconTheme: IconThemeData(), +// appBarTheme: AppBarTheme( +// color: Color(0xff515A5D), +// brightness: Brightness.light, +// elevation: 0.0, +// actionsIconTheme: IconThemeData( +// color: Colors.grey[800], +// ), +// ), +// ); +// } +// } diff --git a/lib/theme/theme_notifier.dart b/lib/theme/theme_notifier.dart new file mode 100644 index 00000000..9ad15f33 --- /dev/null +++ b/lib/theme/theme_notifier.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; + +class ThemeNotifier with ChangeNotifier { + ThemeData _themeData; + + ThemeNotifier(this._themeData); + + getTheme() => _themeData; + + getTheme_(String font) => _themeData; + + setTheme(ThemeData themeData) async { + _themeData = themeData; + notifyListeners(); + } +} diff --git a/lib/theme/theme_value.dart b/lib/theme/theme_value.dart new file mode 100644 index 00000000..4fd06d9c --- /dev/null +++ b/lib/theme/theme_value.dart @@ -0,0 +1,180 @@ + +import 'package:diplomaticquarterapp/Constants.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +/// ---- Default Theme ---- +/// + +//final projectProvider = Provider.of(AppGlobal.context); +final bluePrimary = Color(0xFF00000); +final blueAccent = Color(0xFFFF9800); +final blueBackground = Color(0xFFFFFFFF); + +defaultTheme({fontName}) { + return ThemeData( + fontFamily: fontName, + useMaterial3: false, + //projectProvider.isArabic ? 'Cairo' : 'WorkSans', + primarySwatch: Colors.red, + visualDensity: VisualDensity.adaptivePlatformDensity, + brightness: Brightness.light, + pageTransitionsTheme: const PageTransitionsTheme( + builders: { + TargetPlatform.android: ZoomPageTransitionsBuilder(), + TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), + }, + ), + hintColor: Colors.grey[400], + disabledColor: Colors.grey[300], + // errorColor: Color.fromRGBO(235, 80, 60, 1.0), + scaffoldBackgroundColor: Color(0xffF8F8F8), + canvasColor: Colors.white, + // backgroundColor: Color.fromRGBO(255, 255, 255, 1), + highlightColor: Colors.grey[100]!.withOpacity(0.4), + splashColor: Colors.transparent, + primaryColor: Color(0xff515A5D), + // toggleableActiveColor: secondaryColor, + indicatorColor: secondaryColor, + bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)), + // primaryTextTheme: TextTheme(bodyText2: TextStyle(color: Colors.white)), + iconTheme: IconThemeData(), + textTheme: TextTheme( + // bodyText1: TextStyle(color: Colors.black, letterSpacing: 0.6), + // headline1: TextStyle(color: Colors.white, letterSpacing: 0.6), + // headline2: TextStyle(color: Colors.white, letterSpacing: 0.6), + ), + floatingActionButtonTheme: FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2), + + appBarTheme: AppBarTheme( + color: Color(0xff515A5D), + elevation: 0.0, + actionsIconTheme: IconThemeData( + color: Colors.grey[800], + ), systemOverlayStyle: SystemUiOverlayStyle.dark, + ), textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.grey, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey,), + ); +} + +invertThemes({fontName}) { + return ThemeData( + fontFamily: fontName, + //projectProvider.isArabic ? 'Cairo' : 'WorkSans', + primarySwatch: Colors.red, + useMaterial3: false, + visualDensity: VisualDensity.adaptivePlatformDensity, + brightness: Brightness.dark, + pageTransitionsTheme: const PageTransitionsTheme( + builders: { + TargetPlatform.android: ZoomPageTransitionsBuilder(), + TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), + }, + ), + hintColor: Colors.grey[400], + // textTheme: TextTheme(bodyText1: TextStyle(color: Colors.white), headline1: TextStyle(color: Colors.white), headline2: TextStyle(color: Colors.white)), + disabledColor: Colors.grey[800], + // errorColor: Color.fromRGBO(235, 80, 60, 1.0), + scaffoldBackgroundColor: Color(0xff000000), + canvasColor: Colors.black, + // backgroundColor: Color.fromRGBO(255, 255, 255, 1), + highlightColor: Colors.grey[100]!.withOpacity(0.4), + splashColor: Colors.transparent, + primaryColor: Color(0xff515A5D), + // toggleableActiveColor: secondaryColor, + indicatorColor: secondaryColor, + bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)), + iconTheme: IconThemeData(), + appBarTheme: AppBarTheme( + color: Color(0xff000000), + elevation: 0.0, + actionsIconTheme: IconThemeData( + color: Colors.grey[800], + ), systemOverlayStyle: SystemUiOverlayStyle.light, + ), textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.black, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey,), + ); +} + +bwThemes({fontName}) { + return ThemeData( + fontFamily: fontName, + //projectProvider.isArabic ? 'Cairo' : 'WorkSans', + primarySwatch: Colors.red, + useMaterial3: false, + visualDensity: VisualDensity.adaptivePlatformDensity, + brightness: Brightness.dark, + unselectedWidgetColor: Colors.red, + + pageTransitionsTheme: const PageTransitionsTheme( + builders: { + TargetPlatform.android: ZoomPageTransitionsBuilder(), + TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), + }, + ), + hintColor: Colors.grey[400], + + textTheme: TextTheme( + // bodyText1: TextStyle(color: Colors.red[900]), + // headline1: TextStyle(color: Colors.red[900]), + // headline2: TextStyle(color: Colors.white), + // bodyText2: TextStyle(color: Colors.red[900]), + // subtitle1: TextStyle(color: Colors.red[900]), + ), + + tabBarTheme: TabBarTheme(labelColor: Colors.red[900]), + + disabledColor: Colors.grey[800], + // errorColor: Color.fromRGBO(235, 80, 60, 1.0), + scaffoldBackgroundColor: Color(0xffffffe4), + canvasColor: Colors.black, + // backgroundColor: Color(0xffffffe4), + highlightColor: Colors.grey[100]!.withOpacity(0.4), + splashColor: Colors.transparent, + primaryColor: Color(0xfffffff4), + // toggleableActiveColor: secondaryColor, + indicatorColor: secondaryColor, + bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xFFE0E0E0)), + iconTheme: IconThemeData(), + appBarTheme: AppBarTheme( + color: Color(0xffffffe4), + elevation: 0.0, + actionsIconTheme: IconThemeData( + color: Colors.grey[800], + ), systemOverlayStyle: SystemUiOverlayStyle.light, + ), textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.black, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey,), + ); +} + +dimTheme({fontName}) { + return ThemeData( + fontFamily: fontName, + //projectProvider.isArabic ? 'Cairo' : 'WorkSans', + primarySwatch: Colors.red, + visualDensity: VisualDensity.adaptivePlatformDensity, + brightness: Brightness.dark, + useMaterial3: false, + pageTransitionsTheme: const PageTransitionsTheme( + builders: { + TargetPlatform.android: ZoomPageTransitionsBuilder(), + TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), + }, + ), + hintColor: Colors.grey[400], + disabledColor: Colors.grey[300], + // errorColor: Color.fromRGBO(235, 80, 60, 1.0), + scaffoldBackgroundColor: Color(0xffEEEEEE), + canvasColor: Colors.white, + // backgroundColor: Color.fromRGBO(255, 255, 255, 1), + highlightColor: Colors.grey[100]!.withOpacity(0.4), + splashColor: Colors.transparent, + primaryColor: Color(0xff40ACC9), + bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)), + iconTheme: IconThemeData(), + appBarTheme: AppBarTheme( + color: Color(0xff40ACC9), + elevation: 10.0, + actionsIconTheme: IconThemeData( + color: Color(0xff40ACC9), + ), systemOverlayStyle: SystemUiOverlayStyle.light, + ), textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.grey, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey,), + ); +} diff --git a/lib/uitl/CalendarUtils.dart b/lib/uitl/CalendarUtils.dart new file mode 100644 index 00000000..f7fdda41 --- /dev/null +++ b/lib/uitl/CalendarUtils.dart @@ -0,0 +1,174 @@ +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; +import 'dart:ui'; + +import 'package:device_calendar/device_calendar.dart'; +import 'package:manage_calendar_events/manage_calendar_events.dart' as ios; +import 'package:timezone/data/latest.dart' as tzl; + +final DeviceCalendarPlugin deviceCalendarPlugin = DeviceCalendarPlugin(); +final ios.CalendarPlugin _myPlugin = ios.CalendarPlugin(); + +class CalendarUtils { + static Completer? _completer; + + dynamic get writableCalendars => calendars.firstWhere((c) => !c.isReadOnly!); + dynamic calendars; + + CalendarUtils._(this.calendars); + + // static Future getInstance() async { + // if (_completer == null) { + // _completer = Completer(); + // print(_completer!.isCompleted); + // try { + // final dynamic calendarsResult; + // if (Platform.isIOS) { + // calendarsResult = await _myPlugin.getCalendars(); + // if (!_completer!.isCompleted) { + // _completer?.complete(CalendarUtils._(await calendarsResult!)); + // } + // } else { + // calendarsResult = await deviceCalendarPlugin.retrieveCalendars(); + // if (!_completer!.isCompleted) { + // _completer?.complete(CalendarUtils._(await calendarsResult.data!)); + // } + // } + // } on Exception catch (e) { + // if (!_completer!.isCompleted) { + // _completer!.completeError(e); + // } + // } + // } + // return _completer!.future; + // } + + static Future getInstance() async { + tzl.initializeTimeZones(); + if (_completer != null) { + return _completer!.future; + } + _completer = Completer(); + try { + final dynamic calendarsResult; + if (Platform.isIOS) { + calendarsResult = await _myPlugin.getCalendars(); + _completer!.complete(CalendarUtils._(calendarsResult)); + } else { + calendarsResult = await deviceCalendarPlugin.retrieveCalendars(); + _completer!.complete(CalendarUtils._(calendarsResult.data)); + } + } catch (e) { + _completer!.completeError(e); + } + + return _completer!.future; + } + + Future createOrUpdateEvents({List? scheduleList, String? title, String? description, List? scheduleDateTime, List? daysOfWeek}) async { + tzl.initializeTimeZones(); + List events = []; + Location _currentLocation; + if (DateTime.now().timeZoneName == "+04") + _currentLocation = getLocation('Asia/Dubai'); + else + _currentLocation = getLocation('Asia/Riyadh'); + + scheduleDateTime!.forEach((element) { + RecurrenceRule recurrenceRule = RecurrenceRule( + RecurrenceFrequency.Daily, + daysOfWeek: daysOfWeek, + endDate: element, + ); + //added byAamir Tz Time + Event event = Event(writableCalendars!.id, + recurrenceRule: recurrenceRule, + start: TZDateTime.from(element, _currentLocation), + end: TZDateTime.from(element.add(Duration(minutes: 30)), _currentLocation), + title: title, + description: description); + events.add(event); + }); + + events.forEach((element) { + deviceCalendarPlugin.createOrUpdateEvent(element); + }); + } + + Future createOrUpdateEvent({required String title, required String description, DateTime? scheduleDateTime, String? eventId}) async { + RecurrenceRule recurrenceRule = RecurrenceRule( + RecurrenceFrequency.Daily, + // daysOfWeek: daysOfWeek, + endDate: scheduleDateTime, + ); + + Location _currentLocation; + if (DateTime.now().timeZoneName == "+04") + _currentLocation = getLocation('Asia/Dubai'); + else + _currentLocation = getLocation('Asia/Riyadh'); + + TZDateTime scheduleDateTimeUTZ = TZDateTime.from(scheduleDateTime!, _currentLocation); + + print("writableCalendars-name: " + writableCalendars.name); + print("writableCalendars-Id: " + writableCalendars.id); + print("writableCalendarsToString: " + writableCalendars.toString()); + print("writableCalendarsToString: " + writableCalendars!.id!); + Event event = Event( + writableCalendars!.id, + start: scheduleDateTimeUTZ, + end: scheduleDateTimeUTZ.add(Duration(minutes: 30)), + title: title, + description: description, + ); + + ios.CalendarEvent iosCalEvent = + ios.CalendarEvent(eventId: eventId, startDate: scheduleDateTimeUTZ, endDate: scheduleDateTimeUTZ.add(Duration(minutes: 30)), title: title, description: description, isAllDay: false); + + if(Platform.isAndroid) { + Result result = await deviceCalendarPlugin.hasPermissions(); + print(result); + await deviceCalendarPlugin.createOrUpdateEvent(event).catchError((e) { + print("catchError " + e.toString()); + }).whenComplete(() { + print("whenComplete Calender ID " + eventId!); + }); + } else { + // Result result = await deviceCalendarPlugin.hasPermissions(); + // print(result); + await _myPlugin.createEvent(calendarId: writableCalendars.id!, event: iosCalEvent).catchError((e) { + print("catchError " + e.toString()); + }).whenComplete(() { + print("whenComplete Calender ID iOS " + eventId!); + }); + } + + + + + } + + deleteEvent(Calendar _calendar, Event _event) async { + if (Platform.isIOS) { + await _myPlugin.deleteEvent(calendarId: _calendar.id!, eventId: _event.eventId!); + } else { + await deviceCalendarPlugin.deleteEvent(_calendar.id, _event.eventId); + } + } + + Future retrieveEvents( + String calendarId, + RetrieveEventsParams retrieveEventsParams, + ) async { + return await deviceCalendarPlugin.retrieveEvents(calendarId, retrieveEventsParams); + } + + Future createCalendar( + String calendarName, { + Color? calendarColor, + String? localAccountName, + }) async { + return await deviceCalendarPlugin.createCalendar(calendarName, calendarColor: calendarColor, localAccountName: localAccountName); + } +} diff --git a/lib/uitl/DeepLinkHandler.dart b/lib/uitl/DeepLinkHandler.dart new file mode 100644 index 00000000..9f46242b --- /dev/null +++ b/lib/uitl/DeepLinkHandler.dart @@ -0,0 +1,100 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/penguin_method_channel.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; + +import '../pages/BookAppointment/Search.dart'; +import 'app-permissions.dart'; + +enum DeepLinkNavigation { + APPOINTMENT("/appointment", false), + LIVE_CARE("/livecare", true), + NAVIGATE("/navigate", false); + + final String name; + final bool isLoginRequired; + + const DeepLinkNavigation(this.name, this.isLoginRequired); +} + +class DeepLinkHandler { + final projectID = "projectID"; + final clinicId = "clinicId"; + + DeepLinkNavigation? navigationType; + Uri? uri; + + DeepLinkHandler._(); + + static final DeepLinkHandler _instance = DeepLinkHandler._(); + + static DeepLinkHandler get instance => _instance; + + void handleDeepLinkAndNavigation( + NavigatorState? currentState, Uri uri, BuildContext context) async { + var url = uri.toString().replaceFirst( + "https://hmg.com/Pages/PageNotFoundError.aspx?requestUrl=", ""); + + uri = Uri.parse(url); + this.uri = uri; + print( + "the uri contains ${uri.path.toLowerCase() == DeepLinkNavigation.NAVIGATE.name}"); + print("the uri.path ${uri.path}"); + if (uri.path.toLowerCase() == DeepLinkNavigation.NAVIGATE.name) { + await Future.delayed(Duration(seconds: 1)); + navigationType = DeepLinkNavigation.NAVIGATE; + var queryParam = uri.queryParameters; + print("the query params are $queryParam"); + initPenguinSDK( + queryParam[projectID] ?? "", queryParam[clinicId] ?? "", context); + removeDeepLinkData(); + return; + } + if (uri.path.toLowerCase() == DeepLinkNavigation.APPOINTMENT.name) { + navigationType = DeepLinkNavigation.NAVIGATE; + currentState?.push(FadePage(page: Search())); + removeDeepLinkData(); + return; + } + if (uri.path.toLowerCase() == DeepLinkNavigation.LIVE_CARE.name) { + var viewModel = Provider.of(context); + if (viewModel.isLogin) { + currentState?.push(FadePage(page: Search())); + removeDeepLinkData(); + return; + } else {} + } + } + + void removeDeepLinkData() { + navigationType = null; + uri = null; + } + + initPenguinSDK( + String projectId, String clinicID, BuildContext context) async { + AppSharedPreferences sharedPref = AppSharedPreferences(); + NavigationClinicDetails data = NavigationClinicDetails(); + data.clinicId = clinicID; + + data.projectId = projectId; + final bool permited = await AppPermission.askPenguinPermissions(); + if (!permited) { + Map statuses = await [ + Permission.location, + Permission.bluetooth, + Permission.bluetoothConnect, + Permission.bluetoothScan, + Permission.activityRecognition, + ].request().whenComplete(() async { + final currentLanguage = + await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + PenguinMethodChannel() + .launch("penguin", currentLanguage, "null", details: data); + }); + } + } +} diff --git a/lib/uitl/HMGNetworkConnectivity.dart b/lib/uitl/HMGNetworkConnectivity.dart new file mode 100644 index 00000000..9ef3ce67 --- /dev/null +++ b/lib/uitl/HMGNetworkConnectivity.dart @@ -0,0 +1,148 @@ +import 'dart:developer'; +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.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:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +// import 'package:wifi/wifi.dart'; + +import 'gif_loader_dialog_utils.dart'; + +class HMGNetworkConnectivity { + final _platformBridge = PlatformBridge.shared(); + final BuildContext context; + late Function callBack; + + final String GUEST_SSID = "HMG-MobileApp"; + final String PATIENT_SSID = "GUEST-POC"; + + HMGNetworkConnectivity(this.context); + + late AuthenticatedUser userData; + + start() { + // getUserData().then((value) { + // userData = value; + // checkAndConnectIfNoInternet(); + // }); + } + + void checkAndConnectIfNoInternet() async { + // getMyWifiCredentials((username, password){ + // print(""); + // }); + // + // return; + + String pingUrl = "$BASE_URL$PING_SERVICE"; + // pingUrl = "https://captive.apple.com"; + + // String ssid = await Wifi.ssid.catchError((error) { + // log(error.toString()); + // }); + + // bool alreadyConnected = ssid == GUEST_SSID; + + // BaseAppClient().simpleGet(pingUrl, onSuccess: (dynamic response, int statusCode) { + // log("Having internet with status code: $statusCode"); + // }, onFailure: (String error, int statusCode) { + // if (alreadyConnected) + // showFailDailog(TranslationBase.of(context).failedToAccessHmgServices); + // else { + // confirmFromUser(connectForLocalAccess); + // } + // }); + // } + + void confirmFromUser(VoidCallback confirmCallback) { + TranslationBase translator = TranslationBase.of(context); + + void doIt() { + ConfirmDialog( + context: context, + confirmMessage: translator.wantToConnectWithHmgNetwork, + okText: translator.yes, + okFunction: () { + // ConfirmDialog.closeAlertDialog(context); + confirmCallback(); + }, + cancelText: translator.no, + cancelFunction: () { + ConfirmDialog.closeAlertDialog(context); + }).showAlertDialog(context); + } + + // if (Platform.isAndroid) + // Wifi.list(GUEST_SSID).then((value) { + // if (!value.indexWhere((element) => element.ssid == GUEST_SSID).isNegative) doIt(); + // }); + // else + // doIt(); + } + + void showFailDailog(String message) { + TranslationBase translator = TranslationBase.of(context); + AlertDialogBox( + context: context, + okText: translator.ok, + confirmMessage: message, + okFunction: () { + AlertDialogBox.closeAlertDialog(context); + }).showAlertDialog(context); + } + + Future getUserData() async { + var userData = AuthenticatedUser.fromJson( + await AppSharedPreferences().getObject(MAIN_USER)); + return userData; + } + + connectForLocalAccess() { + String patientID = userData.patientID.toString(); + GifLoaderDialogUtils.showMyDialog(context); + _platformBridge.connectHMGGuestWifi(GUEST_SSID).then((value) async { + if (value == 0) { + GifLoaderDialogUtils.hideDialog(context); + } else { + // getPatientWifiCredentials(patientID, (username, password) async { + // final result = await _platformBridge.connectHMGInternetWifi(PATIENT_SSID, username, password).catchError((err) => print(err.toString())); + // GifLoaderDialogUtils.hideDialog(context); + // if (result == 1) { + // // Success + // } + // }); + } + }); + } + // + // getPatientWifiCredentials(String patientID, Function(String username, String password) successCallback) { + // final body = {"PatientID": patientID}; + // locator().post(WIFI_CREDENTIALS, body: body, onSuccess: (dynamic response, int statusCode) { + // print(response); + // var data = response["Hmg_SMS_Get_By_ProjectID_And_PatientIDList"]; + // if (data is List && data.first != null) { + // final username = data.first['UserName']; + // final password = data.first['Password']; + // if (username != null && password != null && username.isNotEmpty && password.isNotEmpty) { + // successCallback(username, password); + // } + // } + // }, onFailure: (String error, int statusCode) { + // print(error); + // }, bypassConnectionCheck: true); + // } + // + + + } + ///Commeneted code need to reimplement +} diff --git a/lib/uitl/HMG_Geofence.dart b/lib/uitl/HMG_Geofence.dart new file mode 100644 index 00000000..9f1075bc --- /dev/null +++ b/lib/uitl/HMG_Geofence.dart @@ -0,0 +1,189 @@ +// import 'dart:convert'; +// import 'dart:core'; +// import 'dart:io'; +// import 'dart:isolate'; +// import 'dart:math'; +// import 'dart:ui'; +// +// import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +// import 'package:diplomaticquarterapp/core/model/geofencing/requests/GeoZonesRequestModel.dart'; +// import 'package:diplomaticquarterapp/core/model/geofencing/requests/LogGeoZoneRequestModel.dart'; +// import 'package:diplomaticquarterapp/core/model/geofencing/responses/GeoZonesResponseModel.dart'; +// import 'package:diplomaticquarterapp/core/service/geofencing/GeofencingServices.dart'; +// import 'package:diplomaticquarterapp/locator.dart'; +// import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; +// import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +// import 'package:flutter/cupertino.dart'; +// import 'package:flutter/foundation.dart'; +// import 'package:geofencing/geofencing.dart'; +// +// class HMG_Geofencing { +// var _testTrigger = true; +// static var _isolatePortName = "hmg_geofencing_send_port"; +// +// List _zones; +// List registeredGeofences = []; +// +// final AndroidGeofencingSettings androidSettings = AndroidGeofencingSettings(initialTrigger: [GeofenceEvent.enter, GeofenceEvent.exit, GeofenceEvent.dwell], loiteringDelay: 1000 * 60); +// +// final BuildContext context; +// final List triggers =[]; +// +// HMG_Geofencing(this.context) { +// triggers.add(GeofenceEvent.enter); +// triggers.add(GeofenceEvent.exit); +// // triggers.add(GeofenceEvent.dwell); +// } +// +// Future loadZones() async{ +// _zones = await locator().getAllGeoZones(GeoZonesRequestModel()); +// return this; +// } +// +// void init() async { +// // debug check (Testing Geo Zones) +// if (kDebugMode) { +// addTestingGeofences(); +// } +// _saveZones(); +// await GeofencingManager.initialize(); +// await Future.delayed(Duration(seconds: 2)); +// _registerIsolatePort(); +// _registerGeofences().then((value) { +// print(value.toString()); +// if(_testTrigger) { +// var events = [GeofenceEvent.enter,GeofenceEvent.exit]; +// events.shuffle(); +// transitionTrigger(value, null, events.first); +// } +// }); +// +// } +// +// void _saveZones() { +// var list =[]; +// _zones.forEach((element) { +// list.add(element.toJson()); +// }); +// +// var jsonString = jsonEncode(list); +// AppSharedPreferences pref = AppSharedPreferences(); +// pref.setString(HMG_GEOFENCES, jsonString); +// } +// +// Future> _registerGeofences() async { +// registeredGeofences = await GeofencingManager.getRegisteredGeofenceIds(); +// +// var maxLimit = Platform.isIOS ? 20 : 100; +// +// if (registeredGeofences.length < maxLimit) { +// var notRegistered = _zones.where((element) => !(registeredGeofences.contains(element.geofenceId()))).toList(); +// for (int i = 0; i < notRegistered.length; i++) { +// var zone = notRegistered.elementAt(i); +// var lat = double.tryParse(zone.latitude); +// var lon = double.tryParse(zone.longitude); +// var rad = double.tryParse(zone.radius.toString()); +// +// if (lat != null || lon != null || rad != null) { +// await GeofencingManager.registerGeofence(GeofenceRegion(zone.geofenceId(), lat, lon, rad, triggers), transitionTrigger); +// registeredGeofences.add(zone.geofenceId()); +// if (registeredGeofences.length >= maxLimit) { +// break; +// } +// await Future.delayed(Duration(milliseconds: 100)); +// print("Geofence: ${zone.description} registered"); +// } else { +// print("Geofence: ${zone.description} registered"); +// } +// } +// } +// return registeredGeofences; +// } +// +// void addTestingGeofences() { +// _zones.add(GeoZonesResponseModel.get("24.777577,46.652675", 150, "msH")); +// _zones.add(GeoZonesResponseModel.get("24.691136,46.650116", 150, "zkH")); +// _zones.add(GeoZonesResponseModel.get("24.7087913,46.6656461", 150, "csO")); +// } +// +// static void transitionTrigger(List id, Location location, GeofenceEvent event) { +// var dataToSend = id.map((element) => {"event": event, "geofence_id": element}).toList() ?? []; +// final SendPort send = IsolateNameServer.lookupPortByName(_isolatePortName); +// send?.send(dataToSend); +// } +// +// ReceivePort _port = ReceivePort(); +// void _registerIsolatePort() async{ +// IsolateNameServer.registerPortWithName(_port.sendPort, _isolatePortName); +// _port.listen((dynamic data) { +// +// Future result = AppSharedPreferences().getStringWithDefaultValue(HMG_GEOFENCES,"[]"); +// result.then((jsonString){ +// +// List jsonList = json.decode(jsonString) ?? []; +// List geoList = jsonList.map((e) => GeoZonesResponseModel().fromJson(e)).toList() ?? []; +// +// (data as List).forEach((element) async { +// GeofenceEvent geofenceEvent = element["event"]; +// String geofence_id = element["geofence_id"]; +// +// GeoZonesResponseModel geoZone = _findByGeofenceFrom(geoList, by: geofence_id); +// if(geoZone != null) { +// LocalNotification.getInstance().showNow( +// title: "GeofenceEvent: ${_nameOf(geofenceEvent)}", +// subtitle: geoZone.description, +// payload: json.encode(geoZone.toJson())); +// +// _logGeoZoneToServer(zoneId: geoZone.geofId, transition: _idOf(geofenceEvent)); +// } +// +// await Future.delayed(Duration(milliseconds: 700)); +// +// }); +// +// }); +// }); +// } +// +// _logGeoZoneToServer({int zoneId, int transition}){ +// locator() +// .logGeoZone(LogGeoZoneRequestModel(GeoType: transition, PointsID: zoneId ?? 1)) +// .then((response){ +// +// }).catchError((error){ +// +// }); +// +// } +// +// GeoZonesResponseModel _findByGeofenceFrom(List list, { String by}) { +// var have = list.where((element) => element.geofenceId() == by).toList().first; +// return have; +// } +// +// String _nameOf(GeofenceEvent event) { +// switch (event) { +// case GeofenceEvent.enter: +// return "Enter"; +// case GeofenceEvent.exit: +// return "Exit"; +// case GeofenceEvent.dwell: +// return "dWell"; +// default: +// return event.toString(); +// } +// } +// +// int _idOf(GeofenceEvent event){ +// switch (event) { +// case GeofenceEvent.enter: +// return 1; +// case GeofenceEvent.exit: +// return 2; +// case GeofenceEvent.dwell: +// return 3; +// default: +// return -1; +// } +// } +// } diff --git a/lib/uitl/LocalNotification.dart b/lib/uitl/LocalNotification.dart new file mode 100644 index 00000000..aba01f85 --- /dev/null +++ b/lib/uitl/LocalNotification.dart @@ -0,0 +1,191 @@ +import 'dart:math'; +import 'dart:typed_data'; + +import 'package:flutter_local_notifications/flutter_local_notifications.dart'; + +final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); + +class LocalNotification { + Function(String payload)? _onNotificationClick; + static LocalNotification? _instance; + + static LocalNotification? getInstance() { + return _instance; + } + + static init({required Function(String payload) onNotificationClick}) { + if (_instance == null) { + _instance = LocalNotification(); + _instance?._onNotificationClick = onNotificationClick; + _instance?._initialize(); + } else { + // assert(false,(){ + // //TODO fix it + // "LocalNotification Already Initialized"; + // }); + } + } + + _initialize() async { + try { + var initializationSettingsAndroid = new AndroidInitializationSettings('app_icon'); + var initializationSettingsIOS = DarwinInitializationSettings(); + var initializationSettings = InitializationSettings(android: initializationSettingsAndroid, iOS: initializationSettingsIOS); + await flutterLocalNotificationsPlugin.initialize( + initializationSettings, + onDidReceiveNotificationResponse: (NotificationResponse notificationResponse) { + switch (notificationResponse.notificationResponseType) { + case NotificationResponseType.selectedNotification: + // selectNotificationStream.add(notificationResponse.payload); + break; + case NotificationResponseType.selectedNotificationAction: + // if (notificationResponse.actionId == navigationActionId) { + // selectNotificationStream.add(notificationResponse.payload); + // } + break; + } + }, + // onDidReceiveBackgroundNotificationResponse: notificationTapBackground, + ); + } catch (ex) { + print(ex.toString()); + } + // flutterLocalNotificationsPlugin.initialize(initializationSettings, onDidReceiveNotificationResponse: (NotificationResponse notificationResponse) + // { + // switch (notificationResponse.notificationResponseType) { + // case NotificationResponseType.selectedNotification: + // // selectNotificationStream.add(notificationResponse.payload); + // break; + // case NotificationResponseType.selectedNotificationAction: + // // if (notificationResponse.actionId == navigationActionId) { + // // selectNotificationStream.add(notificationResponse.payload); + // } + // // break; + // },} + // + // , + // + // ); + } + + // void notificationTapBackground(NotificationResponse notificationResponse) { + // // ignore: avoid_print + // print('notification(${notificationResponse.id}) action tapped: ' + // '${notificationResponse.actionId} with' + // ' payload: ${notificationResponse.payload}'); + // if (notificationResponse.input?.isNotEmpty ?? false) { + // // ignore: avoid_print + // print('notification action tapped with input: ${notificationResponse.input}'); + // } + // } + + var _random = new Random(); + + _randomNumber({int from = 100000}) { + return _random.nextInt(from); + } + + _vibrationPattern() { + var vibrationPattern = Int64List(4); + vibrationPattern[0] = 0; + vibrationPattern[1] = 1000; + vibrationPattern[2] = 5000; + vibrationPattern[3] = 2000; + + return vibrationPattern; + } + + Future? showNow({required String title, required String subtitle, required String payload}) { + Future.delayed(Duration(seconds: 1)).then((result) async { + var androidPlatformChannelSpecifics = AndroidNotificationDetails( + 'com.hmg.local_notification', + 'HMG', + channelDescription: 'HMG', + importance: Importance.max, + priority: Priority.high, + ticker: 'ticker', + vibrationPattern: _vibrationPattern(), + ongoing: true, + autoCancel: false, + usesChronometer: true, + when: DateTime.now().millisecondsSinceEpoch - 120 * 1000, + ); + var iOSPlatformChannelSpecifics = DarwinNotificationDetails(); + var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics); + await flutterLocalNotificationsPlugin.show(25613, title, subtitle, platformChannelSpecifics, payload: payload).catchError((err) { + print(err); + }); + }); + } + + Future scheduleNotification({required DateTime scheduledNotificationDateTime, required String title, required String description}) async { + ///vibrationPattern + var vibrationPattern = Int64List(4); + vibrationPattern[0] = 0; + vibrationPattern[1] = 1000; + vibrationPattern[2] = 5000; + vibrationPattern[3] = 2000; + + // var androidPlatformChannelSpecifics = AndroidNotificationDetails('active-prescriptions', 'ActivePrescriptions', + // channelDescription: 'ActivePrescriptionsDescription', + // // icon: 'secondary_icon', + // sound: RawResourceAndroidNotificationSound('slow_spring_board'), + // + // ///change it to be as ionic + // // largeIcon: DrawableResourceAndroidBitmap('sample_large_icon'),///change it to be as ionic + // vibrationPattern: vibrationPattern, + // enableLights: true, + // color: const Color.fromARGB(255, 255, 0, 0), + // ledColor: const Color.fromARGB(255, 255, 0, 0), + // ledOnMs: 1000, + // ledOffMs: 500); + // var iOSPlatformChannelSpecifics = DarwinNotificationDetails(sound: 'slow_spring_board.aiff'); + + // /change it to be as ionic + // var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics); + // await flutterLocalNotificationsPlugin.schedule(0, title, description, scheduledNotificationDateTime, platformChannelSpecifics); + } + + ///Repeat notification every day at approximately 10:00:00 am + Future showDailyAtTime() async { + // var time = Time(10, 0, 0); + // var androidPlatformChannelSpecifics = AndroidNotificationDetails('repeatDailyAtTime channel id', 'repeatDailyAtTime channel name', channelDescription: 'repeatDailyAtTime description'); + // var iOSPlatformChannelSpecifics = DarwinNotificationDetails(); + // var platformChannelSpecifics = NotificationDetails( + // androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics); + // await flutterLocalNotificationsPlugin.showDailyAtTime( + // 0, + // 'show daily title', + // 'Daily notification shown at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}', + // time, + // platformChannelSpecifics); + } + + ///Repeat notification weekly on Monday at approximately 10:00:00 am + Future showWeeklyAtDayAndTime() async { + // var time = Time(10, 0, 0); + // var androidPlatformChannelSpecifics = AndroidNotificationDetails('show weekly channel id', 'show weekly channel name', channelDescription: 'show weekly description'); + // var iOSPlatformChannelSpecifics = DarwinNotificationDetails(); + // var platformChannelSpecifics = NotificationDetails( + // androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics); + // await flutterLocalNotificationsPlugin.showWeeklyAtDayAndTime( + // 0, + // 'show weekly title', + // 'Weekly notification shown on Monday at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}', + // Day.Monday, + // time, + // platformChannelSpecifics); + } + + String _toTwoDigitString(int value) { + return value.toString().padLeft(2, '0'); + } + + Future cancelNotification() async { + await flutterLocalNotificationsPlugin.cancel(0); + } + + Future cancelAllNotifications() async { + await flutterLocalNotificationsPlugin.cancelAll(); + } +} diff --git a/lib/uitl/PlatformBridge.dart b/lib/uitl/PlatformBridge.dart new file mode 100644 index 00000000..4dfc13a2 --- /dev/null +++ b/lib/uitl/PlatformBridge.dart @@ -0,0 +1,162 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/localized_values.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/services.dart'; + +class PlatformBridge { + static const platform = const MethodChannel("HMG-Platform-Bridge"); + static late PlatformBridge _shared; + static late BuildContext _context; + + // // Singleton + // static final PlatformBridge _singleton = PlatformBridge._internal(); + // factory PlatformBridge() { + // return _singleton; + // } + // PlatformBridge._internal(); + + static PlatformBridge shared() { + if (_shared == null) { + assert(true, "PlatformBridge is not initialized, (Initialized it by calling 'PlatformBridge.init(BuildContext))'."); + } + return _shared; + } + + static void init(BuildContext context) { + _context = context; + _shared = PlatformBridge(); + + Future incoming(MethodCall methodCall) async { + switch (methodCall.method) { + case 'localizedValue': + String key = methodCall.arguments.toString(); + return localizedValue(key); + + case 'getGeoZones': + return getGeoZones(); + + case 'getLogGeofenceFullUrl': + return getLogGeofenceFullUrl(); + + case 'getDefaultHttpParameters': + return getDefaultHttpParameters(); + + default: + throw MissingPluginException('notImplemented'); + } + } + + platform.setMethodCallHandler(incoming); + } + + //--------------------------------- + // Incoming below + //--------------------------------- + static Future localizedValue(String forKey) async { + String currentLanguage = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + dynamic localized = platformLocalizedValues[forKey][currentLanguage]; + return (localized! != null || (localized! is String)) ? localized! : forKey!; + } + + static Future getGeoZones() async { + var res = await sharedPref.getStringWithDefaultValue(HMG_GEOFENCES, "[]"); + return res; + } + + static Future getLogGeofenceFullUrl() async { + var res = BASE_URL + LOG_GEO_ZONES; + return res; + } + + static Future getDefaultHttpParameters() async { + return BaseAppClient.defaultHttpParameters(); + } + + //--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--// + //--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--//--// + + //--------------------------------- + // Outgoing below + //--------------------------------- + // Method Names + static const hmg_internet_wifi_connect_method = "connectHMGInternetWifi"; + static const hmg_guest_wifi_connect_method = "connectHMGGuestWifi"; + static const is_hmg_network_available_method = "isHMGNetworkAvailable"; + static const enable_wifi_if_not = "enableWifiIfNot"; + static const show_loading_method = "loading"; + static const register_Hmg_Geofences = "registerHmgGeofences"; + static const un_register_Hmg_Geofences = "unRegisterHmgGeofences"; + static const IS_DRAW_OVER_APPS_PERMISSION_ALLOWED = "isDrawOverAppsPermissionAllowed"; + static const ASK_DRAW_OVER_APPS_PERMISSION = "askDrawOverAppsPermission"; + static const GET_INTENT = "getIntent"; + + Future connectHMGInternetWifi(String ssid, username, password) { + try { + return platform!.invokeMethod(hmg_internet_wifi_connect_method!, [ssid!, username!,password!]); + } on PlatformException catch (e) { + print(e); + return Future.error(e); + } + } + + Future connectHMGGuestWifi(String ssid) { + try { + return platform.invokeMethod(hmg_guest_wifi_connect_method, ssid); + } on PlatformException catch (e) { + print(e); + return Future.error(e); + } + } + + Future isHMGNetworkAvailable(String ssid) { + try { + return platform.invokeMethod(is_hmg_network_available_method, ssid); + } on PlatformException catch (e) { + print(e); + return Future.error(e); + } + } + + Future enableWifiIfNot() async { + try { + return platform.invokeMethod(enable_wifi_if_not); + } on PlatformException catch (e) { + print(e); + return Future.error(e); + } + } + + void showLoading(String message, bool show) async { + try { + var result = await platform.invokeMethod(show_loading_method, [message, show]); + } on PlatformException catch (e) { + print(e); + } + } + + // GEO Fences + void registerHmgGeofences() async { + var result = await platform.invokeMethod(register_Hmg_Geofences); + } + + void unRegisterHmgGeofences() async { + var result = await platform.invokeMethod(un_register_Hmg_Geofences); + } + + Future isDrawOverAppsPermissionAllowed() async { + var result = await platform.invokeMethod(IS_DRAW_OVER_APPS_PERMISSION_ALLOWED); + return result as bool; + } + + Future askDrawOverAppsPermission() async { + var result = await platform.invokeMethod(ASK_DRAW_OVER_APPS_PERMISSION); + return result as bool; + } + + Future getIntentData() async { + var result = await platform.invokeMethod(GET_INTENT); + return result as bool; + } +} diff --git a/lib/uitl/ProgressDialog.dart b/lib/uitl/ProgressDialog.dart new file mode 100644 index 00000000..6820a6d5 --- /dev/null +++ b/lib/uitl/ProgressDialog.dart @@ -0,0 +1,26 @@ +import 'package:flutter/material.dart'; + +AlertDialog _alert = AlertDialog( + content: Row( + children: [ + CircularProgressIndicator(), + Container(margin: EdgeInsets.only(left: 7), child: Text("Loading...")), + ], + ), +); + +class ProgressDialogUtil { + static showProgressDialog(BuildContext context) { + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return _alert; + }, + ); + } + + static hideProgressDialog(BuildContext context) { + Navigator.pop(context); + } +} diff --git a/lib/uitl/SignalRUtil.dart b/lib/uitl/SignalRUtil.dart new file mode 100644 index 00000000..de90981f --- /dev/null +++ b/lib/uitl/SignalRUtil.dart @@ -0,0 +1,173 @@ +// import 'dart:convert'; +// import 'dart:io'; +// +// import 'package:flutter/cupertino.dart'; +// import 'package:flutter_webrtc/flutter_webrtc.dart'; +// import 'package:http/io_client.dart'; +// import 'package:signalr_core/signalr_core.dart'; +// +// class SignalRUtil { +// String hubName; +// +// String sourceUser; +// String destinationUser; +// setContributors({@required String caller, @required String receiver}){ +// this.sourceUser = caller; +// this.destinationUser = receiver; +// } +// +// Function(bool) onConnected; +// SignalRUtil({@required this.hubName}); +// +// +// HubConnection connectionHub; +// +// closeConnection() async{ +// if(connectionHub != null) { +// connectionHub.off('OnIncomingCallAsync'); +// connectionHub.off('OnCallDeclinedAsync'); +// connectionHub.off('OnCallAcceptedAsync'); +// connectionHub.off('nHangUpAsync'); +// connectionHub.off('OnIceCandidateAsync'); +// connectionHub.off('OnOfferAsync'); +// await connectionHub.stop(); +// } +// } +// +// Future openConnection() async { +// connectionHub = HubConnectionBuilder() +// .withUrl( +// hubName, +// HttpConnectionOptions( +// logMessageContent: true, +// client: IOClient(HttpClient()..badCertificateCallback = (x, y, z) => true), +// logging: (level, message) => print(message), +// )).build(); +// +// await connectionHub.start(); +// await Future.delayed(Duration(seconds: 1)); +// +// connectionHub.on('ReceiveMessage', (message) { +// handleIncomingMessage(message); +// }); +// +// return getConnectionState(); +// } +// +// void handleIncomingMessage(List message) { +// print(message.toString()); +// } +// +// void sendMessage(List args) async { +// await connectionHub.invoke('SendMessage', args: args); //['Bob', 'Says hi!'] +// } +// +// listen({Function(CallUser) onAcceptCall, Function(CallUser) onHangupCall, Function(String, CallUser) onDeclineCall, Function(String, CallUser) onOffer, Function(String) onCandidate}){ +// +// connectionHub.on('OnIncomingCallAsync', (arguments) { +// print('OnIncomingCallAsync: ${arguments.toString()}'); +// }); +// +// connectionHub.on('OnCallDeclinedAsync', (arguments) { +// print('OnCallDeclinedAsync: ${arguments.toString()}'); +// onDeclineCall(arguments.first, CallUser.from(arguments.last)); +// }); +// +// connectionHub.on('OnCallAcceptedAsync', (arguments) { +// print('OnCallAcceptedAsync: ${arguments.toString()}'); +// }); +// +// connectionHub.on('OnHangUpAsync', (arguments) { +// print('nHangUpAsync: ${arguments.toString()}'); +// onHangupCall(CallUser.from(arguments.first)); +// }); +// +// connectionHub.on('OnIceCandidateAsync', (arguments) { +// print('OnIceCandidateAsync: ${arguments.toString()}'); +// onCandidate(arguments.first); +// }); +// +// connectionHub.on('OnOfferAsync', (arguments) { +// print('OnOfferAsync: ${arguments.toString()}'); +// onOffer(arguments.first, CallUser.from(arguments.last)); +// }); +// +// } +// +// // CallUserAsync(string currentUserId, string targerUserId) +// Future callUser(String from, to) async{ +// return await connectionHub.invoke('CallUserAsync', args: [from, to]); +// } +// +// // CallDeclinedAsync(string currentUserId, string targerUserId) +// Future declineCall(String from, to) async{ +// return await connectionHub.invoke('CallDeclinedAsync', args: [from, to]); +// } +// +// // AnswerCallAsync(string currentUserId, string targetUserId) +// Future answerCall(String from, to) async{ +// return await connectionHub.invoke('AnswerCallAsync', args: [from, to]); +// } +// +// // IceCandidateAsync(string targetUserId, string candidate) +// Future addIceCandidate(String candidate) async{ +// final target = destinationUser; +// return await connectionHub.invoke('IceCandidateAsync', args: [target, candidate]); +// } +// +// // OfferAsync(string targetUserId,string currentUserId, string targetOffer) +// Future offer(String from, to, offer) async{ +// return await connectionHub.invoke('OfferAsync', args: [from, to, offer]); +// } +// +// // AnswerOfferAsync(string targetUserId, string CallerOffer) +// Future answerOffer(RTCSessionDescription answerSdp, caller, receiver) async{ +// final payload = { +// 'target': receiver, +// 'caller': caller, +// 'sdp': answerSdp.toMap(), +// }; +// return await connectionHub.invoke('AnswerOfferAsync', args: [caller, jsonEncode(payload)]); +// } +// +// // HangUpAsync(string currentUserId, string targetUserId) +// Future hangupCall(String from, to) async{ +// return await connectionHub.invoke('HangUpAsync', args: [from, to]); +// } +// +// // CallAccepted(string currentUserId,string targetUserId) +// Future acceptCall(String from, to) async{ +// // return await connectionHub.send(methodName: 'CallAccepted', args: [from, to]); +// return await connectionHub.invoke("CallAccepted", args: [ from, to]); +// } +// +// +// bool getConnectionState() { +// if (connectionHub.state == HubConnectionState.connected) return true; +// if (connectionHub.state == HubConnectionState.disconnected) return false; +// return false; +// } +// } +// +// +// class CallUser{ +// String Id; +// String UserName; +// String Email; +// String Phone; +// String Title; +// dynamic UserStatus; +// String Image; +// int UnreadMessageCount = 0; +// +// CallUser.from(Map map){ +// Id = map['Id']; +// UserName = map['UserName']; +// Email = map['Email']; +// Phone = map['Phone']; +// Title = map['Title']; +// UserStatus = map['UserStatus']; +// Image = map['Image']; +// UnreadMessageCount = map['UnreadMessageCount']; +// } +// } \ No newline at end of file diff --git a/lib/uitl/app-permissions.dart b/lib/uitl/app-permissions.dart new file mode 100644 index 00000000..94697e4f --- /dev/null +++ b/lib/uitl/app-permissions.dart @@ -0,0 +1,59 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:permission_handler/permission_handler.dart'; + +import 'PlatformBridge.dart'; + +class AppPermission { + static Future askVideoCallPermission(BuildContext context) async { + if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted)) { + return false; + } + // if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) { + // await _drawOverAppsMessageDialog(context); + // return false; + // } + return true; + } + +// + + // Manifest.permission.INTERNET, + // Manifest.permission.ACCESS_FINE_LOCATION, + // Manifest.permission.ACCESS_COARSE_LOCATION, + // Manifest.permission.ACCESS_NETWORK_STATE, + // Manifest.permission.BLUETOOTH, + // Manifest.permission.BLUETOOTH_ADMIN, + // Manifest.permission.BLUETOOTH_SCAN, + // Manifest.permission.BLUETOOTH_CONNECT, + // Manifest.permission.HIGH_SAMPLING_RATE_SENSORS, + // Manifest.permission.ACTIVITY_RECOGNITION + + static Future askPenguinPermissions() async { + if (!(await Permission.location.request().isGranted) || + !(await Permission.bluetooth.request().isGranted) || + !(await Permission.bluetoothScan.request().isGranted) || + !(await Permission.bluetoothConnect.request().isGranted) || + !(await Permission.activityRecognition.request().isGranted)) { + return false; + } + return true; + } + + static Future _drawOverAppsMessageDialog(BuildContext context) async { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).drawOverAppsPermission, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () async { + await PlatformBridge.shared().askDrawOverAppsPermission(); + Navigator.pop(context); + }, + cancelFunction: () => {}); + dialog.showAlertDialog(context); + } +} diff --git a/lib/uitl/app_shared_preferences.dart b/lib/uitl/app_shared_preferences.dart new file mode 100644 index 00000000..4ecd1b91 --- /dev/null +++ b/lib/uitl/app_shared_preferences.dart @@ -0,0 +1,140 @@ +import 'dart:convert'; + +import 'package:shared_preferences/shared_preferences.dart'; + +class AppSharedPreferences { + Future _prefs = SharedPreferences.getInstance(); + late Map _allData; + + // To Test Saved Data + Future> getAll() async { + final prefs = (await _prefs); + _allData = {}; + prefs.getKeys().forEach((key) { + _allData![key] = prefs.get(key); + }); + return _allData!; + } + + /// Save String [key] the key for save value [value] the value we need to save it + setString(String key, String value) async { + if (value != null) { + final SharedPreferences prefs = await _prefs; + return prefs.setString(key, value); + } + } + + /// Save List of String [key] the key for save value [value] the value we need to save it + setStringList(String key, List value) async { + if (value != null) { + final SharedPreferences prefs = await _prefs; + return prefs.setStringList(key, value); + } + } + + /// Save Double [key] the key for save value [value] the value we need to save it + setDouble(String key, double value) async { + if (value != null) { + final SharedPreferences prefs = await _prefs; + return prefs.setDouble(key, value); + } + } + + /// Save Bool [key] the key for save value [value] the value we need to save it + setBool(String key, bool value) async { + if (value != null) { + final SharedPreferences prefs = await _prefs; + return prefs.setBool(key, value); + } + } + + /// Save int [key] the key for save value [value] the value we need to save it + setInt(String key, int value) async { + if (value != null) { + final SharedPreferences prefs = await _prefs; + return prefs.setInt(key, value); + } + } + + /// save Object [key] the key for save value [value] the value we need to save it + setObject(String key, value) async { + if (value != null) { + final SharedPreferences prefs = await _prefs; + return await prefs.setString(key, json.encode(value)); + } + } + + /// Get String [key] the key was saved + Future getString(String key) async { + final SharedPreferences prefs = await _prefs; + await prefs.reload(); + return prefs.getString(key); + } + + /// Get String [key] the key was saved + getStringWithDefaultValue(String key, String defaultVal) async { + final SharedPreferences prefs = await _prefs; + await prefs.reload(); + String value = prefs.getString(key).toString(); + return (value == null) || (value == "null") ? defaultVal : value; + // return value == null ? defaultVal : value; + } + + /// Get List of String [key] the key was saved + getStringList(String key) async { + final SharedPreferences prefs = await _prefs; + await prefs.reload(); + return prefs.getStringList(key); + } + + /// Get Double [key] the key was saved + getDouble(String key) async { + final SharedPreferences prefs = await _prefs; + await prefs.reload(); + return prefs.getDouble(key); + } + + /// Get Bool [key] the key was saved + getBool(String key) async { + final SharedPreferences prefs = await _prefs; + await prefs.reload(); + return prefs.getBool(key); + } + + /// Get Int [key] the key was saved + getInt(String key) async { + final SharedPreferences prefs = await _prefs; + await prefs.reload(); + return prefs.getInt(key); + } + + /// Get Object [key] the key was saved + Future getObject(String key) async { + try { + final SharedPreferences prefs = await _prefs; + await prefs.reload(); + var string = prefs.getString(key); + if (string == null) { + return null; + } + return json.decode(string); + } catch (ex) { + print(ex); + print(ex.toString()); + } + } + + /// clear all saved values in shared preferences + clear() async { + final SharedPreferences prefs = await _prefs; + prefs.clear(); + } + + /// remove value based on [key] the key was saved + remove(String key) async { + final SharedPreferences prefs = await _prefs; + prefs.remove(key).then((value) { + print(value); + }); + } +} diff --git a/lib/uitl/app_toast.dart b/lib/uitl/app_toast.dart new file mode 100644 index 00000000..bbeebe5d --- /dev/null +++ b/lib/uitl/app_toast.dart @@ -0,0 +1,91 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; + +class AppToast { + static void showToast({ + required String message, + Toast? toastLength, + int? timeInSeconds, + double? fontSize, + ToastGravity? toastGravity, + Color? backgroundColor, + Color? textColor, + int? radius, + int? elevation, + int? imageSize, + }) { + Fluttertoast.showToast( + msg: message, toastLength: toastLength, gravity: toastGravity, timeInSecForIosWeb: timeInSeconds!, backgroundColor: backgroundColor, textColor: textColor, fontSize: fontSize); + } + + static void showSuccessToast({ + required String message, + Toast toastLength = Toast.LENGTH_LONG, + int timeInSeconds = 2, + double fontSize = 16, + ToastGravity toastGravity = ToastGravity.TOP, + Color textColor = Colors.white, + int? radius, + int? elevation, + int imageSize = 32, + }) { + Fluttertoast.showToast( + msg: message, toastLength: toastLength, gravity: toastGravity, timeInSecForIosWeb: timeInSeconds ?? 0, backgroundColor: Colors.green, textColor: textColor, fontSize: fontSize); + } + + static void showErrorToast( + {required String message, + Toast toastLength = Toast.LENGTH_LONG, + int timeInSeconds = 2, + double fontSize = 16, + ToastGravity toastGravity = ToastGravity.TOP, + Color textColor = Colors.white, + int radius = 15, + int? elevation, + int imageSize = 32, + BuildContext? localContext}) { + FToast fToast = FToast(); + fToast.init(localContext != null ? localContext : AppGlobal.context); + Widget toast = Container( + padding: EdgeInsets.all(8), + alignment: Alignment.topCenter, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(radius.toDouble()), + color: Colors.red, + ), + child: Wrap( + children: [ + Text( + message, + style: TextStyle(color: textColor, fontSize: fontSize), + softWrap: true, + overflow: TextOverflow.clip, + ), + ], + ), + ); + fToast.showToast( + child: toast, + gravity: ToastGravity.TOP, + toastDuration: Duration(seconds: timeInSeconds), + positionedToastBuilder: (context, child) { + return Positioned(top: 50, left: 10, right: 10, child: child); + }); + // Fluttertoast.showToast(msg: message, toastLength: toastLength, gravity: toastGravity, timeInSecForIosWeb: timeInSeconds, backgroundColor: Colors.red, textColor: textColor, fontSize: fontSize); + } + + void cancelToast() { + Fluttertoast.cancel(); + } + + void backWithEmpty() { + AppToast.showErrorToast(message: TranslationBase.of(AppGlobal.context).empty); + Navigator.of(AppGlobal.context).pop(); + } + + void back() { + Navigator.of(AppGlobal.context).pop(); + } +} diff --git a/lib/uitl/cupertino_picker.dart b/lib/uitl/cupertino_picker.dart new file mode 100644 index 00000000..3dbbcea7 --- /dev/null +++ b/lib/uitl/cupertino_picker.dart @@ -0,0 +1,115 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class CupertinoPickerUtils { + int cupertinoPickerIndex = 0; + + /// show Cupertino Picker for any list [context] the page BuildContext + /// [items] the list of items we need to show + /// [onSelectFun] the call function on select event + /// [isDismissible] parameter specifies whether the bottom sheet will be + /// dismissed when user taps on the scrim. + + /// [itemExtent] All children will be given the [BoxConstraints] to match this exact + /// height. Must not be null and must be positive. + + /// The [looping] argument decides whether the child list loops and can be + /// scrolled infinitely. If set to true, scrolling past the end of the list + /// will loop the list back to the beginning. If set to false, the list will + /// stop scrolling when you reach the end or the beginning. + + /// [backgroundColor] background color + showCupertinoPicker( + {BuildContext? context, + List? items, + String? decKey, + Function? onSelectFun, + bool isDismissible = false, + double itemExtent = 25, + bool looping = true, + Color backgroundColor = const Color(0xfff7f7f7)}) { + showModalBottomSheet( + isDismissible: isDismissible, + context: context!, + builder: (BuildContext builder) { + return Container( + height: SizeConfig.realScreenHeight! * 0.4, + color: backgroundColor, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + color: backgroundColor, + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + CupertinoButton( + child: Text(TranslationBase.of(context).cancel, + style: + TextStyle(color: Theme.of(context).primaryColor)), + onPressed: () { + Navigator.pop(context); + }, + ), + CupertinoButton( + child: Text( + TranslationBase.of(context).done, + style: TextStyle(color: Theme.of(context).primaryColor), + ), + onPressed: () { + Navigator.pop(context); + onSelectFun!(cupertinoPickerIndex); + }, + ), + ], + ), + ), + Container( + height: SizeConfig.realScreenHeight! * 0.3, + color: backgroundColor, + child: buildPickerItems( + context: context, + decKey: decKey!, + itemExtent: itemExtent, + items: items!, + looping: looping, + onSelectFun: onSelectFun!)) + ], + ), + ); + }, + ); + } + + /// build Cupertino Picker for any list + /// [context] the page BuildContext + /// [items] the list of items we need to show + /// [onSelectFun] the call function on select event + /// [decKey] the key we show for user + buildPickerItems( + {BuildContext? context, + List? items, + String? decKey, + Function? onSelectFun, + double? itemExtent, + bool? looping}) { + return CupertinoPicker( + magnification: 1.5, + scrollController: + FixedExtentScrollController(initialItem: cupertinoPickerIndex), + children: items!.map((item) { + return Text( + '${item["$decKey"]}', + style: TextStyle(fontSize: SizeConfig.textMultiplier! * 2), + ); + }).toList(), + itemExtent: itemExtent!, + looping: looping!, + onSelectedItemChanged: (int index) { + cupertinoPickerIndex = index; + }, + ); + } +} diff --git a/lib/uitl/date_uitl.dart b/lib/uitl/date_uitl.dart new file mode 100644 index 00000000..2d4c5b5c --- /dev/null +++ b/lib/uitl/date_uitl.dart @@ -0,0 +1,472 @@ +import 'package:device_calendar/device_calendar.dart'; +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; + +class DateUtil { + /// convert String To Date function + /// [date] String we want to convert + static DateTime convertStringToDate(String? date) { + if (date != null) { + const start = "/Date("; + const end = "+0300)"; + final startIndex = date.indexOf(start); + final endIndex = date.indexOf(end, startIndex + start.length); + return DateTime.fromMillisecondsSinceEpoch(int.parse( + date.substring(startIndex + start.length, endIndex), + )); + } else + return DateTime.now(); + } + + static DateTime convertStringToDateSaudiTimezone(String date, int projectId) { + if (date != null) { + const start = "/Date("; + const end = "+0300)"; + final startIndex = date.indexOf(start); + final endIndex = date.indexOf(end, startIndex + start.length); + // if (projectId == 2 || projectId == 3) { + // return DateTime.fromMillisecondsSinceEpoch( + // int.parse( + // date.substring(startIndex + start.length, endIndex), + // ), + // isUtc: true) + // .add(Duration(hours: 4)); + // } else { + return DateTime.fromMillisecondsSinceEpoch( + int.parse( + date.substring(startIndex + start.length, endIndex), + ), + isUtc: true) + .add(Duration(hours: 3)); + // } + } else + return DateTime.now(); + } + + static DateTime convertStringToDateNoTimeZone(String date) { + // /Date(1585774800000+0300)/ + if (date != null) { + const start = "/Date("; + const end = ")"; + final startIndex = date.indexOf(start); + final endIndex = date.indexOf(end, startIndex + start.length); + return DateTime.fromMillisecondsSinceEpoch( + int.parse( + date.substring(startIndex + start.length, endIndex), + ), + ); + } else + return DateTime.now(); + } + + static DateTime convertStringToDateTime(String? date) { + if (date != null) { + try { + var dateT = date.split('/'); + var year = dateT[2].substring(0, 4); + var dateP = DateTime(int.parse(year), int.parse(dateT[1]), int.parse(dateT[0])); + return dateP; + } catch (e) { + print(e); + } + + return DateTime.now(); + } else + return DateTime.now(); + } + + static String convertDateToString(DateTime date) { + const start = "/Date("; + const end = "+0300)/"; + int milliseconds = date.millisecondsSinceEpoch; + + return start + "$milliseconds" + end; + } + + static String convertDateToStringLocation(DateTime date) { + const start = "/Date("; + const end = ")/"; + int milliseconds = date.millisecondsSinceEpoch; + + return start + "$milliseconds" + end; + } + + static String convertTime(String timeStr) { + TimeOfDay time = TimeOfDay(hour: int.parse(timeStr.split(":")[0]), minute: int.parse(timeStr.split(":")[1])); // 24-hour format time + + int hour = time.hourOfPeriod; // get hour in 12-hour format + String meridiem = time.period == DayPeriod.am ? "AM" : "PM"; // get AM/PM + + String convertedTime = '$hour:${time.minute == 0 ? "00" : time.minute} $meridiem'; // create the new time string + + return convertedTime; + } + + static String formatDateToDate(DateTime date, bool isArabic) { + return DateFormat('dd MMM yyy', isArabic ? "ar_SA" : "en_US").format(date); + } + + static String formatDateToTime(DateTime date) { + return DateFormat('hh:mm a').format(date); + } + + static String yearMonthDay(DateTime dateTime) { + String dateFormat = '${dateTime.year}-${dateTime.month}-${dateTime.day}'; + return dateFormat; + } + + static String time(DateTime dateTime) { + String dateFormat = '${dateTime.hour}:${dateTime.minute}:00'; + return dateFormat; + } + + static String convertDateMSToJsonDate(utc) { + var dt = new DateTime.fromMicrosecondsSinceEpoch(utc); + + return "/Date(" + (dt.millisecondsSinceEpoch * 1000).toString() + '+0300' + ")/"; + } + + /// check Date + /// [dateString] String we want to convert + static String checkDate(DateTime checkedTime) { + DateTime currentTime = DateTime.now(); + if ((currentTime.year == checkedTime.year) && (currentTime.month == checkedTime.month) && (currentTime.day == checkedTime.day)) { + return "Today"; + } else if ((currentTime.year == checkedTime.year) && (currentTime.month == checkedTime.month)) { + if ((currentTime.day - checkedTime.day) == 1) { + return "YESTERDAY"; + } else if ((currentTime.day - checkedTime.day) == -1) { + return "Tomorrow"; + } + + if ((currentTime.day - checkedTime.day) <= -2) { + return "Next Week"; + } else { + return "Old Date"; + } + } + return "Old Date"; + } + + static String getDateFormatted(String date) { + DateTime dateObj = DateUtil.convertStringToDate(date); + return DateUtil.getWeekDay(dateObj.weekday) + ", " + dateObj.day.toString() + " " + DateUtil.getMonth(dateObj.month) + " " + dateObj.year.toString(); + } + + static String getISODateFormat(DateTime dateTime) { + // 2020-04-30T00:00:00.000 + return dateTime.toIso8601String(); + } + + /// get month by + /// [month] convert month number in to month name + static getMonth(int month) { + switch (month) { + case 1: + return "January"; + case 2: + return "February"; + case 3: + return "March"; + case 4: + return "April"; + case 5: + return "May"; + case 6: + return "June"; + case 7: + return "July"; + case 8: + return "August"; + case 9: + return "September"; + case 10: + return "October"; + case 11: + return "November"; + case 12: + return "December"; + } + } + + /// get month by + /// [month] convert month number in to month name in Arabic + static getMonthArabic(int month) { + switch (month) { + case 1: + return "يناير"; + case 2: + return " فبراير"; + case 3: + return "مارس"; + case 4: + return "أبريل"; + case 5: + return "مايو"; + case 6: + return "يونيو"; + case 7: + return "يوليو"; + case 8: + return "أغسطس"; + case 9: + return "سبتمبر"; + case 10: + return " اكتوبر"; + case 11: + return " نوفمبر"; + case 12: + return "ديسمبر"; + } + } + + static getMonthByName(String month) { + switch (month.toLowerCase()) { + case 'january': + return 1; + case 'february': + return 2; + case 'march': + return 3; + case 'april': + return 4; + case 'may': + return 5; + case 'june': + return 6; + case 'july': + return 7; + case 'august': + return 8; + case 'september': + return 9; + case 'october': + return 10; + case 'november': + return 11; + case 'december': + return 12; + } + } + + static getMonthDateTime(String month, yearName) { + DateTime? date; + try { + date = DateTime(int.parse(yearName), getMonthByName(month)); + } catch (e) { + print(e); + } + return date ?? DateTime.now(); + } + + /// get month by + /// [weekDay] convert week day in int to week day name + static getWeekDay(int weekDay) { + switch (weekDay) { + case 1: + return "Monday"; + case 2: + return "Tuesday"; + case 3: + return "Wednesday"; + case 4: + return "Thursday"; + case 5: + return "Friday"; + case 6: + return "Saturday "; + case 7: + return "Sunday"; + } + } + + /// get month by + /// [weekDay] convert week day in int to week day name arabic + static getWeekDayArabic(int weekDay) { + switch (weekDay) { + case 1: + return "الاثنين"; + case 2: + return "الثلاثاء"; + case 3: + return "الاربعاء"; + case 4: + return "الخميس"; + case 5: + return "الجمعه"; + case 6: + return "السبت "; + case 7: + return "الاحد"; + } + } + + static getWeekDayEnglish(int weekDay) { + switch (weekDay) { + case 1: + return "Monday"; + case 2: + return "Tuesday"; + case 3: + return "Wednesday"; + case 4: + return "Thursday"; + case 5: + return "Friday"; + case 6: + return "Saturday "; + case 7: + return "Sunday"; + } + } + + /// get data formatted like Apr 26,2020 + /// [dateTime] convert DateTime to data formatted + static String getMonthDayYearDateFormatted(DateTime dateTime) { + if (dateTime != null) + return getMonth(dateTime.month) + " " + dateTime.day.toString() + ", " + dateTime.year.toString(); + else + return ""; + } + + /// get data formatted like Apr 26,2020 + /// [dateTime] convert DateTime to data formatted Arabic + static String getMonthDayYearDateFormattedAr(DateTime dateTime) { + if (dateTime != null) + return getMonthArabic(dateTime.month) + " " + dateTime.day.toString() + ", " + dateTime.year.toString(); + else + return ""; + } + + /// get data formatted like Thursday, Apr 26,2020 + /// [dateTime] convert DateTime to date formatted + static String getWeekDayMonthDayYearDateFormatted(DateTime dateTime, String lang) { + if (dateTime != null) + return lang == 'en' + ? getWeekDayEnglish(dateTime.weekday) + ", " + getMonth(dateTime.month) + " " + dateTime.day.toString() + " " + dateTime.year.toString() + : getWeekDayArabic(dateTime.weekday) + ", " + dateTime.day.toString() + " " + getMonthArabic(dateTime.month) + " " + dateTime.year.toString(); + else + return ""; + } + + static String getMonthDayYearLangDateFormatted(DateTime dateTime, String lang) { + if (dateTime != null) + return lang == 'en' + ? getMonth(dateTime.month) + " " + dateTime.day.toString() + " " + dateTime.year.toString() + : dateTime.day.toString() + " " + getMonthArabic(dateTime.month) + " " + dateTime.year.toString(); + else + return ""; + } + + /// get data formatted like 26/4/2020 + static String getDayMonthYearLangDateFormatted(DateTime dateTime, String lang) { + if (dateTime != null) + return lang == 'en' + ? dateTime.day.toString() + " " + getMonth(dateTime.month) + " " + dateTime.year.toString() + : dateTime.day.toString() + " " + getMonthArabic(dateTime.month) + " " + dateTime.year.toString(); + else + return ""; + } + + static String getMonthYearLangDateFormatted(DateTime dateTime, String lang) { + if (dateTime != null) + return lang == 'en' ? getMonth(dateTime.month) + " " + dateTime.year.toString() : getMonthArabic(dateTime.month) + " " + dateTime.year.toString(); + else + return ""; + } + + /// get data formatted like 26/4/2020 + /// [dateTime] convert DateTime to data formatted + static String getDayMonthYearDateFormatted(DateTime dateTime) { + if (dateTime != null) + return dateTime.day.toString() + "/" + dateTime.month.toString() + "/" + dateTime.year.toString(); + else + return ""; + } + + /// get data formatted like 26/4/2020 + /// [dateTime] convert DateTime to data formatted + static String getDayMonthDateFormatted(DateTime dateTime) { + if (dateTime != null) + return DateFormat('dd/MM').format(dateTime); + else + return ""; + } + + /// get data formatted like 26/4/2020 + /// [dateTime] convert DateTime to data formatted according to language + static String getDayMonthYearDateFormattedLang(DateTime dateTime, bool isArabic) { + if (dateTime != null) + return DateFormat('dd/MM/yyyy', isArabic ? "ar_SA" : "en_US").format(dateTime); + else + return ""; + } + + /// get data formatted like 10:30 according to lang + static String formatDateToTimeLang(DateTime date, bool isArabic) { + return DateFormat('HH:mm', isArabic ? "ar_SA" : "en_US").format(date); + } + + /// get data formatted like 26/4/2020 10:30 + /// [dateTime] convert DateTime to data formatted + static String getDayMonthYearHourMinuteDateFormatted(DateTime dateTime) { + if (dateTime != null) + return dateTime.day.toString() + "/" + dateTime.month.toString() + "/" + dateTime.year.toString() + " " + DateFormat('HH:mm').format(dateTime); + else + return ""; + } + + /// get data formatted like 2020-8-13 09:43:00 + /// [dateTime] convert DateTime to data formatted + static String getYearMonthDayHourMinSecDateFormatted(DateTime dateTime) { + if (dateTime != null) + return dateTime.year.toString() + + "-" + + dateTime.month.toString() + + "-" + + dateTime.day.toString() + + " " + + dateTime.hour.toString() + + ":" + + dateTime.minute.toString() + + ":" + + dateTime.second.toString(); + else + return ""; + } + + static String getFormattedDate(DateTime dateTime, String formattedString) { + return DateFormat(formattedString).format(dateTime); + } + + static convertISODateToJsonDate(String isoDate) { + return "/Date(" + DateFormat('mm-dd-yyy').parse(isoDate).millisecondsSinceEpoch.toString() + ")/"; + } + + static String getDay(DayOfWeek dayOfWeek) { + switch (dayOfWeek) { + case DayOfWeek.Monday: + return "Monday"; + break; + case DayOfWeek.Tuesday: + return "Tuesday"; + break; + case DayOfWeek.Wednesday: + return "Wednesday"; + break; + case DayOfWeek.Thursday: + return "Thursday"; + break; + case DayOfWeek.Friday: + return "Friday"; + break; + case DayOfWeek.Saturday: + return "Saturday"; + break; + case DayOfWeek.Sunday: + return "Sunday"; + break; + } + return ""; + } +} diff --git a/lib/uitl/gif_loader_dialog_utils.dart b/lib/uitl/gif_loader_dialog_utils.dart new file mode 100644 index 00000000..59fed780 --- /dev/null +++ b/lib/uitl/gif_loader_dialog_utils.dart @@ -0,0 +1,47 @@ +import 'package:flutter/material.dart'; + +import '../widgets/Loader/gif_loader_container.dart'; + +class GifLoaderDialogUtils { + static bool _isLoadingVisible = false; + + static bool get isLoading => _isLoadingVisible; + + static showMyDialog(BuildContext context, {bool barrierDismissible = true}) { + // showDialog(context: context, builder: (cxt) => GifLoaderContainer()); + WidgetsBinding.instance.addPostFrameCallback((_) { + _isLoadingVisible = true; + showDialog( + barrierDismissible: barrierDismissible, + context: context, + barrierColor: Colors.black.withOpacity(0.5), + useRootNavigator: false, + builder: (BuildContext context) => GifLoaderContainer( + barrierDismissible: barrierDismissible, + ), + ).then((value) { + _isLoadingVisible = false; + }); + }); + } + + static hideDialog(BuildContext context) { + try { + + if (_isLoadingVisible) { + _isLoadingVisible = false; + Navigator.of(context).pop(); + } + _isLoadingVisible = false; + // Navigator.of(context, rootNavigator: true).canPop(); + } catch (error) { + //Future.delayed(Duration(milliseconds: 250)).then((value) => Navigator.of(context, rootNavigator: true).canPop()); + // Future.delayed(Duration(milliseconds: 250)).then((value) => Navigator.of(context, rootNavigator: true).canPop()); + if (_isLoadingVisible) { + _isLoadingVisible = false; + Navigator.of(context).pop(); + } + _isLoadingVisible = false; + } + } +} \ No newline at end of file diff --git a/lib/uitl/laser_body_parts_data.dart b/lib/uitl/laser_body_parts_data.dart new file mode 100644 index 00000000..366201a0 --- /dev/null +++ b/lib/uitl/laser_body_parts_data.dart @@ -0,0 +1,136 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_svg/svg.dart'; + +class LaserBodyParts { + static final LaserBodyParts _instance = LaserBodyParts._internal(); + + LaserBodyParts._internal(); + + factory LaserBodyParts() => _instance; + + static Widget image(String assetUri) { + return new SvgPicture.asset(assetUri, fit: BoxFit.cover, width: 88, height: 88); + } + + static Widget imagePng(String assetUri) { + return Image.asset(assetUri, fit: BoxFit.cover, width: 88, height: 88); + } + + Map maleBodyMap = { + "1": imagePng("assets/images/new/body_parts/male/full_body_male.png"), + "40": imagePng("assets/images/new/body_parts/male/upper_arm.png"), + "41": imagePng("assets/images/new/body_parts/male/lower_arm.png"), + "42": imagePng("assets/images/new/body_parts/male/chest.png"), + "43": imagePng("assets/images/new/body_parts/male/chest_line.png"), + "44": imagePng("assets/images/new/body_parts/male/shoulders.png"), + "45": imagePng("assets/images/new/body_parts/male/back.png"), + "46": imagePng("assets/images/new/body_parts/male/abdomin.png"), + "47": imagePng("assets/images/new/body_parts/male/upper_legs.png"), + "48": imagePng("assets/images/new/body_parts/male/lower_legs.png"), + "49": imagePng("assets/images/new/body_parts/male/axilla.png") + }; + + Map maleFaceMap = { + "62": image("assets/images/new/body_parts/male/hydra_facial.svg"), + "5": image("assets/images/new/body_parts/male/upper_lips.svg"), + "6": image("assets/images/new/body_parts/male/chin.svg"), + "7": image("assets/images/new/body_parts/male/cheek.svg"), + "8": image("assets/images/new/body_parts/male/side_burn.svg"), + "9": image("assets/images/new/body_parts/male/ears.svg"), + "10": image("assets/images/new/body_parts/male/full_neck.svg"), + "11": image("assets/images/new/body_parts/male/half_neck.svg"), + "12": image("assets/images/new/body_parts/male/eyebrows.svg") + }; + + Map maleBodyRetouchMap = { + "50": imagePng("assets/images/new/body_parts/male/full_body_male.png"), + "51": imagePng("assets/images/new/body_parts/male/upper_arm.png"), + "52": imagePng("assets/images/new/body_parts/male/lower_arm.png"), + "53": imagePng("assets/images/new/body_parts/male/chest.png"), + "54": imagePng("assets/images/new/body_parts/male/shoulders.png"), + "55": imagePng("assets/images/new/body_parts/male/back.png"), + "56": imagePng("assets/images/new/body_parts/male/abdomin.png"), + "57": imagePng("assets/images/new/body_parts/male/full_legs.png"), + "58": imagePng("assets/images/new/body_parts/male/upper_legs.png"), + "59": imagePng("assets/images/new/body_parts/male/lower_legs.png"), + "60": imagePng("assets/images/new/body_parts/male/bikini.png"), + "61": imagePng("assets/images/new/body_parts/male/bikini_line.png") + }; + + Map femaleBodyMap = { + "1": imagePng("assets/images/new/body_parts/female/full_body_female.png"), + "40": imagePng("assets/images/new/body_parts/female/upper_arm.png"), + "41": imagePng("assets/images/new/body_parts/female/lower_arm.png"), + "42": imagePng("assets/images/new/body_parts/female/chest.png"), + "43": imagePng("assets/images/new/body_parts/female/chest_line.png"), + "44": imagePng("assets/images/new/body_parts/female/shoulders.png"), + "45": imagePng("assets/images/new/body_parts/female/back.png"), + "46": imagePng("assets/images/new/body_parts/female/abdomin.png"), + "47": imagePng("assets/images/new/body_parts/female/upper_legs.png"), + "48": imagePng("assets/images/new/body_parts/female/lower_leg.png"), + "49": imagePng("assets/images/new/body_parts/female/axilla.png") + }; + + Map femaleFaceMap = { + "62": image("assets/images/new/body_parts/female/hydra_facial.svg"), + "5": image("assets/images/new/body_parts/female/upper_lips.svg"), + "6": image("assets/images/new/body_parts/female/chin.svg"), + "7": image("assets/images/new/body_parts/female/cheeks.svg"), + "8": image("assets/images/new/body_parts/female/side_burn.svg"), + "9": image("assets/images/new/body_parts/female/ears.svg"), + "10": image("assets/images/new/body_parts/female/full_neck.svg"), + "11": image("assets/images/new/body_parts/female/half_neck.svg"), + "12": image("assets/images/new/body_parts/female/eyebrows.svg") + }; + + Map femaleBodyBikiniMap = { + "34": imagePng("assets/images/new/body_parts/female/bikini.png"), + "36": imagePng("assets/images/new/body_parts/female/bikini_line.png"), + "38": imagePng("assets/images/new/body_parts/female/buttocks.png"), + "39": imagePng("assets/images/new/body_parts/female/anal.png") + }; + + Map femaleBodyRetouchMap = { + "50": imagePng("assets/images/new/body_parts/female/full_body_female.png"), + "51": imagePng("assets/images/new/body_parts/female/upper_arm.png"), + "52": imagePng("assets/images/new/body_parts/female/lower_arm.png"), + "53": imagePng("assets/images/new/body_parts/female/chest.png"), + "54": imagePng("assets/images/new/body_parts/female/shoulders.png"), + "55": imagePng("assets/images/new/body_parts/female/back.png"), + "56": imagePng("assets/images/new/body_parts/female/abdomin.png"), + "57": imagePng("assets/images/new/body_parts/female/full_legs.png"), + "58": imagePng("assets/images/new/body_parts/female/upper_legs.png"), + "59": imagePng("assets/images/new/body_parts/female/lower_leg.png"), + "60": imagePng("assets/images/new/body_parts/female/bikini.png"), + "61": imagePng("assets/images/new/body_parts/female/bikini_line.png") + }; + + Widget? getCategoryImage(bool isMale, int category, String mappingCode) { + if (isMale) { + if (category == 1) { + return maleBodyMap![mappingCode]!; + } + if (category == 2) { + return maleFaceMap![mappingCode]!; + } + if (category == 11) { + return maleBodyRetouchMap![mappingCode]!; + } + } else { + if (category == 1) { + return femaleBodyMap![mappingCode]!; + } + if (category == 2) { + return femaleFaceMap![mappingCode]!; + } + if (category == 10) { + return femaleBodyBikiniMap![mappingCode]!; + } + if (category == 11) { + return femaleBodyRetouchMap![mappingCode]!; + } + } + return null; + } +} diff --git a/lib/uitl/location_util.dart b/lib/uitl/location_util.dart new file mode 100644 index 00000000..6c170710 --- /dev/null +++ b/lib/uitl/location_util.dart @@ -0,0 +1,256 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:geolocator/geolocator.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:huawei_location/huawei_location.dart'; +import 'package:permission_handler/permission_handler.dart'; +import 'package:provider/provider.dart'; + +class LocationUtils { + AppSharedPreferences sharedPref = new AppSharedPreferences(); + + bool isShowConfirmDialog; + bool isShowLocationTimeoutDialog; + BuildContext context; + bool isHuawei; + final GeolocatorPlatform _geolocatorPlatform = GeolocatorPlatform.instance; + + LocationUtils({required this.isShowConfirmDialog, required this.context, this.isHuawei = false, this.isShowLocationTimeoutDialog = true}); + + void getCurrentLocation({Function(LatLng)? callBack}) async { + if (Platform.isAndroid && isHuawei) { + _getHMSCurrentLocation(callBack!); + } else { + Geolocator.isLocationServiceEnabled().then((value) async { + if (value) { + await Geolocator.checkPermission().then((permission) async { + if (permission == LocationPermission.always || permission == LocationPermission.whileInUse) { + Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 5)).then((value) { + setLocation(value); + if (callBack != null) callBack(LatLng(value.latitude, value.longitude)); + }).catchError((err) { + print(err); + if (isShowConfirmDialog && isShowLocationTimeoutDialog) { + showLocationTimeOutDialog(failureCallBack: () { + Geolocator.openAppSettings(); + }); + } + }); + } + + if (permission == LocationPermission.denied || permission == LocationPermission.deniedForever) { + if (Platform.isAndroid) { + Utils.showPermissionConsentDialog(context, TranslationBase.of(context).locationPermissionDialog, () async { + final hasPermission = await _handlePermission(); + if (hasPermission) { + Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.medium, timeLimit: Duration(seconds: 10)).then((value) { + setLocation(value); + if (callBack != null) callBack(LatLng(value.latitude, value.longitude)); + }); + } else { + if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: () {}); + } + }); + } else { + if (await Permission.location.request().isGranted) { + getCurrentLocation(callBack: callBack); + } else { + setZeroLocation(); + if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: () {}); + } + } + } + }).catchError((err) { + print(err); + }); + } else { + if (isShowConfirmDialog) showErrorLocationDialog(false, failureCallBack: () {}); + } + }).catchError((err) { + print(err); + }); + } + } + + Future checkIfGPSIsEnabled() async { + if (Platform.isAndroid && isHuawei) { + FusedLocationProviderClient locationService = + FusedLocationProviderClient(); + LocationRequest locationRequest = LocationRequest(); + locationRequest.priority = LocationRequest.PRIORITY_HIGH_ACCURACY; + locationRequest.interval = 1000; + List locationRequestList = [ + locationRequest + ]; + LocationSettingsRequest locationSettingsRequest = + LocationSettingsRequest(requests: locationRequestList); + bool success = false; + locationService + .checkLocationSettings(locationSettingsRequest) + .then((settings) { + success = true; + }); + return success; + } + return await Geolocator.isLocationServiceEnabled(); + } + + Future _handlePermission() async { + bool serviceEnabled; + LocationPermission permission; + + serviceEnabled = await _geolocatorPlatform.isLocationServiceEnabled(); + if (!serviceEnabled) { + return false; + } + + permission = await _geolocatorPlatform.checkPermission(); + if (permission == LocationPermission.denied) { + permission = await _geolocatorPlatform.requestPermission(); + if (permission == LocationPermission.denied) { + return false; + } + } + + if (permission == LocationPermission.deniedForever) { + return false; + } + return true; + } + + late LocationCallback _locationCallback; + + _getHMSCurrentLocation(Function(LatLng) callBack) async { + PermissionStatus permissionHandler = await Permission.location.request(); + + // print(statuses[Permission.location]); + + int _locationUpdateCbId = 0; + doIt() { + FusedLocationProviderClient locationService = FusedLocationProviderClient(); + LocationRequest locationRequest = LocationRequest(); + locationRequest.priority = LocationRequest.PRIORITY_HIGH_ACCURACY; + locationRequest.interval = 1000; + List locationRequestList = [locationRequest]; + LocationSettingsRequest locationSettingsRequest = LocationSettingsRequest(requests: locationRequestList); + + locationService.checkLocationSettings(locationSettingsRequest).then((settings) async { + _locationUpdateCbId = await locationService.requestLocationUpdatesCb( + locationRequest, + LocationCallback(onLocationResult: (locationResult) { + Location location = locationResult.lastLocation!; + locationService.removeLocationUpdatesCb(_locationUpdateCbId); + callBack(LatLng(location.latitude!, location.longitude!)); + setLocation( + Position( + latitude: location.latitude!, + longitude: location.longitude!, + altitude: location.altitude!, + timestamp: DateTime.now(), + accuracy: 1.0, + heading: 0.0, + speed: 0.0, + speedAccuracy: 1, + altitudeAccuracy: 0.0, + headingAccuracy: 0.0, + // altitudeAccuracy: 0.0, + // headingAccuracy: 0.0, + // altitudeAccuracy: 0, + // headingAccuracy: 0, + // Added by Aamir + ), + ); + }, onLocationAvailability: (locationAvailability) { + print("onLocationAvailability: $locationAvailability"); + })); + }).catchError((error) { + if (error.code == "LOCATION_SETTINGS_NOT_AVAILABLE") { + // Location service not enabled. + } + }); + } + + if (await permissionHandler.isGranted) { + doIt(); + } else { + bool has = await requestPermissions(); + if (has) + doIt(); + else if (isShowConfirmDialog) showErrorLocationDialog(false); + } + } + + showLocationTimeOutDialog({Function()? failureCallBack}) { + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).locationTimeoutError, + okText: TranslationBase.of(context).ok, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () { + ConfirmDialog.closeAlertDialog(context); + Navigator.of(context).canPop(); + if (failureCallBack != null) { + failureCallBack(); + } + }, + cancelFunction: () { + if (failureCallBack != null) { + failureCallBack(); + } + }); + return dialog.showAlertDialog(context); + } + + showErrorLocationDialog(bool isPermissionError, {Function()? failureCallBack}) { + setLocation(null); + ConfirmDialog dialog = new ConfirmDialog( + context: context, + confirmMessage: TranslationBase.of(context).locationDialogMessage, + okText: TranslationBase.of(context).confirm, + cancelText: TranslationBase.of(context).cancel_nocaps, + okFunction: () { + ConfirmDialog.closeAlertDialog(context); + if (isPermissionError) + Geolocator.openAppSettings(); + else + Geolocator.openLocationSettings(); + Navigator.of(context).canPop(); + if (failureCallBack != null) { + failureCallBack(); + } + }, + cancelFunction: () { + if (failureCallBack != null) { + failureCallBack(); + } + }); + return dialog.showAlertDialog(context); + } + + void setLocation(Position? position) { + this.sharedPref.setDouble(USER_LAT, position?.latitude ?? 0.0); + this.sharedPref.setDouble(USER_LONG, position?.longitude ?? 0.0); + ProjectViewModel projectViewModel = Provider.of(context, listen: false); + projectViewModel.setLatitudeLongitude( + position?.latitude ?? 0.0, position?.longitude ?? 0.0); + } + + void setZeroLocation() { + this.sharedPref.setDouble(USER_LAT, 0.0); + this.sharedPref.setDouble(USER_LONG, 0.0); + } + + Future requestPermissions() async { + var result = await [ + Permission.location, + ].request(); + return (result[Permission.location]!.isGranted || result[Permission.locationAlways]!.isGranted); + } +} diff --git a/lib/uitl/navigation_service.dart b/lib/uitl/navigation_service.dart new file mode 100644 index 00000000..c48f8a79 --- /dev/null +++ b/lib/uitl/navigation_service.dart @@ -0,0 +1,30 @@ +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:flutter/material.dart'; + +MaterialPageRoute _pageRoute(Widget page) => MaterialPageRoute(builder: (BuildContext context) => page); + +class NavigationService { + final GlobalKey navigatorKey = + new GlobalKey(); + + + static Future navigateTo(String routeName) { + final key = locator().navigatorKey; + return key.currentState!.pushNamed(routeName); + } + + static Future navigateToPage(Widget page) { + final key = locator().navigatorKey; + final pageRoute = MaterialPageRoute(builder: (context) => page); + return Navigator.push(key.currentContext!, pageRoute); + } +} + +class Navigate{ + static to({required Widget page}){ + final context = locator().navigatorKey.currentContext; + Navigator.of(context!).push(_pageRoute(page)); + } +} + +BuildContext? get currentContext => locator().navigatorKey.currentContext; diff --git a/lib/uitl/penguin_method_channel.dart b/lib/uitl/penguin_method_channel.dart new file mode 100644 index 00000000..50a642a7 --- /dev/null +++ b/lib/uitl/penguin_method_channel.dart @@ -0,0 +1,105 @@ +import 'package:flutter/services.dart'; + +class PenguinMethodChannel { + static const MethodChannel _channel = MethodChannel('launch_penguin_ui'); + + Future loadGif() async { + return await rootBundle.load("assets/images/progress-loading-red-crop-1.gif").then((data) => data.buffer.asUint8List()); + } + + Future launch(String storyboardName, String languageCode, String username, {NavigationClinicDetails? details}) async { + Uint8List image = await loadGif(); + try { + await _channel.invokeMethod('launchPenguin', { + "storyboardName": storyboardName, + "baseURL": "https://prod.hmg.nav.penguinin.com", + // "dataURL": "https://hmg.nav.penguinin.com", + // "positionURL": "https://hmg.nav.penguinin.com", + // "dataURL": "https://hmg-v33.local.penguinin.com", + // "positionURL": "https://hmg-v33.local.penguinin.com", + "dataURL": "https://prod.hmg.nav.penguinin.com", + "positionURL": "https://prod.hmg.nav.penguinin.com", + "dataServiceName": "api", + "positionServiceName": "pe", + "clientID": "HMG", + // "username": "Haroon", + "username": username, + "isSimulationModeEnabled": false, + "isShowUserName": false, + "isUpdateUserLocationSmoothly": true, + "isEnableReportIssue": true, + "languageCode": languageCode, + "clientKey": "UGVuZ3VpbklOX1Blbk5hdl9QSUY=", + "mapBoxKey": "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg", + "clinicID": details?.clinicId ?? "", + // "clinicID": "108", // 46 ,49, 133 + "patientID": details?.patientId ?? "", + "projectID": details?.projectId ?? "", + "loaderImage": image, + }); + } on PlatformException catch (e) { + print("Failed to launch PenguinIn: '${e.message}'."); + } + } + + void setMethodCallHandler(){ + _channel.setMethodCallHandler((MethodCall call) async { + try { + + print(call.method); + + switch (call.method) { + + case PenguinMethodNames.onPenNavInitializationError: + _handleInitializationError(call.arguments); // Handle onPenNavInitializationError errors. + break; + case PenguinMethodNames.onPenNavUIDismiss: + //todo handle pen dismissable + // _handlePenNavUIDismiss(); // Handle UI dismissal event. + break; + case PenguinMethodNames.onReportIssue: + // Handle the report issue event. + _handleInitializationError(call.arguments); + break; + default: + _handleUnknownMethod(call.method); // Handle unknown method calls. + } + } catch (e) { + print("Error handling method call '${call.method}': $e"); + // Optionally, log this error to an external service + } + }); + } + static void _handleUnknownMethod(String method) { + print("Unknown method: $method"); + // Optionally, handle this unknown method case, such as reporting or ignoring it + } + + + static void _handleInitializationError(Map error) { + final type = error['type'] as String?; + final description = error['description'] as String?; + print("Initialization Error: ${type ?? 'Unknown Type'}, ${description ?? 'No Description'}"); + + } + +} +// Define constants for method names +class PenguinMethodNames { + static const String showPenguinUI = 'showPenguinUI'; + static const String openSharedLocation = 'openSharedLocation'; + + // ---- Handler Method + static const String onPenNavSuccess = 'onPenNavSuccess'; // Tested Android,iOS + static const String onPenNavInitializationError = 'onPenNavInitializationError'; // Tested Android,iOS + static const String onPenNavUIDismiss = 'onPenNavUIDismiss'; //Tested Android,iOS + static const String onReportIssue = 'onReportIssue'; // Tested Android,iOS + static const String onLocationOffCampus = 'onLocationOffCampus'; // Tested iOS,Android + static const String navigateToPOI = 'navigateToPOI'; // Tested Android,iOS +} + +class NavigationClinicDetails { + String? clinicId; + String? patientId; + String? projectId; +} diff --git a/lib/uitl/push-notification-handler.dart b/lib/uitl/push-notification-handler.dart new file mode 100644 index 00000000..c6ae36d3 --- /dev/null +++ b/lib/uitl/push-notification-handler.dart @@ -0,0 +1,467 @@ +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_response_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart'; +import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notification_details_page.dart'; +import 'package:diplomaticquarterapp/pages/conference/zoom/call_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart'; +import 'package:diplomaticquarterapp/pages/webRTC/OpenTok/OpenTok.dart'; +import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; +import 'package:diplomaticquarterapp/uitl/app-permissions.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/penguin_method_channel.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:firebase_messaging/firebase_messaging.dart'; +import 'package:firebase_messaging/firebase_messaging.dart' as fir; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; + +// import 'package:flutter_ios_voip_kit/call_state_type.dart'; +// import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart'; +import 'package:flutter_local_notifications/flutter_local_notifications.dart'; +import 'package:get_it/get_it.dart'; +import 'package:huawei_hmsavailability/huawei_hmsavailability.dart'; +import 'package:huawei_push/huawei_push.dart' as h_push; +import 'package:permission_handler/permission_handler.dart'; + +import 'app_shared_preferences.dart'; +import 'navigation_service.dart'; + +// |--> Push Notification Background +@pragma('vm:entry-point') +Future backgroundMessageHandler(dynamic message) async { + print("Firebase backgroundMessageHandler!!!"); + fir.RemoteMessage message_; + if (message is h_push.RemoteMessage) { + // if huawei remote message convert it to Firebase Remote Message + message_ = toFirebaseRemoteMessage(message); + h_push.Push.localNotification({h_push.HMSLocalNotificationAttr.TITLE: 'Background Message', h_push.HMSLocalNotificationAttr.MESSAGE: "By: BackgroundMessageHandler"}); + } + + if (message.data != null && (message.data['is_call'] == 'true' || message.data['is_call'] == true)) { + // showCallkitIncoming(message); + _incomingCall(message.data); + return; + } else { + GetNotificationsResponseModel notification = new GetNotificationsResponseModel(); + + notification.createdOn = DateUtil.convertDateToString(DateTime.now()); + notification.messageTypeData = message.data['picture']; + notification.message = message.data['message']; + await NavigationService.navigateToPage(NotificationsDetailsPage( + notification: notification, + )); + } +} + +// Push Notification Background <--| + +RemoteMessage toFirebaseRemoteMessage(h_push.RemoteMessage message) { + final payload_data = jsonDecode(message.data!); + final fire_message = RemoteMessage( + from: message.from, + collapseKey: message.collapseKey, + data: payload_data['data'], + messageId: message.messageId, + sentTime: DateTime.fromMillisecondsSinceEpoch(message.sentTime! * 1000), + ttl: message.ttl, + category: null, + messageType: message.type, + notification: RemoteNotification( + title: message.notification!.title!, + titleLocArgs: (message.notification!.titleLocalizationArgs! ?? []).map((e) => e.toString()).toList(), + titleLocKey: message.notification!.titleLocalizationKey!, + body: message.notification!.body!, + bodyLocArgs: (message.notification!.bodyLocalizationArgs ?? []).map((e) => e.toString()).toList(), + bodyLocKey: message.notification!.bodyLocalizationKey, + android: AndroidNotification( + channelId: message.notification!.channelId, + clickAction: message.notification!.clickAction, + color: message.notification!.color, + count: null, + imageUrl: message.notification!.imageUrl!.path, + link: message.notification!.link!.path, + smallIcon: message.notification!.icon, + sound: message.notification!.sound, + ticker: message.notification!.ticker, + tag: message.notification!.tag, + ), + )); + return fire_message; +} + +// callPage(String sessionID, String token, String isWebrtc, String callerIdString) async { +callPage(String sessionID, String token) async { + // if (isWebrtc == "true"){ + // String caller = callerIdString.split("*")[3]; + // String receiver = callerIdString.split("*")[4]; + // String host = callerIdString.split("*")[5]; + // return StartVideoCall(caller: caller, receiver: receiver, iAmCaller: false, host: host); + // }else{ + await NavigationService.navigateToPage(OpenTokConnectCallPage(apiKey: OPENTOK_API_KEY, sessionId: sessionID, token: token)); + // } +} + +// Future showCallkitIncoming(Map message) async { +// // if (message['type'] == 'ReservationCallStart') { +// var params = CallKitParams( +// id: DateTime.now().millisecondsSinceEpoch.toString(), +// nameCaller: 'Dr Sulaiman Al Habib', +// appName: 'Dr Sulaiman Al Habib', +// avatar: 'https://play-lh.googleusercontent.com/FBNNpxb7m6eM6wtW7MV1Ffp6OXOGLI38q47zcvP29OCYA1yhYH5mZzl5itZi0TgOyZpG', +// handle: 'LiveCare Call', +// type: 1, +// duration: 60000, +// textAccept: 'Accept', +// textDecline: 'Decline', +// textMissedCall: 'Missed call', +// textCallback: 'Call back', +// extra: { +// // 'reservationID': message['id'], +// 'userId': '1a2b3c4d' +// }, +// headers: {'apiKey': 'Abc@123!', 'platform': 'flutter'}, +// android: AndroidParams( +// isCustomNotification: true, +// isShowLogo: false, +// isShowCallback: false, +// ringtonePath: 'system_ringtone_default', +// backgroundColor: '#424242FF', +// // 'backgroundUrl': 'https://i.pravatar.cc/500', +// actionColor: '#4CAF50', +// incomingCallNotificationChannelName: "Incoming Call", +// missedCallNotificationChannelName: "Missed Call", +// ), +// ios: IOSParams( +// iconName: 'CallKitLogo', +// handleType: '', +// supportsVideo: true, +// maximumCallGroups: 2, +// maximumCallsPerCallGroup: 1, +// audioSessionMode: 'default', +// audioSessionActive: true, +// audioSessionPreferredSampleRate: 44100.0, +// audioSessionPreferredIOBufferDuration: 0.005, +// supportsDTMF: true, +// supportsHolding: true, +// supportsGrouping: false, +// supportsUngrouping: false, +// ringtonePath: 'system_ringtone_default')); +// await FlutterCallkitIncoming.showCallkitIncoming(params); +// // } else if (message['type'] == 'ReservationCallFinished') { +// // await FlutterCallkitIncoming.endAllCalls(); +// // } +// } + +_incomingCall(Map data) async { + LandingPage.incomingCallData = IncomingCallData.fromJson(data); + if (LandingPage.isOpenCallPage == false) { + LandingPage.isOpenCallPage = true; + final bool permited = await AppPermission.askVideoCallPermission(currentContext!); + if (permited) + await NavigationService.navigateToPage( + IncomingCall(incomingCallData: LandingPage.incomingCallData), + ); + + LandingPage.isOpenCallPage = false; + } + await Future.delayed(Duration(milliseconds: 500)); + await AppSharedPreferences().remove('call_data'); +} + +class PushNotificationHandler { + late BuildContext context; + static final PushNotificationHandler _instance = PushNotificationHandler._internal(); + + late HmsApiAvailability hmsApiAvailability; + + // final voIPKit = FlutterIOSVoIPKit.instance; + + late Timer timeOutTimer; + bool isTalking = false; + + var data = { + "AppointmentNo": "2016059247", + "ProjectID": "15", + "NotificationType": "10", + "background": "0", + "doctorname": "Call from postman", + "clinicname": "LIVECARE FAMILY MEDICINE AND GP", + "speciality": "General Practioner", + "appointmentdate": "2022-01-19", + "appointmenttime": "12:10", + "PatientName": "Testing", + "session_id": "1_MX40NjIwOTk2Mn5-MTY1NDE2NDQxMjc2Mn5xc3NCZkNIejJOdzgzTkg2TmlXblhQdnl-fg", + "token": + "T1==cGFydG5lcl9pZD00NjIwOTk2MiZzaWc9MTliNTA3NDAxYmU0MjI5OGY5NTcxZTdhNzQyMTcyZjRjMjBhNjljZTpzZXNzaW9uX2lkPTFfTVg0ME5qSXdPVGsyTW41LU1UWTFOREUyTkRReE1qYzJNbjV4YzNOQ1prTkllakpPZHpnelRrZzJUbWxYYmxoUWRubC1mZyZjcmVhdGVfdGltZT0xNjU0MTY0NDEzJm5vbmNlPTAuNjM3ODkzNDk4NDQ2NTIxOSZyb2xlPW1vZGVyYXRvciZleHBpcmVfdGltZT0xNjU0MjUwODEzJmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9", + "DoctorImageURL": "https://image.shutterstock.com/image-vector/sample-stamp-square-grunge-sign-260nw-1474408826.jpg", + "callerID": "9920", + "PatientID": "1231755", + "is_call": "true" + }; + + PushNotificationHandler._internal(); + + factory PushNotificationHandler() => _instance; + + static PushNotificationHandler getInstance() => _instance; + + // void _timeOut({ + // int seconds = 30, + // }) async { + // timeOutTimer = Timer(Duration(seconds: seconds), () async { + // print('🎈 example: timeOut'); + // final incomingCallerName = await voIPKit.getIncomingCallerName(); + // voIPKit.unansweredIncomingCall( + // skipLocalNotification: false, + // missedCallTitle: '📞 Missed call', + // missedCallBody: 'There was a call from $incomingCallerName', + // ); + // }); + // } + + init(BuildContext context) async { + this.context = context; + + if (Platform.isIOS) { + // voIPKit.getVoIPToken().then((value) { + // print("APNS VOIP KIT TOKEN: $value"); + // AppSharedPreferences().setString(APNS_TOKEN, value!); + // }); + // + // voIPKit.onDidUpdatePushToken = (String token) { + // print('🎈 example: onDidUpdatePushToken: $token'); + // }; + // + // voIPKit.onDidReceiveIncomingPush = ( + // Map payload, + // ) async { + // print('🎈 example: onDidReceiveIncomingPush $payload'); + // _timeOut(); + // }; + // + // voIPKit.onDidRejectIncomingCall = ( + // String uuid, + // String callerId, + // ) async { + // try { + // print('🎈 example: onDidRejectIncomingCall $uuid - $callerId'); + // timeOutTimer.cancel(); + // } catch (err) {} + // }; + // + // voIPKit.onDidAcceptIncomingCall = ( + // String uuid, + // String callerId, + // ) async { + // print('🎈 example: onDidAcceptIncomingCall $uuid - $callerId'); + // await voIPKit.acceptIncomingCall(callerState: CallStateType.calling); + // await voIPKit.callConnected(); + // await Future.delayed(Duration(seconds: 1)); + // + // Navigator.pushNamed( + // locator().navigatorKey.currentContext!, + // "zoom_call_page", + // arguments: CallArguments("hoover-dam", "123", "Patient", "40", "1", false), + // ); + // + // await voIPKit.endCall(); + // + // // Navigator.pushNamed(navigatorKey.currentContext!, VIDEO_CALL_SCREEN, + // // arguments: VideoArgus( + // // reservationId: int.parse(callerId), token: null, isVideo: true)); + // + // timeOutTimer.cancel(); + // }; + } + + if (Platform.isAndroid) { + try { + if (!(await Utils.isGoogleServicesAvailable())) { + h_push.Push.enableLogger(); + final result = await h_push.Push.setAutoInitEnabled(true); + + h_push.Push.onNotificationOpenedApp.listen((message) { + newMessage(toFirebaseRemoteMessage(message)); + }, onError: (e) => print(e.toString())); + + h_push.Push.onMessageReceivedStream.listen((message) { + newMessage(toFirebaseRemoteMessage(message)); + }, onError: (e) => print(e.toString())); + + h_push.Push.getTokenStream.listen((token) { + onToken(token); + }, onError: (e) => print(e.toString())); + h_push.Push.getToken(''); + + h_push.Push.registerBackgroundMessageHandler(backgroundMessageHandler); + } else { + final fcmToken = await FirebaseMessaging.instance.getToken(); + if (fcmToken != null) onToken(fcmToken); + } + } catch (ex) { + print("Notification Exception: " + ex.toString()); + } + } + + if (Platform.isIOS) { + await FirebaseMessaging.instance.setForegroundNotificationPresentationOptions( + alert: true, // Required to display a heads up notification + badge: true, + sound: true, + ); + final permission = await FirebaseMessaging.instance.requestPermission(); + if (permission.authorizationStatus == AuthorizationStatus.denied) return; + } else {} + + try { + FirebaseMessaging.instance.getInitialMessage().then((RemoteMessage? message) async { + if (message != null) { + if (Platform.isIOS) + await Future.delayed(Duration(milliseconds: 3000)).then((value) { + if (message != null) newMessage(message); + }); + else if (message != null) newMessage(message); + } + }); + } catch (ex) {} + + FirebaseMessaging.onMessage.listen((RemoteMessage message) async { + print("Firebase onMessage!!!"); + if (Platform.isIOS) + await Future.delayed(Duration(milliseconds: 3000)).then((value) { + newMessage(message); + }); + else + newMessage(message); + }); + + FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) async { + print("Firebase onMessageOpenedApp!!!"); + if (Platform.isIOS) + await Future.delayed(Duration(milliseconds: 3000)).then((value) { + newMessage(message); + }); + else + newMessage(message); + }); + + FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler); + + FirebaseMessaging.instance.getToken(vapidKey: 'BHRJG8sIzcysWxPw3B6xQjz_85nUuCfU6EAmpH18kyUTmB2cj35IdFwCyWSab80SA1v6oBSWVh-p6PcHPw_y00Y').then((String? token) { + print("Push Notification getToken: " + token!); + onToken(token!); + }).catchError((err) { + print(err); + }); + + FirebaseMessaging.instance.onTokenRefresh.listen((fcm_token) { + print("Push Notification onTokenRefresh: " + fcm_token); + onToken(fcm_token); + }); + + // FirebaseMessaging.instance.getToken(vapidKey: 'BHRJG8sIzcysWxPw3B6xQjz_85nUuCfU6EAmpH18kyUTmB2cj35IdFwCyWSab80SA1v6oBSWVh-p6PcHPw_y00Y').then((String? token) { + // print("Push Notification getToken: " + token!); + // onToken(token!); + // }); + // FirebaseMessaging.instance.getToken(vapidKey: 'BHRJG8sIzcysWxPw3B6xQjz_85nUuCfU6EAmpH18kyUTmB2cj35IdFwCyWSab80SA1v6oBSWVh-p6PcHPw_y00Y').then((String? token) { + // print("Push Notification getToken: " + token!); + // onToken(token!); + // }); + + // if (Platform.isIOS) { + // FirebaseMessaging.instance.getAPNSToken().then((value) { + // print("Push APNS getToken: " + value!); + // }); + // } + + FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler); + } + + newMessage(RemoteMessage remoteMessage) async { + print("Remote Message: " + remoteMessage.data.toString()); + if (remoteMessage.data.isEmpty) { + return; + } + debugPrint('the value of the remote message is ${remoteMessage.data}'); + if (remoteMessage.data['is_call'] == 'true' || remoteMessage.data['is_call'] == true) { + _incomingCall(remoteMessage.data); + // showCallkitIncoming(remoteMessage.data); + } + else if (remoteMessage.data['is_navigation'] == 'true' || remoteMessage.data['is_navigation'] == true) { + NavigationClinicDetails data = NavigationClinicDetails(); + data.clinicId = remoteMessage.data['clinic_Id']; + data.patientId = remoteMessage.data['patient_Id']; + data.projectId = remoteMessage.data['project_Id']; + initPenguinSDK(data); + } else { + GetNotificationsResponseModel notification = new GetNotificationsResponseModel(); + + notification.createdOn = DateUtil.convertDateToString(DateTime.now()); + notification.messageTypeData = remoteMessage.data['picture']; + notification.message = remoteMessage.data['message']; + notification.notificationType = remoteMessage.data["NotificationType"].toString(); + if (remoteMessage.data["NotificationType"] == "2") { + notification.videoURL = remoteMessage.data["VideoUrl"]; + } + + await NavigationService.navigateToPage(NotificationsDetailsPage( + notification: notification, + )); + } + } + + initPenguinSDK(NavigationClinicDetails data) async { + final bool permited = await AppPermission.askPenguinPermissions(); + if (!permited) { + Map statuses = await [ + Permission.location, + Permission.bluetooth, + Permission.bluetoothConnect, + Permission.bluetoothScan, + Permission.activityRecognition, + ].request().whenComplete(() { + PenguinMethodChannel().launch("penguin", "en", "1231755", details: data); + }); + } + } + + onToken(String token) async { + // print("Push Notification Token: " + token); + await AppSharedPreferences().setString(PUSH_TOKEN, token); + DEVICE_TOKEN = token; + } + + onResume() async { + var call_data = await AppSharedPreferences().getObject('call_data'); + if (call_data != null) { + _incomingCall(call_data); + } + } + + Future requestPermissions() async { + try { + if (Platform.isIOS) { + await flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation()?.requestPermissions(alert: true, badge: true, sound: true); + } else if (Platform.isAndroid) { + Map statuses = await [ + Permission.notification, + // Permission.camera, + // Permission.audio, + // Permission.microphone, + ].request(); + print("=-=-=-=-=-=-=-=-=-=-"); + print(statuses[Permission.location]); + } + } catch (_) { + debugPrint(_.toString()); + } + } +} diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart new file mode 100644 index 00000000..1f1438a8 --- /dev/null +++ b/lib/uitl/translations_delegate_base.dart @@ -0,0 +1,3498 @@ +import 'dart:async'; + +import 'package:diplomaticquarterapp/config/localized_values.dart'; +import 'package:flutter/foundation.dart' show SynchronousFuture; +import 'package:flutter/material.dart'; + +class TranslationBase { + TranslationBase(this.locale); + + final Locale locale; + + static TranslationBase of(BuildContext context) { + return Localizations.of(context, TranslationBase)!; + } + + String by(String key) { + return localizedValues[key][locale.languageCode]; + } + + String get dashboardScreenToolbarTitle => localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; + + String get bloodType1 => localizedValues['bloodType'][locale.languageCode]; + + String get settings => localizedValues['settings'][locale.languageCode]; + + String get language => localizedValues['language'][locale.languageCode]; + + String get lanEnglish => localizedValues['lanEnglish'][locale.languageCode]; + + String get lanArabic => localizedValues['lanArabic'][locale.languageCode]; + + String get cancel => localizedValues['cancel'][locale.languageCode]; + + String get done => localizedValues['done'][locale.languageCode]; + + String get home => localizedValues['home'][locale.languageCode]; + + String get services => localizedValues['services'][locale.languageCode]; + + String get mySchedule => localizedValues['mySchedule'][locale.languageCode]; + + String get replay2 => localizedValues['replay2'][locale.languageCode]; + + String get logout => localizedValues['logout'][locale.languageCode]; + + String get bookAppo => localizedValues['bookAppo'][locale.languageCode]; + + String get searchBy => localizedValues['searchBy'][locale.languageCode]; + + String get clinic => localizedValues['clinic'][locale.languageCode]; + + String get byClinic => localizedValues['by-clinic'][locale.languageCode]; + + String get byHospital => localizedValues['by-hospital'][locale.languageCode]; + + String get name => localizedValues['name'][locale.languageCode]; + + String get doctor => localizedValues['doctor'][locale.languageCode]; + + String get clinicName => localizedValues['clinicName'][locale.languageCode]; + + String get hospitalName => localizedValues['hospitalName'][locale.languageCode]; + + String get doctorName => localizedValues['doctorName'][locale.languageCode]; + + String get NoClinicFound => localizedValues['NoClinicFound'][locale.languageCode]; + + String get nearestAppo => localizedValues['nearestAppo'][locale.languageCode]; + + String get searchByDocText => localizedValues['searchByDocText'][locale.languageCode]; + + String get enterDocName => localizedValues['enterDocName'][locale.languageCode]; + + String get search => localizedValues['search'][locale.languageCode]; + + String get noResultFound => localizedValues['noResultFound'][locale.languageCode]; + + String get noSearchResultFound => localizedValues['noSearchResultFound'][locale.languageCode]; + + String get pleaseEnterProductName => localizedValues['pleaseEnterProductName'][locale.languageCode]; + + String get bookNow => localizedValues['bookNow'][locale.languageCode]; + + String get reviewAppointment => localizedValues['reviewAppointment'][locale.languageCode]; + + String get docInfo => localizedValues['docInfo'][locale.languageCode]; + + String get appoInfo => localizedValues['appoInfo'][locale.languageCode]; + + String get availableAppo => localizedValues['availableAppo'][locale.languageCode]; + + String get gender => localizedValues['gender'][locale.languageCode]; + + String get pleaseSelectGender => localizedValues['please_select_gender'][locale.languageCode]; + + String get nationality => localizedValues['nationality'][locale.languageCode]; + + String get docQualifications => localizedValues['docQualifications'][locale.languageCode]; + + String get confirmAppoHeading => localizedValues['confirmAppoHeading'][locale.languageCode]; + + String get patientInfo => localizedValues['patientInfo'][locale.languageCode]; + + String get bookSuccess => localizedValues['bookSuccess'][locale.languageCode]; + + String get patientShare => localizedValues['patientShare'][locale.languageCode]; + + String get neverWait => localizedValues['neverWait'][locale.languageCode]; + + String get patientShareWithTax => localizedValues['patientShareWithTax'][locale.languageCode]; + + String get reminderTitle => localizedValues['reminderTitle'][locale.languageCode]; + + String get confirmAppo => localizedValues['confirmAppo'][locale.languageCode]; + + String get appointmentCalendar => localizedValues['appointmentCalendar'][locale.languageCode]; + + String get appointmentReminder => localizedValues['appointmentReminder'][locale.languageCode]; + + String get prescriptionReminder => localizedValues['prescriptionReminder'][locale.languageCode]; + + String get pleaseSelectFromBelowOptions => localizedValues['please_select_from_below_options'][locale.languageCode]; + + String get appointmentSuccess => localizedValues['appointmentSuccess'][locale.languageCode]; + + String get confirm => localizedValues['confirm'][locale.languageCode]; + + String get pressAgain => localizedValues['pressAgain'][locale.languageCode]; + + String get laserMaxLimitReach => localizedValues['laserMaxLimitReach'][locale.languageCode]; + + String get confirmLiveCare => localizedValues['confirmLiveCare'][locale.languageCode]; + + String get doctorFilter => localizedValues['doctorFilter'][locale.languageCode]; + + String get waitingForDoctor => localizedValues['waitingForDoctor'][locale.languageCode]; + + String get waitingTime => localizedValues['waitingTime'][locale.languageCode]; + + String get confirmLater => localizedValues['confirmLater'][locale.languageCode]; + + String get todoList => localizedValues['todoList'][locale.languageCode]; + + String get appoActions => localizedValues['appoActions'][locale.languageCode]; + + String get appointment => localizedValues['appointment'][locale.languageCode]; + + String get hospital => localizedValues['hospital'][locale.languageCode]; + + String get date => localizedValues['date'][locale.languageCode]; + + String get time => localizedValues['time'][locale.languageCode]; + + String get login => localizedValues['login'][locale.languageCode]; + + String get loginregister => localizedValues['loginregister'][locale.languageCode]; + + String get poweredBy => localizedValues['poweredBy'][locale.languageCode]; + + String get welcome => localizedValues['welcome'][locale.languageCode]; + + String get welcomeTo => localizedValues['welcome-to'][locale.languageCode]; + + String get drSulaimanText => localizedValues['dr-sulaiman-text'][locale.languageCode]; + + String get patientApp => localizedValues['patient-app'][locale.languageCode]; + + String get welcomeText => localizedValues['welcome_text'][locale.languageCode]; + + String get welcomeText2 => localizedValues['welcome_text2'][locale.languageCode]; + + String get yes => localizedValues['yes'][locale.languageCode]; + + String get no => localizedValues['no'][locale.languageCode]; + + String get logintypeRadio => localizedValues['logintyperadio'][locale.languageCode]; + + String get registerInfoFamily => localizedValues['register-info-family'][locale.languageCode]; + + String get registerNow => localizedValues['registernow'][locale.languageCode]; + + String get nationalID => localizedValues['nationalID'][locale.languageCode]; + + String get medicalFileNumber => localizedValues['medical-file-number'][locale.languageCode]; + + String get nationalIdNumber => localizedValues['national-id-number'][locale.languageCode]; + + String get idNo => localizedValues['national-id'][locale.languageCode]; + + String get fileNo => localizedValues['fileNo'][locale.languageCode]; + + String get fileno => localizedValues['fileno'][locale.languageCode]; + + String get forgotPassword => localizedValues['forgotFileNo'][locale.languageCode]; + + String get forgotFileNoTitle => localizedValues['forgotFileNoTitle'][locale.languageCode]; + + String get enterNationalId => localizedValues['enter-national-id'][locale.languageCode]; + + String get profileInfo => localizedValues['profile-info'][locale.languageCode]; + + String get submit => localizedValues['submit'][locale.languageCode]; + + String get forgotDesc => localizedValues['forgot-desc'][locale.languageCode]; + + String get dob => localizedValues['dob'][locale.languageCode]; + + String get hijriDate => localizedValues['hijri-date'][locale.languageCode]; + + String get gregorianDate => localizedValues['gregorian-date'][locale.languageCode]; + + String get verifyLoginWith => localizedValues['verify-login-with'][locale.languageCode]; + + String get register => localizedValues['register-user'][locale.languageCode]; + + String get verifyFingerprint => localizedValues['verify-with-fingerprint'][locale.languageCode]; + + String get verifyFaceID => localizedValues['verify-with-faceid'][locale.languageCode]; + + String get verifySMS => localizedValues['verify-with-sms'][locale.languageCode]; + + String get verifyWhatsApp => localizedValues['verify-with-whatsapp'][locale.languageCode]; + + String get verifyThrough => localizedValues['verify-through'][locale.languageCode]; + + String get lastLoginAt => localizedValues['last-login'][locale.languageCode]; + + String get pleaseVerify => localizedValues['please-verify'][locale.languageCode]; + + String get lastLoginWith => localizedValues['last-login-with'][locale.languageCode]; + + String get verifyFingerprint2 => localizedValues['verify-fingerprint'][locale.languageCode]; + + String get searchMedicine => localizedValues['searchMedicine'][locale.languageCode]; + + String get searchMedicineHere => localizedValues['searchMedicineHere'][locale.languageCode]; + + String get pendingPayment => localizedValues['pendingPayment'][locale.languageCode]; + + String get payNow => localizedValues['payNow'][locale.languageCode]; + + String get dailyWater => localizedValues['dailyWater'][locale.languageCode]; + + String get viewQR => localizedValues['viewQR'][locale.languageCode]; + + String get instruction => localizedValues['instruction'][locale.languageCode]; + + String get livecare => localizedValues['livecare'][locale.languageCode]; + + String get upcomingNoAction => localizedValues['upcoming-noAction'][locale.languageCode]; + + String get upcomingConfirm => localizedValues['upcoming-confirm'][locale.languageCode]; + + String get upcomingPaymentPending => localizedValues['upcoming-payment-pending'][locale.languageCode]; + + String get upcomingConfirmMore => localizedValues['book-success-confirm-more-24-1-2'][locale.languageCode]; + + String get upcomingPaymentNow => localizedValues['upcoming-payment-now'][locale.languageCode]; + + String get upcomingQR => localizedValues['upcoming-QR'][locale.languageCode]; + + String get upcomingVirtual => localizedValues['upcoming-virtual'][locale.languageCode]; + + String get upcomingLivecare => localizedValues['upcoming-livecare'][locale.languageCode]; + + String get liveCareAppo => localizedValues['livecareAppo'][locale.languageCode]; + + String get upcomingDetails => localizedValues['upcoming-details'][locale.languageCode]; + + String get reschedule => localizedValues['reschedule'][locale.languageCode]; + + String get raise => localizedValues['raise'][locale.languageCode]; + + String get complaint => localizedValues['complaint'][locale.languageCode]; + + String get add => localizedValues['add'][locale.languageCode]; + + String get reminder => localizedValues['reminder'][locale.languageCode]; + + String get location => localizedValues['location'][locale.languageCode]; + + String get online => localizedValues['online'][locale.languageCode]; + + String get viewMedicalFile => localizedValues['viewMedicalFile'][locale.languageCode]; + + String get viewAllServices => localizedValues['viewAllServices'][locale.languageCode]; + + String get medicalFile => localizedValues['medicalFile'][locale.languageCode]; + + String get verified => localizedValues['verified'][locale.languageCode]; + + String get onlineConsulting => localizedValues['onlineConsulting'][locale.languageCode]; + + String get checkup => localizedValues['checkup'][locale.languageCode]; + + String get comprehensive => localizedValues['comprehensive'][locale.languageCode]; + + String get hhcHome => localizedValues['hhcHome'][locale.languageCode]; + + String get refferal => localizedValues['refferal'][locale.languageCode]; + + String get healthCare => localizedValues['healthCare'][locale.languageCode]; + + String get emergency => localizedValues['emergency'][locale.languageCode]; + + String get cantSeeProfile => localizedValues['cantSeeProfile'][locale.languageCode]; + + String get loginRegisterNow => localizedValues['loginRegisterNow'][locale.languageCode]; + + String get HMGPharmacy => localizedValues['HMGPharmacy'][locale.languageCode]; + + String get ecommerceSolution => localizedValues['ecommerceSolution'][locale.languageCode]; + + String get services2 => localizedValues['services2'][locale.languageCode]; + + String get payment => localizedValues['payment'][locale.languageCode]; + + String get cancel_nocaps => localizedValues['cancel-nocaps'][locale.languageCode]; + + String get cancelAppoMsg => localizedValues['cancelAppoMsg'][locale.languageCode]; + + String get pharmaciesList => localizedValues['pharmaciesList'][locale.languageCode]; + + String get description => localizedValues['description'][locale.languageCode]; + + String get howToUse => localizedValues['howToUse'][locale.languageCode]; + + String get price => localizedValues['price'][locale.languageCode]; + + String get youCanFindItIn => localizedValues['youCanFindItIn'][locale.languageCode]; + + String get pleaseEnterMedicineName => localizedValues['pleaseEnterMedicineName'][locale.languageCode]; + + String get verificationMessage => localizedValues['verification_message'][locale.languageCode]; + + String get validationMessage => localizedValues['validation_message'][locale.languageCode]; + + String get arabicChange => localizedValues['arabic-change'][locale.languageCode]; + + String get notification => localizedValues['notification'][locale.languageCode]; + + String get appsetting => localizedValues['app-settings'][locale.languageCode]; + + String get parkingDescription => localizedValues['parkingDescription'][locale.languageCode]; + + String get checkinOptions => localizedValues['checkinOption'][locale.languageCode]; + + String get wayHeading => localizedValues['RRT-way-heading'][locale.languageCode]; + + String get feedbackType => localizedValues["feedback-type"][locale.languageCode]; + + String get allow => localizedValues["allow"][locale.languageCode]; + + String get reject => localizedValues["reject"][locale.languageCode]; + + String get enterReferralRequesterName => localizedValues["enterReferralRequesterName"][locale.languageCode]; + + String get somethingWentWrong => localizedValues["somethingWentWrong"][locale.languageCode]; + + String get enterIdentificationNumber => localizedValues["enterIdentificationNumber"][locale.languageCode]; + + String get accountActivationDesc => localizedValues["accountActivationDesc"][locale.languageCode]; + + String get pointsToTransfer => localizedValues["pointsToTransfer"][locale.languageCode]; + + String get enterBeneficiaryAccountNo => localizedValues["enterBeneficiaryAccountNo"][locale.languageCode]; + + String get confirmPrescription => localizedValues["confirm-prescription"][locale.languageCode]; + + String get youAlreadyHaveOrder => localizedValues["you-already-have-order"][locale.languageCode]; + + String get orderOverview => localizedValues["order-overview"][locale.languageCode]; + + String get RapidResponseTeam => localizedValues['Rapid-Response-Team'][locale.languageCode]; + + String get RRTDDetails => localizedValues['RRTDDetails'][locale.languageCode]; + + String get ApproximateServiceFee => localizedValues['ApproximateServiceFee'][locale.languageCode]; + + String get AmountBeforeTax => localizedValues['AmountBeforeTax'][locale.languageCode]; + + String get TaxAmount => localizedValues['TaxAmount'][locale.languageCode]; + + String get TotalAmountPayable => localizedValues['TotalAmountPayable'][locale.languageCode]; + + String get iAcceptTermsConditions => localizedValues['iAcceptTermsConditions'][locale.languageCode]; + + String get YouCanPayByTheFollowingOptions => localizedValues['YouCanPayByTheFollowingOptions'][locale.languageCode]; + + String get rrtService => localizedValues['rrtService'][locale.languageCode]; + + String get rateApp => localizedValues['rate-app'][locale.languageCode]; + + String get setReminder => localizedValues['set-reminder'][locale.languageCode]; + + String get before => localizedValues['before'][locale.languageCode]; + + String get minute => localizedValues['minute'][locale.languageCode]; + + String get hour => localizedValues['hour'][locale.languageCode]; + + String get reminderSuccess => localizedValues['reminderSuccess'][locale.languageCode]; + + String get patientShareToDo => localizedValues['patientShareToDo'][locale.languageCode]; + + String get patientTaxToDo => localizedValues['patientTaxToDo'][locale.languageCode]; + + String get patientShareTotalToDo => localizedValues['patientShareTotalToDo'][locale.languageCode]; + + String get paymentMethod => localizedValues['paymentMethod'][locale.languageCode]; + + String get moreVerification => localizedValues['more-verify'][locale.languageCode]; + + String get welcomeBack => localizedValues['welcome-back'][locale.languageCode]; + + String get accountInfo => localizedValues['account-info'][locale.languageCode]; + + String get useAnotherAccount => localizedValues['another-acc'][locale.languageCode]; + + String get next => localizedValues['next'][locale.languageCode]; + + String get noNeedToWaitInLine => localizedValues['noNeedToWaitInLine'][locale.languageCode]; + + String get useQRAppoAttend => localizedValues['useQRAppoAttend'][locale.languageCode]; + + String get passQRAppoAttend => localizedValues['passQRAppoAttend'][locale.languageCode]; + + String get sitWaitingQR => localizedValues['sitWaitingQR'][locale.languageCode]; + + String get attendRegisterCode => localizedValues['attendRegisterCode'][locale.languageCode]; + + String get scanQRHospital => localizedValues['scanQRHospital'][locale.languageCode]; + + String get sendEmail => localizedValues['sendEmail'][locale.languageCode]; + + String get close => localizedValues['close'][locale.languageCode]; + + String get closeIt => localizedValues['closeIt'][locale.languageCode]; + + String get booked => localizedValues['booked'][locale.languageCode]; + + String get confirmed => localizedValues['confirmed'][locale.languageCode]; + + String get arrived => localizedValues['arrived'][locale.languageCode]; + + String get payNowBookSuccess => localizedValues['payNowBookSuccess'][locale.languageCode]; + + String get payNowBookSuccesstext1 => localizedValues['payNowBookSuccesstext1'][locale.languageCode]; + + String get payNowBookSuccesstext2 => localizedValues['payNowBookSuccesstext2'][locale.languageCode]; + + String get payLater => localizedValues['payLater'][locale.languageCode]; + + String get askDocNotAllowed => localizedValues['askDocNotAllowed'][locale.languageCode]; + + String get firstName => localizedValues['first-name'][locale.languageCode]; + + String get middleName => localizedValues['middle-name'][locale.languageCode]; + + String get lastName => localizedValues['last-name'][locale.languageCode]; + + String get male => localizedValues['male'][locale.languageCode]; + + String get female => localizedValues['female'][locale.languageCode]; + + String get prefferedLanguage => localizedValues['preferred-language'][locale.languageCode]; + + String get english => localizedValues['english'][locale.languageCode]; + + String get arabic => localizedValues['arabic'][locale.languageCode]; + + String get registrLocation => localizedValues['locations-register'][locale.languageCode]; + + String get ksa => localizedValues['ksa'][locale.languageCode]; + + String get dubai => localizedValues['dubai'][locale.languageCode]; + + String get enterEmail => localizedValues['enter-email'][locale.languageCode]; + + String get family => localizedValues['family'][locale.languageCode]; + + String get myFamilyFiles => localizedValues['family-title'][locale.languageCode]; + + String get myFamily => localizedValues['myFamily'][locale.languageCode]; + + String get oxygenation => localizedValues['oxygenation'][locale.languageCode]; + + String get respirationRate => localizedValues['respirationRate'][locale.languageCode]; + + String get bodyMeasurements => localizedValues['bodyMeasurements'][locale.languageCode]; + + String get height => localizedValues['height'][locale.languageCode]; + + String get unit => localizedValues['unit'][locale.languageCode]; + + String get heightUnit => localizedValues['heightUnit'][locale.languageCode]; + + String get weightUnit => localizedValues['weightUnit'][locale.languageCode]; + + String get temperature => localizedValues['temperature'][locale.languageCode]; + + String get pulse => localizedValues['pulse'][locale.languageCode]; + + String get respiration => localizedValues['respiration'][locale.languageCode]; + + String get bloodPressure => localizedValues['bloodPressure'][locale.languageCode]; + + String get painScale => localizedValues['painScale'][locale.languageCode]; + + String get heart => localizedValues['heart'][locale.languageCode]; + + String get weight => localizedValues['weight'][locale.languageCode]; + + String get request => localizedValues['request'][locale.languageCode]; + + String get memberName => localizedValues['member-name'][locale.languageCode]; + + String get switchUser => localizedValues['switch-login'][locale.languageCode]; + + String get removeMember => localizedValues['remove-member'][locale.languageCode]; + + String get allowView => localizedValues['allow-view'][locale.languageCode]; + + String get rejectView => localizedValues['reject-view'][locale.languageCode]; + + String get deleteView => localizedValues['delete-view'][locale.languageCode]; + + String get approvals => localizedValues['approvals'][locale.languageCode]; + + String get approvalNo => localizedValues['approvalNo'][locale.languageCode]; + + String get companyName => localizedValues['companyName'][locale.languageCode]; + + String get receiptOn => localizedValues['receiptOn'][locale.languageCode]; + + String get expiryOn => localizedValues['expiryOn'][locale.languageCode]; + + String get expiryDate => localizedValues['expiryDate'][locale.languageCode]; + + String get expiryPoints => localizedValues['expiryPoints'][locale.languageCode]; + + String get procedureName => localizedValues['procedureName'][locale.languageCode]; + + String get procedure => localizedValues['procedure'][locale.languageCode]; + + String get procedureStatus => localizedValues['procedureStatus'][locale.languageCode]; + + String get usageStatus => localizedValues['usageStatus'][locale.languageCode]; + + String get unusedCount => localizedValues['unusedCount'][locale.languageCode]; + + String get totalApproval => localizedValues['totalApproval'][locale.languageCode]; + + String get category => localizedValues['category'][locale.languageCode]; + + String get expirationDate => localizedValues['expirationDate'][locale.languageCode]; + + String get patientCard => localizedValues['patientCard'][locale.languageCode]; + + String get policyNumber => localizedValues['policyNumber'][locale.languageCode]; + + String get seeDetails => localizedValues['seeDetails'][locale.languageCode]; + + String get insuranceCards => localizedValues['insuranceCards'][locale.languageCode]; + + String get requestType => localizedValues['requestType'][locale.languageCode]; + + String get addFamilyMember => localizedValues['add-new-member'][locale.languageCode]; + + String get removeFamilyMember => localizedValues['remove-family-member'][locale.languageCode]; + + String get myMedicalFile => localizedValues['MyMedicalFile'][locale.languageCode]; + + String get myMedicalFileSubTitle => localizedValues['myMedicalFileSubTitle'][locale.languageCode]; + + String get viewMore => localizedValues['viewMore'][locale.languageCode]; + + String get homeHealthCareService => localizedValues['homeHealthCareService'][locale.languageCode]; + + String get onlinePharmacy => localizedValues['OnlinePharmacy'][locale.languageCode]; + + String get emergencyService => localizedValues['EmergencyService'][locale.languageCode]; + + String get onlinePaymentService => localizedValues['OnlinePaymentService'][locale.languageCode]; + + String get offersAndPackages => localizedValues['OffersAndPackages'][locale.languageCode]; + + String get comprehensiveMedicalCheckup => localizedValues['ComprehensiveMedicalCheckup'][locale.languageCode]; + + String get hMGService => localizedValues['HMGService'][locale.languageCode]; + + String get viewAllHabibMedicalService => localizedValues['ViewAllHabibMedicalService'][locale.languageCode]; + + String get viewAll => localizedValues['viewAll'][locale.languageCode]; + + String get view => localizedValues['view'][locale.languageCode]; + + String get contactUs => localizedValues['ContactUs'][locale.languageCode]; + + String get contactUsLocation => localizedValues['contactUsLocation'][locale.languageCode]; + + String get contactUsTime => localizedValues['contactUsTime'][locale.languageCode]; + + String get viewAllWaysReachUs => localizedValues['ViewAllWaysReachUs'][locale.languageCode]; + + String get medicalProfile => localizedValues['medicalProfile'][locale.languageCode]; + + String get parking => localizedValues['parking'][locale.languageCode]; + + String get alhabiServices => localizedValues['alhabiServices'][locale.languageCode]; + + String get parkingTitle => localizedValues['parkingTitle'][locale.languageCode]; + + String get readBarcode => localizedValues['readBarcode'][locale.languageCode]; + + String get showMyPark => localizedValues['showMyPark'][locale.languageCode]; + + String get clearMyData => localizedValues['clearMyData'][locale.languageCode]; + + String get floor => localizedValues['floor'][locale.languageCode]; + + String get gate => localizedValues['gate'][locale.languageCode]; + + String get building => localizedValues['building'][locale.languageCode]; + + String get branch => localizedValues['branch'][locale.languageCode]; + + String get emergencyServices => localizedValues['emergencyServices'][locale.languageCode]; + + String get nearester => localizedValues['nearester'][locale.languageCode]; + + String get locationa => localizedValues['locationa'][locale.languageCode]; + + String get callNow => localizedValues['call_now'][locale.languageCode]; + + String get ambulancerequest => localizedValues['ambulancerequest'][locale.languageCode]; + + String get requestA => localizedValues['requestA'][locale.languageCode]; + + String get consultation => localizedValues['consultation'][locale.languageCode]; + + String get logs => localizedValues['logs'][locale.languageCode]; + + String get textToSpeech => localizedValues['textToSpeech'][locale.languageCode]; + + String get myAppointments => localizedValues['MyAppointments'][locale.languageCode]; + + String get noBookedAppointments => localizedValues['NoBookedAppointments'][locale.languageCode]; + + String get noConfirmedAppointments => localizedValues['NoConfirmedAppointments'][locale.languageCode]; + + String get noArrivedAppointments => localizedValues['noArrivedAppointments'][locale.languageCode]; + + String get myAppointmentsList => localizedValues['MyAppointmentsList'][locale.languageCode]; + + String get radiology => localizedValues['Radiology'][locale.languageCode]; + + String get radiologySubtitle => localizedValues['RadiologySubtitle'][locale.languageCode]; + + String get lab => localizedValues['Lab'][locale.languageCode]; + + String get labSubtitle => localizedValues['LabSubtitle'][locale.languageCode]; + + String get medicines => localizedValues['Medicines'][locale.languageCode]; + + String get medicinesSubtitle => localizedValues['MedicinesSubtitle'][locale.languageCode]; + + String get vitalSigns => localizedValues['VitalSigns'][locale.languageCode]; + + String get vitalSignsSubtitle => localizedValues['VitalSignsSubTitle'][locale.languageCode]; + + String get myMedical => localizedValues['MyMedical'][locale.languageCode]; + + String get myMedicalSubtitle => localizedValues['MyMedicalSubtitle'][locale.languageCode]; + + String get myDoctor => localizedValues['MyDoctor'][locale.languageCode]; + + String get myDoctorSubtitle => localizedValues['MyDoctorSubtitle'][locale.languageCode]; + + String get eye => localizedValues['Eye'][locale.languageCode]; + + String get eyeSubtitle => localizedValues['EyeSubtitle'][locale.languageCode]; + + String get insurance => localizedValues['Insurance'][locale.languageCode]; + + String get insuranceSubtitle => localizedValues['InsuranceSubtitle'][locale.languageCode]; + + String get updateInsurance => localizedValues['UpdateInsurance'][locale.languageCode]; + + String get updateInsuranceSubtitle => localizedValues['UpdateInsuranceSubtitle'][locale.languageCode]; + + String get insuranceApproval => localizedValues['InsuranceApproval'][locale.languageCode]; + + String get insuranceApprovalSubtitle => localizedValues['InsuranceApprovalSubtitle'][locale.languageCode]; + + String get allergies => localizedValues['Allergies'][locale.languageCode]; + + String get allergiesSubtitle => localizedValues['AllergiesSubtitle'][locale.languageCode]; + + String get myVaccines => localizedValues['MyVaccines'][locale.languageCode]; + + String get myVaccinesSubtitle => localizedValues['MyVaccinesSubtitle'][locale.languageCode]; + + String get medical => localizedValues['Medical'][locale.languageCode]; + + String get medicalSubtitle => localizedValues['MedicalSubtitle'][locale.languageCode]; + + String get monthly => localizedValues['Monthly'][locale.languageCode]; + + String get monthlySubtitle => localizedValues['MonthlySubtitle'][locale.languageCode]; + + String get sick => localizedValues['Sick'][locale.languageCode]; + + String get sickSubtitle => localizedValues['SickSubtitle'][locale.languageCode]; + + String get myBalance => localizedValues['MyBalance'][locale.languageCode]; + + String get myBalanceSubtitle => localizedValues['MyBalanceSubtitle'][locale.languageCode]; + + String get patientCall => localizedValues['PatientCall'][locale.languageCode]; + + String get patientCallSubtitle => localizedValues['PatientCallSubtitle'][locale.languageCode]; + + String get smartWatches => localizedValues['SmartWatches'][locale.languageCode]; + + String get smartWatchesSubtitle => localizedValues['SmartWatchesSubtitle'][locale.languageCode]; + + String get myTrackers => localizedValues['MyTrackers'][locale.languageCode]; + + String get myTrackersSubtitle => localizedValues['MyTrackersSubtitle'][locale.languageCode]; + + String get askYour => localizedValues['AskYour'][locale.languageCode]; + + String get askYourSubtitle => localizedValues['AskYourSubtitle'][locale.languageCode]; + + String get internet => localizedValues['Internet'][locale.languageCode]; + + String get internetSubtitle => localizedValues['InternetSubtitle'][locale.languageCode]; + + String get chatbot => localizedValues['Chatbot'][locale.languageCode]; + + String get chatbotSubtitle => localizedValues['ChatbotSubtitle'][locale.languageCode]; + + String get timeLine => localizedValues['TimeLine'][locale.languageCode]; + + String get labOrders => localizedValues['LabOrders'][locale.languageCode]; + + String get billNo => localizedValues['BillNo'][locale.languageCode]; + + String get prescriptions => localizedValues['Prescriptions'][locale.languageCode]; + + String get history => localizedValues['History'][locale.languageCode]; + + String get orderNo => localizedValues['OrderNo'][locale.languageCode]; + + String get trackDeliveryDriver => localizedValues['trackDeliveryDriver'][locale.languageCode]; + + String get orderDetails => localizedValues['OrderDetails'][locale.languageCode]; + + String get vitalSign => localizedValues['VitalSign'][locale.languageCode]; + + String get monthlyReports => localizedValues['MonthlyReports'][locale.languageCode]; + + String get locationDialogMessage => localizedValues['locationDialogMessage'][locale.languageCode]; + + String get userViewRequest => localizedValues['user-view-requester'][locale.languageCode]; + + String get userView => localizedValues['user-view'][locale.languageCode]; + + String get sentRequest => localizedValues['sent-requests'][locale.languageCode]; + + String get km => localizedValues['km'][locale.languageCode]; + + String get km_ => localizedValues['km_'][locale.languageCode]; + + String get patientHealthSummaryReport => localizedValues['PatientHealthSummaryReport'][locale.languageCode]; + + String get toViewTheTermsAndConditions => localizedValues['ToViewTheTermsAndConditions'][locale.languageCode]; + + String get clickHere => localizedValues['ClickHere'][locale.languageCode]; + + String get iAgreeToTheTermsAndConditions => localizedValues['IAgreeToTheTermsAndConditions'][locale.languageCode]; + + String get iAgreeToTheTermsAndConditionsSubtitle => localizedValues['IAgreeToTheTermsAndConditionsSubtitle'][locale.languageCode]; + + String get save => localizedValues['Save'][locale.languageCode]; + + String get agreeTo => localizedValues['agreeTo'][locale.languageCode]; + + String get termsConditoins => localizedValues['termsConditoins'][locale.languageCode]; + + String get userAgreement => localizedValues['UserAgreement'][locale.languageCode]; + + String get updateSuccessfully => localizedValues['UpdateSuccessfully'][locale.languageCode]; + + String get emailSentSuccessfully => localizedValues['EmailSentSuccessfully'][locale.languageCode]; + + String get EmailSentError => localizedValues['EmailSentError'][locale.languageCode]; + + String get checkVaccineAvailability => localizedValues['CHECK_VACCINE_AVAILABILITY'][locale.languageCode]; + + String get myVaccinesAvailability => localizedValues['MyVaccinesAvailability'][locale.languageCode]; + + String get paymentService => localizedValues['PaymentService'][locale.languageCode]; + + String get paymentOnline => localizedValues['PaymentOnline'][locale.languageCode]; + + String get onlineCheckIn => localizedValues['OnlineCheckIn'][locale.languageCode]; + + String get myBalances => localizedValues['MyBalances'][locale.languageCode]; + + String get myWallet => localizedValues['MyWallet'][locale.languageCode]; + + String get balanceAmount => localizedValues['BalanceAmount'][locale.languageCode]; + + String get totalBalance => localizedValues['TotalBalance'][locale.languageCode]; + + String get createAdvancedPayment => localizedValues['CreateAdvancedPayment'][locale.languageCode]; + + String get advancePayment => localizedValues['AdvancePayment'][locale.languageCode]; + + String get advancePaymentLabel => localizedValues['AdvancePaymentLabel'][locale.languageCode]; + + String get referralRequesterInformation => localizedValues['referralRequesterInformation'][locale.languageCode]; + + String get fileNumber => localizedValues['FileNumber'][locale.languageCode]; + + String get enterfileNumber => localizedValues['enterfileNumber'][locale.languageCode]; + + String get complaintNumber => localizedValues['complaintNumber'][locale.languageCode]; + + String get identificationNumber => localizedValues['identificationNumber'][locale.languageCode]; + + String get amount => localizedValues['Amount'][locale.languageCode]; + + String get depositorEmail => localizedValues['DepositorEmail'][locale.languageCode]; + + String get notes => localizedValues['Notes'][locale.languageCode]; + + String get selectPatientName => localizedValues['SelectPatientName'][locale.languageCode]; + + String get selectFamilyPatientName => localizedValues['SelectFamilyPatientName'][locale.languageCode]; + + String get selectHospital => localizedValues['SelectHospital'][locale.languageCode]; + + String get selectCity => localizedValues['selectCity'][locale.languageCode]; + + String get city => localizedValues['city'][locale.languageCode]; + + String get distance => localizedValues['distance'][locale.languageCode]; + + String get myAccount => localizedValues['MyAccount'][locale.languageCode]; + + String get otherAccount => localizedValues['OtherAccount'][locale.languageCode]; + + String get selectBeneficiary => localizedValues['SelectBeneficiary'][locale.languageCode]; + + String get confirmThePayment => localizedValues['ConfirmThePayment'][locale.languageCode]; + + String get changePayment => localizedValues['changePayment'][locale.languageCode]; + + String get depositorName => localizedValues['DepositorName'][locale.languageCode]; + + String get mobileNumber => localizedValues['MobileNumber'][locale.languageCode]; + + String get phoneNumber => localizedValues['phone-number'][locale.languageCode]; + + String get country => localizedValues['country'][locale.languageCode]; + + String get ok => localizedValues['Ok'][locale.languageCode]; + + String get averageWaitingTime => localizedValues['averageWaitingTime'][locale.languageCode]; + + String get waterConsumedInWeek => localizedValues['WaterConsumedInWeek'][locale.languageCode]; + + String get waterConsumedInMonth => localizedValues['WaterConsumedInMonth'][locale.languageCode]; + + String get theVerificationCodeExpiresIn => localizedValues['TheVerificationCodeExpiresIn'][locale.languageCode]; + + String get pleaseEnterTheVerificationCode => localizedValues['PleaseEnterTheVerificationCode'][locale.languageCode]; + + String get eyeMeasurements => localizedValues['EyeMeasurements'][locale.languageCode]; + + String get measurements => localizedValues['Measurements'][locale.languageCode]; + + String get classes => localizedValues['Classes'][locale.languageCode]; + + String get contactLens => localizedValues['ContactLens'][locale.languageCode]; + + String get rightEye => localizedValues['RightEye'][locale.languageCode]; + + String get sphere => localizedValues['Sphere'][locale.languageCode]; + + String get cylinder => localizedValues['Cylinder'][locale.languageCode]; + + String get axis => localizedValues['Axis'][locale.languageCode]; + + String get prism => localizedValues['Prism'][locale.languageCode]; + + String get va => localizedValues['VA'][locale.languageCode]; + + String get leftEye => localizedValues['LeftEye'][locale.languageCode]; + + String get brand => localizedValues['Brand'][locale.languageCode]; + + String get power => localizedValues['Power'][locale.languageCode]; + + String get diameter => localizedValues['Diameter'][locale.languageCode]; + + String get remarks => localizedValues['Remarks'][locale.languageCode]; + + String get activeMedications => localizedValues['ActiveMedications'][locale.languageCode]; + + String get expDate => localizedValues['ExpDate'][locale.languageCode]; + + String get route => localizedValues['Route'][locale.languageCode]; + + String get frequency => localizedValues['Frequency'][locale.languageCode]; + + String get dailyQuantity => localizedValues['DailyQuantity'][locale.languageCode]; + + String get addReminder => localizedValues['AddReminder'][locale.languageCode]; + + String get reminderDes => localizedValues['reminderDes'][locale.languageCode]; + + String get startDay => localizedValues['StartDay'][locale.languageCode]; + + String get endDay => localizedValues['EndDay'][locale.languageCode]; + + String get days => localizedValues['Days'][locale.languageCode]; + + String get scheduleTime => localizedValues['ScheduleTime'][locale.languageCode]; + + String get askDoctor => localizedValues['AskDoctor'][locale.languageCode]; + + String get doctorResponses => localizedValues['DoctorResponses'][locale.languageCode]; + + String get newDes => localizedValues['New'][locale.languageCode]; + + String get all => localizedValues['All'][locale.languageCode]; + + String get questionHere => localizedValues['QuestionHere'][locale.languageCode]; + + String get viewDoctorResponses => localizedValues['ViewDoctorResponses'][locale.languageCode]; + + String get serviceInformationButton => localizedValues['ServiceInformationButton'][locale.languageCode]; + + String get serviceInformationTitle => localizedValues['ServiceInformationTitle'][locale.languageCode]; + + String get infoLab => localizedValues['info-lab'][locale.languageCode]; + + String get infoRadiology => localizedValues['info-radiology'][locale.languageCode]; + + String get orders => localizedValues['orders'][locale.languageCode]; + + String get lakum => localizedValues['lakum'][locale.languageCode]; + + String get lakumMsg => localizedValues['lakumMsg'][locale.languageCode]; + + String get lakumPoint => localizedValues['lakumPoint'][locale.languageCode]; + + String get MEMBERSINCE => localizedValues['MEMBERSINCE'][locale.languageCode]; + + String get IDENTIFICATION => localizedValues['IDENTIFICATION'][locale.languageCode]; + + String get lakumMobile => localizedValues['lakumMobile'][locale.languageCode]; + + String get Waitinggained => localizedValues['Waitinggained'][locale.languageCode]; + + String get Expired => localizedValues['Expired'][locale.languageCode]; + + String get WillBeExpired => localizedValues['WillBeExpired'][locale.languageCode]; + + String get RIYAL => localizedValues['RIYAL'][locale.languageCode]; + + String get LakumPoint => localizedValues['LakumPoint'][locale.languageCode]; + + String get ActivateLAKUMAccount => localizedValues['ActivateLAKUMAccount'][locale.languageCode]; + + String get wishlist => localizedValues['wishlist'][locale.languageCode]; + + String get brands => localizedValues['brands'][locale.languageCode]; + + String get products => localizedValues['products'][locale.languageCode]; + + String get reviews => localizedValues['reviews'][locale.languageCode]; + + String get productDetails => localizedValues['productDetails'][locale.languageCode]; + + String get noReviewsAvailable => localizedValues['noReviewsAvailable'][locale.languageCode]; + + String get noLocationAvailable => localizedValues['noLocationAvailable'][locale.languageCode]; + + String get myPrescriptions => localizedValues['myPrescriptions'][locale.languageCode]; + + String get medicationRefill => localizedValues['medicationRefill'][locale.languageCode]; + + String get pillReminder => localizedValues['pillReminder'][locale.languageCode]; + + String get shippingAddresses => localizedValues['shippingAddresses'][locale.languageCode]; + + String get reachUs => localizedValues['reachUs'][locale.languageCode]; + + String get ourLocations => localizedValues['ourLocations'][locale.languageCode]; + + String get edit => localizedValues['edit'][locale.languageCode]; + + String get whatsApp => localizedValues['whatsApp'][locale.languageCode]; + + String get phone => localizedValues['phone'][locale.languageCode]; + + String get delete => localizedValues['delete'][locale.languageCode]; + + String get addAddress => localizedValues['addAddress'][locale.languageCode]; + + String get deleteAddress => localizedValues['deleteAddress'][locale.languageCode]; + + String get deletedAddress => localizedValues['deletedAddres'][locale.languageCode]; + + String get addNewAddress => localizedValues['addNewAddress'][locale.languageCode]; + + String get order => localizedValues['order'][locale.languageCode]; + + String get delivered => localizedValues['delivered'][locale.languageCode]; + + String get processing => localizedValues['processing'][locale.languageCode]; + + String get pending => localizedValues['pending'][locale.languageCode]; + + String get cancelled => localizedValues['cancelled'][locale.languageCode]; + + String get writeReview => localizedValues['writeReview'][locale.languageCode]; + + String get shareReview => localizedValues['shareReview'][locale.languageCode]; + + String get backMyAccount => localizedValues['backMyAccount'][locale.languageCode]; + + String get reviewSuccessful => localizedValues['reviewSuccessful'][locale.languageCode]; + + String get reviewShared => localizedValues['reviewShared'][locale.languageCode]; + + String get reviewComment => localizedValues['reviewComment'][locale.languageCode]; + + String get shippedMethod => localizedValues['shippedMethod'][locale.languageCode]; + + String get orderDetail => localizedValues['orderDetail'][locale.languageCode]; + + String get deliveryDriverTrack => localizedValues['DeliveryDriverTrack'][locale.languageCode]; + + String get deliveryLocation => localizedValues['DeliveryLocation'][locale.languageCode]; + + String get driver => localizedValues['Driver'][locale.languageCode]; + + String get subtotal => localizedValues['subtotal'][locale.languageCode]; + + String get shipping => localizedValues['shipping'][locale.languageCode]; + + String get shipBy => localizedValues['shipBy'][locale.languageCode]; + + String get lakumPoints => localizedValues['lakumPoints'][locale.languageCode]; + + String get use => localizedValues['use'][locale.languageCode]; + + String get proceedPay => localizedValues['proceedPay'][locale.languageCode]; + + String get vat => localizedValues['vat'][locale.languageCode]; + + String get inclusiveVat => localizedValues['inclusiveVat'][locale.languageCode]; + + String get items => localizedValues['items'][locale.languageCode]; + + String get checkOut => localizedValues['checkOut'][locale.languageCode]; + + String get total => localizedValues['total'][locale.languageCode]; + + String get sar => localizedValues['sar'][locale.languageCode]; + + String get aed => localizedValues['aed'][locale.languageCode]; + + String get payOnline => localizedValues['payOnline'][locale.languageCode]; + + String get cancelOrder => localizedValues['cancelOrder'][locale.languageCode]; + + String get confirmAddress => localizedValues['confirmAddress'][locale.languageCode]; + + String get confirmLocation => localizedValues['confirmLocation'][locale.languageCode]; + + String get confirmDeleteMsg => localizedValues['confirmDeleteMsg'][locale.languageCode]; + + String get confirmDelete => localizedValues['confirmDelete'][locale.languageCode]; + + String get confirmCancellation => localizedValues['confirmCancellation'][locale.languageCode]; + + String get serviceInformation => localizedValues['ServiceInformation'][locale.languageCode]; + + String get homeHealthCare => localizedValues['HomeHealthCare'][locale.languageCode]; + + String get HHCNotAuthMsg => localizedValues['HHCNotAuthMsg'][locale.languageCode]; + + String get homeHealthCareText => localizedValues['HomeHealthCareText'][locale.languageCode]; + + String get loginRegister => localizedValues['LoginRegister'][locale.languageCode]; + + String get orderLog => localizedValues['OrderLog'][locale.languageCode]; + + // String get infoLab => localizedValues['info-lab'][locale.languageCode]; + // String get infoRadiology => + + String get orderNumber => localizedValues['orderNumber'][locale.languageCode]; + + String get orderDate => localizedValues['orderDate'][locale.languageCode]; + + String get itemsNo => localizedValues['itemsNo'][locale.languageCode]; + + String get noOrder => localizedValues['noOrder'][locale.languageCode]; + + String get noResult => localizedValues['noResult'][locale.languageCode]; + + String get offersAndPromotions => localizedValues['offersAndPromotions'][locale.languageCode]; + + String get offers => localizedValues['offers'][locale.languageCode]; + + String get review => localizedValues['review'][locale.languageCode]; + + String get deliveredOrder => localizedValues['deliveredOrder'][locale.languageCode]; + + String get pendingOrder => localizedValues['pendingOrder'][locale.languageCode]; + + String get processingOrder => localizedValues['processingOrder'][locale.languageCode]; + + String get cancelledOrder => localizedValues['cancelledOrder'][locale.languageCode]; + + String get compare => localizedValues['compare'][locale.languageCode]; + + String get medicationsRefill => localizedValues['medicationsRefill'][locale.languageCode]; + + String get myPrescription => localizedValues['myPrescription'][locale.languageCode]; + + String get quantity => localizedValues['quantity'][locale.languageCode]; + + String get productQuantity => localizedValues['productQuantity'][locale.languageCode]; + + String get conditionsHMG => localizedValues['conditionsHMG'][locale.languageCode]; + + String get conditions => localizedValues['conditions'][locale.languageCode]; + + // pharmacy module + + String get searchAndScanMedication => localizedValues['searchAndScanMedication'][locale.languageCode]; + + String get shopByBrands => localizedValues['shopByBrands'][locale.languageCode]; + + String get recentlyViewed => localizedValues['recentlyViewed'][locale.languageCode]; + + String get bestSellers => localizedValues['bestSellers'][locale.languageCode]; + + String get recommended => localizedValues['recommended'][locale.languageCode]; + + String get deleteAllItems => localizedValues['deleteAllItems'][locale.languageCode]; + + String get selectAddress => localizedValues['selectAddress'][locale.languageCode]; + + String get shippingAddress => localizedValues['shippingAddress'][locale.languageCode]; + + String get changeAddress => localizedValues['changeAddress'][locale.languageCode]; + + String get selectPaymentOption => localizedValues['selectPaymentOption'][locale.languageCode]; + + String get changeMethod => localizedValues['changeMethod'][locale.languageCode]; + + String get reviewOrder => localizedValues['reviewOrder'][locale.languageCode]; + + String get orderSummary => localizedValues['orderSummary'][locale.languageCode]; + + String get active => localizedValues['active'][locale.languageCode]; + + String get inactive => localizedValues['inactive'][locale.languageCode]; + + String get balance => localizedValues['balance'][locale.languageCode]; + + String get gained => localizedValues['gained'][locale.languageCode]; + + String get consumed => localizedValues['consumed'][locale.languageCode]; + + String get transferred => localizedValues['transferred'][locale.languageCode]; + + String get checkBeneficiary => localizedValues['checkBeneficiary'][locale.languageCode]; + + String get beneficiaryName => localizedValues['beneficiaryName'][locale.languageCode]; + + String get accountActivation => localizedValues['accountActivation'][locale.languageCode]; + + String get nonRecommended => localizedValues['nonRecommended'][locale.languageCode]; + + String get lakumTransfer => localizedValues['lakumTransfer'][locale.languageCode]; + + String get acceptLbl => localizedValues['acceptLbl'][locale.languageCode]; + + String get termsService => localizedValues['TermsService'][locale.languageCode]; + + String get beforeUsing => localizedValues['Beforeusing'][locale.languageCode]; + + String get accept => localizedValues['accept'][locale.languageCode]; + + String get dataSafeInfo => localizedValues['data-safe-info'][locale.languageCode]; + + String get dataSafe => localizedValues['data-safe'][locale.languageCode]; + + String get informational => localizedValues['informational'][locale.languageCode]; + + String get checkDiagnosis => localizedValues['check-diagnosis'][locale.languageCode]; + + String get remeberthat => localizedValues['remeberthat'][locale.languageCode]; + + String get notUseInEmbergency => localizedValues['not-use-in-emerbency'][locale.languageCode]; + + String get notUseInEmbergencyDetails => localizedValues['not-use-in-emerbency-details'][locale.languageCode]; + + String get notUseInEmbergencyCall => localizedValues['not-use-in-emerbency-details-call'][locale.languageCode]; + + String get selectGender => localizedValues['select-gender'][locale.languageCode]; + + String get iAma => localizedValues['i-am-a'][locale.languageCode]; + + String get selectAge => localizedValues['select-age'][locale.languageCode]; + + String get iAm => localizedValues['i-am'][locale.languageCode]; + + String get yearOld => localizedValues['years-old'][locale.languageCode]; + + String get categorise => localizedValues['categorise'][locale.languageCode]; + + String get refine => localizedValues['refine'][locale.languageCode]; + + String get subGroup => localizedValues['subGroup'][locale.languageCode]; + + String get max => localizedValues['max'][locale.languageCode]; + + String get min => localizedValues['min'][locale.languageCode]; + + String get compeleteOrderMsg => localizedValues['compeleteOrderMsg'][locale.languageCode]; + + String get addToCompareMsg => localizedValues['addToCompareMsg'][locale.languageCode]; + + String get itInListMsg => localizedValues['itInListMsg'][locale.languageCode]; + + String get compareListFull => localizedValues['compareListFull'][locale.languageCode]; + + String get addQuantity => localizedValues['addQuantity'][locale.languageCode]; + + String get addToCartMsg => localizedValues['addToCartMsg'][locale.languageCode]; + + String get addToWishlistMsg => localizedValues['addToWishlistMsg'][locale.languageCode]; + + String get notifyMeMsg => localizedValues['notifyMeMsg'][locale.languageCode]; + + String get removeFromWishlistMsg => localizedValues['removeFromWishlistMsg'][locale.languageCode]; + + String get apply => localizedValues['apply'][locale.languageCode]; + + String get reset => localizedValues['reset'][locale.languageCode]; + + String get viewCategorise => localizedValues['viewCategorise'][locale.languageCode]; + + String get viewSubCategorise => localizedValues['viewSubCategorise'][locale.languageCode]; + + String get cart => localizedValues['cart'][locale.languageCode]; + + String get wishList => localizedValues['wishList'][locale.languageCode]; + + String get Alhabibapp => localizedValues['Alhabibapp'][locale.languageCode]; + + String get searchProductHere => localizedValues['searchProductHere'][locale.languageCode]; + + String get email => localizedValues['email'][locale.languageCode]; + + String get book => localizedValues['Book'][locale.languageCode]; + + String get appointmentLabel => localizedValues['AppointmentLabel'][locale.languageCode]; + + String get bloodType => localizedValues['BloodType'][locale.languageCode]; + + String get loginToUseService => localizedValues['loginToUseService'][locale.languageCode]; + + String get maritalStatus => localizedValues['marital-status'][locale.languageCode]; + + String get general => localizedValues['general'][locale.languageCode]; + + String get profile => localizedValues['profile'][locale.languageCode]; + + String get notifications => localizedValues['notifications'][locale.languageCode]; + + String get notificationDetails => localizedValues['notificationDetails'][locale.languageCode]; + + List get infoMyDoctorPoints => localizedValues['info-my-doctor-points'][locale.languageCode]; + + String get infoMyDoctor => localizedValues['info-my-doctor'][locale.languageCode]; + + String get infoPrescriptions => localizedValues['info-prescriptions'][locale.languageCode]; + + List get infoPrescriptionsPoints => localizedValues['info-my-prescription-points'][locale.languageCode]; + + String get infoInsuranceCards => localizedValues['info-insurance-cards'][locale.languageCode]; + + List get infoInsuranceCardsPoints => localizedValues['info-insurance-cards-points'][locale.languageCode]; + + String get infoAllergies => localizedValues['info-allergies'][locale.languageCode]; + + String get sickLeaves => localizedValues['sick-leaves'][locale.languageCode]; + + String get infoSickLeaves => localizedValues['info-sick-leaves'][locale.languageCode]; + + List get infoSickLeavePoints => localizedValues['info-sick-leave-points'][locale.languageCode]; + + String get infoApprovals => localizedValues['info-approvals'][locale.languageCode]; + + List get infoApprovalPoints => localizedValues['info-approval-points'][locale.languageCode]; + + String get monthReport => localizedValues['month-report'][locale.languageCode]; + + String get infoMonthReport => localizedValues['info-month-report'][locale.languageCode]; + + String get languageSetting => localizedValues['language-setting'][locale.languageCode]; + + String get alert => localizedValues['alert'][locale.languageCode]; + + String get emailAlert => localizedValues['email-alert'][locale.languageCode]; + + String get smsAlert => localizedValues['sms-alert'][locale.languageCode]; + + String get contactInfo => localizedValues['contact-info'][locale.languageCode]; + + String get emergencyName => localizedValues['emrg-name'][locale.languageCode]; + + String get emergencyContact => localizedValues['emrg-no'][locale.languageCode]; + + String get modes => localizedValues['modes'][locale.languageCode]; + + String get vibration => localizedValues['vibration'][locale.languageCode]; + + String get blindMode => localizedValues['blind-modes'][locale.languageCode]; + + String get invertTheme => localizedValues['invert-theme'][locale.languageCode]; + + String get offTheme => localizedValues['off-theme'][locale.languageCode]; + + String get dimTheme => localizedValues['dim-theme'][locale.languageCode]; + + String get bwTheme => localizedValues['bw-theme'][locale.languageCode]; + + String get permissions => localizedValues['permissions'][locale.languageCode]; + + String get cameraPermission => localizedValues['camera-permission'][locale.languageCode]; + + String get locationPermission => localizedValues['location-permission'][locale.languageCode]; + + String get accessibility => localizedValues['accessibility'][locale.languageCode]; + + String get selectClinic => localizedValues['selectClinic'][locale.languageCode]; + + String get selectProject => localizedValues['selectProject'][locale.languageCode]; + + String get orderStatus => localizedValues['orderStatus'][locale.languageCode]; + + String get findUs => localizedValues['FindUs'][locale.languageCode]; + + String get feedback => localizedValues['Feedback'][locale.languageCode]; + + String get liveChat => localizedValues['LiveChat'][locale.languageCode]; + + String get service => localizedValues['Service'][locale.languageCode]; + + String get hMGServiceLabel => localizedValues['HMGServiceLabel'][locale.languageCode]; + + String get healthWeatherIndicators => localizedValues['HealthWeatherIndicators'][locale.languageCode]; + + String get healthTipsBasedOnCurrentWeather => localizedValues['HealthTipsBasedOnCurrentWeather'][locale.languageCode]; + + String get moreDetails => localizedValues['MoreDetails'][locale.languageCode]; + + String get sendCopy => localizedValues['SendCopy'][locale.languageCode]; + + String get resendOrder => localizedValues['ResendOrder'][locale.languageCode]; + + String get ports => localizedValues['Ports'][locale.languageCode]; + + String get way => localizedValues['Way'][locale.languageCode]; + + String get average => localizedValues['Average'][locale.languageCode]; + + String get dailyDoses => localizedValues['DailyDoses'][locale.languageCode]; + + String get period => localizedValues['Period'][locale.languageCode]; + + String get duration => localizedValues['duration'][locale.languageCode]; + + String get cm => localizedValues['cm'][locale.languageCode]; + + String get kg => localizedValues['kg'][locale.languageCode]; + + String get lb => localizedValues['lb'][locale.languageCode]; + + String get birth_date => localizedValues['birth_date'][locale.languageCode]; + + String get dateOfBirth => localizedValues['date_of_birth'][locale.languageCode]; + + String get mass => localizedValues['mass'][locale.languageCode]; + + String get tempC => localizedValues['temp-c'][locale.languageCode]; + + String get bpm => localizedValues['bpm'][locale.languageCode]; + + String get respirationSigns => localizedValues['respiration-signs'][locale.languageCode]; + + String get sysDias => localizedValues['sys-dias'][locale.languageCode]; + + String get body => localizedValues['body'][locale.languageCode]; + + String get bodyString => localizedValues['body_string'][locale.languageCode]; + + String get bikini => localizedValues['bikini'][locale.languageCode]; + + String get totalMinutes => localizedValues['totalMinutes'][locale.languageCode]; + + String get face => localizedValues['face'][locale.languageCode]; + + String get retouch => localizedValues['retouch'][locale.languageCode]; + + String get feedbackTitle => localizedValues['feedback'][locale.languageCode]; + + String get send => localizedValues['send'][locale.languageCode]; + + String get status => localizedValues['status'][locale.languageCode]; + + String get likeToHear => localizedValues['like-to-hear'][locale.languageCode]; + + String get subject => localizedValues['subject'][locale.languageCode]; + + String get message => localizedValues['message'][locale.languageCode]; + + String get emptySubject => localizedValues['empty-subject'][locale.languageCode]; + + String get emptyMessage => localizedValues['empty-message'][locale.languageCode]; + + String get selectAttachment => localizedValues['select-attachment'][locale.languageCode]; + + String get complainAppo => localizedValues['complain-appo'][locale.languageCode]; + + String get complainWithoutAppo => localizedValues['complain-without-appo'][locale.languageCode]; + + String get question => localizedValues['question'][locale.languageCode]; + + String get messageType => localizedValues['message-type'][locale.languageCode]; + + String get compliment => localizedValues['compliment'][locale.languageCode]; + + String get suggestion => localizedValues['suggestion'][locale.languageCode]; + + String get yourFeedback => localizedValues['your-feedback'][locale.languageCode]; + + String get selectPart => localizedValues['select-part'][locale.languageCode]; + + String get number => localizedValues['number'][locale.languageCode]; + + String get notClassified => localizedValues['not-classified'][locale.languageCode]; + + String get searchItemError => localizedValues['searchItemError'][locale.languageCode]; + + String get youCanFind => localizedValues['YouCanFind'][locale.languageCode]; + + String get itemInSearch => localizedValues['ItemInSearch'][locale.languageCode]; + + String get bloodDonation => localizedValues['blood-donation'][locale.languageCode]; + + String get bloodDonationInfo => localizedValues['blood-donation-info'][locale.languageCode]; + + String get bloodInstruction => localizedValues['blood-instruction'][locale.languageCode]; + + String get bloodTermsNcondition => localizedValues['view-terms'][locale.languageCode]; + + String get wantToConnectWithHmgNetwork => localizedValues['wantConnectHmgNetwork'][locale.languageCode]; + + String get failedToAccessHmgServices => localizedValues['failedToAccessHmgServices'][locale.languageCode]; + + String get enablingWifi => localizedValues['enablingWifi'][locale.languageCode]; + + String get offerAndPackages => localizedValues['offerAndPackages'][locale.languageCode]; + + String get orderHistory => localizedValues['orderHistory'][locale.languageCode]; + + String get offerAndPackagesDetails => localizedValues['offerAndPackagesDetails'][locale.languageCode]; + + String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode]; + + String get invoiceDate => localizedValues['InvoiceDate'][locale.languageCode]; + + String get specialResult => localizedValues['SpecialResult'][locale.languageCode]; + + String get generalResult => localizedValues['GeneralResult'][locale.languageCode]; + + String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode]; + + String get viewFlowChart => localizedValues['view_flow_chart'][locale.languageCode]; + + String get value => localizedValues['value'][locale.languageCode]; + + String get range => localizedValues['range'][locale.languageCode]; + + String get outpatient => localizedValues['out-patient'][locale.languageCode]; + + String get inPatient => localizedValues['in-patient'][locale.languageCode]; + + String get liveCare => localizedValues['liveCare'][locale.languageCode]; + + String get report => localizedValues['report'][locale.languageCode]; + + String get openRad => localizedValues['open-rad'][locale.languageCode]; + + String get sendCopyRad => localizedValues['send-copy'][locale.languageCode]; + + String get appoSurvey => localizedValues['appoSurvey'][locale.languageCode]; + + String get vaccination => localizedValues['vaccination'][locale.languageCode]; + + String get welcomeBackV => localizedValues['welcomeBack'][locale.languageCode]; + + String get instructions => localizedValues['instructions'][locale.languageCode]; + + String get updateEmail => localizedValues['update-email'][locale.languageCode]; + + String get updatedEmail => localizedValues['updated-email'][locale.languageCode]; + + String get viewListChildren => localizedValues['view-list-children'][locale.languageCode]; + + String get addChild => localizedValues['add-child'][locale.languageCode]; + + String get childName => localizedValues['child-name'][locale.languageCode]; + + String get childDob => localizedValues['childDob'][locale.languageCode]; + + String get deletedChildMes => localizedValues['deleted-child-mes'][locale.languageCode]; + + String get visit => localizedValues['visit'][locale.languageCode]; + + String get descriptionVaccination => localizedValues['description-vaccination'][locale.languageCode]; + + String get dueDate => localizedValues['due-date'][locale.languageCode]; + + String get validEmail => localizedValues['valid-email'][locale.languageCode]; + + String get confirmSend => localizedValues['confirm-send'][locale.languageCode]; + + String get emailSuccess => localizedValues['email-success'][locale.languageCode]; + + String get deletedChild => localizedValues['deleted-child'][locale.languageCode]; + + String get addInstructions => localizedValues['add-instructions'][locale.languageCode]; + + String get addedChild => localizedValues['added-child'][locale.languageCode]; + + String get appUpdate => localizedValues['appUpdate'][locale.languageCode]; + + String get ereferralSaveSuccess => localizedValues['ereferralSaveSuccess'][locale.languageCode]; + + String get labResults => localizedValues['labResults'][locale.languageCode]; + + String get doctorRating => localizedValues['doctorRating'][locale.languageCode]; + + String get good => localizedValues['good'][locale.languageCode]; + + String get v_good => localizedValues['v-good'][locale.languageCode]; + + String get excellent => localizedValues['excellent'][locale.languageCode]; + + String get below_average => localizedValues['below-average'][locale.languageCode]; + + String get infoSigns => localizedValues['info-signs'][locale.languageCode]; + + String get infoAdvancePayment => localizedValues['info-advance-payment'][locale.languageCode]; + + String get infoMyBalance => localizedValues['info-my-balance'][locale.languageCode]; + + String get erContant => localizedValues['er-contant'][locale.languageCode]; + + String get er => localizedValues['er'][locale.languageCode]; + + String get transportationService => localizedValues['transportation-Service'][locale.languageCode]; + + String get infoAmbulance => localizedValues['info-ambulance'][locale.languageCode]; + + String get transportHeading => localizedValues['RRT-transport-heading'][locale.languageCode]; + + String get directionHeading => localizedValues['RRT-direction-heading'][locale.languageCode]; + + String get toHospital => localizedValues['to-hospital'][locale.languageCode]; + + String get fromHospital => localizedValues['from-hospital'][locale.languageCode]; + + String get oneDirec => localizedValues['one-direc'][locale.languageCode]; + + String get twoDirec => localizedValues['two-direc'][locale.languageCode]; + + String get pickupLocation => localizedValues['pickup-location'][locale.languageCode]; + + String get pickupSpot => localizedValues['pickup-spot'][locale.languageCode]; + + String get insideHome => localizedValues['inside-home'][locale.languageCode]; + + String get haveAppo => localizedValues['have-appo'][locale.languageCode]; + + String get dropoffLocation => localizedValues['dropoff-location'][locale.languageCode]; + + String get selectAll => localizedValues['select-all'][locale.languageCode]; + + String get select => localizedValues['select'][locale.languageCode]; + + String get selectMap => localizedValues['select-map'][locale.languageCode]; + + String get noAppointment => localizedValues['no-appointment'][locale.languageCode]; + + String get patientShareB => localizedValues['patient-share'][locale.languageCode]; + + String get patientShareTax => localizedValues['patient-share-tax'][locale.languageCode]; + + String get patientShareTotal => localizedValues['patient-share-total'][locale.languageCode]; + + String get selectAmbulate => localizedValues['select-ambulate'][locale.languageCode]; + + String get wheelchair => localizedValues['wheelchair'][locale.languageCode]; + + String get walker => localizedValues['walker'][locale.languageCode]; + + String get stretcher => localizedValues['stretcher'][locale.languageCode]; + + String get none => localizedValues['none'][locale.languageCode]; + + String get RRTSummary => localizedValues['RRT-Summary'][locale.languageCode]; + + String get rapidResponseTeam => localizedValues['Rapid-Response-Team'][locale.languageCode]; + + String get rrtDDetails => localizedValues['RRTDDetails'][locale.languageCode]; + + String get approximateServiceFee => localizedValues['ApproximateServiceFee'][locale.languageCode]; + + String get amountBeforeTax => localizedValues['AmountBeforeTax'][locale.languageCode]; + + String get taxAmount => localizedValues['TaxAmount'][locale.languageCode]; + + String get totalAmountPayable => localizedValues['TotalAmountPayable'][locale.languageCode]; + + String get somethingWentWrongTryLater => localizedValues['somethingWentWrongTryLater'][locale.languageCode]; + + String get youCanPayByTheFollowingOptions => localizedValues['YouCanPayByTheFollowingOptions'][locale.languageCode]; + + String get rrtUserAgreementTitle => localizedValues['rrtUserAgreementTitle'][locale.languageCode]; + + String get rrtUserAgreementP1 => localizedValues['rrtUserAgreementP1'][locale.languageCode]; + + String get rrtUserAgreementP2 => localizedValues['rrtUserAgreementP2'][locale.languageCode]; + + String get rrtUserAgreementP3 => localizedValues['rrtUserAgreementP3'][locale.languageCode]; + + String get rrtOrderSuccessMessage => localizedValues['rrtOrderSuccessMessage'][locale.languageCode]; + + String get billAmount => localizedValues['bill-amount'][locale.languageCode]; + + String get transportMethod => localizedValues['transport-method'][locale.languageCode]; + + String get directions => localizedValues['directions'][locale.languageCode]; + + String get infoMyAppointments => localizedValues['info-my-appointments'][locale.languageCode]; + + String get infoTodo => localizedValues['info-todo'][locale.languageCode]; + + String get familyInfo => localizedValues['family-info'][locale.languageCode]; + + String get profileUpdate => localizedValues['update-succ'][locale.languageCode]; + + String get dentalComplaints => localizedValues['dental-complains'][locale.languageCode]; + + String get emptyResult => localizedValues['empty-result'][locale.languageCode]; + + String get noBookedAppo => localizedValues['no-booked-appointment'][locale.languageCode]; + + String get noConfirmedAppo => localizedValues['no-confirmed-appointment'][locale.languageCode]; + + String get noArrivedAppo => localizedValues['no-arrived-appointment'][locale.languageCode]; + + String get upcomingEmpty => localizedValues['upcoming-empty'][locale.languageCode]; + + String get upcomingTimeLeft => localizedValues['upcoming-timeLeft'][locale.languageCode]; + + String get covidTestAllServices => localizedValues['covid-test-all-services'][locale.languageCode]; + + String get pharmacy => localizedValues['pharmacy'][locale.languageCode]; + + String get ereferral => localizedValues['ereferral'][locale.languageCode]; + + String get childVaccine => localizedValues['child-vaccine'][locale.languageCode]; + + String get calculators => localizedValues['calculators'][locale.languageCode]; + + String get converters => localizedValues['converters'][locale.languageCode]; + + String get h2o => localizedValues['h2o'][locale.languageCode]; + + String get waterTracker => localizedValues['waterTracker'][locale.languageCode]; + + String get ft => localizedValues['ft'][locale.languageCode]; + + String get vTour => localizedValues['v-tour'][locale.languageCode]; + + String get hmgNews => localizedValues['hmg-news'][locale.languageCode]; + + String get bloodD => localizedValues['blood-d'][locale.languageCode]; + + String get symptomCheckerTitle => localizedValues['symptomCheckerTitle'][locale.languageCode]; + + String get latestNews => localizedValues['latest-news'][locale.languageCode]; + + String get ourLocation => localizedValues['our-location'][locale.languageCode]; + + String get pharmacies => localizedValues['pharmacies'][locale.languageCode]; + + String get hospitals => localizedValues['hospitals'][locale.languageCode]; + + String get wallet => localizedValues['wallet'][locale.languageCode]; + + String get hmg => localizedValues['hmg'][locale.languageCode]; + + String get requested => localizedValues['requested'][locale.languageCode]; + + String get ready => localizedValues['ready'][locale.languageCode]; + + String get completed => localizedValues['completed'][locale.languageCode]; + + String get requestMedicalReport => localizedValues['request-medical-report'][locale.languageCode]; + + String get insurCards => localizedValues['insur-cards'][locale.languageCode]; + + String get labResult => localizedValues['labResult'][locale.languageCode]; + + String get details => localizedValues['details'][locale.languageCode]; + + String get graphDetails => localizedValues['graph-details'][locale.languageCode]; + + String get age => localizedValues['age'][locale.languageCode]; + + String get activeInsurence => localizedValues['active-insurence'][locale.languageCode]; + + String get notActive => localizedValues['not-active'][locale.languageCode]; + + String get cardDetail => localizedValues['card-detail'][locale.languageCode]; + + String get dr => localizedValues['Dr'][locale.languageCode]; + + String get sendSuc => localizedValues['sendSuc'][locale.languageCode]; + + String get instructionsPharmacies => localizedValues['instructions-pharmacies'][locale.languageCode]; + + String get selectHospitalDec => localizedValues['select-hospital'][locale.languageCode]; + + String get start => localizedValues['start'][locale.languageCode]; + + String get infoChat => localizedValues['info-chat'][locale.languageCode]; + + String get noRecords => localizedValues['empty'][locale.languageCode]; + + String get lastVisit => localizedValues['last-visit'][locale.languageCode]; + + String get tapTitle => localizedValues['tap-title'][locale.languageCode]; + + String get later => localizedValues['later'][locale.languageCode]; + + String get lastAppointment => localizedValues['last-appointment'][locale.languageCode]; + + String get rateClinic => localizedValues['rate-clinic'][locale.languageCode]; + + String get fetchData => localizedValues['fetch-data'][locale.languageCode]; + + String get sendConfEmail => localizedValues['send-email'][locale.languageCode]; + + String get noDataAvailable => localizedValues['noDataAvailable'][locale.languageCode]; + + String get theName => localizedValues['thename'][locale.languageCode]; + + String get noSearchResult => localizedValues['noSearchResult'][locale.languageCode]; + + String get selectFileSouse => localizedValues['selectFileSouse'][locale.languageCode]; + + String get rate => localizedValues['rate'][locale.languageCode]; + + String get bookedSuccess => localizedValues['booked-success'][locale.languageCode]; + + String get appoReminder30 => localizedValues['appo-reminder-select-option-30'][locale.languageCode]; + + String get appoReminder60 => localizedValues['appo-reminder-select-option-60'][locale.languageCode]; + + String get appoReminder90 => localizedValues['appo-reminder-select-option-90'][locale.languageCode]; + + String get appoReminder120 => localizedValues['appo-reminder-select-option-120'][locale.languageCode]; + + String get gallery => localizedValues['gallery'][locale.languageCode]; + + String get camera => localizedValues['camera'][locale.languageCode]; + + String get medReport => localizedValues['med-report'][locale.languageCode]; + + String get newMedReport => localizedValues['new-med-report'][locale.languageCode]; + + String get requestReport => localizedValues['requestReport'][locale.languageCode]; + + String get confirmMsgReport => localizedValues['confirm-msg-report'][locale.languageCode]; + + String get successSendReport => localizedValues['successSendReport'][locale.languageCode]; + + String get pulseTitle => localizedValues['pulseTitle'][locale.languageCode]; + + String get systolicLng => localizedValues['systolic-lng'][locale.languageCode]; + + String get diastolicLng => localizedValues['diastolic-lng'][locale.languageCode]; + + String get policyHolder => localizedValues['policy-holder'][locale.languageCode]; + + String get policyNo => localizedValues['policy-no'][locale.languageCode]; + + String get expiryDateTitle => localizedValues['expiry-date'][locale.languageCode]; + + String get classTitle => localizedValues['class'][locale.languageCode]; + + String get approval => localizedValues['approval'][locale.languageCode]; + + String get agree => localizedValues['agree'][locale.languageCode]; + + String get disagree => localizedValues['disagree'][locale.languageCode]; + + String get requestSent => localizedValues['request-sent'][locale.languageCode]; + + String get attachInsuraceImage => localizedValues['attach-insurace-image'][locale.languageCode]; + + String get infoInsurCards => localizedValues['info-insur-cards'][locale.languageCode]; + + String get scanNow => localizedValues['scan-now'][locale.languageCode]; + + String get pharmacyServiceTermsCondition => localizedValues['pharmacyServiceTermsCondition'][locale.languageCode]; + + String get recordDeleted => localizedValues['recordDeleted'][locale.languageCode]; + + String get referralStatus => localizedValues['referralStatus'][locale.languageCode]; + + String get referralDate => localizedValues['referralDate'][locale.languageCode]; + + String get patientName => localizedValues['patientName'][locale.languageCode]; + + String get referralNumber => localizedValues['referralNumber'][locale.languageCode]; + + String get needPrescription => localizedValues['needPrescription'][locale.languageCode]; + + String get outOfStockMsg => localizedValues['outOfStockMsg'][locale.languageCode]; + + String get productOutOfStock => localizedValues['productOutOfStock'][locale.languageCode]; + + String get noArabicLetters => localizedValues['noArabicLetters'][locale.languageCode]; + + String get noOffersAvailable => localizedValues['noOffersAvailable'][locale.languageCode]; + + String get requestID => localizedValues['requestID'][locale.languageCode]; + + String get OrderStatus => localizedValues['OrderStatus'][locale.languageCode]; + + String get pickupDate => localizedValues['pickupDate'][locale.languageCode]; + + String get serviceName => localizedValues['serviceName'][locale.languageCode]; + + String get orderLocation => localizedValues['orderLocation'][locale.languageCode]; + + String get selectService => localizedValues['selectService'][locale.languageCode]; + + String get coveredService => localizedValues['coveredService'][locale.languageCode]; + + String get selectedService => localizedValues['selectedService'][locale.languageCode]; + + String get cancelOrderMsg => localizedValues['cancelOrderMsg'][locale.languageCode]; + + String get processDoneSuccessfully => localizedValues['processDoneSuccessfully'][locale.languageCode]; + + String get selectHomeHealthCareServices => localizedValues['selectHomeHealthCareServices'][locale.languageCode]; + + String get help => localizedValues['help'][locale.languageCode]; + + String get habibRobotText => localizedValues['habibRobotText'][locale.languageCode]; + + String get topBrands => localizedValues['topBrands'][locale.languageCode]; + + String get notifyMe => localizedValues['notifyMe'][locale.languageCode]; + + String get specification => localizedValues['specification'][locale.languageCode]; + + String get availability => localizedValues['availability'][locale.languageCode]; + + String get quantitySize => localizedValues['quantitySize'][locale.languageCode]; + + String get addToCart => localizedValues['addToCart'][locale.languageCode]; + + String get addToWishlist => localizedValues['addToWishlist'][locale.languageCode]; + + String get removeFromWishlist => localizedValues['removeFromWishlist'][locale.languageCode]; + + String get buyNow => localizedValues['buyNow'][locale.languageCode]; + + String get quantityShortcut => localizedValues['quantityShortcut'][locale.languageCode]; + + String get noData => localizedValues['noData'][locale.languageCode]; + + String get no_data => localizedValues['no_data'][locale.languageCode]; + + String get year => localizedValues['Year'][locale.languageCode]; + + String get years => localizedValues['years'][locale.languageCode]; + + String get month => localizedValues['Month'][locale.languageCode]; + + String get enterDetailBelow => localizedValues['enter_detail_below'][locale.languageCode]; + + String get point => localizedValues['point'][locale.languageCode]; + + String get riyal => localizedValues['riyal'][locale.languageCode]; + + String get termOfService => localizedValues['termOfService'][locale.languageCode]; + + String get shoppingCart => localizedValues['shoppingCart'][locale.languageCode]; + + String get covidTest => localizedValues['covidTest'][locale.languageCode]; + + String get driveThru => localizedValues['driveThru'][locale.languageCode]; + + String get NearestErDesc => localizedValues['NearestErDesc'][locale.languageCode]; + + String get NearestEr => localizedValues['NearestEr'][locale.languageCode]; + + String get infoCMC => localizedValues['infoCMC'][locale.languageCode]; + + String get instructionAgree => localizedValues['instructionAgree'][locale.languageCode]; + + String get reqId => localizedValues['reqId'][locale.languageCode]; + + String get ordersLog => localizedValues['RRT-orders-log'][locale.languageCode]; + + String get bloodSugar => localizedValues['blood-sugar'][locale.languageCode]; + + String get myTracker => localizedValues['my-tracker'][locale.languageCode]; + + String get weekly => localizedValues['weekly'][locale.languageCode]; + + String get monthlyT => localizedValues['monthly'][locale.languageCode]; + + String get yearly => localizedValues['yearly'][locale.languageCode]; + + String get measured => localizedValues['measured'][locale.languageCode]; + + String get sugarAdd => localizedValues['sugar-add'][locale.languageCode]; + + String get other => localizedValues['other'][locale.languageCode]; + + String get measureUnit => localizedValues['measure-unit'][locale.languageCode]; + + String get measureTime => localizedValues['measure-time'][locale.languageCode]; + + String get update => localizedValues['update'][locale.languageCode]; + + String get covid19_driveThrueTest => localizedValues['covid19_driveThrueTest'][locale.languageCode]; + + String get eReferral => localizedValues['E-Referral'][locale.languageCode]; + + String get msg_email_address_up_to_date => localizedValues["msg_email_address_up_to_date"][locale.languageCode]; + + String get updateEmailMsg => localizedValues["update-email-msg"][locale.languageCode]; + + String get addNewChild => localizedValues["add-new-child"][locale.languageCode]; + + String get sendChildEmailMsg => localizedValues["send-child-email-msg"][locale.languageCode]; + + String get vaccinationAddChildMsg => localizedValues["vaccination-add-child-msg"][locale.languageCode]; + + String get childAddedSuccessfully => localizedValues["child_added_successfully"][locale.languageCode]; + + String get sugar => localizedValues["sugar"][locale.languageCode]; + + String get bloodCholesterol => localizedValues["bloodCholesterol"][locale.languageCode]; + + String get cholesterol => localizedValues["cholesterol"][locale.languageCode]; + + String get triglycerides => localizedValues["triglycerides"][locale.languageCode]; + + String get fatInBlood => localizedValues["fatInBlood"][locale.languageCode]; + + String get calculate => localizedValues["calculate"][locale.languageCode]; + + String get enterReadingValue => localizedValues["enterReadingValue"][locale.languageCode]; + + String get convertBloodSugarStatement => localizedValues["convertBloodSugarStatement"][locale.languageCode]; + + String get convertFrom => localizedValues["convertFrom"][locale.languageCode]; + + String get result => localizedValues["result"][locale.languageCode]; + + String get sort => localizedValues["sort"][locale.languageCode]; + + String get bloodSugarConversion => localizedValues["bloodSugarConversion"][locale.languageCode]; + + String get convertCholesterolStatement => localizedValues["convertCholesterolStatement"][locale.languageCode]; + + String get triglyceridesConvertStatement => localizedValues["triglyceridesConvertStatement"][locale.languageCode]; + + String get bloodDEnterDesc => localizedValues["bloodD-enter-desc"][locale.languageCode]; + + String get viewTermsConditions => localizedValues["viewTermsConditions"][locale.languageCode]; + + String get generalHealth => localizedValues["generalHealth"][locale.languageCode]; + + String get womanHealth => localizedValues["womanHealth"][locale.languageCode]; + + String get bmi => localizedValues["bmi"][locale.languageCode]; + + String get calcHealth => localizedValues["calc-health"][locale.languageCode]; + + String get calories => localizedValues["calories"][locale.languageCode]; + + String get bmr => localizedValues["bmr"][locale.languageCode]; + + String get idealBody => localizedValues["idealBody"][locale.languageCode]; + + String get bodyWord => localizedValues["body_word"][locale.languageCode]; + + String get fat => localizedValues["fat"][locale.languageCode]; + + String get carbohydrate => localizedValues["carbohydrate"][locale.languageCode]; + + String get proteinFat => localizedValues["proteinFat"][locale.languageCode]; + + String get ovulation => localizedValues["ovulation"][locale.languageCode]; + + String get delivery => localizedValues["delivery"][locale.languageCode]; + + String get bmiCalcDesc => localizedValues["bmiCalcDesc"][locale.languageCode]; + + String get selectUnit => localizedValues["selectUnit"][locale.languageCode]; + + String get feet => localizedValues["feet"][locale.languageCode]; + + String get pound => localizedValues["pound"][locale.languageCode]; + + String get seeListOfDoctor => localizedValues["seeListOfDoctor"][locale.languageCode]; + + String get obese => localizedValues["obese"][locale.languageCode]; + + String get overWeight => localizedValues["overWeight"][locale.languageCode]; + + String get healthy => localizedValues["healthy"][locale.languageCode]; + + String get underWeight => localizedValues["underWeight"][locale.languageCode]; + + String get bmiCalcMsgObese => localizedValues["bmiCalcMsgObese"][locale.languageCode]; + + String get bmiCalcMsgOverweight => localizedValues["bmiCalcMsgOverweight"][locale.languageCode]; + + String get bmiCalcMsgHealthy => localizedValues["bmiCalcMsgHealthy"][locale.languageCode]; + + String get bmiCalcMsgUnderWeight => localizedValues["bmiCalcMsgUnderWeight"][locale.languageCode]; + + String get bariatrics => localizedValues["bariatrics"][locale.languageCode]; + + String get bariatricsHeaderMsg => localizedValues["bariatricsHeaderMsg"][locale.languageCode]; + + String get continues => localizedValues["continue"][locale.languageCode]; + + String get skip => localizedValues["skip"][locale.languageCode]; + + String get offersdiscount => localizedValues["offersdiscount"][locale.languageCode]; + + String get explore => localizedValues["explore"][locale.languageCode]; + + String get calorieCalcDesc => localizedValues["calorieCalcDesc"][locale.languageCode]; + + String get age11_120Years => localizedValues["age11_120_years"][locale.languageCode]; + + String get walkinAppo => localizedValues["WalkinAppo"][locale.languageCode]; + + String get videoAppo => localizedValues["videoAppo"][locale.languageCode]; + + String get weightAdd => localizedValues["weight-add"][locale.languageCode]; + + String get appointments => localizedValues['appointments'][locale.languageCode]; + + String get all2 => localizedValues['all2'][locale.languageCode]; + + String get systolicAdd => localizedValues["systolic-add"][locale.languageCode]; + + String get diastolicAdd => localizedValues["diastolic-add"][locale.languageCode]; + + String get cmcHeading => localizedValues["cmc-heading"][locale.languageCode]; + + String get selectLocation => localizedValues["select-location"][locale.languageCode]; + + String get resultHeader => localizedValues["result-header"][locale.languageCode]; + + String get covidInfo => localizedValues["covid-info"][locale.languageCode]; + + String get selectAppo => localizedValues["select-appo"][locale.languageCode]; + + String get covidAlertHeader => localizedValues["covid-alert-header"][locale.languageCode]; + + String get covidAlertInfo => localizedValues["covid-alert-info"][locale.languageCode]; + + String get covidAlertMins => localizedValues["covid-alert-mins"][locale.languageCode]; + + String get back => localizedValues["back"][locale.languageCode]; + + String get getDirections => localizedValues["get-directions"][locale.languageCode]; + + String get selectedLocation => localizedValues["selected-location"][locale.languageCode]; + + String get testFee => localizedValues["test-fee"][locale.languageCode]; + + String get payOptions => localizedValues["pay-options"][locale.languageCode]; + + String get livecareService => localizedValues["livecare-service"][locale.languageCode]; + + String get livecareServiceDesc => localizedValues["livecare-service-desc"][locale.languageCode]; + + String get whyLivecare => localizedValues["why-livecare"][locale.languageCode]; + + String get livecarePoint1 => localizedValues["livecare-point-1"][locale.languageCode]; + + String get docVirtualAppoIns4 => localizedValues["doc-virtual-appo-ins4"][locale.languageCode]; + + String get docVirtualAppoIns5 => localizedValues["doc-virtual-appo-ins5"][locale.languageCode]; + + String get livecareSummary => localizedValues["livecare-summary"][locale.languageCode]; + + String get livecareOption1 => localizedValues["livecare-option-1"][locale.languageCode]; + + String get livecareOption2 => localizedValues["livecare-option-2"][locale.languageCode]; + + String get livecareOption3 => localizedValues["livecare-option-3"][locale.languageCode]; + + String get livecareOption4 => localizedValues["livecare-option-4"][locale.languageCode]; + + String get noAppointmentAvailable => localizedValues["noAppointmentAvailable"][locale.languageCode]; + + String get today => localizedValues["today"][locale.languageCode]; + + String get week => localizedValues["week"][locale.languageCode]; + + String get h2oAmountOfWater => localizedValues["h2o-amount-of-water"][locale.languageCode]; + + String get updateUser => localizedValues["update-user"][locale.languageCode]; + + String get editname => localizedValues["editname"][locale.languageCode]; + + String get activityLevel => localizedValues["activity-level"][locale.languageCode]; + + String get success => localizedValues["success"][locale.languageCode]; + + String get enterNameHere => localizedValues["enterNameHere"][locale.languageCode]; + + String get lightActive => localizedValues["light-active"][locale.languageCode]; + + String get modActive => localizedValues["mod-active"][locale.languageCode]; + + String get reminderLabel => localizedValues["reminder-label"][locale.languageCode]; + + String get reminderTimesLabel => localizedValues["reminder-times-label"][locale.languageCode]; + + String get times => localizedValues["times"][locale.languageCode]; + + String get WaterCalculate => localizedValues["WaterCalculate"][locale.languageCode]; + + String get notifTitle => localizedValues["notif-title"][locale.languageCode]; + + String get notifText => localizedValues["notif-text"][locale.languageCode]; + + String get custom => localizedValues["custom"][locale.languageCode]; + + String get undo => localizedValues["undo"][locale.languageCode]; + + String get drinking => localizedValues["drinking"][locale.languageCode]; + + String get remaining => localizedValues["remaining"][locale.languageCode]; + + String get addCustomAmount => localizedValues["addCustomAmount"][locale.languageCode]; + + String get left => localizedValues["left"][locale.languageCode]; + + String get taken => localizedValues["taken"][locale.languageCode]; + + String get ml => localizedValues["ml"][locale.languageCode]; + + String get mililitre => localizedValues["mililitre"][locale.languageCode]; + + String get litre => localizedValues["litre"][locale.languageCode]; + + String get l => localizedValues["l"][locale.languageCode]; + + String get customLabel => localizedValues["custom-label"][locale.languageCode]; + + String get customLabelInLitres => localizedValues["custom-label-in-litres"][locale.languageCode]; + + String get customLabelInMililitres => localizedValues["custom-label-in-mililitres"][locale.languageCode]; + + String get amount_ => localizedValues["amount"][locale.languageCode]; + + String get targetReach => localizedValues["target-reach"][locale.languageCode]; + + String get weekHeader => localizedValues["week-header"][locale.languageCode]; + + String get monthHeader => localizedValues["month-header"][locale.languageCode]; + + String get notifPermissionTitle => localizedValues["notif-permission-title"][locale.languageCode]; + + String get notifPermissionMsg => localizedValues["notif-permission-msg"][locale.languageCode]; + + String get verification_message_code => localizedValues["verification_message_code"][locale.languageCode]; + + String get sms_code => localizedValues["sms_code"][locale.languageCode]; + + String get code_failure => localizedValues["code_failure"][locale.languageCode]; + + String get resend => localizedValues["resend"][locale.languageCode]; + + String get submitncontinue => localizedValues["submitncontinue"][locale.languageCode]; + + String get areyousure => localizedValues["areyousure"][locale.languageCode]; + + // Offer And Packahes + String get subT => localizedValues['OffersAndPackages'][locale.languageCode]; + + String get totalWithColonRight => localizedValues['totalWithColonRight'][locale.languageCode]; + + String get preferredunit => localizedValues["preferredunit"][locale.languageCode]; + + String get trySaying => localizedValues["try-saying"][locale.languageCode]; + + String get shippingAddresss => localizedValues["shipping-address"][locale.languageCode]; + + String get covidAlert => localizedValues["covid-alert"][locale.languageCode]; + + String get pharmacyRelogin => localizedValues["pharmacy-relogin"][locale.languageCode]; + + String get onlineCheckInAgreement => localizedValues["onlineCheckInAgreement"][locale.languageCode]; + + String get chiefComplaints => localizedValues["chiefComplaints"][locale.languageCode]; + + String get errorChiefComplaints => localizedValues["errorChiefComplaints"][locale.languageCode]; + + String get expectedArrivalTime => localizedValues["expectedArrivalTime"][locale.languageCode]; + + String get errorExpectedArrivalTime => localizedValues["errorExpectedArrivalTimes"][locale.languageCode]; + + String get anicllaryOrders => localizedValues["ancillary-orders"][locale.languageCode]; + + String get mrn => localizedValues["MRN"][locale.languageCode]; + + String get appointmentDate => localizedValues["appointment-date"][locale.languageCode]; + + String get appointmentNo => localizedValues["appointment-no"][locale.languageCode]; + + String get insuranceID => localizedValues["insurance-id"][locale.languageCode]; + + String get enterFile => localizedValues["enter-file"][locale.languageCode]; + + String get selectRelationship => localizedValues["selectRelationship"][locale.languageCode]; + + String get requesterRelationship => localizedValues["requesterRelationship"][locale.languageCode]; + + String get newReferral => localizedValues["newReferral"][locale.languageCode]; + + String get searchForReferrals => localizedValues["searchForReferrals"][locale.languageCode]; + + String get covidSelectProcedure => localizedValues["covid-select-procedure"][locale.languageCode]; + + String get onlineConsultation => localizedValues["online-consultation"][locale.languageCode]; + + String get expectedWaiting => localizedValues["expected-weiting"][locale.languageCode]; + + String get erConsultFee => localizedValues["er-consult-fee"][locale.languageCode]; + + String get insuredPatient => localizedValues["insured-patient"][locale.languageCode]; + + String get iAcceptTerms => localizedValues["i-accept-terms"][locale.languageCode]; + + String get upComingPayOption => localizedValues["upcoming-pay-options"][locale.languageCode]; + + String get pleaseAcceptTerms => localizedValues["please-accept-terms"][locale.languageCode]; + + String get pleaseSelectAllQuestionToContinue => localizedValues["pleaseSelectAllQuestionToContinue"][locale.languageCode]; + + String get type => localizedValues["type"][locale.languageCode]; + + String get eReferralInfo => localizedValues["info-ereferral"][locale.languageCode]; + + String get erConsultation => localizedValues["er-consultation"][locale.languageCode]; + + String get thisItemIsNotAvailable => localizedValues["thisItemIsNotAvailable"][locale.languageCode]; + + String get beforeAfterImages => localizedValues["beforeAfterImages"][locale.languageCode]; + + String get myInvoice => localizedValues["my-invoice"][locale.languageCode]; + + String get invoicesList => localizedValues["invoice-list"][locale.languageCode]; + + String get clinicAcceptLivecare => localizedValues["clinic-accept-livecare"][locale.languageCode]; + + String get livecareModalTop => localizedValues["livecareModal-top"][locale.languageCode]; + + String get empty => localizedValues["empty"][locale.languageCode]; + + String get schedule => localizedValues["schedule"][locale.languageCode]; + + String get livecarePoint2 => localizedValues["livecare-point-2"][locale.languageCode]; + + String get livecarePoint3 => localizedValues["livecare-point-3"][locale.languageCode]; + + String get livecarePoint4 => localizedValues["livecare-point-4"][locale.languageCode]; + + String get livecarePoint5 => localizedValues["livecare-point-5"][locale.languageCode]; + + String get bookImmediateLivecare => localizedValues["book-immediate-livecare"][locale.languageCode]; + + String get bookVideoLivecare2 => localizedValues["book-video-livecare-2"][locale.languageCode]; + + String get noThankyou => localizedValues["no-thankyou"][locale.languageCode]; + + String get visitClinic => localizedValues["visit-clinic"][locale.languageCode]; + + String get generateCovidCertificate => localizedValues["generate-covid-certificate"][locale.languageCode]; + + String get isReportOutsideKsa => localizedValues["is-report-outside-ksa"][locale.languageCode]; + + String get passportNumber => localizedValues["passport-number"][locale.languageCode]; + + String get enterPassportNumber => localizedValues["enter-passport-number"][locale.languageCode]; + + String get validPassportNumber => localizedValues["valid-passport-number"][locale.languageCode]; + + String get continuePlan => localizedValues["continue-plan"][locale.languageCode]; + + String get dentalProcedureList => localizedValues["dental-procedure-list"][locale.languageCode]; + + String get aboutApp => localizedValues["about-app"][locale.languageCode]; + + String get aboutPointsLength => localizedValues["about-points"]['length'][locale.languageCode]; + + String get timeNeeded => localizedValues["time-needed"][locale.languageCode]; + + String get totalTimeNeeded => localizedValues["total-time-needed"][locale.languageCode]; + + String get infoEye => localizedValues["info-eye"][locale.languageCode]; + + String get infoVaccines => localizedValues["info-vaccines"][locale.languageCode]; + + String get infoTrackers => localizedValues["info-trackers"][locale.languageCode]; + + String get infoHealthData => localizedValues["info-health-data"][locale.languageCode]; + + String get infoAskDoc => localizedValues["info-ask-doc"][locale.languageCode]; + + String get infoAutoWifi => localizedValues["info-auto-wifi"][locale.languageCode]; + + String get autoWifi => localizedValues["auto-wifi"][locale.languageCode]; + + String get childVaccineInfo => localizedValues["child-vaccine-info"][locale.languageCode]; + + String get h2oInfo => localizedValues["h2o-info"][locale.languageCode]; + + String get sysdias => localizedValues["sys/dias"][locale.languageCode]; + + String get arm => localizedValues["arm"][locale.languageCode]; + + String get removeMeasure => localizedValues["remove-measure"][locale.languageCode]; + + String get selectArm => localizedValues["select-arm"][locale.languageCode]; + + String get askDocEmpty => localizedValues["ask-doc-empty"][locale.languageCode]; + + String get onlineClinics => localizedValues["online-clinics"][locale.languageCode]; + + String get offlineClinics => localizedValues["offline-clinics"][locale.languageCode]; + + String get clinicSchedule => localizedValues["clinic-schedule"][locale.languageCode]; + + String get discount => localizedValues["discount"][locale.languageCode]; + + String get totalVAT => localizedValues["total-VAT"][locale.languageCode]; + + String get paid => localizedValues["paid"][locale.languageCode]; + + String get dentalInsurance => localizedValues["dental-insurance"][locale.languageCode]; + + String get drivethruAppo => localizedValues["drivethru-appo"][locale.languageCode]; + + String get upcomingQRNFC => localizedValues["upcoming-QR-NFC"][locale.languageCode]; + + String get ovulationDesc => localizedValues["ovulation-desc"][locale.languageCode]; + + String get cycleLabel => localizedValues["cycle-label"][locale.languageCode]; + + String get lutealLabel => localizedValues["luteal-label"][locale.languageCode]; + + String get pregnancyTitle => localizedValues["pregnancy-title"][locale.languageCode]; + + String get pregnancyDesc => localizedValues["pregnancy-desc"][locale.languageCode]; + + String get pregnancyDateLabel => localizedValues["pregnancy-date-label"][locale.languageCode]; + + String get ovulationPeriod => localizedValues["ovulation-period"][locale.languageCode]; + + String get from => localizedValues["from"][locale.languageCode]; + + String get to => localizedValues["to"][locale.languageCode]; + + String get conceive => localizedValues["conceive"][locale.languageCode]; + + String get firstTri => localizedValues["firstTri"][locale.languageCode]; + + String get secondTri => localizedValues["secondTri"][locale.languageCode]; + + String get thirdTri => localizedValues["thirdTri"][locale.languageCode]; + + String get seeDoctorsList => localizedValues["seeDoctorsList"][locale.languageCode]; + + String get covidQuestionnaire => localizedValues["covidQuestionnaire"][locale.languageCode]; + + String get covidBookAppo => localizedValues["covidBookAppo"][locale.languageCode]; + + String get emptySchedule => localizedValues["emptySchedule"][locale.languageCode]; + + String get serviceNotAvailable => localizedValues["serviceNotAvailable"][locale.languageCode]; + + String get doctorScheduleNot => localizedValues["doctorScheduleNot"][locale.languageCode]; + + String get RRTRequestSuccess => localizedValues["RRTRequestSuccess"][locale.languageCode]; + + String get rateDoctorAppo => localizedValues["rateDoctorAppo"][locale.languageCode]; + + String get invoice => localizedValues["invoice"][locale.languageCode]; + + String get requestedDate => localizedValues["requestedDate"][locale.languageCode]; + + String get callDuration => localizedValues["callDuration"][locale.languageCode]; + + String get alreadyRated => localizedValues["alreadyRated"][locale.languageCode]; + + String get insuranceCompany => localizedValues["insuranceCompany"][locale.languageCode]; + + String get referralDetails => localizedValues["referralDetails"][locale.languageCode]; + + String get preferredBranch => localizedValues["preferredBranch"][locale.languageCode]; + + String get selectPreferredBranch => localizedValues["selectPreferredBranch"][locale.languageCode]; + + String get patientLocated => localizedValues["patientLocated"][locale.languageCode]; + + String get otherInfo => localizedValues["otherInfo"][locale.languageCode]; + + String get medicalReport => localizedValues["medicalReport"][locale.languageCode]; + + String get insuredPatientReferral => localizedValues["insuredPatient"][locale.languageCode]; + + String get rateDoctor => localizedValues["rateDoctor"][locale.languageCode]; + + String get rateAppointment => localizedValues["rateAppointment"][locale.languageCode]; + + String get noInsuranceCardAttached => localizedValues["noInsuranceCardAttached"][locale.languageCode]; + + String get bodyMassIndex => localizedValues["bodyMassIndex"][locale.languageCode]; + + String get extremeObese => localizedValues["extremeObese"][locale.languageCode]; + + String get respirationBPM => localizedValues["respirationBPM"][locale.languageCode]; + + String get noSlotsError => localizedValues["noSlotsError"][locale.languageCode]; + + String get selectSlot => localizedValues["selectSlot"][locale.languageCode]; + + String get selectLanguage => localizedValues["selectLanguage"][locale.languageCode]; + + String get recAlert => localizedValues["recAlert"][locale.languageCode]; + + String get modesBelow => localizedValues["modesBelow"][locale.languageCode]; + + String get prefferedMode => localizedValues["prefferedMode"][locale.languageCode]; + + String get permissionsBellow => localizedValues["permissionsBellow"][locale.languageCode]; + + String get invoiceDetails => localizedValues["invoiceDetails"][locale.languageCode]; + + String get appoDetails => localizedValues["appoDetails"][locale.languageCode]; + + String get appoPaymentConfirm => localizedValues["appoPaymentConfirm"][locale.languageCode]; + + String get selectSearchCriteria => localizedValues["selectSearchCriteria"][locale.languageCode]; + + String get enterComplainNumber => localizedValues["enterComplainNumber"][locale.languageCode]; + + String get cancelAppointment => localizedValues["cancelAppointment"][locale.languageCode]; + + String get updateInsurCards => localizedValues["updateInsurCards"][locale.languageCode]; + + String get patientAge => localizedValues["patientAge"][locale.languageCode]; + + String get searchCriteria => localizedValues["searchCriteria"][locale.languageCode]; + + String get RequesterInfo => localizedValues["RequesterInfo"][locale.languageCode]; + + String get PatientInfo => localizedValues["PatientInfo"][locale.languageCode]; + + String get OtherInfo => localizedValues["OtherInfo"][locale.languageCode]; + + String get inPrgress => localizedValues["inPrgress"][locale.languageCode]; + + String get locked => localizedValues["locked"][locale.languageCode]; + + String get personalInfo => localizedValues['personalInfo'][locale.languageCode]; + + String get onlinePayment => localizedValues["onlinePayment"][locale.languageCode]; + + String get onlinePaymentSubtitle => localizedValues["onlinePaymentSubtitle"][locale.languageCode]; + + String get cmcTitle => localizedValues["cmcTitle"][locale.languageCode]; + + String get cmcSubtitle => localizedValues["cmcSubtitle"][locale.languageCode]; + + String get emergencyTitle => localizedValues["emergencyTitle"][locale.languageCode]; + + String get emergencySubtitle => localizedValues["emergencySubtitle"][locale.languageCode]; + + String get ereferralTitle => localizedValues["ereferralTitle"][locale.languageCode]; + + String get ereferralSubtitle => localizedValues["ereferralSubtitle"][locale.languageCode]; + + String get medicalFileTitle => localizedValues["medicalFileTitle"][locale.languageCode]; + + String get My_File_Details => localizedValues["My_File_Details"][locale.languageCode]; + + String get Ecommerce => localizedValues["Ecommerce"][locale.languageCode]; + + String get Family_Files => localizedValues["Family_Files"][locale.languageCode]; + + String get My_Child => localizedValues["My_Child"][locale.languageCode]; + + String get Vaccines => localizedValues["Vaccines"][locale.languageCode]; + + String get Todo => localizedValues["Todo"][locale.languageCode]; + + String get list => localizedValues["List"][locale.languageCode]; + + String get Blood => localizedValues["Blood"][locale.languageCode]; + + String get Donation => localizedValues["Donation"][locale.languageCode]; + + String get Health => localizedValues["Health"][locale.languageCode]; + + String get Calculator => localizedValues["Calculator"][locale.languageCode]; + + String get Converter => localizedValues["Converter"][locale.languageCode]; + + String get Smart => localizedValues["Smart"][locale.languageCode]; + + String get Watches => localizedValues["Watches"][locale.languageCode]; + + String get Parking => localizedValues["Parking"][locale.languageCode]; + + String get Details => localizedValues["Details"][locale.languageCode]; + + String get Virtual => localizedValues["Virtual"][locale.languageCode]; + + String get News => localizedValues["News"][locale.languageCode]; + + String get Latest => localizedValues["Latest"][locale.languageCode]; + + String get Tour => localizedValues["Tour"][locale.languageCode]; + + String get mostViewed => localizedValues["mostViewed"][locale.languageCode]; + + String get newProducts => localizedValues["newProducts"][locale.languageCode]; + + String get enterDetails => localizedValues["enterDetails"][locale.languageCode]; + + String get paymentSelected => localizedValues["paymentSelected"][locale.languageCode]; + + String get moreNotifications => localizedValues["moreNotifications"][locale.languageCode]; + + String get familyTitle => localizedValues["familyTitle"][locale.languageCode]; + + String get familySubtitle => localizedValues["familySubtitle"][locale.languageCode]; + + String get liveCareTitle => localizedValues["liveCareTitle"][locale.languageCode]; + + String get liveCareSubtitle => localizedValues["liveCareSubtitle"][locale.languageCode]; + + String get pharmacyTitle => localizedValues["pharmacyTitle"][locale.languageCode]; + + String get pharmacySubtitle => localizedValues["pharmacySubtitle"][locale.languageCode]; + + String get parkingTitle2 => localizedValues["parkingTitle2"][locale.languageCode]; + + String get parkingSubtitle => localizedValues["ParkingSubtitle"][locale.languageCode]; + + String get healthCalculatorTitle => localizedValues["healthCalculatorTitle"][locale.languageCode]; + + String get healthCalculatorSubtitle => localizedValues["healthCalculatorSubtitle"][locale.languageCode]; + + String get waterTitle => localizedValues["waterTitle"][locale.languageCode]; + + String get waterSubtitle => localizedValues["waterSubtitle"][locale.languageCode]; + + String get medicalFileTitle2 => localizedValues["medicalFileTitle2"][locale.languageCode]; + + String get medicalFileSubtitle => localizedValues["medicalFileSubtitle"][locale.languageCode]; + + String get healthConvertersTitle => localizedValues["healthConvertersTitle"][locale.languageCode]; + + String get healthConvertersSubtitle => localizedValues["healthConvertersSubtitle"][locale.languageCode]; + + String get syncHealthData => localizedValues["syncHealthData"][locale.languageCode]; + + String get steps => localizedValues["steps"][locale.languageCode]; + + String get avgSteps => localizedValues["avgSteps"][locale.languageCode]; + + String get avgDistance => localizedValues["avgDistance"][locale.languageCode]; + + String get avgHeartRate => localizedValues["avgHeartRate"][locale.languageCode]; + + String get alreadySynced => localizedValues["alreadySynced"][locale.languageCode]; + + String get syncInstructionsIntro1 => localizedValues["sync-instructions-intro1"][locale.languageCode]; + + String get syncInstructionsIntro2 => localizedValues["sync-instructions-intro2"][locale.languageCode]; + + String get syncInstructionsIntro3 => localizedValues["sync-instructions-intro3"][locale.languageCode]; + + String get iosInstructions1 => localizedValues["ios-instructions-1"][locale.languageCode]; + + String get iosInstructions2 => localizedValues["ios-instructions-2"][locale.languageCode]; + + String get iosInstructions3 => localizedValues["ios-instructions-3"][locale.languageCode]; + + String get supportedWatches => localizedValues["supportedWatches"][locale.languageCode]; + + String get watchInstructions => localizedValues["watchInstructions"][locale.languageCode]; + + String get monthlyTab => localizedValues["monthlyTab"][locale.languageCode]; + + String get moreSupportedWatches => localizedValues["moreSupportedWatches"][locale.languageCode]; + + String get androidInstructions1 => localizedValues["android-instructions-1"][locale.languageCode]; + + String get androidInstructions2 => localizedValues["android-instructions-2"][locale.languageCode]; + + String get androidInstructions3 => localizedValues["android-instructions-3"][locale.languageCode]; + + String get androidInstructions4 => localizedValues["android-instructions-4"][locale.languageCode]; + + String get tamaraInstPlan => localizedValues["tamaraInstPlan"][locale.languageCode]; + + String get onlineTag => localizedValues["onlineTag"][locale.languageCode]; + + String get offlineTag => localizedValues["offlineTag"][locale.languageCode]; + + String get viewDocList => localizedValues["viewDocList"][locale.languageCode]; + + String get bodyFatTitle => localizedValues["bodyFatTitle"][locale.languageCode]; + + String get cholesTitle => localizedValues["cholesTitle"][locale.languageCode]; + + String get laserClinic => localizedValues["laserClinic"][locale.languageCode]; + + String get noImage => localizedValues["noImage"][locale.languageCode]; + + String get signoutMessage => localizedValues["signoutMessage"][locale.languageCode]; + + String get RRTTitle => localizedValues["RRTTitle"][locale.languageCode]; + + String get RRTSubTitle => localizedValues["RRTSubTitle"][locale.languageCode]; + + String get transportation => localizedValues["transportation"][locale.languageCode]; + + String get browseOffers => localizedValues["browseOffers"][locale.languageCode]; + + String get browseOffersByProject => localizedValues["browseOffersByProject"][locale.languageCode]; + + String get myCart => localizedValues["myCart"][locale.languageCode]; + + String get neck => localizedValues["neck"][locale.languageCode]; + + String get waist => localizedValues["waist"][locale.languageCode]; + + String get hip => localizedValues["hip"][locale.languageCode]; + + String get carbsProtin => localizedValues["carbsProtin"][locale.languageCode]; + + String get inactiveAct => localizedValues["inactiveAct"][locale.languageCode]; + + String get light => localizedValues["light"][locale.languageCode]; + + String get moderate => localizedValues["moderate"][locale.languageCode]; + + String get very => localizedValues["very"][locale.languageCode]; + + String get superAct => localizedValues["super"][locale.languageCode]; + + String get resultCalories => localizedValues["resultCalories"][locale.languageCode]; + + String get bmrDesc => localizedValues["bmrDesc"][locale.languageCode]; + + String get idealWeightDesc => localizedValues["idealWeightDesc"][locale.languageCode]; + + String get bodyFrame => localizedValues["bodyFrame"][locale.languageCode]; + + String get bodyFrameSmall => localizedValues["bodyFrameSmall"][locale.languageCode]; + + String get bodyFrameMedium => localizedValues["bodyFrameMedium"][locale.languageCode]; + + String get bodyFrameLarge => localizedValues["bodyFrameLarge"][locale.languageCode]; + + String get bodyFatDesc => localizedValues["bodyFatDesc"][locale.languageCode]; + + String get essential => localizedValues["essential"][locale.languageCode]; + + String get athlete => localizedValues["athlete"][locale.languageCode]; + + String get fitness => localizedValues["fitness"][locale.languageCode]; + + String get acceptable => localizedValues["acceptable"][locale.languageCode]; + + String get obeseBodyFat => localizedValues["obeseBodyFat"][locale.languageCode]; + + String get invalid => localizedValues["invalid"][locale.languageCode]; + + String get more => localizedValues["more"][locale.languageCode]; + + String get less => localizedValues["less"][locale.languageCode]; + + String get carbProteinDesc => localizedValues["carbProteinDesc"][locale.languageCode]; + + String get calDay => localizedValues["calDay"][locale.languageCode]; + + String get notSure => localizedValues["notSure"][locale.languageCode]; + + String get selectDiet => localizedValues["selectDiet"][locale.languageCode]; + + String get dietVeryLow => localizedValues["dietVeryLow"][locale.languageCode]; + + String get dietLow => localizedValues["dietLow"][locale.languageCode]; + + String get dietModerate => localizedValues["dietModerate"][locale.languageCode]; + + String get dietUSDA => localizedValues["dietUSDA"][locale.languageCode]; + + String get dietZone => localizedValues["dietZone"][locale.languageCode]; + + String get useFullInfo => localizedValues["usefulInfo"][locale.languageCode]; + + String get babyAge => localizedValues["babyAge"][locale.languageCode]; + + String get babyAgeAvail => localizedValues["babyAgeAvail"][locale.languageCode]; + + String get deliveryDue => localizedValues["deliveryDue"][locale.languageCode]; + + String get almostInactive => localizedValues["almostInactive"][locale.languageCode]; + + String get lightActive1 => localizedValues["lightActive1"][locale.languageCode]; + + String get veryActive => localizedValues["veryActive"][locale.languageCode]; + + String get superActive => localizedValues["superActive"][locale.languageCode]; + + String get dailyIntake => localizedValues["dailyIntake"][locale.languageCode]; + + String get calculateAmount => localizedValues["calculateAmount"][locale.languageCode]; + + String get bodyWillBurn => localizedValues["bodyWillBurn"][locale.languageCode]; + + String get caloriesEachDay => localizedValues["caloriesEachDay"][locale.languageCode]; + + String get maintainWeight => localizedValues["maintainWeight"][locale.languageCode]; + + String get mediumFinger => localizedValues["mediumFinger"][locale.languageCode]; + + String get smallFinger => localizedValues["smallFinger"][locale.languageCode]; + + String get largeFinger => localizedValues["largeFinger"][locale.languageCode]; + + String get idealBodyWeight => localizedValues["idealBodyWeight"][locale.languageCode]; + + String get bodyFrameSize => localizedValues["bodyFrameSize"][locale.languageCode]; + + String get idealWeightRange => localizedValues["idealWeightRange"][locale.languageCode]; + + String get currentWeightPerfect => localizedValues["currentWeightPerfect"][locale.languageCode]; + + String get littleBitWeightMore => localizedValues["littleBitWeightMore"][locale.languageCode]; + + String get consultWithDoctor => localizedValues["consultWithDoctor"][locale.languageCode]; + + String get excessiveObesity => localizedValues["excessiveObesity"][locale.languageCode]; + + String get mayWish => localizedValues["mayWish"][locale.languageCode]; + + String get underObese => localizedValues["underObese"][locale.languageCode]; + + String get crossedLimits => localizedValues["crossedLimits"][locale.languageCode]; + + String get lowLimits => localizedValues["lowLimits"][locale.languageCode]; + + String get estimates => localizedValues["estimates"][locale.languageCode]; + + String get submitReview => localizedValues["submitReview"][locale.languageCode]; + + String get Protein => localizedValues["Protein"][locale.languageCode]; + + String get Cals => localizedValues["Cals"][locale.languageCode]; + + String get gramsPerDay => localizedValues["gramsPerDay"][locale.languageCode]; + + String get gr => localizedValues["gr"][locale.languageCode]; + + String get gramsPerMeal => localizedValues["gramsPerMeal"][locale.languageCode]; + + String get cancelReminder => localizedValues["CancelReminder"][locale.languageCode]; + + String get reminderCancelSuccess => localizedValues["reminderCancelSuccess"][locale.languageCode]; + + String get syncSuccess => localizedValues["syncSuccess"][locale.languageCode]; + + String get useLakumPoints => localizedValues["useLakumPoints"][locale.languageCode]; + + String get points => localizedValues["points"][locale.languageCode]; + + String get availableBalance => localizedValues["availableBalance"][locale.languageCode]; + + String get ordersDashboard => localizedValues["ordersDashboard"][locale.languageCode]; + + String get requestedDateLiveCare => localizedValues["requestedDateLiveCare"][locale.languageCode]; + + String get yourTurn => localizedValues["yourTurn"][locale.languageCode]; + + String get patients => localizedValues["patients"][locale.languageCode]; + + String get group => localizedValues["group"][locale.languageCode]; + + String get ancillaryOrdersPaymentConfirm => localizedValues["ancillaryOrdersPaymentConfirm"][locale.languageCode]; + + String get covidTestTodo => localizedValues["covidTestTodo"][locale.languageCode]; + + String get successRegister => localizedValues["successRegister"][locale.languageCode]; + + String get pharmacyLiveCare => localizedValues["pharmacyLiveCare"][locale.languageCode]; + + String get ancillaryOrderPaymentSuccess => localizedValues["ancillaryOrderPaymentSuccess"][locale.languageCode]; + + String get connectTitle => localizedValues["connectTitle"][locale.languageCode]; + + String get connectSubtitle => localizedValues["connectSubtitle"][locale.languageCode]; + + String get declineLbl => localizedValues["declineLbl"][locale.languageCode]; + + String get covidConsent => localizedValues["covidConsent"][locale.languageCode]; + + String get covidConsentHeader => localizedValues["covidConsentHeader"][locale.languageCode]; + + String get drawOverAppsPermission => localizedValues["drawOverAppsPermission"][locale.languageCode]; + + String get selectTamaraPlan => localizedValues["selectTamaraPlan"][locale.languageCode]; + + String get installments => localizedValues["installments"][locale.languageCode]; + + String get cameraPermissionDialog => localizedValues["cameraPermissionDialog"][locale.languageCode]; + + String get galleryPermission => localizedValues["galleryPermission"][locale.languageCode]; + + String get locationPermissionDialog => localizedValues["locationPermissionDialog"][locale.languageCode]; + + String get calendarPermission => localizedValues["calendarPermission"][locale.languageCode]; + + String get recordAudioPermission => localizedValues["recordAudioPermission"][locale.languageCode]; + + String get wifiPermission => localizedValues["wifiPermission"][locale.languageCode]; + + String get physicalActivityPermission => localizedValues["physicalActivityPermission"][locale.languageCode]; + + String get bluetoothPermission => localizedValues["bluetoothPermission"][locale.languageCode]; + + String get privacyPolicy => localizedValues["privacyPolicy"][locale.languageCode]; + + String get termsConditions => localizedValues["termsConditions"][locale.languageCode]; + + String get liveCarePermissions => localizedValues["liveCarePermissions"][locale.languageCode]; + + String get prescriptionDeliveryError => localizedValues["prescriptionDeliveryError"][locale.languageCode]; + + String get lakumUnhold => localizedValues["lakumUnhold"][locale.languageCode]; + + String get lakumDiscontinue => localizedValues["lakumDiscontinue"][locale.languageCode]; + + String get lakumSuccess => localizedValues["lakumSuccess"][locale.languageCode]; + + String get deleteAccount => localizedValues["deleteAccount"][locale.languageCode]; + + String get deactivateAccount => localizedValues["deactivateAccount"][locale.languageCode]; + + String get accountDeactivated => localizedValues["accountDeactivated"][locale.languageCode]; + + String get accountDeactivatedMsg => localizedValues["accountDeactivatedMsg"][locale.languageCode]; + + String get updateInsuranceManually => localizedValues["updateInsuranceManually"][locale.languageCode]; + + String get enterInsuranceDetails => localizedValues["enterInsuranceDetails"][locale.languageCode]; + + String get cardHolderName => localizedValues["cardHolderName"][locale.languageCode]; + + String get membershipNo => localizedValues["membershipNo"][locale.languageCode]; + + String get insurancePolicyNo => localizedValues["policyNo"][locale.languageCode]; + + String get insuranceClassName => localizedValues["insuranceClassName"][locale.languageCode]; + + String get NFCNotSupported => localizedValues["NFCNotSupported"][locale.languageCode]; + + String get paymentOnly => localizedValues["paymentOnly"][locale.languageCode]; + + String get pendingOnly => localizedValues["pendingOnly"][locale.languageCode]; + + String get insuranceRequestSubmit => localizedValues["insuranceRequestSubmit"][locale.languageCode]; + + String get enterWorkplaceName => localizedValues["enter-workplace-name"][locale.languageCode]; + + String get workplaceName => localizedValues["workplaceName"][locale.languageCode]; + + String get needApproval => localizedValues["needApproval"][locale.languageCode]; + + String get callLiveCareSupport => localizedValues["callLiveCareSupport"][locale.languageCode]; + + String get pendingActivation => localizedValues["pendingActivation"][locale.languageCode]; + + String get awaitingApproval => localizedValues["awaitingApproval"][locale.languageCode]; + + String get liveCareSupportContact => localizedValues["liveCareSupportContact"][locale.languageCode]; + + String get scanNFC => localizedValues["scanNFC"][locale.languageCode]; + + String get pharmaLiveCare => localizedValues["pharmaLiveCare"][locale.languageCode]; + + String get pharmaLiveCare1 => localizedValues["pharmaLiveCare1"][locale.languageCode]; + + String get pharmaLiveCareDesc1 => localizedValues["pharmaLiveCareDesc1"][locale.languageCode]; + + String get wherePharmaLiveCare => localizedValues["wherePharmaLiveCare"][locale.languageCode]; + + String get pharmaLiveCareDesc2 => localizedValues["pharmaLiveCareDesc2"][locale.languageCode]; + + String get howPharmaLiveCare => localizedValues["howPharmaLiveCare"][locale.languageCode]; + + String get pharmaLiveCareDesc3 => localizedValues["pharmaLiveCareDesc3"][locale.languageCode]; + + String get pharmaLiveCareScanQR => localizedValues["pharmaLiveCareScanQR"][locale.languageCode]; + + String get pharmaLiveCareScanQR1 => localizedValues["pharmaLiveCareScanQR1"][locale.languageCode]; + + String get pharmaLiveCareMakePayment => localizedValues["pharmaLiveCareMakePayment"][locale.languageCode]; + + String get pharmaLiveCareMakePayment1 => localizedValues["pharmaLiveCareMakePayment1"][locale.languageCode]; + + String get pharmaLiveCareJoinConsultation => localizedValues["pharmaLiveCareJoinConsultation"][locale.languageCode]; + + String get pharmaLiveCareJoinConsultation1 => localizedValues["pharmaLiveCareJoinConsultation1"][locale.languageCode]; + + String get emergencyServicesSubtitle => localizedValues["emergencyServicesSubtitle"][locale.languageCode]; + + String get rateDoctorResponse => localizedValues["rateDoctorResponse"][locale.languageCode]; + + String get comments => localizedValues["comments"][locale.languageCode]; + + String get rateDoctorResponseHeading => localizedValues["rateDoctorResponseHeading"][locale.languageCode]; + + String get updateInsuranceManuallyDialog => localizedValues["updateInsuranceManuallyDialog"][locale.languageCode]; + + String get viewReport => localizedValues["viewReport"][locale.languageCode]; + + String get sickLeaveAdmittedPatient => localizedValues["sickLeaveAdmittedPatient"][locale.languageCode]; + + String get InPatient => localizedValues["InPatient"][locale.languageCode]; + + String get inPatientServices => localizedValues["InPatientServices"][locale.languageCode]; + + String get InPatientServicesHeader => localizedValues["InPatientServicesHeader"][locale.languageCode]; + + String get admissionGeneral => localizedValues["admissionGeneral"][locale.languageCode]; + + String get consent => localizedValues["consent"][locale.languageCode]; + + String get generalInstructionsTitle => localizedValues["generalInstructionsTitle"][locale.languageCode]; + + String get generalInstructionsSubTitle => localizedValues["generalInstructionsSubTitle"][locale.languageCode]; + + String get medicalInstructionsTitle => localizedValues["medicalInstructionsTitle"][locale.languageCode]; + + String get medicalInstructionsSubTitle => localizedValues["medicalInstructionsSubTitle"][locale.languageCode]; + + String get mealPlanTitle => localizedValues["mealPlanTitle"][locale.languageCode]; + + String get mealPlanSubTitle => localizedValues["mealPlanSubTitle"][locale.languageCode]; + + String get birthNotificationTitle => localizedValues["birthNotificationTitle"][locale.languageCode]; + + String get birthNotificationSubTitle => localizedValues["birthNotificationSubTitle"][locale.languageCode]; + + String get admissionNoticeTitle => localizedValues["admissionNoticeTitle"][locale.languageCode]; + + String get admissionNoticeSubTitle => localizedValues["admissionNoticeSubTitle"][locale.languageCode]; + + String get mothersMRN => localizedValues["mothersMRN"][locale.languageCode]; + + String get mothersName => localizedValues["mothersName"][locale.languageCode]; + + String get fathersNameEN => localizedValues["fathersNameEN"][locale.languageCode]; + + String get fathersNameAR => localizedValues["fathersNameAR"][locale.languageCode]; + + String get babysNameEN => localizedValues["babysNameEN"][locale.languageCode]; + + String get babysNameAR => localizedValues["babysNameAR"][locale.languageCode]; + + String get contactNumber => localizedValues["contactNumber"][locale.languageCode]; + + String get scanID => localizedValues["scanID"][locale.languageCode]; + + String get birthNotificationNotes1 => localizedValues["birthNotificationNotes1"][locale.languageCode]; + + String get birthNotificationNotes2 => localizedValues["birthNotificationNotes2"][locale.languageCode]; + + String get birthNotificationNotes3 => localizedValues["birthNotificationNotes3"][locale.languageCode]; + + String get placeOrder => localizedValues["placeOrder"][locale.languageCode]; + + String get isFasting => localizedValues["isFasting"][locale.languageCode]; + + String get noGeneralInstructions => localizedValues["noGeneralInstructions"][locale.languageCode]; + + String get noMedicalInstructions => localizedValues["noMedicalInstructions"][locale.languageCode]; + + String get medicalInstructions => localizedValues["medicalInstructions"][locale.languageCode]; + + String get generalInstructions => localizedValues["generalInstructions"][locale.languageCode]; + + String get copyLink => localizedValues["copyLink"][locale.languageCode]; + + String get copyLinkTxt => localizedValues["copyLinkTxt"][locale.languageCode]; + + String get paymentLinkCopied => localizedValues["paymentLinkCopied"][locale.languageCode]; + + String get proErrorMessage => localizedValues["proErrorMessage"][locale.languageCode]; + + String get admissionNo => localizedValues["admissionNo"][locale.languageCode]; + + String get admissionReqNo => localizedValues["admissionReqNo"][locale.languageCode]; + + String get dischargeDate => localizedValues["dischargeDate"][locale.languageCode]; + + String get selectAdmissionText => localizedValues["selectAdmissionText"][locale.languageCode]; + + String get onlyAdmitted => localizedValues["onlyAdmitted"][locale.languageCode]; + + String get assistYou => localizedValues["assistYou"][locale.languageCode]; + + String get receive => localizedValues["receive"][locale.languageCode]; + + String get PRO => localizedValues["PRO"][locale.languageCode]; + + String get patientRelationOffice => localizedValues["patientRelationOffice"][locale.languageCode]; + + String get roomNo => localizedValues["roomNo"][locale.languageCode]; + + String get generalConsent => localizedValues["generalConsent"][locale.languageCode]; + + String get generalConsent1 => localizedValues["generalConsent1"][locale.languageCode]; + + String get hospitalRules => localizedValues["hospitalRules"][locale.languageCode]; + + String get generalConsent2 => localizedValues["generalConsent2"][locale.languageCode]; + + String get communicationConsent => localizedValues["communicationConsent"][locale.languageCode]; + + String get generalConsent3 => localizedValues["generalConsent3"][locale.languageCode]; + + String get releaseConsent => localizedValues["releaseConsent"][locale.languageCode]; + + String get generalConsent4 => localizedValues["generalConsent4"][locale.languageCode]; + + String get generalConsent5 => localizedValues["generalConsent5"][locale.languageCode]; + + String get valuables => localizedValues["valuables"][locale.languageCode]; + + String get generalConsent6 => localizedValues["generalConsent6"][locale.languageCode]; + + String get financialConsent => localizedValues["financialConsent"][locale.languageCode]; + + String get generalConsent7 => localizedValues["generalConsent7"][locale.languageCode]; + + String get dataSharingConsent => localizedValues["dataSharingConsent"][locale.languageCode]; + + String get generalConsent8 => localizedValues["generalConsent8"][locale.languageCode]; + + String get permissionLeaveConsent => localizedValues["permissionLeaveConsent"][locale.languageCode]; + + String get generalConsent9 => localizedValues["generalConsent9"][locale.languageCode]; + + String get observeConsent => localizedValues["observeConsent"][locale.languageCode]; + + String get generalConsent10 => localizedValues["generalConsent10"][locale.languageCode]; + + String get noGuaranteeConsent => localizedValues["noGuaranteeConsent"][locale.languageCode]; + + String get generalConsent11 => localizedValues["generalConsent11"][locale.languageCode]; + + String get disputeConsent => localizedValues["disputeConsent"][locale.languageCode]; + + String get generalConsent12 => localizedValues["generalConsent12"][locale.languageCode]; + + String get patientsRightsConsent => localizedValues["patientsRightsConsent"][locale.languageCode]; + + String get generalConsent13 => localizedValues["generalConsent13"][locale.languageCode]; + + String get acknowledgementConsent => localizedValues["acknowledgementConsent"][locale.languageCode]; + + String get generalConsent14 => localizedValues["generalConsent14"][locale.languageCode]; + + String get invalidEligibility => localizedValues["invalidEligibility"][locale.languageCode]; + + String get invalidInsurance => localizedValues["invalidInsurance"][locale.languageCode]; + + String get continueCash => localizedValues["continueCash"][locale.languageCode]; + + String get updateInsuranceText => localizedValues["updateInsurance"][locale.languageCode]; + + String get downloadReport => localizedValues["downloadReport"][locale.languageCode]; + + String get habibCallCenter => localizedValues["habibCallCenter"][locale.languageCode]; + + String get cashAmountUpdateInsurance => localizedValues["cashAmountUpdateInsurance"][locale.languageCode]; + + String get validInsurance => localizedValues["validInsurance"][locale.languageCode]; + + String get contactRRT => localizedValues["contactRRT"][locale.languageCode]; + + String get checkInViaLocation => localizedValues["checkInViaLocation"][locale.languageCode]; + + String get locationCheckInError => localizedValues["locationCheckInError"][locale.languageCode]; + + String get upcoming => localizedValues["upcoming"][locale.languageCode]; + + String get noUpcomingAppointment => localizedValues["noUpcomingAppointment"][locale.languageCode]; + + String get locationTimeoutError => localizedValues["locationTimeoutError"][locale.languageCode]; + + String get loadMore => localizedValues["loadMore"][locale.languageCode]; + + String get selectHospitalBloodDonation => localizedValues["selectHospitalBloodDonation"][locale.languageCode]; + + String get wecare => localizedValues["wecare"][locale.languageCode]; + + String get myinstructions => localizedValues["myinstructions"][locale.languageCode]; + + String get clinicLocation => localizedValues["clinicLocation"][locale.languageCode]; + + String get waitingAppointment => localizedValues["waitingAppointment"][locale.languageCode]; + + String get whatWaitingAppointment => localizedValues["whatWaitingAppointment"][locale.languageCode]; + + String get waitingAppointmentText1 => localizedValues["waitingAppointmentText1"][locale.languageCode]; + + String get waitingAppointmentText2 => localizedValues["waitingAppointmentText2"][locale.languageCode]; + + String get waitingAppointmentText3 => localizedValues["waitingAppointmentText3"][locale.languageCode]; + + String get waitingAppointmentVerificationMethod => localizedValues["waitingAppointmentVerificationMethod"][locale.languageCode]; + + String get howToUseVerificationMethod => localizedValues["howToUseVerificationMethod"][locale.languageCode]; + + String get addToWaitingList => localizedValues["addToWaitingList"][locale.languageCode]; + + String get searchClinic => localizedValues["searchClinic"][locale.languageCode]; + + String get enterMobileNumber => localizedValues["enterMobileNumber"][locale.languageCode]; + + String get videoCall => localizedValues["videoCall"][locale.languageCode]; + + String get audioCall => localizedValues["audioCall"][locale.languageCode]; + + String get phoneCall => localizedValues["phoneCall"][locale.languageCode]; + + String get selectCallType => localizedValues["selectCallType"][locale.languageCode]; + + String get selectedCallType => localizedValues["selectedCallType"][locale.languageCode]; + + String get selectBranch => localizedValues["selectBranch"][locale.languageCode]; + + String get searchByBranch => localizedValues["searchByBranch"][locale.languageCode]; + + String get existingPackage => localizedValues["existingPackage"][locale.languageCode]; + + String get continueOrbookNew => localizedValues["continueOrbookNew"][locale.languageCode]; + + String get newAppointment => localizedValues["newAppointment"][locale.languageCode]; + + String get proceedPackage => localizedValues["proceedPackage"][locale.languageCode]; + + String get hospitalNavigationTitle => localizedValues["hospitalNavigationTitle"][locale.languageCode]; + + String get hospitalNavigationSubtitle => localizedValues["hospitalNavigationSubtitle"][locale.languageCode]; + + String get workplaceNameAr => localizedValues["workplaceNameAr"][locale.languageCode]; + + String get occupationNameEn => localizedValues["occupationNameEn"][locale.languageCode]; + + String get occupationNameAr => localizedValues["occupationNameAr"][locale.languageCode]; + + String get continueAgreeTerms => localizedValues["continueAgreeTerms"][locale.languageCode]; + + String get agreeText => localizedValues["agreeText"][locale.languageCode]; + + String get ERCheckInSuccess => localizedValues["ERCheckInSuccess"][locale.languageCode]; + + String get generalConsentTitle => localizedValues["generalConsentTitle"][locale.languageCode]; + + String get generalConsentSubTitle => localizedValues["generalConsentSubTitle"][locale.languageCode]; + + String get incorrectNationalId => localizedValues["incorrectNationalId"][locale.languageCode]; + + String get resultStatus => localizedValues["resultStatus"][locale.languageCode]; + + String get labResultFlag => localizedValues["labResultFlag"][locale.languageCode]; + + String get selectOccupation => localizedValues["selectOccupation"][locale.languageCode]; + + String get selectOccupationError => localizedValues["selectOccupationError"][locale.languageCode]; + + String get whatIsOnlineCheckIn => localizedValues["whatIsOnlineCheckIn"][locale.languageCode]; + + String get EROnlineCheckInDesc1 => localizedValues["EROnlineCheckInDesc1"][locale.languageCode]; + + String get EROnlineCheckInHow => localizedValues["EROnlineCheckInHow"][locale.languageCode]; + + String get EROnlineCheckInTapOn => localizedValues["EROnlineCheckInTapOn"][locale.languageCode]; + + String get EROnlineCheckInTapOnCheckIn => localizedValues["EROnlineCheckInTapOnCheckIn"][locale.languageCode]; + + String get EROnlineCheckInHoldPhone => localizedValues["EROnlineCheckInHoldPhone"][locale.languageCode]; + + String get EROnlineCheckInHoldPhoneInstruction => localizedValues["EROnlineCheckInHoldPhoneInstruction"][locale.languageCode]; + + String get EROnlineCheckInWaitTurn => localizedValues["EROnlineCheckInWaitTurn"][locale.languageCode]; + + String get EROnlineCheckInWaitTurnInstruction => localizedValues["EROnlineCheckInWaitTurnInstruction"][locale.languageCode]; + + String get download => localizedValues["download"][locale.languageCode]; + + String get share => localizedValues["share"][locale.languageCode]; + String get selectRegion => localizedValues["selectRegion"][locale.languageCode]; + String get selectFacitlity => localizedValues["selectFacitlity"][locale.languageCode]; + String get selectDoctor => localizedValues["selectDoctor"][locale.languageCode]; + String get hmgHospital => localizedValues["hmgHospital"][locale.languageCode]; + String get hmcHospital => localizedValues["hmcHospital"][locale.languageCode]; + + String get hmcHospitalCountSingle => + localizedValues["hmcHospitalCountSingle"][locale.languageCode]; + + String get hmgHospitalCountSingle => + localizedValues["hmgHospitalCountSingle"][locale.languageCode]; + + String get hmcHospitalCountPlural => + localizedValues["hmcHospitalCountPlural"][locale.languageCode]; + + String get hmgHospitalCountPlural => + localizedValues["hmgHospitalCountPlural"][locale.languageCode]; + String get nearest => localizedValues["nearest"][locale.languageCode]; + + String get kilometerUnit => + localizedValues["kilometerUnit"][locale.languageCode]; + + String HospitalString(num value) { + if (value == 1 || value == 0) + return localizedValues["hmgHospitalCountSingle"][locale + .languageCode]; else + return localizedValues["hmgHospitalCountPlural"][locale.languageCode]; + } + + String MedicalCenterString(num value) { + if (value == 1 || value == 0) + return localizedValues["hmcHospitalCountSingle"][locale + .languageCode]; else + return localizedValues["hmcHospitalCountPlural"][locale.languageCode]; + } + + String get termsHeading => localizedValues["termsHeading"][locale.languageCode]; + String get termsConditions1 => localizedValues["termsConditions1"][locale.languageCode]; + String get termsConditions2 => localizedValues["termsConditions2"][locale.languageCode]; + String get termsConditions3 => localizedValues["termsConditions3"][locale.languageCode]; + String get termsConditions4 => localizedValues["termsConditions4"][locale.languageCode]; + String get termsConditions5 => localizedValues["termsConditions5"][locale.languageCode]; + String get termsHeading2 => localizedValues["termsHeading2"][locale.languageCode]; + String get termsConditions6 => localizedValues["termsConditions6"][locale.languageCode]; + String get termsHeading3 => localizedValues["termsHeading3"][locale.languageCode]; + String get termsConditions7 => localizedValues["termsConditions7"][locale.languageCode]; + String get termsConditions8 => localizedValues["termsConditions8"][locale.languageCode]; + String get termsConditions9 => localizedValues["termsConditions9"][locale.languageCode]; + String get termsConditions10 => localizedValues["termsConditions10"][locale.languageCode]; + String get termsConditions11 => localizedValues["termsConditions11"][locale.languageCode]; + String get termsConditions12 => localizedValues["termsConditions12"][locale.languageCode]; + String get termsConditions12a => localizedValues["termsConditions12a"][locale.languageCode]; + String get termsConditions12b => localizedValues["termsConditions12b"][locale.languageCode]; + String get termsConditions12c => localizedValues["termsConditions12c"][locale.languageCode]; + String get termsConditions13 => localizedValues["termsConditions13"][locale.languageCode]; + String get termsConditions14 => localizedValues["termsConditions14"][locale.languageCode]; + String get termsConditions14a => localizedValues["termsConditions14a"][locale.languageCode]; + String get termsConditions14b => localizedValues["termsConditions14b"][locale.languageCode]; + String get termsHeading4 => localizedValues["termsHeading4"][locale.languageCode]; + String get termsConditions15 => localizedValues["termsConditions15"][locale.languageCode]; + String get termsConditions16 => localizedValues["termsConditions16"][locale.languageCode]; + String get termsConditions16a => localizedValues["termsConditions16a"][locale.languageCode]; + String get termsConditions16b => localizedValues["termsConditions16b"][locale.languageCode]; + String get termsConditions17 => localizedValues["termsConditions17"][locale.languageCode]; + String get termsConditions18 => localizedValues["termsConditions18"][locale.languageCode]; + String get termsConditions19 => localizedValues["termsConditions19"][locale.languageCode]; + String get termsConditions19a => localizedValues["termsConditions19a"][locale.languageCode]; + String get termsConditions19b => localizedValues["termsConditions19b"][locale.languageCode]; + String get termsHeading5 => localizedValues["termsHeading5"][locale.languageCode]; + String get termsConditions20 => localizedValues["termsConditions20"][locale.languageCode]; + String get termsConditions21 => localizedValues["termsConditions21"][locale.languageCode]; + String get termsHeading6 => localizedValues["termsHeading6"][locale.languageCode]; + String get termsConditions22 => localizedValues["termsConditions22"][locale.languageCode]; + String get termsConditions23 => localizedValues["termsConditions23"][locale.languageCode]; + String get termsConditions24 => localizedValues["termsConditions24"][locale.languageCode]; + String get termsHeading7 => localizedValues["termsHeading7"][locale.languageCode]; + String get termsConditions25 => localizedValues["termsConditions25"][locale.languageCode]; + String get termsConditions25a => localizedValues["termsConditions25a"][locale.languageCode]; + String get termsConditions25b => localizedValues["termsConditions20"][locale.languageCode]; + String get termsConditions25c => localizedValues["termsConditions25b"][locale.languageCode]; + String get termsConditions26 => localizedValues["termsConditions26"][locale.languageCode]; + String get termsConditions27 => localizedValues["termsConditions27"][locale.languageCode]; + String get termsConditions28 => localizedValues["termsConditions28"][locale.languageCode]; + String get termsConditions29 => localizedValues["termsConditions29"][locale.languageCode]; + String get termsConditions30 => localizedValues["termsConditions30"][locale.languageCode]; + String get termsConditions31 => localizedValues["termsConditions31"][locale.languageCode]; + String get termsConditions32 => localizedValues["termsConditions32"][locale.languageCode]; + String get termsHeading8 => localizedValues["termsHeading8"][locale.languageCode]; + String get termsConditions33 => localizedValues["termsConditions33"][locale.languageCode]; + String get termsConditions33a => localizedValues["termsConditions33a"][locale.languageCode]; + String get termsConditions33b => localizedValues["termsConditions33b"][locale.languageCode]; + String get termsConditions34 => localizedValues["termsConditions34"][locale.languageCode]; + String get termsConditions34a => localizedValues["termsConditions34a"][locale.languageCode]; + String get termsConditions34b => localizedValues["termsConditions34b"][locale.languageCode]; + String get termsConditions34c => localizedValues["termsConditions34c"][locale.languageCode]; + String get termsConditions34d => localizedValues["termsConditions34d"][locale.languageCode]; + String get termsConditions34e => localizedValues["termsConditions34e"][locale.languageCode]; + String get termsConditions35 => localizedValues["termsConditions35"][locale.languageCode]; + String get termsConditions35a => localizedValues["termsConditions35a"][locale.languageCode]; + String get termsConditions35b => localizedValues["termsConditions35b"][locale.languageCode]; + String get termsConditions35c => localizedValues["termsConditions35c"][locale.languageCode]; + String get termsConditions35d => localizedValues["termsConditions35d"][locale.languageCode]; + String get termsConditions35e => localizedValues["termsConditions35e"][locale.languageCode]; + String get termsConditions36 => localizedValues["termsConditions36"][locale.languageCode]; + String get termsConditions37 => localizedValues["termsConditions37"][locale.languageCode]; + String get termsConditions38 => localizedValues["termsConditions38"][locale.languageCode]; + String get termsConditions39 => localizedValues["termsConditions39"][locale.languageCode]; + String get termsConditions39a => localizedValues["termsConditions39a"][locale.languageCode]; + String get termsConditions39b => localizedValues["termsConditions39b"][locale.languageCode]; + String get termsConditions39c => localizedValues["termsConditions39c"][locale.languageCode]; + String get termsConditions39d => localizedValues["termsConditions39d"][locale.languageCode]; + String get termsHeading9 => localizedValues["termsHeading9"][locale.languageCode]; + String get termsConditions40 => localizedValues["termsConditions40"][locale.languageCode]; + String get termsConditions41 => localizedValues["termsConditions41"][locale.languageCode]; + String get termsHeading10 => localizedValues["termsHeading10"][locale.languageCode]; + String get termsConditions42 => localizedValues["termsConditions42"][locale.languageCode]; + String get termsConditions43 => localizedValues["termsConditions43"][locale.languageCode]; + String get termsHeading11 => localizedValues["termsHeading11"][locale.languageCode]; + String get termsConditions44 => localizedValues["termsConditions44"][locale.languageCode]; + String get termsHeading12 => localizedValues["termsHeading12"][locale.languageCode]; + String get termsConditions45 => localizedValues["termsConditions45"][locale.languageCode]; + String get termsConditionsRead => localizedValues["termsConditionsRead"][locale.languageCode]; + String get liveCareTermsHeading => localizedValues["liveCareTermsHeading"][locale.languageCode]; + String get liveCareTermsIntroHeading => localizedValues["liveCareTermsIntroHeading"][locale.languageCode]; + String get liveCareTermsConditions1 => localizedValues["liveCareTermsConditions1"][locale.languageCode]; + String get liveCareTermsConditions2 => localizedValues["liveCareTermsConditions2"][locale.languageCode]; + String get liveCareTermsHeading2 => localizedValues["liveCareTermsHeading2"][locale.languageCode]; + String get liveCareTermsConditions3 => localizedValues["liveCareTermsConditions3"][locale.languageCode]; + String get liveCareTermsConditions3a => localizedValues["liveCareTermsConditions3a"][locale.languageCode]; + String get liveCareTermsConditions3b => localizedValues["liveCareTermsConditions3b"][locale.languageCode]; + String get liveCareTermsConditions3c => localizedValues["liveCareTermsConditions3c"][locale.languageCode]; + String get liveCareTermsConditions3d => localizedValues["liveCareTermsConditions3d"][locale.languageCode]; + String get liveCareTermsConditions4 => localizedValues["liveCareTermsConditions4"][locale.languageCode]; + String get liveCareTermsConditions5 => localizedValues["liveCareTermsConditions5"][locale.languageCode]; + String get liveCareTermsConditions6 => localizedValues["liveCareTermsConditions6"][locale.languageCode]; + String get liveCareTermsHeading3 => localizedValues["liveCareTermsHeading3"][locale.languageCode]; + String get liveCareTermsConditions7 => localizedValues["liveCareTermsConditions7"][locale.languageCode]; + String get liveCareTermsConditions8 => localizedValues["liveCareTermsConditions8"][locale.languageCode]; + String get liveCareTermsConditions9 => localizedValues["liveCareTermsConditions9"][locale.languageCode]; + String get liveCareTermsConditions10 => localizedValues["liveCareTermsConditions10"][locale.languageCode]; + String get liveCareTermsConditions11 => localizedValues["liveCareTermsConditions11"][locale.languageCode]; + String get liveCareTermsConditions12 => localizedValues["liveCareTermsConditions12"][locale.languageCode]; + String get liveCareTermsConditions13 => localizedValues["liveCareTermsConditions13"][locale.languageCode]; + String get liveCareTermsHeading4 => localizedValues["liveCareTermsHeading4"][locale.languageCode]; + String get liveCareTermsConditions14 => localizedValues["liveCareTermsConditions14"][locale.languageCode]; + String get liveCareTermsConditions15 => localizedValues["liveCareTermsConditions15"][locale.languageCode]; + String get liveCareTermsConditions16 => localizedValues["liveCareTermsConditions16"][locale.languageCode]; + String get liveCareTermsHeading5 => localizedValues["liveCareTermsHeading5"][locale.languageCode]; + String get liveCareTermsConditions17 => localizedValues["liveCareTermsConditions17"][locale.languageCode]; + + String get liveCareTermsConditions18 => localizedValues["liveCareTermsConditions18"][locale.languageCode]; + String get liveCareTermsConditions19 => localizedValues["liveCareTermsConditions19"][locale.languageCode]; + String get liveCareTermsConditions19a => localizedValues["liveCareTermsConditions19a"][locale.languageCode]; + String get liveCareTermsConditions19b => localizedValues["liveCareTermsConditions19b"][locale.languageCode]; + String get liveCareTermsConditions19c => localizedValues["liveCareTermsConditions19c"][locale.languageCode]; + String get liveCareTermsConditions19d => localizedValues["liveCareTermsConditions19d"][locale.languageCode]; + String get liveCareTermsConditions19e => localizedValues["liveCareTermsConditions19e"][locale.languageCode]; + String get liveCareTermsConditions20 => localizedValues["liveCareTermsConditions20"][locale.languageCode]; + String get liveCareTermsHeading6 => localizedValues["liveCareTermsHeading6"][locale.languageCode]; + String get liveCareTermsConditions21 => localizedValues["liveCareTermsConditions21"][locale.languageCode]; + String get liveCareTermsConditions22 => localizedValues["liveCareTermsConditions22"][locale.languageCode]; + String get liveCareTermsConditions23 => localizedValues["liveCareTermsConditions23"][locale.languageCode]; + String get liveCareTermsHeading7 => localizedValues["liveCareTermsHeading7"][locale.languageCode]; + String get liveCareTermsConditions24 => localizedValues["liveCareTermsConditions24"][locale.languageCode]; + String get liveCareTermsConditions25 => localizedValues["liveCareTermsConditions25"][locale.languageCode]; + String get liveCareTermsConditions26 => localizedValues["liveCareTermsConditions26"][locale.languageCode]; + String get liveCareTermsConditions27 => localizedValues["liveCareTermsConditions27"][locale.languageCode]; + String get liveCareTermsConditions28 => localizedValues["liveCareTermsConditions28"][locale.languageCode]; + String get liveCareTermsConditions29 => localizedValues["liveCareTermsConditions29"][locale.languageCode]; + String get liveCareTermsConditions30 => localizedValues["liveCareTermsConditions30"][locale.languageCode]; + + String get liveCareTermsHeading8 => localizedValues["liveCareTermsHeading8"][locale.languageCode]; + String get liveCareTermsConditions31 => localizedValues["liveCareTermsConditions31"][locale.languageCode]; + String get liveCareTermsHeading9 => localizedValues["liveCareTermsHeading9"][locale.languageCode]; + String get liveCareTermsConditions32 => localizedValues["liveCareTermsConditions32"][locale.languageCode]; + String get liveCareTermsConditions33 => localizedValues["liveCareTermsConditions33"][locale.languageCode]; + String get liveCareTermsConditions34 => localizedValues["liveCareTermsConditions34"][locale.languageCode]; + String get liveCareTermsConditions35 => localizedValues["liveCareTermsConditions35"][locale.languageCode]; + String get liveCareTermsHeading10 => localizedValues["liveCareTermsHeading10"][locale.languageCode]; + String get liveCareTermsConditions36 => localizedValues["liveCareTermsConditions36"][locale.languageCode]; + String get liveCareTermsHeading11 => localizedValues["liveCareTermsHeading11"][locale.languageCode]; + String get liveCareTermsConditions37 => localizedValues["liveCareTermsConditions37"][locale.languageCode]; + String get liveCareTermsConditions38 => localizedValues["liveCareTermsConditions38"][locale.languageCode]; + String get liveCareTermsHeading12 => localizedValues["liveCareTermsHeading12"][locale.languageCode]; + String get liveCareTermsConditions39 => localizedValues["liveCareTermsConditions39"][locale.languageCode]; + String get liveCareTermsConditions40 => localizedValues["liveCareTermsConditions40"][locale.languageCode]; + String get liveCareTermsConditions41 => localizedValues["liveCareTermsConditions41"][locale.languageCode]; + String get liveCareTermsHeading13 => localizedValues["liveCareTermsHeading13"][locale.languageCode]; + String get liveCareTermsConditions42 => localizedValues["liveCareTermsConditions42"][locale.languageCode]; + String get liveCareTermsHeading14 => localizedValues["liveCareTermsHeading14"][locale.languageCode]; + String get liveCareTermsConditions43 => localizedValues["liveCareTermsConditions43"][locale.languageCode]; + String get liveCareTermsConditions43a => localizedValues["liveCareTermsConditions43a"][locale.languageCode]; + String get liveCareTermsConditions43b => localizedValues["liveCareTermsConditions43b"][locale.languageCode]; + String get liveCareTermsConditions43c => localizedValues["liveCareTermsConditions43c"][locale.languageCode]; + String get liveCareTermsConditions43d => localizedValues["liveCareTermsConditions43d"][locale.languageCode]; + String get liveCareTermsConditions43e => localizedValues["liveCareTermsConditions43e"][locale.languageCode]; + String get liveCareTermsConditions43f => localizedValues["liveCareTermsConditions43f"][locale.languageCode]; + String get liveCareTermsConditions43g => localizedValues["liveCareTermsConditions43g"][locale.languageCode]; + String get liveCareTermsHeading15 => localizedValues["liveCareTermsHeading15"][locale.languageCode]; + String get liveCareTermsConditions44 => localizedValues["liveCareTermsConditions44"][locale.languageCode]; + String get liveCareTermsConditions45 => localizedValues["liveCareTermsConditions45"][locale.languageCode]; + String get liveCareTermsConditions46 => localizedValues["liveCareTermsConditions46"][locale.languageCode]; + String get liveCareTermsHeading16 => localizedValues["liveCareTermsHeading16"][locale.languageCode]; + String get liveCareTermsConditions47 => localizedValues["liveCareTermsConditions47"][locale.languageCode]; + String get liveCareTermsConditions48 => localizedValues["liveCareTermsConditions48"][locale.languageCode]; + String get clickPrivacyPolicy => localizedValues["clickPrivacyPolicy"][locale.languageCode]; + + +} + +class TranslationBaseDelegate extends LocalizationsDelegate { + const TranslationBaseDelegate(); + + @override + bool isSupported(Locale locale) => ['en', 'ar'].contains(locale.languageCode); + + @override + Future load(Locale locale) { + return SynchronousFuture(TranslationBase(locale)); + } + + @override + bool shouldReload(TranslationBaseDelegate old) => false; +} + +extension xTranslationBase on TranslationBase { + isArabic() => locale.languageCode == "ar"; +} diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart new file mode 100644 index 00000000..77059a65 --- /dev/null +++ b/lib/uitl/utils.dart @@ -0,0 +1,1076 @@ +import 'dart:convert'; +import 'dart:core'; +import 'dart:io'; +import 'dart:typed_data'; + +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:badges/badges.dart' as badge_import; +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:connectivity_plus/connectivity_plus.dart'; +import 'package:crypto/crypto.dart' as crypto; +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/privilege/ProjectDetailListModel.dart'; +import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; +import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; +import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart'; +import 'package:diplomaticquarterapp/pages/medical/active_medications/ActiveMedicationsPage.dart'; +import 'package:diplomaticquarterapp/pages/medical/allergies_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/ask_doctor/ask_doctor_home_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/dental_instructions_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/eye/EyeMeasurementsPage.dart'; +import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/my_invoices/my_invoice_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/my_trackers/my_trackers.dart'; +import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/reports/monthly_reports.dart'; +import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; +import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; +import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:google_api_availability/google_api_availability.dart'; +import 'dart:math' show asin, cos, pi, pow, sin, sqrt; + +// import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher.dart'; + +import '../Constants.dart'; +import '../locator.dart'; +import 'app_shared_preferences.dart'; +import 'app_toast.dart'; +import 'gif_loader_dialog_utils.dart'; +import 'navigation_service.dart'; + +AppSharedPreferences sharedPref = new AppSharedPreferences(); + +class Utils { + // static ProgressDialog pr; + + static var navigationProjectsList = [ + { + "Desciption": "Sahafa Hospital", + "DesciptionN": "مستشفى الصحافة", + "ID": 130, + "LegalName": "Sahafa Hospital", + "LegalNameN": "مستشفى الصحافة", + "Name": "Sahafa Hospital", + "NameN": "مستشفى الصحافة", + "PhoneNumber": "+966115222222", + "SetupID": "013311", + "DistanceInKilometers": 0, + "HasVida3": false, + "IsActive": true, + "IsHmg": true, + "IsVidaPlus": false, + "Latitude": "24.8113774", + "Longitude": "46.6239813", + "MainProjectID": 130, + "ProjectOutSA": false, + "UsingInDoctorApp": false + } + ]; + + ///show custom Error Toast + /// [message] to show for user + static showErrorToast([String? message]) { + String localMsg = generateContactAdminMessage(); + if (message != null) { + localMsg = message.toString(); + } + AppToast.showErrorToast(message: localMsg); + } + + /// Check The Internet Connection + static Future checkConnection({bool bypassConnectionCheck = false}) async { + if (bypassConnectionCheck) return true; + //return true; + ConnectivityResult connectivityResult = await (Connectivity().checkConnectivity()); + if ((connectivityResult == ConnectivityResult.mobile) || (connectivityResult == ConnectivityResult.wifi)) { + return true; + } else { + return false; + } + } + + /// generate Contact Admin Message + static generateContactAdminMessage([err]) { + String localMsg = 'Something wrong happened, please contact the admin'; + if (err != null) { + localMsg = localMsg + '\n \n' + err.toString(); + } + return localMsg; + } + + /// hides the keyboard if its already open + static hideKeyboard(BuildContext context) { + FocusScope.of(context).unfocus(); + } + + static showPermissionConsentDialog(BuildContext context, String message, VoidCallback? onTap) { + showDialog( + context: context, + builder: (cxt) => CovidConsentDialog( + okTitle: TranslationBase.of(context).acceptLbl, + title: TranslationBase.of(context).covidConsentHeader, + message: message, + onTap: onTap!, + )); + } + + bool isSAUDIIDValid(String id, type) { + if (type == 1) { + if (id == null) { + return false; + } + try { + id = id.toString(); + id = id.trim(); + var returnValue = int.parse(id); + var sum = 0; + if (returnValue > 0) { + var type = int.parse(id[0]); + + if (id.length != 10) { + return false; + } + if (type != 2 && type != 1) { + return false; + } + + for (var i = 0; i < 10; i++) { + if (i % 2 == 0) { + var a = id[i]; + var x = int.parse(a) * 2; + var b = x.toString(); + if (b.length == 1) { + b = "0" + b; + } + sum += int.parse(b[0]) + int.parse(b[1]); + } else { + sum += int.parse(id[i]); + } + } + return sum % 10 == 0; + } + } catch (err) {} + return false; + } else { + return true; + } + } + + static String getAppointmentTransID(int projectID, int clinicID, int appoNo, {bool isAddMilliseconds = true}) { + String currentMillis = DateTime.now().millisecondsSinceEpoch.toString(); + return projectID.toString() + '-' + clinicID.toString() + '-' + appoNo.toString() + (isAddMilliseconds ? '-' + currentMillis.substring(currentMillis.length - 5, currentMillis.length) : ""); + } + + static String getAdvancePaymentTransID(int projectID, int fileNumber) { + return projectID.toString() + '-' + fileNumber.toString() + '-' + DateTime.now().millisecondsSinceEpoch.toString(); + } + + bool validateIDBox(String value, int type) { + String pattern = loginIDPattern(type); // Get the pattern based on type + RegExp regex = RegExp(pattern); + return regex.hasMatch(value); + } + + String loginIDPattern(int loginType) { + var length = loginType == 1 ? 10 : 1; + return "([0-9]{" + length.toString() + "}\$)"; + } + + static showProgressDialog(context, [String message = "Loading..."]) async { + // pr = ProgressDialog(context, + // type: ProgressDialogType.Normal, isDismissible: false, showLogs: false); + // pr.style( + // message: message, + // borderRadius: 10.0, + // backgroundColor: Colors.white, + // elevation: 10.0, + // insetAnimCurve: Curves.easeInOut, + // progress: 0.0, + // maxProgress: 100.0, + // progressTextStyle: TextStyle( + // color: Colors.black, fontSize: 13.0, fontWeight: FontWeight.w400), + // messageTextStyle: TextStyle( + // color: Colors.black, fontSize: 19.0, fontWeight: FontWeight.w600)); + + // if (!pr.isShowing()) { + // await pr.show(); + // } else { + // await pr.hide(); + // await pr.show(); + // } + } + + static hideProgressDialog() async { + // if (pr.isShowing()) { + // await pr.hide(); + // } + } + + static getPhoneNumberWithoutZero(String number) { + String newNumber = ""; + if (number.startsWith('0')) { + newNumber = number.substring(1); + } else { + newNumber = number; + } + return newNumber; + } + + static Uint8List dataFromBase64String(String base64String) { + return base64Decode(base64String); + } + + static validEmail(email) { + return RegExp(r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+").hasMatch(email); + } + + static List myMedicalList({ProjectViewModel? projectViewModel, BuildContext? context, bool? isLogin, count, Function? onWeCareClick}) { + List medical = []; + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(5) ? Navigator.push(context, FadePage(page: MyAppointments())) : null, + child: isLogin! + ? Stack(children: [ + Container( + width: double.infinity, + height: double.infinity, + child: MedicalProfileItem( + title: TranslationBase.of(context!).myAppointments, + imagePath: 'appointment_list.svg', + subTitle: TranslationBase.of(context).myAppointmentsList, + hasBadge: true, + isEnable: projectViewModel!.havePrivilege(5)), + ), + projectViewModel.isArabic + ? !projectViewModel.user.isFamily + ? Positioned( + left: 8, + top: 4, + child: badge_import.Badge( + badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false), + badgeStyle: badge_import.BadgeStyle( + elevation: 0, + shape: badge_import.BadgeShape.circle, + badgeColor: secondaryColor!.withOpacity(1.0), + borderRadius: BorderRadius.circular(8), + ), + position: badge_import.BadgePosition.topEnd(), + badgeContent: Container( + padding: EdgeInsets.all(2.0), + child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)), + ), + ), + ) + : Container() + : !projectViewModel.user!.isFamily + ? Positioned( + right: 8, + top: 4, + child: badge_import.Badge( + position: badge_import.BadgePosition.topEnd(), + badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false), + badgeStyle: badge_import.BadgeStyle( + elevation: 0, + shape: badge_import.BadgeShape.circle, + badgeColor: secondaryColor!.withOpacity(1.0), + borderRadius: BorderRadius.circular(8), + ), + badgeContent: Container( + padding: EdgeInsets.all(2.0), + child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)), + ), + ), + ) + : Container(), + ]) + : MedicalProfileItem( + title: TranslationBase.of(context!).myAppointments, + imagePath: 'appointment_list.svg', + subTitle: TranslationBase.of(context!).myAppointmentsList, + hasBadge: true, + isEnable: projectViewModel!.havePrivilege(5), + ), + )); + + if (projectViewModel.havePrivilege(10)) { + medical.add(InkWell( + onTap: () => Navigator.push(context, FadePage(page: LabsHomePage())), + child: MedicalProfileItem( + title: TranslationBase.of(context).lab, + imagePath: 'lab_result.svg', + subTitle: TranslationBase.of(context).labSubtitle, + ), + )); + } + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).radiology, + imagePath: 'radiology.svg', + subTitle: TranslationBase.of(context).radiologySubtitle, + isEnable: projectViewModel.havePrivilege(7), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).medicines, + imagePath: 'medicine_prescription.svg', + subTitle: TranslationBase.of(context).medicinesSubtitle, + isEnable: projectViewModel.havePrivilege(12), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(25) + ? Navigator.push( + context, + FadePage(page: VitalSignDetailsScreen()), + ) + : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).vitalSigns, + imagePath: 'vital_signs.svg', + subTitle: TranslationBase.of(context).vitalSignsSubtitle, + isEnable: projectViewModel.havePrivilege(25), + ), + )); + + medical.add(InkWell( + onTap: () { + if (projectViewModel.havePrivilege(48)) Navigator.push(context, FadePage(page: ActiveMedicationsPage())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).myMedical, + imagePath: 'active_medication.svg', + subTitle: TranslationBase.of(context).myMedicalSubtitle, + isEnable: projectViewModel.havePrivilege(48), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(6) + ? Navigator.push( + context, + FadePage( + page: DoctorHomePage(), + ), + ) + : null, + child: + MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).invoicesList, + imagePath: 'invoice_list.svg', + subTitle: TranslationBase.of(context).myInvoice, + isEnable: projectViewModel.havePrivilege(14), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(85) ? Navigator.push(context, FadePage(page: AnicllaryOrders())) : null, + // onTap: () => Navigator.push(context, FadePage(page: AnicllaryOrders())), + child: MedicalProfileItem( + title: TranslationBase.of(context).anicllaryOrders, + imagePath: 'ancillary.svg', + isPngImage: false, + subTitle: TranslationBase.of(context).myInvoice, + isEnable: projectViewModel.havePrivilege(85), + ), + )); + + medical.add(InkWell( + onTap: () => onWeCareClick!(), + child: MedicalProfileItem( + title: TranslationBase.of(context).wecare, + imagePath: 'assets/images/new-design/virtual_tour_icon.png', + isPngImage: true, + subTitle: TranslationBase.of(context).service, + isEnable: projectViewModel.havePrivilege(105), + ), + )); + + medical.add(InkWell( + onTap: () { + Navigator.push(context, FadePage(page: DentalInstructionsPage())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).myinstructions, + imagePath: 'medical_instructions.svg', + isPngImage: false, + subTitle: TranslationBase.of(context).service, + isEnable: projectViewModel.havePrivilege(106), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).eye, + imagePath: 'eye_measurement.svg', + subTitle: TranslationBase.of(context).eyeSubtitle, + isEnable: projectViewModel.havePrivilege(14), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(22) + ? Navigator.push( + context, + FadePage( + page: InsuranceCard( + appointmentNo: 0, + ))) + : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).insurance, + imagePath: 'insurance_card.svg', + subTitle: TranslationBase.of(context).insuranceSubtitle, + isEnable: projectViewModel.havePrivilege(22), + ), + )); + + medical.add(InkWell( + onTap: () { + Navigator.push(context, FadePage(page: InsuranceUpdate())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).updateInsurance, + imagePath: 'insurance_card.svg', + subTitle: TranslationBase.of(context).updateInsuranceSubtitle, + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(18) + ? Navigator.push( + context, + FadePage( + page: InsuranceApproval( + appointmentNo: 0, + ))) + : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).insuranceApproval, + imagePath: 'insurance_approval.svg', + subTitle: TranslationBase.of(context).insuranceApprovalSubtitle, + isEnable: projectViewModel.havePrivilege(18), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(23) ? Navigator.push(context, FadePage(page: AllergiesPage())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).allergies, + imagePath: 'allergies_diagnosed.svg', + subTitle: TranslationBase.of(context).allergiesSubtitle, + isEnable: projectViewModel.havePrivilege(23), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(26) ? Navigator.push(context, FadePage(page: MyVaccines())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).myVaccines, + imagePath: 'vaccine_list.svg', + subTitle: TranslationBase.of(context).myVaccinesSubtitle, + isEnable: projectViewModel.havePrivilege(26), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).medical, + imagePath: 'medical_report.svg', + subTitle: TranslationBase.of(context).medicalSubtitle, + isEnable: projectViewModel.havePrivilege(20), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).monthly, + imagePath: 'monthly_report.svg', + subTitle: TranslationBase.of(context).monthlySubtitle, + isEnable: projectViewModel.havePrivilege(19), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).sick, + imagePath: 'sick_leave.svg', + subTitle: TranslationBase.of(context).sickSubtitle, + isEnable: projectViewModel.havePrivilege(16), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(47) ? Navigator.push(context, FadePage(page: MyBalancePage())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).myBalance, + imagePath: 'balance_credit.svg', + subTitle: TranslationBase.of(context).myBalanceSubtitle, + isEnable: projectViewModel.havePrivilege(47), + ), + )); + + // medical.add(MedicalProfileItem( + // title: TranslationBase.of(context).patientCall, + // imagePath: 'medical_history_icon.png', + // subTitle: TranslationBase.of(context).patientCallSubtitle, + // isEnable: projectViewModel.havePrivilege(61), + // )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).myTrackers, + imagePath: 'tracker.svg', + subTitle: TranslationBase.of(context).myTrackersSubtitle, + isEnable: projectViewModel.havePrivilege(24), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).smartWatchesSubtitle, + imagePath: 'smart_watch.svg', + subTitle: TranslationBase.of(context).smartWatches, + isEnable: projectViewModel.havePrivilege(30), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).askYourSubtitle, imagePath: 'ask_doctor.svg', subTitle: TranslationBase.of(context).askYour, isEnable: projectViewModel.havePrivilege(28)), + )); + + if (projectViewModel.havePrivilege(32) || true) { + medical.add(InkWell( + onTap: () { + if (Platform.isAndroid) { + showPermissionConsentDialog(context, TranslationBase.of(context).wifiPermission, () { + connectWifi(projectViewModel, context); + }); + } else { + connectWifi(projectViewModel, context); + } + }, + child: MedicalProfileItem( + title: TranslationBase.of(context).internet, + imagePath: 'internet_connection.svg', + subTitle: TranslationBase.of(context).internetSubtitle, + ), + )); + } + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(40) ? launch('whatsapp://send?phone=18885521858&text=') : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).chatbot, + imagePath: 'chatbot.svg', + subTitle: TranslationBase.of(context).chatbotSubtitle, + isEnable: projectViewModel.havePrivilege(40), + ), + )); + + return medical; + } + + static getPatientWifiCredentials(String patientID, Function(String username, String password) successCallback) { + final body = {"PatientID": patientID}; + locator().post(WIFI_CREDENTIALS, body: body, onSuccess: (dynamic response, int statusCode) { + print(response); + var data = response["Hmg_SMS_Get_By_ProjectID_And_PatientIDList"]; + if (data is List && data.first != null) { + final username = data.first['UserName']; + final password = data.first['Password']; + if (username != null && password != null && username.isNotEmpty && password.isNotEmpty) { + successCallback(username, password); + } + } + }, onFailure: (String error, int statusCode) { + print(error); + }, bypassConnectionCheck: true); + } + + static connectWifi(ProjectViewModel projectViewModel, BuildContext context) { + final String GUEST_SSID = "HMG-MobileApp"; + final String PATIENT_SSID = "GUEST-POC"; + userData().then((userData_) { + if (projectViewModel.isLogin && userData_ != null || true) { + String patientID = userData_.patientID.toString(); + GifLoaderDialogUtils.showMyDialog(context); + // projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)}).catchError((err) { + // print(err.toString()); + // }); + projectViewModel.platformBridge().connectHMGGuestWifi(GUEST_SSID).then((value) async { + if (value == 0) { + GifLoaderDialogUtils.hideDialog(context); + } else { + getPatientWifiCredentials(patientID, (username, password) async { + final result = await projectViewModel.platformBridge().connectHMGInternetWifi(PATIENT_SSID, username, password).catchError((err) => print(err.toString())); + GifLoaderDialogUtils.hideDialog(context); + if (result == 1) { + // Success + } + }); + } + }).catchError((e) { + GifLoaderDialogUtils.hideDialog(context); + }); + } else { + AlertDialogBox( + context: context, + confirmMessage: "Please login with your account first to use this feature", + okText: "OK", + okFunction: () { + AlertDialogBox.closeAlertDialog(context); + }).showAlertDialog(context); + } + }); + } + + static List myMedicalListHomePage({ProjectViewModel? projectViewModel, BuildContext? context, bool? isLogin, count}) { + List medical = []; + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(5) ? Navigator.push(context!, FadePage(page: MyAppointments())) : null, + child: isLogin! + ? Stack(children: [ + MedicalProfileItem( + title: TranslationBase.of(context!).myAppointments, + imagePath: 'appointment_list.svg', + subTitle: TranslationBase.of(context!).myAppointmentsList, + hasBadge: true, + isEnable: projectViewModel!.havePrivilege(5)), + projectViewModel.isArabic! + ? !projectViewModel.isLoginChild + ? Positioned( + left: 8, + top: 4, + child: badge_import.Badge( + position: badge_import.BadgePosition.topEnd(), + badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false), + badgeStyle: badge_import.BadgeStyle( + elevation: 0, + shape: badge_import.BadgeShape.circle, + badgeColor: secondaryColor!.withOpacity(1.0), + borderRadius: BorderRadius.circular(8), + ), + badgeContent: Container( + padding: EdgeInsets.all(2.0), + child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)), + ), + ), + ) + : Container() + : !projectViewModel.isLoginChild + ? Positioned( + right: 8, + top: 4, + child: badge_import.Badge( + badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false), + badgeStyle: badge_import.BadgeStyle( + elevation: 0, + shape: badge_import.BadgeShape.circle, + badgeColor: secondaryColor!.withOpacity(1.0), + borderRadius: BorderRadius.circular(8), + ), + position: badge_import.BadgePosition.topEnd(), + badgeContent: Container( + padding: EdgeInsets.all(2.0), + child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)), + ), + ), + ) + : Container(), + ]) + : MedicalProfileItem( + title: TranslationBase.of(context!).myAppointments, + imagePath: 'appointment_list.svg', + subTitle: TranslationBase.of(context!).myAppointmentsList, + hasBadge: true, + isEnable: projectViewModel!.havePrivilege(5), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(10) ? Navigator.push(context, FadePage(page: LabsHomePage())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).lab, + imagePath: 'lab_result.svg', + subTitle: TranslationBase.of(context).labSubtitle, + isEnable: projectViewModel.havePrivilege(10), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).radiology, + imagePath: 'radiology.svg', + subTitle: TranslationBase.of(context).radiologySubtitle, + isEnable: projectViewModel.havePrivilege(7), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null, + child: MedicalProfileItem( + title: TranslationBase.of(context).medicines, + imagePath: 'medicine_prescription.svg', + subTitle: TranslationBase.of(context).medicinesSubtitle, + isEnable: projectViewModel.havePrivilege(12), + ), + )); + + medical.add(InkWell( + onTap: () => projectViewModel.havePrivilege(6) + ? Navigator.push( + context, + FadePage( + page: DoctorHomePage(), + ), + ) + : null, + child: + MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)), + )); + + return medical; + } + + static Widget loadNetworkImage({required String url, BoxFit fitting = BoxFit.cover}) { + return CachedNetworkImage( + placeholderFadeInDuration: Duration(milliseconds: 250), + fit: fitting, + imageUrl: url, + placeholder: (context, url) => Container(child: Center(child: CircularProgressIndicator())), + errorWidget: (context, url, error) { + return Icon( + Icons.error, + color: Colors.red, + size: 50, + ); + }); + } + + static bool route(Route route, {required Type equalsTo}) { + if ((route is FadePage)) { + return route.page.runtimeType == equalsTo; + } + return route.runtimeType == equalsTo; + } + + static navigateToCartPage() { + Navigator.pushAndRemoveUntil(locator()!.navigatorKey!.currentContext!, MaterialPageRoute(builder: (context) => LandingPagePharmacy(currentTab: 3)), (Route r) => false); + } + + static Widget tableColumnTitle(String text, {bool showDivider = true}) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(height: 6), + Text( + text, + maxLines: 1, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12), + ), + SizedBox(height: 5), + if (showDivider) + Divider( + height: 1, + color: Color(0xff2E303A), + thickness: 1, + ) + ], + ); + } + + static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true, bool isHighLow = false, bool isCurrency = false, required ProjectViewModel mProjectViewModel}) { + ProjectViewModel projectViewModel = mProjectViewModel ?? Provider.of(AppGlobal.context); + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(height: 12), + Row( + children: [ + Expanded( + child: Text( + isCapitable && !projectViewModel.isArabic ? text.toLowerCase().capitalizeFirstofEach : text, + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: isHighLow ? CustomColors.accentColor : Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + ), + isCurrency ? getSaudiRiyalSymbol() : Container(), + ], + ), + SizedBox(height: 12), + if (!isLast) + Divider( + height: 1, + color: Color(0xffEFEFEF), + thickness: 1, + ) + ], + ); + } + + static Widget tableColumnValueWithFlowChart(String text, String flowChartText, {bool isLast = false, bool isCapitable = true, ProjectViewModel? mProjectViewModel}) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(height: 12), + Text( + text, + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), + ), + SizedBox(height: 8), + AutoSizeText( + flowChartText, + maxLines: 1, + minFontSize: 6, + style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffD02127), letterSpacing: -0.48, height: 18 / 12), + ), + SizedBox(height: 12), + if (!isLast) + Divider( + height: 1, + color: Color(0xffEFEFEF), + thickness: 1, + ) + ], + ); + } + + static Future isGoogleServicesAvailable() async { + GooglePlayServicesAvailability availability = await GoogleApiAvailability.instance.checkGooglePlayServicesAvailability(); + String status = availability.toString().split('.').last; + if (status == "success") { + return true; + } + return false; + } + + static double distance(double lat1, double lon1, double lat2, double lon2) { + const r = 6372.8; // Earth radius in kilometers + + final dLat = _toRadians(lat2 - lat1); + final dLon = _toRadians(lon2 - lon1); + final lat1Radians = _toRadians(lat1); + final lat2Radians = _toRadians(lat2); + + final a = _haversin(dLat) + cos(lat1Radians) * cos(lat2Radians) * _haversin(dLon); + final c = 2 * asin(sqrt(a)); + + return r * c; + } + + static double _toRadians(double degrees) => degrees * pi / 180; + + static num _haversin(double radians) => pow(sin(radians / 2), 2); + + static Widget tableColumnValueWithUnderLine(String text, {bool isLast = false, bool isCapitable = true}) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(height: 14), + AutoSizeText( + isCapitable ? text.toLowerCase().capitalizeFirstofEach : text, + maxLines: 1, + minFontSize: 6, + style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffD02127), letterSpacing: -0.48, height: 18 / 12), + ), + SizedBox(height: 10), + if (!isLast) + Divider( + height: 1, + color: Color(0xffEFEFEF), + thickness: 1, + ) + ], + ); + } + + static String generateMd5Hash(String input) { + return crypto.md5.convert(utf8.encode(input)).toString(); + } + + static bool isVidaPlusProject(ProjectViewModel projectViewModel, int projectID) { + bool isVidaPlus = false; + projectViewModel.vidaPlusProjectList.forEach((element) { + if (element.projectID == projectID) { + isVidaPlus = true; + } + }); + return isVidaPlus; + } + + static bool isHMCProject(ProjectViewModel projectViewModel, int projectID) { + bool isHMCProject = false; + projectViewModel.hMCProjectListModel.forEach((element) { + if (element.projectID == projectID) { + isHMCProject = true; + } + }); + return isHMCProject; + } + + static ProjectDetailListModel getProjectDetailObj(ProjectViewModel projectViewModel, int projectID) { + ProjectDetailListModel projectDetailListModel = ProjectDetailListModel(); + projectViewModel.projectDetailListModel.forEach((element) { + if (element.projectID == projectID) { + projectDetailListModel = element; + } + }); + return projectDetailListModel; + } + + static Widget getSaudiRiyalSymbol({double fontSize = 16}) { + return Text(" SAR ", style: TextStyle(fontFamily: "SaudiRiyal", fontSize: fontSize)); + } + +//static String generateSignature() {} +} + +Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), required Widget child}) { + return Container( + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: color.withOpacity(shadowOpacity), + spreadRadius: spreadRadius, + blurRadius: blurRadius, + offset: offset, // changes position of shadow + ), + ], + ), + child: child, + ); +} + +Future userData() async { + var userData = AuthenticatedUser.fromJson(await AppSharedPreferences().getObject(MAIN_USER)); + return userData; +} + +// extension function that use in iterations(list.. etc) to iterate items and get index and item it self +extension IndexedIterable on Iterable { + Iterable mapIndexed(T Function(E e, int i) f) { + var i = 0; + return map((e) => f(e, i++)); + } +} + +openAppStore({String? androidPackageName, String? iOSAppID, bool isHuawei = false}) async { + if (Platform.isAndroid) { + assert(!(androidPackageName == null), "Should have valid value in androidPackageName parameter"); + if (isHuawei) { + launchUrl(Uri.parse("appmarket://details?id=com.ejada.hmg")); + } else { + launchUrl(Uri.parse("market://details?id=com.ejada.hmg")); + } + } else if (Platform.isIOS) { + assert((iOSAppID == null), "Should have valid value in iOSAppID parameter"); + launchUrl(Uri.parse("https://itunes.apple.com/kr/app/apple-store/$iOSAppID)")); + } +} + +String labelFrom({required String className}) { + RegExp exp = RegExp(r'(?<=[a-z])[A-Z]'); + + String result = className.replaceAllMapped(exp, (m) { + var str = m.group(0); + if (str != null) { + return ('_' + str); + } + return ""; + }); + + if (result.isEmpty) return className; + + result = result.replaceAll("_", " "); + return result; +} + +extension StringExtension on String { + String capitalize() { + return this.splitMapJoin(RegExp(r'\w+'), onMatch: (m) => '${m.group(0)}'.substring(0, 1).toUpperCase() + '${m.group(0)}'.substring(1).toLowerCase(), onNonMatch: (n) => ' '); + } +} + +extension TextToRichTextWithIcon on Text { + RichText toRichTextWithIcon() { + // Create the base TextSpan with the text data and style from the Text widget + return RichText( + text: TextSpan( + style: this.style, // Inherit the text style + children: [ + WidgetSpan( + child: Text(" SAR ", style: TextStyle(fontFamily: "SaudiRiyal")), + ), + TextSpan( + text: this.data, // Add the original text + style: this.style, // Inherit the text style + ), + ], + ), + ); + } +} + +/* + userBoard.asMap().map((i, element) => MapEntry(i, Stack( + GestureDetector(onTap: () { + setState(() { + // print("element=${element.toString()}"); + // print("element=${userBoard[i].toString()}"); + }); + }), + ))).values.toList(); + */ diff --git a/lib/uitl/utils_new.dart b/lib/uitl/utils_new.dart new file mode 100644 index 00000000..696a778d --- /dev/null +++ b/lib/uitl/utils_new.dart @@ -0,0 +1,601 @@ +import 'dart:ui'; + +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +Decoration appGradient = BoxDecoration( + gradient: LinearGradient( + colors: [ + Color(0xFFFDCA46F), + Color(0xFFFA47E5D), + ], + begin: Alignment.centerLeft, + end: Alignment.centerRight, + ), +); + +Color getColorFromHex(String hexColor) { + hexColor = hexColor.toUpperCase().replaceAll('#', ''); + + if (hexColor.length == 6) { + hexColor = 'FF' + hexColor; + } + + return Color(int.parse(hexColor, radix: 16)); +} + +Widget getPaymentMethods() { + return Container( + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Image.asset("assets/images/new/payment/Mada.png", width: 40, height: 40), + Image.asset("assets/images/new/payment/tamara_en.png", width: 40, height: 40), + Image.asset("assets/images/new/payment/visa.png", width: 40, height: 40), + Image.asset("assets/images/new/payment/Mastercard.png", width: 50, height: 40), + Image.asset("assets/images/new/payment/Apple_Pay.png", width: 40, height: 40), + ], + ), + ); +} + +Widget getNoDataWidget(BuildContext context) { + return Container( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SvgPicture.asset('assets/images/new/not_found.svg', width: 110.0, height: 110.0), + Container(margin: EdgeInsets.only(top: 15.0), child: Text(TranslationBase.of(context).noResultFound, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xFFBABABA)))), + ], + ), + ), + ); +} + +spacerVertical(double v) { + return Container( + height: v, + width: double.infinity, + ); +} + +spacerHorizontal(double v) { + return Container( + height: v, + width: v, + ); +} + +spacer() { + return SizedBox( + height: 8, + ); +} + +Future navigateTo(context, page) async { + return await Navigator.push(context, MaterialPageRoute(builder: (context) => page)); +} + +// Future navigateToReplace(context, page) async { +// Navigator.pushReplacement(context, FadeRouteBuilder(page: page)); +// } + +InputDecoration txtField(String label) { + return new InputDecoration( + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + errorBorder: InputBorder.none, + hintText: label, + hintStyle: TextStyle(color: Colors.grey), + disabledBorder: InputBorder.none, + contentPadding: EdgeInsets.only(left: 15, right: 15), + ); +} + +InputDecoration txtField3(String label) { + return new InputDecoration( + border: InputBorder.none, + focusedBorder: InputBorder.none, + enabledBorder: InputBorder.none, + errorBorder: InputBorder.none, + hintText: label, + disabledBorder: InputBorder.none, + counterText: "", + contentPadding: EdgeInsets.only(left: 5, right: 5), + ); +} + +InputDecoration txtFieldSearch(String label) { + return new InputDecoration( + border: InputBorder.none, + suffixIcon: Icon(Icons.clear), + disabledBorder: InputBorder.none, + contentPadding: EdgeInsets.only(left: 15, right: 15), + ); +} + +Widget circularAviator( + double s, { + Color? bcColor, + Color? brColor, + Color? iconColor, + double? borderWidth, + IconData? icon, + double elevation = 4, +}) { + return Card( + shape: cardRadiusNew(2000), + color: Colors.transparent, + elevation: elevation, + child: Container( + width: s, + height: s, + decoration: containerColorRadiusBorderWidth( + bcColor == null ? Colors.grey[200]! : bcColor, + 2000, + brColor == null ? Colors.blueGrey[800]! : brColor, + borderWidth == null ? 2 : borderWidth, + ), + child: Icon( + icon == null ? Icons.person : icon, + size: s / 1.7, + color: iconColor == null ? Colors.grey[800] : iconColor, + ), + ), + ); +} + +Widget circularImage(String im, double width, double height) { + return new Container( + width: 190.0, + height: 190.0, + decoration: new BoxDecoration( + shape: BoxShape.circle, + image: new DecorationImage( + fit: BoxFit.fill, + image: new AssetImage(im), + ), + ), + ); +} + +circularImage2(String im, double width, double height) { + return new Container( + width: width, + height: height, + decoration: new BoxDecoration( + shape: BoxShape.circle, + image: new DecorationImage( + fit: BoxFit.fill, + image: new AssetImage(im), + ), + ), + ); +} + +Widget mDivider(Color color) { + return Divider( + // width: double.infinity, + height: 1, + color: color, + ); +} + +Widget mFlex(int f) { + return Flexible( + flex: f, + child: Container(), + ); +} + +mOverlay(double op) { + return Opacity( + opacity: op, + child: Container( + color: Colors.black, + width: double.infinity, + height: double.infinity, + ), + ); +} + +Widget mHeight(double h) { + return Container( + height: h, + ); +} + +Widget mWidth(double w) { + return Container( + width: w, + ); +} + +RoundedRectangleBorder buttonShape() { + return RoundedRectangleBorder( + borderRadius: BorderRadius.circular(14.0), + ); +} + +Decoration containerRadiusWithGradient(double radius, {Color? color1, Color? color2}) { + return BoxDecoration( + borderRadius: BorderRadius.circular(radius), + gradient: LinearGradient( + colors: [ + color1 ?? Color(0xFFF71787E), + color2 ?? Color(0xFFF2B353E), + ], + begin: Alignment.centerLeft, + end: Alignment.centerRight, + ), + ); +} + +Decoration containerBottomRightRadiusWithGradient(double radius, {Color? darkColor, Color? lightColor}) { + return BoxDecoration( + borderRadius: BorderRadius.only(bottomRight: Radius.circular(radius)), + gradient: LinearGradient( + colors: [ + darkColor == null ? Color(0xFFF2B353E) : darkColor, + lightColor == null ? Color(0xFFF71787E) : lightColor, + ], + begin: Alignment.topCenter, + end: Alignment.bottomRight, + ), + ); +} + +Decoration containerBottomRightRadiusWithGradientForAr(double radius, {Color? darkColor, Color? lightColor}) { + return BoxDecoration( + borderRadius: BorderRadius.only(bottomLeft: Radius.circular(radius)), + gradient: LinearGradient( + colors: [ + lightColor == null ? Color(0xFFF71787E) : lightColor, + darkColor == null ? Color(0xFFF2B353E) : darkColor, + ], + begin: Alignment.topCenter, + end: Alignment.bottomRight, + ), + ); +} + +Decoration containerRadiusWithGradientServices( + double radius, { + Color? darkColor, + Color? lightColor, + bool isProduct = false, + bool prescriptionRequired = false, + bool isEnglish = true, +}) { + return BoxDecoration( + borderRadius: !isProduct || !prescriptionRequired + ? BorderRadius.all(Radius.circular(radius)) + : isEnglish + ? BorderRadius.only( + topLeft: Radius.circular(26), + ) + : BorderRadius.only( + topRight: Radius.circular(26), + ), + gradient: LinearGradient( + colors: [ + darkColor == null ? Color(0xFF2B353E) : darkColor, + lightColor == null ? Color(0xFF71787E) : lightColor, + ], + begin: Alignment.centerRight, + end: Alignment.topLeft, + ), + ); +} + +Decoration containerBottomRightRadiusWithGradientBorder(double radius, {Color? darkColor, Color? lightColor, Color borderColor = Colors.transparent, double w = 0}) { + return BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(radius)), + border: Border.all( + width: w, // + color: borderColor // <--- border width here + ), + gradient: LinearGradient( + colors: [ + darkColor == null ? Color(0xFFF2B353E) : darkColor, + lightColor == null ? Color(0xFFF71787E) : lightColor, + ], + begin: Alignment.topCenter, + end: Alignment.bottomRight, + ), + ); +} + +Decoration containerRadius(Color background, double radius) { + return BoxDecoration( + color: background, + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + border: Border.all( + width: 1, // + color: background // <--- border width here + ), + borderRadius: BorderRadius.circular(radius), + ); +} + +Decoration containerColorRadiusBorder(Color background, double radius, Color color) { + return BoxDecoration( + color: background, + border: Border.all( + width: 1, // + color: color // <--- border width here + ), + borderRadius: BorderRadius.circular(radius), + ); +} + +Decoration containerColorRadiusBorderWidth(Color background, double radius, Color color, double w) { + return BoxDecoration( + color: background, + border: Border.all( + width: w, // + color: color // <--- border width here + ), + borderRadius: BorderRadius.circular(radius), + ); +} + +Decoration containerColorRadiusBorderWidthCircular(Color background, double radius, Color color, double w) { + return BoxDecoration( + color: background, + border: Border.all( + width: w, // + color: color // <--- border width here + ), + // borderRadius: BorderRadius.circular(radius), + shape: BoxShape.circle, + ); +} + +Decoration containerColorRadiusRight(Color background, double radius) { + return BoxDecoration( + color: background, + borderRadius: BorderRadius.only(topRight: Radius.circular(radius), bottomRight: Radius.circular(radius)), + ); +} + +Decoration containerColorRadiusLeft(Color background, double radius) { + return BoxDecoration( + color: background, + borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)), + ); +} + +Decoration containerColorRadiusRightBorder(Color background, double radius, double w) { + return BoxDecoration( + color: background, + border: Border.all( + width: w, // + color: Colors.white // <--- border width here + ), + borderRadius: BorderRadius.only(topRight: Radius.circular(radius), bottomRight: Radius.circular(radius)), + ); +} + +Decoration containerColorRadiusRightBorderc(Color background, double radius, double w, Color borderColor) { + return BoxDecoration( + color: background, + border: Border.all( + width: w, // + color: borderColor // <--- border width here + ), + borderRadius: BorderRadius.circular(radius), + ); +} + +Decoration containerColorRadiusTop(Color color, double radius) { + return BoxDecoration( + color: color, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(radius), + topRight: Radius.circular(radius), + ), + ); +} + +Decoration containerColorRadiusBottom(Color color, double radius) { + return BoxDecoration( + color: color, + borderRadius: BorderRadius.only( + bottomLeft: Radius.circular(radius), + bottomRight: Radius.circular(radius), + ), + ); +} + +Decoration containerColorRadiusLeftBorder(Color background, double radius, double w) { + return BoxDecoration( + color: background, + border: Border.all( + width: w, // + color: Colors.white // <--- border width here + ), + borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)), + ); +} + +BoxDecoration cardRadius(double radius, {Color? color, double? elevation}) { + return BoxDecoration( + shape: BoxShape.rectangle, + color: color ?? Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(radius), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: elevation ?? 27, + offset: Offset(-2, 3), + ), + ], + ); +} + +OutlinedBorder cardRadiusNew(double radius) { + return RoundedRectangleBorder( + side: BorderSide(color: Colors.transparent, width: 0), + borderRadius: BorderRadius.all(Radius.circular(radius)), + ); +} + +ShapeBorder cardRadiusTop(double radius) { + return RoundedRectangleBorder( + side: BorderSide(color: Colors.transparent, width: 0), + borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius)), + ); +} + +ShapeBorder cardRadiusTop2(double radius) { + return RoundedRectangleBorder( + borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius)), + ); +} + +ShapeBorder cardRadiusBottom(double radius) { + return RoundedRectangleBorder( + borderRadius: BorderRadius.only(bottomLeft: Radius.circular(radius), bottomRight: Radius.circular(radius)), + ); +} + +ShapeBorder cardRadiusWithoutBorder(double radius) { + return RoundedRectangleBorder( + side: BorderSide(color: Colors.transparent, width: 1), + borderRadius: BorderRadius.circular(radius), + ); +} + +ShapeBorder cardRadiusWithBorder(double radius) { + return RoundedRectangleBorder( + side: BorderSide(color: Colors.grey, width: 1), + borderRadius: BorderRadius.circular(radius), + ); +} + +ShapeBorder cardRadiusBorder(double radius, double w) { + return RoundedRectangleBorder( + side: BorderSide(color: Colors.transparent, width: w), + borderRadius: BorderRadius.circular(radius), + ); +} + +// String properRound(double val, int places) { +// double mod = pow(10.0, places); +// double result = ((val * mod).round().toDouble() / mod); +// return result.toString(); +// } +// +// double properRoundDouble(double val, int places) { +// double mod = pow(10.0, places); +// double result = ((val * mod).round().toDouble() / mod); +// return result; +// } +//var cardShape = RoundedRectangleBorder( +// side: BorderSide(color: Colors.white70, width: 1), +// borderRadius: BorderRadius.circular(10), +//); + +//await Navigator.of(context).push(new MaterialPageRoute( +//builder: (BuildContext context) { +//return AdminTeamAvaluatePage(widget.competitionID, data); +//}, +//)); +//setState(() {}); + +Color getColor(String selectedColor) { + try { + if ("black" == selectedColor) { + return Colors.black; + } else if ("red" == selectedColor) { + return Colors.red; + } else if ("blueAccent" == selectedColor) { + return Colors.blueAccent; + } else if ("blue" == selectedColor) { + return Colors.blue; + } else if ("blueGrey" == selectedColor) { + return Colors.blueGrey; + } else if ("yellow" == selectedColor) { + return Colors.yellow; + } else if ("black54" == selectedColor) { + return Colors.black54; + } else if ("green" == selectedColor) { + return Colors.green; + } else if ("orange" == selectedColor) { + return Colors.orange; + } else if ("deepOrange" == selectedColor) { + return Colors.deepOrange; + } else { + return Colors.black; + } + } catch (e) { + return Colors.black; + } +} + +TextAlign getTextAlign(String textAlign) { + try { + if (textAlign == "left") { + return TextAlign.left; + } else if (textAlign == "right") { + return TextAlign.right; + } else if (textAlign == "center") { + return TextAlign.center; + } else if (textAlign == "justify") { + return TextAlign.justify; + } else { + return TextAlign.left; + } + } catch (e) { + print("fffff " + e.toString()); + return TextAlign.left; + } +} + +FontWeight getFontWeight(String fontWeight) { + if (fontWeight == null) { + return FontWeight.normal; + } else if (fontWeight == "bold") { + return FontWeight.bold; + } else { + return FontWeight.normal; + } +} + +FontStyle getFontStyle(String fontStyle) { + try { + if (fontStyle == null) { + return FontStyle.normal; + } else if (fontStyle == "italian") { + return FontStyle.italic; + } else { + return FontStyle.normal; + } + } catch (e) { + return FontStyle.normal; + } +} + +bool timeCalculator(int startHour, int startMint, int endHour, int endMint) { + DateTime now = DateTime.now(); + DateTime startDate = DateTime(now.year, now.month, now.day, startHour, startHour); + DateTime endDate = DateTime(now.year, now.month, now.day, endHour, endMint); + if (startDate.isBefore(now) && endDate.isAfter(now)) + return true; + else + return false; +} diff --git a/lib/uitl/whatsapp_method_channel.dart b/lib/uitl/whatsapp_method_channel.dart new file mode 100644 index 00000000..068e123e --- /dev/null +++ b/lib/uitl/whatsapp_method_channel.dart @@ -0,0 +1,34 @@ +import 'dart:async'; + +import 'package:flutter/services.dart'; + +class WhatsappMethodChannel { + static const MethodChannel _channel = MethodChannel('whats_app_otp'); + + FutureOr handleHandShake() async { + try { + await _channel.invokeMethod("performHandShake"); + + } on PlatformException catch (e) { + print("Failed to launch PenguinIn: '${e.message}'."); + } + } + + Future isWhatsAppInstalled() async { + try { + return await _channel.invokeMethod("isWhatsAppInstalled"); + } catch (e) { + return false; + } + } + + Future startListening() async { + try{ + String code = await _channel.invokeMethod("startListening"); + print("the code in flutter is ${code}"); + return code; + }catch(e){ + return ""; + } + } +} \ No newline at end of file diff --git a/lib/vital_signs/vital_sign.dart b/lib/vital_signs/vital_sign.dart new file mode 100644 index 00000000..01fbcec8 --- /dev/null +++ b/lib/vital_signs/vital_sign.dart @@ -0,0 +1,70 @@ +// import 'package:flutter/material.dart'; +// import 'package:vital_sign_camera/vital_sign_camera.dart'; +// +// class VitalSigns extends StatefulWidget { +// const VitalSigns({super.key}); +// +// @override +// State createState() => _VitalSignState(); +// } +// +// class _VitalSignState extends State { +// late final VitalSignCameraController _vitalSignCameraController; +// late Future cameraDevice; +// +// @override +// void initState() { +// super.initState(); +// cameraDevice = getFrontCamera(); +// } +// +// double? _heartRate; +// +// Future getFrontCamera() async { +// if (CameraPermissionStatus.authorized != await requestCameraPermission()) { +// return null; +// } +// return queryCameraDevice(CameraPosition.front); +// } +// +// @override +// Widget build(BuildContext context) { +// return Scaffold( +// body: Stack(children: [ +// VitalSignCamera( +// onCreated: _onVitalSignCameraCreated, +// isActive: true, +// userInfo: UserInfo( +// age: 30, gender: Gender.male, userId: '__YOUR_USER_ID__'), +// config: VitalSignCameraConfig(apiKey: '__YOUR_API_KEY__'), +// device: cameraDevice, +// onVideoFrameProcessed: _onVideoFrameProcessed), +// Center( +// child: Column( +// mainAxisAlignment: MainAxisAlignment.center, +// children: [ +// ElevatedButton( +// onPressed: () { +// setState(() { +// _vitalSignCameraController.startScanning(); +// }); +// }, +// child: const Text('start')), +// Text('Heart rate: $_heartRate'), +// ], +// ), +// ), +// ]), +// ); +// } +// +// void _onVideoFrameProcessed(VideoFrameProcessedEvent event) { +// // setState(() { +// // _heartRate = event.healthResult?.health?.vitalSigns.heartRate; +// // }); +// } +// +// void _onVitalSignCameraCreated(VitalSignCameraController controller) { +// _vitalSignCameraController = controller; +// } +// } \ No newline at end of file diff --git a/lib/widgets/AnimatedTextFields.dart b/lib/widgets/AnimatedTextFields.dart new file mode 100644 index 00000000..3719f3c9 --- /dev/null +++ b/lib/widgets/AnimatedTextFields.dart @@ -0,0 +1,347 @@ +import 'dart:math'; + +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; + +enum TextFieldInertiaDirection { + left, + right, +} + +Interval _getInternalInterval( + double start, + double end, + double externalStart, + double externalEnd, [ + Curve curve = Curves.linear, + ]) { + return Interval( + start + (end - start) * externalStart, + start + (end - start) * externalEnd, + curve: curve, + ); +} + +class AnimatedTextFormField extends StatefulWidget { + AnimatedTextFormField({ + Key? key, + this.interval = const Interval(0.0, 1.0), + required this.width, + this.loadingController, + this.inertiaController, + this.inertiaDirection, + this.enabled = true, + this.labelText, + this.prefixIcon, + this.suffixIcon, + this.keyboardType, + this.textInputAction, + this.obscureText = false, + this.controller, + this.focusNode, + this.validator, + this.onFieldSubmitted, + this.onSaved, + }) : assert((inertiaController == null && inertiaDirection == null) || + (inertiaController != null && inertiaDirection != null)), + super(key: key); + + final Interval interval; + final AnimationController? loadingController; + final AnimationController? inertiaController; + final double width; + final bool enabled; + final String? labelText; + final Widget? prefixIcon; + final Widget? suffixIcon; + final TextInputType? keyboardType; + final TextInputAction? textInputAction; + final bool obscureText; + final TextEditingController? controller; + final FocusNode? focusNode; + final FormFieldValidator? validator; + final ValueChanged? onFieldSubmitted; + final FormFieldSetter? onSaved; + final TextFieldInertiaDirection? inertiaDirection; + + @override + _AnimatedTextFormFieldState createState() => _AnimatedTextFormFieldState(); +} + +class _AnimatedTextFormFieldState extends State { + late Animation scaleAnimation; + late Animation sizeAnimation; + late Animation suffixIconOpacityAnimation; + + late Animation fieldTranslateAnimation; + late Animation iconRotationAnimation; + late Animation iconTranslateAnimation; + + @override + void initState() { + super.initState(); + + widget.inertiaController?.addStatusListener(handleAnimationStatus); + + final interval = widget.interval; + final loadingController = widget.loadingController; + + if (loadingController != null) { + scaleAnimation = Tween( + begin: 0.0, + end: 1.0, + ).animate(CurvedAnimation( + parent: loadingController, + curve: _getInternalInterval( + 0, .2, interval.begin, interval.end, Curves.easeOutBack), + )); + suffixIconOpacityAnimation = + Tween(begin: 0.0, end: 1.0).animate(CurvedAnimation( + parent: loadingController, + curve: _getInternalInterval(.65, 1.0, interval.begin, interval.end), + )); + _updateSizeAnimation(); + } + + final inertiaController = widget.inertiaController; + final inertiaDirection = widget.inertiaDirection; + final sign = inertiaDirection == TextFieldInertiaDirection.right ? 1 : -1; + + if (inertiaController != null) { + fieldTranslateAnimation = Tween( + begin: 0.0, + end: sign * 15.0, + ).animate(CurvedAnimation( + parent: inertiaController, + curve: Interval(0, .5, curve: Curves.easeOut), + reverseCurve: Curves.easeIn, + )); + iconRotationAnimation = + Tween(begin: 0.0, end: sign * pi / 12 /* ~15deg */) + .animate(CurvedAnimation( + parent: inertiaController, + curve: Interval(.5, 1.0, curve: Curves.easeOut), + reverseCurve: Curves.easeIn, + )); + iconTranslateAnimation = + Tween(begin: 0.0, end: 8.0).animate(CurvedAnimation( + parent: inertiaController, + curve: Interval(.5, 1.0, curve: Curves.easeOut), + reverseCurve: Curves.easeIn, + )); + } + } + + void _updateSizeAnimation() { + final interval = widget.interval; + final loadingController = widget.loadingController; + + sizeAnimation = Tween( + begin: 48.0, + end: widget.width, + ).animate(CurvedAnimation( + parent: loadingController!, + curve: _getInternalInterval( + .2, 1.0, interval.begin, interval.end, Curves.linearToEaseOut), + reverseCurve: Curves.easeInExpo, + )); + } + + @override + void didUpdateWidget(AnimatedTextFormField oldWidget) { + super.didUpdateWidget(oldWidget); + + if (oldWidget.width != widget.width) { + _updateSizeAnimation(); + } + } + + @override + dispose() { + widget.inertiaController?.removeStatusListener(handleAnimationStatus); + super.dispose(); + } + + void handleAnimationStatus(status) { + if (status == AnimationStatus.completed) { + widget.inertiaController?.reverse(); + } + } + + Widget _buildInertiaAnimation(Widget child) { + if (widget.inertiaController == null) { + return child; + } + + return AnimatedBuilder( + animation: iconTranslateAnimation, + builder: (context, child) => Transform( + alignment: Alignment.center, + transform: Matrix4.identity() + ..translate(iconTranslateAnimation.value) + ..rotateZ(iconRotationAnimation.value), + child: child, + ), + child: child, + ); + } + + InputDecoration _getInputDecoration(ThemeData theme) { + return InputDecoration( + contentPadding: EdgeInsets.fromLTRB(0, 0, 0, 0), + border: OutlineInputBorder( + borderRadius: new BorderRadius.circular(10.0), + borderSide: new BorderSide(), + ), + labelText: widget.labelText, + prefixIcon: _buildInertiaAnimation(widget.prefixIcon!), + suffixIcon: _buildInertiaAnimation(widget.loadingController != null + ? FadeTransition( + opacity: suffixIconOpacityAnimation!, + child: widget.suffixIcon!, + ) + : widget.suffixIcon!), + ); + } + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + Widget textField = TextFormField( + controller: widget.controller, + focusNode: widget.focusNode, + decoration: _getInputDecoration(theme), + keyboardType: widget.keyboardType, + textInputAction: widget.textInputAction, + obscureText: widget.obscureText, + onFieldSubmitted: widget.onFieldSubmitted, + onSaved: widget.onSaved, + validator: widget.validator, + enabled: widget.enabled, + ); + + if (widget.loadingController != null) { + textField = ScaleTransition( + scale: scaleAnimation, + child: AnimatedBuilder( + animation: sizeAnimation, + builder: (context, child) => ConstrainedBox( + constraints: BoxConstraints.tightFor(width: sizeAnimation.value), + child: child, + ), + child: textField, + ), + ); + } + + if (widget.inertiaController != null) { + textField = AnimatedBuilder( + animation: fieldTranslateAnimation, + builder: (context, child) => Transform.translate( + offset: Offset(fieldTranslateAnimation.value, 0), + child: child, + ), + child: textField, + ); + } + + return textField; + } +} + +class AnimatedPasswordTextFormField extends StatefulWidget { + AnimatedPasswordTextFormField({ + Key? key, + this.interval = const Interval(0.0, 1.0), + required this.animatedWidth, + this.loadingController, + this.inertiaController, + this.inertiaDirection, + this.enabled = true, + this.labelText, + this.keyboardType, + this.textInputAction, + this.controller, + this.focusNode, + this.validator, + this.onFieldSubmitted, + this.onSaved, + }) : assert((inertiaController == null && inertiaDirection == null) || + (inertiaController != null && inertiaDirection != null)), + super(key: key); + + final Interval interval; + final AnimationController? loadingController; + final AnimationController? inertiaController; + final double animatedWidth; + final bool enabled; + final String? labelText; + final TextInputType? keyboardType; + final TextInputAction? textInputAction; + final TextEditingController? controller; + final FocusNode? focusNode; + final FormFieldValidator? validator; + final ValueChanged? onFieldSubmitted; + final FormFieldSetter? onSaved; + final TextFieldInertiaDirection? inertiaDirection; + + @override + _AnimatedPasswordTextFormFieldState createState() => + _AnimatedPasswordTextFormFieldState(); +} + +class _AnimatedPasswordTextFormFieldState + extends State { + var _obscureText = true; + + @override + Widget build(BuildContext context) { + return AnimatedTextFormField( + interval: widget.interval, + loadingController: widget.loadingController, + inertiaController: widget.inertiaController, + width: widget.animatedWidth, + enabled: widget.enabled, + labelText: widget.labelText, + prefixIcon: Icon(Icons.lock, size: 20), + suffixIcon: GestureDetector( + onTap: () => setState(() => _obscureText = !_obscureText), + dragStartBehavior: DragStartBehavior.down, + child: AnimatedCrossFade( + duration: const Duration(milliseconds: 250), + firstCurve: Curves.easeInOutSine, + secondCurve: Curves.easeInOutSine, + alignment: Alignment.center, + layoutBuilder: (Widget topChild, _, Widget bottomChild, __) { + return Stack( + alignment: Alignment.center, + children: [bottomChild, topChild], + ); + }, + firstChild: Icon( + Icons.visibility, + size: 25.0, + semanticLabel: 'show password', + ), + secondChild: Icon( + Icons.visibility_off, + size: 25.0, + semanticLabel: 'hide password', + ), + crossFadeState: _obscureText + ? CrossFadeState.showFirst + : CrossFadeState.showSecond, + ), + ), + obscureText: _obscureText, + keyboardType: widget.keyboardType, + textInputAction: widget.textInputAction, + controller: widget.controller, + focusNode: widget.focusNode, + validator: widget.validator, + onFieldSubmitted: widget.onFieldSubmitted, + onSaved: widget.onSaved, + inertiaDirection: widget.inertiaDirection, + ); + } +} \ No newline at end of file diff --git a/lib/widgets/CounterView.dart b/lib/widgets/CounterView.dart new file mode 100644 index 00000000..039ba757 --- /dev/null +++ b/lib/widgets/CounterView.dart @@ -0,0 +1,188 @@ +import 'package:flutter/material.dart'; + +typedef StepperCallbackFuture = Future Function(int apply, int total); + +class StepperView extends StatefulWidget { + final double height; + final Color foregroundColor; + final Color backgroundColor; + final double buttonPadding; + + final int initialNumber; + final int maxNumber; + final int minNumber; + final StepperCallbackFuture? counterCallback; + final Function? increaseCallback; + final Function? decreaseCallback; + + StepperView({this.initialNumber = 1, this.minNumber = 1, required this.maxNumber, @required this.counterCallback, this.increaseCallback, this.decreaseCallback, this.height = 25, required this.foregroundColor, required this.backgroundColor, this.buttonPadding = 1}){ + assert((this.initialNumber >= this.minNumber && this.initialNumber <= this.maxNumber)); + } + @override + _StepperViewState createState() => _StepperViewState(); +} + +class _StepperViewState extends State { + late int _currentCount; + late StepperCallbackFuture _counterCallback; + late Function _increaseCallback; + late Function _decreaseCallback; + + @override + void initState() { + _currentCount = widget.initialNumber ?? 1; + _counterCallback = widget.counterCallback!; + _increaseCallback = widget.increaseCallback ?? () {}; + _decreaseCallback = widget.decreaseCallback ?? () {}; + super.initState(); + } + + bool loadingInc = false; + bool loadingDec = false; + + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.all(widget.buttonPadding), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular((widget.height/2) + (widget.buttonPadding*2)), + color: widget.backgroundColor, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _createDecrementButton( + ((_currentCount > widget.minNumber) ? () => _decrement() : null) as VoidCallback, + ), + Container( + width: 25, + child: Center( + child: Text( + _currentCount.toString(), + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.normal, + height: 1.5, + color: Colors.black, + ) + ), + ) + ), + _createIncrementButton( + ((_currentCount < widget.maxNumber) ? () => _increment() : null) as VoidCallback + ), + ], + ), + ); + } + + void _increment() async{ + doInc({required bool can}){ + if(can) + setState(() { + _currentCount++; + _increaseCallback(); + }); + } + + if (_currentCount < widget.maxNumber){ + if(_counterCallback == null) + doInc(can: true); + else { + setState(() => loadingInc = true); + var result = (await _counterCallback(1,_currentCount)); + doInc(can: result); + setState(() => loadingInc = false); + } + } + } + + void _decrement() async{ + doDec({required bool can}){ + if(can) + setState(() { + _currentCount--; + _decreaseCallback(); + }); + } + if (_currentCount > widget.minNumber) { + if(_counterCallback == null) + doDec(can: true); + else { + setState(() => loadingDec = true); + var result = (await _counterCallback(-1,_currentCount)); + doDec(can: result); + setState(() => loadingDec = false); + } + } + } + + Widget _createIncrementButton(VoidCallback onPressed,) { + return Stack( + children: [ + RawMaterialButton( + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + constraints: BoxConstraints(minWidth: widget.height, minHeight: widget.height), + onPressed: onPressed, + elevation: 2.0, + fillColor: widget.foregroundColor, + child: + Icon( + Icons.add, + color: (_currentCount < widget.maxNumber) ? Colors.grey[700] : Colors.grey[400], + size: 12.0, + ), + shape: CircleBorder(), + ), + + if(loadingInc) + Container( + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.8), + borderRadius: BorderRadius.circular(widget.height/2), + ), + height: widget.height, + width: widget.height, + child: CircularProgressIndicator( + strokeWidth: 3, + valueColor: AlwaysStoppedAnimation(Colors.green) + ) + ) + ], + ); + } + + Widget _createDecrementButton(VoidCallback onPressed) { + return Stack( + children: [ + RawMaterialButton( + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + constraints: BoxConstraints(minWidth: widget.height, minHeight: widget.height), + onPressed: onPressed, + elevation: 2.0, + fillColor: widget.foregroundColor, + child: Icon( + Icons.remove, + color: (_currentCount > widget.minNumber) ? Colors.grey[700] : Colors.grey[400], + size: 12.0, + ), + shape: CircleBorder(), + ), + + if(loadingDec) + Container( + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.8), + borderRadius: BorderRadius.circular(widget.height/2), + ), + height: widget.height, + width: widget.height, + child: CircularProgressIndicator( + strokeWidth: 3, + valueColor: AlwaysStoppedAnimation(Colors.red) + ) + ) + ], + ); + } +} diff --git a/lib/widgets/Loader/gif_loader_container.dart b/lib/widgets/Loader/gif_loader_container.dart new file mode 100644 index 00000000..ccc986c7 --- /dev/null +++ b/lib/widgets/Loader/gif_loader_container.dart @@ -0,0 +1,53 @@ +import 'package:flutter/cupertino.dart'; +import 'package:gif_view/gif_view.dart'; + +class GifLoaderContainer extends StatefulWidget { + bool barrierDismissible; + + GifLoaderContainer({this.barrierDismissible = true}); + + @override + _GifLoaderContainerState createState() => _GifLoaderContainerState(); +} + +class _GifLoaderContainerState extends State with TickerProviderStateMixin { + late GifController controller; + + @override + void initState() { + controller = GifController(); + + WidgetsBinding.instance.addPostFrameCallback((_) { + try { + controller = GifController(autoPlay: true, onFinish: () {}, loop: true); + // controller.repeat(min: 0, max: 11, period: Duration(milliseconds: 750), reverse: true); + } catch (ex) {} + }); + super.initState(); + } + + @override + void dispose() { + controller.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return WillPopScope( + onWillPop: () async { + return widget.barrierDismissible; + }, + child: Center( + //progress-loading.gif + child: Container( + // margin: EdgeInsets.only(bottom: 40), + child: GifView( + controller: controller, + image: AssetImage("assets/images/progress-loading-red.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), + ), + ), + ), + ); + } +} diff --git a/lib/widgets/LoadingButton.dart b/lib/widgets/LoadingButton.dart new file mode 100644 index 00000000..6a497198 --- /dev/null +++ b/lib/widgets/LoadingButton.dart @@ -0,0 +1,467 @@ +import 'dart:math'; + +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/rendering.dart'; + +class AnimatedButton extends StatefulWidget { + AnimatedButton({ + Key? key, + required this.text, + required this.onPressed, + required this.controller, + this.textColor, + required this.loadingColor, + this.color, + }) : super(key: key); + + final String text; + final Color? color; + final Color? textColor; + final Color loadingColor; + final VoidCallback? onPressed; + final AnimationController controller; + + @override + _AnimatedButtonState createState() => _AnimatedButtonState(); +} + +class _AnimatedButtonState extends State + with SingleTickerProviderStateMixin { + late Animation _sizeAnimation; + late Animation _textOpacityAnimation; + late Animation _buttonOpacityAnimation; + late Animation _ringThicknessAnimation; + late Animation _ringOpacityAnimation; + late Animation _colorAnimation; + var _isLoading = false; + var _hover = false; + var _width = 120.0; + + late Color _color; + late Color _loadingColor; + + static const _height = 40.0; + static const _loadingCircleRadius = _height / 2; + static const _loadingCircleThickness = 4.0; + + @override + void initState() { + super.initState(); + + _textOpacityAnimation = Tween(begin: 1.0, end: 0.0).animate( + CurvedAnimation( + parent: widget.controller, + curve: Interval(0.0, .25), + ), + ); + + // _colorAnimation + // _width, _sizeAnimation + + _buttonOpacityAnimation = + Tween(begin: 1.0, end: 0.0).animate(CurvedAnimation( + parent: widget.controller, + curve: Threshold(.65), + )); + + _ringThicknessAnimation = + Tween(begin: _loadingCircleRadius, end: _loadingCircleThickness) + .animate(CurvedAnimation( + parent: widget.controller, + curve: Interval(.65, .85), + )); + _ringOpacityAnimation = + Tween(begin: 1.0, end: 0.0).animate(CurvedAnimation( + parent: widget.controller, + curve: Interval(.85, 1.0), + )); + + widget.controller.addStatusListener(handleStatusChanged); + } + + @override + void didChangeDependencies() { + _updateColorAnimation(); + _updateWidth(); + super.didChangeDependencies(); + } + + void _updateColorAnimation() { + final theme = Theme.of(context); + final buttonTheme = theme.floatingActionButtonTheme; + + _color = (widget.color ?? buttonTheme.backgroundColor)!; + _loadingColor = widget.loadingColor ?? theme.colorScheme.secondary; + + _colorAnimation = ColorTween( + + begin: _color, + end: _loadingColor, + ).animate( + CurvedAnimation( + parent: widget.controller, + curve: const Interval(0.0, .65, curve: Curves.fastOutSlowIn), + ), + ); + } + + @override + void didUpdateWidget(AnimatedButton oldWidget) { + super.didUpdateWidget(oldWidget); + + if (oldWidget.color != widget.color || + oldWidget.loadingColor != widget.loadingColor) { + _updateColorAnimation(); + } + + if (oldWidget.text != widget.text) { + _updateWidth(); + } + } + + @override + void dispose() { + super.dispose(); + widget.controller.removeStatusListener(handleStatusChanged); + } + + void handleStatusChanged(status) { + if (status == AnimationStatus.forward) { + setState(() => _isLoading = true); + } + if (status == AnimationStatus.dismissed) { + setState(() => _isLoading = false); + } + } + + /// sets width and size animation + void _updateWidth() { + final theme = Theme.of(context); + // final fontSize = theme.textTheme.button!.fontSize; + final fontSize = 12.0; + final renderParagraph = RenderParagraph( + TextSpan( + text: widget.text, + style: TextStyle( + fontSize: fontSize, + fontWeight: FontWeight.normal, + letterSpacing: 0.6, + ), + ), + textDirection: TextDirection.ltr, + maxLines: 1, + ); + + renderParagraph.layout(BoxConstraints(minWidth: 120.0)); + + // text width based on fontSize, plus 45.0 for padding + var textWidth = + renderParagraph.getMinIntrinsicWidth(fontSize!).ceilToDouble() + 45.0; + + // button width is min 120.0 and max 240.0 + _width = textWidth > 120.0 && textWidth < 240.0 + ? textWidth + : textWidth >= 240.0 + ? 240.0 + : 120.0; + + _sizeAnimation = Tween(begin: 1.0, end: _height / _width) + .animate(CurvedAnimation( + parent: widget.controller, + curve: Interval(0.0, .65, curve: Curves.fastOutSlowIn), + )); + } + + Widget _buildButtonText(ThemeData theme) { + return FadeTransition( + opacity: _textOpacityAnimation, + child: AnimatedText( + text: widget.text, + style: TextStyle(color: widget.textColor ?? Colors.white), + ), + ); + } + + Widget _buildButton(ThemeData theme) { + final buttonTheme = theme.floatingActionButtonTheme; + + return FadeTransition( + opacity: _buttonOpacityAnimation, + child: AnimatedContainer( + duration: Duration(milliseconds: 300), + child: AnimatedBuilder( + animation: _colorAnimation, + builder: (context, child) => Material( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(_height / 2)), + color: _colorAnimation.value, + child: child, + shadowColor: _color, + elevation: (_isLoading == false) + ? (_hover == true + ? buttonTheme.highlightElevation ?? 0.0 + : buttonTheme.elevation ?? 0.0) + : 0.0, + ), + child: InkWell( + onTap: !_isLoading ? widget!.onPressed : null, + splashColor: buttonTheme.splashColor, + customBorder: buttonTheme.shape, + onHighlightChanged: (value) => setState(() => _hover = value), + child: SizeTransition( + sizeFactor: _sizeAnimation, + axis: Axis.horizontal, + child: Container( + width: _width, + height: _height, + alignment: Alignment.center, + child: _buildButtonText(theme), + ), + ), + ), + ), + ), + ); + } + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + + return Stack( + alignment: Alignment.center, + children: [ + FadeTransition( + opacity: _ringOpacityAnimation, + child: AnimatedBuilder( + animation: _ringThicknessAnimation, + builder: (context, child) => Ring( + color: widget!.loadingColor, + size: _height, + thickness: _ringThicknessAnimation.value, + ), + ), + ), + if (_isLoading) + SizedBox( + width: _height - _loadingCircleThickness, + height: _height - _loadingCircleThickness, + child: CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation(widget.loadingColor), + // backgroundColor: Colors.red, + strokeWidth: _loadingCircleThickness, + ), + ), + _buildButton(theme), + ], + ); + } +} + +class Ring extends StatelessWidget { + Ring({ + Key? key, + required this.color, + this.size = 40.0, + this.thickness = 2.0, + this.value = 1.0, + }) : assert(size - thickness > 0), + assert(thickness >= 0), + super(key: key); + + final Color color; + final double size; + final double thickness; + final double value; + + @override + Widget build(BuildContext context) { + return SizedBox( + width: size - thickness, + height: size - thickness, + child: thickness == 0 + ? null + : CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation(color), + strokeWidth: thickness, + value: value, + ), + ); + } +} + +enum AnimatedTextRotation { up, down } + +/// https://medium.com/flutter-community/flutter-challenge-3d-bottom-navigation-bar-48952a5fd996 +class AnimatedText extends StatefulWidget { + AnimatedText({ + Key? key, + required this.text, + required this.style, + this.textRotation = AnimatedTextRotation.up, + }) : super(key: key); + + final String text; + final TextStyle style; + final AnimatedTextRotation textRotation; + + @override + _AnimatedTextState createState() => _AnimatedTextState(); +} + +class _AnimatedTextState extends State + with SingleTickerProviderStateMixin { + var _newText = ''; + var _oldText = ''; + var _layoutHeight = 0.0; + final _textKey = GlobalKey(); + + late Animation _animation; + late AnimationController _controller; + + double get radius => _layoutHeight / 2; + + @override + void initState() { + super.initState(); + + _controller = AnimationController( + vsync: this, + duration: const Duration(milliseconds: 500), + ); + + _animation = Tween(begin: 0.0, end: pi / 2).animate(CurvedAnimation( + parent: _controller, + curve: Curves.easeOutBack, + )); + + _oldText = widget.text; + + WidgetsBinding.instance.addPostFrameCallback((_) { + setState(() => _layoutHeight = getWidgetSize(_textKey)!.height); + }); + } + + @override + void didUpdateWidget(AnimatedText oldWidget) { + super.didUpdateWidget(oldWidget); + + if (widget.text != oldWidget.text) { + _oldText = oldWidget.text; + _newText = widget.text; + _controller.forward().then((_) { + setState(() { + final t = _oldText; + _oldText = _newText; + _newText = t; + }); + _controller.reset(); + }); + } + } + + @override + void dispose() { + super.dispose(); + _controller.dispose(); + } + + Matrix4 get _matrix { + // Fix: The text is not centered after applying perspective effect in the web build. Idk why + if (kIsWeb) { + return Matrix4.identity(); + } + return Matrix4.identity()..setEntry(3, 2, .006); + } + + Matrix4 _getFrontSideUp(double value) { + return _matrix + ..translate( + 0.0, + -radius * sin(_animation.value), + -radius * cos(_animation.value), + ) + ..rotateX(-_animation.value); // 0 -> -pi/2 + } + + Matrix4 _getBackSideUp(double value) { + return _matrix + ..translate( + 0.0, + radius * cos(_animation.value), + -radius * sin(_animation.value), + ) + ..rotateX((pi / 2) - _animation.value); // pi/2 -> 0 + } + + Matrix4 _getFrontSideDown(double value) { + return _matrix + ..translate( + 0.0, + radius * sin(_animation.value), + -radius * cos(_animation.value), + ) + ..rotateX(_animation.value); // 0 -> pi/2 + } + + Matrix4 _getBackSideDown(double value) { + return _matrix + ..translate( + 0.0, + -radius * cos(_animation.value), + -radius * sin(_animation.value), + ) + ..rotateX(_animation.value - pi / 2); // -pi/2 -> 0 + } + + @override + Widget build(BuildContext context) { + final rollUp = widget.textRotation == AnimatedTextRotation.up; + final oldText = Text( + _oldText, + key: _textKey, + style: widget.style, + ); + final newText = Text( + _newText, + style: widget.style, + ); + + return AnimatedBuilder( + animation: _animation, + builder: (context, child) => Stack( + alignment: Alignment.center, + children: [ + if (_animation.value <= toRadian(85)) + Transform( + alignment: Alignment.center, + transform: rollUp + ? _getFrontSideUp(_animation.value) + : _getFrontSideDown(_animation.value), + child: oldText, + ), + if (_animation.value >= toRadian(5)) + Transform( + alignment: Alignment.center, + transform: rollUp + ? _getBackSideUp(_animation.value) + : _getBackSideDown(_animation.value), + child: newText, + ), + ], + ), + ); + } + +// Helpers + double toRadian(double degree) => degree * pi / 180; + + double lerp(double start, double end, double percent) => + (start + percent * (end - start)); + + Size? getWidgetSize(GlobalKey key) { + return key.currentContext!.size; + //return renderBox?.size; + } +} diff --git a/lib/widgets/TextFieldInertiaDirection.java b/lib/widgets/TextFieldInertiaDirection.java new file mode 100644 index 00000000..daaa0229 --- /dev/null +++ b/lib/widgets/TextFieldInertiaDirection.java @@ -0,0 +1,341 @@ +'dart:math'; + 'package:flutter/gestures.dart'; + 'package:flutter/material.dart'; 'package:font_awesome_flutter/font_awesome_flutter.dart'; + +enum TextFieldInertiaDirection { + left, + right, +} + +Interval _getInternalInterval( + double start, + double end, + double externalStart, + double externalEnd, [ + Curve curve = Curves.linear, +]) { + return Interval( + start + (end - start) * externalStart, + start + (end - start) * externalEnd, + curve: curve, + ); +} + +class AnimatedTextFormField extends StatefulWidget { + AnimatedTextFormField({ + Key key, + this.interval = const Interval(0.0, 1.0), + @required this.width, + this.loadingController, + this.inertiaController, + this.inertiaDirection, + this.enabled = true, + this.labelText, + this.prefixIcon, + this.suffixIcon, + this.keyboardType, + this.textInputAction, + this.obscureText = false, + this.controller, + this.focusNode, + this.validator, + this.onFieldSubmitted, + this.onSaved, + }) : assert((inertiaController == null && inertiaDirection == null) || + (inertiaController != null && inertiaDirection != null)), + super(key: key); + + final Interval interval; + final AnimationController loadingController; + final AnimationController inertiaController; + final double width; + final bool enabled; + final String labelText; + final Widget prefixIcon; + final Widget suffixIcon; + final TextInputType keyboardType; + final TextInputAction textInputAction; + final bool obscureText; + final TextEditingController controller; + final FocusNode focusNode; + final FormFieldValidator validator; + final ValueChanged onFieldSubmitted; + final FormFieldSetter onSaved; + final TextFieldInertiaDirection inertiaDirection; + + @override + _AnimatedTextFormFieldState createState() => _AnimatedTextFormFieldState(); +} + +class _AnimatedTextFormFieldState extends State { + Animation scaleAnimation; + Animation sizeAnimation; + Animation suffixIconOpacityAnimation; + + Animation fieldTranslateAnimation; + Animation iconRotationAnimation; + Animation iconTranslateAnimation; + + @override + void initState() { + super.initState(); + + widget.inertiaController?.addStatusListener(handleAnimationStatus); + + final interval = widget.interval; + final loadingController = widget.loadingController; + + if (loadingController != null) { + scaleAnimation = Tween( + begin: 0.0, + end: 1.0, + ).animate(CurvedAnimation( + parent: loadingController, + curve: _getInternalInterval( + 0, .2, interval.begin, interval.end, Curves.easeOutBack), + )); + suffixIconOpacityAnimation = + Tween(begin: 0.0, end: 1.0).animate(CurvedAnimation( + parent: loadingController, + curve: _getInternalInterval(.65, 1.0, interval.begin, interval.end), + )); + _updateSizeAnimation(); + } + + final inertiaController = widget.inertiaController; + final inertiaDirection = widget.inertiaDirection; + final sign = inertiaDirection == TextFieldInertiaDirection.right ? 1 : -1; + + if (inertiaController != null) { + fieldTranslateAnimation = Tween( + begin: 0.0, + end: sign * 15.0, + ).animate(CurvedAnimation( + parent: inertiaController, + curve: Interval(0, .5, curve: Curves.easeOut), + reverseCurve: Curves.easeIn, + )); + iconRotationAnimation = + Tween(begin: 0.0, end: sign * pi / 12 /* ~15deg */) + .animate(CurvedAnimation( + parent: inertiaController, + curve: Interval(.5, 1.0, curve: Curves.easeOut), + reverseCurve: Curves.easeIn, + )); + iconTranslateAnimation = + Tween(begin: 0.0, end: 8.0).animate(CurvedAnimation( + parent: inertiaController, + curve: Interval(.5, 1.0, curve: Curves.easeOut), + reverseCurve: Curves.easeIn, + )); + } + } + + void _updateSizeAnimation() { + final interval = widget.interval; + final loadingController = widget.loadingController; + + sizeAnimation = Tween( + begin: 48.0, + end: widget.width, + ).animate(CurvedAnimation( + parent: loadingController, + curve: _getInternalInterval( + .2, 1.0, interval.begin, interval.end, Curves.linearToEaseOut), + reverseCurve: Curves.easeInExpo, + )); + } + + @override + void didUpdateWidget(AnimatedTextFormField oldWidget) { + super.didUpdateWidget(oldWidget); + + if (oldWidget.width != widget.width) { + _updateSizeAnimation(); + } + } + + @override + dispose() { + widget.inertiaController?.removeStatusListener(handleAnimationStatus); + super.dispose(); + } + + void handleAnimationStatus(status) { + if (status == AnimationStatus.completed) { + widget.inertiaController?.reverse(); + } + } + + Widget _buildInertiaAnimation(Widget child) { + if (widget.inertiaController == null) { + return child; + } + + return AnimatedBuilder( + animation: iconTranslateAnimation, + builder: (context, child) => Transform( + alignment: Alignment.center, + transform: Matrix4.identity() + ..translate(iconTranslateAnimation.value) + ..rotateZ(iconRotationAnimation.value), + child: child, + ), + child: child, + ); + } + + InputDecoration _getInputDecoration(ThemeData theme) { + return InputDecoration( + labelText: widget.labelText, + prefixIcon: _buildInertiaAnimation(widget.prefixIcon), + suffixIcon: _buildInertiaAnimation(widget.loadingController != null + ? FadeTransition( + opacity: suffixIconOpacityAnimation, + child: widget.suffixIcon, + ) + : widget.suffixIcon), + ); + } + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + Widget textField = TextFormField( + controller: widget.controller, + focusNode: widget.focusNode, + decoration: _getInputDecoration(theme), + keyboardType: widget.keyboardType, + textInputAction: widget.textInputAction, + obscureText: widget.obscureText, + onFieldSubmitted: widget.onFieldSubmitted, + onSaved: widget.onSaved, + validator: widget.validator, + enabled: widget.enabled, + ); + + if (widget.loadingController != null) { + textField = ScaleTransition( + scale: scaleAnimation, + child: AnimatedBuilder( + animation: sizeAnimation, + builder: (context, child) => ConstrainedBox( + constraints: BoxConstraints.tightFor(width: sizeAnimation.value), + child: child, + ), + child: textField, + ), + ); + } + + if (widget.inertiaController != null) { + textField = AnimatedBuilder( + animation: fieldTranslateAnimation, + builder: (context, child) => Transform.translate( + offset: Offset(fieldTranslateAnimation.value, 0), + child: child, + ), + child: textField, + ); + } + + return textField; + } +} + +class AnimatedPasswordTextFormField extends StatefulWidget { + AnimatedPasswordTextFormField({ + Key key, + this.interval = const Interval(0.0, 1.0), + @required this.animatedWidth, + this.loadingController, + this.inertiaController, + this.inertiaDirection, + this.enabled = true, + this.labelText, + this.keyboardType, + this.textInputAction, + this.controller, + this.focusNode, + this.validator, + this.onFieldSubmitted, + this.onSaved, + }) : assert((inertiaController == null && inertiaDirection == null) || + (inertiaController != null && inertiaDirection != null)), + super(key: key); + + final Interval interval; + final AnimationController loadingController; + final AnimationController inertiaController; + final double animatedWidth; + final bool enabled; + final String labelText; + final TextInputType keyboardType; + final TextInputAction textInputAction; + final TextEditingController controller; + final FocusNode focusNode; + final FormFieldValidator validator; + final ValueChanged onFieldSubmitted; + final FormFieldSetter onSaved; + final TextFieldInertiaDirection inertiaDirection; + + @override + _AnimatedPasswordTextFormFieldState createState() => + _AnimatedPasswordTextFormFieldState(); +} + +class _AnimatedPasswordTextFormFieldState + extends State { + var _obscureText = true; + + @override + Widget build(BuildContext context) { + return AnimatedTextFormField( + interval: widget.interval, + loadingController: widget.loadingController, + inertiaController: widget.inertiaController, + width: widget.animatedWidth, + enabled: widget.enabled, + labelText: widget.labelText, + prefixIcon: Icon(FontAwesomeIcons.lock, size: 20), + suffixIcon: GestureDetector( + onTap: () => setState(() => _obscureText = !_obscureText), + dragStartBehavior: DragStartBehavior.down, + child: AnimatedCrossFade( + duration: const Duration(milliseconds: 250), + firstCurve: Curves.easeInOutSine, + secondCurve: Curves.easeInOutSine, + alignment: Alignment.center, + layoutBuilder: (Widget topChild, _, Widget bottomChild, __) { + return Stack( + alignment: Alignment.center, + children: [bottomChild, topChild], + ); + }, + firstChild: Icon( + Icons.visibility, + size: 25.0, + semanticLabel: 'show password', + ), + secondChild: Icon( + Icons.visibility_off, + size: 25.0, + semanticLabel: 'hide password', + ), + crossFadeState: _obscureText + ? CrossFadeState.showFirst + : CrossFadeState.showSecond, + ), + ), + obscureText: _obscureText, + keyboardType: widget.keyboardType, + textInputAction: widget.textInputAction, + controller: widget.controller, + focusNode: widget.focusNode, + validator: widget.validator, + onFieldSubmitted: widget.onFieldSubmitted, + onSaved: widget.onSaved, + inertiaDirection: widget.inertiaDirection, + ); + } +} \ No newline at end of file diff --git a/lib/widgets/app_map/google_huawei_map.dart b/lib/widgets/app_map/google_huawei_map.dart new file mode 100644 index 00000000..fdd7c739 --- /dev/null +++ b/lib/widgets/app_map/google_huawei_map.dart @@ -0,0 +1,119 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart' as googlemap; + +// import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart'; +import 'package:huawei_hmsavailability/huawei_hmsavailability.dart'; +import 'package:huawei_map/huawei_map.dart' as hmsMap; + +class AppMap extends StatefulWidget { + late dynamic onCameraMove; + late Map initialCamera; + + AppMapState? _state; + Function? onMapCreated; + Function? onCameraIdle; + + AppMap(this.initialCamera, + {required this.onCameraMove, this.onMapCreated, this.onCameraIdle}); + + @override + State createState() => _state = AppMapState(); + + moveTo({required googlemap.CameraPosition cameraPostion}) { + if (_state!.isHuawei) { + final cameraJson = cameraPostion.toMap(); + final camera = hmsMap.CameraPosition.fromMap(cameraJson); + _state?._huaweiMapController + .animateCamera(hmsMap.CameraUpdate.newCameraPosition(camera)); + } else { + _state?.googleMapController.animateCamera( + googlemap.CameraUpdate.newCameraPosition( + cameraPostion as googlemap.CameraPosition)); + } + } +} + +class AppMapState extends State { + bool isHuawei = false; + + Completer _googleMapControllerComp = + Completer(); + late googlemap.GoogleMapController googleMapController; + + Completer _huaweiMapControllerComp = Completer(); + late hmsMap.HuaweiMapController _huaweiMapController; + + late HmsApiAvailability hmsApiAvailability; + + checkIsHuawei() async { + await hmsApiAvailability.isHMSAvailable().then((value) { + isHuawei = value == 0 ? true : false; + hmsMap.HuaweiMapInitializer.initializeMap(); + }); + print(isHuawei); + setState(() {}); + } + + @override + void initState() { + hmsApiAvailability = HmsApiAvailability(); + if (Platform.isAndroid) checkIsHuawei(); + super.initState(); + } + + @override + Widget build(BuildContext context) { + if (isHuawei == null) return CircularProgressIndicator(); + return map(); + } + + Widget map() => isHuawei ? huaweiMap() : googleMap(); + + Widget googleMap() { + return googlemap.GoogleMap( + mapType: googlemap.MapType.normal, + zoomControlsEnabled: true, + myLocationButtonEnabled: true, + myLocationEnabled: true, + initialCameraPosition: + googlemap.CameraPosition.fromMap!(widget.initialCamera)!, + onCameraMove: (camera) { + widget.onCameraMove; + }, + onMapCreated: (googlemap.GoogleMapController controller) { + googleMapController = controller; + _googleMapControllerComp.complete(controller); + widget.onMapCreated!(); + }, + onCameraIdle: () { + print("onCameraIdle"); + widget.onCameraIdle; + }, + ); + } + + Widget huaweiMap() { + return hmsMap.HuaweiMap( + mapType: hmsMap.MapType.normal, + zoomControlsEnabled: false, + myLocationButtonEnabled: true, + myLocationEnabled: true, + initialCameraPosition: + hmsMap.CameraPosition.fromMap(widget.initialCamera), + onCameraMove: (camera) => widget.onCameraMove!, + onMapCreated: (controller) { + _huaweiMapController = controller; + _huaweiMapControllerComp.complete(controller); + widget.onMapCreated!(); + }, + onCameraIdle: () { + print("onCameraIdle"); + widget.onCameraIdle!(); + }, + ); + } +} diff --git a/lib/widgets/avatar/large_avatar.dart b/lib/widgets/avatar/large_avatar.dart new file mode 100644 index 00000000..e7919aa4 --- /dev/null +++ b/lib/widgets/avatar/large_avatar.dart @@ -0,0 +1,98 @@ +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import '../show_zoom_image_dialog.dart'; + +/// LargeAvatar +/// [name] the user name +/// [url] the image url +/// [disableProfileView] disable user profile view +/// [radius] the avatar radius +/// [width] the avatar width +/// [height] the avatar height +/// [onTap] on tap function +class LargeAvatar extends StatelessWidget { + LargeAvatar({Key? key, this.name, this.url, this.disableProfileView = false, this.radius = 70.0, this.width = 70, this.height = 60, this.onTap, this.isAppointmentAvatar = false}) : super(key: key); + + final String? name; + final Color red = Colors.red; + final String? url; + final bool disableProfileView; + final bool isAppointmentAvatar; + final double radius; + final double width; + final double height; + final GestureTapCallback? onTap; + + Widget _getAvatar() { + if (url != null && url!.isNotEmpty && Uri.parse(url!).isAbsolute) { + return Center( + child: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(radius)), + child: Stack( + alignment: Alignment.center, + children: [ + Image.network( + url!.trim(), + fit: BoxFit.fill, + width: width, + height: height, + ), + if (!disableProfileView && !isAppointmentAvatar) + Container( + child: Icon( + Icons.search, + size: 18, + color: Colors.white, + ), + padding: EdgeInsets.all(6), + decoration: containerRadius(Colors.black.withOpacity(0.3), 200), + ) + ], + ), + ), + ); + } else + return Center( + child: Texts( + name == null? "" : name![0].toUpperCase(), + color: Colors.white, + fontSize: 18, + )); + } + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: disableProfileView + ? null + : isAppointmentAvatar + ? onTap + : () { + showZoomImageDialog(context, url?.trim() ?? ""); + }, + child: Container( + decoration: BoxDecoration( + // gradient: LinearGradient( + // begin: Alignment(-1, -1), + // end: Alignment(1, 1), + // colors: [ + // Colors.grey[100], + // Colors.grey[800], + // ]), + // boxShadow: [ + // BoxShadow( + // color: Color.fromRGBO(0, 0, 0, 0.08), + // offset: Offset(0.0, 5.0), + // blurRadius: 16.0) + // ], + borderRadius: BorderRadius.all(Radius.circular(radius)), + ), + width: width, + height: height, + child: _getAvatar()), + ); + } +} diff --git a/lib/widgets/bottom_navigation/bottom_nav_bar.dart b/lib/widgets/bottom_navigation/bottom_nav_bar.dart new file mode 100644 index 00000000..c5bd76a3 --- /dev/null +++ b/lib/widgets/bottom_navigation/bottom_nav_bar.dart @@ -0,0 +1,128 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; +import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; +import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../d_q_icons_icons.dart'; +import 'bottom_navigation_item.dart'; + +class BottomNavBar extends StatefulWidget { + final ValueChanged? changeIndex; + final int? index; + final bool showHomeIcon; + BottomNavBar({Key? key, this.changeIndex, this.index, this.showHomeIcon = false}) : super(key: key); + + @override + _BottomNavBarState createState() => _BottomNavBarState(); +} + +class _BottomNavBarState extends State { + int _index = 0; + ToDoCountProviderModel? model; + var event = RobotProvider(); + _changeIndex(int index) async { + widget.changeIndex!(index); + if (index == 5) { + event.setValue({'isRobotVisible': 'true'}); + } + } + + @override + Widget build(BuildContext context) { + model = Provider.of(context); + ProjectViewModel projectViewModel = Provider.of(context); + return BottomAppBar( + elevation: 4, + shape: CircularNotchedRectangle(), + color: Colors.white, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 18), + child: Directionality( + textDirection: TextDirection.ltr, + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + BottomNavigationItem( + icon: "assets/images/new/bottom_nav/my_file.svg", + activeIcon: "assets/images/new/bottom_nav/my_file.svg", + changeIndex: _changeIndex, + index: widget.index, + currentIndex: 1, + name: TranslationBase.of(context).medicalFile, + ), + BottomNavigationItem( + icon: "assets/images/new/bottom_nav/family_files.svg", + activeIcon: "assets/images/new/bottom_nav/family_files.svg", + changeIndex: _changeIndex, + index: widget.index, + currentIndex: 3, + name: TranslationBase.of(context).myFamily, + isDisabled: projectViewModel.isLoginChild, + ), + if (widget.index == 0) + (widget.showHomeIcon) + ? BottomNavigationItem( + icon: "assets/images/new/bottom_nav/home.svg", + activeIcon: "assets/images/new/bottom_nav/home.svg", + changeIndex: _changeIndex, + index: widget.index, + currentIndex: 2, + name: TranslationBase.of(context).home, + ) + : Expanded(child: SizedBox()), + if (widget.index != 0 && projectViewModel.havePrivilege(34)) + BottomNavigationItem( + icon: "assets/images/new/bottom_nav/home.svg", + activeIcon: "assets/images/new/bottom_nav/home.svg", + changeIndex: _changeIndex, + index: widget.index, + currentIndex: 0, + name: TranslationBase.of(context).home, + ), + // BottomNavigationItem( + // icon: EvaIcons.calendar, + // activeIcon: EvaIcons.calendar, + // changeIndex: _changeIndex, + // index: _index, + // currentIndex: 2, + // name: TranslationBase.of(context).bookAppo, + // ), + if (/*widget.index == 0 && */ projectViewModel.havePrivilege(34)) + BottomNavigationItem( + icon: "assets/images/new/bottom_nav/todo.svg", + activeIcon: "assets/images/new/bottom_nav/todo.svg", + changeIndex: _changeIndex, + index: widget.index, + currentIndex: 4, + name: TranslationBase.of(context).todoList, + ), + if (projectViewModel.havePrivilege(77)) + BottomNavigationItem( + icon: "assets/images/new/bottom_nav/help.svg", + activeIcon: "assets/images/new/bottom_nav/help.svg", + changeIndex: _changeIndex, + index: widget.index, + currentIndex: 5, + name: TranslationBase.of(context).help, + ) + ], + )), + ), + ); + } + + Future navigateToBookingOptions(context) async { + Navigator.push(context, FadePage(page: BookingOptions())); + } + + Future navigateToToDoList(context) async { + Navigator.push(context, FadePage(page: ToDo(isShowAppBar: false))); + } +} diff --git a/lib/widgets/bottom_navigation/bottom_navigation_item.dart b/lib/widgets/bottom_navigation/bottom_navigation_item.dart new file mode 100644 index 00000000..22c27384 --- /dev/null +++ b/lib/widgets/bottom_navigation/bottom_navigation_item.dart @@ -0,0 +1,164 @@ +import 'package:badges/badges.dart' as badge_import; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/locator.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; + +import '../../Constants.dart'; + +class BottomNavigationItem extends StatelessWidget { + final String? icon; + final String? activeIcon; + final ValueChanged? changeIndex; + final int? index; + final int? currentIndex; + final String? name; + final bool? isDisabled; + + late ToDoCountProviderModel toDoProvider; + + AuthenticatedUserObject authenticatedUserObject = locator(); + + BottomNavigationItem({this.icon, this.activeIcon, this.changeIndex, this.index, this.currentIndex, this.name, this.isDisabled = false}); + + @override + Widget build(BuildContext context) { + toDoProvider = Provider.of(context); + ProjectViewModel projectViewModel = Provider.of(context); + return Expanded( + child: SizedBox( + // height: 72.0, + child: Material( + type: MaterialType.transparency, + child: InkWell( + highlightColor: Colors.transparent, + splashColor: Colors.transparent, + onTap: () { + if (!isDisabled!) changeIndex!(currentIndex!); + }, + child: currentIndex != 4 + ? Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 10, + ), + icon == "assets/images/new/bottom_nav/help.svg" ? Container( + child: SvgPicture.asset(icon!, height: 20, width: 20, fit: BoxFit.cover), + ) : Container( + child: SvgPicture.asset(icon!, height: 20, width: 20, fit: BoxFit.cover, color: currentIndex == index + ? Color(0xff333c45) + : Color(0xff989898)), + ), + SizedBox( + height: 2, + ), + Texts( + name, + textAlign: TextAlign.center, + color: currentIndex == index + ? Color(0xff333c45) + : isDisabled! + ? Colors.grey[300] + : Colors.grey, + fontSize: 11, + ), + SizedBox( + height: 7, + ), + ], + ) + : (authenticatedUserObject.isLogin && toDoProvider.isShowBadge) + ? Stack( + alignment: AlignmentDirectional.center, + children: [ + Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 11, + ), + Container( + child: SvgPicture.asset(icon!, height: 20, width: 20, fit: BoxFit.cover, color: currentIndex == index + ? Color(0xff333c45) + : Color(0xff989898)), + // Icon(currentIndex == index ? activeIcon : icon, color: currentIndex == index ? secondaryColor : Theme.of(context).dividerColor, size: 22.0), + ), + SizedBox( + height: 2, + ), + Texts( + name, + textAlign: TextAlign.center, + color: currentIndex == index ? Color(0xff333c45) : Colors.grey, + fontSize: 11, + ), + SizedBox( + height: 7, + ), + ], + ), + Positioned( + right: 18.0, + bottom: 27.0, + child: badge_import.Badge( + badgeStyle: badge_import.BadgeStyle( + shape: badge_import.BadgeShape.circle, + badgeColor: secondaryColor!.withOpacity(1.0), + borderRadius: BorderRadius.circular(8) + ), + // toAnimate: false, + badgeAnimation: badge_import.BadgeAnimation.fade(toAnimate: false), + position: badge_import.BadgePosition.topEnd(), + // shape: badge_import.BadgeShape.circle, + // badgeColor: secondaryColor!.withOpacity(1.0), + // borderRadius: BorderRadius.circular(8), + badgeContent: Container( + padding: EdgeInsets.all(2.0), + child: Text((toDoProvider.count! + toDoProvider.ancillaryCount!).toString(), style: TextStyle(color: Colors.white, fontSize: 14.0)), + ), + ), + ), + ], + ) + : Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 10, + ), + Container( + child: SvgPicture.asset(icon!, height: 20, width: 20, fit: BoxFit.cover), + ), + SizedBox( + height: 2, + ), + Texts( + name, + textAlign: TextAlign.center, + color: currentIndex == index + ? Color(0xff333c45) + : isDisabled! + ? Colors.grey[300] + : Colors.grey, + fontSize: 11, + ), + SizedBox( + height: 7, + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/widgets/bottom_options/BottomSheet.dart b/lib/widgets/bottom_options/BottomSheet.dart new file mode 100644 index 00000000..135a9731 --- /dev/null +++ b/lib/widgets/bottom_options/BottomSheet.dart @@ -0,0 +1,185 @@ +import 'dart:convert'; +import 'dart:io'; + +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; + +// import 'package:feather_icons_flutter/feather_icons_flutter.dart'; +import 'package:flutter/material.dart'; +import 'package:image_picker/image_picker.dart'; + +class ImageOptions { + static showImageOptions( + BuildContext context, + Function(String, File) image, + ) { + showModalBottomSheet( + backgroundColor: Colors.transparent, + context: context, + builder: (BuildContext bc) { + return _BottomSheet( + children: [ + _BottomSheetItem( + title: TranslationBase.of(context).selectFileSouse, + ), + _BottomSheetItem( + title: TranslationBase.of(context).gallery, + icon: Icons.image, + onTap: () async { + if (Platform.isAndroid) { + galleryImageAndroid(image); + } else { + File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.gallery, imageQuality: 20))!.path); + String fileName = _image.path; + final bytes = File(fileName).readAsBytesSync(); + String base64Encode = base64.encode(bytes); + if (base64Encode != null) { + image(base64Encode, _image); + } + } + }, + ), + _BottomSheetItem( + title: TranslationBase.of(context).camera, + icon: Icons.camera_alt, + onTap: () async { + if (Platform.isAndroid) { + cameraImageAndroid(image); + } else { + File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.camera, imageQuality: 20))!.path); + String fileName = _image.path; + final bytes = File(fileName).readAsBytesSync(); + String base64Encode = base64.encode(bytes); + if (base64Encode != null) { + image(base64Encode, _image); + } + } + }, + ), + _BottomSheetItem( + title: TranslationBase.of(context).cancel, + onTap: () {}, + ) + ], + ); + }); + } +} + +galleryImageAndroid(Function(String, File) image) async { + if (await PermissionService.isExternalStorageEnabled()) { + File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.gallery, imageQuality: 20))!.path); + String fileName = _image.path; + final bytes = File(fileName).readAsBytesSync(); + String base64Encode = base64.encode(bytes); + if (base64Encode != null) { + image(base64Encode, _image); + } + } else { + Utils.showPermissionConsentDialog(AppGlobal.context, TranslationBase.of(AppGlobal.context).galleryPermission, () async { + File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.gallery, imageQuality: 20))!.path); + String fileName = _image.path; + final bytes = File(fileName).readAsBytesSync(); + String base64Encode = base64.encode(bytes); + if (base64Encode != null) { + image(base64Encode, _image); + } + }); + } +} + +cameraImageAndroid(Function(String, File) image) async { + if (await PermissionService.isCameraEnabled()) { + File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.camera, imageQuality: 20))!.path); + String fileName = _image.path; + final bytes = File(fileName).readAsBytesSync(); + String base64Encode = base64.encode(bytes); + if (base64Encode != null) { + image(base64Encode, _image); + } + } else { + Utils.showPermissionConsentDialog(AppGlobal.context, TranslationBase.of(AppGlobal.context).cameraPermissionDialog, () async { + File _image = File((await ImagePicker.platform.pickImage(source: ImageSource.camera, imageQuality: 20))!.path); + String fileName = _image.path; + final bytes = File(fileName).readAsBytesSync(); + String base64Encode = base64.encode(bytes); + if (base64Encode != null) { + image(base64Encode, _image); + } + }); + } +} + +class _BottomSheet extends StatelessWidget { + final List children; + + _BottomSheet({Key? key, required this.children}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.symmetric(vertical: 12.0), + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.only(topLeft: Radius.circular(16.0), topRight: Radius.circular(16.0))), + child: SafeArea( + top: false, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + decoration: BoxDecoration(color: Theme.of(context).dividerColor, borderRadius: BorderRadius.circular(3.0)), + width: 40.0, + height: 6.0, + ), + ...children + ], + ), + ), + ); + } +} + +class _BottomSheetItem extends StatelessWidget { + final Function? onTap; + final IconData? icon; + final String title; + final ITEM_COLOR color; + + _BottomSheetItem({Key? key, this.onTap, required this.title, this.icon, this.color = ITEM_COLOR.primary}) : super(key: key); + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: () { + if (onTap != null) { + Navigator.pop(context); + onTap!(); + } + }, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 18.0, vertical: 18.0), + child: Row( + children: [ + if (icon != null) + Icon( + icon, + color: color == ITEM_COLOR.error ? CustomColors.accentColor : Theme.of(context).primaryColor, + size: 18.0, + ), + if (icon != null) SizedBox(width: 24.0), + Texts( + title ?? "", + style: "bodyText2", + color: color == ITEM_COLOR.error ? CustomColors.accentColor : null, + ), + ], + ), + ), + ); + } +} + +enum ITEM_COLOR { primary, error } diff --git a/lib/widgets/bottom_options/bottom_sheet.dart b/lib/widgets/bottom_options/bottom_sheet.dart new file mode 100644 index 00000000..c59c565e --- /dev/null +++ b/lib/widgets/bottom_options/bottom_sheet.dart @@ -0,0 +1,89 @@ +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:flutter/material.dart'; + +void showMyBottomSheet(BuildContext context, {required Widget child, required VoidCallback callBackFunc, String? type}) { + showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (BuildContext context) { + return Container( + constraints: BoxConstraints( + maxHeight: type =='CONTINUE_ACTION' ? MediaQuery.of(context).size.height *.75 : double.infinity,), + decoration: const BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topRight: Radius.circular(25), + topLeft: Radius.circular(25), + ), + ), + padding: MediaQuery.of(context).viewInsets, + clipBehavior: Clip.antiAlias, + child:SingleChildScrollView(child: Column( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.min, + children: [ + mHeight(13), + Container( + height: 6, + width: 60, + decoration: const BoxDecoration( + color: Color(0xff9A9A9A), + borderRadius: BorderRadius.all( + Radius.circular(20), + ), + ), + ), + mHeight(8), + child, + ], + )), + ); + }, + ).then((value) { + // print("BACK FROM DELEGATE!!!!"); + // print("value: $value"); + if (value == "delegate_reload") { + callBackFunc(); + } + }); +} + +class BottomSheetItem extends StatelessWidget { + final Function onTap; + final IconData icon; + final String title; + final Color color; + + const BottomSheetItem({Key? key, required this.onTap, required this.title, required this.icon, this.color = Colors.black}) : super(key: key); + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: () { + if (onTap != null) { + Navigator.pop(context); + onTap(); + } + }, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 18.0, vertical: 18.0), + child: Row( + children: [ + if (icon != null) + Icon( + icon, + color: color, + size: 18.0, + ), + if (icon != null) SizedBox(width: 24.0), + Text( + title ?? "", + style: TextStyle(color: color), + ), + ], + ), + ), + ); + } +} diff --git a/lib/widgets/buttons/BottomButton.dart b/lib/widgets/buttons/BottomButton.dart new file mode 100644 index 00000000..1746ee13 --- /dev/null +++ b/lib/widgets/buttons/BottomButton.dart @@ -0,0 +1,97 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:flutter/material.dart'; + +/// [label] button label +/// [icon] button icon its optional +/// [color] the background color +/// [textColor] the text color +/// [onTap] button function +/// [loading] show the progress indicator +/// [disabled] disabled the button +/// [borderColor] the button border color +/// [child] the child inside the button +/// [disabledPadding] remove padding +class BottomButton extends StatelessWidget { + final bool loading; + final bool disabled; + final String? label; + final Widget? icon; + final Color? color; + final Color? textColor; + final Color? borderColor; + final Function? onTap; + final Widget? child; + final bool disabledPadding; + + BottomButton({Key? key, this.loading = false, this.disabled = false, this.label, this.icon, this.color, this.textColor, this.disabledPadding = false, this.borderColor, this.onTap, this.child}) + : super(key: key); + + @override + Widget build(BuildContext context) { + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + decoration: BoxDecoration( + gradient: LinearGradient(begin: Alignment.bottomCenter, end: Alignment.topCenter, stops: [0.0, 0.9], colors: [CustomColors.white, CustomColors.white.withOpacity(0)]), + ), + alignment: Alignment.center, + child: SafeArea( + top: false, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + margin: child != null ? EdgeInsets.only(left: 14.0, right: 14.0, top: 14.0, bottom: 14) : EdgeInsets.only(left: 30.0, right: 30.0, top: 14.0, bottom: 14), + decoration: BoxDecoration( + color: child != null ? CustomColors.white : null, + border: child != null ? Border.all(color: Theme.of(context).dividerColor, width: 2.0) : Border.all(color: Colors.transparent, width: 0.0), + borderRadius: child != null ? BorderRadius.circular(16.0) : BorderRadius.circular(0.0), + boxShadow: child != null ? [BoxShadow(color: Color.fromRGBO(0, 0, 0, 0.04), spreadRadius: -0.0, offset: Offset(0, 4.0), blurRadius: 18.0)] : []), + child: Column( + children: [ + if (child != null) + Padding( + padding: disabledPadding + ? EdgeInsets.only(left: 0.0, right: 0.0, top: 14.0, bottom: label != null ? 0.0 : 14) + : EdgeInsets.only(left: 18.0, right: 18.0, top: 14.0, bottom: label != null ? 0.0 : 14), + child: child, + ), + if (child != null) + Padding( + padding: EdgeInsets.only(top: 14.0, bottom: 14), + child: Divider(), + ), + if (label != null) + label == null + ? SizedBox(height: 50.0) + : Padding( + padding: child != null ? EdgeInsets.only(bottom: 16.0, left: 16.0, right: 16.0) : EdgeInsets.zero, + child: SecondaryButton( + borderColor: borderColor, + onTap: () { + if (onTap != null) onTap!(); + }, + loading: loading, + disabled: disabled, + label: label!, + icon: icon, + color: color, + textColor: textColor), + ), + ], + ), + ), + if (label == null && child == null) + Padding( + padding: EdgeInsets.only(left: 30.0, right: 30.0, top: 14.0, bottom: 14), + ), + ], + ), + ), + ), + ], + ); + } +} diff --git a/lib/widgets/buttons/GestureIconButton.dart b/lib/widgets/buttons/GestureIconButton.dart new file mode 100644 index 00000000..5ad13362 --- /dev/null +++ b/lib/widgets/buttons/GestureIconButton.dart @@ -0,0 +1,73 @@ +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/material.dart'; + +class GestureIconButton extends StatefulWidget { + GestureIconButton( + this.label, + this.icon, { + Key? key, + this.onTap, + this.backgroundColor, + }) : super(key: key); + + final String label; + final Widget icon; + final VoidCallback? onTap; + final Color? backgroundColor; + + @override + _GestureIconButtonState createState() => _GestureIconButtonState(); +} + +class _GestureIconButtonState extends State { + bool _buttonLongPress = false; + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: (){ + setState(() { + _buttonLongPress = !_buttonLongPress; + }); + widget.onTap!(); + + }, + // onLongPressStart: (_) => + // setState(() => _buttonLongPress = !_buttonLongPress), + // onLongPressEnd: (_) => + // setState(() => _buttonLongPress = !_buttonLongPress), + child: Container( + decoration: BoxDecoration( + border: Border.all( + color: widget.backgroundColor! != null + ? widget.backgroundColor! + : Colors.grey[200]!, + ), + color: widget.backgroundColor != null + ? widget.backgroundColor + : Colors.grey.shade200, + borderRadius: BorderRadius.all(Radius.circular(8))), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.only(right: 8.0), + child: widget.icon, + ), + Texts( + widget.label, + fontWeight: FontWeight.bold, + fontSize: 13.6, + color: _buttonLongPress ? Colors.white : Colors.black, + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/widgets/buttons/borderedButton.dart b/lib/widgets/buttons/borderedButton.dart new file mode 100644 index 00000000..85c7e78a --- /dev/null +++ b/lib/widgets/buttons/borderedButton.dart @@ -0,0 +1,95 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:flutter/material.dart'; + +class BorderedButton extends StatelessWidget { + final String? text; + final Function? handler; + final Color? textColor; + final bool hasBorder; + final Color? borderColor; + final Color? backgroundColor; + final double vPadding; + final double hPadding; + final double radius; + final double lPadding; + final double tPadding; + final double rPadding; + final double bPadding; + final double fontSize; + final Widget? icon; + final FontWeight? fontWeight; + final bool hasShadow; + + BorderedButton( + this.text, { + this.handler, + this.textColor, + this.hasBorder = false, + this.borderColor, + this.backgroundColor, + this.vPadding = 0, + this.hPadding = 0, + this.radius = 4.0, + this.lPadding = 4.0, + this.tPadding = 0.0, + this.rPadding = 4.0, + this.bPadding = 0.0, + this.fontSize = 0, + this.icon, + this.fontWeight, + this.hasShadow = false, + }); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () { + handler!(); + }, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: backgroundColor ?? Colors.white, + borderRadius: BorderRadius.circular(radius), + border: Border.fromBorderSide(BorderSide( + color: hasBorder! ? borderColor! : Colors.white, + width: 0.8, + )), + boxShadow: [ + BoxShadow( + color: !hasShadow ? Colors.transparent : Colors.grey.withOpacity(0.5), + // spreadRadius: 5, + blurRadius: 15.0, + offset: Offset(0.0, 0.75) // changes position of shadow + ), + ]), + child: Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + icon != null ? icon! : Container(), + Container( + padding: (hPadding > 0 || vPadding > 0) + ? EdgeInsets.symmetric( + vertical: vPadding, horizontal: hPadding) + : EdgeInsets.fromLTRB( + lPadding, tPadding, rPadding, bPadding), + child: Text( + text!, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: fontSize == 0 + ? SizeConfig.textMultiplier! * 1.6 + : fontSize, + fontWeight: + fontWeight != null ? fontWeight : FontWeight.normal, + color: textColor ?? Color(0xffc4aa54)), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/widgets/buttons/button.dart b/lib/widgets/buttons/button.dart new file mode 100644 index 00000000..723a8590 --- /dev/null +++ b/lib/widgets/buttons/button.dart @@ -0,0 +1,129 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/services/permission/permission_service.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +/// Button widget +/// [label] button label +/// [icon] button icon its optional +/// [onTap] button function +/// [loading] show the progress indicator +/// [elevation] color elevation value +class Button extends StatefulWidget { + Button({Key? key, this.label= "", this.icon, this.onTap, this.backgroundColor, this.loading= false, this.elevation= true, this.disabled = false}) : super(key: key); + + final String label; + final Widget? icon; + final VoidCallback? onTap; + final bool loading; + final bool elevation; + final Color? backgroundColor; + final bool disabled; + + @override + _ButtonState createState() => _ButtonState(); +} + +class _ButtonState extends State